Class NurbsSurface

    • Method Detail

      • getControlPoints

        public abstract ControlPointNet getControlPoints()
        Return a matrix or network of control points for this surface.
        Returns:
        the ordered control points
      • getNumberOfRows

        public abstract int getNumberOfRows()
        Return the control point matrix size in the s-direction (down a column of control points).
        Returns:
        The control point matrix size in the s-direction
      • getNumberOfColumns

        public abstract int getNumberOfColumns()
        Return the control point matrix size in the t-direction (across the columns of control points).
        Returns:
        The control point matrix size in the t-direction
      • getSKnotVector

        public abstract KnotVector getSKnotVector()
        Return the s-direction knot vector of this surface.
        Returns:
        The s-knot vector.
      • getTKnotVector

        public abstract KnotVector getTKnotVector()
        Return the t-direction knot vector of this surface.
        Returns:
        The t-knot vector.
      • getSDegree

        public abstract int getSDegree()
        Return the s-degree of the NURBS surface.
        Returns:
        s-degree of surface
      • getTDegree

        public abstract int getTDegree()
        Return the t-degree of the NURBS surface.
        Returns:
        t-degree of surface
      • transpose

        public NurbsSurface 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.
        Specified by:
        transpose in interface Surface<NurbsSurface>
        Overrides:
        transpose in class AbstractSurface<NurbsSurface>
        Returns:
        A new surface that is identical to this one but with the transpose of the parameterization of this surface.
      • reverseS

        public NurbsSurface 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

        public NurbsSurface 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()
      • splitAtS

        public GeomList<NurbsSurfacesplitAtS​(double s)
        Split this NurbsSurface 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.
      • splitAtT

        public GeomList<NurbsSurfacesplitAtT​(double t)
        Split this NurbsSurface 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.
      • getT0Curve

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

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

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

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

        public BasicNurbsCurve getSCurve​(int index)
        Return the S-curve with the specified index from this surface as a NURBS curve.
        Parameters:
        index - The T-index for the curve to return from 0 to getNumberOfColumns()-1.
        Returns:
        The BasicNurbsCurve built from the specified column in the ControlPointNet.
      • getTCurve

        public BasicNurbsCurve getTCurve​(int index)
        Return the T-curve with the specified index from this surface as a NURBS curve.
        Parameters:
        index - The S-index for the curve to return from 0 to getNumberOfRows()-1.
        Returns:
        The BasicNurbsCurve built from the specified row in the ControlPointNet.
      • insertSKnot

        public BasicNurbsSurface insertSKnot​(double s,
                                             int r)
        Create and return a new NURBS surface that is geometrically identical to this one but with a new knot inserted at the specified parametric S-location. The parameterization of the new surface is identical to this one, but the new surface will have a new knot at the specified s-location and a new set of control points.
        Parameters:
        s - The parametric s-position where the new knot should be inserted from 0 to 1.
        r - The number of times that a knot should be inserted at the specified position.
        Returns:
        A new NURBS surface that is identical to this one, but with a new knot inserted in the specified parametric s-position.
      • insertTKnot

        public BasicNurbsSurface insertTKnot​(double t,
                                             int r)
        Create and return a new NURBS surface that is geometrically identical to this one but with a new knot inserted at the specified parametric T-location. The parameterization of the new surface is identical to this one, but the new surface will have a new knot at the specified T-location and a new set of control points.
        Parameters:
        t - The parametric T-position where the new knot should be inserted from 0 to 1.
        r - The number of times that a knot should be inserted at the specified position.
        Returns:
        A new NURBS surface that is identical to this one, but with new knots inserted in the specified parametric T-position.
      • mergeSKnotVector

        public NurbsSurface mergeSKnotVector​(Float64Vector Um)
        Return a NURBS surface that is geometrically identical to this one but with the specified list of knots merged into it's S-knot vector. The parameterization of the new surface is identical to this surface, but the new surface will have any new knots at the specified locations added and a new set of control points. If the input knot list matches the knot list in the S direction of this surface, then this surface is returned.
        Parameters:
        Um - The knot vector to merge with this surface's S-knot vector.
        Returns:
        A NURBS surface that is identical to this one, but with the merger of the input knot vector and this surface's S-knot vector.
      • mergeTKnotVector

        public NurbsSurface mergeTKnotVector​(Float64Vector Um)
        Return a NURBS surface that is geometrically identical to this one but with the specified list of knots merged into it's T-knot vector. The parameterization of the new surface is identical to this surface, but the new surface will have any new knots at the specified locations added and a new set of control points. If the input knot list matches the knot list in the T direction of this surface, then this surface is returned.
        Parameters:
        Um - The knot vector to merge with this surface's T-knot vector. May not be null.
        Returns:
        A NURBS surface that is identical to this one, but with the merger of the input knot vector and this surface's T knot vector.
      • refineSKnotVector

        public BasicNurbsSurface refineSKnotVector​(double[] newKnots)
        Create and return a new NURBS surface that is geometrically identical to this one but with the specified list of knots inserted into it's S-knot vector. The parameterization of the new surface is identical to this surface, but the new surface will have the new knots at the specified locations in the S-direction and a new set of control points. This is more efficient than repeatedly calling insertSKnot() for multiple knot insertions.
        Parameters:
        newKnots - The parametric S-locations where the knots are to be inserted. May not be null.
        Returns:
        A new NURBS surface that is identical to this one, but with the new knots inserted at the specified locations in the parametric S-direction.
      • refineSKnotVector

        public BasicNurbsSurface refineSKnotVector​(Float64Vector newKnots)
        Create and return a new NURBS surface that is geometrically identical to this one but with the specified list of knots inserted into it's S-knot vector. The parameterization of the new surface is identical to this surface, but the new surface will have the new knots at the specified locations in the S-direction and a new set of control points. This is more efficient than repeatedly calling insertSKnot() for multiple knot insertions.
        Parameters:
        newKnots - The parametric S-locations where the knots are to be inserted. May not be null.
        Returns:
        A new NURBS surface that is identical to this one, but with the new knots inserted at the specified locations in the parametric S-direction.
      • refineTKnotVector

        public BasicNurbsSurface refineTKnotVector​(double[] newKnots)
        Create and return a new NURBS surface that is geometrically identical to this one but with the specified list of knots inserted into it's T-knot vector. The parameterization of the new surface is identical to this surface, but the new surface will have the new knots at the specified locations in the T-direction and a new set of control points. This is more efficient than repeatedly calling insertTKnot() for multiple knot insertions.
        Parameters:
        newKnots - The parametric T-locations where the knots are to be inserted. May not be null.
        Returns:
        A new NURBS surface that is identical to this one, but with the new knots inserted at the specified locations in the parametric T-direction.
      • refineTKnotVector

        public BasicNurbsSurface refineTKnotVector​(Float64Vector newKnots)
        Create and return a new NURBS surface that is geometrically identical to this one but with the specified list of knots inserted into it's T-knot vector. The parameterization of the new surface is identical to this surface, but the new surface will have the new knots at the specified locations in the T-direction and a new set of control points. This is more efficient than repeatedly calling insertTKnot() for multiple knot insertions.
        Parameters:
        newKnots - The parametric T-locations where the knots are to be inserted. May not be null.
        Returns:
        A new NURBS surface that is identical to this one, but with the new knots inserted at the specified locations in the parametric T-direction.
      • removeSKnot

        public NurbsSurface removeSKnot​(int index,
                                        int numRemovals,
                                        Parameter<javax.measure.quantity.Length> tolerance)
        Attempts to remove the knot in the S-direction with the specified index from this NURBS surface the specified number of times. If the knot can not be removed without changing the shape of the surface, then a reference to this surface is returned: if (srf == srf.removeKnot(...)) { no knots removed }.
        Parameters:
        index - The index of the knot to be removed (degree + 1 ≤ index < knot vector length - degree).
        numRemovals - The number of times that the knot at "index" should be removed (1 ≤ num ≤ multiplicity of the knot). If numRemovals is > multiplicity of the knot, then numRemovals is set to the multiplicity of the knot.
        tolerance - The knot(s) specified will be removed as long as the deviation of the surface is everywhere less than this tolerance. May not be null.
        Returns:
        A new NURBS surface that is identical to this one (to within the specified tolerance), but with the specified knot in the S-direction removed or a reference to this surface if the knot could not be removed.
      • removeTKnot

        public NurbsSurface removeTKnot​(int index,
                                        int numRemovals,
                                        Parameter<javax.measure.quantity.Length> tolerance)
        Attempts to remove the knot in the T-direction with the specified index from this NURBS surface the specified number of times. If the knot can not be removed without changing the shape of the surface, then a reference to this surface is returned: if (srf == srf.removeKnot(...)) { no knots removed }.
        Parameters:
        index - The index of the knot to be removed (degree + 1 ≤ index < knot vector length - degree).
        numRemovals - The number of times that the knot at "index" should be removed (1 ≤ num ≤ multiplicity of the knot). If numRemovals is > multiplicity of the knot, then numRemovals is set to the multiplicity of the knot.
        tolerance - The knot(s) specified will be removed as long as the deviation of the surface is everywhere less than this tolerance. May not be null.
        Returns:
        A new NURBS surface that is identical to this one (to within the specified tolerance), but with the specified knot in the T-direction removed or a reference to this surface if the knot could not be removed.
      • getTransformed

        public NurbsSurfaceTrans getTransformed​(GTransform transform)
        Returns transformed version of this element. The returned object implements GeomTransform and contains this element as a child.
        Parameters:
        transform - The transformation to apply to this geometry. May not be null.
        Returns:
        A new triangle that is identical to this one with the specified transformation applied.
        Throws:
        DimensionException - if this point is not 3D.
      • toNurbs

        public NurbsSurface toNurbs​(Parameter<javax.measure.quantity.Length> tol)
        Return a NURBS surface representation of this surface to within the specified tolerance. This implementation returns a reference to this surface itself since it is already a NURBS surface and the tolerance parameter is ignored.
        Parameters:
        tol - Ignored. May pass null.
        Returns:
        A reference to this NURBS surface is returned.
      • toNurbs

        public NurbsSurface toNurbs()
        Return a NURBS surface representation of this surface. An exact representation is returned.
        Returns:
        A reference to this NURBS surface is returned.
      • isValid

        public boolean isValid()
        Return true if this NurbsSurface contains valid and finite numerical components. A value of false will be returned if any of the control point values or knots are NaN or Inf.
        Returns:
        true if this NurbsSurface contains valid and finite numerical components.
      • isPlanar

        public boolean isPlanar​(Parameter<javax.measure.quantity.Length> tol)
        Return true if this surface is planar or false if it is not.
        Specified by:
        isPlanar in interface Surface<NurbsSurface>
        Overrides:
        isPlanar in class AbstractSurface<NurbsSurface>
        Parameters:
        tol - The geometric tolerance to use in determining if the surface is planar. May not be null.
        Returns:
        true if this surface is planar.
      • toText

        public javolution.text.Text toText()
        Returns the text representation of this geometry element that consists of the name followed by the control point values, followed by the knot vectors.
        Specified by:
        toText in interface GeomElement<NurbsSurface>
        Overrides:
        toText in class AbstractGeomElement<NurbsSurface>
        Returns:
        the text representation of this geometry element.