
- Added RigidConstraint. - Depricated some methods (get_result, get_constrainedness) and added some new methods (get_solution, get_cluster, get_status). Removed old SelectionConstraint and renamed FunctionConstraint to SelectionConstraint Depricated ClusterSolver2D Small bugfixes in cluster ClusterSolver3D Renamed solvergui directory to workbench Renamed solvertest directory to test
15 lines
397 B
Python
15 lines
397 B
Python
class Singleton(object):
|
|
def __new__(type, *p, **k):
|
|
if not '_instance' in type.__dict__:
|
|
type._instance = object.__new__(type)
|
|
type._instance._isNew = True
|
|
else:
|
|
type._instance._isNew = False
|
|
return type._instance
|
|
|
|
class Borg:
|
|
__shared_state = {}
|
|
|
|
def __init__(self):
|
|
self.__dict__ = self.__shared_state
|