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

Class Primitive

object --+
         |
        Primitive
Known Subclasses:

Class that represents a general primitive.

Instance Methods [hide private]
 
__init__(self)
Initializes the Primitive instance object with a unique ID.
 
__neg__(self)
Returns a view onto the curve with reversed ordering.
 
__repr__(self)
repr(x)
 
collectPrimitiveBases(self)
Returns a list of primitives used to construct the primitive.
 
getDirectedID(self)
Returns the primitive ID where a negative sign means that reversed ordering is used.
 
getID(self)
Returns the primitive ID.
 
getUnderlyingPrimitive(self)
Returns the underlying primitive.
 
hasSameOrientation(self, other)
Returns True if other is the same primitive and has the same orientation, False otherwise.
 
isColocated(self, primitive)
Rreturns True if the two primitives are located at the same position.
 
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 object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

 

Initializes the Primitive instance object with a unique ID.

Overrides: object.__init__

__neg__(self)

 

Returns a view onto the curve with reversed ordering.

Note: This method is overwritten by subclasses.

__repr__(self)
(Representation operator)

 

repr(x)

Overrides: object.__repr__
(inherited documentation)

collectPrimitiveBases(self)

 

Returns a list of primitives used to construct the primitive. It may contain primitives twice.

Note: This method is overwritten by subclasses.

isColocated(self, primitive)

 

Rreturns True if the two primitives are located at the same position.

Note: This method is overwritten by subclasses.

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.

Note: This method is overwritten by subclasses.