Model.projectpointstoedges#
- Model.projectpointstoedges(edge_collection, point_collection, distance_tol, angle_tol)#
Create surface vertices by projecting the points onto the edges perpendicular to the edge.
- Parameters:
edge_collection (Collection) – The collection containing the edges entities to project to.
point_collection (Collection) – The collection containing the point entities to project.
distance_tol (double) – The maximum distance a point can be projected.
angle_tol (double) – The minimum angle between an existing vertex, the point being projected, and the projected point.
Example#
Add the surface vertices on edges with IDs 56 and 57 by project points with IDs 78 and 79 with a maximum distance of 0.5 and a minimum angle of 30.0#import hm import hm.entities as ent model = hm.Model() model.projectpointstoedges( edge_collection=hm.Collection(model, ent.Line, [56, 57]), point_collection=hm.Collection(model, ent.Point, [78, 79]), distance_tol=0.5, angle_tol=30.0, )
Note
Any selected edge, which is within the distance tolerance of any of the points, will have a vertex added at the projected point unless there is already another vertex on the edge that is within the angle tolerance. Therefore, if two points project to the same edge but are within the specified angle tolerance, then only one of the points will be added to that edge. It is not defined which point will be added.