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 Manifold1Ds 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.
 
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

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

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

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

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