Model.sort_midsurfaces#
- Model.sort_midsurfaces(mode)#
Sorts mid-surfaces from the “Middle Surface” component into other components.
All of the middle surfaces from the “Middle Surface” component are organized into new/existing components, based on the components from which each middle surface was created.
When creating new components for sorting, the new components are created a duplicates of the originals, and organized into the same parts, assemblies and includes as the originals.
- Parameters:
mode (int) –
0 - Create new components named Midsurface #nn, where #nn is an incremental number. The components are created based on the original components from which the middle surfaces were derived.
1 - Organize the middle surfaces into the original components from which they were derived.
2 - Create new components, replacing the first letter of the original component names with the prefix ~.
3 - Create new components, appending a suffix of ~ to the original component names.
4 - Create new components, incrementing the original component names.
Example#
Sort middle surfaces into original components#import hm import hm.entities as ent model = hm.Model() model.sort_midsurfaces(mode=1)