internal ParabolaProperty(IArcSegment3D parabolicArc) { Matrix = new Matrix44(); IsValid = CalculateParabolaProperty(parabolicArc); if (!IsValid) { var seg = new ArcSegment3D(parabolicArc.StartPoint, parabolicArc.IntermedPoint, parabolicArc.EndPoint); ParabolaLength = GeomOperation.GetLength(seg); } }
public override ISegment3D CloneSegment(bool clonePoints) { if (clonePoints) { return(new ArcSegment3D(this)); } else { ArcSegment3D newSeg = new ArcSegment3D(StartPoint, IntermedPoint, EndPoint); ICoordSystem newSystem = null; LocalCoordinateSystem.CopyTo(ref newSystem); newSeg.LocalCoordinateSystem = newSystem; return(newSeg); } }
/// <summary> /// Gets all angle change of parabola /// </summary> /// <returns>Angle change</returns> internal double GetAngleChange() { double angle = 0; if (Property.IsValid) { Vector3D vect1 = new Vector3D(); Vector3D vect2 = new Vector3D(); GeomOperation.GetTangentOnSegment(this, 0.0, ref vect1); GeomOperation.GetTangentOnSegment(this, 1.0, ref vect2); angle = GeomOperation.GetAngle(vect1, vect2); } else { var seg = new ArcSegment3D(StartPoint, IntermedPoint, EndPoint); angle = GeomOperation.GetArcAngle(seg); } return(angle); }