Model.features_advanced#
- Model.features_advanced(collection, feature_angle, type, break_angle, created_entity, smooth, IgnoreNormal=0, MergeSmallArea=0, MergeSmallAreaRatio=0, ElementSize=0)#
Generates plot elements between two-dimensional elements whose normals exceed the user-specified angle.
- Parameters:
collection (Collection) – The collection containing the input entities. Valid values are elements and components.
feature_angle (double) – The maximum angle allowed between any two plate elements before a plot element or a line is generated between the shared sides of the two elements.
type (int) –
0 - Simple
- 1 - Advanced. This creates features based on the recognition of natural
transitions between basic surfaces such as planes or cylinders, as well as features based on the feature angle. When using this option, a feature angle of 60 degrees or more is recommended.
2 - Connected
break_angle (double) – If
created_entity = 1, the angle specifying when to break the feature line created into multiple line segments. When the angle between adjoining elements along the feature is larger than the specified value, it splits the line into multiple segments.created_entity (int) –
0 - Creates plot elements to represent the features.
1 - Creates geometric lines representing feature lines.
smooth (int) –
0 - Do not smooth the lines.
1 - Smooth the line created through the nodes of the feature.
IgnoreNormal (int) –
- 0 - Create features if the angle between adjacent elements is greater than
feature_angle, but less than (PI-feature_angle).
1 - Do not create features based on normals.
MergeSmallArea (int) –
Used only when
typeis set to 1.0 - Do not merge small features.
1 - Merge features of two regions if their area ratio is less than
MergeSmallAreaRatio.MergeSmallAreaRatio (int) – The area ratio to use when MergeSmallArea is set to 1.
ElementSize (int) – nan
Example#
Create smooth lines representing features on the component hood based on 30.0 degrees feature angle and 20.0 degrees break angle#import hm import hm.entities as ent model = hm.Model() model.features_advanced( collection=hm.Collection(model, ent.Component, "name=hood"), feature_angle=30.0, type=1, break_angle=30.0, created_entity=1, smooth=1, MergeSmallArea=1, MergeSmallAreaRatio=0.5, ElementSize=2 )