FeaturePlanar (hwx.inspire)#
- class FeaturePlanar(*args)#
Bases:
FeatureArea
Features that are flat face.
They are not created through the API but can be retrieved from a part.
# Name
Type
property
# Name
Description
getNormal
(self, point=None)Returns vector perpendicular to face.
mirror
(entity, planeOrigin=None, planeNormal=None, keep=True)Mirrors part across a symmetry plane.
Example
from hwx import inspire model = inspire.newModel() block = model.createSolidBlock(location=(0, 0, 0)) inspire.orientView(direction="isometric") features = block.features faces = [x for x in features if isinstance(x, inspire.FeaturePlanar)] print("Block has " + str(len(faces)) + " faces") for face in faces: print("One face with center at: " + str(face.cg))
- property normal#
Returns vector perpendicular to face.
- getNormal(point=None)#
Returns vector perpendicular to face.
Point is ignored for FeaturePlanar.
- mirror(planeOrigin=None, planeNormal=None, keep=True)#
Mirrors part across a symmetry plane.
If entity is a Part, the planeOrigin and planeNormal need to be passed
- Parameters:
entity (Part | FeaturePlanar) – Part from which a mirror part needs to be created or a Planar feature which needs to be mirrored across the plane
planeOrigin (math.Point) – The origin of the symmetry plane.
planeNormal (math.Vector) – The normal of the symmetry plane.
keep (bool) – If True it keeps the original part, if False it removes it.
- Returns:
New mirrored part created.
- Return type: