Hello CATIA users,
I work with a product which is made from a few parts. Lately, I've been struggling with this problem of defining the position and orientation of the all the parts' absolute frame with reference to each other. Let me explain...
What I would like to do is, for example, finding the distance and orientation of the AbsoluteAxis of part1 with refence to AbsoluteAxis of part2.
Basically, I've been looking a lot on the web for that, but I couldn't find anything. I also tried this, in a product context:
Set AbsAxis = ObjPart.Bodies.Item(1).Sketches.Item(1).AbsoluteAxis
Set line2D1 = AbsAxis.HorizontalReference
Set line2D2 = AbsAxis.VerticalReference
Set AbsOrigin = AbsAxis.Origin
Set AbsOrigin2 = AbsOrigin
Set line2D12 = line2D1
Set line2D22 = line2D22
Dim OriginCoord(1)
Dim LineDirection(1)
AbsOrigin2.GetCoordinates OriginCoord
line2D12.GetDirection LineDirection
But the coordinates will always be zero for all the parts... Does anyone of you have an idea how to solve this problem?
I work with a product which is made from a few parts. Lately, I've been struggling with this problem of defining the position and orientation of the all the parts' absolute frame with reference to each other. Let me explain...
What I would like to do is, for example, finding the distance and orientation of the AbsoluteAxis of part1 with refence to AbsoluteAxis of part2.
Basically, I've been looking a lot on the web for that, but I couldn't find anything. I also tried this, in a product context:
Set AbsAxis = ObjPart.Bodies.Item(1).Sketches.Item(1).AbsoluteAxis
Set line2D1 = AbsAxis.HorizontalReference
Set line2D2 = AbsAxis.VerticalReference
Set AbsOrigin = AbsAxis.Origin
Set AbsOrigin2 = AbsOrigin
Set line2D12 = line2D1
Set line2D22 = line2D22
Dim OriginCoord(1)
Dim LineDirection(1)
AbsOrigin2.GetCoordinates OriginCoord
line2D12.GetDirection LineDirection
But the coordinates will always be zero for all the parts... Does anyone of you have an idea how to solve this problem?