Class SplitSegment


  • public class SplitSegment
    extends java.lang.Object
    Models a constraint segment which can be split in two in various ways, according to certain geometric constraints.
    • Field Detail

      • segLen

        private double segLen
      • minimumLen

        private double minimumLen
    • Constructor Detail

      • SplitSegment

        public SplitSegment​(LineSegment seg)
    • Method Detail

      • pointAlongReverse

        private static Coordinate pointAlongReverse​(LineSegment seg,
                                                    double segmentLengthFraction)
        Computes the Coordinate that lies a given fraction along the line defined by the reverse of the given segment. A fraction of 0.0 returns the end point of the segment; a fraction of 1.0 returns the start point of the segment.
        Parameters:
        seg - the LineSegment
        segmentLengthFraction - the fraction of the segment length along the line
        Returns:
        the point at that distance
      • setMinimumLength

        public void setMinimumLength​(double minLen)
      • getSplitPoint

        public Coordinate getSplitPoint()
      • splitAt

        public void splitAt​(double length,
                            Coordinate endPt)
      • splitAt

        public void splitAt​(Coordinate pt)
      • getConstrainedLength

        private double getConstrainedLength​(double len)