Model.linecreatenormaltogeom#
- Model.linecreatenormaltogeom(point_collection, geom_collection, mode)#
Creates straight segment lines from a given set of points or nodes normally to a given set of geometric entities. The segment is created for each pair of point and geometry.
- Parameters:
point_collection (Collection) – The collection containing the input point entities. Valid entities are nodes and points.
geom_collection (Collection) – The collection containing the geometry entities. Valid entities are lines, surfaces and solids.
mode (int) –
Flags that indicate different modes.
Bit values are used and the value is calculated as (Bit0 + 2*Bit1). Valid Bit options are:
Bit0
Parameter that specifies the behavior in ambiguous cases. Valid values are:
0 - For each pair of point and geometry, a single segment is created between the point and the closest geometry point. The segment must be normal to the geometry otherwise it is not created.
1 - For each pair of point and geometry, a single segment is created between the point and the closest geometry point. The segment does not have to be normal to the geometry.
Bit1
Parameter that specifies how line entities are organized into components. Valid values are:
0 - Line is created in the current component, which is the default value.
1 - Line is created in the original geometry component.
Show Bit value calculator
Radio Button Table Option Name Value Parameter that specifies the behavior in ambiguous cases (Bit0) Parameter that specifies how line entities are organized into components (Bit1) Calculated argument value: 0
Example#
Create a straight segment normally from node with ID 10 to surface with ID 21#import hm import hm.entities as ent model = hm.Model() model.linecreatenormaltogeom( point_collection=hm.Collection(model, ent.Node, [10]), geom_collection=hm.Collection(model, ent.Surface, [21]), mode=0, )