Model.nodecreateatintersection#
- Model.nodecreateatintersection(collection1, collection2, point_flag)#
Creates nodes or points at locations of intersection between two sets of input geometries. Only intersections between entities from different sets are calculated and are used to create nodes or points.
If there is overlap (continuous intersection) between the entities, the result is undefined. For example, finding the intersection of a surface edge to a parent surface is undefined and can return unexpected or varied results.
- Parameters:
collection1 (Collection) – The collection containing the first input entities. Valid entities are lines.
collection2 (Collection) – The collection containing the second input entities. Valid entities are lines, surfaces and solids.
point_flag (int) –
Parameter specifying whether nodes or points are created. Valid values are:
0 - Create nodes
1 - Create points
Examples#
Create nodes at the intersections between the line with ID 12 and the surface with ID 20#import hm import hm.entities as ent model = hm.Model() model.nodecreateatintersection( collection1=hm.Collection(model, ent.Line, [12]), collection2=hm.Collection(model, ent.Surface, [20]), point_flag=0, )
Create points at intersection between the lines with IDs 12 and 14#import hm import hm.entities as ent model = hm.Model() model.nodecreateatintersection( collection1=hm.Collection(model, ent.Line, [12]), collection2=hm.Collection(model, ent.Line, [14]), point_flag=1, )