def calcDOF(self, _dofPos, _dofRot, _pointconstraints=[]): #AxialConstraint: # AxisAlignment() needs to know the axis normal to circle (stored in dep as refpoint and refAxisEnd) and the dofrot array # AxisDistance() needs to know the axis normal to circle (stored in dep as refpoint and refAxisEnd) and the dofpos array # LockRotation() need to know if LockRotation is True or False and the array dofrot tmpaxis = cleanAxis(create_Axis2Points(self.refPoint, self.refAxisEnd)) return _dofPos, AxisAlignment(tmpaxis, _dofRot)
def calcDOF(self, _dofPos, _dofRot, _pointconstraints=[]): #PlaneCoincident: # AxisAlignment() needs to know the axis normal to the plane constrained (stored in dep as refpoint and refAxisEnd) and the dofrot array # PlaneOffset() needs to know the axis normal to the plane constrained (stored in dep as refpoint and refAxisEnd) and the dofpos array tmpaxis = cleanAxis(create_Axis2Points(self.refPoint, self.refAxisEnd)) # the axis used on axisalignment isn't a real axis but a random axis normal to the plane #set it to length = 2 instead of normalize it pos = PlaneOffset(tmpaxis, _dofPos) tmpaxis.Direction.Length = 2.0 return pos, AxisAlignment(tmpaxis, _dofRot)
def calcDOF(self, _dofPos, _dofRot, _pointconstraints=[]): #function used to determine the dof lost due to this constraint #CircularEdgeConstraint: # AxisAlignment() needs to know the axis normal to circle (stored in dep as refpoint and refAxisEnd) and the dofrot array # AxisDistance() needs to know the axis normal to circle (stored in dep as refpoint and refAxisEnd) and the dofpos array # PlaneOffset() needs to know the axis normal to circle (stored in dep as refpoint and refAxisEnd) and the dofpos array # LockRotation() need to know if LockRotation is True or False and the array dofrot # # honestly speaking this would be simplified like this: # if LockRotation: # dofpos = [] # dofrot = [] # else: # dofpos = [] # dofrot = AxisAlignment(ConstraintAxis, dofrot) if self.lockRotation: return [], [] else: tmpaxis = cleanAxis(create_Axis2Points(self.refPoint,self.refAxisEnd)) return [], AxisAlignment(tmpaxis,_dofRot)
def calcDOF(self, _dofPos, _dofRot, _pointconstraints=[]): #PlanesParallelConstraint: # AxisAlignment() needs to know the axis normal to the plane constrained (stored in dep as refpoint and refAxisEnd) and the dofrot array tmpaxis = cleanAxis(create_Axis2Points(self.refPoint, self.refAxisEnd)) tmpaxis.Direction.Length = 2.0 return _dofPos, AxisAlignment(tmpaxis, _dofRot)