geosolver.clsolver3D
index
/home/rick/Programming/Python/GeoSolver/geosolver/clsolver3D.py

A generic 3D geometric constraint solver

 
Modules
       
math
re
sys
geosolver.vector

 
Classes
       
geosolver.clsolver.ClusterMethod(geosolver.multimethod.MultiMethod)
MergeAA
MergeADD
MergeDAD
MergeDDD
MergeDR
MergePR
MergeRR
MergeSD
MergeTTD
geosolver.clsolver.ClusterSolver(geosolver.notify.Notifier)
ClusterSolver3D

 
class ClusterSolver3D(geosolver.clsolver.ClusterSolver)
    A generic 3D geometric constraint solver. 
 
Finds a generic solution for problems formulated by cluster-constraints.
 
Constraints are Clusers: Rigids, Hedgehogs and Balloons. 
Cluster are added and removed using the add and remove methods. 
After adding each Cluster, the solver tries to merge it with
other clusters, resulting in new Clusters and Methods.
 
The generic solution is a directed acyclic graph of Clusters and Methods. 
Particilar problems and solutions are represented by a Configuration 
for each cluster. 
 
For each Cluster a set of Configurations can be set using the
set method. Configurations are propagated via Methods and can
be retrieved with the get method (also returning a set).
 
 
Method resolution order:
ClusterSolver3D
geosolver.clsolver.ClusterSolver
geosolver.notify.Notifier

Methods defined here:
__init__(self)
Instantiate a ClusterSolver3D

Methods inherited from geosolver.clsolver.ClusterSolver:
__str__(self)
add(self, cluster)
Add a cluster. 
 
arguments:
   cluster: A Rigid
angles(self)
get list of angles
balloons(self)
get list of balloons
contains(self, obj)
distances(self)
get list of distances
find_dependend(self, object)
Return a list of objects that depend on given object directly.
find_depends(self, object)
Return a list of objects that the given object depends on directly
get(self, cluster)
Return a set of configurations associated with a cluster
hedgehogs(self)
get list of hedgehogs
is_top_level(self, object)
methods(self)
get list of methods
remove(self, cluster)
Remove a cluster. 
All dependend objects are also removed.
rigids(self)
get list of rigids
set(self, cluster, configurations)
Associate a list of configurations with a cluster
set_root(self, rigid)
Make given rigid cluster the root cluster
 
arguments:
   cluster: A Rigid
top_level(self)
get top-level objects
variables(self)
get list of variables

