Message 1 of 7
Create Rigid Joint in Assembly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I'm trying to create a rigid joint between two faces on two occurrences, using the centre point of each face. I understand you need a GeometryIntent object for each face, and the 'Intent' parameter specifies the position on the face - however I've tried using a Point object (and also a Point2D object) for the 'Intent' parameter with no success - it errors out on the CreateAssemblyJointDefinition.
In the code below - I've already got 2 FaceProxy objects, and a Point object on the centre of each face.
Can anyone point me in the right direction?
I know that joints are new in Inventor 2014, but it would probably be useful to have another example or two in the API help if possible.
Many thanks
' Note - oPoint1 and oPoint2 are the Point objects (X Y Z in assembly coordinates)
' Create an intent to the center of Face1proxy
Dim oFaceProxy1Intent As GeometryIntent oFaceProxy1Intent = oDef.CreateGeometryIntent(oFaceProxy1, oPoint1) ' Create an intent to the center of Face2proxy
Dim oFaceProxy2Intent As GeometryIntent oFaceProxy2Intent = oDef.CreateGeometryIntent(oFaceProxy2, oPoint2) ' Create two intents to define the geometry for the connection.
Dim intentOne As GeometryIntent intentOne = oDef.CreateGeometryIntent(oFaceProxy1, oFaceProxy1Intent) Dim intentTwo As GeometryIntent intentTwo = oDef.CreateGeometryIntent(oFaceProxy2, oFaceProxy2Intent) ' Create a rigid jont between the two parts.Dim jointDef As AssemblyJointDefinition jointDef = oDef.Joints.CreateAssemblyJointDefinition(AssemblyJointTypeEnum.kRigidJointType, intentOne, intentTwo) jointDef.FlipAlignmentDirection = False jointDef.FlipOriginDirection = False Dim Joint As AssemblyJoint Joint = oDef.Connections.Add(jointDef) ' Make the joint visible.
Joint.Visible = True