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

Class Point

   object --+    
            |    
    Primitive --+
                |
   object --+   |
            |   |
PrimitiveBase --+
                |
               Point

A three-dimensional point.

Instance Methods [hide private]
 
__init__(self, x=0.0, y=0.0, z=0.0, local_scale=1.0)
Creates a point with coordinates x, y, z with the local refinement factor local_scale.
 
__neg__(self)
Returns a view of the object with reverse orientation.
 
collectPrimitiveBases(self)
Returns primitives used to construct the primitive.
 
getCoordinates(self)
Returns the coodinates of the point as a numpy.ndarray object.
 
getLocalScale(self)
Returns the local refinement factor.
 
isColocated(self, primitive)
Returns True if the Point primitive is colocated (has the same coordinates) with self.
 
modifyBy(self, transformation)
Modifies the coordinates by applying the given transformation.
 
setCoordinates(self, x)
Sets the coodinates of the point from a numpy.ndarray object x.
 
setLocalScale(self, factor=1.0)
Sets the local refinement factor.
 
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

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, x=0.0, y=0.0, z=0.0, local_scale=1.0)
(Constructor)

 

Creates a point with coordinates x, y, z with the local refinement factor local_scale.

Overrides: object.__init__

__neg__(self)

 

Returns a view of the object with reverse orientation. As a point has no direction the object itself is returned.

Overrides: Primitive.__neg__

collectPrimitiveBases(self)

 

Returns primitives used to construct the primitive.

Overrides: Primitive.collectPrimitiveBases

isColocated(self, primitive)

 

Returns True if the Point primitive is colocated (has the same coordinates) with self. That is, if |self-primitive| <= tol * max(|self|,|primitive|).

Overrides: Primitive.isColocated

modifyBy(self, transformation)

 

Modifies the coordinates by applying the given transformation.

Overrides: PrimitiveBase.modifyBy

setLocalScale(self, factor=1.0)

 

Sets the local refinement factor.

Overrides: PrimitiveBase.setLocalScale

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