Package geomss.geom

Interface Curve<T extends Curve>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      T copy()
      Returns a copy of this curve instance allocated by the calling thread (possibly on the stack).
      T copyToReal()
      Return a copy of this object with any transformations or subranges removed (applied).
      PointString<SubrangePoint> extractGrid​(GridRule gridRule, java.util.List<java.lang.Double> spacing)
      Return a string of points that are gridded onto the curve using the specified spacing and gridding rule.
      Parameter<javax.measure.quantity.Length> getArcLength​(double eps)
      Return the total arc length of this curve.
      Parameter<javax.measure.quantity.Length> getArcLength​(double s1, double s2, double eps)
      Return the arc length of a segment of this curve.
      Parameter<javax.measure.quantity.Length> getArcLength​(GeomPoint s1, GeomPoint s2, double eps)
      Return the arc length of a segment of this curve.
      Vector<javax.measure.quantity.Dimensionless> getBinormal​(double s)
      Return the binormal vector for the given parametric distance along the curve.
      Vector<javax.measure.quantity.Dimensionless> getBinormal​(GeomPoint s)
      Return the binormal vector for the given parametric distance along the curve.
      PointString<SubrangePoint> getClosest​(Curve curve, double tol)
      Returns the closest points (giving the minimum distance) between this curve and the specified curve.
      SubrangePoint getClosest​(GeomPlane plane, double tol)
      Returns the closest points (giving the minimum distance) between this curve and the specified plane.
      SubrangePoint getClosest​(GeomPoint point, double tol)
      Returns the closest point on this curve to the specified point.
      SubrangePoint getClosest​(GeomPoint point, double near, double tol)
      Returns the closest point on this curve to the specified point near the specified parametric position.
      PointString<SubrangePoint> getClosest​(Surface surface, double tol)
      Returns the closest points (giving the minimum distance) between this curve and the specified surface.
      PointString<SubrangePoint> getClosest​(java.util.List<? extends GeomPoint> points, double tol)
      Returns the closest points on this curve to the specified list of points.
      Parameter getCurvature​(double s)
      Return the curvature (kappa = 1/rho; where rho = the radius of curvature) of the curve at the parametric position s.
      Parameter getCurvature​(GeomPoint s)
      Return the curvature (kappa = 1/rho; where rho = the radius of curvature) of the curve at the parametric position s.
      java.util.List<java.util.List<Vector<javax.measure.quantity.Length>>> getDerivatives​(GeomPoint s, int grade)
      Calculate all the derivatives from 0 to grade with respect to parametric position(s) on a parametric object for the given parametric position on the object, d^{grade}p(s)/d^{grade}s.
      Parameter<javax.measure.quantity.Area> getEnclosedArea​(GeomPoint refPnt, double eps)
      Return the signed area of the region enclosed or subtended by a planar curve relative to the specified reference point.
      SubrangePoint getFarthest​(GeomPoint point, double tol)
      Returns the farthest point on this curve from the specified point.
      SubrangePoint getFarthest​(GeomPoint point, double near, double tol)
      Returns the farthest point on this curve from the specified point near the specified parametric position.
      PointString<SubrangePoint> getFarthest​(java.util.List<? extends GeomPoint> points, double tol)
      Returns the farthest points on this curve to the specified list of points.
      SubrangePoint getPoint​(double s)
      Return a subrange point on the curve for the given parametric distance along the curve.
      SubrangePoint getPoint​(GeomPoint s)
      Return a subrange point on the curve for the given parametric distance along the curve.
      SubrangePoint getPointAtArcLength​(Parameter<javax.measure.quantity.Length> arcLength, double tol)
      Return a subrange point at the position on the curve with the specified arc-length.
      Vector<javax.measure.quantity.Dimensionless> getPrincipalNormal​(double s)
      Return the principal normal vector for the given parametric distance, s, along the curve.
      Vector<javax.measure.quantity.Dimensionless> getPrincipalNormal​(GeomPoint s)
      Return the principal normal vector for the given parametric distance, s, along the curve.
      Point getRealPoint​(double s)
      Calculate a point on the curve for the given parametric distance along the curve.
      Point getRealPoint​(GeomPoint s)
      Calculate a point on the curve for the given parametric distance along the curve.
      Vector<javax.measure.quantity.Length> getSDerivative​(double s, int grade)
      Calculate a derivative with respect to parametric distance of the given grade on the curve for the given parametric distance along the curve, d^{grade}p(s)/d^{grade}s.
      java.util.List<Vector<javax.measure.quantity.Length>> getSDerivatives​(double s, int grade)
      Calculate all the derivatives from 0 to grade with respect to parametric distance on the curve for the given parametric distance along the curve, d^{grade}p(s)/d^{grade}s.
      java.util.List<Vector<javax.measure.quantity.Length>> getSDerivatives​(GeomPoint s, int grade)
      Calculate all the derivatives from 0 to grade with respect to parametric distance on the curve for the given parametric distance along the curve, d^{grade}p(s)/d^{grade}s.
      SubrangePoint getTangencyPoint​(GeomPoint point, double near, double tol)
      A point is found along this curve that when connected by a straight line to the given point in space, the resulting line is tangent to this curve.
      Vector<javax.measure.quantity.Dimensionless> getTangent​(double s)
      Return the tangent vector for the given parametric distance along the curve.
      Vector<javax.measure.quantity.Dimensionless> getTangent​(GeomPoint s)
      Return the tangent vector for the given parametric distance along the curve.
      Parameter getTorsion​(double s)
      Return the torsion of the curve at the parametric position s.
      Parameter getTorsion​(GeomPoint s)
      Return the torsion of the curve at the parametric position s.
      Parameter getVariationOfCurvature​(double s)
      Return the variation of curvature or rate of change of curvature (VOC or dKappa(s)/ds) at the parametric position s.
      Parameter getVariationOfCurvature​(GeomPoint s)
      Return the variation of curvature or rate of change of curvature (VOC or dKappa(s)/ds) at the parametric position s.
      PointString<SubrangePoint> gridToTolerance​(Parameter<javax.measure.quantity.Length> tol)
      Return a string of points that are gridded onto the curve with the number of points and spacing chosen to result in straight line segments between the points that are within the specified tolerance of this curve.
      GeomList<PointString<SubrangePoint>> intersect​(Curve curve, Parameter<javax.measure.quantity.Length> tol)
      Return the intersection between another curve and this curve.
      PointString<SubrangePoint> intersect​(GeomPlane plane, double tol)
      Return the intersection between a plane and this curve.
      PointString<SubrangePoint> intersect​(GeomPoint L0, GeomVector Ldir, Parameter<javax.measure.quantity.Length> tol)
      Return the intersection between an infinite line and this curve.
      GeomList<PointString<SubrangePoint>> intersect​(LineSegment line, Parameter<javax.measure.quantity.Length> tol)
      Return the intersection between a line segment and this curve.
      GeomList<PointString<SubrangePoint>> intersect​(Surface surface, Parameter<javax.measure.quantity.Length> tol)
      Return the intersections between a surface and this curve.
      boolean isCircular​(Parameter<javax.measure.quantity.Length> tol)
      Returns true if this curve is a circular arc to within the specified tolerance.
      boolean isDegenerate​(Parameter<javax.measure.quantity.Length> tol)
      Return true if this curve is degenerate (i.e.: has length less than the specified tolerance).
      boolean isLine​(Parameter<javax.measure.quantity.Length> tol)
      Returns true if this curve is a line to within the specified tolerance.
      boolean isPlanar​(Parameter<javax.measure.quantity.Length> tol)
      Return true if this curve is planar or false if it is not.
      T reverse()
      Return a new curve that is identical to this one, but with the parameterization reversed.
      GeomList<T> splitAt​(double s)
      Split this curve at the specified parametric position returning a list containing two curves (a lower curve with smaller parametric positions than "s" and an upper curve with larger parametric positions).
      GeomList<T> splitAt​(GeomPoint s)
      Split this curve at the specified parametric position returning a list containing two curves (a lower curve with smaller parametric positions than "s" and an upper curve with larger parametric positions).
      T to​(javax.measure.unit.Unit<javax.measure.quantity.Length> unit)
      Returns the equivalent to this curve but stated in the specified unit.
      T toDimension​(int newDim)
      Return a copy of this curve converted to the specified number of physical dimensions.
      NurbsCurve toNurbs​(Parameter<javax.measure.quantity.Length> tol)
      Return a NURBS curve representation of this curve to within the specified tolerance.
      • Methods inherited from interface java.lang.Comparable

        compareTo
    • Method Detail

      • to

        T to​(javax.measure.unit.Unit<javax.measure.quantity.Length> unit)
        throws javax.measure.converter.ConversionException
        Returns the equivalent to this curve but stated in the specified unit.
        Specified by:
        to in interface GeomElement<T extends Curve>
        Specified by:
        to in interface ParametricGeometry<T extends Curve>
        Parameters:
        unit - the length unit of the curve to be returned.
        Returns:
        an equivalent to this curve but stated in the specified unit.
        Throws:
        javax.measure.converter.ConversionException - if the the input unit is not a length unit.
      • toDimension

        T toDimension​(int newDim)
        Return a copy of this curve converted to the specified number of physical dimensions. If the number of dimensions is greater than this element, then zeros are added to the additional dimensions. If the number of dimensions is less than this element, then the extra dimensions are simply dropped (truncated). If the new dimensions are the same as the dimension of this element, then this element is simply returned.
        Specified by:
        toDimension in interface GeomElement<T extends Curve>
        Specified by:
        toDimension in interface ParametricGeometry<T extends Curve>
        Parameters:
        newDim - The dimension of the curve to return.
        Returns:
        This curve converted to the new dimensions.
      • copy

        T copy()
        Returns a copy of this curve instance allocated by the calling thread (possibly on the stack).
        Specified by:
        copy in interface GeomElement<T extends Curve>
        Specified by:
        copy in interface ParametricGeometry<T extends Curve>
        Returns:
        an identical and independent copy of this curve.
      • copyToReal

        T copyToReal()
        Return a copy of this object with any transformations or subranges removed (applied).
        Specified by:
        copyToReal in interface GeomElement<T extends Curve>
        Returns:
        A copy of this object with any transformations removed (applied).
      • reverse

        T reverse()
        Return a new curve that is identical to this one, but with the parameterization reversed.
        Returns:
        A new curve that is identical to this one, but with the parameterization reversed.
      • toNurbs

        NurbsCurve toNurbs​(Parameter<javax.measure.quantity.Length> tol)
        Return a NURBS curve representation of this curve to within the specified tolerance.
        Parameters:
        tol - The greatest possible difference between this curve and the NURBS representation returned.
        Returns:
        A NURBS curve that represents this curve to within the specified tolerance.
      • splitAt

        GeomList<TsplitAt​(double s)
        Split this curve at the specified parametric position returning a list containing two curves (a lower curve with smaller parametric positions than "s" and an upper curve with larger parametric positions).
        Parameters:
        s - The parametric position where this curve should be split (must not be 0 or 1!).
        Returns:
        A list containing two curves: 0 == the lower curve, 1 == the upper curve.
      • splitAt

        GeomList<TsplitAt​(GeomPoint s)
        Split this curve at the specified parametric position returning a list containing two curves (a lower curve with smaller parametric positions than "s" and an upper curve with larger parametric positions).
        Parameters:
        s - The parametric position where this curve should be split (must not be 0 or 1!). Must be a 1-dimensional point with a value in the range 0 to 1.0, non-inclusive. Units are ignored.
        Returns:
        A list containing two curves: 0 == the lower curve, 1 == the upper curve.
      • getPoint

        SubrangePoint getPoint​(double s)
        Return a subrange point on the curve for the given parametric distance along the curve.
        Parameters:
        s - parametric distance to calculate a point for (0.0 to 1.0 inclusive).
        Returns:
        The subrange point or null if the parameter is not in a valid range.
      • getPoint

        SubrangePoint getPoint​(GeomPoint s)
        Return a subrange point on the curve for the given parametric distance along the curve.
        Specified by:
        getPoint in interface ParametricGeometry<T extends Curve>
        Parameters:
        s - parametric distance to calculate a point for. Must be a 1-dimensional point with a value in the range 0 to 1.0. Units are ignored.
        Returns:
        The subrange point
      • getRealPoint

        Point getRealPoint​(double s)
        Calculate a point on the curve for the given parametric distance along the curve.
        Parameters:
        s - parametric distance to calculate a point for (0.0 to 1.0 inclusive).
        Returns:
        The calculated point
      • getRealPoint

        Point getRealPoint​(GeomPoint s)
        Calculate a point on the curve for the given parametric distance along the curve.
        Specified by:
        getRealPoint in interface ParametricGeometry<T extends Curve>
        Parameters:
        s - parametric distance to calculate a point for. Must be a 1-dimensional point with a value in the range 0 to 1.0. Units are ignored.
        Returns:
        calculated point
      • getDerivatives

        java.util.List<java.util.List<Vector<javax.measure.quantity.Length>>> getDerivatives​(GeomPoint s,
                                                                                             int grade)
        Calculate all the derivatives from 0 to grade with respect to parametric position(s) on a parametric object for the given parametric position on the object, d^{grade}p(s)/d^{grade}s.

        Example:
        1st derivative (grade = 1), this returns [p(s), dp(s)/ds];
        2nd derivative (grade = 2), this returns [p(s), dp(s)/ds, d^2p(s)/d^2s]; etc.

        Specified by:
        getDerivatives in interface ParametricGeometry<T extends Curve>
        Parameters:
        s - parametric position to calculate the derivatives for. Must match the parametric dimension of this parametric surface and have each value in the range 0 to 1.0. Units are ignored.
        grade - The maximum grade to calculate the derivatives for (1=1st derivative, 2=2nd derivative, etc)
        Returns:
        A list of lists of derivatives (one list for each parametric dimension). Each list contains derivatives up to the specified grade at the specified parametric position. Example: for a surface list element 0 is the array of derivatives in the 1st parametric dimension (s), then 2nd list element is the array of derivatives in the 2nd parametric dimension (t).
        Throws:
        java.lang.IllegalArgumentException - if the grade is < 0.
      • getSDerivative

        Vector<javax.measure.quantity.Length> getSDerivative​(double s,
                                                             int grade)
        Calculate a derivative with respect to parametric distance of the given grade on the curve for the given parametric distance along the curve, d^{grade}p(s)/d^{grade}s.

        Example:
        1st derivative (grade = 1), this returns dp(s)/ds;
        2nd derivative (grade = 2), this returns d^2p(s)/d^2s; etc.

        Note: Cartesian space derivatives can be calculated as follows:
              derivative = curve.getDerivative(s, 1);
              dy/dx = (dy/ds)/(dx/ds) = derivative.getValue(1)/derivative.getValue(0),
              dy/dz = (dy/ds)/(dz/ds) = derivative.getValue(1)/derivative.getValue(2),
              etc
         
        Parameters:
        s - Parametric distance to calculate a derivative for (0.0 to 1.0 inclusive).
        grade - The grade to calculate the derivative for (1=1st derivative, 2=2nd derivative, etc)
        Returns:
        The specified derivative of the curve at the specified parametric position.
        Throws:
        java.lang.IllegalArgumentException - if the grade is < 0.
      • getSDerivatives

        java.util.List<Vector<javax.measure.quantity.Length>> getSDerivatives​(GeomPoint s,
                                                                              int grade)
        Calculate all the derivatives from 0 to grade with respect to parametric distance on the curve for the given parametric distance along the curve, d^{grade}p(s)/d^{grade}s.

        Example:
        1st derivative (grade = 1), this returns [p(s), dp(s)/ds];
        2nd derivative (grade = 2), this returns [p(s), dp(s)/ds, d^2p(s)/d^2s]; etc.

        Parameters:
        s - parametric distance to calculate the derivatives for. Must be a 1-dimensional point with a value in the range 0 to 1.0. Units are ignored.
        grade - The maximum grade to calculate the derivatives for (1=1st derivative, 2=2nd derivative, etc)
        Returns:
        A list of derivatives up to the specified grade of the curve at the specified parametric position.
        Throws:
        java.lang.IllegalArgumentException - if the grade is < 0.
      • getSDerivatives

        java.util.List<Vector<javax.measure.quantity.Length>> getSDerivatives​(double s,
                                                                              int grade)
        Calculate all the derivatives from 0 to grade with respect to parametric distance on the curve for the given parametric distance along the curve, d^{grade}p(s)/d^{grade}s.

        Example:
        1st derivative (grade = 1), this returns [p(s), dp(s)/ds];
        2nd derivative (grade = 2), this returns [p(s), dp(s)/ds, d^2p(s)/d^2s]; etc.

        Parameters:
        s - Parametric distance to calculate the derivatives for (0.0 to 1.0 inclusive).
        grade - The maximum grade to calculate the derivatives for (1=1st derivative, 2=2nd derivative, etc)
        Returns:
        A list of derivatives up to the specified grade of the curve at the specified parametric position.
        Throws:
        java.lang.IllegalArgumentException - if the grade is < 0.
      • getTangent

        Vector<javax.measure.quantity.Dimensionless> getTangent​(double s)
        Return the tangent vector for the given parametric distance along the curve. This vector contains the normalized 1st derivative of the curve with respect to parametric distance in each component direction: dx/ds/|dp(s)/ds|, dy/ds/|dp(s)/ds|, dz/ds/|dp(s)/ds|, etc.

        Note: Cartesian space derivatives can be calculated as follows:

              tangent = curve.getTangent(s);
              dy/dx = (dy/ds)/(dx/ds) = tangent.getValue(1)/tangent.getValue(0),
              dy/dz = (dy/ds)/(dz/ds) = tangent.getValue(1)/tangent.getValue(2),
              etc
         
        Parameters:
        s - Parametric distance to calculate a tangent vector for (0.0 to 1.0 inclusive).
        Returns:
        The tangent vector of the curve at the specified parametric position.
      • getTangent

        Vector<javax.measure.quantity.Dimensionless> getTangent​(GeomPoint s)
        Return the tangent vector for the given parametric distance along the curve. This vector contains the normalized 1st derivative of the curve with respect to parametric distance in each component direction: dx/ds/|dp(s)/ds|, dy/ds/|dp(s)/ds|, dz/ds/|dp(s)/ds|, etc.

        Note: Cartesian space derivatives can be calculated as follows:

              tangent = curve.getTangent(s);
              dy/dx = (dy/ds)/(dx/ds) = tangent.getValue(1)/tangent.getValue(0),
              dy/dz = (dy/ds)/(dz/ds) = tangent.getValue(1)/tangent.getValue(2),
              etc
         
        Parameters:
        s - Parametric distance to calculate a tangent vector for. Must be a 1-dimensional point with a value in the range 0 to 1.0. Units are ignored.
        Returns:
        The tangent vector of the curve at the specified parametric position.
      • getPrincipalNormal

        Vector<javax.measure.quantity.Dimensionless> getPrincipalNormal​(double s)
        Return the principal normal vector for the given parametric distance, s, along the curve. This vector is normal to the curve, lies in the normal plane (is perpendicular to the tangent vector), and points toward the center of curvature at the specified point.
        Parameters:
        s - Parametric distance to calculate the principal normal vector for (0.0 to 1.0 inclusive).
        Returns:
        The principal normal vector of the curve at the specified parametric position.
        Throws:
        java.lang.IllegalArgumentException - if the curve does not have a 2nd derivative with respect to s (if the curve is locally a straight line segment -- this means there are an infinite number of possible principal normal vectors).
      • getPrincipalNormal

        Vector<javax.measure.quantity.Dimensionless> getPrincipalNormal​(GeomPoint s)
        Return the principal normal vector for the given parametric distance, s, along the curve. This vector is normal to the curve, lies in the normal plane (is perpendicular to the tangent vector), and points toward the center of curvature at the specified point.
        Parameters:
        s - Parametric distance to calculate the principal normal vector for. Must be a 1-dimensional point with a value in the range 0 to 1.0. Units are ignored.
        Returns:
        The principal normal vector of the curve at the specified parametric position.
        Throws:
        java.lang.IllegalArgumentException - if the curve does not have a 2nd derivative with respect to s (if the curve is locally a straight line segment -- this means there are an infinite number of possible principal normal vectors).
      • getBinormal

        Vector<javax.measure.quantity.Dimensionless> getBinormal​(double s)
                                                          throws DimensionException
        Return the binormal vector for the given parametric distance along the curve. This vector is normal to the curve at s, lies in the normal plane (is perpendicular to the tangent vector), and is perpendicular to the principal normal vector. Together, the tangent vector, principal normal vector, and binormal vector form a useful orthogonal frame.
        Parameters:
        s - Parametric distance to calculate the binormal vector for (0.0 to 1.0 inclusive).
        Returns:
        The binormal vector of the curve at the specified parametric position.
        Throws:
        java.lang.IllegalArgumentException - if the curve does not have a 2nd derivative with respect to s (if the curve is locally a straight line segment).
        DimensionException - if the curve does not have at least 3 physical dimensions.
      • getBinormal

        Vector<javax.measure.quantity.Dimensionless> getBinormal​(GeomPoint s)
                                                          throws DimensionException
        Return the binormal vector for the given parametric distance along the curve. This vector is normal to the curve at s, lies in the normal plane (is perpendicular to the tangent vector), and is perpendicular to the principal normal vector. Together, the tangent vector, principal normal vector, and binormal vector form a useful orthogonal frame.
        Parameters:
        s - Parametric distance to calculate the binormal vector for. Must be a 1-dimensional point with a value in the range 0 to 1.0. Units are ignored.
        Returns:
        The binormal vector of the curve at the specified parametric position.
        Throws:
        java.lang.IllegalArgumentException - if the curve does not have a 2nd derivative with respect to s (if the curve is locally a straight line segment).
        DimensionException - if the curve does not have at least 3 physical dimensions.
      • getCurvature

        Parameter getCurvature​(double s)
        Return the curvature (kappa = 1/rho; where rho = the radius of curvature) of the curve at the parametric position s. The curvature vector (vector from p(s) to the center of curvature) can be constructed from: k = rhoi*ni or k = curve.getPrincipalNormal(s).divide(curve.getCurvature(s));
        Parameters:
        s - Parametric distance to calculate the curvature for (0.0 to 1.0 inclusive).
        Returns:
        The curvature of the curve at the specified parametric position in units of 1/Length.
      • getCurvature

        Parameter getCurvature​(GeomPoint s)
        Return the curvature (kappa = 1/rho; where rho = the radius of curvature) of the curve at the parametric position s. The curvature vector (vector from p(s) to the center of curvature) can be constructed from: k = rhoi*ni or k = curve.getPrincipalNormal(s).divide(curve.getCurvature(s));
        Parameters:
        s - Parametric distance to calculate the curvature for. Must be a 1-dimensional point with a value in the range 0 to 1.0. Units are ignored.
        Returns:
        The curvature of the curve at the specified parametric position in units of 1/Length.
      • getVariationOfCurvature

        Parameter getVariationOfCurvature​(double s)
        Return the variation of curvature or rate of change of curvature (VOC or dKappa(s)/ds) at the parametric position s.
        Parameters:
        s - Parametric distance to calculate the variation of curvature for (0.0 to 1.0 inclusive).
        Returns:
        The variation of curvature of the curve at the specified parametric position in units of 1/Length.
      • getVariationOfCurvature

        Parameter getVariationOfCurvature​(GeomPoint s)
        Return the variation of curvature or rate of change of curvature (VOC or dKappa(s)/ds) at the parametric position s.
        Parameters:
        s - Parametric distance to calculate the variation of curvature for. Must be a 1-dimensional point with a value in the range 0 to 1.0. Units are ignored.
        Returns:
        The variation of curvature of the curve at the specified parametric position in units of 1/Length.
      • getTorsion

        Parameter getTorsion​(double s)
        Return the torsion of the curve at the parametric position s. The torsion is a measure of the rotation or twist about the tangent vector.
        Parameters:
        s - Parametric distance to calculate the torsion for (0.0 to 1.0 inclusive).
        Returns:
        The torsion of the curve at the specified parametric position in units of 1/Length.
      • getTorsion

        Parameter getTorsion​(GeomPoint s)
        Return the torsion of the curve at the parametric position s. The torsion is a measure of the rotation or twist about the tangent vector.
        Parameters:
        s - Parametric distance to calculate the torsion for. Must be a 1-dimensional point with a value in the range 0 to 1.0. Units are ignored.
        Returns:
        The torsion of the curve at the specified parametric position in units of 1/Length.
      • getArcLength

        Parameter<javax.measure.quantity.Length> getArcLength​(double eps)
        Return the total arc length of this curve.
        Parameters:
        eps - The desired fractional accuracy on the arc-length.
        Returns:
        The total arc length of the curve.
      • getArcLength

        Parameter<javax.measure.quantity.Length> getArcLength​(double s1,
                                                              double s2,
                                                              double eps)
        Return the arc length of a segment of this curve.
        Parameters:
        s1 - The starting parametric distance along the curve to begin the arc-length calculation from.
        s2 - The ending parametric distance along the curve to end the arc-length calculation at.
        eps - The desired fractional accuracy on the arc-length.
        Returns:
        The arc length of the specified segment of the curve.
      • getArcLength

        Parameter<javax.measure.quantity.Length> getArcLength​(GeomPoint s1,
                                                              GeomPoint s2,
                                                              double eps)
        Return the arc length of a segment of this curve.
        Parameters:
        s1 - The starting parametric distance along the curve to begin the arc-length calculation from. Must be a 1-dimensional point with a value in the range 0 to 1.0. Units are ignored.
        s2 - The ending parametric distance along the curve to end the arc-length calculation at. Must be a 1-dimensional point with a value in the range 0 to 1.0. Units are ignored.
        eps - The desired fractional accuracy on the arc-length.
        Returns:
        The arc length of the specified segment of the curve.
      • getPointAtArcLength

        SubrangePoint getPointAtArcLength​(Parameter<javax.measure.quantity.Length> arcLength,
                                          double tol)
        Return a subrange point at the position on the curve with the specified arc-length.
        Parameters:
        arcLength - The target arc length to find in meters.
        tol - Fractional tolerance (in parameter space) to refine the point position to.
        Returns:
        A subrange point on the curve at the specified arc-length position.
      • getTangencyPoint

        SubrangePoint getTangencyPoint​(GeomPoint point,
                                       double near,
                                       double tol)
        A point is found along this curve that when connected by a straight line to the given point in space, the resulting line is tangent to this curve. This method should only be used if this curve is a planar curve that is C1 (slope) continuous, and convex with respect to the point. The given point should be in the plane of the curve. If it is not, it will be projected into the plane of the curve.
        Parameters:
        point - The point that the tangent on the curve is to be found relative to.
        near - The parametric distance on the curve (0-1) that serves as an initial guess at the location of the tangent point.
        tol - Fractional tolerance (in parameter space) to refine the point position to.
        Returns:
        The point on this curve that is tangent to the curve and the supplied point.
      • extractGrid

        PointString<SubrangePointextractGrid​(GridRule gridRule,
                                               java.util.List<java.lang.Double> spacing)
        Return a string of points that are gridded onto the curve using the specified spacing and gridding rule.
        Parameters:
        gridRule - Specifies whether the subdivision spacing is applied with respect to arc-length in real space or parameter space.
        spacing - A list of values used to define the subdivision spacing. gridRule specifies whether the subdivision spacing is applied with respect to arc-length in real space or parameter space. If the spacing is arc-length, then the values are interpreted as fractions of the arc length of the curve from 0 to 1.
        Returns:
        A string of subrange points gridded onto the curve at the specified parametric positions.
      • gridToTolerance

        PointString<SubrangePointgridToTolerance​(Parameter<javax.measure.quantity.Length> tol)
        Return a string of points that are gridded onto the curve with the number of points and spacing chosen to result in straight line segments between the points that are within the specified tolerance of this curve.
        Parameters:
        tol - The maximum distance that a straight line between gridded points may deviate from this curve.
        Returns:
        A string of subrange points gridded onto the curve.
      • intersect

        PointString<SubrangePointintersect​(GeomPlane plane,
                                             double tol)
        Return the intersection between a plane and this curve.
        Parameters:
        plane - The plane to intersect with this curve.
        tol - Fractional tolerance (in parameter space) to refine the point positions to.
        Returns:
        A PointString containing zero or more subrange points made by the intersection of this curve with the specified plane. If no intersection is found, an empty PointString is returned.
      • intersect

        PointString<SubrangePointintersect​(GeomPoint L0,
                                             GeomVector Ldir,
                                             Parameter<javax.measure.quantity.Length> tol)
        Return the intersection between an infinite line and this curve.
        Parameters:
        L0 - A point on the line (origin of the line).
        Ldir - The direction vector for the line (does not have to be a unit vector).
        tol - Tolerance (in physical space) to refine the point positions to.
        Returns:
        A PointString containing zero or more subrange points made by the intersection of this curve with the specified line. If no intersection is found, an empty PointString is returned.
      • intersect

        GeomList<PointString<SubrangePoint>> intersect​(LineSegment line,
                                                       Parameter<javax.measure.quantity.Length> tol)
        Return the intersection between a line segment and this curve.
        Parameters:
        line - The line segment to intersect.
        tol - Tolerance (in physical space) to refine the point positions to.
        Returns:
        A list containing two PointString instances each containing zero or more subrange points, on this curve and the input line segment respectively, made by the intersection of this curve with the specified line segment. If no intersections are found a list of two empty PointStrings are returned.
      • intersect

        GeomList<PointString<SubrangePoint>> intersect​(Curve curve,
                                                       Parameter<javax.measure.quantity.Length> tol)
        Return the intersection between another curve and this curve.
        Parameters:
        curve - The curve to intersect with this curve.
        tol - Tolerance (in physical space) to refine the point positions to.
        Returns:
        A list containing two PointString instances each containing zero or more subrange points, on this curve and the input curve respectively, made by the intersection of this curve with the specified curve. If no intersections are found a list of two empty PointStrings are returned.
      • intersect

        GeomList<PointString<SubrangePoint>> intersect​(Surface surface,
                                                       Parameter<javax.measure.quantity.Length> tol)
        Return the intersections between a surface and this curve.
        Parameters:
        surface - The surface to intersect with this curve.
        tol - Tolerance (in physical space) to refine the point positions to.
        Returns:
        A list containing two PointString instances each containing zero or more subrange points, on this curve and the input surface respectively, made by the intersection of this curve with the specified surface. If no intersections are found a list of two empty PointStrings are returned.
      • getClosest

        SubrangePoint getClosest​(GeomPoint point,
                                 double tol)
        Returns the closest point on this curve to the specified point.
        Specified by:
        getClosest in interface ParametricGeometry<T extends Curve>
        Parameters:
        point - The point to find the closest point on this curve to.
        tol - Fractional tolerance (in parameter space) to refine the point position to.
        Returns:
        The SubrangePoint on this curve that is closest to the specified point.
      • getClosest

        SubrangePoint getClosest​(GeomPoint point,
                                 double near,
                                 double tol)
        Returns the closest point on this curve to the specified point near the specified parametric position. This may not return the global closest point!
        Parameters:
        point - The point to find the closest point on this curve to.
        near - The parametric position where the search for the closest point should be started.
        tol - Fractional tolerance (in parameter space) to refine the point position to.
        Returns:
        The point on this curve that is closest to the specified point near the specified parametric position.
      • getClosest

        PointString<SubrangePointgetClosest​(java.util.List<? extends GeomPoint> points,
                                              double tol)
        Returns the closest points on this curve to the specified list of points.
        Parameters:
        points - The list of points to find the closest points on this curve to.
        tol - Fractional tolerance (in parameter space) to refine the point positions to.
        Returns:
        The list of SubrangePoint objects on this curve that are closest to the specified points.
      • getFarthest

        SubrangePoint getFarthest​(GeomPoint point,
                                  double tol)
        Returns the farthest point on this curve from the specified point.
        Specified by:
        getFarthest in interface ParametricGeometry<T extends Curve>
        Parameters:
        point - The point to find the farthest point on this curve from.
        tol - Fractional tolerance (in parameter space) to refine the point position to.
        Returns:
        The SubrangePoint on this curve that is farthest from the specified point.
      • getFarthest

        SubrangePoint getFarthest​(GeomPoint point,
                                  double near,
                                  double tol)
        Returns the farthest point on this curve from the specified point near the specified parametric position. This may not return the global farthest point!
        Parameters:
        point - The point to find the farthest point on this curve from.
        near - The parametric position where the search for the farthest point should be started.
        tol - Fractional tolerance (in parameter space) to refine the point position to.
        Returns:
        The SubrangePoint on this curve that is farthest from the specified point.
      • getFarthest

        PointString<SubrangePointgetFarthest​(java.util.List<? extends GeomPoint> points,
                                               double tol)
        Returns the farthest points on this curve to the specified list of points.
        Parameters:
        points - The list of points to find the farthest points on this curve to.
        tol - Fractional tolerance (in parameter space) to refine the point positions to.
        Returns:
        The list of SubrangePoint objects on this curve that are farthest from the specified points.
      • getClosest

        PointString<SubrangePointgetClosest​(Curve curve,
                                              double tol)
        Returns the closest points (giving the minimum distance) between this curve and the specified curve. If the specified curve intersects this curve, then the 1st intersection found is returned (not all the intersections are found and there is no guarantee about which intersection will be returned). If the specified curve is parallel to this curve (all points are equidistant away), then any point between the two curves could be returned as the "closest".
        Parameters:
        curve - The curve to find the closest points between this curve and that one.
        tol - Fractional tolerance (in parameter space) to refine the point position to.
        Returns:
        A list containing two SubrangePoint objects that represent the closest point on this curve (index 0) and the closest point on the specified curve (index 1).
      • getClosest

        PointString<SubrangePointgetClosest​(Surface surface,
                                              double tol)
        Returns the closest points (giving the minimum distance) between this curve and the specified surface. If this curve intersects the specified surface, then the 1st intersection found is returned (not all the intersections are found and there is no guarantee about which intersection will be returned). If this curve is parallel to the specified surface (all closest points are equidistant away), then any point on this curve and the closest point on the target surface will be returned as "closest".
        Parameters:
        surface - The surface to find the closest points between this curve and that surface.
        tol - Fractional tolerance (in parameter space) to refine the point position to.
        Returns:
        A list containing two SubrangePoint objects that represent the closest point on this curve (index 0) and the closest point on the specified surface (index 1).
      • getClosest

        SubrangePoint getClosest​(GeomPlane plane,
                                 double tol)
        Returns the closest points (giving the minimum distance) between this curve and the specified plane. If this curve intersects the specified plane, then the 1st intersection found is returned (not all the intersections are found and there is no guarantee about which intersection will be returned). If this curve is parallel to the specified plane (all closest points are equidistant away), then any point on this curve and the closest point on the target plane will be returned as "closest".
        Parameters:
        plane - The plane to find the closest points between this curve and that plane.
        tol - Fractional tolerance (in parameter space) to refine the point position to.
        Returns:
        The closest point found on this curve to the specified plane.
      • getEnclosedArea

        Parameter<javax.measure.quantity.Area> getEnclosedArea​(GeomPoint refPnt,
                                                               double eps)
        Return the signed area of the region enclosed or subtended by a planar curve relative to the specified reference point. This method assumes that the curve is planar and will give incorrect results if the curve is not planar. Also, the input reference point is assumed to lie in the plane of the curve, it if is not, this will give incorrect results. If the curve is closed, then the reference point is arbitrary (as long as it is in the plane of the curve). If the curve is open, then the area returned is that subtended by the curve with straight lines from each end of the curve to the input point.
        Parameters:
        refPnt - The reference point used for computing the enclosed or subtended area of the curve.
        eps - The desired fractional accuracy of the area calculated.
        Returns:
        The area enclosed or subtended by this curve (assuming that this curve is planar and that the reference point lies in the plane of this curve).
      • isDegenerate

        boolean isDegenerate​(Parameter<javax.measure.quantity.Length> tol)
        Return true if this curve is degenerate (i.e.: has length less than the specified tolerance).
        Specified by:
        isDegenerate in interface ParametricGeometry<T extends Curve>
        Parameters:
        tol - The tolerance for determining if this curve is degenerate. May not be null.
        Returns:
        true if this curve is degenerate.
      • isPlanar

        boolean isPlanar​(Parameter<javax.measure.quantity.Length> tol)
        Return true if this curve is planar or false if it is not.
        Parameters:
        tol - The geometric tolerance to use in determining if the curve is planar.
        Returns:
        true if this curve is planar.
      • isLine

        boolean isLine​(Parameter<javax.measure.quantity.Length> tol)
        Returns true if this curve is a line to within the specified tolerance.
        Parameters:
        tol - The tolerance for determining if this curve is a line.
        Returns:
        true if this curve is a line.
      • isCircular

        boolean isCircular​(Parameter<javax.measure.quantity.Length> tol)
        Returns true if this curve is a circular arc to within the specified tolerance.
        Parameters:
        tol - The tolerance for determining if this curve is a circular arc.
        Returns:
        true if this curve is a circular arc.