Model.create_thin_solid_midline#
- Model.create_thin_solid_midline(solid_collection, node_collection=Collection(), point_collection=Collection(), plane_by_point_coords=hwDoubleList(), plane_base=hwDoubleList(), plane_normal=hwDoubleList(), dest_comp='midline')#
Constructs midline of a section cut through selected solids. The section cut plane can be defined using one of the following methods:
By three nodes/points/sets of coordinates
By four nodes/points/sets of coordinates defining the corners of a finite rectangle
By two sets of coordinates defining the base point and the normal vector of an infinite plane.
- Parameters:
solid_collection (Collection) – The collection containing the solid entities. The non-thin solids will be ignored.
node_collection (Collection) – The collection containing the node entities defining the cutting plane.
point_collection (Collection) – The collection containing the points entities defining the cutting plane.
plane_by_point_coords (hwDoubleList) – The value should be a list of coordinates that determine the infinite or finite cutting plane. The list should contain 9 real numbers (3 sets of xyz coordinates) or 12 numbers (4 sets of xyz coordinates).
plane_base (hwDoubleList) – The list containing coordinates of the base point defining the infinite cutting plane.
plane_normal (hwDoubleList) – The list containing coordinates of the normal vector defining the infinite cutting plane.
dest_comp (hwString) –
This option specifies which component the midlines will be created in:
current – Creates all midlines in the current component.
midline – Creates all midlines in a component with the name “midline” (default).
midline.# – Creates midlines in components with names “midline.1”, “midline.2”, and so on corresponding to the components containing the original solids.
original – Creates midline for each solid in the same component as the solid itself. If the solid lies in several components, the midline will be created in one of these.
original.# – Creates the midline for each solid in the component with the original component name suffixed with 1, 2, and so on.
within_comp_only – Do not equivalence between components.
to_connected_surfs - Equivalence between selected surfaces and surfaces connected to selection.
within_selection – Equivalence only within the subset of selected surfaces.
Examples#
Create midline of a section cut for solid with ID 131 determined by infinite plane pass through nodes with IDs 10 , 11 , 12#import hm import hm.entities as ent model = hm.Model() solidcollection = hm.Collection(model, ent.Solid, [131]) nodescollection = hm.Collection(model, ent.Node, [10, 11, 12]) model.create_thin_solid_midline( solid_collection=solidcollection, node_collection=nodescollection )
Create midline of a section cut for solid with ID 131 determined by finite rectangle with corners defined by nodes with IDs 10 , 11 , 12 , 13#import hm import hm.entities as ent model = hm.Model() solidcollection = hm.Collection(model, ent.Solid, [131]) nodescollection = hm.Collection(model, ent.Node, [10, 11, 12, 13]) model.create_thin_solid_midline( solid_collection=solidcollection, node_collection=nodescollection )
Create midline of a section cut for solid with ID 131 determined by infinite plane with a base point with coordinates ( 1.2 , 3.4 , 5.6 ) and a normal with coordinates ( 7.0 , 8.0 , 9.0 )#import hm import hm.entities as ent model = hm.Model() solidcollection = hm.Collection(model, ent.Solid, [131]) model.create_thin_solid_midline( solid_collection=solidcollection, plane_base=[1.2, 3.4, 5.6], plane_normal=[7.0, 8.0, 9.0], )
Create midline of a section cut for solid with ID 131 determined by infinite plane pass through 3 points with coordinates ( 1.0 , 2.0 , 3.0 ) , ( 4.0 , 5.0 , 6.0 ) and ( 7.0 , 8.0 , 9.0 )#import hm import hm.entities as ent model = hm.Model() solidcollection = hm.Collection(model, ent.Solid, [131]) model.create_thin_solid_midline( solid_collection=solidcollection, plane_by_point_coords=[1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0], )
Create midline of a section cut for solid with ID 131 determined by finite rectangle with coordinates ( 0.0 , 0.0 , 3.0 ) , ( 0.0 , 1.0 , 3.0 ) , ( 1.0 , 0.0 , 3.0 ) and ( 1.0 , 1.0 , 3.0 )#import hm import hm.entities as ent model = hm.Model() solidcollection = hm.Collection(model, ent.Solid, [131]) model.create_thin_solid_midline( solid_collection=solidcollection, plane_by_point_coords=[0.0, 0.0, 3.0, 0.0, 1.0, 3.0, 1.0, 0.0, 3.0, 1.0, 1.0, 3.0], )