FeatureArea (hwx.inspire)#

class FeatureArea(*args)#

Bases: Feature

Represents the surface or area of a part.

They are not created through the API but can be retrieved from a part.

Attribute Table#

Name

Type

area

property

Method Table#

Name

Description

deleteFaces (features)

Deletes the specified faces from the part.

draft (features, direction, neutralPlane, angle1=3.0, angle2=3.0, flipDrawDirection1=False, flipDrawDirection2=False)

Add draft to one or more faces of a part when designing a product that is

getConnectionPoints (self, uslices=2, vslices=2)

Returns a list of points that can be used to visualize how the feature

getCurvature (self, point)

Returns the directions and curvatures at the given point position

getNormal (self, point)

Return vector perpendicular to surface at a point.

isTouching (self, point)

Determines the point is on the surface or not.

isperiodic (self)

Returns True if it’s a periodic area, False otherwise.

partition (entity, thickness=’1 mm’, reverseDirection=False, minSize=0, maxSize=1)

Divides a solid part into design and non-design regions by selecting a

pushPull (feature, depth, newPart=False, resultType=None)

Pushes or pulls a face or an edge to a specified distance.

shell (feature, thickness=1)

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

simplifyHoles (entity, minSize=0, maxSize=None)

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

simplifyPlugs (entity, minSize=0, maxSize=None)

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

simplifyRounds (entity, roundType=’ALL’, minSize=0, maxSize=None)

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

property area#

Returns area of the surface.

getNormal(point)#

Return vector perpendicular to surface at a point.

Parameters:

point (Point) – Point position at which normal is computed.

getCurvature(point)#

Returns the directions and curvatures at the given point position

Parameters:

point (Point) – Point position at which directions and curvatures are computed.

getConnectionPoints(uslices=2, vslices=2)#

Returns a list of points that can be used to visualize how the feature is connected (spider points).

Parameters:
  • uslices (int) – Number of slices in u-direction.

  • vslices (int) – Number of slices in v-direction

Returns:

List of points that can be used to visualize

how the feature is connected.

Return type:

list[Point]

isTouching(point)#

Determines the point is on the surface or not.

Parameters:

point (Point) – Point positionin x, y, z coordinates.

isperiodic()#

Returns True if it’s a periodic area, False otherwise.

deleteFaces()#

Deletes the specified faces from the part.

Parameters:

features (list[Feature]) – Features to be removed.

draft(direction, neutralPlane, angle1=3.0, angle2=3.0, flipDrawDirection1=False, flipDrawDirection2=False)#
Add draft to one or more faces of a part when designing a product that is

manufactured using injection molding.

Parameters:
  • features (list[FeatureArea]) – Faces to Draft.

  • direction (str) – The Draft direction. Valid values are: SINGLE, BOTH and SYMMETRY.

  • neutralPlane (FeaturePlanar, Plane) – A reference plane or an existing face in the model. neutralPlane can not be same as draft feature.

  • angle1 (float) – The angle1 of draft.

  • angle2 (float) – The angle2 of draft. This is applicable for BOTH or SYMMETRY value for direction.

  • flipDrawDirection1 (bool) – If True, flips the draw direction of draft in single direction.

  • flipDrawDirection2 (bool) – If True, flips the draw direction of draft. Applicable for BOTH direction.

partition(thickness='1 mm', reverseDirection=False, minSize=0, maxSize=1)#

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

Parameters:
  • entity (Part | Assembly | [[Feature]]) – Part/Assembly from which you want to plug the holes or a feature to be partitioned. If it is a feature then it should be list of feature list, where the features in internal feature list are related to each other.

  • thickness (float) – The partition thickness consider in mm.

  • reverseDirection (bool) – Switch the direction of the offset for the partition.

  • minSize (float) – Minimum size of partition to find features.

  • maxSize (float) – Maximum size of partition to find features.

Returns:

New part created.

Return type:

Part

pushPull(depth, newPart=False, resultType=None)#

Pushes or pulls a face or an edge to a specified distance.

Parameters:
  • feature (FeatureArea) – Feature to push or pull.

  • depth (float | str) – The precise distance. A positive value extends, whereas a negative value contracts.

  • newPart (bool) – If True, creates a new Part as a result of pushPull operation.

  • resultType (str) – Result type of pushPull operation. This option is valid only for pushPull a sketch on face. - NEW_PART - ADD - REMOVE - REPLACE

Returns:

If New Part created, otherwise return None.

Return type:

Part

shell(thickness=1)#

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

Parameters:
  • feature (FeatureArea) – Feature to create a shelled part from.

  • thickness (float) – Shell thickness.

simplifyHoles(minSize=0, maxSize=None)#

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

Parameters:
  • entity (Part | Assembly | Feature) – Part/Assembly from which you want to remove the holes from or FeatureCircular which needs to be removed.

  • minSize (float) – Minimum size of hole.

  • maxSize (float) – Maximum size of hole.

simplifyPlugs(minSize=0, maxSize=None)#

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

Parameters:
  • entity (Part | Assembly | Feature) – Part/Assembly from which you want to plug the holes or a Circular feature that needs to be plugged.

  • minSize (float) – Minimum size of plug.

  • maxSize (float) – Maximum size of plug.

simplifyRounds(roundType='ALL', minSize=0, maxSize=None)#

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

Parameters:
  • entity (Part | Assembly | Feature) – Part/Assembly from which you want to remove the fillets, chamfers from or a Feature to be removed.

  • roundType (str) – Valid values are: ROUNDS, FILLETS, CHAMFERS and ALL.

  • minSize (float) – Minimum size of round.

  • maxSize (float) – Maximum size of round.