/// <summary> /// Orient this coordinate system to GCS as if this coordinate system was constrained as an edge (i.e x' is constrained by the edge) /// </summary> public void OrientEdgeTypeLcsToGcs() { if (this.IsComplete()) { // if LocalX is parallell to UnitZ set (rotate) LocalY to UnitY int par = this.LocalX.Parallel(Geometry.FdVector3d.UnitZ()); if (par == 1 || par == -1) { this.SetYAroundX(FdVector3d.UnitY()); } // else set (rotate) LocalY to UnitZ cross LocalX else { this.SetYAroundX(FdVector3d.UnitZ().Cross(this.LocalX).Normalize()); } } else { throw new System.ArgumentException("Impossible to orient axes as the passed coordinate system is incomplete."); } }
/// <summary> /// Global coordinate system /// </summary> public static FdCoordinateSystem Global() { return(new FdCoordinateSystem(FdPoint3d.Origin(), FdVector3d.UnitX(), FdVector3d.UnitY())); }