CATIA宏,二维坐标中的三维点坐标(从空间到图纸视图)

时间:2015-08-31 08:57:25

标签: macros coordinates catia

我在3d中有一些点,并希望为每个点添加一个绘图文本,其中领导者指向2d绘图视图中的右侧点。

问题:无法找到正确的2d坐标以正确指向视图中的投影点,因为视图可以是前视图/顶部/侧面或等距视图。

我所知道的:三维坐标(x,y,z)并且可以找到视图的一些矢量分量(得到一些值,如0,0,-1或0,-1,-0或某些值,如等距的0.808,0.9777,-0,332。

这是一个基于视图矢量分量和3d坐标的解决方案来进行一些变换以获得二维坐标?

1 个答案:

答案 0 :(得分:0)

Unfortunately, generative elements in a drawing view are not exposed in the VBA api, so you cannot simply make a positional link with a drawing leader to a point from the 3d model.

Alternatively, you could, try to get you points and their XYZ coordinates from the part, and then attempt to create points and leaders using the "Arrows" collection and the Factory2D. You'll need to keep track of your views and the planes which they are projected on to make it work correctly. It's not necessarily difficult, but not straight forward either.