Version: 8.3.0
Home
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages

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
 

Detailed Description

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.

Constructor & Destructor Documentation

def __init__ (   self,
  geompyD 
)

Member Function Documentation

def addSection (   self,
  theName,
  theType,
  theClosed,
  thePoints = None 
)

Add a new section to the polyline.

Parameters
theNamethe name
theTypethe 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).
theClosedTrue for closed section; False otherwise
thePointsthe 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.

Parameters
thePointsthe 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.

Parameters
theWorkingPlane- current Working Plane used for this 2D polyline
theNameObject 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.
Returns
New GEOM_Object, containing the created shape.

References Polyline2D.myClosedList, Polyline2D.myCoordsList, Polyline2D.myNameList, Polyline2D.myTypeList, and geomBuilder.RaiseIfFailed().

Field Documentation

geompyD
myNameList
myTypeList
myClosedList
myCoordsList