Implicit (hwx.inspire.implicit)#
- class Implicit(assembly=None)#
Bases:
Part
Implicit modelling represents geometry as a field and is highly efficient in terms of computation and rendering. Users can design very intricate geometries, such as lattices, whilst exploiting exceptional robustness during Boolean operations, offsets, shells, fillets, etc. It also enables field-driven design, where geometry can be tightly controlled using relationships with other geometry, simulation results, custom equations, and much more.
Attribute Table# Name
Type
property
property
Method Table# Name
Description
abs
(self, bodyA)Implicit absolute value operation.
acos
(self, bodyA)Implicit Trigonometry ACos operation.
acosh
(self, bodyA)Implicit Trigonometry ACosh operation.
add
(self, bodyA, bodyB)Implicit Add operation.
addVector
(self, bodyA, bodyB)Implicit Vector Add operation.
asin
(self, bodyA)Implicit Trigonometry ASin operation.
asinh
(self, bodyA)Implicit Trigonometry ASinh operation.
atan
(self, bodyA)Implicit Trigonometry ATan operation.
atan2
(self, bodyA, bodyB)Implicit Trigonometry ATan2 operation.
atanh
(self, bodyA)Implicit Trigonometry ATanh operation.
ceil
(self, bodyA)Implicit ceil operation.
circularPattern
(self, body, vector=None, equalSpacing=False, angle=60, count=2, transition=’SHARP’, distance=0.002, distanceField=None)The Circular Pattern operation takes a user-selected body and distributes
clamp
(self, bodyA, bodyB, bodyC)Implicit clamp operation.
combine
(self, targets, transition=’SHARP’, transitionValue=0.002, transitionField=None)The Combine tool is a Boolean Union operation between implicit bodies.
conform
(self, conformType=’SURFACE’, uCurve=None, vCurve=None, wCurve=None, curveUInvert=False, curveVInvert=False, curveWInvert=False, surfaceType=’SURFACE’, surface=None, surfaceUVFlip=False, surfaceUInvert=False, surfaceVInvert=False, volumeType=’SURFACECURVE’, volumeSurface=None, volumeSurfaceUVFlip=False, volumeSurfaceUInvert=False, volumeSurfaceVInvert=False)Creates an Implicit conform body.
constant
(self, value)Implicit constant.
convertGenericResult
(self, part, run, loadCase, resultType, simidx=0)The Convert tool accepts result part and converts into Altair’s implicit
convertResultToDensity
(self, part)The Convert tool accepts result part from OptiStruct and converts into
convertToImplicit
(self, part)The Convert tool accepts geometry in BRep or surface mesh formats and
convertToImplicitEdges
(self, edges)The Convert tool accepts geometry in edge or feature curve formats and
convertToImplicitSurfaces
(self, surfaces)The Convert tool accepts geometry in surface or feature area formats and
cos
(self, bodyA)Implicit Trigonometry Cos operation.
create2D
(self, bodyA, bodyB)Implicit 2D Vector creation.
create3D
(self, bodyA, bodyB, bodyC)Implicit 3D Vector creation.
create4D
(self, bodyA, bodyB, bodyC, bodyD)Implicit 3D Vector creation.
createAxis
(self, positionX=0, positionY=0, positionZ=0, normalX=0, normalY=0, normalZ=0)Tool to create axis implicit body.
createBlankPart
(assembly=None)Creates Implicit blank part in space.
createCapsule
(self, length=0.05, thickness=0.02, originX=0, originY=0, originZ=0)Tool to create capsule implicit body.
createCone
(self, radius=0.05, height=0.1, originX=0, originY=0, originZ=0)Tool to create cone implicit body.
createCuboid
(self, x=0.1, y=0.1, z=0.1, uniform=True, originX=0, originY=0, originZ=0)Tool to create cubical implicit body.
createCustomImplicitBody
(self, customUnitCell, minBounds, maxBounds)Custom Implicit Body capability is available through the Python API.
createCylinder
(self, radius=0.05, height=0.1, originX=0, originY=0, originZ=0)Tool to create cylindrical implicit body.
createField
(self, drivingObject, inputRangeMin=0, inputRangeMax=1, clamp=False, unitType=’Unitless’, outputRangeMin=0, outputRangeMax=1, unsigned=False)The Field tool is used to construct a field from a source that is not yet
createLine
(self, startX=0, startY=0, startZ=0, endX=0, endY=0, endZ=0, thickness=0)Tool to create line implicit body.
createPellet
(self, radius=0.05, thickness=0.02, originX=0, originY=0, originZ=0)Tool to create pellet implicit body.
createPipe
(self, innerRadius=0.02, outerRadius=0.05, height=0.1, originX=0, originY=0, originZ=0)Tool to create torus implicit body.
createPlane
(self, positionX=0, positionY=0, positionZ=0, normalX=0, normalY=0, normalZ=1)Tool to create plane implicit body.
createPoint
(self, x=0, y=0, z=0)Tool to create point implicit body.
createSphere
(self, radius=0.05, originX=0, originY=0, originZ=0)Tool to create spherical implicit body.
createTorus
(self, innerRadius=0.02, outerRadius=0.05, originX=0, originY=0, originZ=0)Tool to create torus implicit body.
cross
(self, bodyA, bodyB)Implicit Cross Vector creation.
difference
(self, targets, tools, transition=’SHARP’, transitionValue=0.002, transitionField=None)The difference tool is used to cut ‘tool’ implicit bodies from ‘target’
distance
(self, bodyA, bodyB)Implicit Distance Vector creation.
divide
(self, bodyA, bodyB)Implicit Divide operation.
dot
(self, bodyA, bodyB)Implicit Dot Vector creation.
e
(self)Implicit Euler’s number(E).
edgeSetAngleFilter
(self, body, filterName=’Filter’, retain=False, angleReference=None, angleValue=’LESS_THAN’, lowerAngle=45, lowerAngleField=None, upperAngle=60, upperAngleField=None)Filter edges from the Point-Edge set by checking their angle relative to
edgeSetBoundingBodyFilter
(self, body, filterName=’Filter’, retain=False, boundingBody=None, nodeCheck=’ALL’, midpointCheck=True)Filter edges from the Point-Edge set by checking if either end or an
edgeSetFieldValueFilter
(self, body, filterName=’Filter’, retain=False, referenceValue=0, referenceField=None, fieldValue=’LESS_THAN’, nodeCheck=’ALL’, midpointCheck=True, lowerValue=0.05, lowerValueField=None, upperValue=0.1, upperValueField=None)Filter edges from the Point-Edge set by interrogating the field value at
edgeSetLengthFilter
(self, body, filterName=’Filter’, retain=False, lengthValue=’LESS_THAN’, lowerLength=0.01, lowerLengthField=None, upperLength=0.02, upperLengthField=None)Filter edges from the Point-Edge set by checking their length against an
edgeSetManufacturabilityFilter
(self, body, filterName=’Filter’, retain=False, angleReference=None, angleValue=’LESS_THAN’, lengthValue=’LESS_THAN’, lowerLength=0.01, lowerLengthField=None, upperLength=0.02, upperLengthField=None, lowerAngle=45, lowerAngleField=None, upperAngle=60, upperAngleField=None)Filter edges from the Point-Edge set using a combined length and angle
edgeSetTrimmingEdgeFilter
(self, body, filterName=’Filter’, retain=False, boundingBody=None, close=False, closeType=’SURFACE_CRAWL’, merge=False, mergeDistance=0.002, mergeDistanceField=None)Filter edges from the Point-Edge set by trimming if they fall outside a
edit
(self)Contextmanager to group multiple updates for performance.
equalTo
(self, bodyA, bodyB)Implicit equal to operation.
featureRefAxis
(self, feature)Takes a ParaSolid/BRep axis and creates a reference for this to be
featureRefCurve
(self, feature)Takes a ParaSolid/BRep curve and creates a reference for this to be used
featureRefPlane
(self, feature)Takes a ParaSolid/BRep plane and creates a reference for this to be
featureRefPoint
(self, feature)Takes a ParaSolid/BRep point and creates a reference for this to be
featureRefSurface
(self, feature)Takes a ParaSolid/BRep surface and creates a reference for this to be
fillet
(self, body, type=’ROUNDS’, filletRadius=0.002, roundRadius=0.002)The Fillet tool applies a circular fillet of defined radius to sharp
floorDivision
(self, bodyA, bodyB)Implicit Floor Division operation.
fraction
(self, bodyA)Implicit fraction operation.
generalStrutLattice
(self, body, hollow=False, solidRegion=False, coordinateSystemType=’CARTESIAN’, localOrigin=None, strutDiameter=0.005, strutDiameterField=None, strutInnerDiameter=0.003, strutInnerDiameterField=None, shell=False, combine=False, shellDirection=’OUTWARD’, shellThicknessIn=0.1, shellThicknessInField=None, shellThicknessOut=0.1, shellThicknessOutField=None, trimmingBody=None, combineBody=None, transition=’SHARP’, distance=0.01, distanceField=None, verts=None, beams=None, defineExtents=False, extentsMinX=None, extentsMinY=None, extentsMinZ=None, extentsMaxX=None, extentsMaxY=None, extentsMaxZ=None)Strut lattices are constructed from nodes and these nodes are connected
getBody
(self, name)To get the implicit bodies based on their names.
greaterOrEqualTo
(self, bodyA, bodyB)Implicit greater or equal to operation.
greaterThan
(self, bodyA, bodyB)Implicit greater than operation.
implIf
(self, bodyA, bodyB, bodyC)Implicit if operation.
intersect
(self, targets, tools, transition=’SHARP’, transitionValue=0.002, transitionField=None)The Intersection tool is used to find volumes of overlap between two or
invert
(self, body)The Invert tool swaps the convention of ‘inside’ and ‘outside’ for an
isosurface
(self, body, fieldValue=’LESS_OR_EQUAL’, lowerValue=0.05, lowerValueField=None, upperValue=0.1, upperValueField=None, remap=False)For an implicit body or field of scalar values, extract an isosurface
length
(self, bodyA)Implicit Length Vector creation.
lessOrEqualTo
(self, bodyA, bodyB)Implicit less or equal to operation.
lessThan
(self, bodyA, bodyB)Implicit less than operation.
linearPattern
(self, body, conform=None, direction=’ONE’, vector1=None, spacing1=0.1, count1=2, vector2=None, spacing2=0.1, count2=2, spacing3=0.1, count3=2, transition=’SHARP’, distance=0.002, distanceField=None)The Linear Pattern operation takes a user-selected body and distributes
max
(self, bodyA, bodyB=None)Implicit min operation.
min
(self, bodyA, bodyB=None)Implicit min operation.
mirror
(self, body, plane=None, originX=0, originY=0, originZ=0, normalX=0, normalY=0, normalZ=1)The mirror operation takes an implicit body and mirrors it across an
mod
(self, bodyA, bodyB)Implicit Mod operation.
morph
(self, bodyA, bodyB, morphValue=0.5, morphValueField=None)The Morph tool performs a morphing operation between two implicit
moveBodies
(self, body, position)The Move Bodies tool is used to transform implicit bodies in terms of
multiply
(self, bodyA, bodyB)Implicit Multiply operation.
normalize
(self, bodyA)Implicit Normalize Vector creation.
offset
(self, body, direction=’OUTWARD’, outwardOffset=0.01, outwardOffsetField=None, inwardOffset=0.01, inwardOffsetField=None, shell=False)The Offset tool can be used to inwardly (negative) or outwardly
pesBridgeOperator
(self, target, tool, valence=4, valenceField=None)Create a new Point-Edge Set the creates edges that bridge between two
pesUnionOperator
(self, targets, merge=False, mergeDistance=0.002, mergeDistanceField=None)Combine the points and, optionally, edges of two Point-Edge Sets into a
pi
(self)Implicit pi.
planarLattice
(self, body, unitCellType=’HEXAGON’, solidRegion=False, coordinateSystemType=’CARTESIAN’, localOriginX=0, localOriginY=0, localOriginZ=0, localOrigin=None, thickness=0.005, thicknessField=None, unitCellSize=False, uniform=True, unitCellSizeX=4, unitCellSizeXField=None, unitCellSizeY=4, unitCellSizeYField=None, planeVectorX=0, planeVectorY=0, planeVectorZ=1, shell=False, combine=False, shellDirection=’OUTWARD’, shellThicknessIn=0.1, shellThicknessInField=None, shellThicknessOut=0.1, shellThicknessOutField=None, trimmingBody=None, combineBody=None, transition=’SHARP’, distance=0.01, distanceField=None, conformTo=None, unitCellName=None, nodes=None, connectivity=None)Planar lattices are 2.5 dimensional cellular structures, with a clearly
planeCut
(self, body, keep=’REGULAR’, plane=None, originX=0, originY=0, originZ=0, normalX=0, normalY=0, normalZ=1)Reference an existing plane or planar feature, or a manually created
pointCloud
(self, points, weights, interpolation=’INVERSE_DISTANCE’, exponent=2, backgroundEnable=False, backgroundValue=0.0, backgroundField=None, pointBehaviour=’BUMP’, radii=None, falloffs=None)Create a custom implicit field or geometry from a set of points with
pointCloudPattern
(self, body, pointCloud=None, transition=’SHARP’, distance=0.002, distanceField=None)The PointCloud Pattern operation takes a user-selected body and
pointEdgeSet
(self, body, pointsGenerationMethod=’UNIFORM_RANDOM’, seed=0, pointCount=200, minSpacing=0.02, minSpacingField=None, pointSet=None, edgesGenerationMethod=’VALENCE’, valence=4.0, valenceField=None, edgeSet=None, voronoiType=’DELAUNAY’, points=’SURFACE_MESH’, uSpacing=0.1, vSpacing=0.1, edges=’MESH_EDGES’, startDistance=-0.02, startDistanceField=None, endDistance=0.02, endDistanceField=None, volumeType=’INSIDE’, sampleCurves=True, normalFunction=None)A point-edge set is a graph comprising points that are (optionally)
pointSetAngleFilter
(self, body, filterName=’Filter’, retain=False, normalReferenceField=None, angleReferenceField=None, angleValue=’LESS_THAN’, lowerAngle=45, lowerAngleField=None, upperAngle=60, upperAngleField=None)Select a feature as an Angular Reference (line, axis, plane, planar
pointSetBoundingBodyFilter
(self, body, filterName=’Filter’, retain=False, boundingBody=None)Filter points from the Point-Edge set by checking if they fall inside a
pointSetFieldValueFilter
(self, body, filterName=’Filter’, retain=False, referenceValue=0, referenceField=None, fieldValue=’LESS_THAN’, lowerValue=0.05, lowerValueField=None, upperValue=0.1, upperValueField=None)Filter points from the Point-Edge set by interrogating the field value at
pointSetPerturbationFilter
(self, body, filterName=’Filter’, retain=False, distribution=’UNIFORM’, uniform=True, seed=0, xCentralValue=0, xCentralValueField=None, xWidth=0.001, xWidthField=None, yCentralValue=0, yCentralValueField=None, yWidth=0.001, yWidthField=None, zCentralValue=0, zCentralValueField=None, zWidth=0.001, zWidthField=None, customVector=False, normalField=None)Translate points in a Point-Edge Set in either systematic or randomised
pointSetValenceFilter
(self, body, filterName=’Filter’, retain=False, valenceValue=’LESS_THAN’, valence=0.05, valenceField=None, upperValue=0.1, upperValueField=None)Filter points from the Point-Edge set by checking the number of edges
power
(self, bodyA, bodyB)Implicit Power operation.
refAxis
(self, reference)Takes a geometry system axis and creates a reference for this to be
refPlane
(self, reference)Takes a geometry system plane and creates a reference for this to be
refPoint
(self, reference)Takes a geometry system point and creates a reference for this to be
remap
(self, body)Remap is a general field of scalar values into a signed distance field.
scale
(self, bodyA, bodyB)Implicit Scale Vector creation.
sign
(self, bodyA)Implicit sign operation.
sin
(self, bodyA)Implicit Trigonometry Sin operation.
smooth
(self, body, type=’GAUSSIAN’, width=1, iterations=1, strength=100)The Smooth tool is used to reduce the size of, or remove, unwanted small
sqrt
(self, bodyA)Implicit sqrt operation.
step
(self, bodyA, bodyB)Implicit step operation.
stochasticStrutLattice
(self, body, hollow=False, solidRegion=False, strutDiameter=0.005, strutDiameterField=None, strutInnerDiameter=0.003, strutInnerDiameterField=None, shell=False, boolean=False, booleanType=’COMBINE’, shellDirection=’OUTWARD’, shellThicknessIn=0.1, shellThicknessInField=None, shellThicknessOut=0.1, shellThicknessOutField=None, trimmingBody=None, targetBody=None, transition=’SHARP’, distance=0.01, distanceField=None, nodeTransition=’SHARP’, nodeJointValue=0.001, nodeJointValueField=None, createNodes=False, nodeDiameter=0.001, nodeDiameterField=None)Stochastic lattice is built by thickening a point-edge set, which is a
strutLattice
(self, body, unitCellType=’BODYCENTEREDCUBIC’, hollow=False, solidRegion=False, coordinateSystemType=’CARTESIAN’, localOriginX=0, localOriginY=0, localOriginZ=0, localOrigin=None, strutDiameter=0.005, strutDiameterField=None, strutInnerDiameter=0.003, strutInnerDiameterField=None, unitCellSize=False, uniform=True, cellSizeX=4, cellSizeY=4, cellSizeZ=4, shell=False, combine=False, shellDirection=’OUTWARD’, shellThicknessIn=0.1, shellThicknessInField=None, shellThicknessOut=0.1, shellThicknessOutField=None, trimmingBody=None, combineBody=None, transition=’SHARP’, distance=0.01, distanceField=None, unitCellName=None, nodes=None, connectivity=None, conformTo=None, defineExtents=False, extentsMinX=None, extentsMinY=None, extentsMinZ=None, extentsMaxX=None, extentsMaxY=None, extentsMaxZ=None)Strut lattices are constructed from nodes and these nodes are connected
subtract
(self, bodyA, bodyB)Implicit Subtract operation.
surfaceLattice
(self, body, unitCellType=’GYROID’, surfaceType=True, solidRegion=False, coordinateSystemType=’CARTESIAN’, localOriginX=0, localOriginY=0, localOriginZ=0, localOrigin=None, density=0.5, densityField=None, bias=0.5, unitCellSize=False, uniform=True, cellSizeX=4, cellSizeXField=None, cellSizeY=4, cellSizeYField=None, cellSizeZ=4, cellSizeZField=None, shell=False, combine=False, shellDirection=’OUTWARD’, shellThicknessIn=0.1, shellThicknessInField=None, shellThicknessOut=0.1, shellThicknessOutField=None, trimmingBody=None, combineBody=None, transition=’SHARP’, distance=0.01, distanceField=None, conformTo=None, default=False, extentsMinX=None, extentsMinY=None, extentsMinZ=None, extentsMaxX=None, extentsMaxY=None, extentsMaxZ=None, thickness=False, thicknessValue=0.002, thicknessValueField=None)Surface lattices are cellular structures constructed from one or
tan
(self, bodyA)Implicit Trigonometry Tan operation.
vectorElement
(self, bodyA, index)Implicit vector element creation.
xRef
(self)Implicit X Reference.
yRef
(self)Implicit Y Reference.
zRef
(self)Implicit Z Reference.
Example
# Create implicit models with primitives, lattices, point clouds, # fields, offsetting, Booleans, inverting, smoothing, morphing, and filleting. # Instead of explicitly defining the surface or boundary of an object, implicit modeling # represents geometry through implicit functions, defining relationships between points in # space using conditions or constraints.Implicit functions can be thought of as a 3D field # of scalar values, where positive values are outside the geometry's boundary and negative # values are inside the geometry's boundary. An isosurface is created, passing through all # positions in the field where the scalar value is equal to zero.With implicit modeling, # you can efficiently and robustly manipulate complex geometry, perform Boolean and offset # operations without failure, and model at scale with a high resolution. from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = "Implicit Part1" # Creating Cuboid primitive in implicit part. implicitPart.createCuboid(x="300 mm", originX=0.5) # Creating Cuboid primitive in implicit part. cuboid1 = implicitPart.createCuboid(x="200 mm") # Creating Sphere primitive in implicit part. sphere = implicitPart.createSphere(radius="200 mm", originX=1) # Creating Planar Lattice with sphere implicitPart.planarLattice(sphere, thickness=0.01, unitCellType= "DIAMOND") print("Planar Lattice has been created using implicit sphere body.") # Creating Cylinder primitive in implicit part. cylinder = implicitPart.createCylinder(height="300 mm", radius="150 mm", originX=1.5) # Smooth operation on cylinder. implicitPart.smooth(cylinder, width=2) print("Smooth has been created from Cylinder with round fillet type.") # Offset operation on cuboid . implicitPart.offset(cuboid1, outwardOffset=0.1) print("Offset has been created from Cuboid in outward direction.") # Creating Surface Lattice with cuboid cuboid = implicitPart.bodies[0] implicitPart.surfaceLattice(cuboid, density=0.3) print("Surface Lattice has been created using implicit cuboid body.") # Updating Surface Lattice. with implicitPart.edit(): surfaceLattice = implicitPart.bodies[-1] surfaceLattice.density = 0.6 surfaceLattice.solidRegion = True inspire.fitView()
- getBody(name)#
To get the implicit bodies based on their names.
- property visualizationQuality#
Returns the visualization quality of implicit part from the GUI.
- property bodies#
“Returns list of implicit bodies.
- edit()#
Contextmanager to group multiple updates for performance.
- createSphere(radius=0.05, originX=0, originY=0, originZ=0)#
Tool to create spherical implicit body.
- Parameters:
radius (float | str) – Radius of the spherical implicit object.
originX (float | str) – Origin value in X direction.
originY (float | str) – Origin value in Y direction.
originZ (float | str) – Origin value in Z direction.
- Returns:
The newly created Sphere object.
- Return type:
Sphere
Example
from hwx import inspire model = inspire.newModel() # Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = "Implicit Part1" inspire.fitView() print("New Implicit part added in the model: ", model.parts[0]) # Creating Sphere primitive in implicit part. sphere = implicitPart.createSphere(radius="200 mm") inspire.fitView() print("New Sphere has been added in Implicit Part1.") # Updating Implicit Sphere. with implicitPart.edit(): sphere.radius = "500 mm" # Updating Implicit Sphere with variables. model.variables.add("radius", type="length", expression="800 mm") with implicitPart.edit(): sphere.radius = "radius" inspire.fitView() print("Implicit Sphere has been updated with new values.")
- createCuboid(x=0.1, y=0.1, z=0.1, uniform=True, originX=0, originY=0, originZ=0)#
Tool to create cubical implicit body.
- Parameters:
x (float | str) – Length of cuboid.
y (float | str) – Breadth of cuboid.
z (float | str) – Height of cuboid.
uniform (bool) – If True, all sides are equal.
originX (float | str) – Origin value in X direction.
originY (float | str) – Origin value in Y direction.
originZ (float | str) – Origin value in Z direction.
- Returns:
The newly created Cuboid object.
- Return type:
Cuboid
Example
from hwx import inspire model = inspire.newModel() # Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = "Implicit Part1" inspire.fitView() print("New Implicit part added in the model: ", model.parts[0]) # Creating Cuboid primitive in implicit part. cuboid = implicitPart.createCuboid(x="100 mm", uniform=True) inspire.fitView() print("New Cuboid has been added in Implicit Part1.") # Updating Implicit Cuboid. with implicitPart.edit(): cuboid.y = "200 mm" inspire.fitView() print("Implicit Cuboid has been updated with new values.")
- createCylinder(radius=0.05, height=0.1, originX=0, originY=0, originZ=0)#
Tool to create cylindrical implicit body.
- Parameters:
radius (float | str) – Radius of the cylindrical implicit object.
height (float | str) – Height of the cylindrical implicit object.
originX (float | str) – Origin value in X direction.
originY (float | str) – Origin value in Y direction.
originZ (float | str) – Origin value in Z direction.
- Returns:
The newly created Cylinder object.
- Return type:
Cylinder
Example
from hwx import inspire model = inspire.newModel() # Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = "Implicit Part1" inspire.fitView() print("New Implicit part added in the model: ", model.parts[0]) # Creating Cylinder primitive in implicit part. cylinder = implicitPart.createCylinder(radius="200 mm", height="500 mm") inspire.fitView() print("New Cylinder has been added in Implicit Part1.") # Updating Implicit Cylinder. with implicitPart.edit(): cylinder.height = "800 mm" inspire.fitView() print("Implicit Cylinder has been updated with new values.")
- createTorus(innerRadius=0.02, outerRadius=0.05, originX=0, originY=0, originZ=0)#
Tool to create torus implicit body.
- Parameters:
innerRadius (float | str) – Inner Radius of the torus implicit object.
outerRadius (float | str) – Outer Radius of the torus implicit object.
originX (float | str) – Origin value in X direction.
originY (float | str) – Origin value in Y direction.
originZ (float | str) – Origin value in Z direction.
- Returns:
The newly created Torus object.
- Return type:
Torus
Example
from hwx import inspire model = inspire.newModel() # Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = "Implicit Part1" inspire.fitView() print("New Implicit part added in the model: ", model.parts[0]) # Creating Torus primitive in implicit part. torus = implicitPart.createTorus(innerRadius="300 mm", outerRadius="500 mm") inspire.fitView() print("New Torus has been added in Implicit Part1.") # Updating Implicit Torus. with implicitPart.edit(): torus.innerRadius = "200 mm" inspire.fitView() print("Implicit Torus has been updated with new values.")
- createCone(radius=0.05, height=0.1, originX=0, originY=0, originZ=0)#
Tool to create cone implicit body.
- Parameters:
radius (float | str) – Radius of the cone implicit object.
height (float | str) – Height of the cone implicit object.
originX (float | str) – Origin value in X direction.
originY (float | str) – Origin value in Y direction.
originZ (float | str) – Origin value in Z direction.
- Returns:
The newly created Cone object.
- Return type:
Cone
Example
from hwx import inspire model = inspire.newModel() # Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = "Implicit Part1" inspire.fitView() print("New Implicit part added in the model: ", model.parts[0]) # Creating Cone primitive in implicit part. cone = implicitPart.createCone(radius="200 mm", height="500 mm") inspire.fitView() print("New Cone has been added in Implicit Part1.") # Updating Implicit Cone. with implicitPart.edit(): cone.height = "800 mm" inspire.fitView() print("Implicit Cone has been updated with new values.")
- createPipe(innerRadius=0.02, outerRadius=0.05, height=0.1, originX=0, originY=0, originZ=0)#
Tool to create torus implicit body.
- Parameters:
innerRadius (float | str) – Inner Radius of the pipe implicit object.
outerRadius (float | str) – Outer Radius of the pipe implicit object.
height (float | str) – Height of the pipe implicit object.
originX (float | str) – Origin value in X direction.
originY (float | str) – Origin value in Y direction.
originZ (float | str) – Origin value in Z direction.
- Returns:
The newly created Pipe object.
- Return type:
Pipe
Example
from hwx import inspire model = inspire.newModel() # Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = "Implicit Part1" inspire.fitView() print("New Implicit part added in the model: ", model.parts[0]) # Creating Pipe primitive in implicit part. pipe = implicitPart.createPipe(innerRadius="300 mm", outerRadius="500 mm", height= "800 mm") inspire.fitView() print("New Pipe has been added in Implicit Part1.") # Updating Implicit Pipe. with implicitPart.edit(): pipe.innerRadius = "200 mm" inspire.fitView() print("Implicit Pipe has been updated with new values.")
- createCapsule(length=0.05, thickness=0.02, originX=0, originY=0, originZ=0)#
Tool to create capsule implicit body.
- Parameters:
length (float | str) – Length of the capsule implicit object.
thickness (float | str) – Thickness of the capsule implicit object.
originX (float | str) – Origin value in X direction.
originY (float | str) – Origin value in Y direction.
originZ (float | str) – Origin value in Z direction.
- Returns:
The newly created Capsule object.
- Return type:
Capsule
Example
from hwx import inspire model = inspire.newModel() # Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = "Implicit Part1" inspire.fitView() print("New Implicit part added in the model: ", model.parts[0]) # Creating Capsule primitive in implicit part. capsule = implicitPart.createCapsule(length="200 mm", thickness="50 mm") inspire.fitView() print("New Capsule has been added in Implicit Part1.") # Updating Implicit Capsule. with implicitPart.edit(): capsule.length = "400 mm" inspire.fitView() print("Implicit Capsule has been updated with new values.")
- createPellet(radius=0.05, thickness=0.02, originX=0, originY=0, originZ=0)#
Tool to create pellet implicit body.
- Parameters:
radius (float | str) – Radius of the pellet implicit object.
thickness (float | str) – Thickness of the pellet implicit object.
originX (float | str) – Origin value in X direction.
originY (float | str) – Origin value in Y direction.
originZ (float | str) – Origin value in Z direction.
- Returns:
The newly created Pellet object.
- Return type:
Pellet
Example
from hwx import inspire model = inspire.newModel() # Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = "Implicit Part1" inspire.fitView() print("New Implicit part added in the model: ", model.parts[0]) # Creating Pallet primitive in implicit part. pellet = implicitPart.createPellet(radius="500 mm", thickness="200 mm") inspire.fitView() print("New Pellet has been added in Implicit Part1.") # Updating Implicit Pellet. with implicitPart.edit(): pellet.radius = "600 mm" inspire.fitView() print("Implicit Pellet has been updated with new values.")
- createPoint(x=0, y=0, z=0)#
Tool to create point implicit body.
- Parameters:
x (float | str) – Value in X direction for implicit point body.
y (float | str) – Value in Y direction for implicit point body.
z (float | str) – Value in Z direction for implicit point body.
- Returns:
The newly created Point object.
- Return type:
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = "Implicit Part1" # Creating point in implicit part. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. implicitPart.createPoint(x="0.1 m") print("Reference point has been created at (0.1, 0, 0).") # Updating implicit Point. point = implicitPart.bodies[-1] with implicitPart.edit(): point.x = 0.2 print("Reference point has been updated to (0.2, 0, 0).")
- createAxis(positionX=0, positionY=0, positionZ=0, normalX=0, normalY=0, normalZ=0)#
Tool to create axis implicit body.
- Parameters:
positionX (float | str) – Position value in X direction for implicit axis body.
positionY (float | str) – Position value in Y direction for implicit axis body.
positionZ (float | str) – Position value in Z direction for implicit axis body.
normalX (float | str) – Normal value in X direction for implicit axis body.
normalY (float | str) – Normal value in Y direction for implicit axis body.
normalZ (float | str) – Normal value in Z direction for implicit axis body.
- Returns:
The newly created Axis object.
- Return type:
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = "Implicit Part1" # Creating axis in implicit part. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. implicitPart.createAxis(positionX="0.1 m", normalZ="0.2 m") print("Reference axis has been created at point (0.1, 0, 0) with direction " "vector (0, 0, 0.2).") # Updating implicit Axis. axis = implicitPart.bodies[-1] with implicitPart.edit(): axis.positionX = 0.2 print("Reference axis has been updated to point (0.2, 0, 0) with direction " "vector (0, 0, 0.2).")
- createLine(startX=0, startY=0, startZ=0, endX=0, endY=0, endZ=0, thickness=0)#
Tool to create line implicit body.
- Parameters:
startX (float | str) – Start point value in X direction for implicit line body.
startY (float | str) – Start point value in Y direction for implicit line body.
startZ (float | str) – Start point value in Z direction for implicit line body.
endX (float | str) – End point value in X direction for implicit line body.
endY (float | str) – End point value in Y direction for implicit line body.
endZ (float | str) – End point value in Z direction for implicit line body.
thickness (float | str) – Thickness of the line.
- Returns:
The newly created Line object.
- Return type:
Line
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = "Implicit Part1" # Creating line in implicit part. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. implicitPart.createLine(startX=0.5, startY=0, startZ=0, endX=1, endY=0, endZ=0) print("Reference line has been created from (0.5, 0, 0) to (1, 0, 0)") # Updating implicit Line. line = implicitPart.bodies[-1] with implicitPart.edit(): line.startX = 0.8 print("Reference line starting point has been updated from (0.5, 0, 0) to " "(0.8, 0, 0)")
- createPlane(positionX=0, positionY=0, positionZ=0, normalX=0, normalY=0, normalZ=1)#
Tool to create plane implicit body.
- Parameters:
positionX (float | str) – Position value in X direction for implicit plane body.
positionY (float | str) – Position value in Y direction for implicit plane body.
positionZ (float | str) – Position value in Z direction for implicit plane body.
normalX (float | str) – Normal value in X direction for implicit plane body.
normalY (float | str) – Normal value in Y direction for implicit plane body.
normalZ (float | str) – Normal value in Z direction for implicit plane body.
- Returns:
The newly created Plane object.
- Return type:
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = "Implicit Part1" # Creating plane in implicit part. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. implicitPart.createPlane(positionX="0.1 m", normalZ="0.2 m") print("Reference plane has been created at point (0.1, 0, 0) with direction" "vector (0, 0, 0.2).") # Updating implicit Plane. axis = implicitPart.bodies[-1] with implicitPart.edit(): axis.positionX = 0.2 print("Reference plane has been updated to point (0.2, 0, 0) with direction" "vector (0, 0, 0.2).")
- convertToImplicit(part)#
The Convert tool accepts geometry in BRep or surface mesh formats and converts into Altair’s implicit geometry format. The output is typically a Signed Distance Field (SDF) for the converted geometry.
- Parameters:
part (Part) – Part to be converted in implicit object.
- Returns:
The newly created ConvertToImplicit object.
- Return type:
ConvertToImplicit
Example
from hwx import inspire model = inspire.newModel() box = model.createSolidBlock(x=0.01, y=0.01, z=0.01) sphere = model.createSolidSphere(radius=0.01) # Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = "Implicit Part1" inspire.fitView() # Converting box to implicit body. implicitPart.convertToImplicit(box) print("Box has been converted in to implicit body.") # Updating ConvertToImplicit. with implicitPart.edit(): convert = implicitPart.bodies[0] convert.part = sphere inspire.fitView() print("Converted Implicit body has been updated.")
- convertToImplicitSurfaces(surfaces)#
The Convert tool accepts geometry in surface or feature area formats and converts into Altair’s implicit geometry format. The output is typically a Signed Distance Field (SDF) for the converted geometry.
- Parameters:
surfaces (list[FeatureArea]) – Surfaces to be converted in implicit object.
- Returns:
- The newly created ConvertToImplicitSurfaces
object.
- Return type:
ConvertToImplicitSurfaces
Example
from hwx import inspire model = inspire.newModel() box = model.createSolidBlock(x=0.01, y=0.01, z=0.01) featPlanes = box.getFeatures(type="FeaturePlanar") # Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = "Implicit Part1" inspire.fitView() # Converting box planar features to implicit body. implicitPart.convertToImplicitSurfaces(featPlanes) print("Planar features has been converted in to implicit body.") # Updating ConvertToImplicitSurfaces. with implicitPart.edit(): convert = implicitPart.bodies[0] convert.sufaces = box.getFeatures(type="FeaturePlanar")[0] inspire.fitView() print("Converted Implicit body has been updated.")
- convertToImplicitEdges(edges)#
The Convert tool accepts geometry in edge or feature curve formats and converts into Altair’s implicit geometry format. The output is typically a Signed Distance Field (SDF) for the converted geometry.
- Parameters:
edges (list[FeatureCurve]) – Edges to be converted in implicit object.
- Returns:
The newly created ConvertToImplicitEdges object.
- Return type:
ConvertToImplicitEdges
Example
from hwx import inspire model = inspire.newModel() box = model.createSolidBlock(x=0.01, y=0.01, z=0.01) feats = box.getFeatures(type="FeatureLinear") # Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = "Implicit Part1" inspire.fitView() # Converting box linear features to implicit body. implicitPart.convertToImplicitEdges(feats) print("Linear features has been converted in to implicit body.") # Updating ConvertToImplicitEdges. with implicitPart.edit(): convert = implicitPart.bodies[0] convert.sufaces = box.getFeatures(type="FeatureLinear")[0] inspire.fitView() print("Converted Implicit body has been updated.")
- convertResultToDensity(part)#
The Convert tool accepts result part from OptiStruct and converts into Altair’s implicit geometry format. The output is typically a Signed Distance Field (SDF) for the converted geometry.
- Parameters:
part (Part) – Part to be converted in implicit object.
- Returns:
The newly created ConvertResultToDensity object.
- Return type:
ConvertResultToDensity
Example
from hwx import inspire from hwx.inspire.demo import openDemoFile
model = openDemoFile(“ThreeBlocks.stmod”) params = inspire.OptiStructAnalysis.Params2() params.runName = ‘MyRun’ params.speedAccuracy = “FASTER” params.elementSize = 0.01 inspire.OptiStructAnalysis(params)
# Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = “Implicit Part1” inspire.fitView()
part1 = model.parts[0]
# Converting Part1 to implicit body. implicitPart.convertResultToDensity(part1) print(“Part1 has been converted in to density implicit body.”)
# Updating ConvertResultToDensity. with implicitPart.edit():
convert = implicitPart.bodies[0] convert.part = model.parts[1]
inspire.fitView() print(“Converted Implicit body has been updated.”)
- convertGenericResult(part, run, loadCase, resultType, simidx=0)#
The Convert tool accepts result part and converts into Altair’s implicit geometry format. The output is typically a Signed Distance Field (SDF) for the converted geometry.
- Parameters:
part (Part) – Part to be converted in implicit object.
run (OptiStruct) – Analysis/Optimization to convert the generic result.
loadCase (str) – Load Case name to convert the generic result.
resultType (str) – Result type name to convert the generic result.
simidx (int) – This represents simulation step index. Inspire structure analysis results and fluids the no of steps is 1 so the index will be 0.
- Returns:
The newly created ConvertGenericResult object.
- Return type:
ConvertGenericResult
Example
from hwx import inspire from hwx.inspire.demo import openDemoFile model = openDemoFile("ThreeBlocks.stmod") params = inspire.OptiStructAnalysis.Params2() params.runName = 'MyRun' params.speedAccuracy = "FASTER" params.elementSize = 0.01 run = inspire.OptiStructAnalysis(params) # Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = "Implicit Part1" inspire.fitView() part1 = model.parts[0] # Converting Part1 to implicit body. implicitPart.convertGenericResult(part1, run=run, loadCase="Load Case 1", resultType="Displacement") print("Part1 with analysis results has been converted in to implicit body.") # Updating ConvertGenericResult. with implicitPart.edit(): convert = implicitPart.bodies[0] convert.part = model.parts[1] inspire.fitView() print("Converted Implicit body has been updated.")
- pesUnionOperator(targets, merge=False, mergeDistance=0.002, mergeDistanceField=None)#
Combine the points and, optionally, edges of two Point-Edge Sets into a single Point-Edge Set. Points can be merged into a single point if they are within a user-specified Euclidean distance of each other. The “Merge Distance” can be a field-driven property to allow it to vary in different locations.
- Parameters:
targets (list[PointEdgeSet]) –
- List of Implicit target body, use bodies property to
get all bodies from implicit part.
merge (bool): If True, it merges the bodies otherwise not. mergeDistance (float): Merge distance for the union operator. mergeDistanceField (str): Merge distance field for the union operator if
merge distance is not provided.
- Returns:
The newly created PESUnionOperator object.
- Return type:
PESUnionOperator
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = "Implicit Part1" # Creating Cuboid primitive in implicit part. cuboid = implicitPart.createCuboid() # Creating Sphere primitive in implicit part. sphere = implicitPart.createSphere() #Creating point edge set for input. pointEdgeSetBodyCuboid = implicitPart.pointEdgeSet(cuboid) pointEdgeSetBodySphere = implicitPart.pointEdgeSet(sphere) # PESUnionOperator operation on point edge set of cuboid and sphere. implicitPart.pesUnionOperator(targets=[pointEdgeSetBodyCuboid, pointEdgeSetBodySphere], merge=True, mergeDistance=0.02) print("PESUnionOperator operation has been performed with cuboid an sphere point edge set.") # Updating Combine operation. pesUnionOperator = implicitPart.bodies[0] with implicitPart.edit(): pesUnionOperator.mergeDistance = 0.05 inspire.fitView() print("Merge distance has been updated to 0.5.")
- pesBridgeOperator(target, tool, valence=4, valenceField=None)#
Create a new Point-Edge Set the creates edges that bridge between two Point-Edge Sets. Each Point in the Target Point-Edge Set will connect to its k-nearest neighbours in the Tool Point-Edge Set. “k”, which is referred to as Valence, can be a user-specified constant or a field-driven property to change the number of connections each point in the Target Point-Edge Set makes.
- Parameters:
target (PointEdgeSet) – List of Implicit target body, use bodies property to get all bodies from implicit part.
tool (PointEdgeSet) – List of Implicit tool body, use bodies property to get all bodies from implicit part.
valence (int) – Valence value for the bridge operator.
valenceField (str) – Valence field for the bridge operator if valence is not provided.
- Returns:
The newly created PESBridgeOperator object.
- Return type:
PESBridgeOperator
Example
from hwx import inspire from hwx.common import math inspire.newModel() # Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = "Implicit Part1" # Creating Cuboid primitive in implicit part. cuboid = implicitPart.createCuboid() # Creating Sphere primitive in implicit part. sphere = implicitPart.createSphere() # Creating point edge set for input. pointEdgeSetBodyCuboid = implicitPart.pointEdgeSet(cuboid) pointEdgeSetBodySphere = implicitPart.pointEdgeSet(sphere) # PESBridgeOperator operation on point edge set of cuboid and sphere. implicitPart.pesBridgeOperator(target=pointEdgeSetBodyCuboid, tool =pointEdgeSetBodySphere, valence=3) print( "PESBridgeOperator operation has been performed with cuboid an sphere point edge set.") # Updating Combine operation. pesBridgeOperator = implicitPart.bodies[0] with implicitPart.edit(): pesBridgeOperator.valence = 5 inspire.fitView() print("Valence distance has been updated to 5.")
- createCustomImplicitBody(customUnitCell, minBounds, maxBounds)#
Custom Implicit Body capability is available through the Python API. Here, we create a 3D voxel grid within a bounding box, and then populates each voxel (grid point) with a scalar value to create the field for the geometry. The computation of the scalar values is executed in user-defined Python scripts (including imported libraries, if needed). In this sense, the Custom Implicit Body makes Inspire Implicit Modelling infinitely customisable and extensible.
- Parameters:
customUnitCell (Body) – Custom unit cell, created through implicit math functions.
minBounds (math.Point) – Minimum custom bounds for custom implicit body.
maxBounds (math.Point) – Maximum custom bounds for custom implicit body.
- Returns:
The newly created CustomBody object.
- Return type:
CustomBody
Example
from hwx import inspire from hwx.common.math import Point inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() implicit.name = "Implicit Part1" # Please note that only implicit math operations and functionalities will be # used in custom unit cell calculation. # Constants for custom implicit body creation. x = implicit.xRef() y = implicit.yRef() z = implicit.zRef() one = implicit.constant(1) two = implicit.constant(2) pi = implicit.pi() # User-specified unit cell side length unitCellSideLength = implicit.constant(0.2) # Computed frequency term for the unit cell repetition based on unit cell # side length f = two * pi / unitCellSideLength # The following lattice unit cell is created from connected rings. # Two parameters are needed, rMajor and rMinor, which are radius values rMajor = implicit.constant(0.9) rMinor = implicit.constant(0.001) rMajorSquared = rMajor ** two # Construct implicit rings in three orthogonal planes zPlaneCircs = (implicit.sin(f * x) ** two + implicit.sin(f * y) ** two - rMajorSquared) ** two + (implicit.sin(f * z) ** two - one) ** two yPlaneCircs = (implicit.sin(f * y) ** two + implicit.sin(f * z) ** two - rMajorSquared) ** two + (implicit.sin(f * x) ** two - one) ** two xPlaneCircs = (implicit.sin(f * z) ** two + implicit.sin(f * x) ** two - rMajorSquared) ** two + (implicit.sin(f * y) ** two - one) ** two customUnitCell = zPlaneCircs * yPlaneCircs * xPlaneCircs - rMinor # Creating custom implicit body. implicit.createCustomImplicitBody(customUnitCell, Point(-0.1, -0.1, -0.1), Point(0.1, 0.1, 0.1)) # Setting visualization quality to high. implicit.visualizationQuality = 'HIGH' inspire.fitView() print("Custom implicit body has been created.")
- createField(drivingObject, inputRangeMin=0, inputRangeMax=1, clamp=False, unitType='Unitless', outputRangeMin=0, outputRangeMax=1, unsigned=False)#
The Field tool is used to construct a field from a source that is not yet described in a field format and/or remap field values to different ranges. A field is a 3D grid, and each grid point contains a signed scalar value.
- Parameters:
drivingObject (Body) – Implicit body, use bodies property to get all bodies from implicit part.
inputRangeMin (float | str) – Input Range minimum distance.
inputRangeMax (float | str) – Input Range maximum distance.
clamp (bool) – If True, it limits the values to between the range instead of extrapolating beyond the range otherwise not.
unitType (str) – Unit type for output range. - Length - Angle - Unitless - Percent
outputRangeMin (float | str) – Minimum output range.
outputRangeMax (float | str) – Maximum output range.
unsigned (bool) – If true, it allows positive field values from the driving object, otherwise the field from the driving function can have both negative and positive values.
- Returns:
The newly created Field object.
- Return type:
Field
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = "Implicit Part1" inspire.fitView() # Creating Cuboid primitive in implicit part. cuboid = implicitPart.createCuboid(x="100 mm") # Creating an implicit field. implicitPart.createField(cuboid) print("Field has been created.") # Updating implicit field. with implicitPart.edit(): field = implicitPart.bodies[-1] field.inputRangeMin = 0.5 inspire.fitView() print("Field has been updated with inputRangeMin 0.5.")
- surfaceLattice(body, unitCellType='GYROID', surfaceType=True, solidRegion=False, coordinateSystemType='CARTESIAN', localOriginX=0, localOriginY=0, localOriginZ=0, localOrigin=None, density=0.5, densityField=None, bias=0.5, unitCellSize=False, uniform=True, cellSizeX=4, cellSizeXField=None, cellSizeY=4, cellSizeYField=None, cellSizeZ=4, cellSizeZField=None, shell=False, combine=False, shellDirection='OUTWARD', shellThicknessIn=0.1, shellThicknessInField=None, shellThicknessOut=0.1, shellThicknessOutField=None, trimmingBody=None, combineBody=None, transition='SHARP', distance=0.01, distanceField=None, conformTo=None, default=False, extentsMinX=None, extentsMinY=None, extentsMinZ=None, extentsMaxX=None, extentsMaxY=None, extentsMaxZ=None, thickness=False, thicknessValue=0.002, thicknessValueField=None)#
Surface lattices are cellular structures constructed from one or sometimes two surfaces. Rather than tiling/patterning a base unit cell, the natural repetition of the surfaces creates a lattice-like structure automatically. Popular examples are Triply Periodic Minimal Surfaces (TPMS), such as the Gyroid.
- Parameters:
body (Body) – Implicit body, use bodies property to get all bodies from implicit part.
unitCellType (str) – Surface type for surface lattice. - GYROID - SCHWARZ_P - SCHWARZ_D - NEOVIUS - LIDINOID - FISCHER_KOCH_S - FISCHER_KOCH_Cs - FISCHER_KOCH_Y - FISCHER_KOCH_Cy - FRD - IWP - SPLIT_P - KARCHER_K - G_PRIME
surfaceType (bool) – If True, Surface type will be Single otherwise Double.
solidRegion (bool) – if True, solid region of surface is inverted otherwise regular.
coordinateSystemType (str) – Surface Lattice Layout. - CARTESIAN - CYLINDRICAL - SPHERICAL
localOriginX (float | str) – Local origin x direction value for surface lattice.
localOriginY (float | str) – Local origin y direction value for surface lattice.
localOriginZ (float | str) – Local origin z direction value for surface lattice.
localOrigin (math.Matrix44) – Local origin for the surface lattice.
density (float | str) – Density for surface lattice. Value range from 0 to 100.
densityField (Field) – Density field input, if density is not provided.
bias (float | str) – Bias for surface lattice. Applicable only when surfaceType is Double.
unitCellSize (bool) – If True, Unit cell size will be Absolute otherwise Cell Count.
uniform (bool) – If True, Unit cell will be uniform otherwise not.
cellSizeX (float | str) – Cell size for surface lattice in X direction.
cellSizeXField (Field) – Cell size field input, if cellSizeX not provided.
cellSizeY (float | str) – Cell size for surface lattice in Y direction.
cellSizeYField (Field) – Cell size field input, if cellSizeY not provided.
cellSizeZ (float | str) – Cell size for surface lattice in Z direction.
cellSizeZField (Field) – Cell size field input, if cellSizeZ not provided.
shell (bool) – It’s a outer body option. If True, outer body of surface lattice will be shell otherwise not.
combine (bool) – It’s a outer body option. If True, outer body of surface lattice will be combine otherwise not. At a time only one option can be true among combine and shell option.
shellDirection (str) – Shell Direction. - OUTWARD - INWARD - BOTH - SYMMETRY
shellThicknessIn (float | str) – Shell thickness inward for outer body of surface lattice.
shellThicknessInField (Field) – Shell inward thickness field input, if shellThicknessIn is not provided.
shellThicknessOut (float | str) – Shell thickness outward for outer body of surface lattice.
shellThicknessOutField (Field) – Shell outward thickness field input, if shellThicknessOut is not provided.
trimmingBody (Body) – Trim implicit body for surface lattice.
combineBody (Body) – Combine implicit body for surface lattice.
transition (str) – Transition type for outer body options. - SHARP - FILLET - CHAMFER
distance (float | str) – Distance for outer body options.
distanceField (Field) – Distance field input, if distance is not provided.
conformTo (Conform) – Implicit Conform body, use bodies property to get all bodies from implicit part.
default (bool) – If True, use extents option otherwise not.
extentsMinX (float | str) – Minimum extents value in X direction.
extentsMinY (float | str) – Minimum extents value in Y direction.
extentsMinZ (float | str) – Minimum extents value in Z direction.
extentsMaxX (float | str) – Maximum extents value in X direction.
extentsMaxY (float | str) – Maximum extents value in Y direction.
extentsMaxZ (float | str) – Maximum extents value in Z direction.
thickness (bool) – If True, thickness will be applied otherwise not.
thicknessValue (float | str) – Thickness value for surface lattice.
thicknessValueField (Field) – Thickness field input, if thicknessValue is not provided. If thickness is applied, the thickness value will be applied to the outer body of the surface lattice.
- Returns:
The newly created SurfaceLattice object.
- Return type:
SurfaceLattice
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = "Implicit Part1" # Creating Cuboid primitive in implicit part. implicitPart.createCuboid(x="100 mm") # Creating Surface Lattice with cuboid cuboid = implicitPart.bodies[0] implicitPart.surfaceLattice(cuboid, density=0.3) print("Surface Lattice has been created using implicit cuboid body.") # Updating Surface Lattice. with implicitPart.edit(): surfaceLattice = implicitPart.bodies[0] surfaceLattice.density = 0.6 surfaceLattice.solidRegion = True surfaceLattice.coordinateSystemType = 'CYLINDRICAL' inspire.fitView() print("Surface Lattice has been modified.")
- planarLattice(body, unitCellType='HEXAGON', solidRegion=False, coordinateSystemType='CARTESIAN', localOriginX=0, localOriginY=0, localOriginZ=0, localOrigin=None, thickness=0.005, thicknessField=None, unitCellSize=False, uniform=True, unitCellSizeX=4, unitCellSizeXField=None, unitCellSizeY=4, unitCellSizeYField=None, planeVectorX=0, planeVectorY=0, planeVectorZ=1, shell=False, combine=False, shellDirection='OUTWARD', shellThicknessIn=0.1, shellThicknessInField=None, shellThicknessOut=0.1, shellThicknessOutField=None, trimmingBody=None, combineBody=None, transition='SHARP', distance=0.01, distanceField=None, conformTo=None, unitCellName=None, nodes=None, connectivity=None)#
Planar lattices are 2.5 dimensional cellular structures, with a clearly defined 2D cross-section that is drawn or extruded along the third dimension. A popular example is a honeycomb structure.
- Parameters:
body (Body) – Implicit body, use bodies property to get all bodies from implicit part.
unitCellType (str) – UnitCellType for planar lattice. - HEXAGON - DIAMOND - RECTANGLE - TRIANGLE - ISOGRID - CIRCLE - CUSTOM_UNIT_CELL
coordinateSystemType (str) – Planar Lattice Layout. - CARTESIAN - CYLINDRICAL - SPHERICAL
solidRegion (bool) – if True, solid region of planar is inverted otherwise regular.
localOriginX (float | str) – Local origin x direction value for planar lattice.
localOriginY (float | str) – Local origin y direction value for planar lattice.
localOriginZ (float | str) – Local origin z direction value for planar lattice.
localOrigin (math.Matrix44) – Local origin for the planar lattice.
thickness (float | str) – Cell thickness of planar lattice.
thicknessField (Field) – Thickness field input, if thickness is not provided.
unitCellSize (bool) – If True, Unit cell size will be Absolute otherwise Cell Count.
uniform (bool) – If True, Unit cell will be uniform otherwise not.
unitCellSizeX (float | str) – Unit cell size value in X direction.
unitCellSizeXField (Field) – Unit cell size field in X direction, if unitCellSizeX is not provided.
unitCellSizeY (float | str) – Unit cell size value in Y direction.
unitCellSizeYField (Field) – Unit cell size field in Y direction, if unitCellSizeY is not provided.
planeVectorX (float | str) – Plane vector value in X direction.
planeVectorY (float | str) – Plane vector value in Y direction.
planeVectorZ (float | str) – Plane vector value in Z direction.
shell (bool) – It’s a outer body option. If True, outer body of planar lattice will be shell otherwise not.
combine (bool) – It’s a outer body option. If True, outer body of planar lattice will be combine otherwise not. At a time only one option can be true among combine and shell option.
shellDirection (str) – Shell Direction. - OUTWARD - INWARD - BOTH - SYMMETRY
shellThicknessIn (float | str) – Shell thickness inward for outer body of planar lattice.
shellThicknessInField (Field) – Shell inward thickness field input, if shellThicknessIn is not provided.
shellThicknessOut (float | str) – Shell thickness outward for outer body of planar lattice.
shellThicknessOutField (Field) – Shell outward thickness field input, if shellThicknessOut is not provided.
trimmingBody (Body) – Trim implicit body for planar lattice.
combineBody (Body) – Combine implicit body for planar lattice.
transition (str) – Transition type for outer body options. - SHARP - FILLET - CHAMFER
distance (float | str) – Distance for outer body options.
distanceField (Field) – Distance field input, if distance is not provided.
conformTo (Conform) – Implicit Conform body, use bodies property to get all bodies from implicit part.
unitCellName (str) – Name of the custom unit cell for planar lattice.
nodes (list[math.Point]) – Node list of the custom unit cell for planar lattice.
connectivity (list[int]) – Connectivity of the custom unit cell for planar lattice.
- Returns:
The newly created PlanarLattice object.
- Return type:
PlanarLattice
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = "Implicit Part1" # Creating Cuboid primitive in implicit part. implicitPart.createCuboid(x="100 mm") # Creating Planar Lattice with cuboid cuboid = implicitPart.bodies[0] implicitPart.planarLattice(cuboid, thickness=0.2) print("Planar Lattice has been created using implicit cuboid body.") # Updating Planar Lattice. with implicitPart.edit(): planarLattice = implicitPart.bodies[0] planarLattice.thickness = 0.01 planarLattice.inverse = True planarLattice.coordinateType = 'CYLINDRICAL' inspire.fitView() print("Planar Lattice has been modified.")
- strutLattice(body, unitCellType='BODYCENTEREDCUBIC', hollow=False, solidRegion=False, coordinateSystemType='CARTESIAN', localOriginX=0, localOriginY=0, localOriginZ=0, localOrigin=None, strutDiameter=0.005, strutDiameterField=None, strutInnerDiameter=0.003, strutInnerDiameterField=None, unitCellSize=False, uniform=True, cellSizeX=4, cellSizeY=4, cellSizeZ=4, shell=False, combine=False, shellDirection='OUTWARD', shellThicknessIn=0.1, shellThicknessInField=None, shellThicknessOut=0.1, shellThicknessOutField=None, trimmingBody=None, combineBody=None, transition='SHARP', distance=0.01, distanceField=None, unitCellName=None, nodes=None, connectivity=None, conformTo=None, defineExtents=False, extentsMinX=None, extentsMinY=None, extentsMinZ=None, extentsMaxX=None, extentsMaxY=None, extentsMaxZ=None)#
Strut lattices are constructed from nodes and these nodes are connected by beams. Typically, there is a base unit cell that is tiled/patterned in one, two, or three dimensions to form the overall lattices structure. A popular example is the Body Centred Cubic lattice.
- Parameters:
body (Body) – Implicit body, use bodies property to get all bodies from implicit part.
unitCellType (str) – UnitCellType for strut lattice. - BODYCENTEREDCUBIC - FACECENTEREDPRIMITIVE - FACECENTEREDCUBIC - CUBICPRIMITIVE - ISOTRUSS - OCTAGON - HEXTRUSS - KELVINCELL - FLOURITE - DIAMOND - TRUNCATEDCUBE - OCTET - CUSTOM_UNIT_CELL
hollow (bool) – if True, Strut surface type will be hollow otherwise solid.
solidRegion (bool) – if True, solid region of strut is inverted otherwise regular.
coordinateSystemType (str) – Strut Lattice Layout. - CARTESIAN - CYLINDRICAL - SPHERICAL
localOriginX (float | str) – Local origin x direction value for strut lattice.
localOriginY (float | str) – Local origin y direction value for strut lattice.
localOriginZ (float | str) – Local origin z direction value for strut lattice.
localOrigin (math.Matrix44) – Local origin for the strut lattice.
strutDiameter (float | str) – Strut thickness of struct lattice.
strutDiameterField (Field) – Strut diameter field input, if strutDiameter is not provided.
strutInnerDiameter (float | str) – Shell thickness of strut lattice if it is hollow.
strutInnerDiameterField (Field) – Strut inner diameter field input, if strutInnerDiameter is not provided.
unitCellSize (bool) – If True, Unit cell size will be Absolute otherwise Cell Count.
uniform (bool) – If True, Unit cell will be uniform otherwise not.
cellSizeX (float | str) – Cell size for strut lattice in X direction.
cellSizeY (float | str) – Cell size for strut lattice in Y direction.
cellSizeZ (float | str) – Cell size for strut lattice in Z direction.
shell (bool) – It’s a outer body option. If True, outer body of strut lattice will be shell otherwise not.
combine (bool) – It’s a outer body option. If True, outer body of strut lattice will be combine otherwise not. At a time only one option can be true among combine and shell option.
shellDirection (str) – Shell Direction. - OUTWARD - INWARD - BOTH - SYMMETRY
shellThicknessIn (float | str) – Shell thickness inward for outer body of strut lattice.
shellThicknessInField (Field) – Shell inward thickness field input, if shellThicknessIn is not provided.
shellThicknessOut (float | str) – Shell thickness outward for outer body of strut lattice.
shellThicknessOutField (Field) – Shell outward thickness field input, if shellThicknessOut is not provided.
trimmingBody (Body) – Trim implicit body for strut lattice.
combineBody (Body) – Combine implicit body for strut lattice.
transition (str) – Transition type for outer body options. - SHARP - FILLET - CHAMFER
distance (float | str) – Distance for outer body options.
distanceField (Field) – Distance field input, if distance is not provided.
unitCellName (str) – Name of the custom unit cell for strut lattice.
nodes (list[math.Point]) – Node list of the custom unit cell for strut lattice.
connectivity (list[int]) – Connectivity of the custom unit cell for strut lattice.
conformTo (Conform) – Implicit Conform body, use bodies property to get all bodies from implicit part.
defineExtents (bool) – If True, use extents option otherwise not.
extentsMinX (float | str) – Minimum extents value in X direction.
extentsMinY (float | str) – Minimum extents value in Y direction.
extentsMinZ (float | str) – Minimum extents value in Z direction.
extentsMaxX (float | str) – Maximum extents value in X direction.
extentsMaxY (float | str) – Maximum extents value in Y direction.
extentsMaxZ (float | str) – Maximum extents value in Z direction.
- Returns:
The newly created StrutLattice object.
- Return type:
StrutLattice
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = "Implicit Part1" # Creating Cuboid primitive in implicit part. implicitPart.createCuboid(x="100 mm") # Creating Strut Lattice with cuboid cuboid = implicitPart.bodies[0] implicitPart.strutLattice(cuboid, strutDiameter=0.004) print("Strut Lattice has been created using implicit cuboid body.") # Updating Strut Lattice. with implicitPart.edit(): planarLattice = implicitPart.bodies[0] planarLattice.strutDiameter = 0.005 planarLattice.solidRegion = True inspire.fitView() print("Strut Lattice has been modified.")
- generalStrutLattice(body, hollow=False, solidRegion=False, coordinateSystemType='CARTESIAN', localOrigin=None, strutDiameter=0.005, strutDiameterField=None, strutInnerDiameter=0.003, strutInnerDiameterField=None, shell=False, combine=False, shellDirection='OUTWARD', shellThicknessIn=0.1, shellThicknessInField=None, shellThicknessOut=0.1, shellThicknessOutField=None, trimmingBody=None, combineBody=None, transition='SHARP', distance=0.01, distanceField=None, verts=None, beams=None, defineExtents=False, extentsMinX=None, extentsMinY=None, extentsMinZ=None, extentsMaxX=None, extentsMaxY=None, extentsMaxZ=None)#
Strut lattices are constructed from nodes and these nodes are connected by beams. Typically, there is a base unit cell that is tiled/patterned in one, two, or three dimensions to form the overall lattices structure. A popular example is the Body Centred Cubic lattice.
- Parameters:
body (Body) – Implicit body, use bodies property to get all bodies from implicit part.
hollow (bool) – if True, Strut surface type will be hollow otherwise solid.
solidRegion (bool) – if True, solid region of strut is inverted otherwise regular.
coordinateSystemType (str) – Strut Lattice Layout. - CARTESIAN - CYLINDRICAL - SPHERICAL
localOrigin (math.Matrix44) – Local origin for the strut lattice.
strutDiameter (float | str) – Strut thickness of struct lattice.
strutDiameterField (Field) – Strut diameter field input, if strutDiameter is not provided.
strutInnerDiameter (float | str) – Shell thickness of strut lattice if it is hollow.
strutInnerDiameterField (Field) – Strut inner diameter field input, if strutInnerDiameter is not provided.
shell (bool) – It’s a outer body option. If True, outer body of strut lattice will be shell otherwise not.
combine (bool) – It’s a outer body option. If True, outer body of strut lattice will be combine otherwise not. At a time only one option can be true among combine and shell option.
shellDirection (str) – Shell Direction. - OUTWARD - INWARD - BOTH - SYMMETRY
shellThicknessIn (float | str) – Shell thickness inward for outer body of strut lattice.
shellThicknessInField (Field) – Shell inward thickness field input, if shellThicknessIn is not provided.
shellThicknessOut (float | str) – Shell thickness outward for outer body of strut lattice.
shellThicknessOutField (Field) – Shell outward thickness field input, if shellThicknessOut is not provided.
trimmingBody (Body) – Trim implicit body for strut lattice.
combineBody (Body) – Combine implicit body for strut lattice.
transition (str) – Transition type for outer body options. - SHARP - FILLET - CHAMFER
distance (float | str) – Distance for outer body options.
distanceField (Field) – Distance field input, if distance is not provided.
verts (list[math.Point]) – Node list of the custom unit cell for strut lattice.
beams (list[int]) – Connectivity of the custom unit cell for strut lattice.
defineExtents (bool) – If True, use extents option otherwise not.
extentsMinX (float | str) – Minimum extents value in X direction.
extentsMinY (float | str) – Minimum extents value in Y direction.
extentsMinZ (float | str) – Minimum extents value in Z direction.
extentsMaxX (float | str) – Maximum extents value in X direction.
extentsMaxY (float | str) – Maximum extents value in Y direction.
extentsMaxZ (float | str) – Maximum extents value in Z direction.
- Returns:
The newly created GeneralStrutLattice object.
- Return type:
GeneralStrutLattice
- stochasticStrutLattice(body, hollow=False, solidRegion=False, strutDiameter=0.005, strutDiameterField=None, strutInnerDiameter=0.003, strutInnerDiameterField=None, shell=False, boolean=False, booleanType='COMBINE', shellDirection='OUTWARD', shellThicknessIn=0.1, shellThicknessInField=None, shellThicknessOut=0.1, shellThicknessOutField=None, trimmingBody=None, targetBody=None, transition='SHARP', distance=0.01, distanceField=None, nodeTransition='SHARP', nodeJointValue=0.001, nodeJointValueField=None, createNodes=False, nodeDiameter=0.001, nodeDiameterField=None)#
Stochastic lattice is built by thickening a point-edge set, which is a graph of points that are connected by edges. If the points are randomly arranged and/or the edges between them are randomly created, this creates a stochastic (randomized) lattice structure.
- Parameters:
body (PointEdgeSet | PointEdgeSetFilter) – PointEdgeSet body, use bodies property to get all bodies from implicit part.
hollow (bool) – if True, Stochastic surface type will be hollow otherwise solid.
solidRegion (bool) – if True, solid region of strut is inverted otherwise regular.
strutDiameter (float | str) – Stochastic thickness of struct lattice.
strutDiameterField (Field) – Stochastic diameter field input, if strutDiameter is not provided.
strutInnerDiameter (float | str) – Shell thickness of strut lattice if it is hollow.
strutInnerDiameterField (Field) – Stochastic inner diameter field input, if stochastic is not provided.
shell (bool) – It’s an outer body option. If True, outer body of stochastic lattice will be shell otherwise not.
boolean (bool) – If true, It’s an outer body option. Outer body of stochastic lattice will be combine/subtract/intersect otherwise not. At a time only one option can be true among boolean and shell option.
booleanType (str) –
It’s an outer body option. If boolean is True, Outer body of stochastic lattice will be combine/subtract/intersect otherwise not. At a time only one option can be true among boolean and shell option. Valid choices are
COMBINE
INTERSECT
SUBTRACT
shellDirection (str) – Shell Direction. - OUTWARD - INWARD - BOTH - SYMMETRY
shellThicknessIn (float | str) – Shell thickness inward for outer body of stochastic lattice.
shellThicknessInField (Field) – Shell inward thickness field input, if shellThicknessIn is not provided.
shellThicknessOut (float | str) – Shell thickness outward for outer body of stochastic lattice.
shellThicknessOutField (Field) – Shell outward thickness field input, if shellThicknessOut is not provided.
trimmingBody (Body) – Trim implicit body for stochastic lattice.
targetBody (Body) – Target implicit body for stochastic lattice.
transition (str) – Transition type for outer body options. - SHARP - FILLET - CHAMFER
distance (float | str) – Distance for outer body options.
distanceField (Field) – Distance field input, if distance is not provided.
nodeTransition (str) – Transition type for node options. - SHARP - FILLET - CHAMFER
nodeJointValue (float | str) – Joint value for node options.
nodeJointValueField (Field) – Node joint value field input, if nodeJointValue is not provided.
createNodes (bool) – If True, create nodes otherwise not.
nodeDiameter (float | str) – Node diameter for node options.
nodeDiameterField (Field) – Node diameter field input, if nodeDiameter is not provided.
- Returns:
The newly created StochasticStrutLattice object.
- Return type:
StochasticStrutLattice
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = "Implicit Part1" # Changing the visualization quality of implicit part. implicitPart.visualizationQuality = "VERY_HIGH" # Creating Cuboid primitive in implicit part. implicitPart.createCuboid(x="1000 mm", originX=0.5, originY=0.5, originZ=0.5) cuboid = implicitPart.bodies[0] # Creating point edge set body for edge set filter. pointEdgeSetBody = implicitPart.pointEdgeSet(cuboid, seed=0.5) # Creating point edge set body filter for filter2. filter1 = implicitPart.pointSetBoundingBodyFilter(pointEdgeSetBody) # Creating point edge set body filter for stochastic lattice. filter2 = implicitPart.edgeSetBoundingBodyFilter(filter1) # Creating Stochastic Strut Lattice with filter2 as an input. implicitPart.stochasticStrutLattice(filter2, strutDiameter=0.01) print("Stochastic Strut Lattice has been created.") inspire.fitView()
- pointEdgeSet(body, pointsGenerationMethod='UNIFORM_RANDOM', seed=0, pointCount=200, minSpacing=0.02, minSpacingField=None, pointSet=None, edgesGenerationMethod='VALENCE', valence=4.0, valenceField=None, edgeSet=None, voronoiType='DELAUNAY', points='SURFACE_MESH', uSpacing=0.1, vSpacing=0.1, edges='MESH_EDGES', startDistance=-0.02, startDistanceField=None, endDistance=0.02, endDistanceField=None, volumeType='INSIDE', sampleCurves=True, normalFunction=None)#
A point-edge set is a graph comprising points that are (optionally) connected by edges. Point-edge sets can be thickened into strut lattices.
- Parameters:
body (Body) – Implicit body, use bodies property to get all bodies from implicit part.
pointsGenerationMethod (str) – Points Generation Method. - UNIFORM_RANDOM - MIN_SPACING - FROM_PART_MESH - IMPORT
seed (float | str) – Seed value for point set.
pointCount (int | str) – Number of point for ‘UNIFORM RANDOM’ method in point set.
minSpacing (float | str) – Minimum spacing for ‘MIN SPACING’ method in point set.
minSpacingField (Field) – Minimum spacing field input, if minSpacingField is not provided.
pointSet (list[math.Point]) – A list of positional coordinates contained within the point set.
edgesGenerationMethod (str) – Edges Generation Method. - NO_EDGES - VALENCE - VORONOI - FROM_PART_MESH - IMPORT
valence (float | str) – Valence value for edge set.
valenceField (Field) – Valence field input, if valence is not provided.
edgeSet (list[int]) – A list of positional coordinates contained within the point set.
voronoiType (str) – Voronoi Type. - DELAUNAY - VORONOI
points (bool) – Points values are. - SURFACE_MESH - VOLUME_MESH - PART_CURVES - SAMPLE_UV
uSpacing (float | str) – U spacing for point set.
vSpacing (float | str) – V spacing for point set.
edges (bool) – Edges values are. - MESH_EDGES - NORMAL_AT_POINT
startDistance (float | str) – Start distance for normal at a point edges.
startDistanceField (Field) – Start distance field input, if startDistance is not provided.
endDistance (float | str) – End distance for normal at a point edges.
endDistanceField (Field) – End distance field input, if endDistance is not provided.
volumeType (str) – Volume Type. - INSIDE - SURFACE - OUTSIDE - BOUNDS
sampleCurves (bool) – If True, sample curves otherwise not.
normalFunction (Field) – Normal function field input.
- Returns:
The newly created PointEdgeSet object.
- Return type:
PointEdgeSet
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = "Implicit Part1" inspire.fitView() # Creating Cuboid primitive in implicit part. cuboid = implicitPart.createCuboid(x="100 mm") # Creating implicit PointEdgeSet. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. This is maily used for # stochastic lattice input or point edge set filters input. implicitPart.pointEdgeSet(cuboid) print("PointEdgeSet has been created.") # Updating implicit PointEdgeSet. with implicitPart.edit(): pointEdgeSet = implicitPart.bodies[-1] pointEdgeSet.seed = 0.5 inspire.fitView() print("PointEdgeSet has been updated with seed value 0.5.")
- pointSetBoundingBodyFilter(body, filterName='Filter', retain=False, boundingBody=None)#
Filter points from the Point-Edge set by checking if they fall inside a bounding body.
- Parameters:
body (PointEdgeSet | PointEdgeSetFilter) – Implicit PointEdgeSet or any point edge set filters, use bodies property to get all bodies from implicit part.
filterName (str) – Name of the point set filter.
retain (bool) – If True, Filter reject is selected otherwise filter pass.
boundingBody (Body) – Implicit body, use bodies property to get all bodies from implicit part.
- Returns:
- The newly created PointSetBoundingBodyFilter
object.
- Return type:
PointSetBoundingBodyFilter
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = "Implicit Part1" inspire.fitView() # Creating Cuboid primitive in implicit part. cuboid = implicitPart.createCuboid(x="100 mm") # Creating PointEdgeSetBody with cuboid as input. pointEdgeSetBody = implicitPart.pointEdgeSet(cuboid, seed=0.5) # Creating implicit PointSetBoundingBodyFilter. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. This is maily used for # stochastic lattice input as a filter. implicitPart.pointSetBoundingBodyFilter(pointEdgeSetBody, filterName="Test_Filter") print("PointSetBoundingBodyFilter has been created.") # Updating implicit PointSetBoundingBodyFilter. with implicitPart.edit(): pointSetBoundingBodyFilter = implicitPart.bodies[-1] pointSetBoundingBodyFilter.filterName = "Test_Filter1" inspire.fitView() print("PointSetBoundingBodyFilter name has been updated.")
- pointSetFieldValueFilter(body, filterName='Filter', retain=False, referenceValue=0, referenceField=None, fieldValue='LESS_THAN', lowerValue=0.05, lowerValueField=None, upperValue=0.1, upperValueField=None)#
Filter points from the Point-Edge set by interrogating the field value at the point’s location in a user-specified field, and applying (in)equality or range constraints to determine whether to keep/remove points.
- Parameters:
body (PointEdgeSet | PointEdgeSetFilter) – Implicit PointEdgeSet or any point edge set filters, use bodies property to get all bodies from implicit part.
filterName (str) – Name of the point set filter.
retain (bool) – If True, Filter reject is selected otherwise filter pass.
referenceField (Field) – Implicit Field body, use bodies property to get all bodies from implicit part.
fieldValue (str) – Field value for filter. - LESS_THAN - LESS_OR_EQUAL - EQUAL - NOT_EQUAL - GREATER_OR_EQUAL - GREATER_THAN - BETWEEN - NOT_BETWEEN
lowerValue (float | str) – Lower value for point set.
lowerValueField (Field) – Lower value field input, if lowerValue is not provided.
upperValue (float | str) – Upper value for point set.
upperValueField (Field) – Upper value field input, if upperValue is not provided.
- Returns:
- The newly created PointSetFieldValueFilter
object.
- Return type:
PointSetFieldValueFilter
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = "Implicit Part1" inspire.fitView() # Creating Cuboid primitive in implicit part. cuboid = implicitPart.createCuboid(x="100 mm") # Creating PointEdgeSetBody with cuboid as input. pointEdgeSetBody = implicitPart.pointEdgeSet(cuboid, seed=0.5) # Creating Field with cuboid as input. field = implicitPart.createField(cuboid) # Creating implicit PointSetFieldValueFilter. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. This is maily used for # stochastic lattice input as a filter. implicitPart.pointSetFieldValueFilter(pointEdgeSetBody, filterName="Test_Filter", referenceField=field) print("PointSetFieldValueFilter has been created.") # Updating implicit PointSetFieldValueFilter. with implicitPart.edit(): pointSetFieldValueFilter = implicitPart.bodies[-1] pointSetFieldValueFilter.lowerValue = 0.08 inspire.fitView() print("PointSetFieldValueFilter lowerValue has been updated with value 0.08.")
- pointSetAngleFilter(body, filterName='Filter', retain=False, normalReferenceField=None, angleReferenceField=None, angleValue='LESS_THAN', lowerAngle=45, lowerAngleField=None, upperAngle=60, upperAngleField=None)#
Select a feature as an Angular Reference (line, axis, plane, planar feature, etc.) to measure angles to. The Points in a Point-Edge Set then extract the normal vector from the field of the Target Body the Point-Edge Set is defined in, or from the field of a user-selected implicit body. The size of the angle between the Angular Reference and the normal vector computed at each Point can be used to filter points from the Point-Edge Set.
- Parameters:
body (PointEdgeSet | PointEdgeSetFilter) – Implicit PointEdgeSet or any point edge set filters, use bodies property to get all bodies from implicit part.
filterName (str) – Name of the point set filter.
retain (bool) – If True, Filter reject is selected otherwise filter pass.
normalReferenceField (Field) – Implicit Field body, use bodies property to get all bodies from implicit part.
angleReferenceField (Field) – Implicit Field body, use bodies property to get all bodies from implicit part.
angleValue (str) – Field value for filter. - LESS_THAN - LESS_OR_EQUAL - EQUAL - NOT_EQUAL - GREATER_OR_EQUAL - GREATER_THAN - BETWEEN - NOT_BETWEEN
lowerAngle (float | str) – Lower angle for point set in degree.
lowerAngleField (Field) – Lower angle field input, if lowerValue is not provided.
upperAngle (float | str) – Upper angle for point set in degree.
upperAngleField (Field) – Upper angle field input, if upperValue is not provided.
- Returns:
- The newly created PointSetAngleFilter
object.
- Return type:
PointSetAngleFilter
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = "Implicit Part1" inspire.fitView() # Creating Cuboid primitive in implicit part. cuboid = implicitPart.createCuboid(x="100 mm") # Creating PointEdgeSetBody with cuboid as input. pointEdgeSetBody = implicitPart.pointEdgeSet(cuboid, seed=0.5) # Creating Field with cuboid as input. field = implicitPart.createField(cuboid) # Creating implicit PointSetAngleFilter. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. This is maily used for # stochastic lattice input as a filter. implicitPart.pointSetAngleFilter(pointEdgeSetBody, filterName="Test_Filter", normalReferenceField=field) print("PointSetAngleFilter has been created.") # Updating implicit PointSetAngleFilter. with implicitPart.edit(): pointSetAngleFilter = implicitPart.bodies[-1] pointSetAngleFilter.lowerAngle = 20 inspire.fitView() print("PointSetAngleFilter lowerValue has been updated with value 0.08.")
- pointSetPerturbationFilter(body, filterName='Filter', retain=False, distribution='UNIFORM', uniform=True, seed=0, xCentralValue=0, xCentralValueField=None, xWidth=0.001, xWidthField=None, yCentralValue=0, yCentralValueField=None, yWidth=0.001, yWidthField=None, zCentralValue=0, zCentralValueField=None, zWidth=0.001, zWidthField=None, customVector=False, normalField=None)#
Translate points in a Point-Edge Set in either systematic or randomised way. Translations can operate on one, two or all three direction vector components, or be derived from the field of an implicit body (producing normal vectors on implicit surfaces). Randomised translations require a central value and width for either a uniform or normal distribution. For a uniformly random distribution, the width defines the bounds of the random values. For a normal distribution, the width is the standard deviation.
- Parameters:
body (PointEdgeSet | PointEdgeSetFilter) – Implicit PointEdgeSet or any point edge set filters, use bodies property to get all bodies from implicit part.
filterName (str) – Name of the point set filter.
retain (bool) – If True, Filter reject is selected otherwise filter pass.
distribution (str) – Distribution type for perturbation filter. - UNIFORM - NORMAL
uniform (bool) – If True, Uniform distribution is selected otherwise not.
seed (float | str) – Seed value for point set.
xCentralValue (float | str) – Implicit X center value for point set filter.
xCentralValueField (Field) – Implicit Field body, use bodies property to get all bodies from implicit part.
xWidth (float | str) – Implicit X width value for point set filter.
xWidthField (Field) – Implicit Field body, use bodies property to get all bodies from implicit part.
yCentralValue (float | str) – Implicit Y center value for point set filter.
yCentralValueField (Field) – Implicit Field body, use bodies property to get all bodies from implicit part.
yWidth (float | str) – Implicit Y width value for point set filter.
yWidthField (Field) – Implicit Field body, use bodies property to get all bodies from implicit part.
zCentralValue (float | str) – Implicit Z center value for point set filter.
zCentralValueField (Field) – Implicit Field body, use bodies property to get all bodies from implicit part.
zWidth (float | str) – Implicit Z width value for point set filter.
zWidthField (Field) – Implicit Field body, use bodies property to get all bodies from implicit part.
customVector (bool) – If True, Custom vector is selected otherwise not.
normalField (Field) – Implicit Field body, use bodies property to get all bodies from implicit part.
- Returns:
- The newly created PointSetPerturbationFilter
object.
- Return type:
PointSetPerturbationFilter
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = "Implicit Part1" inspire.fitView() # Creating Cuboid primitive in implicit part. cuboid = implicitPart.createCuboid(x="100 mm") # Creating PointEdgeSetBody with cuboid as input. pointEdgeSetBody = implicitPart.pointEdgeSet(cuboid, seed=0.5) # Creating Field with cuboid as input. field = implicitPart.createField(cuboid) # Creating implicit PointSetPerturbationFilter. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. This is maily used for # stochastic lattice input as a filter. implicitPart.pointSetPerturbationFilter(pointEdgeSetBody, filterName="Test_Filter_Perturbation", uniform=True) print("PointSetPerturbationFilter has been created.") # Updating implicit PointSetPerturbationFilter. with implicitPart.edit(): pointSetPerturbationFilter = implicitPart.bodies[-1] pointSetPerturbationFilter.uniform = False inspire.fitView() print("PointSetPerturbationFilter uniform option is disabled.")
- pointSetValenceFilter(body, filterName='Filter', retain=False, valenceValue='LESS_THAN', valence=0.05, valenceField=None, upperValue=0.1, upperValueField=None)#
Filter points from the Point-Edge set by checking the number of edges incident on that point, and applying (in)equality or range constraints to determine whether to keep/remove points.
- Parameters:
body (PointEdgeSet | PointEdgeSetFilter) – Implicit PointEdgeSet or any point edge set filters, use bodies property to get all bodies from implicit part.
filterName (str) – Name of the point set filter.
retain (bool) – If True, Filter reject is selected otherwise filter pass.
valenceValue (str) – Valence value for filter. - LESS_THAN - LESS_OR_EQUAL - EQUAL - NOT_EQUAL - GREATER_OR_EQUAL - GREATER_THAN - BETWEEN - NOT_BETWEEN
valence (float | str) – Valence value for point set.
valenceField (Field) – Valence value field input, if valence is not provided.
upperValue (float | str) – Upper value for point set.
upperValueField (Field) – Upper value field input, if upperValue is not provided.
- Returns:
- The newly created PointSetValenceFilter
object.
- Return type:
PointSetValenceFilter
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = "Implicit Part1" inspire.fitView() # Creating Cuboid primitive in implicit part. cuboid = implicitPart.createCuboid(x="100 mm") # Creating PointEdgeSetBody with cuboid as input. pointEdgeSetBody = implicitPart.pointEdgeSet(cuboid, seed=0.5) # Creating implicit EdgeSetBoundingBodyFilter. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. This is maily used for # stochastic lattice input as a filter. implicitPart.edgeSetBoundingBodyFilter(pointEdgeSetBody, nodeCheck="ANY", filterName="Test_Filter") print("EdgeSetBoundingBodyFilter has been created.") # Updating implicit EdgeSetBoundingBodyFilter. with implicitPart.edit(): edgeSetBoundingBodyFilter = implicitPart.bodies[-1] edgeSetBoundingBodyFilter.filterName = "Test_Filter1" inspire.fitView() print("EdgeSetBoundingBodyFilter name has been updated.")
- edgeSetBoundingBodyFilter(body, filterName='Filter', retain=False, boundingBody=None, nodeCheck='ALL', midpointCheck=True)#
Filter edges from the Point-Edge set by checking if either end or an optional mid-point along the edge fall outside a bounding body.
- Parameters:
body (PointEdgeSet | PointEdgeSetFilter) – Implicit PointEdgeSet or any point edge set filters, use bodies property to get all bodies from implicit part.
filterName (str) – Name of the edge set filter.
retain (bool) – If True, Filter reject is selected otherwise filter pass.
boundingBody (Body) – Implicit body, use bodies property to get all bodies from implicit part.
nodeCheck (str) – Nodecheck values. - ALL - ANY
midpointCheck (bool) – If True, its on otherwise off.
- Returns:
- The newly created EdgeSetBoundingBodyFilter
object.
- Return type:
EdgeSetBoundingBodyFilter
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = "Implicit Part1" inspire.fitView() # Creating Cuboid primitive in implicit part. cuboid = implicitPart.createCuboid(x="100 mm") # Creating PointEdgeSetBody with cuboid as input. pointEdgeSetBody = implicitPart.pointEdgeSet(cuboid, seed=0.5) # Creating implicit EdgeSetBoundingBodyFilter. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. This is maily used for # stochastic lattice input as a filter. implicitPart.edgeSetBoundingBodyFilter(pointEdgeSetBody, nodeCheck="ANY", filterName="Test_Filter") print("EdgeSetBoundingBodyFilter has been created.") # Updating implicit EdgeSetBoundingBodyFilter. with implicitPart.edit(): edgeSetBoundingBodyFilter = implicitPart.bodies[-1] edgeSetBoundingBodyFilter.filterName = "Test_Filter1" inspire.fitView() print("EdgeSetBoundingBodyFilter name has been updated.")
- edgeSetTrimmingEdgeFilter(body, filterName='Filter', retain=False, boundingBody=None, close=False, closeType='SURFACE_CRAWL', merge=False, mergeDistance=0.002, mergeDistanceField=None)#
Filter edges from the Point-Edge set by trimming if they fall outside a bounding body.
- Parameters:
body (PointEdgeSet | PointEdgeSetFilter) – Implicit PointEdgeSet or any point edge set filters, use bodies property to get all bodies from implicit part.
filterName (str) – Name of the point set filter.
retain (bool) – If True, Filter reject is selected otherwise filter pass.
boundingBody (Body) – Implicit body, use bodies property to get all bodies from implicit part.
close (bool) – If True, Close is selected otherwise not.
closeType (str) – Close type for edge set. - SURFACE_CRAWL - DIRECT
merge (bool) – If True, Merge is selected otherwise not.
mergeDistance (float | str) – Merge distance for edge set.
mergeDistanceField (Field) – Merge distance field input, if mergeDistance is not provided.
- Returns:
- The newly created EdgeSetTrimmingEdgeFilter
object.
- Return type:
EdgeSetTrimmingEdgeFilter
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = "Implicit Part1" inspire.fitView() # Creating Cuboid primitive in implicit part. cuboid = implicitPart.createCuboid(x="100 mm") # Creating PointEdgeSetBody with cuboid as input. pointEdgeSetBody = implicitPart.pointEdgeSet(cuboid, seed=0.5) # Creating implicit EdgeSetLengthFilter. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. This is maily used for # stochastic lattice input as a filter. implicitPart.edgeSetLengthFilter(pointEdgeSetBody, filterName="Test_Filter", lowerLength=0.3) print("EdgeSetLengthFilter has been created.") # Updating implicit EdgeSetLengthFilter. with implicitPart.edit(): edgeSetLengthFilter = implicitPart.bodies[-1] edgeSetLengthFilter.lowerLength = 0.2 inspire.fitView() print("EdgeSetLengthFilter lowerLength has been updated with value 0.2.")
- edgeSetLengthFilter(body, filterName='Filter', retain=False, lengthValue='LESS_THAN', lowerLength=0.01, lowerLengthField=None, upperLength=0.02, upperLengthField=None)#
Filter edges from the Point-Edge set by checking their length against an (in)equality or range constraint.
- Parameters:
body (PointEdgeSet | PointEdgeSetFilter) – Implicit PointEdgeSet or any point edge set filters, use bodies property to get all bodies from implicit part.
filterName (str) – Name of the edge set filter.
retain (bool) – If True, Filter reject is selected otherwise filter pass.
lengthValue (str) – Length value for filter. - LESS_THAN - LESS_OR_EQUAL - EQUAL - NOT_EQUAL - GREATER_OR_EQUAL - GREATER_THAN - BETWEEN - NOT_BETWEEN
lowerLength (float | str) – Lower length for edge set.
lowerLengthField (Field) – Lower length field input, if lowerLength is not provided.
upperLength (float | str) – Upper length for edge set.
upperLengthField (Field) – Upper length field input, if upperLength is not provided.
- Returns:
- The newly created EdgeSetLengthFilter
object.
- Return type:
EdgeSetLengthFilter
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = "Implicit Part1" inspire.fitView() # Creating Cuboid primitive in implicit part. cuboid = implicitPart.createCuboid(x="100 mm") # Creating PointEdgeSetBody with cuboid as input. pointEdgeSetBody = implicitPart.pointEdgeSet(cuboid, seed=0.5) # Creating implicit EdgeSetLengthFilter. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. This is maily used for # stochastic lattice input as a filter. implicitPart.edgeSetLengthFilter(pointEdgeSetBody, filterName="Test_Filter", lowerLength=0.3) print("EdgeSetLengthFilter has been created.") # Updating implicit EdgeSetLengthFilter. with implicitPart.edit(): edgeSetLengthFilter = implicitPart.bodies[-1] edgeSetLengthFilter.lowerLength = 0.2 inspire.fitView() print("EdgeSetLengthFilter lowerLength has been updated with value 0.2.")
- edgeSetAngleFilter(body, filterName='Filter', retain=False, angleReference=None, angleValue='LESS_THAN', lowerAngle=45, lowerAngleField=None, upperAngle=60, upperAngleField=None)#
Filter edges from the Point-Edge set by checking their angle relative to a reference feature against an (in)equality or range constraint.
- Parameters:
body (PointEdgeSet | PointEdgeSetFilter) – Implicit PointEdgeSet or any point edge set filters, use bodies property to get all bodies from implicit part.
filterName (str) – Name of the edge set filter.
retain (bool) – If True, Filter reject is selected otherwise filter pass.
angleReference (Axis | Line | Plane) – Implicit body, use bodies property to get all bodies from implicit part.
angleValue (str) – Angle value for filter. - LESS_THAN - LESS_OR_EQUAL - EQUAL - NOT_EQUAL - GREATER_OR_EQUAL - GREATER_THAN - BETWEEN - NOT_BETWEEN
lowerAngle (float | str) – Lower angle for edge set.
lowerAngleField (Field) – Lower angle field input, if lowerAngle is not provided.
upperAngle (float | str) – Upper angle for edge set.
upperAngleField (Field) – Upper angle field input, if upperAngle is not provided.
- Returns:
- The newly created EdgeSetAngleFilter
object.
- Return type:
EdgeSetAngleFilter
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = "Implicit Part1" inspire.fitView() # Creating Cuboid primitive in implicit part. cuboid = implicitPart.createCuboid(x="100 mm") # Creating PointEdgeSetBody with cuboid as input. pointEdgeSetBody = implicitPart.pointEdgeSet(cuboid, seed=0.5) # Creating implicit EdgeSetAngleFilter. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. This is maily used for # stochastic lattice input as a filter. implicitPart.edgeSetAngleFilter(pointEdgeSetBody, filterName="Test_Filter", lowerAngle=20) print("EdgeSetAngleFilter has been created.") # Updating implicit EdgeSetAngleFilter. with implicitPart.edit(): edgeSetAngleFilter = implicitPart.bodies[-1] edgeSetAngleFilter.lowerAngle = 30 inspire.fitView() print("EdgeSetAngleFilter lowerAngle has been updated with value 30 degree.")
- edgeSetFieldValueFilter(body, filterName='Filter', retain=False, referenceValue=0, referenceField=None, fieldValue='LESS_THAN', nodeCheck='ALL', midpointCheck=True, lowerValue=0.05, lowerValueField=None, upperValue=0.1, upperValueField=None)#
Filter edges from the Point-Edge set by interrogating the field value at either end or an optional mid-point along the edge against a user-specified field, and applying (in)equality or range constraints to determine whether to keep/remove points.
- Parameters:
body (PointEdgeSet | PointEdgeSetFilter) – Implicit PointEdgeSet or any point edge set filters, use bodies property to get all bodies from implicit part.
filterName (str) – Name of the edge set filter.
retain (bool) – If True, Filter reject is selected otherwise filter pass.
referenceField (Field) – Implicit Field body, use bodies property to get all bodies from implicit part.
fieldValue (str) – Field value for filter. - LESS_THAN - LESS_OR_EQUAL - EQUAL - NOT_EQUAL - GREATER_OR_EQUAL - GREATER_THAN - BETWEEN - NOT_BETWEEN
nodeCheck (str) – Nodecheck values. - ALL - ANY
midpointCheck (bool) – If True, its on otherwise off.
lowerValue (float | str) – Lower value for edge set.
lowerValueField (Field) – Lower value field input, if lowerValue is not provided.
upperValue (float | str) – Upper value for edge set.
upperValueField (Field) – Upper value field input, if upperValue is not provided.
- Returns:
- The newly created EdgeSetFieldValueFilter
object.
- Return type:
EdgeSetFieldValueFilter
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = "Implicit Part1" inspire.fitView() # Creating Cuboid primitive in implicit part. cuboid = implicitPart.createCuboid(x="100 mm") # Creating PointEdgeSetBody with cuboid as input. pointEdgeSetBody = implicitPart.pointEdgeSet(cuboid, seed=0.5) # Creating Field with cuboid as input. field = implicitPart.createField(cuboid) # Creating implicit EdgeSetFieldValueFilter. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. This is maily used for # stochastic lattice input as a filter. implicitPart.edgeSetFieldValueFilter(pointEdgeSetBody, filterName="Test_Filter", referenceField=field, lowerValue=0.4, nodeCheck="ANY") print("EdgeSetFieldValueFilter has been created.") # Updating implicit EdgeSetFieldValueFilter. with implicitPart.edit(): edgeSetFieldValueFilter = implicitPart.bodies[-1] edgeSetFieldValueFilter.lowerValue = 0.6 inspire.fitView() print("EdgeSetFieldValueFilter lowerValue has been updated with value 0.6.")
- edgeSetManufacturabilityFilter(body, filterName='Filter', retain=False, angleReference=None, angleValue='LESS_THAN', lengthValue='LESS_THAN', lowerLength=0.01, lowerLengthField=None, upperLength=0.02, upperLengthField=None, lowerAngle=45, lowerAngleField=None, upperAngle=60, upperAngleField=None)#
Filter edges from the Point-Edge set using a combined length and angle filter that considers maximum self-supporting edge length at a given angle of overhang with respect to a reference feature.
- Parameters:
body (PointEdgeSet | PointEdgeSetFilter) – Implicit PointEdgeSet or any point edge set filters, use bodies property to get all bodies from implicit part.
filterName (str) – Name of the edge set filter.
retain (bool) – If True, Filter reject is selected otherwise filter pass.
angleReference (Axis | Line | Plane) – Implicit body, use bodies property to get all bodies from implicit part.
angleValue (str) – Angle value for filter. - LESS_THAN - LESS_OR_EQUAL - EQUAL - NOT_EQUAL - GREATER_OR_EQUAL - GREATER_THAN - BETWEEN - NOT_BETWEEN
lengthValue (str) – Length value for filter. - LESS_THAN - LESS_OR_EQUAL - EQUAL - NOT_EQUAL - GREATER_OR_EQUAL - GREATER_THAN - BETWEEN - NOT_BETWEEN
lowerLength (float | str) – Lower length for edge set.
lowerLengthField (Field) – Lower length field input, if lowerLength is not provided.
upperLength (float | str) – Upper length for edge set.
upperLengthField (Field) – Upper length field input, if upperLength is not provided.
lowerAngle (float | str) – Lower angle for edge set.
lowerAngleField (Field) – Lower angle field input, if lowerAngle is not provided.
upperAngle (float | str) – Upper angle for edge set.
upperAngleField (Field) – Upper angle field input, if upperAngle is not provided.
- Returns:
- The newly created
EdgeSetManufacturabilityFilter object.
- Return type:
EdgeSetManufacturabilityFilter
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = "Implicit Part1" inspire.fitView() # Creating Cuboid primitive in implicit part. cuboid = implicitPart.createCuboid(x="100 mm") # Creating PointEdgeSetBody with cuboid as input. pointEdgeSetBody = implicitPart.pointEdgeSet(cuboid, seed=0.5) # Creating implicit EdgeSetManufacturabilityFilter. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. This is maily used for # stochastic lattice input as a filter. implicitPart.edgeSetManufacturabilityFilter(pointEdgeSetBody, filterName="Test_Filter", lowerAngle=20, lowerLength=0.7) print("EdgeSetManufacturabilityFilter has been created.") # Updating implicit EdgeSetManufacturabilityFilter. with implicitPart.edit(): edgeSetManufacturabilityFilter = implicitPart.bodies[-1] edgeSetManufacturabilityFilter.lowerAngle = 30 inspire.fitView() print("EdgeSetManufacturabilityFilter lowerAngle has been updated with " "value 30 degree.")
- pointCloud(points, weights, interpolation='INVERSE_DISTANCE', exponent=2, backgroundEnable=False, backgroundValue=0.0, backgroundField=None, pointBehaviour='BUMP', radii=None, falloffs=None)#
Create a custom implicit field or geometry from a set of points with scalar values attached to them.
- Parameters:
points (list[math.Point]) – A list of positional coordinates contained within the point cloud.
weights (list[Float]) – A list of scalar values associated with each point. A surface is created at the boundary between positive and negative regions.
interpolation (str) –
Interpolation Type. - INVERSE_DISTANCE (Smooth gradient of values between the points) - NEAREST_NEIGHBOURS (The value in the field will correspond to the
value associated with the closest point. This creates hard boundaries similar to Voronoi cells).
exponent (float | str) – The exponent used for the inverse distance interpolation 1 / (Distance^Exponent). A larger value will produce a gentler gradient between points.
backgroundEnable (bool) – If True, Background value is enabled otherwise not.
backgroundValue (float | str) – Background value for point cloud.
backgroundField (Body) – Background field input if backgroundValue is not provided.
pointBehaviour (str) – Point Behaviour for point cloud. - BUMP - SET
radii (List[float]) – List of radius values.
falloffs (List[float]) – List of falloff values.
- Returns:
The newly created PointCloud object.
- Return type:
PointCloud
Example
from hwx import inspire from hwx.common import math model = inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() # Creating Cuboid primitive in implicit part. cuboid = implicit.createCuboid(x=1, y=1, z=1) # Creating a point cloud. points = [math.Point(0, 0, 0), math.Point(1, 1, 1)] model.variables.add("exponent", type="length", expression="2") pc = implicit.pointCloud(points, [], exponent="exponent") # Creating PointCloudPattern implicit body. implicit.pointCloudPattern(cuboid, pointCloud=pc) inspire.fitView() print("PointCloudPattern has been created.")
- moveBodies(body, position)#
The Move Bodies tool is used to transform implicit bodies in terms of their position and orientation in space.
- Parameters:
body (Body) – Implicit body, use bodies property to get all bodies from implicit part.
position (math.Matrix44) – Position for the body to move.
Example
from hwx import inspire from hwx.common import math inspire.newModel() # Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = "Implicit Part1" # Creating Cuboid primitive in implicit part. implicitPart.createCuboid(x="100 mm") # Moving the cuboid cuboid = implicitPart.bodies[0] implicitPart.moveBodies(cuboid, math.Matrix44(origin=[2, 0, 0])) inspire.fitView() print("Cuboid has been moved in X direction with value 2.")
- combine(targets, transition='SHARP', transitionValue=0.002, transitionField=None)#
The Combine tool is a Boolean Union operation between implicit bodies. This tool creates a new body that envelopes any volume that falls within at least one of bodies being combined. It is equivalent to a logical OR / disjunction.
- Parameters:
targets (list[Body]) – List of Implicit target body, use bodies property to get all bodies from implicit part.
transition (str) – Transition Type. - SHARP - FILLET - CHAMFER
transitionValue (float | str) – Transition value for boolean combine.
transitionField (Field) – Transition field input if transitionValue is not provided.
- Returns:
The newly created Combine object.
- Return type:
Combine
Example
from hwx import inspire from hwx.common import math inspire.newModel() # Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = "Implicit Part1" # Creating Cuboid primitive in implicit part. implicitPart.createCuboid() # Creating Sphere primitive in implicit part. implicitPart.createSphere() # Moving the cuboid cuboid = implicitPart.bodies[0] implicitPart.moveBodies(cuboid, math.Matrix44(origin=[0.2, 0, 0])) # Combine operation on cuboid and sphere. implicitPart.combine(implicitPart.bodies, transition="SHARP") print("Combine operation has been performed with cuboid an sphere.") # Updating Combine operation. combine = implicitPart.bodies[0] with implicitPart.edit(): combine.transition = "CHAMFER" inspire.fitView() print("Smooth parameter has been updated.")
- difference(targets, tools, transition='SHARP', transitionValue=0.002, transitionField=None)#
The difference tool is used to cut ‘tool’ implicit bodies from ‘target’ implicit bodies. This tool creates a new implicit body that envelopes any volume that falls within any target but NOT within any tools. It is equivalent to a logical NOT / negation.
- Parameters:
targets (list[Body]) – List of Implicit target body, use bodies property to get all bodies from implicit part.
tools (list[Body]) – List of Implicit tool body, use bodies property to get all bodies from implicit part.
transition (str) – Transition Type. - SHARP - FILLET - CHAMFER
transitionValue (float | str) – Transition value for boolean difference.
transitionField (Field) – Transition field input if transitionValue is not provided.
- Returns:
The newly created Difference object.
- Return type:
Difference
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = "Implicit Part1" # Creating Cuboid primitive in implicit part. implicitPart.createCuboid(x="1000 mm") # Creating Sphere primitive in implicit part. implicitPart.createCylinder(height=1, radius=0.5) # Subtract operation on cuboid with cylinder. implicitPart.difference(implicitPart.bodies[0], implicitPart.bodies[1], transition="SHARP") print("Cylinder has been subtracted from Cuboid.") # Updating Subtract operation. subtract = implicitPart.bodies[0] with implicitPart.edit(): subtract.transition = "CHAMFER" inspire.fitView() print("Smooth parameter has been updated.")
- intersect(targets, tools, transition='SHARP', transitionValue=0.002, transitionField=None)#
The Intersection tool is used to find volumes of overlap between two or more implicit bodies.
- Parameters:
targets (list[Body]) – List of Implicit target body, use bodies property to get all bodies from implicit part.
tools (list[Body]) – List of Implicit tool body, use bodies property to get all bodies from implicit part.
transition (str) – Transition Type. - SHARP - FILLET - CHAMFER
transitionValue (float | str) – Transition value for boolean intersect.
transitionField (Field) – Transition field input if transitionValue is not provided.
- Returns:
The newly created Intersect object.
- Return type:
Intersect
Example
from hwx import inspire from hwx.common import math inspire.newModel() # Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = "Implicit Part1" # Creating Cuboid primitive in implicit part. implicitPart.createCuboid(x="1000 mm") # Creating Sphere primitive in implicit part. implicitPart.createCylinder(height=1, radius=0.5) # Moving the cylinder cylinder = implicitPart.bodies[1] implicitPart.moveBodies(cylinder, math.Matrix44(origin=[0.6, 0, 0])) # Intersect operation on cuboid with cylinder. implicitPart.intersect(implicitPart.bodies[0], implicitPart.bodies[1], transition="SHARP") print("Cylinder has been intersected from Cuboid.") # Updating Intersect operation. intersect = implicitPart.bodies[0] with implicitPart.edit(): intersect.transition = "CHAMFER" inspire.fitView() print("Smooth parameter has been updated.")
- offset(body, direction='OUTWARD', outwardOffset=0.01, outwardOffsetField=None, inwardOffset=0.01, inwardOffsetField=None, shell=False)#
The Offset tool can be used to inwardly (negative) or outwardly (positive) offset the surface of an implicit body. The surface always moves in a direction that is normal to the original surface.
- Parameters:
body (Body) – Implicit body, use bodies property to get all bodies from implicit part.
direction (str) – Direction for offset. - OUTWARD - INWARD - BOTH - SYMMETRY BOTH and SYMMETRY are valid only if shell is True.
outwardOffset (float | str) – Outward Offset value for implicit body.
outwardOffsetField (Field) – Outward offset field input, if outwardOffset is not provided.
inwardOffset (float | str) – Inward Offset value for implicit body.
inwardOffsetField (Field) – Inward offset field input, if inwardOffset is not provided.
shell (True) – If True, create a shell for implicit body otherwise not.
- Returns:
The newly created Offset object.
- Return type:
Offset
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = "Implicit Part1" # Creating Cuboid primitive in implicit part. cuboid = implicitPart.createCuboid(x="100 mm") # Offset operation on cuboid . implicitPart.offset(cuboid, outwardOffset=0.3) print("Offset has been created from Cuboid in outward direction.") # Updating Offset operation. offsetBody = implicitPart.bodies[0] with implicitPart.edit(): offsetBody.outwardOffset = 0.2 inspire.fitView() print("Offset parameter has been updated.")
- invert(body)#
The Invert tool swaps the convention of ‘inside’ and ‘outside’ for an implicit body by reversing the sign of all scalar values in the underlying field.
- Parameters:
body (Body) – Implicit body, use bodies property to get all bodies from implicit part.
- Returns:
The newly created Invert object.
- Return type:
Invert
Example
from hwx import inspire from hwx.common import math inspire.newModel() # Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = "Implicit Part1" # Creating Cuboid primitive in implicit part. cuboid = implicitPart.createCuboid(x="1000 mm") # Creating Cylindrical primitive in implicit part. cylinder = implicitPart.createCylinder(height=1, radius=0.5) # Moving the cuboid implicitPart.moveBodies(cuboid, math.Matrix44(origin=[1.5, 0, 0])) # Invert operation on cylinder . implicitPart.invert(cylinder) print("Invert has been created from Cylinder.") # Updating Invert operation. invertBody = implicitPart.bodies[-1] with implicitPart.edit(): invertBody.body = cuboid inspire.fitView() print("Invert body has been updated with cuboid.")
- morph(bodyA, bodyB, morphValue=0.5, morphValueField=None)#
The Morph tool performs a morphing operation between two implicit bodies.
- Parameters:
bodyA (Body) – Implicit body, use bodies property to get all bodies from implicit part.
bodyB (Body) – Implicit body, use bodies property to get all bodies from implicit part.
morphValue (float | str) – The Morph Amount should lie between 0 and 100 and this controls the percentage of the morphing operation between Bodies A and B. A Morph Value of 0 would result in a perfect copy of the Body A, and a Morph amount of 100 would result in a perfect copy of the Body B.
morphValueField (Field) – The Morph Amount field input, if morphValue is not provided.
- Returns:
The newly created Morph object.
- Return type:
Morph
Example
from hwx import inspire from hwx.common import math inspire.newModel() # Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = "Implicit Part1" # Creating Cuboid primitive in implicit part. cuboid = implicitPart.createCuboid(x="800 mm") # Creating Sphere primitive in implicit part. sphere = implicitPart.createSphere(radius=0.5) # Moving the cuboid implicitPart.moveBodies(cuboid, math.Matrix44(origin=[0.5, 0, 0])) # Morph operation on cuboid and sphere . implicitPart.morph(cuboid, sphere) print("Morph operation has been performed between cuboid and sphere.") # Updating Morph operation. morphBody = implicitPart.bodies[-1] with implicitPart.edit(): morphBody.morphValue = 0.4 inspire.fitView() print("Morph body has been updated with blend value 0.4.")
- fillet(body, type='ROUNDS', filletRadius=0.002, roundRadius=0.002)#
The Fillet tool applies a circular fillet of defined radius to sharp edges in an implicit body. It can be separately applied to convex and concave edges. Unlike traditional CAD, the fillet effect will be applied to any qualifying edges in the model rather than those that are manually selected by a user.
- Parameters:
body (Body) – Implicit body, use bodies property to get all bodies from implicit part.
type (str) – Fillet type. - FILLETS - ROUNDS - BOTH
filletRadius (float | str) – Fillet radius if type is ‘FILLETS’.
roundRadius (float | str) – Round radius if type is ‘ROUNDS’.
- Returns:
The newly created Fillet object.
- Return type:
Fillet
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = "Implicit Part1" # Creating Cylinder primitive in implicit part. cylinder = implicitPart.createCylinder(height=1, radius=0.5) # Fillet operation on cylinder . implicitPart.fillet(cylinder, roundRadius=0.3) print("Fillet has been created from Cylinder with round fillet type.") # Updating Fillet operation. filletBody = implicitPart.bodies[0] with implicitPart.edit(): filletBody.roundRadius = 0.2 inspire.fitView() print("Fillet parameter has been updated.")
- smooth(body, type='GAUSSIAN', width=1, iterations=1, strength=100)#
The Smooth tool is used to reduce the size of, or remove, unwanted small and/or sharp features in an implicit body. It is analogous to ‘blurring’ in digital image processing. It operates by moving a window through the underlying field, performing filtering operations on the field values that fall within the window. Example smoothing filters include Mean, Median, Gaussian and Laplacian. Each of these have relative pros and cons, giving different smoothing effects.
- Parameters:
body (Body) – Implicit body, use bodies property to get all bodies from implicit part.
type (str) – Smoothing type. - GAUSSIAN - LAPLACIAN - MEDIAN - MEAN
width (int | str) – Size of the smoothing kernel.
iterations (int | str) – Number of times the smoothing kernel runs for.
strength (float | str) – Smooth strength from 0 to 100.
- Returns:
The newly created Smooth object.
- Return type:
Smooth
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = "Implicit Part1" # Creating Cylinder primitive in implicit part. cylinder = implicitPart.createCylinder(height=1, radius=0.5) # Smooth operation on cylinder . implicitPart.smooth(cylinder, width=2) print("Smooth has been created from Cylinder with round fillet type.") # Updating Smooth operation. smoothBody = implicitPart.bodies[0] with implicitPart.edit(): smoothBody.width = 3 inspire.fitView() print("Smooth parameter has been updated.")
- remap(body)#
Remap is a general field of scalar values into a signed distance field. After a remap, each position in the field will have a scalar value that is the signed distance to the closest point on the object being modelled (surface, point, line, etc.). Negative field values are on the inside of the model and positive field values are on the outside.
- Parameters:
body (Body) – Implicit body, use bodies property to get all bodies from implicit part.
- Returns:
The newly created Remap object.
- Return type:
Remap
Example
from hwx import inspire from hwx.common import math inspire.newModel() # Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = "Implicit Part1" # Creating Cuboid primitive in implicit part. cuboid = implicitPart.createCuboid(x="1000 mm") # Creating Cylindrical primitive in implicit part. cylinder = implicitPart.createCylinder(height=1, radius=0.5) # Moving the cuboid implicitPart.moveBodies(cuboid, math.Matrix44(origin=[1.5, 0, 0])) # Remap operation on cylinder . implicitPart.remap(cylinder) print("Remap has been created from Cylinder.") # Updating Remap operation. remapBody = implicitPart.bodies[-1] with implicitPart.edit(): remapBody.body = cuboid inspire.fitView() print("Remap body has been updated with cuboid.")
- mirror(body, plane=None, originX=0, originY=0, originZ=0, normalX=0, normalY=0, normalZ=1)#
The mirror operation takes an implicit body and mirrors it across an arbitrary plane in 3D.
- Parameters:
body (Body) – Implicit body, use bodies property to get all bodies from implicit part.
plane (Plane) – Implicit plane, use bodies property to get all bodies from implicit part.
originX (float | str) – Origin value in X direction.
originY (float | str) – Origin value in Y direction.
originZ (float | str) – Origin value in Z direction.
normalX (float | str) – Normal value in X direction.
normalY (float | str) – Normal value in Y direction.
normalZ (float | str) – Normal value in Z direction.
- Returns:
The newly created Mirror object.
- Return type:
Mirror
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = "Implicit Part1" # Creating Cuboid primitive in implicit part. cuboid = implicitPart.createCuboid(x="1000 mm") # Mirror operation on cylinder . implicitPart.mirror(cuboid, originZ=1) print("Mirror has been created from Cuboid.") # Updating Mirror operation. mirrorBody = implicitPart.bodies[0] with implicitPart.edit(): mirrorBody.originZ = 2 inspire.fitView() print("Mirror parameter has been updated.")
- planeCut(body, keep='REGULAR', plane=None, originX=0, originY=0, originZ=0, normalX=0, normalY=0, normalZ=1)#
Reference an existing plane or planar feature, or a manually created (unreferenced) plane, to slice an implicit body or field. You can select which side of the planar slice to keep. You can also choose to extract a planar region that is interior or exterior to the volume and intersects the slicing plane. Finally, you can also ask for contours, which are the intersections between the surface of the body and the slice plane.
- Parameters:
body (Body) – Implicit body, use bodies property to get all bodies from implicit part.
keep (str) –
REGULAR
INVERTED
PLANE
CONTOUR
plane (Plane) – Implicit plane, use bodies property to get all bodies from implicit part.
originX (float | str) – Origin value in X direction.
originY (float | str) – Origin value in Y direction.
originZ (float | str) – Origin value in Z direction.
normalX (float | str) – Normal value in X direction.
normalY (float | str) – Normal value in Y direction.
normalZ (float | str) – Normal value in Z direction.
- Returns:
The newly created PlaneCut object.
- Return type:
PlaneCut
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = "Implicit Part1" # Creating Cuboid primitive in implicit part. cuboid = implicitPart.createCuboid(x="1000 mm") # PlaneCut operation on cylinder . implicitPart.planeCut(cuboid, originZ=0.2) print("PlaneCut has been created from Cuboid.") # Updating PlaneCut operation. planeCutBody = implicitPart.bodies[0] with implicitPart.edit(): planeCutBody.originZ = 0.1 inspire.fitView()
print(“PlaneCut parameter has been updated.”)
- isosurface(body, fieldValue='LESS_OR_EQUAL', lowerValue=0.05, lowerValueField=None, upperValue=0.1, upperValueField=None, remap=False)#
For an implicit body or field of scalar values, extract an isosurface that passes through all locations with a given isovalue. Field data can come from geometry, interpolated Point Cloud data or simulation results. Use the conditional logic e.g. =, >, <, etc. to determine what will be wrapped in surfaces to form the interior and exterior regions. The iso-value of interest can be a field-driven property to force the isosurface to pass through different isovalues depending on the location in space.
- Parameters:
body – Implicit body, use bodies property to get all bodies from implicit part.
- Returns:
The newly created Isosurface object.
- Return type:
Isosurface
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicitPart = inspire.Implicit() implicitPart.name = "Implicit Part1" inspire.fitView() # Creating Cuboid primitive in implicit part. cuboid = implicitPart.createCuboid(x="100 mm") # Creating implicit Isosurface. implicitPart.isosurface(cuboid, fieldValue="NOT_BETWEEN", lowerValue=0.3, upperValue=0.5) print("Isosurface has been created.") # Updating implicit Isosurface. with implicitPart.edit(): isosurface = implicitPart.bodies[-1] isosurface.lowerValue = 0.2 inspire.fitView() print("Isosurface lowerValue has been updated with value 0.2.")
- featureRefCurve(feature)#
Takes a ParaSolid/BRep curve and creates a reference for this to be used inside Implicit Modeling. This reference is used during the construction of a UVW coordinate space that is later used in the creation of a Conformal Lattice. The curve will provide the U, V or W component of this conformal coordinate system.
- Parameters:
feature (FeatureCurve) – FeatureCurve to be used in implicit object.
- Returns:
The newly created FeatureRefCurve object.
- Return type:
FeatureRefCurve
Example
from hwx import inspire model = inspire.newModel() # Creating Solid block. model.createSolidBlock(x=0.01, y=0.01, z=0.01) # Creating Implicit blank part. implicit = inspire.Implicit() # Creating featureRefCurve implicit body. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. featureRefCurveBody = implicit.featureRefCurve( model.getFeatures(type="FeatureCurve")[0]) print("FeatureRefCurve has been created.") # Updating FeatureRefCurve. with implicit.edit(): featureRefCurveBody.feature = model.getFeatures(type="FeatureCurve")[1] inspire.fitView() print("FeatureRefCurve parameter has been updated.")
- featureRefSurface(feature)#
Takes a ParaSolid/BRep surface and creates a reference for this to be used inside Implicit Modeling. This reference is used during the construction of a UVW coordinate space that is later used in the creation of a Conformal Lattice. The surface will provide the U and V components of this conformal coordinate system.
- Parameters:
feature (FeatureArea) – FeatureArea to be used in implicit object.
- Returns:
The newly created FeatureRefSurface object.
- Return type:
FeatureRefSurface
Example
from hwx import inspire model = inspire.newModel() # Creating Solid block. model.createSolidBlock(x=0.01, y=0.01, z=0.01) # Creating Implicit blank part. implicit = inspire.Implicit() # Creating FeatureRefSurface implicit body. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. featureRefSurfaceBody = implicit.featureRefSurface( model.getFeatures(type="FeaturePlanar")[0]) print("FeatureRefSurface has been created.") # Updating FeatureRefSurface operation. with implicit.edit(): featureRefSurfaceBody.feature = model.getFeatures(type="FeaturePlanar")[1] inspire.fitView() print("FeatureRefSurface parameter has been updated.")
- conform(conformType='SURFACE', uCurve=None, vCurve=None, wCurve=None, curveUInvert=False, curveVInvert=False, curveWInvert=False, surfaceType='SURFACE', surface=None, surfaceUVFlip=False, surfaceUInvert=False, surfaceVInvert=False, volumeType='SURFACECURVE', volumeSurface=None, volumeSurfaceUVFlip=False, volumeSurfaceUInvert=False, volumeSurfaceVInvert=False)#
Creates an Implicit conform body.
- Parameters:
conformType (str) – Conform Type for implicit. - CURVE - SURFACE - VOLUME
uCurve (geometry.FeatureCurve) – FeatureCurve for U curve in conform body.
vCurve (geometry.FeatureCurve) – FeatureCurve for V curve in conform body.
wCurve (geometry.FeatureCurve) – FeatureCurve for W curve in conform body.
curveUInvert (bool) – If True invert the U curve, otherwise not.
curveVInvert (bool) – If True invert the V curve, otherwise not.
curveWInvert (bool) – If True invert the W curve, otherwise not.
surfaceType (str) – Surface Type. - SURFACE - CURVES
surface (geometry.FeatureArea) – FeatureArea for surface in conform body.
surfaceUVFlip (bool) – If True invert the UV surface, otherwise not.
surfaceUInvert (bool) – If True invert the U surface, otherwise not.
surfaceVInvert (bool) –
If True invert the V surface, otherwise not. volumeType (str): Volume Type.
SURFACECURVE
CURVES
volumeSurface (geometry.FeatureArea) – FeatureArea for volume surface in conform body.
volumeSurfaceUVFlip (bool) – If True invert the UV volume surface, otherwise not.
volumeSurfaceUInvert (bool) – If True invert the U volume surface, otherwise not.
volumeSurfaceVInvert (bool) – If True invert the V volume surface, otherwise not.
- Returns:
The newly created Conform object.
- Return type:
Conform
Example
from hwx import inspire model = inspire.newModel() # Creating Solid block. model.createSolidBlock(x=0.01, y=0.01, z=0.01) implicit = inspire.Implicit() # Creating uCurve for implicit body. uCurve = model.getFeatures(type="FeatureCurve")[0] # Creating surface for implicit body. surface = model.getFeatures(type="FeaturePlanar")[0] # Creating Conform implicit body. conformBody = implicit.conform(conformType="CURVE", uCurve=uCurve, curveUInvert=False) print("Conform has been created.") # Updating Conform operation. with implicit.edit(): conformBody.conformType = "SURFACE" conformBody.surface = surface inspire.fitView() print("Conform parameter has been updated.")
- featureRefAxis(feature)#
Takes a ParaSolid/BRep axis and creates a reference for this to be used inside Implicit Modeling. This reference is used during the construction of a UVW coordinate space that is later used in the creation of a Conformal Lattice. The axis will provide the U, V or W component of this conformal coordinate system.
- Parameters:
feature (FeatureLinear) – FeatureLinear to be used in implicit object.
- Returns:
The newly created FeatureRefAxis object.
- Return type:
FeatureRefAxis
Example
from hwx import inspire model = inspire.newModel() # Creating Solid block. model.createSolidBlock(x=0.01, y=0.01, z=0.01) # Creating Implicit blank part. implicit = inspire.Implicit() # Creating FeatureRefAxis implicit body. featureRefAxisBody = implicit.featureRefAxis( model.getFeatures(type="FeatureLinear")[0]) print("FeatureRefAxis has been created.") # Updating FeatureRefAxis operation. with implicit.edit(): featureRefAxisBody.feature = model.getFeatures(type="FeatureLinear")[1] inspire.fitView() print("FeatureRefAxis parameter has been updated.")
- featureRefPlane(feature)#
Takes a ParaSolid/BRep plane and creates a reference for this to be used inside Implicit Modeling. This reference is used during the construction of a UVW coordinate space that is later used in the creation of a Conformal Lattice. The plane will provide the U and V components of this conformal coordinate system.
- Parameters:
feature (FeaturePlanar) – FeaturePlanar to be used in implicit object.
- Returns:
The newly created FeatureRefPlane object.
- Return type:
FeatureRefPlane
Example
from hwx import inspire model = inspire.newModel() # Creating Solid block. model.createSolidBlock(x=0.01, y=0.01, z=0.01) # Creating Implicit blank part. implicit = inspire.Implicit() # Creating FeatureRefPlane implicit body. featureRefPlaneBody = implicit.featureRefPlane( model.getFeatures(type="FeaturePlanar")[0]) print("FeatureRefPlane has been created.") # Updating FeatureRefPlane operation. with implicit.edit(): featureRefPlaneBody.feature = model.getFeatures(type="FeaturePlanar")[1] inspire.fitView() print("FeatureRefPlane parameter has been updated.")
- featureRefPoint(feature)#
Takes a ParaSolid/BRep point and creates a reference for this to be used inside Implicit Modeling. This reference is used during the construction of a UVW coordinate space that is later used in the creation of a Conformal Lattice. The point will provide the U and V components of this conformal coordinate system.
- Parameters:
feature (FeaturePoint) – FeaturePoint to be used in implicit object.
- Returns:
The newly created FeatureRefPoint object.
- Return type:
FeatureRefPoint
Example
from hwx import inspire model = inspire.newModel() # Creating Solid block. model.createSolidBlock(x=0.01, y=0.01, z=0.01) # Creating Implicit blank part. implicit = inspire.Implicit() # Creating FeatureRefPoint implicit body. featureRefPointBody = implicit.featureRefPoint( model.getFeatures(type="FeaturePoint")[0]) print("FeatureRefPoint has been created.") # Updating FeatureRefPoint operation. with implicit.edit(): featureRefPointBody.feature = model.getFeatures(type="FeaturePoint")[1] inspire.fitView() print("FeatureRefPoint parameter has been updated.")
- linearPattern(body, conform=None, direction='ONE', vector1=None, spacing1=0.1, count1=2, vector2=None, spacing2=0.1, count2=2, spacing3=0.1, count3=2, transition='SHARP', distance=0.002, distanceField=None)#
The Linear Pattern operation takes a user-selected body and distributes multiple identical instances according to linear patterning rules.
- Parameters:
body (Body) – Implicit body, use bodies property to get all bodies from implicit part.
conform (Conform) – Implicit Conform body, use bodies property to get all bodies from implicit part.
direction (str) – The linear pattern direction1. - ONE - TWO - THREE
vector1 (FeatureRefAxis) – Implicit FeatureRefAxis body, use bodies property to get all bodies from implicit part.
spacing1 (float | str) – Space between the linear pattern copies in direction1.
count1 (float | str) – Number of copies in direction1.
vector2 (FeatureRefAxis) – Implicit FeatureRefAxis body, use bodies property to get all bodies from implicit part.
spacing2 (float | str) – Space between the linear pattern copies in direction2.
count2 (float | str) – Number of copies in direction2.
spacing3 (float | str) – Space between the linear pattern copies in direction3.
count3 (float | str) – Number of copies in direction3.
transition (str) – Transition Type. - SHARP - FILLET - CHAMFER
distance (float | str) – Distance/Radius value for linear pattern.
distanceField (Field) – Distance field input if distance is not provided.
- Returns:
The newly created LinearPattern object.
- Return type:
LinearPattern
Example
from hwx import inspire model = inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() # Creating Cuboid primitive in implicit part. cuboid = implicit.createCuboid(x=1, y=1, z=1) # Creating a solid block to get the axis. model.createSolidBlock(x=0.01, y=0.01, z=0.01) # Getting a feature linear for LinearPattern. axis = implicit.featureRefAxis(model.getFeatures(type="FeatureLinear")[0]) # Creating LinearPattern implicit body. linearPatternBody = implicit.linearPattern(cuboid, direction="TWO", vector1=axis, spacing1=1.2, count1=3) print("LinearPattern has been created.") # Updating LinearPattern operation. with implicit.edit(): linearPatternBody.spacing1 = 1.3 linearPatternBody.count1 = 4 inspire.fitView() print("LinearPattern parameter has been updated.")
- circularPattern(body, vector=None, equalSpacing=False, angle=60, count=2, transition='SHARP', distance=0.002, distanceField=None)#
The Circular Pattern operation takes a user-selected body and distributes multiple identical instances according to circular patterning rules.
- Parameters:
body (Body) – Implicit body, use bodies property to get all bodies from implicit part.
vector (FeatureRefAxis) – Implicit FeatureRefAxis body, use bodies property to get all bodies from implicit part.
equalSpacing (bool) – If True, pattern are equally spaced otherwise not.
angle (float | str) – Angle for circular pattern.
count (float | str) – Number of copies.
transition (str) – Transition Type. - SHARP - FILLET - CHAMFER
distance (float | str) – Distance/Radius value for circular pattern.
distanceField (Field) – Distance field input if distance is not provided.
- Returns:
The newly created CircularPattern object.
- Return type:
CircularPattern
Example
from hwx import inspire model = inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() # Creating Cuboid primitive in implicit part. cuboid = implicit.createCuboid(x=1, y=1, z=1) # Creating a solid block to get the axis. model.createSolidBlock(x=0.01, y=0.01, z=0.01) # Getting a feature linear for CircularPattern. axis = implicit.featureRefAxis(model.getFeatures(type="FeatureLinear")[0]) # Creating CircularPattern implicit body. circularPatternBody = implicit.circularPattern(cuboid, vector=axis, angle=70, count=3) print("CircularPattern has been created.") # Updating CircularPattern operation. with implicit.edit(): circularPatternBody.angle = 30 circularPatternBody.count = 4 inspire.fitView() print("CircularPattern parameter has been updated.")
- pointCloudPattern(body, pointCloud=None, transition='SHARP', distance=0.002, distanceField=None)#
The PointCloud Pattern operation takes a user-selected body and distributes multiple identical instances according to PointCloud patterning rules.
- Parameters:
body (Body) – Implicit body, use bodies property to get all bodies from implicit part.
pointCloud (PointCloud) – Implicit PointCloud body, use bodies property to get all bodies from implicit part.
transition (str) – Transition Type. - SHARP - FILLET - CHAMFER
distance (float | str) – Distance/Radius value for point cloud pattern.
distanceField (Field) – Distance field input if distance is not provided.
- Returns:
The newly created PointCloudPattern object.
- Return type:
PointCloudPattern
Example
from hwx import inspire from hwx.common import math model = inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() # Creating Cuboid primitive in implicit part. cuboid = implicit.createCuboid(x=1, y=1, z=1) # Creating a point cloud. points = [math.Point(0, 0, 0), math.Point(1, 1, 1)] model.variables.add("exponent", type="length", expression="2") pc = implicit.pointCloud(points, [], exponent="exponent") # Creating PointCloudPattern implicit body. implicit.pointCloudPattern(cuboid, pointCloud=pc) inspire.fitView() print("PointCloudPattern has been created.")
- refPoint(reference)#
Takes a geometry system point and creates a reference for this to be used inside Implicit Modeling.
- Parameters:
reference (geometry.Point) – Geometry system point to be used in implicit object.
- Returns:
The newly created RefPoint object.
- Return type:
RefPoint
Example
from hwx import inspire model = inspire.newModel() # Creating Solid block. model.createSolidBlock(x=0.01, y=0.01, z=0.01) # Creating Implicit blank part. implicit = inspire.Implicit() # Creating geometry reference point for RefPoint. refPoint = inspire.geometry.Point(model.getFeatures(type="FeaturePoint")[0], "AT_VERTEX") # Creating RefPoint implicit body. refPointBody = implicit.refPoint(refPoint) print("RefPoint has been created.") # Creating geometry reference point for RefPoint update. refPoint1 = inspire.geometry.Point(model.getFeatures(type="FeaturePoint")[1], "AT_VERTEX") # Updating RefPoint operation. with implicit.edit(): refPointBody.reference = refPoint1 inspire.fitView() print("RefPoint parameter has been updated.")
- refPlane(reference)#
Takes a geometry system plane and creates a reference for this to be used inside Implicit Modeling.
- Parameters:
reference (geometry.Plane) – Geometry system plane to be used in implicit object.
- Returns:
The newly created RefPlane object.
- Return type:
RefPlane
Example
from hwx import inspire model = inspire.newModel() # Creating Solid block. model.createSolidBlock(x=0.01, y=0.01, z=0.01) # Creating Implicit blank part. implicit = inspire.Implicit() # Creating geometry reference plane for RefPlane. refPlane = inspire.geometry.Plane(model.getFeatures(type="FeaturePlanar")[0], "OFFSET", offset=0.005)[0] # Creating RefPlane implicit body. refPlaneBody = implicit.refPlane(refPlane) print("RefPlane has been created.") # Creating geometry reference plane for RefPlane update. refPlane1 = inspire.geometry.Plane( model.getFeatures(type="FeaturePlanar")[1], "OFFSET", offset=0.003)[0] # Updating RefPlane operation. with implicit.edit(): refPlaneBody.reference = refPlane1 inspire.fitView() print("RefPlane parameter has been updated.")
- refAxis(reference)#
Takes a geometry system axis and creates a reference for this to be used inside Implicit Modeling.
- Parameters:
reference (geometry.Axis) – Geometry system axis to be used in implicit object.
- Returns:
The newly created RefAxis object.
- Return type:
RefAxis
Example
from hwx import inspire model = inspire.newModel() # Creating Solid block. model.createSolidBlock(x=0.01, y=0.01, z=0.01) # Creating Implicit blank part. implicit = inspire.Implicit() # Creating geometry reference axis for RefAxis. refAxis = inspire.geometry.Axis(model.getFeatures(type="FeatureLinear")[0], "THROUGH_EDGE") # Creating RefAxis implicit body. refAxisBody = implicit.refAxis(refAxis) print("RefAxis has been created.") # Creating geometry reference axis for RefAxis update. refAxis1 = inspire.geometry.Axis(model.getFeatures(type="FeatureLinear")[1], "THROUGH_EDGE") # Updating RefAxis operation. with implicit.edit(): refAxisBody.reference = refAxis1 inspire.fitView() print("RefAxis parameter has been updated.")
- add(bodyA, bodyB)#
Implicit Add operation.
- Parameters:
bodyA (Body) – Implicit body for math operation, use bodies property to get all bodies from implicit part.
bodyB (Body) – Implicit body for math operation, use bodies property to get all bodies from implicit part.
- Returns:
The newly created Add object.
- Return type:
Add
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() implicit.name = "Implicit Part1" # Please note that implicit math operations can be performed only on # implicit bodies. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. one = implicit.constant(1) two = implicit.constant(2) # Add operation. add = implicit.add(one, two) # It can be also done by using add operator. # add = one + two # Updating add operation. with implicit.edit(): add.bodyA = implicit.constant(3) print("Add operation has been performed between two implicit constants.")
- subtract(bodyA, bodyB)#
Implicit Subtract operation.
- Parameters:
bodyA (Body) – Implicit body for math operation, use bodies property to get all bodies from implicit part.
bodyB (Body) – Implicit body for math operation, use bodies property to get all bodies from implicit part.
- Returns:
The newly created Subtract object.
- Return type:
Subtract
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() implicit.name = "Implicit Part1" # Please note that implicit math operations can be performed only on # implicit bodies. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. one = implicit.constant(1) two = implicit.constant(2) # Subtract operation. subtract = implicit.subtract(two, one) # It can be also done by using subtract operator. # subtract = two - one # Updating subtract operation. with implicit.edit(): subtract.bodyA = implicit.constant(3) print("Subtract operation has been performed between two implicit " "constants.")
- multiply(bodyA, bodyB)#
Implicit Multiply operation.
- Parameters:
bodyA (Body) – Implicit body for math operation, use bodies property to get all bodies from implicit part.
bodyB (Body) – Implicit body for math operation, use bodies property to get all bodies from implicit part.
- Returns:
The newly created Multiply object.
- Return type:
Multiply
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() implicit.name = "Implicit Part1" # Please note that implicit math operations can be performed only on # implicit bodies. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. one = implicit.constant(1) two = implicit.constant(2) # Multiply operation. multiply = implicit.multiply(two, one) # It can be also done by using multiply operator. # multiply = two * one # Updating multiply operation. with implicit.edit(): multiply.bodyA = implicit.constant(3) print("Multiply operation has been performed between two implicit " "constants.")
- divide(bodyA, bodyB)#
Implicit Divide operation.
- Parameters:
bodyA (Body) – Implicit body for math operation, use bodies property to get all bodies from implicit part.
bodyB (Body) – Implicit body for math operation, use bodies property to get all bodies from implicit part.
- Returns:
The newly created Divide object.
- Return type:
Divide
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() implicit.name = "Implicit Part1" # Please note that implicit math operations can be performed only on # implicit bodies. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. one = implicit.constant(1) two = implicit.constant(2) # Divide operation. divide = implicit.divide(two, one) # It can be also done by using divide operator. # divide = two / one # Updating divide operation. with implicit.edit(): divide.bodyA = implicit.constant(3) print("Divide operation has been performed between two implicit " "constants.")
- floorDivision(bodyA, bodyB)#
Implicit Floor Division operation.
- Parameters:
bodyA (Body) – Implicit body for math operation, use bodies property to get all bodies from implicit part.
bodyB (Body) – Implicit body for math operation, use bodies property to get all bodies from implicit part.
- Returns:
The newly created FloorDivision object.
- Return type:
FloorDivision
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() implicit.name = "Implicit Part1" # Please note that implicit math operations can be performed only on # implicit bodies. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. two = implicit.constant(2) three = implicit.constant(3) # FloorDivision operation. floorDivision = implicit.floorDivision(three, two) # It can be also done by using floorDivision operator. # floorDivision = three // two # Updating floorDivision operation. with implicit.edit(): floorDivision.bodyA = implicit.constant(5) print("FloorDivision operation has been performed between two implicit " "constants.")
- power(bodyA, bodyB)#
Implicit Power operation.
- Parameters:
bodyA (Body) – Implicit body for math operation, use bodies property to get all bodies from implicit part.
bodyB (Body) – Implicit body for math operation, use bodies property to get all bodies from implicit part.
- Returns:
The newly created Power object.
- Return type:
Power
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() implicit.name = "Implicit Part1" # Please note that implicit math operations can be performed only on # implicit bodies. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. two = implicit.constant(2) three = implicit.constant(3) # Power operation. power = implicit.power(two, three) # It can be also done by using power operator. # power = two ** three # Updating power operation. with implicit.edit(): power.bodyA = implicit.constant(5) print("Power operation has been performed between two implicit " "constants.")
- mod(bodyA, bodyB)#
Implicit Mod operation.
- Parameters:
bodyA (Body) – Implicit body for math operation, use bodies property to get all bodies from implicit part.
bodyB (Body) – Implicit body for math operation, use bodies property to get all bodies from implicit part.
- Returns:
The newly created Mod object.
- Return type:
Mod
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() implicit.name = "Implicit Part1" # Please note that implicit math operations can be performed only on # implicit bodies. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. two = implicit.constant(2) three = implicit.constant(3) # Mod operation. mod = implicit.mod(three, two) # It can be also done by using mod operator. # mod = three % two # Updating mod operation. with implicit.edit(): mod.bodyA = implicit.constant(5) print("Mod operation has been performed between two implicit " "constants.")
- lessThan(bodyA, bodyB)#
Implicit less than operation.
- Parameters:
bodyA (Body) – Implicit body for math operation, use bodies property to get all bodies from implicit part.
bodyB (Body) – Implicit body for math operation, use bodies property to get all bodies from implicit part.
- Returns:
The newly created LessThan object.
- Return type:
LessThan
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() implicit.name = "Implicit Part1" # Please note that implicit math operations can be performed only on # implicit bodies. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. one = implicit.constant(1) two = implicit.constant(2) # LessThan operation. lessThan = implicit.lessThan(one, two) # It can be also done by using lessThan operator. # lessThan = one < two # Updating lessThan operation. with implicit.edit(): lessThan.bodyA = implicit.constant(1.5) print("LessThan operation has been performed between two implicit " "constants.")
- lessOrEqualTo(bodyA, bodyB)#
Implicit less or equal to operation.
- Parameters:
bodyA (Body) – Implicit body for math operation, use bodies property to get all bodies from implicit part.
bodyB (Body) – Implicit body for math operation, use bodies property to get all bodies from implicit part.
- Returns:
The newly created LessOrEqualTo object.
- Return type:
LessOrEqualTo
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() implicit.name = "Implicit Part1" # Please note that implicit math operations can be performed only on # implicit bodies. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. one = implicit.constant(1) two = implicit.constant(2) # LessOrEqualTo operation. lessOrEqualTo = implicit.lessOrEqualTo(one, two) # It can be also done by using lessOrEqualTo operator. # lessOrEqualTo = one <= two # Updating lessOrEqualTo operation. with implicit.edit(): lessOrEqualTo.bodyA = implicit.constant(2) print("LessOrEqualTo operation has been performed between two implicit " "constants.")
- equalTo(bodyA, bodyB)#
Implicit equal to operation.
- Parameters:
bodyA (Body) – Implicit body for math operation, use bodies property to get all bodies from implicit part.
bodyB (Body) – Implicit body for math operation, use bodies property to get all bodies from implicit part.
- Returns:
The newly created EqualTo object.
- Return type:
EqualTo
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() implicit.name = "Implicit Part1" # Please note that implicit math operations can be performed only on # implicit bodies. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. one = implicit.constant(1) two = implicit.constant(2) # EqualTo operation. equalTo = implicit.equalTo(one, two) # It can be also done by using equalTo operator. # equalTo = one == two # Updating equalTo operation. with implicit.edit(): equalTo.bodyA = implicit.constant(2) print("EqualTo operation has been performed between two implicit " "constants.")
- greaterThan(bodyA, bodyB)#
Implicit greater than operation.
- Parameters:
bodyA (Body) – Implicit body for math operation, use bodies property to get all bodies from implicit part.
bodyB (Body) – Implicit body for math operation, use bodies property to get all bodies from implicit part.
- Returns:
The newly created GreaterThan object.
- Return type:
GreaterThan
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() implicit.name = "Implicit Part1" # Please note that implicit math operations can be performed only on # implicit bodies. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. one = implicit.constant(1) two = implicit.constant(2) # GreaterThan operation. greaterThan = implicit.greaterThan(two, one) # It can be also done by using greaterThan operator. # greaterThan = two > one # Updating greaterThan operation. with implicit.edit(): greaterThan.bodyA = implicit.constant(1.5) print("GreaterThan operation has been performed between two implicit " "constants.")
- greaterOrEqualTo(bodyA, bodyB)#
Implicit greater or equal to operation.
- Parameters:
bodyA (Body) – Implicit body for math operation, use bodies property to get all bodies from implicit part.
bodyB (Body) – Implicit body for math operation, use bodies property to get all bodies from implicit part.
- Returns:
The newly created GreaterOrEqualTo object.
- Return type:
GreaterOrEqualTo
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() implicit.name = "Implicit Part1" # Please note that implicit math operations can be performed only on # implicit bodies. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. one = implicit.constant(1) two = implicit.constant(2) # GreaterOrEqualTo operation. greaterOrEqualTo = implicit.greaterOrEqualTo(two, one) # It can be also done by using greaterThan operator. # greaterOrEqualTo = two >= one # Updating greaterOrEqualTo operation. with implicit.edit(): greaterOrEqualTo.bodyA = implicit.constant(1) print("GreaterOrEqualTo operation has been performed between two implicit " "constants.")
- sin(bodyA)#
Implicit Trigonometry Sin operation.
- Parameters:
bodyA (Body) – Implicit body for math functions, use bodies property to get all bodies from implicit part.
- Returns:
The newly created Sin object.
- Return type:
Sin
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() implicit.name = "Implicit Part1" # Please note that implicit math operations can be performed only on # implicit bodies. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. one = implicit.constant(1) # Sin operation. sin = implicit.sin(one) # Updating sin operation. with implicit.edit(): sin.bodyA = implicit.constant(0.5) print("Sin operation has been performed on implicit constant.")
- cos(bodyA)#
Implicit Trigonometry Cos operation.
- Parameters:
bodyA (Body) – Implicit body for math functions, use bodies property to get all bodies from implicit part.
- Returns:
The newly created Cos object.
- Return type:
Cos
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() implicit.name = "Implicit Part1" # Please note that implicit math operations can be performed only on # implicit bodies. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. one = implicit.constant(1) # Cos operation. cos = implicit.cos(one) # Updating cos operation. with implicit.edit(): cos.bodyA = implicit.constant(0.5) print("Cos operation has been performed on implicit constant.")
- tan(bodyA)#
Implicit Trigonometry Tan operation.
- Parameters:
bodyA (Body) – Implicit body for math functions, use bodies property to get all bodies from implicit part.
- Returns:
The newly created Tan object.
- Return type:
Tan
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() implicit.name = "Implicit Part1" # Please note that implicit math operations can be performed only on # implicit bodies. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. one = implicit.constant(1) # Tan operation. tan = implicit.tan(one) # Updating tan operation. with implicit.edit(): tan.bodyA = implicit.constant(0.5) print("Tan operation has been performed on implicit constant.")
- atan2(bodyA, bodyB)#
Implicit Trigonometry ATan2 operation.
- Parameters:
bodyA (Body) – Implicit body for math functions, use bodies property to get all bodies from implicit part.
bodyB (Body) – Implicit body for math operation, use bodies property to get all bodies from implicit part.
- Returns:
The newly created ATan2 object.
- Return type:
ATan2
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() implicit.name = "Implicit Part1" # Please note that implicit math operations can be performed only on # implicit bodies. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. one = implicit.constant(1) two = implicit.constant(2) # ATan2 operation. atan2 = implicit.atan2(one, two) # Updating atan2 operation. with implicit.edit(): atan2.bodyA = implicit.constant(0.5) print("ATan2 operation has been performed on implicit constants.")
- asin(bodyA)#
Implicit Trigonometry ASin operation.
- Parameters:
bodyA (Body) – Implicit body for math functions, use bodies property to get all bodies from implicit part.
- Returns:
The newly created ASin object.
- Return type:
ASin
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() implicit.name = "Implicit Part1" # Please note that implicit math operations can be performed only on # implicit bodies. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. one = implicit.constant(1) # ASin operation. asin = implicit.asin(one) # Updating asin operation. with implicit.edit(): asin.bodyA = implicit.constant(0.5) print("ASin operation has been performed on implicit constant.")
- acos(bodyA)#
Implicit Trigonometry ACos operation.
- Parameters:
bodyA (Body) – Implicit body for math functions, use bodies property to get all bodies from implicit part.
- Returns:
The newly created ACos object.
- Return type:
ACos
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() implicit.name = "Implicit Part1" # Please note that implicit math operations can be performed only on # implicit bodies. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. one = implicit.constant(1) # ACos operation. acos = implicit.acos(one) # Updating acos operation. with implicit.edit(): acos.bodyA = implicit.constant(0.5) print("ACos operation has been performed on implicit constant.")
- atan(bodyA)#
Implicit Trigonometry ATan operation.
- Parameters:
bodyA (Body) – Implicit body for math functions, use bodies property to get all bodies from implicit part.
- Returns:
The newly created ATan object.
- Return type:
ATan
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() implicit.name = "Implicit Part1" # Please note that implicit math operations can be performed only on # implicit bodies. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. one = implicit.constant(1) # ATan operation. atan = implicit.atan(one) # Updating atan operation. with implicit.edit(): atan.bodyA = implicit.constant(0.5) print("ATan operation has been performed on implicit constant.")
- asinh(bodyA)#
Implicit Trigonometry ASinh operation.
- Parameters:
bodyA (Body) – Implicit body for math functions, use bodies property to get all bodies from implicit part.
- Returns:
The newly created ASinh object.
- Return type:
ASinh
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() implicit.name = "Implicit Part1" # Please note that implicit math operations can be performed only on # implicit bodies. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. one = implicit.constant(1) # ASinh operation. asinh = implicit.asinh(one) # Updating asinh operation. with implicit.edit(): asinh.bodyA = implicit.constant(0.5) print("ASinh operation has been performed on implicit constant.")
- acosh(bodyA)#
Implicit Trigonometry ACosh operation.
- Parameters:
bodyA (Body) – Implicit body for math functions, use bodies property to get all bodies from implicit part.
- Returns:
The newly created ACosh object.
- Return type:
ACosh
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() implicit.name = "Implicit Part1" # Please note that implicit math operations can be performed only on # implicit bodies. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. one = implicit.constant(1) # ACosh operation. acosh = implicit.acosh(one) # Updating acosh operation. with implicit.edit(): acosh.bodyA = implicit.constant(0.5) print("ACosh operation has been performed on implicit constant.")
- atanh(bodyA)#
Implicit Trigonometry ATanh operation.
- Parameters:
bodyA (Body) – Implicit body for math functions, use bodies property to get all bodies from implicit part.
- Returns:
The newly created ATanh object.
- Return type:
ATanh
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() implicit.name = "Implicit Part1" # Please note that implicit math operations can be performed only on # implicit bodies. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. one = implicit.constant(1) # ATanh operation. atanh = implicit.atanh(one) # Updating atanh operation. with implicit.edit(): atanh.bodyA = implicit.constant(0.5) print("ATanh operation has been performed on implicit constant.")
- abs(bodyA)#
Implicit absolute value operation.
- Parameters:
bodyA (Body) – Implicit body for math functions, use bodies property to get all bodies from implicit part.
- Returns:
The newly created Abs object.
- Return type:
Abs
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() implicit.name = "Implicit Part1" # Please note that implicit math operations can be performed only on # implicit bodies. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. val = implicit.constant(1.4) # Abs operation. abs = implicit.abs(val) # Updating abs operation. with implicit.edit(): abs.bodyA = implicit.constant(0.8) print("Abs operation has been performed on implicit constant.")
- ceil(bodyA)#
Implicit ceil operation.
- Parameters:
bodyA (Body) – Implicit body for math functions, use bodies property to get all bodies from implicit part.
- Returns:
The newly created Ceil object.
- Return type:
Ceil
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() implicit.name = "Implicit Part1" # Please note that implicit math operations can be performed only on # implicit bodies. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. val = implicit.constant(1.4) # Ceil operation. ceil = implicit.ceil(val) # Updating ceil operation. with implicit.edit(): ceil.bodyA = implicit.constant(0.8) print("Ceil operation has been performed on implicit constant.")
- clamp(bodyA, bodyB, bodyC)#
Implicit clamp operation.
- Parameters:
bodyA (Body) – Implicit body for math functions, use bodies property to get all bodies from implicit part.
bodyB (Body) – Implicit body for math functions, use bodies property to get all bodies from implicit part.
bodyC (Body) – Implicit body for math functions, use bodies property to get all bodies from implicit part.
- Returns:
The newly created Clamp object.
- Return type:
Clamp
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() implicit.name = "Implicit Part1" # Please note that implicit math operations can be performed only on # implicit bodies. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. one = implicit.constant(1) two = implicit.constant(2) three = implicit.constant(3) # Clamp operation. clamp = implicit.clamp(one, two, three) # Updating clamp operation. with implicit.edit(): clamp.bodyA = implicit.constant(4) print("Clamp operation has been performed on implicit constants.")
- implIf(bodyA, bodyB, bodyC)#
Implicit if operation.
- Parameters:
bodyA (Body) – Implicit body for math functions, use bodies property to get all bodies from implicit part.
bodyB (Body) – Implicit body for math functions, use bodies property to get all bodies from implicit part.
bodyC (Body) – Implicit body for math functions, use bodies property to get all bodies from implicit part.
- Returns:
The newly created ImplIf object.
- Return type:
ImplIf
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() implicit.name = "Implicit Part1" # Please note that implicit math operations can be performed only on # implicit bodies. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. one = implicit.constant(1) two = implicit.constant(2) three = implicit.constant(3) # ImplIf operation. implIf = implicit.implIf(one, two, three) # Updating implIf operation. with implicit.edit(): implIf.bodyA = implicit.constant(4) print("ImplIf operation has been performed on implicit constants.")
- min(bodyA, bodyB=None)#
Implicit min operation.
- Parameters:
bodyA (Body) – Implicit body for math functions, use bodies property to get all bodies from implicit part.
bodyB (Body) – Implicit body for math functions, use bodies property to get all bodies from implicit part.
- Returns:
The newly created Min object.
- Return type:
Min
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() implicit.name = "Implicit Part1" # Please note that implicit math operations can be performed only on # implicit bodies. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. one = implicit.constant(1) two = implicit.constant(2) # Min operation. min = implicit.min(one, two) # Updating min operation. with implicit.edit(): min.bodyA = implicit.constant(4) print("Min operation has been performed on implicit constants.")
- max(bodyA, bodyB=None)#
Implicit min operation.
- Parameters:
bodyA (Body) – Implicit body for math functions, use bodies property to get all bodies from implicit part.
bodyB (Body) – Implicit body for math functions, use bodies property to get all bodies from implicit part.
- Returns:
The newly created Max object.
- Return type:
Max
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() implicit.name = "Implicit Part1" # Please note that implicit math operations can be performed only on # implicit bodies. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. one = implicit.constant(1) two = implicit.constant(2) # Max operation. max = implicit.max(one, two) # Updating max operation. with implicit.edit(): max.bodyA = implicit.constant(4) print("Max operation has been performed on implicit constants.")
- step(bodyA, bodyB)#
Implicit step operation.
- Parameters:
bodyA (Body) – Implicit body for math functions, use bodies property to get all bodies from implicit part.
bodyB (Body) – Implicit body for math functions, use bodies property to get all bodies from implicit part.
- Returns:
The newly created Step object.
- Return type:
Step
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() implicit.name = "Implicit Part1" # Please note that implicit math operations can be performed only on # implicit bodies. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. one = implicit.constant(1) two = implicit.constant(2) # Step operation. step = implicit.step(one, two) # Updating step operation. with implicit.edit(): step.bodyA = implicit.constant(3) print("Step operation has been performed between two implicit constants.")
- sign(bodyA)#
Implicit sign operation.
- Parameters:
bodyA (Body) – Implicit body for math functions, use bodies property to get all bodies from implicit part.
- Returns:
The newly created Sign object.
- Return type:
Sign
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() implicit.name = "Implicit Part1" # Please note that implicit math operations can be performed only on # implicit bodies. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. one = implicit.constant(1) # Sign operation. sign = implicit.sign(one) # Updating sign operation. with implicit.edit(): sign.bodyA = implicit.constant(2) print("Sign operation has been performed on implicit constant.")
- sqrt(bodyA)#
Implicit sqrt operation.
- Parameters:
bodyA (Body) – Implicit body for math functions, use bodies property to get all bodies from implicit part.
- Returns:
The newly created Sqrt object.
- Return type:
Sqrt
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() implicit.name = "Implicit Part1" # Please note that implicit math operations can be performed only on # implicit bodies. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. four = implicit.constant(4) # Sqrt operation. sqrt = implicit.sqrt(four) # Updating sqrt operation. with implicit.edit(): sqrt.bodyA = implicit.constant(9) print("Sqrt operation has been performed on implicit constant.")
- constant(value)#
Implicit constant.
- Parameters:
value (float | str) – Constant value for implicit.
- Returns:
The newly created Constant object.
- Return type:
Constant
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() implicit.name = "Implicit Part1" # Please note that implicit math operations can be performed only on # implicit bodies. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. # Constant operation. constant = implicit.constant(1) # Updating constant operation. with implicit.edit(): constant.value = 0.5 print("Constant has been created.")
- fraction(bodyA)#
Implicit fraction operation.
- Parameters:
bodyA (Body) – Implicit body for math functions, use bodies property to get all bodies from implicit part.
- Returns:
The newly created Fraction object.
- Return type:
Fraction
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() implicit.name = "Implicit Part1" # Please note that implicit math operations can be performed only on # implicit bodies. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. value = implicit.constant(1.42) # Fraction operation. fraction = implicit.fraction(value) # Updating fraction operation. with implicit.edit(): fraction.bodyA = implicit.constant(1.55) print("Fraction operation has been performed on implicit constant.")
- pi()#
Implicit pi.
- Returns:
The newly created Pi object.
- Return type:
Pi
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() implicit.name = "Implicit Part1" # Please note that implicit math operations can be performed only on # implicit bodies. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. # Pi constant. pi = implicit.pi() print("Pi has been created.")
- e()#
Implicit Euler’s number(E).
- Returns:
The newly created E object.
- Return type:
E
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() implicit.name = "Implicit Part1" # Please note that implicit math operations can be performed only on # implicit bodies. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. # Euler's number. e = implicit.e() print("Euler's number has been created.")
- xRef()#
Implicit X Reference.
- Returns:
The newly created XRef object.
- Return type:
XRef
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() implicit.name = "Implicit Part1" # Please note that implicit math operations can be performed only on # implicit bodies. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. # XRef operation. xRef = implicit.xRef() print("XRef has been created.")
- yRef()#
Implicit Y Reference.
- Returns:
The newly created YRef object.
- Return type:
YRef
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() implicit.name = "Implicit Part1" # Please note that implicit math operations can be performed only on # implicit bodies. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. # YRef operation. yRef = implicit.yRef() print("YRef has been created.")
- zRef()#
Implicit Z Reference.
- Returns:
The newly created ZRef object.
- Return type:
ZRef
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() implicit.name = "Implicit Part1" # Please note that implicit math operations can be performed only on # implicit bodies. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. # ZRef operation. zRef = implicit.zRef() print("ZRef has been created.")
- addVector(bodyA, bodyB)#
Implicit Vector Add operation.
- Parameters:
bodyA (Body) – Implicit body for math operation, use bodies property to get all bodies from implicit part.
bodyB (Body) – Implicit body for math operation, use bodies property to get all bodies from implicit part.
- Returns:
The newly created AddVector object.
- Return type:
AddVector
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() implicit.name = "Implicit Part1" # Please note that implicit math operations can be performed only on # implicit bodies. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. one = implicit.constant(1) two = implicit.constant(2) # Add Vector operation. addVector = implicit.addVector(one, two) # Updating add vector operation. with implicit.edit(): addVector.bodyA = implicit.constant(3) print("Vector Add operation has been performed between two implicit constants.")
- create2D(bodyA, bodyB)#
Implicit 2D Vector creation.
- Parameters:
bodyA (Body) – Implicit body for math operation, use bodies property to get all bodies from implicit part.
bodyB (Body) – Implicit body for math operation, use bodies property to get all bodies from implicit part.
- Returns:
The newly created Create2D object.
- Return type:
Create2D
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() implicit.name = "Implicit Part1" # Please note that implicit math operations can be performed only on # implicit bodies. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. one = implicit.constant(1) two = implicit.constant(2) # Create 2D Vector operation. create2D = implicit.create2D(one, two) # Updating 2D Vector operation. with implicit.edit(): create2D.bodyA = implicit.constant(3) print("Create 2D Vector operation has been performed between two implicit constants.")
- create3D(bodyA, bodyB, bodyC)#
Implicit 3D Vector creation.
- Parameters:
bodyA (Body) – Implicit body for math operation, use bodies property to get all bodies from implicit part.
bodyB (Body) – Implicit body for math operation, use bodies property to get all bodies from implicit part.
bodyC (Body) – Implicit body for math operation, use bodies property to get all bodies from implicit part.
- Returns:
The newly created Create3D object.
- Return type:
Create3D
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() implicit.name = "Implicit Part1" # Please note that implicit math operations can be performed only on # implicit bodies. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. one = implicit.constant(1) two = implicit.constant(2) three = implicit.constant(3) # Create 3D Vector operation. create3D = implicit.create3D(one, two, three) # Updating 3D Vector operation. with implicit.edit(): create3D.bodyA = implicit.constant(4) print("Create 3D Vector operation has been performed between three implicit constants.")
- create4D(bodyA, bodyB, bodyC, bodyD)#
Implicit 3D Vector creation.
- Parameters:
bodyA (Body) – Implicit body for math operation, use bodies property to get all bodies from implicit part.
bodyB (Body) – Implicit body for math operation, use bodies property to get all bodies from implicit part.
bodyC (Body) – Implicit body for math operation, use bodies property to get all bodies from implicit part.
bodyD (Body) – Implicit body for math operation, use bodies property to get all bodies from implicit part.
- Returns:
The newly created Create4D object.
- Return type:
Create4D
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() implicit.name = "Implicit Part1" # Please note that implicit math operations can be performed only on # implicit bodies. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. one = implicit.constant(1) two = implicit.constant(2) three = implicit.constant(3) four = implicit.constant(4) # Create 4D Vector operation. create4D = implicit.create4D(one, two, three, four) # Updating 4D Vector operation. with implicit.edit(): create4D.bodyA = implicit.constant(5) print("Create 4D Vector operation has been performed between four implicit constants.")
- distance(bodyA, bodyB)#
Implicit Distance Vector creation.
- Parameters:
bodyA (Body) – Implicit body for math operation, use bodies property to get all bodies from implicit part.
bodyB (Body) – Implicit body for math operation, use bodies property to get all bodies from implicit part.
- Returns:
The newly created Distance object.
- Return type:
Distance
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() implicit.name = "Implicit Part1" # Please note that implicit math operations can be performed only on # implicit bodies. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. one = implicit.constant(1) two = implicit.constant(2) # Create Distance Vector operation. distance = implicit.distance(one, two) # Updating Distance Vector operation. with implicit.edit(): distance.bodyA = implicit.constant(3) print("Distance Vector operation has been performed between two implicit constants.")
- dot(bodyA, bodyB)#
Implicit Dot Vector creation.
- Parameters:
bodyA (Body) – Implicit body for math operation, use bodies property to get all bodies from implicit part.
bodyB (Body) – Implicit body for math operation, use bodies property to get all bodies from implicit part.
- Returns:
The newly created Dot object.
- Return type:
Dot
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() implicit.name = "Implicit Part1" # Please note that implicit math operations can be performed only on # implicit bodies. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. one = implicit.constant(1) two = implicit.constant(2) # Create Dot Vector operation. dot = implicit.dot(one, two) # Updating Dot Vector operation. with implicit.edit(): dot.bodyA = implicit.constant(3) print("Dot Vector operation has been performed between two implicit constants.")
- cross(bodyA, bodyB)#
Implicit Cross Vector creation.
- Parameters:
bodyA (Body) – Implicit body for math operation, use bodies property to get all bodies from implicit part.
bodyB (Body) – Implicit body for math operation, use bodies property to get all bodies from implicit part.
- Returns:
The newly created Cross object.
- Return type:
Cross
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() implicit.name = "Implicit Part1" # Please note that implicit math operations can be performed only on # implicit bodies. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. one = implicit.constant(1) two = implicit.constant(2) # Create Cross Vector operation. cross = implicit.cross(one, two) # Updating Cross Vector operation. with implicit.edit(): cross.bodyA = implicit.constant(3) print("Cross Vector operation has been performed between two implicit constants.")
- scale(bodyA, bodyB)#
Implicit Scale Vector creation.
- Parameters:
bodyA (Body) – Implicit body for math operation, use bodies property to get all bodies from implicit part.
bodyB (Body) – Implicit body for math operation, use bodies property to get all bodies from implicit part.
- Returns:
The newly created Scale object.
- Return type:
Scale
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() implicit.name = "Implicit Part1" # Please note that implicit math operations can be performed only on # implicit bodies. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. one = implicit.constant(1) two = implicit.constant(2) # Create Scale Vector operation. scale = implicit.scale(one, two) # Updating Scale Vector operation. with implicit.edit(): scale.bodyA = implicit.constant(3) print("Scale Vector operation has been performed between two implicit constants.")
- length(bodyA)#
Implicit Length Vector creation.
- Parameters:
bodyA (Body) – Implicit body for math operation, use bodies property to get all bodies from implicit part.
- Returns:
The newly created Length object.
- Return type:
Length
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() implicit.name = "Implicit Part1" # Please note that implicit math operations can be performed only on # implicit bodies. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. one = implicit.constant(1) # Create Length Vector operation. length = implicit.length(one) # Updating Scale Vector operation. with implicit.edit(): length.bodyA = implicit.constant(3) print("Length Vector operation has been performed on implicit constant.")
- normalize(bodyA)#
Implicit Normalize Vector creation.
- Parameters:
bodyA (Body) – Implicit body for math operation, use bodies property to get all bodies from implicit part.
- Returns:
The newly created Normalize object.
- Return type:
Normalize
Example
from hwx import inspire inspire.newModel() # Creating Implicit blank part. implicit = inspire.Implicit() implicit.name = "Implicit Part1" # Please note that implicit math operations can be performed only on # implicit bodies. # Note: It is visible in the model browser but no graphics in the viewer. # It can be only edited with python API not in GUI. one = implicit.constant(1) # Create Normalize Vector operation. normalize = implicit.normalize(one) # Updating Normalize Vector operation. with implicit.edit(): normalize.bodyA = implicit.constant(3) print("Normalize Vector operation has been performed on implicit constant.")
- vectorElement(bodyA, index)#
Implicit vector element creation.
- Parameters:
bodyA (Body) – Implicit body for math operation, use bodies property to get all bodies from implicit part.
index (int) – The index of the vector component to be returned.
- Returns:
The newly created VectorElement object.
- Return type:
VectorElement