Advanced Joint

Advanced Joint

Class AdvJoint()

AdvJoint(parent='MODEL', name='AdvJoint_n', label='AdvJoint_n', active=True, type='PointToCurveJoint', 
b1=None, b2=None, origin=None, origin2=None, crv=None, crv1=None, crv2=None, surf=None, surf1=None, surf2=None, 
defcrv=None, defsurf=None, rm='Global_Frame', rm1='Global_Frame', rm2='Global_Frame', ic_use_icm=False, 
ic_use_icm1=True, ic_use_icm2=True, ic_use_xyz=False, ic_use_vel=False, ic_x_disp=0, ic_y_disp=0, ic_z_disp=0, 
ic_use_xyz1=False, ic_vel=0, ic_use_vel1=False, ic_x_disp1=0, ic_y_disp1=0, ic_z_disp1=0, ic_vel1=0, 
ic_use_xyz2=False, ic_use_vel2=False, ic_x_disp2=0, ic_y_disp2=0, ic_z_disp2=0, ic_vel2=0)

Create a PointToCurveJoint, CurveToCurveJoint, PointToSurfaceJoint, CurveToSurfaceJoint, SurfaceToSurfaceJoint, PointToDeformableCurveJoint, PointToDeformableSurfaceJoint.

Keyword Arguments

Argument Data Type Description Default
name String The variable name. AdvJoint_n, for next available integer n.
label String The descriptive label. AdvJoint_n, for next available integer n.
parent Object The parent. MODEL
active Boolean Used to activate or deactivate this entity. True
type Enum The type. One of: PointToCurveJoint, CurveToCurveJoint, PointToSurfaceJoint, CurveToSurfaceJoint, SurfaceToSurfaceJoint, PointToDeformableCurveJoint, PointToDeformableSurfaceJoint. PointToCurveJoint
b1 Body The first constrained body. None
b2 Body The second constrained body. None
origin Point The point on body one which is constrained to body two. None
origin2 Point The point. None
crv Curve The constrained curve when type is PointToCurveJoint. None
crv1 Curve The first constrained curve when type is CurveToCurveJoint. None
crv2 Curve The second constrained curve when type is CurveToCurveJoint. None
surf Surface The constrained surface when type is PointToSurfaceJoint. None
surf1 Surface The first constrained surface when type is SurfaceToSurfaceJoint. None
surf2 Surface The second constrained surface when type is SurfaceToSurfaceJoint. None
defcrv DeformableCurve The constrained deformable curve when type is PointToDeformableCurveJoint. None
defsurf DeformableSurface The constrained deformable surface when type is PointToDeformableSurfaceJoint. Defaults to None. * rm (Marker) - The reference marker for the curve and surface for type PointToCurveJoint or PointToSurfaceJoint respectively. Global_Frame
rm1 Marker The reference marker for first entity for type CurveToCurveJoint, CurveToSurfaceJoint or SurfaceToSurfaceJoint. Global_Frame
rm2 Marker The reference marker for second entity for type CurveToCurveJoint, CurveToSurfaceJoint or SurfaceToSurfaceJoint. Global_Frame
ic_use_icm Bool Use initial condition marker for curve and surface for type PointToCurveJoint or PointToSurfaceJoint respectively when True. If False, initial condition information is defined with respect to the reference marker. False
ic_use_icm1 Bool Use initial condition marker for first entity for type CurveToCurveJoint, CurveToSurfaceJoint or SurfaceToSurfaceJoint. when True. If False, initial condition information is defined with respect to the reference marker. True
ic_use_icm2 Bool Use initial condition marker for second entity for type CurveToCurveJoint, CurveToSurfaceJoint or SurfaceToSurfaceJoint when True. If False, initial condition information is defined with respect to the reference marker. True
ic_use_xyz Bool Denotes if the displacement initial conditions are to be used for the entity for type PointToCurveJoint or PointToSurfaceJoint. False
ic_use_vel Bool Denotes if the velocity initial conditions are to be used for the point for type PointToCurveJoint or PointToSurfaceJoint. False
ic_x_disp Double The value of the initial displacement of the contact point in the icm_1 x direction. 0
ic_y_disp Double The value of the initial displacement of the contact point in the icm_1 y direction. 0
ic_z_disp Double The value of the initial displacement of the contact point in the icm_1 z direction. 0
ic_vel Double The value of the initial velocity of point for type PointToCurveJoint or PointToSurfaceJoint. 0
ic_use_xyz1 Bool Denotes if the displacement initial conditions are to be used for the entity 1 for type CurveToCurveJoint, CurveToSurfaceJoint or SurfaceToSurfaceJoint. False
ic_use_vel1 Bool Denotes if the velocity initial conditions are to be used for the contact point o body1 for type CurveToCurveJoint. False
ic_x_disp1 Double The value of the initial displacement of the point of contact in the icm x direction on the curve for type CurveToCurveJoint, CurveToSurfaceJoint or SurfaceToSurfaceJoint. 0
ic_y_disp1 Double The value of the initial displacement of the point of contact in the icm y direction on the curve for type CurveToCurveJoint, CurveToSurfaceJoint or SurfaceToSurfaceJoint. 0
ic_z_disp1 Double The value of the initial displacement of the point of contact in the icm z direction on the curve for type CurveToCurveJoint, CurveToSurfaceJoint or SurfaceToSurfaceJoint. 0
ic_vel1 Double The value of the initial velocity of the point of contact on body 1. Applicable for type CurveToCurveJoint. 0
ic_use_xyz2 Bool Denotes if the displacement initial conditions are to be used for the contact point on body_2. False
ic_use_vel2 Bool Denotes if the velocity initial conditions are to be used for the contact point on body_2. False
ic_x_disp2 Double The value of the initial displacement of the point of contact in the icm x direction on the curve/surface for type CurveToCurveJoint, CurveToSurfaceJoint or SurfaceToSurfaceJoint. 0
ic_y_disp2 Double The value of the initial displacement of the point of contact in the icm y direction on the curve/surface for type CurveToCurveJoint, CurveToSurfaceJoint or SurfaceToSurfaceJoint. 0
ic_z_disp2 Double The value of the initial displacement of the point of contact in the icm z direction on the curve/surface for type CurveToCurveJoint, CurveToSurfaceJoint or SurfaceToSurfaceJoint. 0
ic_vel2 Double The value of the initial velocity of the point of contact on body 2. Applicable for type CurveToCurveJoint. 0

