Operations

Public Methods

pushPull(feature, depth)

Push or Pulls a face or edge to specific depth.

param feature:Feature to push or pull.
type feature:FeatureArea
param depth:Push or Pull distance.
type depth:float
extract(feature)

Extracts geometry features and transfer them into a new part.

param feature:Feature to be extracted.
type feature:Feature
mirror(entity, planeOrigin=None, planeNormal=None, keep=True)

Mirrors part across a symmetry plane.

User needs to provide the planeOrigin and planeNormal if passing in a Part for mirror.

param entity:Part from which a mirror part needs to be created or a Planar feature which needs to be mirrored across the plane
type entity:Part, FeaturePlanar
param planeOrigin:
 origin of the symmetry plane.
type planeOrigin:
 Triple
param planeNormal:
 normal of the symmetry plane.
type planeNormal:
 Triple
param keep:True to keep the original part, False remove it.
type keep:Bool
returns:New mirrored part created.
rtype:Part
patch(feature)

Creates patches to fill in specified missing surfaces.

param feature:Feature to be patched.
type feature:Feature
deleteFaces(feature)

Deletes the specified face from the part.

param feature:Feature to be removed.
type feature:Feature
move(part, position)

Translates and/or rotates a part.

param part:The part to move.
type part:Part
param position:The position to move the part at.
type position:Matrix44
rotate(part, axis, angle, degrees=True)

Rotates around the specified axis.

This is a body rotation.

param part:The part to rotate.
type part:Part
param axis:The rotation axis. Valid choices are “x”, “y”, “z” or any Vector.
type axis:Union[Vector, str]
param angle:The rotation angle.
type angle:float
param degrees:Determines if angles is in degrees or not.
type degrees:bool
scale(part, value=1.1)

Resizes the part to the specified scale value.

This is useful when working with an imported model that is associated with a different default unit system.

param part:Part that needs to be scaled.
type part:Part
param value:Specify scale factor.
type value:float
booleanCombine(part, others)

Combines the specified part with others.

param part:Part to be combined with the other part.
type part:Part
param others:Part or parts for boolean combine operation.
type others:Part
returns:The combined part.
rtype:Part
booleanSubtract(part, others, deleteOthers=True)

Carves out one set of solid objects from another set of solid objects.

param part:Part to be subtracted with the other part.
type part:Part
param others:Part or parts for boolean subtract operation.
type others:list[Part]
param deleteOthers:
 Specify to delete others.
type deleteOthers:
 bool
returns:The remaining part.
rtype:Part
booleanIntersect(part, others, deleteOthers=True, deleteTarget=True)

Retains only the intersecting portions of two sets of solid objects.

param part:Part to be intersected with the other part.
type part:Part
param others:Part or parts for boolean intersect operation.
type others:list[Part]
param deleteOthers:
 Specify to delete others.
type deleteOthers:
 bool
param deleteTarget:
 Specify to delete target.
type deleteTarget:
 bool
returns:The intersected part.
rtype:Part
slice(entity, cutOrigin=None, cutNormal=None)

Slices a set of solid objects with a cutting plane.

User needs to provide the cutOrigin and cutNormal if passing in a Part for slice, or else if its a feature then cutOrigin needs to be specified

param entity:Part from which a sliced part needs to be created or a Planar feature which needs to be sliced across the cutting plane.
type entity:Part, Feature
param planeOrigin:
 origin of the cutting plane.
type planeOrigin:
 Triple
param planeNormal:
 normal of the cutting plane.
type planeNormal:
 Triple
param keep:True to keep the original part, False remove it.
type keep:Bool
returns:New sliced part created.
rtype:Part
simplifyImprints(entity)

Finds and remove imprints from a part.

An imprint is an edge or a point that appears on a surface that can be removed without changing the underlying integrity of the surface, such as scratches or trimmed points.

param entity:Part from which you want to remove the Imprints from or FeatureLinear imprint to be removed.
type entity:Part, FeatureLinear
simplifyRounds(entity)

Finds and removes both round (convex) and fillet (concave) surfaces from a part.

param entity:Part from which you want to remove the Fillets, Chamfers from or a Feature to be removed.
type entity:Part, Feature
simplifyHoles(entity)

Finds and removes holes and pockets, and find raised areas such as lettering.

param entity:Part from which you want to remove the Holes from or FeatureCircular which needs to be removed.
type entity:Part, Feature
simplifyPlugs(entity)

Finds holes and pockets, and plug them by filling the area with a new part

param entity:Part from which you want to plug the holes or a Circular feature that needs to be plugged.
type entity:Part, Feature
partition(feature, thickness='1 mm', substractFromTarget=False)

Divides a solid part into design and non-design regions by selecting a hole, pocket, or face to offset.

param feature:feature to be partitioned.
type feature:Feature
param thickness:
 partition thickness consider in mm.
type thickness:float
param substractFromTarget:
 Remove the original feature from the part and then create a partition. Defaults to False,
type substractFromTarget:
 bool
midSurface(part, surfaceOptions='Mid')

Extracts a midsurface or side faces from thin solids, and determine where surfaces are represented.

Replacing parts with midsurfaces yields better results while increasing speed when running an analysis or optimization.

param part:part which needs midsurface extraction.
type part:Part
param surfaceOptions:
 side options allows you to extract the Mid, Left or Right surface of the part.
type surfaceOptions:
 str
fillet(feature, radius='3 mm')

Creates fillet on a Linear/Planar feature.

param feature:feature that needs to be fillet.
type feature:Feature
param radius:Radius of the fillet in string format.
type radius:str
chamferByAngle(feature, angle='45 deg', dist='3 mm')

Creates chamfer on a Linear/Planar feature.

param feature:Feature that needs to be chamfer.
type feature:Feature
param angle:Chamfer angle from the edge in string format.
type angle:str
param dist:Chamfer distance from the edge in string format.
type dist:str
chamferByDistance(feature, dist1='3 mm', dist2='3 mm')

Creates chamfer on a linear or planar feature.

param feature:Feature that needs to be chamfer.
type feature:Feature
param dist1:Chamfer distance from the edge.
type dist1:str
param dist2:Chamfer distance from the edge.
type dist2:str
shell(feature, thickness=1)

Removes material and create thin walls to generate a shelled part.

param feature:Feature to create a shelled part from.
type feature:FeatureArea
param thickness:
 Shell thickness consider in mm.
type thickness:float
projection(feature, parts, extendEdges=True)

Creates projection of a feature from one part to another part.

param feature:Feature that needs to be projected on Part.
type feature:Feature
param parts:Parts on which feature projection to be.
type parts:list[Part]
param extendEdges:
 If True, extends the edge.
type extendEdges:
 bool