Model.surface_patch#
- Model.surface_patch(line_collection, tangency='nontangent', stitch=True, solid_stitch=True, dest_component='original')#
Creates surfaces using selected lines. The input lines are grouped into sets of connected lines. One surface is created for each set. For the remaining lines that do not form a closed loop, the function tries to create a single surface. If some of the input lines are surface edges, tangency option can be used to control the tangency of the new surface to its neighboring surfaces.
- Parameters:
line_collection (Collection) – The collection containing the input line entities.
tangency (hwString) –
Controls tangency to the neighboring surfaces if the input lines contain surface edges:
best_fit - The tangency condition is determined automatically for each surface depending on the neighbor surface positions.
tangent - New surfaces are made tangent to the neighbor surface at their boundary.
nontangent - Tangency constraint is not imposed on the creation of new surfaces. (default)
stitch (bool) –
Controls whether new surfaces are stitched to their neighboring surfaces:
False- Surfaces are not stitched.True- Surfaces are stitched. (default)solid_stitch (bool) –
Controls whether new surfaces can be stitched to a solid surface. This option is valid only for stitch set to 1.
False- Surfaces are stitched to solids.True- Surfaces are stitched. (default)dest_component (hwString) –
Specifies the destination component of the new surfaces:
original - Surfaces are created in the dominant component of their boundary lines. (default)
current - All surfaces are created in the current component.
Example#
Create surfaces from bound lines with IDs 3, 4, 5, 6, 8, 9, 10 tangent to the neighbor surfaces and stitches to other surfaces, but if the neighbor surface belongs to a solid, do not stitch#import hm import hm.entities as ent model = hm.Model() model.surface_patch( line_collection=hm.Collection(model, ent.Line, [3, 4, 5, 6, 8, 9, 10]), tangency="tangent", solid_stitch=False, dest_component="current", )