Model.geom_extrude#
- Model.geom_extrude(method, node_list=s_defaultEntityList, locations=hwDoubleList(), guide_list=s_defaultEntityList, vector=hwTriple(0.0, 0.0, 0.0), distance=0.0, frame='tangent', reverse_dir=False)#
Creates surfaces by extruding nodes or locations along guide lines or along a vector.
- Parameters:
method (hwString) –
The extrusion method. Valid values are:
along_line - Extrude nodes or locations along lines.
along_vector - Extrude nodes or locations along a vector
node_list (EntityList) – The list of entity objects representing the source nodes to extrude.
locations (hwDoubleList) – The list of x, y, z coordinates defining the source locations to extrude.
guide_list (EntityList) – The list of entity objects representing the guide lines. Valid for
method="along_line".vector (hwTriple) – The vector x, y, z components defining the extrusion direction. Valid for
method="along_vector".distance (double) – The extrusion distance. Valid for
method="along_vector".frame (hwString) – The extrusion frame. Valid values are fixed, tangent, and frenet. Valid for
method="along_line".reverse_dir (bool) – The flag to use the reverse direction. Valid for
method="along_line".
Example#
Extrude locations (-28.0 -61.0 -6.0), (23.0 -43.0 0.0), (73.0 -43.0 0.0) along vector (0.0 0.0 1.0) by distance 57.0#import hm import hm.entities as ent model = hm.Model() model.geom_extrude( method="along_vector", locations=[-28.0, -61.0, -6.0, 23.0, -43.0, 0.0, 73.0, -43.0, 0.0], vector=[0.0, 0.0, 1.0], distance=57.0 )
Extrude nodes ID 5, 6, 7, 8 along lines 10, 11, 12 without reversing the direction in tangent frame#import hm import hm.entities as ent model = hm.Model() model.geom_extrude( method="along_line", node_list=[ent.Node(model, id) for id in [5, 6, 7, 8]], guide_list=[ent.Line(model, id) for id in [10, 11, 12]], frame="tangent", reverse_dir=False )