Polyline#
- class ansys.aedt.core.modeler.cad.polylines.Polyline(primitives, src_object=None, position_list=None, segment_type=None, cover_surface=False, close_surface=False, name=None, matname=None, xsection_type=None, xsection_orient=None, xsection_width=1, xsection_topwidth=1, xsection_height=1, xsection_num_seg=0, xsection_bend_type=None, non_model=False)[source]#
Creates and manipulates a polyline.
The constructor for this class is intended to be called from the
ansys.aedt.core.modeler.cad.primitives.Primitives.create_polyline()
method. The documentation is provided there.The returned Polyline object exposes the methods for manipulating the polyline.
- Parameters:
- primitives
ansys.aedt.core.modeler.cad.primitives_3d.Primitives3D
Pointer to the parent Primitives object.
- src_object
optional
The default is
None
. If specified, all other arguments are ignored.- position_list
list
,optional
List of positions in the
[x, y, z]
format. The default isNone
. It is mandatory ifscr_object
is not specified.- segment_type
str
orPolylineSegment
orlist
,optional
Define the list of segment types. For a string,
"Line"
or"Arc"
is valid. Use a"PolylineSegment"
, for"Line"
,"Arc"
,"Spline"
, or"AngularArc"
. A list of segment types (str oransys.aedt.core.modeler.cad.primitives.PolylineSegment
) is valid for a compound polyline. The default isNone
.- cover_surfacebool,
optional
The default is
False
.- close_surfacebool,
optional
The default is
False
.- name
str
,optional
The default is
None
.- matname
str
,optional
Name of the material. The default is
None
.- xsection_type
str
,optional
Type of the cross-section. Options are
"Line"
,"Circle"
,"Rectangle"
, and"Isosceles Trapezoid"
. The default isNone
.- xsection_orient
str
,optional
Direction of the normal vector to the width of the cross-section. Options are
"X"
,"Y"
,"Z"
, and"Auto"
. The default isNone
.- xsection_width
float
orstr
,optional
Width or diameter of the cross-section for all types. The default is
1
.- xsection_topwidth
float
orstr
,optional
Top width of the cross-section for the type
"Isosceles Trapezoid"
only. The default is1
.- xsection_height
float
orstr
,optional
Height of the cross-section for the types
"Rectangle"
and"Isosceles Trapezoid"
only. The default is1
.- xsection_num_seg
int
,optional
Number of segments in the cross-section surface for the types
"Circle"
,"Rectangle"
and"Isosceles Trapezoid"
. The default is0
. The value must be0
or greater than2
.- xsection_bend_type
str
,optional
Type of the bend. The default is
None
, in which case the bend type is set to"Corner"
. For the type"Circle"
, the bend type should be set to"Curved"
.
- primitives
Methods
Polyline.chamfer
([vertices, edges, ...])Add a chamfer to the selected edges in 3D/vertices in 2D.
Clone a polyline object.
Delete the object.
Polyline.detach_faces
(faces)Section the object.
Polyline.duplicate_along_line
(vector[, ...])Duplicate the object along a line.
Polyline.duplicate_around_axis
(axis[, ...])Duplicate the object around the axis.
Polyline.edges_by_length
(length[, ...])Filter edges by length.
Polyline.export_image
([output_file])Export the current object to a specified file path.
Polyline.faces_by_area
(area[, area_filter, ...])Filter faces by area.
Polyline.fillet
([vertices, edges, radius, ...])Add a fillet to the selected edges in 3D/vertices in 2D.
Polyline.get_touching_faces
(assignment)Get the objects that touch one of the face center of each face of the object.
Object history.
Polyline.insert_segment
(points[, segment])Add a segment to an existing polyline.
Polyline.intersect
(assignment[, keep_originals])Intersect the active object with a given list.
Return only the face with the greatest area.
Return only the edge with the greatest length.
Polyline.mirror
(origin, vector[, duplicate])Mirror a selection.
Polyline.move
(vector)Move objects from a list.
Polyline.plot
([show])Plot model with PyVista.
Polyline.remove_point
(position[, tolerance])Remove a point from an existing polyline by position.
Polyline.remove_segments
(assignment)Remove a segment from an existing polyline by segment id.
Polyline.rotate
(axis[, angle, units])Rotate the selection.
Polyline.section
(plane[, create_new, ...])Section the object.
Polyline.set_crosssection_properties
([type, ...])Set the properties of an existing polyline object.
Return only the edge with the smallest length.
Return only the face with the smallest area.
Polyline.split
(plane[, sides])Split the active object.
Polyline.subtract
(tool_list[, keep_originals])Subtract one or more parts from the object.
Polyline.sweep_along_path
(sweep_object[, ...])Sweep the selection along a vector.
Polyline.sweep_along_vector
(sweep_vector[, ...])Sweep the selection along a vector.
Polyline.sweep_around_axis
(axis[, ...])Sweep around an axis.
Get the conductors of given object.
Polyline.unite
(assignment)Unite a list of objects with this object.
Polyline.wrap_sheet
(object_name[, imprinted])Execute the sheet wrapping around an object.
Attributes
Bottom edge in the X direction of the object.
Bottom edge in the Y direction of the object.
Bottom edge in the Z direction of the object.
Bottom face in the X direction of the object.
Bottom face in the X direction of the object.
Bottom face in the Z direction of the object.
Bounding box of a part.
Retrieve the dimension array of the bounding box.
Part color as a tuple of integer values for (Red, Green, Blue) color values.
Color tuple as a string in the format '(Red, Green, Blue)'.
Wireframe property of the part.
Information for each edge in the given part.
List of the
[x, y, z]
coordinates for the ending point in the polyline object in the object's coordinate system.Return only the face ids of the face closest to the bounding box.
Information for each face in the given part.
Return only the face ids of the faces touching the bounding box.
Group the object belongs to.
ID of the object.
Check for if the object is 3D.
Check if the object is a conductor.
Logger.
Object mass.
Material name of the object.
Part model or non-model property.
Name of the object as a string value.
Type of the object.
Object units.
Part coordinate system.
Polyline Points.
List of the segment types of the polyline.
Part solve inside flag.
List of the
[x, y, z]
coordinates for the starting point in the polyline object in the object's coordinate system.Surface material name of the object.
Top edge in the X direction of the object.
Top edge in the Y direction of the object.
Top edge in the Z direction of the object.
Top face in the X direction of the object.
Top face in the Y direction of the object.
Top face in the Z direction of the object.
Get the objects that touch a vertex, edge midpoint, or face of the object.
Part transparency as a value between 0.0 and 1.0.
Valid properties.
List of the
[x, y, z]
coordinates for all vertex positions in the polyline object in the object's coordinate system.Information for each vertex in the given part.
Object volume.