Model.midsurface_merge_into_one_plate#
- Model.midsurface_merge_into_one_plate(collection, plate_type, use_base_surfaces, reserved)#
The function changes the plate information for every surface on the input mark by putting them all into a single plate. The plate component, for visualizing the newly created plate and containing copies of the original model’s surfaces, is also created if necessary. If the surfaces on the input mark previously had different plate attributes, their copies in the temporary plate components are deleted.
If the base surface information is set to be taken into account, the function will also do a preliminary check whether the given set of surfaces includes any base surfaces or not. If there is any base surface present and the intended merged plate type is “planar” or “sweep”, the function will not do anything.
- Parameters:
collection (Collection) – The collection containing the input surface entities.
plate_type (int) –
This parameter specifies the type of merged plate to create. Valid values are:
0 - Create plate of type “auto”
1 - Create plate of type “planar”
2 - Create plate of type “offset”
3 - Create plate of type “sweep”
use_base_surfaces (int) –
This specifies whether the user-defined base surfaces will be taken into account when displaying the plate information. Valid values are:
0 - Base surface information is not taken into account. There is no restriction as to which surfaces can be used to merge into a single plate.
1 - Base surface information is taken into account. If the input
collectioncontains a base-surface, the function will not do anything in cases when the intended plate type is planar or sweep.reserved (int) – Reserved for future use. Must be set to 0.
Example#
Merge the surfaces with ID 5 - 7 to form a single plate of type sweep , without include a check for the inputcollectionto contain base surfaces#import hm import hm.entities as ent model = hm.Model() surface_collection = hm.Collection(model, ent.Surface, [5, 6, 7]) model.midsurface_merge_into_one_plate( collection=surface_collection, plate_type=3, use_base_surfaces=0, reserved=0 )