一. 梁的坐标系
Matrix ByCoordinateSystems(
CoordinateSystem CoordSys1,
CoordinateSystem CoordSys2
)
它的作用是返回一个转换矩阵Matrix
, 使用它可以完成从坐标系CoordSys1
转换到CoordSys2
中
2. 具体代码如下
Picker pickerBeam1 = new Picker();
Beam beam1 = pickerBeam1.PickObject(Picker.PickObjectEnum.PICK_ONE_OBJECT) as Beam;
if (beam1 != null)
{
CoordinateSystem sys = beam1.GetCoordinateSystem();
CoordinateSystem sysWorld = new CoordinateSystem(new Point(), new Vector(1,0,0), new Vector(0,1,0));
Matrix TransformationMatrix = MatrixFactory.ByCoordinateSystems(sys, sysWorld);
Point pt = new Point();
Point ptWorld = TransformationMatrix.Transform(pt);
}
主要的逻辑是拾取一根梁, 将它的梁坐标系原点从局部坐标系转到世界坐标系下
免责声明:本文系网络转载或改编,未找到原创作者,版权归原作者所有。如涉及版权,请联系删