我的google-fu在设置autocad轴方面很薄弱。我在网上看到了很多定义ucs的例子,但是没有一个设置z轴。我可以手动设置z轴,通过命令行输入'ucs‘,然后'za’并选择2个点来定义z轴。
我试过这个:将UCS对齐到一个实体
不像我需要的那样有效。我也尝试过修改它,但是我显然缺少一些C#的知识来完成它。任何帮助都是非常感谢的。
谢谢
发布于 2016-01-30 10:46:43
下面是一个扩展方法:
public static class EditorExtension
{
public static void SetZAxisUcs (this Editor ed, Point3d basePoint, Point3d positiveZaxisPoint)
{
Plane plane = new Plane(basePoint, basePoint.GetVectorTo(positiveZaxisPoint));
Matrix3d ucs = Matrix3d.PlaneToWorld(plane);
ed.CurrentUserCoordinateSystem = ucs;
}
}https://stackoverflow.com/questions/35094600
复制相似问题