Package esys :: Package pycad :: Module primitives :: Class CurveLoop
[hide private]
[frames] | no frames]

Class CurveLoop

   object --+    
            |    
    Primitive --+
                |
   object --+   |
            |   |
PrimitiveBase --+
                |
               CurveLoop

An oriented loop of one-dimensional manifolds (= curves and arcs).

The loop must be closed and the Manifold1D s should be oriented consistently.

Instance Methods [hide private]
 
__init__(self, *curves)
Creates a polygon from a list of line curves.
 
__len__(self)
Returns the number of curves in the CurveLoop.
 
__neg__(self)
Returns a view onto the curve with reversed ordering.
 
collectPrimitiveBases(self)
Returns primitives used to construct the CurveLoop.
 
getCurves(self)
Returns the curves defining the CurveLoop.
 
getPolygon(self)
Returns a list of start/end points of the 1D mainfold form the loop.
 
isColocated(self, primitive)
Returns True if each curve is colocated with a curve in primitive.
 
substitute(self, sub_dict)
Returns a copy of self with substitutes for the primitives used to construct it given by the dictionary sub_dict.

Inherited from Primitive: __repr__, getDirectedID, getID, getUnderlyingPrimitive, hasSameOrientation, isReversed

Inherited from PrimitiveBase: __add__, __cmp__, __eq__, __hash__, __iadd__, __imul__, __isub__, __lt__, __rmul__, __sub__, apply, copy, getConstructionPoints, getPrimitives, modifyBy, setLocalScale

Inherited from object: __delattr__, __format__, __getattribute__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, *curves)
(Constructor)

 
Creates a polygon from a list of line curves. The curves must form a closed loop.
Overrides: object.__init__

__neg__(self)

 
Returns a view onto the curve with reversed ordering.
Overrides: Primitive.__neg__

collectPrimitiveBases(self)

 
Returns primitives used to construct the CurveLoop.
Overrides: Primitive.collectPrimitiveBases

getPolygon(self)

 
Returns a list of start/end points of the 1D mainfold form the loop. If not closed and exception is thrown.

isColocated(self, primitive)

 
Returns True if each curve is colocated with a curve in primitive.
Overrides: Primitive.isColocated

substitute(self, sub_dict)

 
Returns a copy of self with substitutes for the primitives used to construct it given by the dictionary sub_dict. If a substitute for the object is given by sub_dict the value is returned, otherwise a new instance with substituted arguments is returned.
Overrides: Primitive.substitute