Model.surfacemarksplitwithlines#
- Model.surfacemarksplitwithlines(surf_collection, line_collection, vector, trim_flag, distance)#
Changes the number of lines used to display an existing surface.
- Parameters:
surf_collection (Collection) – The collection containing the surface entities to split.
line_collection (Collection) – The collection containing the line entities used for splitting.
vector (hwTriple) – The hwTriple object defining the vector components for the split direction. User can also supply a Python list of three doubles.
trim_flag (int) –
Bit value defining the trim options (Bit0 + 2*Bit1 + 4*Bit2 + 8*Bit3). Valid Bit options are:
Bit0
Sweep by using the distance value or through the entire surface. Valid values are:
0 - Sweep using the distance value
1 - Sweep through the entire surface
Bit1
Project by using vectoor_id. Valid values are:
0 - Project using vector_id in both directions
1 - Project using vector_id only in vector direction
Bit2
Project by using vector_id or project normal. Valid values are:
0 - Project using vector_id if provided and non-zero length
1 - Project normal
Bit3
Create fixed points at line ends. Valid values are:
0 - Do not create fixed points at line ends
1 - Create fixed points at line ends
Show Bit value calculator
Radio Button Table Option Name Value Sweep by using the distance value or through the entire surface (Bit0) Project by using vectoor_id (Bit1) Project by using vector_id or project normal (Bit2) Create fixed points at line ends (Bit3) Calculated argument value: 0 distance (double) – The distance to sweep, if
trim_flag=0.
Example#
Trim the surfaces with IDs 15 and 16 with all displayed lines along the z direction , use a max distance of 0.5#import hm import hm.entities as ent model = hm.Model() model.surfacemarksplitwithlines( surf_collection=hm.Collection(model, ent.Surface, [15, 16]), line_collection=hm.CollectionByDisplayed(model, ent.Line), vector=[0.0, 0.0, 1.0], trim_flag=0, distance=0.5, )