An interface to build a 2D polyline step-by-step. More...
Public Member Functions | |
| def | __init__ | 
| def | addSection | 
| Add a new section to the polyline.  More... | |
| def | addPoints | 
| Add a points to the last added section of the polyline.  More... | |
| def | result | 
| Obtain the 2D polyline result as a wire or a compound of wires in case of several sections defined.  More... | |
Data Fields | |
| geompyD | |
| myNameList | |
| myTypeList | |
| myClosedList | |
| myCoordsList | |
An interface to build a 2D polyline step-by-step.
The polyline can contain several sections. Each section represents a list of 2d points. As well it has a name, curve type, either polyline or interpolation (BSpline curve) and Closed flag. Use geompy.Polyline2D() method to obtain an instance of this class.
| def __init__ | ( | self, | |
| geompyD | |||
| ) | 
| def addSection | ( | self, | |
| theName, | |||
| theType, | |||
| theClosed, | |||
thePoints = None  | 
        |||
| ) | 
Add a new section to the polyline.
| theName | the name | 
| theType | the type. It can have either CORBA enumeration type GEOM.curve_type or a value of type long. Possible input values are: GEOM.Polyline(0) and GEOM.Interpolation(2). | 
| theClosed | True for closed section; False otherwise | 
| thePoints | the list of 2D points coordinates in the form: [x1, y1, x2, y2, ..., xN, yN] for N points. | 
References geomBuilder.EnumToLong().
| def addPoints | ( | self, | |
| thePoints | |||
| ) | 
Add a points to the last added section of the polyline.
If there are no sections in the polyline it does nothing.
| thePoints | the list of 2D points coordinates in the form: [x1, y1, x2, y2, ..., xN, yN] for N points. | 
References Polyline2D.myCoordsList, and Polyline2D.myNameList.
| def result | ( | self, | |
theWorkingPlane = [0,  | 
        |||
theName = None  | 
        |||
| ) | 
Obtain the 2D polyline result as a wire or a compound of wires in case of several sections defined.
| theWorkingPlane | - current Working Plane used for this 2D polyline | 
| theName | Object name; when specified, this parameter is used for result publication in the study. Otherwise, if automatic publication is switched on, default value is used for result name. | 
References Polyline2D.myClosedList, Polyline2D.myCoordsList, Polyline2D.myNameList, Polyline2D.myTypeList, and geomBuilder.RaiseIfFailed().
| geompyD | 
| myNameList | 
| myTypeList | 
| myClosedList | 
| myCoordsList |