Model.markprojecttoline#
- Model.markprojecttoline(collection, vector, projectlinelist, projectnodelist)#
Projects entities to the line.
- Parameters:
collection (Collection) – The collection containing the entities to project.
vector (hwTriple) – The vector along which the entities are projected.
projectlinelist (EntityList) – The list of line entities to which the entities in the
collectionare projected.projectnodelist (EntityList) – The list of node entities that are on the lines in the
projectlinelist. The nodes are used to trim the line during projection.
Example#
Project element entities to lines with ID 100 use the nodes of the projected line along the vector [ 1.0 , 1.0 , 0.0 ]#import hm import hm.entities as ent model = hm.Model() Collection = hm.Collection(model, ent.Node) vector = [1.0, 1.0, 0.0] Lines = [ent.Line(model, 100)] Filter = hm.FilterByCollection(ent.Node, ent.Line) Line_col = hm.Collection(Lines) Nodes = [n for n in hm.Collection(model, Filter, Line_col)] model.markprojecttoline( collection=Collection, vector=vector, projectlinelist=Lines, projectnodelist=Nodes )