[docs]class_Constraint(FEAData):"""Initialises base Constraint object. Parameters ---------- name : str,optional Uniqe identifier. If not provided it is automatically generated. Set a name if you want a more human-readable input file. master : :class:`compas_fea2.model.NodesGroup` Goup of nodes that act as master. slave : :class:`compas_fea2.model.NodesGroup` Goup of nodes that act as slave. tol : float Constraint tolerance, distance limit between master and slave. Attributes ---------- name : str Uniqe identifier. If not provided it is automatically generated. Set a name if you want a more human-readable input file. master : :class:`compas_fea2.model.NodesGroup` Goup of nodes that act as master. slave : :class:`compas_fea2.model.NodesGroup` Goup of nodes that act as slave. tol : float Constraint tolerance, distance limit between master and slave. """def__init__(self,*,master,slave,tol=None,name=None,**kwargs):super(_Constraint,self).__init__(name,**kwargs)self._master=masterself._slave=slaveself._tol=tol@propertydefmaster(self):returnself._master@propertydefslave(self):returnself._slave@propertydeftol(self):returnself._tol
[docs]classTieConstraint(_Constraint):"""Tie constraint between two sets of nodes, elements or surfaces. Parameters ---------- name : str, optional Uniqe identifier. If not provided it is automatically generated. Set a name if you want a more human-readable input file. master : :class:`compas_fea2.model.NodesGroup` Goup of nodes that act as master. slave : :class:`compas_fea2.model.NodesGroup` Goup of nodes that act as slave. tol : float Constraint tolerance, distance limit between master and slave. Attributes ---------- name : str, optional Uniqe identifier. If not provided it is automatically generated. Set a name if you want a more human-readable input file. master : :class:`compas_fea2.model.NodesGroup` Goup of nodes that act as master. slave : :class:`compas_fea2.model.NodesGroup` Goup of nodes that act as slave. tol : float Constraint tolerance, distance limit between master and slave. """def__init__(self,*,master,slave,name=None,**kwargs):super(TieConstraint,self).__init__(master=master,slave=slave,name=name,**kwargs)
classPin3DConstraint(_Constraint):"""Pin constraint between two sets of nodes, elements or surfaces that allows all rotations and fixes all translations. Parameters ---------- name : str, optional Uniqe identifier. If not provided it is automatically generated. Set a name if you want a more human-readable input file. master : :class:`compas_fea2.model.NodesGroup` Goup of nodes that act as master. slave : :class:`compas_fea2.model.NodesGroup` Goup of nodes that act as slave. tol : float Constraint tolerance, distance limit between master and slave. Attributes ---------- master : :class:`compas_fea2.model.NodesGroup` Goup of nodes that act as master. slave : :class:`compas_fea2.model.NodesGroup` Goup of nodes that act as slave. tol : float Constraint tolerance, distance limit between master and slave. """passclassPin2DConstraint(_Constraint):"""Pin constraint between two sets of nodes, elements or surfaces that allows rotations about an axis and fixes all translations. Parameters ---------- name : str, optional Uniqe identifier. If not provided it is automatically generated. Set a name if you want a more human-readable input file. master : :class:`compas_fea2.model.NodesGroup` Goup of nodes that act as master. slave : :class:`compas_fea2.model.NodesGroup` Goup of nodes that act as slave. tol : float Constraint tolerance, distance limit between master and slave. axis : :class:`compas.geometry.Vector` Axis of rotation. Attributes ---------- name : str Uniqe identifier. If not provided it is automatically generated. Set a name if you want a more human-readable input file. master : :class:`compas_fea2.model.NodesGroup` Goup of nodes that act as master. slave : :class:`compas_fea2.model.NodesGroup` Goup of nodes that act as slave. tol : float Constraint tolerance, distance limit between master and slave. axis : :class:`compas.geometry.Vector` Axis of rotation. """def__init__(self,*,master,slave,tol,axis,name=None,**kwargs):super(SliderConstraint,self).__init__(master=master,slave=slave,tol=tol,name=name,**kwargs)self.axis=axisclassSliderConstraint(_Constraint):"""Slider constraint between two sets of nodes, elements or surfaces that allows translations on a plane about an axis and fixes all translations. """def__init__(self,*,master,slave,tol,plane,name=None,**kwargs):super(SliderConstraint,self).__init__(master=master,slave=slave,tol=tol,name=name,**kwargs)self.plane=plane