Model.surfacecreatetangentfromedges#
- Model.surfacecreatetangentfromedges(collection, distance, extend_mode, component)#
Create surfaces extending in the tangent direction from the surfaces along selected edges. The new surfaces are created by dragging these surface edges along the tangent direction of the surfaces to which the main edges belong. The newly created surfaces and the original surfaces are tangent to each other along the input edges.
- Parameters:
collection (Collection) – The collection containing the surface edges entities to use.
distance (double) – The distance to extend the selected lines along the tangent direction.
extend_mode (int) –
0 - At the end of a chain of edges, the extension is done in the normal direction from the end edge
1 - The direction of the neighbor surface edge is followed to create the edge of the extension surface
Consider extending a triangular surface at one of its edges. When
extend_mode=0, the extension surface looks like a rectangle. But when 1, a trapezoidal extension surface is created, so that together with the original surface they form a bigger triangle.component (int) –
0 - New elements go to current component
1 - New elements go to input line(s) component(s)
Example#
Create surfaces extend tangently from edges with IDs 75 and 68 by a distance of 12.0 , with the new surfaces created in the same component as the input edges#import hm import hm.entities as ent model = hm.Model() model.surfacecreatetangentfromedges( collection=hm.Collection(model, ent.Line, [75, 68]), distance=12.0, extend_mode=0, component=1, )