FeatureCurve (hwx.inspire)#
- class FeatureCurve(*args)#
Bases:
Feature
Features that are curves.
They are not created through the API but can be retrieved from a part.
# Name
Type
property
property
property
# Name
Description
createPipe
(path, section=’CIRCLE’, size=0.01, width=0.01, thickness=0.0, angle=None, ignoredFeatures=None, propagate=False, resultType=’COMBINE’)Create Pipe for FeatureCurve.
extendSurface
(edgesToExtend=None, allEdgesToExtend=False, extensionType=’LINEAR’, extent=’EXTENSION_LENGTH’, distance=0.01, extendUptoSurface=None, extendUptoPlane=None, createNewPart=False)Extend a surface along one or more edges.
getConnectionPoints
(self, uslices=2, vslices=None)Return a list of points that can be used to visualize how the feature
isTouching
(self, point)Determines the point is on the curve or not.
offsetCurves
(curve, offsetDistance=0.01, extensionType=’NATURAL’, symmetry=False, endOptions=’OPEN’, elevationType=’NONE’, elevationDistance=0.0, customElevationType=’FREE’, entityReferenceDirection=None, entityReferenceAxis=None, freeDirection=None)Create a copy of one or more curves at a specifies distance from the source
patch
(features)Creates patches to fill in specified missing surfaces.
patch2
(features, internalCurves=[], globalContinuity=’POSITION’, mergeResult=True)New Patch tool - Creates patches to fill in specified missing surfaces.
simplifyCurves
(curves, method=’FIT_BY_TOLERANCE’, tolerance=1e-05, numberOfPoints=10, degree=3, joinCurves=True)Simplify one or more curves by changing the number of control points and
- property polyline#
Returns a list of points along curve.
- getConnectionPoints(uslices=2, vslices=None)#
Return a list of points that can be used to visualize how the feature is connected (spider points).
- Parameters:
uslices (int) – Number of slices in u-direction.
vslices (int) – Number of slices in v-direction.
- Returns:
Points that can be used to visualize how the feature is connected.
- Return type:
list[Point]
- isTouching(point)#
Determines the point is on the curve or not.
- Parameters:
point (Point) – Point position x,y,z.
- property ishole#
Determines the feature is an hollow circle or not.
- property length#
Returns the the length of the curve.
- createPipe(section='CIRCLE', size=0.01, width=0.01, thickness=0.0, angle=None, ignoredFeatures=None, propagate=False, resultType='COMBINE')#
Create Pipe for FeatureCurve.
- Parameters:
path (list[FeatureCurve]) –
section (str) – The Pipe profile type. Valid choices are: CIRCLE, SQUARE, TRIANGLE and RECTANGLE.
size (float | str) – Length of the pipe. If value is a string it can be a Model Variable or a value with units.
width (float) – Width of the pipe, only applicable for Rectangular profile.
thickness (float | str) – Pipe thickness. If not set or set to zero, it will be solid pipe. If value is a string it can be a Model Variable or a value with units.
angle (float) – Angle in radians. Only for xy alignment.
ignoredFeatures – Ignored Features. Not mandatory. In propagated cases, if we need to ignore certain curves.
propagate (bool) – if True enables propagate option, otherwise disabled.
resultType (str) – Valid values are: COMBINE, SUBTRACT, INTERSECT and NEW_PART.
- Returns:
New part created.
- Return type:
- extendSurface(allEdgesToExtend=False, extensionType='LINEAR', extent='EXTENSION_LENGTH', distance=0.01, extendUptoSurface=None, extendUptoPlane=None, createNewPart=False)#
Extend a surface along one or more edges.
- Parameters:
edgesToExtend (list[FeatureCurve]) – Edges of the surface to extend. Valid only if allEdgesToExtend is False.
allEdgesToExtend (float) – If True, it will consider all the edges of the surface and ignore edgesToExtend values.
extensionType (str) – Extension Type. - LINEAR - SOFT - REFLECTIVE
extent (str) – Extent of surface. - EXTENSION_LENGTH - UP_TO_PLANE - UP_TO_SURFACE
distance (float) – Extension distance of surface.
extendUptoSurface (Part) – System Plane up to which surface is extended. Only valid for UP_TO_SURFACE extent.
extendUptoPlane (Plane) – Plane up to which surface is extended. Only valid for UP_TO_PLANE extent.
createNewPart (bool) – If True, new part is created as a extended surface otherwise not.
- Returns:
New part created if createNewPart is True.
- Return type:
Part|None
- offsetCurves(offsetDistance=0.01, extensionType='NATURAL', symmetry=False, endOptions='OPEN', elevationType='NONE', elevationDistance=0.0, customElevationType='FREE', entityReferenceDirection=None, entityReferenceAxis=None, freeDirection=None)#
Create a copy of one or more curves at a specifies distance from the source curves This tool can be used on both 2D and 3D curves.
- Parameters:
curve (FeatureCurve) – Curve to create offset curve.
offsetDistance (float) – Offset distance form actual curve.
extensionType (str) – Extension Type for offset curve. - NATURAL - ROUND - LINEAR
symmetry (bool) – If True, offset curves are created in both direction.
endOptions (str) – End Options. - OPEN - CLOSED_AND_STRAIGHT_ENDS - CLOSED_AND_ROUNDED
elevationType (str) – Elevation Type. - NONE - NORMAL - CUSTOM
elevationDistance (float) – Elevation distance for the offset curve.
customElevationType (str) – Custom Elevation Type. - ENTITY_REFERENCE - FREE
entityReferenceDirection (FeatureLinear) – Entity reference direction for offset curve.
entityReferenceAxis (Axis) – Entity reference Axis for offset curve.
freeDirection (math.Vector) – User defined direction for offset curve.
- Returns:
New part created.
- Return type:
- patch()#
Creates patches to fill in specified missing surfaces.
- Parameters:
features (list[Feature]) – Features to be patched.
- Returns:
New parts created.
- Return type:
list[Part]
Deprecated since version 2024: This will be removed in 2024.2. Use the patch2 function instead
- patch2(internalCurves=[], globalContinuity='POSITION', mergeResult=True)#
New Patch tool - Creates patches to fill in specified missing surfaces.
- Parameters:
- Returns:
New parts created.
- Return type:
list[Part]
- simplifyCurves(method='FIT_BY_TOLERANCE', tolerance=1e-05, numberOfPoints=10, degree=3, joinCurves=True)#
Simplify one or more curves by changing the number of control points and inverting their sequence, joining multiple curves, or by applying an arc length parametrization.
- Parameters:
curves (list[Part]) – Curves used in simplify curves operation.
method (str) – Simplify Curves method. - FIT_BY_TOLERANCE - FIT_BY_NUMBER_OF_POINTS - REDUCE_POINTS - ARC_LENGTH_PARAMETERIZATION
tolerance (float | str) – Tolerance factor for simplify curves.
numberOfPoints (float | str) – Number of points to simplify curves.
degree (int | str) – Degree to simplify curves. Value from 1 to 5 is valid.
joinCurves (bool) – If True, join curves otherwise not.
- Returns:
New parts created.
- Return type:
list[Part]