Package geomss.geom

Interface Surface<T extends Surface>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      T copy()
      Returns a copy of this ParametricGeometry instance allocated by the calling thread (possibly on the stack).
      PointArray<SubrangePoint> extractGrid​(GridRule gridRule, java.util.List<java.lang.Double> bottomSpacing, java.util.List<java.lang.Double> topSpacing, java.util.List<java.lang.Double> leftSpacing, java.util.List<java.lang.Double> rightSpacing)
      Return an array of SubrangePoint objects that are gridded onto the surface using the specified spacings and gridding rule.
      Parameter<javax.measure.quantity.Area> getArea​(double eps)
      Return the surface area of this entire surface.
      Parameter<javax.measure.quantity.Area> getArea​(double s1, double t1, double s2, double t2, double eps)
      Return the surface area of a portion of this surface.
      Parameter<javax.measure.quantity.Area> getArea​(GeomPoint st1, GeomPoint st2, double eps)
      Return the surface area of a portion of this surface.
      PointString<SubrangePoint> getClosest​(Curve curve, double tol)
      Returns the closest points (giving the minimum distance) between this surface and the specified curve.
      SubrangePoint getClosest​(GeomPlane plane, double tol)
      Returns the closest point (giving the minimum distance) between this surface and the specified plane.
      SubrangePoint getClosest​(GeomPoint point, double tol)
      Returns the closest point on this surface to the specified point.
      SubrangePoint getClosest​(GeomPoint point, double nearS, double nearT, double tol)
      Returns the closest point on this surface 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 surface and the specified surface.
      PointArray<SubrangePoint> getClosest​(java.util.List<? extends java.util.List<GeomPoint>> points, double tol)
      Returns the array of closest points on this surface to the specified array (list of lists) of points.
      SubrangeCurve getCurve​(Curve pcrv)
      Return a subrange curve on the surface for the given parametric position curve.
      java.util.List<java.util.List<Vector<javax.measure.quantity.Length>>> getDerivatives​(GeomPoint st, 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.
      SubrangePoint getFarthest​(GeomPoint point, double tol)
      Returns the farthest point on this surface from the specified point.
      SubrangePoint getFarthest​(GeomPoint point, double nearS, double nearT, double tol)
      Returns the farthest point on this surface from the specified point near the specified parametric position on the surface.
      PointArray<SubrangePoint> getFarthest​(java.util.List<? extends java.util.List<GeomPoint>> points, double tol)
      Returns the array of farthest points on this surface from the specified array (list of lists) of points.
      Parameter getGaussianCurvature​(double s, double t)
      Returns the Gaussian Curvature for this surface at the given parametric position (s,t) on this surface.
      Parameter getGaussianCurvature​(GeomPoint st)
      Returns the Gaussian Curvature for this surface at the given parametric position (s,t) on this surface.
      Parameter getMeanCurvature​(double s, double t)
      Returns the Mean Curvature for this surface at the given parametric position (s,t) on this surface.
      Parameter getMeanCurvature​(GeomPoint st)
      Returns the Mean Curvature for this surface at the given parametric position (s,t) on this surface.
      Vector<javax.measure.quantity.Dimensionless> getNormal​(double s, double t)
      Return the normal vector for this surface at the given parametric position (s,t) on this surface.
      Vector<javax.measure.quantity.Dimensionless> getNormal​(GeomPoint st)
      Return the normal vector for this surface at the given parametric position (s,t) on this surface.
      SubrangePoint getPoint​(double s, double t)
      Return a subrange point on the surface for the given parametric position on the surface.
      SubrangePoint getPoint​(GeomPoint st)
      Return a subrange point on the surface for the given parametric position on the surface.
      Point getRealPoint​(double s, double t)
      Calculate a point on the surface for the given parametric position on the surface.
      Point getRealPoint​(GeomPoint st)
      Calculate a point on the surface for the given parametric position on the surface.
      Curve getS0Curve()
      Return the S=0 Boundary for this surface as a curve.
      Curve getS1Curve()
      Return the S=1 Boundary for this surface as a curve.
      SubrangeCurve getSCurve​(double s)
      Return a subrange curve at a constant parametric s-value.
      Vector<javax.measure.quantity.Length> getSDerivative​(double s, double t, int grade)
      Calculate a derivative with respect to parametric s-distance of the given grade on the surface for the given parametric position on the surface, d^{grade}p(s,t)/d^{grade}s.
      Vector<javax.measure.quantity.Length> getSDerivative​(GeomPoint st, int grade)
      Calculate a derivative with respect to parametric s-distance of the given grade on the surface for the given parametric position on the surface, d^{grade}p(s,t)/d^{grade}s.
      java.util.List<Vector<javax.measure.quantity.Length>> getSDerivatives​(double s, double t, int grade)
      Calculate all the derivatives from 0 to grade with respect to parametric s-position on the surface for the given parametric position on the surface, d^{grade}p(s,t)/d^{grade}s.
      java.util.List<Vector<javax.measure.quantity.Length>> getSDerivatives​(GeomPoint st, int grade)
      Calculate all the derivatives from 0 to grade with respect to parametric s-position on the surface for the given parametric position on the surface, d^{grade}p(s,t)/d^{grade}s.
      Curve getT0Curve()
      Return the T=0 Boundary for this surface as a curve.
      Curve getT1Curve()
      Return the T=1 Boundary for this surface as a curve.
      Plane getTangentPlane​(double s, double t)
      Return the tangent plane to this surface at the given parametric position (s,t) on this surface.
      Plane getTangentPlane​(GeomPoint st)
      Return the tangent plane to this surface at the given parametric position (s,t) on this surface.
      SubrangeCurve getTCurve​(double t)
      Return a subrange curve at a constant parametric t-value.
      Vector<javax.measure.quantity.Length> getTDerivative​(double s, double t, int grade)
      Calculate all the derivatives from 0 to grade with respect to parametric t-position on the surface for the given parametric position on the surface, d^{grade}p(s,t)/d^{grade}t.
      Vector<javax.measure.quantity.Length> getTDerivative​(GeomPoint st, int grade)
      Calculate a derivative with respect to parametric t-distance of the given grade on the surface for the given parametric position on the surface, d^{grade}p(s,t)/d^{grade}t.
      java.util.List<Vector<javax.measure.quantity.Length>> getTDerivatives​(double s, double t, int grade)
      Calculate all the derivatives from 0 to grade with respect to parametric t-position on the surface for the given parametric position on the surface, d^{grade}p(s,t)/d^{grade}t.
      java.util.List<Vector<javax.measure.quantity.Length>> getTDerivatives​(GeomPoint st, int grade)
      Calculate all the derivatives from 0 to grade with respect to parametric t-position on the surface for the given parametric position on the surface, d^{grade}p(s,t)/d^{grade}t.
      Vector<javax.measure.quantity.Length> getTwistVector​(double s, double t)
      Calculate the twist vector (d^2P/(ds*dt) = d(dP/ds)/dt) for this surface at the specified position on this surface.
      Vector<javax.measure.quantity.Length> getTwistVector​(GeomPoint st)
      Calculate the twist vector (d^2P/(ds*dt) = d(dP/ds)/dt) for this surface at the specified position on this surface.
      Parameter<javax.measure.quantity.Volume> getVolume​(double eps)
      Return the enclosed volume of this entire surface.
      Parameter<javax.measure.quantity.Volume> getVolume​(double s1, double t1, double s2, double t2, double eps)
      Return the enclosed volume of a portion of this surface.
      Parameter<javax.measure.quantity.Volume> getVolume​(GeomPoint st1, GeomPoint st2, double eps)
      Return the enclosed volume of a portion of this surface.
      PointArray<SubrangePoint> gridToTolerance​(Parameter<javax.measure.quantity.Length> tol)
      Return an array of points that are gridded onto the surface with the number of points and spacing chosen to result in straight line segments between the points that have mid-points that are all within the specified tolerance of this surface.
      GeomList<PointString<SubrangePoint>> intersect​(Curve curve, Parameter<javax.measure.quantity.Length> tol)
      Return the intersections between a curve and this surface.
      GeomList<SubrangeCurve> intersect​(GeomPlane plane, Parameter<javax.measure.quantity.Length> tol)
      Return the intersections between an infinite plane and this surface.
      PointString<SubrangePoint> intersect​(GeomPoint L0, GeomVector Ldir, Parameter<javax.measure.quantity.Length> tol)
      Return the intersections between an infinite line and this surface.
      GeomList<PointString<SubrangePoint>> intersect​(LineSegment line, Parameter<javax.measure.quantity.Length> tol)
      Return the intersections between a line segment and this surface.
      GeomList<GeomList<SubrangeCurve>> intersect​(Surface surface, Parameter<javax.measure.quantity.Length> tol)
      Return the intersections between another surface and this surface.
      boolean isDegenerate​(Parameter<javax.measure.quantity.Length> tol)
      Return true if this surface is degenerate (i.e.: has area less than the specified tolerance squared).
      boolean isPlanar​(double epsFT, double epsELT)
      Return true if this surface is planar or false if it is not.
      boolean isPlanar​(Parameter<javax.measure.quantity.Length> tol)
      Return true if this surface is planar or false if it is not.
      T reverseS()
      Return a new surface that is identical to this one, but with the S-parameterization reversed.
      T reverseT()
      Return a new surface that is identical to this one, but with the T-parameterization reversed.
      GeomList<T> splitAtS​(double s)
      Split this surface at the specified parametric S-position returning a list containing two new surfaces (a lower surface with smaller S-parametric positions than "s" and an upper surface with larger S-parametric positions).
      GeomList<T> splitAtS​(GeomPoint st)
      Split this surface at the specified parametric S-position returning a list containing two new surfaces (a lower surface with smaller S-parametric positions than "s" and an upper surface with larger S-parametric positions).
      GeomList<T> splitAtT​(double t)
      Split this surface at the specified parametric T-position returning a list containing two new surfaces (a lower surface with smaller T-parametric positions than "t" and an upper surface with larger T-parametric positions).
      GeomList<T> splitAtT​(GeomPoint st)
      Split this surface at the specified parametric T-position returning a list containing two new surfaces (a lower surface with smaller T-parametric positions than "t" and an upper surface with larger T-parametric positions).
      T to​(javax.measure.unit.Unit<javax.measure.quantity.Length> unit)
      Returns the equivalent to this surface but stated in the specified unit.
      T toDimension​(int newDim)
      Return a copy of this surface converted to the specified number of physical dimensions.
      NurbsSurface toNurbs​(Parameter<javax.measure.quantity.Length> tol)
      Return a NURBS surface representation of this surface to within the specified tolerance.
      T transpose()
      Return a new surface that is identical to this one but with the transpose of the parameterization of this surface.
      • 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 surface but stated in the specified unit.
        Specified by:
        to in interface GeomElement<T extends Surface>
        Specified by:
        to in interface ParametricGeometry<T extends Surface>
        Parameters:
        unit - the length unit of the surface to be returned.
        Returns:
        an equivalent to this surface but stated in the specified unit.
        Throws:
        javax.measure.converter.ConversionException - if the the input unit is not a length unit.
      • transpose

        T transpose()
        Return a new surface that is identical to this one but with the transpose of the parameterization of this surface. The S and T directions will be swapped. This is an optional method that not all subclasses will provide. Those that do not provide this method will throw an UnsupportedMethodException.
        Returns:
        A new surface, identical to this one, but with the transpose of the parameterization.
        Throws:
        java.lang.UnsupportedOperationException - if this method is not supported.
      • splitAtS

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

        GeomList<TsplitAtS​(GeomPoint st)
        Split this surface at the specified parametric S-position returning a list containing two new surfaces (a lower surface with smaller S-parametric positions than "s" and an upper surface with larger S-parametric positions).
        Parameters:
        st - The S-parametric position where this surface should be split (must not be 0 or 1!). Must be a 2-dimensional point with each value in the range 0 to 1, only the 1st value is used. Units are ignored.
        Returns:
        A list containing two surfaces: 0 == the lower surface, 1 == the upper surface.
      • splitAtT

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

        GeomList<TsplitAtT​(GeomPoint st)
        Split this surface at the specified parametric T-position returning a list containing two new surfaces (a lower surface with smaller T-parametric positions than "t" and an upper surface with larger T-parametric positions).
        Parameters:
        st - The T-parametric position where this surface should be split (must not be 0 or 1!). Must be a 2-dimensional point with each value in the range 0 to 1, only the 2nd value is used. Units are ignored.
        Returns:
        A list containing two surfaces: 0 == the lower surface, 1 == the upper surface.
      • reverseS

        T reverseS()
        Return a new surface that is identical to this one, but with the S-parameterization reversed.
        Returns:
        A new surface that is identical to this one, but with the S-parameterization reversed.
        See Also:
        reverseT()
      • reverseT

        T reverseT()
        Return a new surface that is identical to this one, but with the T-parameterization reversed.
        Returns:
        A new surface that is identical to this one, but with the T-parameterization reversed.
        See Also:
        reverseS()
      • copy

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

        T toDimension​(int newDim)
        Return a copy of this surface 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 Surface>
        Specified by:
        toDimension in interface ParametricGeometry<T extends Surface>
        Parameters:
        newDim - The dimension of the surface to return.
        Returns:
        This surface converted to the new dimensions.
      • toNurbs

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

        SubrangePoint getPoint​(double s,
                               double t)
        Return a subrange point on the surface for the given parametric position on the surface.
        Parameters:
        s - 1st parametric dimension distance to calculate a point for (0.0 to 1.0 inclusive).
        t - 2nd parametric dimension distance to calculate a point for (0.0 to 1.0 inclusive).
        Returns:
        The subrange point on the surface at the specified parameter values.
        Throws:
        java.lang.IllegalArgumentException - if there is any problem with the parameter values.
      • getPoint

        SubrangePoint getPoint​(GeomPoint st)
        Return a subrange point on the surface for the given parametric position on the surface.
        Specified by:
        getPoint in interface ParametricGeometry<T extends Surface>
        Parameters:
        st - The parametric position to calculate a point for. Must be a 2-dimensional point with each value in the range 0 to 1.0. Units are ignored.
        Returns:
        The subrange point on the surface at the specified parameter values.
        Throws:
        java.lang.IllegalArgumentException - if there is any problem with the parameter values.
      • getRealPoint

        Point getRealPoint​(double s,
                           double t)
        Calculate a point on the surface for the given parametric position on the surface.
        Parameters:
        s - 1st parametric dimension distance to calculate a point for (0.0 to 1.0 inclusive).
        t - 2nd parametric dimension distance to calculate a point for (0.0 to 1.0 inclusive).
        Returns:
        The calculated point on the surface at the specified parameter values.
        Throws:
        java.lang.IllegalArgumentException - if there is any problem with the parameter values.
      • getRealPoint

        Point getRealPoint​(GeomPoint st)
        Calculate a point on the surface for the given parametric position on the surface.
        Specified by:
        getRealPoint in interface ParametricGeometry<T extends Surface>
        Parameters:
        st - The parametric position to calculate a point for. Must be a 2-dimensional point with each value in the range 0 to 1.0. Units are ignored.
        Returns:
        The calculated point on the surface at the specified parameter values.
        Throws:
        java.lang.IllegalArgumentException - if there is any problem with the parameter values.
      • getCurve

        SubrangeCurve getCurve​(Curve pcrv)
        Return a subrange curve on the surface for the given parametric position curve.
        Parameters:
        pcrv - A curve in parametric space indicating the parametric positions on the the surface represented by the subrange curve. Must be 2D with values between 0 and 1.
        Returns:
        The subrange curve on the surface at the specified parametric curve positions.
      • getSCurve

        SubrangeCurve getSCurve​(double s)
        Return a subrange curve at a constant parametric s-value.
        Parameters:
        s - The parametric s-position to extract a subrange curve.
        Returns:
        The subrange curve on the surface at the specified s-value.
        Throws:
        java.lang.IllegalArgumentException - if there is any problem with the parameter value.
      • getTCurve

        SubrangeCurve getTCurve​(double t)
        Return a subrange curve at a constant parametric t-value.
        Parameters:
        t - The parametric t-position to extract a subrange curve.
        Returns:
        The subrange curve on the surface at the specified t-value.
        Throws:
        java.lang.IllegalArgumentException - if there is any problem with the parameter value.
      • getT0Curve

        Curve getT0Curve()
        Return the T=0 Boundary for this surface as a curve.
        Returns:
        The T=0 boundary for this surface as a curve.
      • getT1Curve

        Curve getT1Curve()
        Return the T=1 Boundary for this surface as a curve.
        Returns:
        The T=1 boundary for this surface as a curve.
      • getS0Curve

        Curve getS0Curve()
        Return the S=0 Boundary for this surface as a curve.
        Returns:
        The S=0 boundary for this surface as a curve.
      • getS1Curve

        Curve getS1Curve()
        Return the S=1 Boundary for this surface as a curve.
        Returns:
        The S=1 boundary for this surface as a curve.
      • getDerivatives

        java.util.List<java.util.List<Vector<javax.measure.quantity.Length>>> getDerivatives​(GeomPoint st,
                                                                                             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 Surface>
        Parameters:
        st - The 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 int 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 or the parameter values are invalid.
      • getSDerivatives

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

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

        Parameters:
        s - 1st parametric dimension distance to calculate derivative for (0.0 to 1.0 inclusive).
        t - 2nd parametric dimension distance to calculate derivative for (0.0 to 1.0 inclusive).
        grade - The maximum grade to calculate the u-derivatives for (1=1st derivative, 2=2nd derivative, etc)
        Returns:
        A list of s-derivatives up to the specified grade of the surface at the specified parametric position.
        Throws:
        java.lang.IllegalArgumentException - if the grade is < 0 or the parameter values are invalid.
      • getSDerivatives

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

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

        Parameters:
        st - The parametric position to calculate the derivatives for. Must be a 2-dimensional point with 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 s-derivatives up to the specified grade of the surface at the specified parametric position.
        Throws:
        java.lang.IllegalArgumentException - if the grade is < 0 or the parameter values are invalid.
      • getTDerivatives

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

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

        Parameters:
        s - 1st parametric dimension distance to calculate derivative for (0.0 to 1.0 inclusive).
        t - 2nd parametric dimension distance to calculate derivative for (0.0 to 1.0 inclusive).
        grade - The maximum grade to calculate the v-derivatives for (1=1st derivative, 2=2nd derivative, etc)
        Returns:
        A list of t-derivatives up to the specified grade of the surface at the specified parametric position.
        Throws:
        java.lang.IllegalArgumentException - if the grade is < 0 or the parameter values are invalid.
      • getTDerivatives

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

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

        Parameters:
        st - The parametric position to calculate the derivatives for. Must be a 2-dimensional point with 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 t-derivatives up to the specified grade of the surface at the specified parametric position.
        Throws:
        java.lang.IllegalArgumentException - if the grade is < 0 or the parameter values are invalid.
      • getSDerivative

        Vector<javax.measure.quantity.Length> getSDerivative​(GeomPoint st,
                                                             int grade)
        Calculate a derivative with respect to parametric s-distance of the given grade on the surface for the given parametric position on the surface, d^{grade}p(s,t)/d^{grade}s.

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

        Parameters:
        st - The parametric position to calculate the derivative for. Must be a 2-dimensional point with each value in the range 0 to 1.0. Units are ignored.
        grade - The grade to calculate the derivative for (1=1st derivative, 2=2nd derivative, etc)
        Returns:
        The specified s-derivative of the surface at the specified parametric position.
        Throws:
        java.lang.IllegalArgumentException - if the grade is < 0 or the parameter values are invalid.
      • getTDerivative

        Vector<javax.measure.quantity.Length> getTDerivative​(GeomPoint st,
                                                             int grade)
        Calculate a derivative with respect to parametric t-distance of the given grade on the surface for the given parametric position on the surface, d^{grade}p(s,t)/d^{grade}t.

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

        Parameters:
        st - The parametric position to calculate the derivative for. Must be a 2-dimensional point with each value in the range 0 to 1.0. Units are ignored.
        grade - The grade to calculate the derivative for (1=1st derivative, 2=2nd derivative, etc)
        Returns:
        The specified t-derivative of the surface at the specified parametric position.
        Throws:
        java.lang.IllegalArgumentException - if the grade is < 0 or the parameter values are invalid.
      • getSDerivative

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

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

        Parameters:
        s - 1st parametric dimension distance to calculate derivative for (0.0 to 1.0 inclusive).
        t - 2nd parametric dimension distance to calculate 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 s-derivative of the surface at the specified parametric position.
        Throws:
        java.lang.IllegalArgumentException - if the grade is < 0 or the parameter values are invalid.
      • getTDerivative

        Vector<javax.measure.quantity.Length> getTDerivative​(double s,
                                                             double t,
                                                             int grade)
        Calculate all the derivatives from 0 to grade with respect to parametric t-position on the surface for the given parametric position on the surface, d^{grade}p(s,t)/d^{grade}t.

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

        Parameters:
        s - 1st parametric dimension distance to calculate derivative for (0.0 to 1.0 inclusive).
        t - 2nd parametric dimension distance to calculate derivative for (0.0 to 1.0 inclusive).
        grade - The maximum grade to calculate the v-derivatives for (1=1st derivative, 2=2nd derivative, etc)
        Returns:
        The specified t-derivative of the surface at the specified parametric position.
        Throws:
        java.lang.IllegalArgumentException - if the grade is < 0 or the parameter values are invalid.
      • getTwistVector

        Vector<javax.measure.quantity.Length> getTwistVector​(double s,
                                                             double t)
        Calculate the twist vector (d^2P/(ds*dt) = d(dP/ds)/dt) for this surface at the specified position on this surface.
        Parameters:
        s - 1st parametric dimension distance to calculate twist vector for (0.0 to 1.0 inclusive).
        t - 2nd parametric dimension distance to calculate twist vector for (0.0 to 1.0 inclusive).
        Returns:
        The twist vector of this surface at the specified parametric position.
        Throws:
        java.lang.IllegalArgumentException - if the parameter values are invalid.
      • getTwistVector

        Vector<javax.measure.quantity.Length> getTwistVector​(GeomPoint st)
        Calculate the twist vector (d^2P/(ds*dt) = d(dP/ds)/dt) for this surface at the specified position on this surface.
        Parameters:
        st - The parametric position to calculate the twist vector for. Must be a 2-dimensional point with each value in the range 0 to 1.0. Units are ignored.
        Returns:
        The twist vector of this surface at the specified parametric position.
        Throws:
        java.lang.IllegalArgumentException - if the parameter values are invalid.
      • getNormal

        Vector<javax.measure.quantity.Dimensionless> getNormal​(double s,
                                                               double t)
        Return the normal vector for this surface at the given parametric position (s,t) on this surface.
        Parameters:
        s - 1st parametric dimension distance to calculate normal for (0.0 to 1.0 inclusive).
        t - 2nd parametric dimension distance to calculate normal for (0.0 to 1.0 inclusive).
        Returns:
        The normal vector of the surface at the specified parametric position.
      • getNormal

        Vector<javax.measure.quantity.Dimensionless> getNormal​(GeomPoint st)
        Return the normal vector for this surface at the given parametric position (s,t) on this surface.
        Parameters:
        st - The parametric position to calculate the normal for. Must be a 2-dimensional point with each value in the range 0 to 1.0. Units are ignored.
        Returns:
        The normal vector of the surface at the specified parametric position.
      • getTangentPlane

        Plane getTangentPlane​(double s,
                              double t)
        Return the tangent plane to this surface at the given parametric position (s,t) on this surface.
        Parameters:
        s - 1st parametric dimension distance to calculate tangent plane for (0.0 to 1.0 inclusive).
        t - 2nd parametric dimension distance to calculate tangent plane for (0.0 to 1.0 inclusive).
        Returns:
        The tangent plane of the surface at the specified parametric position.
      • getTangentPlane

        Plane getTangentPlane​(GeomPoint st)
        Return the tangent plane to this surface at the given parametric position (s,t) on this surface.
        Parameters:
        st - The parametric position to calculate the tangent plane for. Must be a 2-dimensional point with each value in the range 0 to 1.0. Units are ignored.
        Returns:
        The tangent plane of the surface at the specified parametric position.
      • getGaussianCurvature

        Parameter getGaussianCurvature​(double s,
                                       double t)
        Returns the Gaussian Curvature for this surface at the given parametric position (s,t) on this surface.
        Parameters:
        s - 1st parametric dimension distance to calculate curvature for (0.0 to 1.0 inclusive).
        t - 2nd parametric dimension distance to calculate curvature for (0.0 to 1.0 inclusive).
        Returns:
        The Gaussian curvature of the surface at the specified parametric position in units of 1/Length^2.
      • getGaussianCurvature

        Parameter getGaussianCurvature​(GeomPoint st)
        Returns the Gaussian Curvature for this surface at the given parametric position (s,t) on this surface.
        Parameters:
        st - The parametric position to calculate the curvature for. Must be a 2-dimensional point with each value in the range 0 to 1.0. Units are ignored.
        Returns:
        The Gaussian curvature of the surface at the specified parametric position in units of 1/Length^2.
      • getMeanCurvature

        Parameter getMeanCurvature​(double s,
                                   double t)
        Returns the Mean Curvature for this surface at the given parametric position (s,t) on this surface.
        Parameters:
        s - 1st parametric dimension distance to calculate curvature for (0.0 to 1.0 inclusive).
        t - 2nd parametric dimension distance to calculate curvature for (0.0 to 1.0 inclusive).
        Returns:
        The Mean curvature of the surface at the specified parametric position in units of 1/Length.
      • getMeanCurvature

        Parameter getMeanCurvature​(GeomPoint st)
        Returns the Mean Curvature for this surface at the given parametric position (s,t) on this surface.
        Parameters:
        st - The parametric position to calculate the curvature for. Must be a 2-dimensional point with each value in the range 0 to 1.0. Units are ignored.
        Returns:
        The Mean curvature of the surface at the specified parametric position in units of 1/Length.
      • getArea

        Parameter<javax.measure.quantity.Area> getArea​(double eps)
        Return the surface area of this entire surface.
        Parameters:
        eps - The desired fractional accuracy on the surface area.
        Returns:
        the surface area of this surface.
      • getArea

        Parameter<javax.measure.quantity.Area> getArea​(double s1,
                                                       double t1,
                                                       double s2,
                                                       double t2,
                                                       double eps)
        Return the surface area of a portion of this surface.
        Parameters:
        s1 - The starting 1st parametric dimension distance to calculate area for (0.0 to 1.0 inclusive).
        t1 - The starting 2nd parametric dimension distance to calculate area for (0.0 to 1.0 inclusive).
        s2 - The ending 1st parametric dimension distance to calculate area for (0.0 to 1.0 inclusive).
        t2 - The ending 2nd parametric dimension distance to calculate area for (0.0 to 1.0 inclusive).
        eps - The desired fractional accuracy on the surface area.
        Returns:
        the surface area of a portion of this surface.
      • getArea

        Parameter<javax.measure.quantity.Area> getArea​(GeomPoint st1,
                                                       GeomPoint st2,
                                                       double eps)
        Return the surface area of a portion of this surface.
        Parameters:
        st1 - The starting parametric position to calculate the area for. Must be a 2-dimensional point with each value in the range 0 to 1.0. Units are ignored.
        st2 - The ending parametric position to calculate the area for. Must be a 2-dimensional point with each value in the range 0 to 1.0. Units are ignored.
        eps - The desired fractional accuracy on the surface area.
        Returns:
        the surface area of a portion of this surface.
      • getVolume

        Parameter<javax.measure.quantity.Volume> getVolume​(double eps)
        Return the enclosed volume of this entire surface.
        Parameters:
        eps - The desired fractional accuracy on the enclosed volume.
        Returns:
        the enclosed volume of this surface.
      • getVolume

        Parameter<javax.measure.quantity.Volume> getVolume​(double s1,
                                                           double t1,
                                                           double s2,
                                                           double t2,
                                                           double eps)
        Return the enclosed volume of a portion of this surface.
        Parameters:
        s1 - The starting 1st parametric dimension distance to calculate volume for (0.0 to 1.0 inclusive).
        t1 - The starting 2nd parametric dimension distance to calculate volume for (0.0 to 1.0 inclusive).
        s2 - The ending 1st parametric dimension distance to calculate volume for (0.0 to 1.0 inclusive).
        t2 - The ending 2nd parametric dimension distance to calculate volume for (0.0 to 1.0 inclusive).
        eps - The desired fractional accuracy on the enclosed volume.
        Returns:
        the enclosed volume of a portion of this surface.
      • getVolume

        Parameter<javax.measure.quantity.Volume> getVolume​(GeomPoint st1,
                                                           GeomPoint st2,
                                                           double eps)
        Return the enclosed volume of a portion of this surface.
        Parameters:
        st1 - The starting parametric position to calculate the volume for. Must be a 2-dimensional point with each value in the range 0 to 1.0. Units are ignored.
        st2 - The ending parametric position to calculate the volume for. Must be a 2-dimensional point with each value in the range 0 to 1.0. Units are ignored.
        eps - The desired fractional accuracy on the enclosed volume.
        Returns:
        the enclosed volume of a portion of this surface.
      • extractGrid

        PointArray<SubrangePointextractGrid​(GridRule gridRule,
                                              java.util.List<java.lang.Double> bottomSpacing,
                                              java.util.List<java.lang.Double> topSpacing,
                                              java.util.List<java.lang.Double> leftSpacing,
                                              java.util.List<java.lang.Double> rightSpacing)
        Return an array of SubrangePoint objects that are gridded onto the surface using the specified spacings and gridding rule. 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 edge curves from 0 to 1.
        Parameters:
        gridRule - Specifies whether the subdivision spacing is applied with respect to arc-length in real space or parameter space.
        bottomSpacing - A list of values used to define the subdivision spacing along the T=0 parametric boundary of the surface.
        topSpacing - An optional list of values used to define the subdivision spacing along the T=1 parametric boundary of the surface. If null is passed, the bottomSpacing is used for the top. If topSpacing is provided, then it must have the same number of values as the bottomSpacing.
        leftSpacing - A list of values used to define the subdivision spacing along the S=0 parametric boundary of the surface.
        rightSpacing - An optional list of values used to define the subdivision spacing along the S=1 parametric boundary of the surface. If null is passed, the leftSpacing is used for the right. If rightSpacing is provided, then it must have the same number of values as the leftSpacing.
        Returns:
        An array of SubrangePoint objects gridded onto the surface at the specified parametric positions.
      • gridToTolerance

        PointArray<SubrangePointgridToTolerance​(Parameter<javax.measure.quantity.Length> tol)
        Return an array of points that are gridded onto the surface with the number of points and spacing chosen to result in straight line segments between the points that have mid-points that are all within the specified tolerance of this surface.
        Parameters:
        tol - The maximum distance that a straight line between gridded points may deviate from this surface.
        Returns:
        An array of subrange points gridded onto the surface.
      • getClosest

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

        SubrangePoint getClosest​(GeomPoint point,
                                 double nearS,
                                 double nearT,
                                 double tol)
        Returns the closest point on this surface to the specified point near the specified parametric position.
        Parameters:
        point - The point to find the closest point on this surface to.
        nearS - The parametric s-position where the search for the closest point should begin.
        nearT - The parametric t-position where the search for the closest point should begin.
        tol - Fractional tolerance to refine the distance to.
        Returns:
        The SubrangePoint on this surface that is closest to the specified point near the specified parametric position.
      • getClosest

        PointArray<SubrangePointgetClosest​(java.util.List<? extends java.util.List<GeomPoint>> points,
                                             double tol)
        Returns the array of closest points on this surface to the specified array (list of lists) of points.
        Parameters:
        points - A list of lists of points to find the closest point on this surface to.
        tol - Fractional tolerance to refine the distance to.
        Returns:
        The PointArray of SubrangePoint on this surface that is closest to the specified list of lists of points.
      • getFarthest

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

        SubrangePoint getFarthest​(GeomPoint point,
                                  double nearS,
                                  double nearT,
                                  double tol)
        Returns the farthest point on this surface from the specified point near the specified parametric position on the surface.
        Parameters:
        point - The point to find the farthest point on this surface from.
        nearS - The parametric s-position where the search for the closest point should begin.
        nearT - The parametric t-position where the search for the closest point should begin.
        tol - Fractional tolerance to refine the distance to.
        Returns:
        The SubrangePoint on this surface that is farthest from the specified point.
      • getFarthest

        PointArray<SubrangePointgetFarthest​(java.util.List<? extends java.util.List<GeomPoint>> points,
                                              double tol)
        Returns the array of farthest points on this surface from the specified array (list of lists) of points.
        Parameters:
        points - A list of lists of points to find the farthest point on this surface from.
        tol - Fractional tolerance to refine the distance to.
        Returns:
        The PointArray of SubrangePoint on this surface that is farthest from the specified list of lists of points.
      • getClosest

        PointString<SubrangePointgetClosest​(Curve curve,
                                              double tol)
        Returns the closest points (giving the minimum distance) between this surface and the specified curve. If the specified curve intersects this 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 the specified curve is parallel to this surface (all points are equidistant away), then any point between this surface and the specified curve could be returned as the "closest".
        Parameters:
        curve - The curve to find the closest points between this surface and that curve on.
        tol - Fractional tolerance to refine the distance to.
        Returns:
        A list containing two SubrangePoint objects that represent the closest point on this surface (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 surface and the specified surface. If the specified surface intersects this 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 the specified surface is parallel to this surface (all points are equidistant away), then any point between this surface and the specified surface could be returned as the "closest".
        Parameters:
        surface - The surface to find the closest points between this surface and that surface on.
        tol - Fractional tolerance to refine the distance to.
        Returns:
        A list containing two SubrangePoint objects that represent the closest point on this surface (index 0) and the closest point on the specified surface (index 1).
      • getClosest

        SubrangePoint getClosest​(GeomPlane plane,
                                 double tol)
        Returns the closest point (giving the minimum distance) between this surface and the specified plane. If the specified plane intersects this 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 the specified plane is parallel to this surface (all points are equidistant away), then any point between this surface and the specified plane could be returned as the "closest".
        Parameters:
        plane - The plane to find the closest points between this surface and that plane on.
        tol - Fractional tolerance to refine the distance to.
        Returns:
        A SubrangePoint that represent the closest point on this surface to the specified plane.
      • isDegenerate

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

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

        boolean isPlanar​(double epsFT,
                         double epsELT)
        Return true if this surface is planar or false if it is not.
        Parameters:
        epsFT - Flatness tolerance (cosine of the angle allowable between normal vectors).
        epsELT - Edge linearity tolerance (cosine of the angle allowable between edge vectors).
        Returns:
        true if this surface is planar.
      • intersect

        PointString<SubrangePointintersect​(GeomPoint L0,
                                             GeomVector Ldir,
                                             Parameter<javax.measure.quantity.Length> tol)
        Return the intersections between an infinite line and this surface.
        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 surface with the specified infinite 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 intersections between a line segment and this surface.
        Parameters:
        line - A line segment to intersect with this surface.
        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 surface and the input line segment respectively, made by the intersection of this surface 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 intersections between a curve and this surface.
        Parameters:
        curve - The curve to intersect with this surface.
        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 surface and the input curve respectively, made by the intersection of this surface with the specified curve. If no intersections are found a list of two empty PointStrings are returned.
      • intersect

        GeomList<SubrangeCurveintersect​(GeomPlane plane,
                                          Parameter<javax.measure.quantity.Length> tol)
        Return the intersections between an infinite plane and this surface.
        Parameters:
        plane - The infinite plane to intersect with this surface.
        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 surface with the specified infinite plane. If no intersection is found, an empty PointString is returned.
      • intersect

        GeomList<GeomList<SubrangeCurve>> intersect​(Surface surface,
                                                    Parameter<javax.measure.quantity.Length> tol)
        Return the intersections between another surface and this surface.
        Parameters:
        surface - A surface to intersect with this surface.
        tol - Tolerance (in physical space) to refine the point positions to.
        Returns:
        A list containing two lists of SubrangeCurve objects. Each list contains zero or more subrange curves, on this surface and the input surface respectively, made by the intersection of this surface with the specified surface. If no intersections are found a list of two empty lists is returned.