public static Segment3d OntoFrame(this Segment3d _seg3d, Frame3f _frame) { var seg3f = new Segment3f (_frame.ToFrameP((Vector3f)_seg3d.P0), _frame.ToFrameP((Vector3f)_seg3d.P1)); return(new Segment3d(seg3f.P0, seg3f.P1)); }
public static Segment3d OutFrame(this Segment2d _seg2d, Frame3f _frame) { var seg3f = new Segment3f (_frame.FromPlaneUV((Vector2f)_seg2d.P0, 2), _frame.FromPlaneUV((Vector2f)_seg2d.P1, 2)); return(new Segment3d(seg3f.P0, seg3f.P1)); }
private static Segment3f[] GetSegments(ISectionFace face) { var segments = new Segment3f[12]; var C = new Vector3f(face.CenterX, face.CenterY, face.CenterZ); var X = (Vector3f)(face.GetU() * face.SizeX / 2.0); var Y = (Vector3f)(face.GetV() * face.SizeY / 2.0); segments[0] = new Segment3f(C - X - Y, C + X - Y); segments[1] = new Segment3f(C + X - Y, C + X + Y); segments[2] = new Segment3f(C + X + Y, C - X + Y); segments[3] = new Segment3f(C - X + Y, C - X - Y); return(segments); }
public static Line ToLine(this Segment3f seg) { return(Line.CreateBound(seg.P0.ToXYZ(), seg.P1.ToXYZ())); }
public StandardSnapSegment(SceneObject tso) { this.so = tso; unique_id = SnapGeometryUniqueIDGenerator.Allocate(); segmentW = new Segment3f(Vector3f.Zero, Vector3f.AxisX); }