biw01
Automotive
- Dec 31, 2011
- 152
Hello Everyone,
I have created a Local Co-ordinate System (LCS) in the Work part / Displayed part, on one of the Hole Center points. I need to get all the other hole center points (X,Y,Z) data with respect to this newly created Co-ordinate System.
Please refer to the image below.
How can I convert the point (X,Y,Z) values to the new co-ordinate system ?
I tried using both these function but it is not working, as it does not take as input the LCS that I have created in the part.
Function Abs2WCS(ByVal inPt As Point3d) As Point3d
Dim pt1(2), pt2(2) As Double
pt1(0) = inPt.X
pt1(1) = inPt.Y
pt1(2) = inPt.Z
ufs.Csys.MapPoint(UFConstants.UF_CSYS_ROOT_COORDS, pt1, _
UFConstants.UF_CSYS_ROOT_WCS_COORDS, pt2)
Abs2WCS.X = pt2(0)
Abs2WCS.Y = pt2(1)
Abs2WCS.Z = pt2(2)
End Function
Function WCS2Abs(ByVal inPt As Point3d) As Point3d
Dim pt1(2), pt2(2) As Double
pt1(0) = inPt.X
pt1(1) = inPt.Y
pt1(2) = inPt.Z
ufs.Csys.MapPoint(UFConstants.UF_CSYS_ROOT_WCS_COORDS, pt1, _
UFConstants.UF_CSYS_ROOT_COORDS, pt2)
WCS2Abs.X = pt2(0)
WCS2Abs.Y = pt2(1)
WCS2Abs.Z = pt2(2)
End Function
Please Help!
Thank you,
Amitabh
I have created a Local Co-ordinate System (LCS) in the Work part / Displayed part, on one of the Hole Center points. I need to get all the other hole center points (X,Y,Z) data with respect to this newly created Co-ordinate System.
Please refer to the image below.
How can I convert the point (X,Y,Z) values to the new co-ordinate system ?
I tried using both these function but it is not working, as it does not take as input the LCS that I have created in the part.
Function Abs2WCS(ByVal inPt As Point3d) As Point3d
Dim pt1(2), pt2(2) As Double
pt1(0) = inPt.X
pt1(1) = inPt.Y
pt1(2) = inPt.Z
ufs.Csys.MapPoint(UFConstants.UF_CSYS_ROOT_COORDS, pt1, _
UFConstants.UF_CSYS_ROOT_WCS_COORDS, pt2)
Abs2WCS.X = pt2(0)
Abs2WCS.Y = pt2(1)
Abs2WCS.Z = pt2(2)
End Function
Function WCS2Abs(ByVal inPt As Point3d) As Point3d
Dim pt1(2), pt2(2) As Double
pt1(0) = inPt.X
pt1(1) = inPt.Y
pt1(2) = inPt.Z
ufs.Csys.MapPoint(UFConstants.UF_CSYS_ROOT_WCS_COORDS, pt1, _
UFConstants.UF_CSYS_ROOT_COORDS, pt2)
WCS2Abs.X = pt2(0)
WCS2Abs.Y = pt2(1)
WCS2Abs.Z = pt2(2)
End Function
Please Help!
Thank you,
Amitabh