iCAx开思工具箱

标题: catiav5r16版本下的窗口点坐标偏移问题! [打印本页]

作者: ragon_zhao    时间: 2009-1-28 13:57
标题: catiav5r16版本下的窗口点坐标偏移问题!
我们使用automation 和VB开发的装配控制程序中获取
  Set partdocument1 = CATIA.Documents.Item(g_strProc & ".CATPart")
    Set part1 = partdocument1.Part
    Set HybridshapeFactory1 = part1.HybridShapeFactory
    Set Hybridshapeplane = part1.OriginElements.PlaneZX
    Set PlaneReference = part1.CreateReferenceFromObject(Hybridshapeplane)
    Set TheSelectedShape = part1.Parameters.Item("曲面.1")
    'WindowLocation3D是窗口鼠标选取的点在参考坐标系下的坐标
    Status2 = partdocument1.Indicate3D(Hybridshapeplane, "select a location in the document window", _ WindowLocation2D, WindowLocation3D)
   
    If (Status2 = "Cancel") Then Exit Sub
   
    '获取当前坐标系下的坐标 到 dbFinalPoint数组中
    Call GetPointCoordinatesOnProcedure(WindowLocation3D, dblFinalPoint)
        Set HybridShapePointOnPlane = HybridshapeFactory1.AddNewPointCoord(dblFinalPoint(9),  dblFinalPoint(10), dblFinalPoint(11))

发现在CATIAV5R14中同样的窗口坐标,而在CATIAV5R16下,所获取的WindowLocation3D三维坐标的xz 坐标都变大了,导致到XZ平面的投影点向外发散方向偏移?
VB程序完全一致,为什么会产生在新的版本R16下的投影偏移问题呢?
敬请高手指点迷津!




欢迎光临 iCAx开思工具箱 (https://t.icax.org/) Powered by Discuz! X3.3