Model.multi_surfs_lines_merge#
- Model.multi_surfs_lines_merge(surf_collection, line_collection, options, tolerance=0.0)#
This function takes input surfaces, finds intersections between them, creates trimming lines at the intersections, and equivalences the resulting surface edges; thus creating a topologically valid body from possibly overlapping surfaces.
Optionally, a set of lines specified
line_collectioncan be used to create additional edges on selected surfaces within proximity of those lines. The tolerance value is used to calculate proximity and equivalence between edges.- Parameters:
surf_collection (Collection) – The collection containing the input surfaces.
line_collection (Collection) – The collection containing the optional input line entities. If not required, reference an empty collection.
options (int) – Reserved for future development.
tolerance (double) – The proximity tolerance value. If not set, the value of global cleanup tolerance is used.
Examples#
Find intersections and merge surfaces with IDs 30 and 31 into a single body#import hm import hm.entities as ent model = hm.Model() model.multi_surfs_lines_merge( surf_collection=hm.Collection(model, ent.Surface, [30, 31]), line_collection=hm.Collection(model, ent.Line, populate=False), options=0, )
Find intersections and merge all displayed surfaces into a single body#import hm import hm.entities as ent model = hm.Model() model.multi_surfs_lines_merge( surf_collection=hm.CollectionByDisplayed(model, ent.Surface), line_collection=hm.Collection(model, ent.Line, populate=False), options=0, )
Trim the surface with ID 31 by free line with ID 9 use the value of 0.1 as a proximity tolerance#import hm import hm.entities as ent model = hm.Model() model.multi_surfs_lines_merge( surf_collection=hm.Collection(model, ent.Surface, [31]), line_collection=hm.Collection(model, ent.Line, [9]), options=0, tolerance=0.1 )