Instances

Instance Type Description
icm Marker Initial condition information is defined with respect to this marker when ic_use_icm is True. Applicable for type PointToCurveJoint or PointToSurfaceJoint.
icm1 Marker Initial condition information is defined with respect to this marker for first entity in the joint when ic_use_icm1 is True. Applicable for type CurveToCurveJoint, CurveToSurfaceJoint or SurfaceToSurfaceJoint.
icm2 Marker Initial condition information is defined with respect to this marker for second entity in the joint when ic_use_icm2 is True. Applicable for type CurveToCurveJoint, CurveToSurfaceJoint or SurfaceToSurfaceJoint.
i Marker The 'i' marker in the case of a compliant joint.
j Marker The 'j' marker in the case of a compliant joint.

Notes

1. The parent parameter can only be initialized by the constructor and should not be modified directly.

2. Only parent can be used as a positional argument in the constructor.

3. Instance is a reference to an entity. You cannot modify an instance, but can modify its properties.

Methods

getAssociatedGraphics()

Get all the graphics that are associated with this object.

Returns:

List of all graphic associated with this joint.

Return type:

(list)

Constraint Mate

Class ConstraintMate()

ConstraintMate(parent='MODEL', name='ConstraintMate_n', label='ConstraintMate_n', 
active=True, b1=None, b2=None, origin=None, origin2=None, type1='DISTANCE', type2='POINT', 
type3='POINT', distance=0, iradius=0, jradius=0, height=0, align_meth1='VECTOR', 
align_pt1=None, align_vec1=None, align_meth2='Point', align_pt2=None, align_vec2=None)