Methods inherited from geosolver.notify.Notifier:
add_listener(self, listener)
add a listener to the list (and self to listers' list)
rem_listener(self, listener)
remove a listener from the list (and self from listers' list)
send_notify(self, message)
send a message to all listeners

 
class MergeAA(geosolver.clsolver.ClusterMethod)
    Derive a scalable from two angles
 
 
Method resolution order:
MergeAA
geosolver.clsolver.ClusterMethod
geosolver.multimethod.MultiMethod
geosolver.method.Method

Methods defined here:
__init__(self, map)
__str__(self)
multi_execute(self, inmap)

Static methods defined here:
pattern = _pattern()

Data and other attributes defined here:
patterngraph = <geosolver.graph.Graph instance at 0xb7d6730c>

Methods inherited from geosolver.clsolver.ClusterMethod:
prototype_constraints(self)
status_str(self)

Methods inherited from geosolver.multimethod.MultiMethod:
execute(self, inmap)
calls multi_execute for each permutation of multi-valued input variables and collects
result in multi-valued ouput variables. Subclasses should implement multi_execute.

Methods inherited from geosolver.method.Method:
inputs(self)
return a list of input variables
 
If an attribute '_inputs' has been defined, a new list
with the contents of that attribute will be returned. 
Subclasses may choose to initialise this variable or to 
override this function.
outputs(self)
return a list of output variables
 
If an attribute '_outputs' has been defined, a new list
with the contents of that attribute will be returned. 
Subclasses may choose to initialise this variable or to 
override this function.

 
class MergeADD(geosolver.clsolver.ClusterMethod)
    Represents a merging of three distances
 
 
Method resolution order:
MergeADD
geosolver.clsolver.ClusterMethod
geosolver.multimethod.MultiMethod
geosolver.method.Method

Methods defined here:
__init__(self, map)
__str__(self)
multi_execute(self, inmap)

Static methods defined here:
pattern = _pattern()

Data and other attributes defined here:
patterngraph = <geosolver.graph.Graph instance at 0xb7d6728c>

Methods inherited from geosolver.clsolver.ClusterMethod:
prototype_constraints(self)
status_str(self)

Methods inherited from geosolver.multimethod.MultiMethod:
execute(self, inmap)
calls multi_execute for each permutation of multi-valued input variables and collects
result in multi-valued ouput variables. Subclasses should implement multi_execute.

Methods inherited from geosolver.method.Method:
inputs(self)
return a list of input variables
 
If an attribute '_inputs' has been defined, a new list
with the contents of that attribute will be returned. 
Subclasses may choose to initialise this variable or to 
override this function.
outputs(self)
return a list of output variables
 
If an attribute '_outputs' has been defined, a new list
with the contents of that attribute will be returned. 
Subclasses may choose to initialise this variable or to 
override this function.

 
class MergeDAD(geosolver.clsolver.ClusterMethod)
    Represents a merging of three distances
 
 
Method resolution order:
MergeDAD
geosolver.clsolver.ClusterMethod
geosolver.multimethod.MultiMethod
geosolver.method.Method

Methods defined here:
__init__(self, map)
__str__(self)
multi_execute(self, inmap)

Static methods defined here:
pattern = _pattern()

Data and other attributes defined here:
patterngraph = <geosolver.graph.Graph instance at 0xb7d6720c>

Methods inherited from geosolver.clsolver.ClusterMethod:
prototype_constraints(self)
status_str(self)

Methods inherited from geosolver.multimethod.MultiMethod:
execute(self, inmap)
calls multi_execute for each permutation of multi-valued input variables and collects
result in multi-valued ouput variables. Subclasses should implement multi_execute.

Methods inherited from geosolver.method.Method:
inputs(self)
return a list of input variables
 
If an attribute '_inputs' has been defined, a new list
with the contents of that attribute will be returned. 
Subclasses may choose to initialise this variable or to 
override this function.
outputs(self)
return a list of output variables
 
If an attribute '_outputs' has been defined, a new list
with the contents of that attribute will be returned. 
Subclasses may choose to initialise this variable or to 
override this function.

 
class MergeDDD(geosolver.clsolver.ClusterMethod)
    Represents a merging of three distances
 
 
Method resolution order:
MergeDDD
geosolver.clsolver.ClusterMethod
geosolver.multimethod.MultiMethod
geosolver.method.Method

Methods defined here:
__init__(self, map)
__str__(self)
multi_execute(self, inmap)

Static methods defined here:
pattern = _pattern()

Data and other attributes defined here:
patterngraph = <geosolver.graph.Graph instance at 0xb7d6710c>

Methods inherited from geosolver.clsolver.ClusterMethod:
prototype_constraints(self)
status_str(self)

Methods inherited from geosolver.multimethod.MultiMethod:
execute(self, inmap)
calls multi_execute for each permutation of multi-valued input variables and collects
result in multi-valued ouput variables. Subclasses should implement multi_execute.

Methods inherited from geosolver.method.Method:
inputs(self)
return a list of input variables
 
If an attribute '_inputs' has been defined, a new list
with the contents of that attribute will be returned. 
Subclasses may choose to initialise this variable or to 
override this function.
outputs(self)
return a list of output variables
 
If an attribute '_outputs' has been defined, a new list
with the contents of that attribute will be returned. 
Subclasses may choose to initialise this variable or to 
override this function.

 
class MergeDR(geosolver.clsolver.ClusterMethod)
    Represents a merging of a distance (two-point cluster) with a rigid
The first cluster determines the orientation of the resulting cluster
 
 
Method resolution order:
MergeDR
geosolver.clsolver.ClusterMethod
geosolver.multimethod.MultiMethod
geosolver.method.Method

Methods defined here:
__init__(self, map)
__str__(self)
multi_execute(self, inmap)

Static methods defined here:
pattern = _pattern()

Data and other attributes defined here:
patterngraph = <geosolver.graph.Graph instance at 0xb7d5efec>

Methods inherited from geosolver.clsolver.ClusterMethod:
prototype_constraints(self)
status_str(self)

Methods inherited from geosolver.multimethod.MultiMethod:
execute(self, inmap)
calls multi_execute for each permutation of multi-valued input variables and collects
result in multi-valued ouput variables. Subclasses should implement multi_execute.

Methods inherited from geosolver.method.Method:
inputs(self)
return a list of input variables
 
If an attribute '_inputs' has been defined, a new list
with the contents of that attribute will be returned. 
Subclasses may choose to initialise this variable or to 
override this function.
outputs(self)
return a list of output variables
 
If an attribute '_outputs' has been defined, a new list
with the contents of that attribute will be returned. 
Subclasses may choose to initialise this variable or to 
override this function.

 
class MergePR(geosolver.clsolver.ClusterMethod)
    Represents a merging of a one-point cluster with any other rigid
The first cluster determines the orientation of the resulting cluster
 
 
Method resolution order:
MergePR
geosolver.clsolver.ClusterMethod
geosolver.multimethod.MultiMethod
geosolver.method.Method

Methods defined here:
__init__(self, map)
__str__(self)
multi_execute(self, inmap)

Static methods defined here:
pattern = _pattern()

Data and other attributes defined here:
patterngraph = <geosolver.graph.Graph instance at 0xb7d5ef2c>

Methods inherited from geosolver.clsolver.ClusterMethod:
prototype_constraints(self)
status_str(self)

Methods inherited from geosolver.multimethod.MultiMethod:
execute(self, inmap)
calls multi_execute for each permutation of multi-valued input variables and collects
result in multi-valued ouput variables. Subclasses should implement multi_execute.

Methods inherited from geosolver.method.Method:
inputs(self)
return a list of input variables
 
If an attribute '_inputs' has been defined, a new list
with the contents of that attribute will be returned. 
Subclasses may choose to initialise this variable or to 
override this function.
outputs(self)
return a list of output variables
 
If an attribute '_outputs' has been defined, a new list
with the contents of that attribute will be returned. 
Subclasses may choose to initialise this variable or to 
override this function.

 
class MergeRR(geosolver.clsolver.ClusterMethod)
    Represents a merging of two rigids sharing three points (overconstrained).
The first cluster determines the orientation of the resulting cluster
 
 
Method resolution order:
MergeRR
geosolver.clsolver.ClusterMethod
geosolver.multimethod.MultiMethod
geosolver.method.Method

Methods defined here:
__init__(self, map)
__str__(self)
multi_execute(self, inmap)

Static methods defined here:
pattern = _pattern()

Data and other attributes defined here:
patterngraph = <geosolver.graph.Graph instance at 0xb7d6708c>

Methods inherited from geosolver.clsolver.ClusterMethod:
prototype_constraints(self)
status_str(self)

Methods inherited from geosolver.multimethod.MultiMethod:
execute(self, inmap)
calls multi_execute for each permutation of multi-valued input variables and collects
result in multi-valued ouput variables. Subclasses should implement multi_execute.

Methods inherited from geosolver.method.Method:
inputs(self)
return a list of input variables
 
If an attribute '_inputs' has been defined, a new list
with the contents of that attribute will be returned. 
Subclasses may choose to initialise this variable or to 
override this function.
outputs(self)
return a list of output variables
 
If an attribute '_outputs' has been defined, a new list
with the contents of that attribute will be returned. 
Subclasses may choose to initialise this variable or to 
override this function.

 
class MergeSD(geosolver.clsolver.ClusterMethod)
    Derive a Rigid from a Scalabe and a Rigid sharing two points
 
 
Method resolution order:
MergeSD
geosolver.clsolver.ClusterMethod
geosolver.multimethod.MultiMethod
geosolver.method.Method

Methods defined here:
__init__(self, map)
__str__(self)
multi_execute(self, inmap)

Static methods defined here:
pattern = _pattern()

Data and other attributes defined here:
patterngraph = <geosolver.graph.Graph instance at 0xb7d6738c>

Methods inherited from geosolver.clsolver.ClusterMethod:
prototype_constraints(self)
status_str(self)

Methods inherited from geosolver.multimethod.MultiMethod:
execute(self, inmap)
calls multi_execute for each permutation of multi-valued input variables and collects
result in multi-valued ouput variables. Subclasses should implement multi_execute.

Methods inherited from geosolver.method.Method:
inputs(self)
return a list of input variables
 
If an attribute '_inputs' has been defined, a new list
with the contents of that attribute will be returned. 
Subclasses may choose to initialise this variable or to 
override this function.
outputs(self)
return a list of output variables
 
If an attribute '_outputs' has been defined, a new list
with the contents of that attribute will be returned. 
Subclasses may choose to initialise this variable or to 
override this function.

 
class MergeTTD(geosolver.clsolver.ClusterMethod)
    Represents a derive of a tetra from six distances
 
 
Method resolution order:
MergeTTD
geosolver.clsolver.ClusterMethod
geosolver.multimethod.MultiMethod
geosolver.method.Method

Methods defined here:
__init__(self, map)
__str__(self)
multi_execute(self, inmap)
prototype_constraints(self)

Static methods defined here:
pattern = _pattern()

Data and other attributes defined here:
patterngraph = <geosolver.graph.Graph instance at 0xb7d6718c>

Methods inherited from geosolver.clsolver.ClusterMethod:
status_str(self)

Methods inherited from geosolver.multimethod.MultiMethod:
execute(self, inmap)
calls multi_execute for each permutation of multi-valued input variables and collects
result in multi-valued ouput variables. Subclasses should implement multi_execute.

Methods inherited from geosolver.method.Method:
inputs(self)
return a list of input variables
 
If an attribute '_inputs' has been defined, a new list
with the contents of that attribute will be returned. 
Subclasses may choose to initialise this variable or to 
override this function.
outputs(self)
return a list of output variables
 
If an attribute '_outputs' has been defined, a new list
with the contents of that attribute will be returned. 
Subclasses may choose to initialise this variable or to 
override this function.

 
Functions
       
pattern2graph(pattern)
convert pattern to pattern graph
reference2graph(nlet)
convert nlet to reference graph
solve_3p3d(v1, v2, v3, v4, p1, p2, p3, d14, d24, d34)
returns a list of Configurations of v1,v2,v3 such that distance v1-v2=d12 etc.
v<x>: name of point variable
p<x>: numeric point position (vector)
d<xy>: numeric distance value
a<xyz>: numeric angle in radians
solve_ada_3D(a, b, c, a_cab, d_ab, a_abc)
returns a list of Configurations of v1,v2,v3 such that distance v1-v2=d12 etc.
v<x>: name of point variables
d<xy>: numeric distance values
a<xyz>: numeric angle in radians
solve_add_3D(a, b, c, a_cab, d_ab, d_bc)
returns a list of Configurations of v1,v2,v3 such that distance v1-v2=d12 etc.
v<x>: name of point variables
d<xy>: numeric distance values
a<xyz>: numeric angle in radians
solve_dad_3D(v1, v2, v3, d12, a123, d23)
returns a list of Configurations of v1,v2,v3 such that distance v1-v2=d12 etc.
v<x>: name of point variables
d<xy>: numeric distance values
a<xyz>: numeric angle in radians
solve_ddd_3D(v1, v2, v3, d12, d23, d31)
returns a list of Configurations of v1,v2,v3 such that distance v1-v2=d12 etc.
v<x>: name of point variables
d<xy>: numeric distance values
a<xyz>: numeric angle in radians

 
Data
        NegInf = geosolver.tolerance.NegInf
PosInf = geosolver.tolerance.PosInf
default_tol = 9.9999999999999995e-07
diag_selector = <_sre.SRE_Pattern object at 0xb7ec9b60>
diag_stream = <open file '<stdout>', mode 'w' at 0xb7eb3068>