Package geomss.geom

Interface ParametricGeometry<T extends ParametricGeometry>

    • Method Detail

      • getPoint

        SubrangePoint getPoint​(GeomPoint s)
        Return a subrange point on the parametric geometry for the given parametric distance along the parametric geometry.
        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.
        Returns:
        The subrange point
      • getRealPoint

        Point getRealPoint​(GeomPoint s)
        Calculate a point on the parametric geometry for the given parametric distance along the parametric geometry.
        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.
        Returns:
        The 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.

        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 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.
      • getClosest

        SubrangePoint getClosest​(GeomPoint point,
                                 double tol)
        Returns the closest point on this parametric object to the specified point.
        Parameters:
        point - The point to find the closest point on this parametric object to.
        tol - Fractional tolerance (in parameter space) to refine the point position to.
        Returns:
        The point on this parametric object that is closest to the specified point.
      • getFarthest

        SubrangePoint getFarthest​(GeomPoint point,
                                  double tol)
        Returns the farthest point on this parametric object from the specified point.
        Parameters:
        point - The point to find the farthest point on this parametric object from.
        tol - Fractional tolerance (in parameter space) to refine the point position to.
        Returns:
        The SubrangePoint on this parametric object that is farthest from the specified point.
      • isDegenerate

        boolean isDegenerate​(Parameter<javax.measure.quantity.Length> tol)
        Return true if this element is degenerate (i.e.: has length or area less than the specified tolerance).
        Parameters:
        tol - The tolerance for determining if this element is degenerate. May not be null.
        Returns:
        true if this element is degenerate.
      • to

        T to​(javax.measure.unit.Unit<javax.measure.quantity.Length> unit)
        throws javax.measure.converter.ConversionException
        Returns the equivalent to this parametric object but stated in the specified unit.
        Specified by:
        to in interface GeomElement<T extends ParametricGeometry>
        Parameters:
        unit - the length unit of the parametric object to be returned.
        Returns:
        an equivalent to this parametric object 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 parametric geometry 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 ParametricGeometry>
        Parameters:
        newDim - The dimension of the parametric geometry element to return.
        Returns:
        This parametric geometry element converted to the new dimensions.
      • 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 ParametricGeometry>
        Returns:
        an identical and independent copy of this object.