Creates a primitive geometry based general mating constraint.

Keyword Arguments

Argument Data Type Description Default
name String The variable name. ConstraintMate_n, for next available integer n.
label String The descriptive label. ConstraintMate_n, for next available integer n.
parent Object The parent. MODEL
active Bool Used to activate or deactivate this entity. True
b1 Body The first connecting body of the joint. None
b2 Body The second connecting body of the joint. None
origin Point Origin of geometry on the first body. None
origin2 Point Origin of geometry on the second body. None
type1 Enum One of DISTANCE, COINCIDENT or TANGENT. DISTANCE
type2 Enum One of POINT, SPHERE, LINE, CYLINDER or PLANE. POINT
type3 Enum One of POINT, SPHERE, LINE, CYLINDER, PLANE or CONE. POINT
distance Double The distance value. 0
iradius Double The radius of the CYLINDER of the first geometry 0
jradius Double The radius of the CYLINDER of the second geometry or the base radius of the CONE of the second geometry. 0
height Double The height of the CONE of the second geometry. 0
align_meth1 MultiRef One of POINT or VECTOR. * align_pt1 (Point) - Point defining orientation geometry at first location. None
align_vec1 Vector Vector defining orientation geometry at first location. None
align_meth2 MultiRef One of POINT or VECTOR. ‘Point'
align_pt2 Point Point defining orientation geometry at second location. None
align_vec2 Vector Vector defining orientation geometry at second location. None

Notes

1. The parent parameter can only be initialized by the constructor and should not be modified directly.

2. Only parent can be used as a positional argument in the constructor.

Methods

getAssociatedGraphics()

Get all the graphics that are associated with this object.

Returns:

List of all graphic associated with this joint.

Return type:

(list)

Constraint Mate Pair

Class ConstraintMatePair()

class ConstraintMatePair(parent='MODEL', name='ConstraintMatePair_n', 
label='ConstraintMatePair_n', active=True, sym='NONE')

ConstraintMate pair containing left and right instances of singles.

Keyword Arguments

Argument Data Type Description Default
name String The variable name. ConstraintMatePair_n, for next available integer n.
label String The descriptive label. ConstraintMatePair_n, for next available integer n.
parent Object The parent. MODEL
active Bool Defines if entity is activated when True or deactivated when False. True
sym Enum The symmetry of pair entity. Takes values 'LEFT' for left entity as leader, 'RIGHT' for right entity as leader, or 'NONE' when it is not symmetric. LEFT

Instances

Instance Type Description
l Point The left ConstraintMate.
r Point The right ConstraintMate.

Examples

========
Create an advanced joint and modify its attribute properties
>>> # Import mview module
>>> from hw import mview
>>> # Create Point for Advanced joint
>>> p1 = mview.Point(x = 0.0,y = 25.0,z = 0.0)
>>> # Create a body for Advanced joint
>>> b1 = mview.Body(name = "b_PTCV",usecm = True)
>>> b1.cg = p1
>>> # Create a Curve for PTCV joint
>>> c1 = mview.Curve(name = "c1",type = "3DCARTESIAN",x_type = "VALUE",y_type = "VALUE",z_type = "VALUE")
>>> c1.x_value = [0,10,20,30,40,50]
>>> c1.y_value = [25,30,35,40,45,50]
>>> c1.z_value = [0,0,0,0,0,0]
>>> # Create an Advanced joint of PTCV type
>>> adv1 = mview.AdvJoint(name = "adv1",type = "PointToCurveJoint")
>>> # Set a single attribute at a time
>>> adv1.origin = p1
>>> # Set multiple values at once
>>> adv1.setValues(b1 = b1,b2 = "adv1.rm.body")
>>> # Set other attributes of Advanced joint
>>> adv1.crv = c1
>>> adv1.rm = 'Global_Frame'
>>> # Create an Outline graphic for visualizing the PTCV joint
>>> o1 = mview.Outline(name = "visual",itype = "ADV_JOINT_CRV")
>>> o1.advjoint = aj_PTCV