Model.surfacemarksplitwithline#
- Model.surfacemarksplitwithline(collection, line_entity, vector, trim_flag, distance)#
Splits a collection of surfaces with a line swept along a vector.
- Parameters:
collection (Collection) – The collection containing the surface entities to split.
line_entity (Entity) – The line entity used for splitting.
vector (hwTriple) – The hwTriple object defining the vector components to use for split direction. User can also supply a Python list of three doubles.
trim_flag (int) –
0 - The line is swept using the distance value.
1 - The line is swept through the entire surface.
distance (double) – The distance to sweep, if
trim_flag=0.
Example#
Split surfaces with IDs 10 and 20 by sweeping line with ID 11 along the z - axis#import hm import hm.entities as ent model = hm.Model() model.surfacemarksplitwithline( collection=hm.Collection(model, ent.Surface, [10, 20]), line_entity=ent.Line(model, 11), vector=[0.0, 0.0, 1.0], trim_flag=1, distance=0.0, )