|
AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
|
Represents a NURBS patch defined by a 2D array of control points. More...
#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/develop/src/axom/primal/geometry/NURBSPatch.hpp>
Public Types | |
| using | VectorType = Vector< T, NDIMS > |
| using | PlaneType = Plane< T, NDIMS > |
| using | CoordsVec = axom::Array< PointType, 1 > |
| using | CoordsMat = axom::Array< PointType, 2 > |
| using | WeightsVec = axom::Array< T, 1 > |
| using | WeightsMat = axom::Array< T, 2 > |
| using | KnotVectorType = KnotVector< T > |
| using | BoundingBoxType = BoundingBox< T, NDIMS > |
| using | OrientedBoundingBoxType = OrientedBoundingBox< T, NDIMS > |
| using | NURBSCurveType = primal::NURBSCurve< T, NDIMS > |
| using | TrimmingCurveType = primal::NURBSCurve< T, 2 > |
| using | TrimmingCurveVec = axom::Array< TrimmingCurveType > |
| using | ParameterPointType = Point< T, 2 > |
| using | ParameterBoundingBoxType = BoundingBox< T, 2 > |
Public Member Functions | |
| AXOM_STATIC_ASSERT_MSG ((NDIMS==1)||(NDIMS==2)||(NDIMS==3), "A NURBS Patch object may be defined in 1-, 2-, or 3-D") | |
| AXOM_STATIC_ASSERT_MSG (std::is_arithmetic< T >::value, "A NURBS Patch must be defined using an arithmetic type") | |
Query/modify patch properties (degree, rationality, ...) | |
| void | setParameters (int npts_u, int npts_v, int deg_u, int deg_v) |
| Reset the degree and resize arrays of points (and weights) More... | |
| void | setDegree_u (int deg) |
| Reset the knot vector in u. More... | |
| void | setDegree_v (int deg) |
| Reset the knot vector in v. More... | |
| void | setDegree (int deg_u, int deg_v) |
| Reset the knot vector and increase the number of control points. More... | |
| int | getDegree_u () const |
| Returns the degree of the NURBS Patch on the first axis. More... | |
| int | getDegree_v () const |
| Returns the degree of the NURBS Patch on the second axis. More... | |
| int | getOrder_u () const |
| Returns the order (degree + 1) of the NURBS Patch on the first axis. More... | |
| int | getOrder_v () const |
| Returns the order of the NURBS Patch on the second axis. More... | |
| void | setNumControlPoints (int npts_u, int npts_v) |
| Set the number control points in u. More... | |
| int | getNumControlPoints_u () const |
| Returns the number of control points in the NURBS Patch on the first axis. More... | |
| int | getNumControlPoints_v () const |
| Returns the number of control points in the NURBS Patch on the second axis. More... | |
| void | setNumControlPoints_u (int npts) |
| Set the number control points in u. More... | |
| void | setNumControlPoints_v (int npts) |
| Set the number control points in v. More... | |
| void | clear () |
| Clears the list of control points, make nonrational. More... | |
| bool | isRational () const |
| Use array size as flag for rationality. More... | |
| void | makeRational () |
| Make trivially rational. If already rational, do nothing. More... | |
| void | makeNonrational () |
| Make nonrational by shrinking array of weights. More... | |
| bool | isValidNURBS () const |
| Function to check if the NURBS surface is valid. More... | |
Query/modify patch's geometry (control points, weights, bounding box, ...) | |
| PointType & | operator() (int ui, int vi) |
| Retrieves the control point at index (idx_p, idx_q) More... | |
| const PointType & | operator() (int ui, int vi) const |
| Retrieves the vector of control points at index idx. More... | |
| CoordsMat & | getControlPoints () |
| Returns a reference to the NURBS patch's control points. More... | |
| const CoordsMat & | getControlPoints () const |
| Returns a reference to the NURBS patch's control points. More... | |
| const T & | getWeight (int ui, int vi) const |
| Get a specific weight. More... | |
| void | setWeight (int ui, int vi, T weight) |
| Set the weight at a specific index. More... | |
| WeightsMat & | getWeights () |
| Returns a reference to the NURBS patch's weights. More... | |
| const WeightsMat & | getWeights () const |
| Returns a const reference to the NURBS patch's weights. More... | |
| BoundingBoxType | boundingBox () const |
| Returns an axis-aligned bounding box containing the patch. More... | |
| OrientedBoundingBoxType | orientedBoundingBox () const |
| Returns an oriented bounding box containing the patch. More... | |
Methods for (untrimmed) Patch Parameterization. | |
These methods operate on the parameterization of the patch leaving the geometry unchanged. | |
| void | setKnot_u (int idx, T knot) |
| Set the knot value in the u vector at a specific index. More... | |
| void | setKnot_v (int idx, T knot) |
| Set the knot value in the v vector at a specific index. More... | |
| void | setKnots_u (const axom::Array< T > &knots, int degree) |
| Set the u knot vector by an axom::Array. More... | |
| void | setKnots_v (const axom::Array< T > &knots, int degree) |
| Set the v knot vector by an axom::Array. More... | |
| void | setKnots_u (const KnotVectorType &knotVector) |
| Set the u knot vector by a KnotVector object. More... | |
| void | setKnots_v (const KnotVectorType &knotVector) |
| Set the v knot vector by a KnotVector object. More... | |
| KnotVectorType & | getKnots_u () |
| Return a reference to the KnotVector instance on the first axis. More... | |
| const KnotVectorType & | getKnots_u () const |
| Return a const reference to the KnotVector instance on the first axis. More... | |
| T | getMinKnot_u () const |
| Get the minimum knot value in the u-axis. More... | |
| T | getMaxKnot_u () const |
| Get the maximum knot value in the u-axis. More... | |
| T | getParameterSpaceDiagonal () const |
| Get the length of the parameter space bounding box. More... | |
| KnotVectorType & | getKnots_v () |
| Return a reference to the KnotVector instance on the second axis. More... | |
| const KnotVectorType & | getKnots_v () const |
| Return a const reference to the KnotVector instance on the second axis. More... | |
| T | getMinKnot_v () const |
| Get the minimum knot value in the v-axis. More... | |
| T | getMaxKnot_v () const |
| Get the maximum knot value in the v-axis. More... | |
| int | getNumKnots_u () const |
| Return the length of the knot vector on the first axis. More... | |
| int | getNumKnots_v () const |
| Return the length of the knot vector on the second axis. More... | |
| axom::IndexType | insertKnot_u (T u, int target_multiplicity=1) |
| Insert a knot to the u knot vector to have the given multiplicity. More... | |
| axom::IndexType | insertKnot_v (T v, int target_multiplicity=1) |
| Insert a knot to the v knot vector to have the given multiplicity. More... | |
| void | reverseTrimmingCurves () |
| Reverses all trimming curves in the patch. More... | |
| void | reverseOrientation (int axis) |
| Reverses the order of one direction of the NURBS patch's control points and weights. More... | |
| void | reverseOrientation_u () |
| Reverses the order of the control points, weights, and knots on the first axis. More... | |
| void | reverseOrientation_v () |
| Reverses the order of the control points, weights, and knots on the second axis. More... | |
| void | swapAxes () |
| Swap the axes such that s(u, v) becomes s(v, u) More... | |
| void | normalize () |
| Normalize the knot vectors to the span [0, 1]. More... | |
| void | normalize_u () |
| Normalize the knot vector in u to the span [0, 1]. More... | |
| void | normalize_v () |
| Normalize the knot vector in v to the span [0, 1]. More... | |
| void | normalizeBySpan () |
| Normalize to the span [0, N] x [0, M] where N and M are the number of spans in u and v. More... | |
| void | rescale (T a, T b) |
| Rescale both knot vectors to the span of [a, b]. More... | |
| void | rescale_u (T a, T b) |
| Rescale the knot vector in u to the span of [a, b]. More... | |
| void | rescale_v (T a, T b) |
| Rescale the knot vector in v to the span of [a, b]. More... | |
| bool | isValidParameter_u (T u, T EPS=1e-8) const |
| Function to check if the u parameter is within the knot span. More... | |
| bool | isValidParameter_v (T v, T EPS=1e-8) const |
| Function to check if the v parameter is within the knot span. More... | |
| bool | isValidInteriorParameter_u (T t) const |
| Checks if given u parameter is interior to the knot span. More... | |
| bool | isValidInteriorParameter_v (T t) const |
| Checks if given v parameter is interior to the knot span. More... | |
| void | scaleParameterSpace (double scaleFactor, bool removeTrimmingCurves=false) |
| Scale the parameter space of the NURBS patch geometry linearly (by tangents) in all directions. More... | |
| void | expandParameterSpace (double expansionAmount_u, double expansionAmount_v, bool removeTrimmingCurves=false) |
| Expand the parameter space of the NURBS patch geometry linearly (by tangents) in all directions by a fixed amount. More... | |
Functions to evaluate (untrimmed) patch and its derivatives and normals along points or lines | |
These methods operate only on the geometry of the patch as defined by the control points and weights. They do not modify nor interact with the trimming curves. | |
| PointType | evaluate (T u, T v) const |
| Evaluate the NURBS patch geometry at a particular parameter value t. More... | |
| NURBSCurveType | isocurve (T uv, int axis) const |
| Returns a NURBS patch isocurve for a fixed parameter value of u or v. More... | |
| NURBSCurveType | isocurve_u (T u) const |
| Returns a NURBS patch isocurve with a fixed value of u. More... | |
| NURBSCurveType | isocurve_v (T v) const |
| Returns a NURBS patch isocurve with a fixed value of v. More... | |
| void | evaluateDerivatives (T u, T v, int d, axom::Array< VectorType, 2 > &ders, bool evalByTotalOrder=false) const |
| Evaluate the NURBS patch geometry derivatives up to order d at parameter u, v. More... | |
| void | evaluateFirstDerivatives (T u, T v, PointType &eval, VectorType &Du, VectorType &Dv) const |
| Evaluates all first derivatives of the NURBS patch geometry at (u, v) More... | |
| void | evaluateLinearDerivatives (T u, T v, PointType &eval, VectorType &Du, VectorType &Dv, VectorType &DuDv) const |
| Evaluates all linear derivatives of the NURBS patch geometry at (u, v) More... | |
| void | evaluateSecondDerivatives (T u, T v, PointType &eval, VectorType &Du, VectorType &Dv, VectorType &DuDu, VectorType &DvDv, VectorType &DuDv) const |
| Evaluates all second derivatives of the NURBS patch geometry at (u, v) More... | |
| VectorType | du (T u, T v) const |
| Computes a tangent in u of the NURBS patch geometry at (u, v) More... | |
| VectorType | dv (T u, T v) const |
| Computes a tangent in v of the NURBS patch geometry at (u, v) More... | |
| VectorType | dudu (T u, T v) const |
| Computes the second derivative in u of the NURBS patch geometry patch at (u, v) More... | |
| VectorType | dvdv (T u, T v) const |
| Computes the second derivative in v of the NURBS patch geometry patch at (u, v) More... | |
| VectorType | dudv (T u, T v) const |
| Computes the mixed second derivative in u and v of the NURBS patch geometry at (u, v) More... | |
| VectorType | dvdu (T u, T v) const |
| Computes the mixed second derivative in u and v of the NURBS patch geometry at (u, v) More... | |
| VectorType | normal (T u, T v) const |
| Computes the normal vector to the NURBS patch geometry at (u, v) More... | |
| VectorType | calculateUntrimmedPatchNormal (int npts=20) const |
| Calculate the average normal for the (untrimmed) patch. More... | |
Methods for (trimmed) Surface Geometry. | |
These methods operate on the visible geometry of the NURBS surface as defined by the patch geometry and the trimming curves which define visibility. | |
| const TrimmingCurveVec & | getTrimmingCurves () const |
| Get array of trimming curves. More... | |
| TrimmingCurveVec & | getTrimmingCurves () |
| Get mutable array of trimming curves. More... | |
| const TrimmingCurveType & | getTrimmingCurve (int idx) const |
| Get a trimming curve by index. More... | |
| void | addTrimmingCurve (const TrimmingCurveType &curve) |
| Add a trimming curve. More... | |
| void | addTrimmingCurves (const TrimmingCurveVec &curves) |
| Add array of trimming curves. More... | |
| void | setTrimmingCurves (const TrimmingCurveVec &curves) |
| Set the array of trimming curves. More... | |
| void | clearTrimmingCurves () |
| Clear trimming curves, but DON'T mark as untrimmed. More... | |
| int | getNumTrimmingCurves () const |
| Get number of trimming curves. More... | |
| bool | isTriviallyTrimmed (double tol=1e-8) const |
| Predicate to check if the patch is "trivially trimmed" in parameter space. More... | |
| bool | isTrimmed () const |
| use boolean flag for trimmed-ness More... | |
| bool | isInvisible () const |
| Predicate to check if the patch is entirely invisible due to trimming state. More... | |
| void | markAsTrimmed () |
| Mark as trimmed. More... | |
| void | makeUntrimmed () |
| Delete all trimming curves. More... | |
| void | makeTriviallyTrimmed () |
| Make trivially trimmed by adding trimming curves at each boundary. More... | |
| bool | isVisible (T u, T v) const |
| Check if a parameter point is visible on the NURBS patch via a trim test. More... | |
| void | clip (T min_u, T max_u, T min_v, T max_v, bool normalizeParameters=false) |
| Restrict the edges of a NURBS surface to the given parameter values, if necessary. More... | |
| void | clipToCurves (double padding=1e-5) |
| Clip the edges of a NURBS surface to the AABB of the trimming curves. More... | |
Functions dealing with (untrimmed) patch subdivision | |
| axom::Array< BezierPatch< T, NDIMS > > | extractBezier () const |
| Splits the NURBS patch geometry (at each internal knot) into several Bezier patches. More... | |
| axom::Array< NURBSPatch< T, NDIMS > > | extractTrimmedBezier () const |
| Splits the NURBS patch geometry into several one-span trimmed NURBS surfaces. More... | |
| VectorType | calculateTrimmedPatchNormal (int npts=20, bool useBezierExtraction=true) const |
| Calculate the average normal for the trimmed patch. More... | |
| std::pair< VectorType, double > | calculateTrimmedPatchNormalArea (int npts=20, bool useBezierExtraction=true) const |
| Calculate the unsigned surface area and integrated normal for the trimmed patch. More... | |
| NURBSPatch | cleanedTrimmedRepresentation (bool normalize_by_span=true, bool ensure_trimmed=true, bool clip_to_curves=true) const |
| Return a "clean" trimmed representation suitable for moment and GWN calculation. More... | |
| template<int ORDER, int NVALS = 4 + (ORDER >= 0 ? 3 : 0) + (ORDER >= 1 ? 9 : 0) + (ORDER >= 2 ? 27 : 0)> | |
| primal::Vector< T, NVALS > | calculateSurfaceMoments (int npts=20, bool useBezierExtraction=false) const |
| Calculate the surface moments for the trimmed patch for GWN evaluation. More... | |
Constructors for NURBSPatch | |
The NURBSPatch class provides a variety of constructors to support flexible initialization. The default constructor creates an empty, invalid patch. Other constructors allow you to specify degrees, control point counts, knot vectors, and weights, either using C-style arrays or axom::Array containers, in both 1D and 2D forms. You can also construct a NURBSPatch from a BezierPatch. Depending on the constructor used, the resulting instance will have:
For 1D arrays, the mapping of control points and weights to the patch is lexicographical, i.e. pts[0] -> nodes[0, 0], ..., pts[npts_v] -> nodes[0, npts_v]
pts[npts_v+1] -> nodes[1, 0], ..., pts[2*npts_v] -> nodes[1, npts_v]
...
pts[npts_u*(npts_v-1)] -> nodes[npts_u, 0], ..., pts[npts_u*npts_v] -> nodes[npts_u, npts_v]
All constructors ensure that the patch is internally consistent and valid, provided the input parameters are valid. | |
| using | PointType = Point< T, NDIMS > |
| NURBSPatch () | |
| Default constructor for an empty (invalid) NURBS patch. More... | |
| NURBSPatch (int deg_u, int deg_v) | |
| Constructor for a simple NURBS surface that reserves space for the minimum (sensible) number of points for the given degrees. More... | |
| NURBSPatch (int npts_u, int npts_v, int deg_u, int deg_v) | |
| Constructor for a simple NURBS surface that reserves space for npts_u * npts_v control points. More... | |
| NURBSPatch (const BezierPatch< T, NDIMS > &bezierPatch) | |
| Constructor for a NURBS surface from a Bezier surface. More... | |
| NURBSPatch (ArrayView< const PointType, 2 > controlPoints, ArrayView< const T, 2 > weights, const KnotVectorType &knotVector_u, const KnotVectorType &knotVector_v) | |
| Constructor for a NURBSPatch from 2D ArrayViews of control points and weights and KnotVectors for the u- and v- directions. More... | |
| NURBSPatch (ArrayView< const PointType, 2 > controlPoints, const KnotVectorType &knotVector_u, const KnotVectorType &knotVector_v) | |
| Constructor for a NURBSPatch from 2D ArrayViews of control points and KnotVectors for the u- and v- directions. More... | |
| NURBSPatch (ArrayView< PointType, 2 > controlPoints, const KnotVectorType &knotVector_u, const KnotVectorType &knotVector_v) | |
| NURBSPatch (ArrayView< PointType, 2 > controlPoints, ArrayView< T, 2 > weights, const KnotVectorType &knotVector_u, const KnotVectorType &knotVector_v) | |
| NURBSPatch (const PointType *pts, int npts_u, int npts_v, int deg_u, int deg_v) | |
| Constructor for a NURBS Patch from an array of coordinates and degrees. More... | |
| NURBSPatch (const PointType *pts, const T *weights, int npts_u, int npts_v, int deg_u, int deg_v) | |
| Constructor for a NURBS Patch from arrays of coordinates and weights. More... | |
| NURBSPatch (const CoordsVec &pts, int npts_u, int npts_v, int deg_u, int deg_v) | |
| Constructor for a NURBS Patch from 1D arrays of coordinates and degrees. More... | |
| NURBSPatch (const CoordsVec &pts, const WeightsVec &weights, int npts_u, int npts_v, int deg_u, int deg_v) | |
| Constructor for a NURBS Patch from 1D arrays of coordinates and weights. More... | |
| NURBSPatch (const CoordsMat &pts, int deg_u, int deg_v) | |
| Constructor for a NURBS Patch from 2D arrays of coordinates and degrees. More... | |
| NURBSPatch (const CoordsMat &pts, const WeightsMat &weights, int deg_u, int deg_v) | |
| Constructor for a NURBS Patch from 2D arrays of coordinates and weights. More... | |
| NURBSPatch (const PointType *pts, int npts_u, int npts_v, const T *knots_u, int nkts_u, const T *knots_v, int nkts_v) | |
| Constructor for a NURBS Patch from C-style arrays of coordinates and knot vectors. More... | |
| NURBSPatch (const PointType *pts, const T *weights, int npts_u, int npts_v, const T *knots_u, int nkts_u, const T *knots_v, int nkts_v) | |
| Constructor for a NURBS Patch from C-style arrays of coordinates and weights. More... | |
| NURBSPatch (const CoordsVec &pts, int npts_u, int npts_v, const axom::Array< T > &knots_u, const axom::Array< T > &knots_v) | |
| Constructor for a NURBS Patch from 1D axom::Array arrays of coordinates and knots. More... | |
| NURBSPatch (const CoordsVec &pts, const WeightsVec &weights, int npts_u, int npts_v, const axom::Array< T > &knots_u, const axom::Array< T > &knots_v) | |
| Constructor for a NURBS Patch from 1D axom::Array arrays of coordinates, weights, and knots. More... | |
| NURBSPatch (const CoordsVec &pts, int npts_u, int npts_v, const KnotVectorType &knotvec_u, const KnotVectorType &knotvec_v) | |
| Constructor for a NURBS Patch from 1D axom::Array arrays of coordinates and KnotVectors. More... | |
| NURBSPatch (const CoordsVec &pts, const WeightsVec &weights, int npts_u, int npts_v, const KnotVectorType &knotvec_u, const KnotVectorType &knotvec_v) | |
| Constructor for a NURBS Patch from 1D axom::Array arrays of coordinates, weights, and KnotVectors. More... | |
| NURBSPatch (const CoordsMat &pts, const axom::Array< T > &knots_u, const axom::Array< T > &knots_v) | |
| Constructor for a NURBS Patch from 2D axom::Array array of coordinates and array of knots. More... | |
| NURBSPatch (const CoordsMat &pts, const WeightsMat &weights, const axom::Array< T > &knots_u, const axom::Array< T > &knots_v) | |
| Constructor for a NURBS Patch from 2D axom::Array array of coordinates, weights, and array of knots. More... | |
| NURBSPatch (const CoordsMat &pts, const KnotVectorType &knotvec_u, const KnotVectorType &knotvec_v) | |
| Constructor for a NURBS Patch from 1D axom::Array array of coordinates and KnotVector objects. More... | |
| NURBSPatch (const CoordsMat &pts, const WeightsMat &weights, const KnotVectorType &knotvec_u, const KnotVectorType &knotvec_v) | |
| Constructor for a NURBS Patch from 2D axom::Array array of coordinates, weights, and KnotVector objects. More... | |
Functions dealing with trimmed patch subdivision | |
| bool | split (T u, T v, NURBSPatch &p1, NURBSPatch &p2, NURBSPatch &p3, NURBSPatch &p4, bool normalizeParameters=false) const |
| Splits a NURBS surface into four NURBS patches. More... | |
| bool | split_u (T u, NURBSPatch &p1, NURBSPatch &p2, bool normalizeParameters=false) const |
| Split the NURBS surface in two along the u direction. More... | |
| bool | split_v (T v, NURBSPatch &p1, NURBSPatch &p2, bool normalizeParameters=false) const |
| Split the NURBS surface in two along the v direction. More... | |
| void | nearBisectOnLongerAxis (NURBSPatch &p1, NURBSPatch &p2) const |
| Split the patch in the longer parametric direction, determined via maximum control-net polyline length. More... | |
| void | diskSplit (T u, T v, T r, NURBSPatch &the_disk, NURBSPatch &the_rest, bool clipDisk=true) const |
| For a disk of radius r and center (u, v), split a NURBS surface into the portion inside/outside. More... | |
| void | diskSplit (T u, T v, T r, NURBSPatch &the_disk, NURBSPatch &the_rest, bool &isDiskInside, bool &isDiskOutside, bool ignoreInteriorDisk, double disk_padding) const |
| Split a NURBS surface into two by cutting out a disk of radius r centered at (u, v) More... | |
| std::ostream & | print (std::ostream &os) const |
| Simple formatted print of a NURBS Patch instance. More... | |
| bool | operator== (const NURBSPatch< T, NDIMS > &lhs, const NURBSPatch< T, NDIMS > &rhs) |
| Equality operator for NURBS patches. More... | |
| bool | operator!= (const NURBSPatch< T, NDIMS > &lhs, const NURBSPatch< T, NDIMS > &rhs) |
| Inequality operator for NURBS patches. More... | |
Represents a NURBS patch defined by a 2D array of control points.
| T | the coordinate type, e.g., double, float, etc. |
A NURBS patch has degrees p and q with knot vectors of length r+1 and s+1 respectively. There is a control net of (n + 1) * (m + 1) points with r+1 = n+p+2 and s+1 = m+q+2. Optionally has an equal number of weights for rational patches.
The patch must be open (clamped on all boundaries) and continuous (unless p = 0 or q = 0)
Nonrational NURBS patches are identified by an empty weights array.
A NURBS surface is identified as trimmed with an internal flag, as an empty trimming curve vector indicates a patch with no visible surface.
| Overload for non const axom::primal::NURBSPatch< T, NDIMS >::PointType |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| using axom::primal::NURBSPatch< T, NDIMS >::VectorType = Vector<T, NDIMS> |
| using axom::primal::NURBSPatch< T, NDIMS >::PlaneType = Plane<T, NDIMS> |
| using axom::primal::NURBSPatch< T, NDIMS >::CoordsVec = axom::Array<PointType, 1> |
| using axom::primal::NURBSPatch< T, NDIMS >::CoordsMat = axom::Array<PointType, 2> |
| using axom::primal::NURBSPatch< T, NDIMS >::WeightsVec = axom::Array<T, 1> |
| using axom::primal::NURBSPatch< T, NDIMS >::WeightsMat = axom::Array<T, 2> |
| using axom::primal::NURBSPatch< T, NDIMS >::KnotVectorType = KnotVector<T> |
| using axom::primal::NURBSPatch< T, NDIMS >::BoundingBoxType = BoundingBox<T, NDIMS> |
| using axom::primal::NURBSPatch< T, NDIMS >::OrientedBoundingBoxType = OrientedBoundingBox<T, NDIMS> |
| using axom::primal::NURBSPatch< T, NDIMS >::NURBSCurveType = primal::NURBSCurve<T, NDIMS> |
| using axom::primal::NURBSPatch< T, NDIMS >::TrimmingCurveType = primal::NURBSCurve<T, 2> |
| using axom::primal::NURBSPatch< T, NDIMS >::TrimmingCurveVec = axom::Array<TrimmingCurveType> |
| using axom::primal::NURBSPatch< T, NDIMS >::ParameterPointType = Point<T, 2> |
| using axom::primal::NURBSPatch< T, NDIMS >::ParameterBoundingBoxType = BoundingBox<T, 2> |
|
inline |
Default constructor for an empty (invalid) NURBS patch.
|
inline |
Constructor for a simple NURBS surface that reserves space for the minimum (sensible) number of points for the given degrees.
| [in] | deg_u,deg_v | The patch's degrees on the first and second axis |
|
inline |
Constructor for a simple NURBS surface that reserves space for npts_u * npts_v control points.
| [in] | npts_u,npts_v | The number of control points on the first and second axis |
| [in] | deg_u,deg_v | The patch's degrees on the first and second axis |
References axom::Array< T, DIM, SPACE, StoragePolicy >::resize(), and SLIC_ASSERT.
|
inlineexplicit |
Constructor for a NURBS surface from a Bezier surface.
| [in] | bezierPatch | the Bezier patch to convert to a NURBS patch |
|
inline |
Constructor for a NURBSPatch from 2D ArrayViews of control points and weights and KnotVectors for the u- and v- directions.
| [in] | controlPoints | 2D ArrayView of control points |
| [in] | weights | 2D ArrayView of weights |
| [in] | knotVector_u,knotVector_v | The knot vectors in the u- and v- directions |
References AXOM_MAYBE_UNUSED, axom::ArrayView< T, DIM, SPACE >::data(), axom::ArrayView< T, DIM, SPACE >::empty(), axom::primal::KnotVector< T >::getDegree(), axom::primal::KnotVector< T >::getNumControlPoints(), axom::primal::NURBSPatch< T, NDIMS >::isValidNURBS(), axom::utilities::max(), axom::Array< T, DIM, SPACE, StoragePolicy >::resize(), axom::ArrayBase< T, DIM, ArrayType >::shape(), and SLIC_ASSERT.
|
inline |
Constructor for a NURBSPatch from 2D ArrayViews of control points and KnotVectors for the u- and v- directions.
|
inline |
|
inline |
|
inline |
Constructor for a NURBS Patch from an array of coordinates and degrees.
| [in] | pts | A 1D C-style array of npts_u*npts_v control points |
| [in] | npts_u,npts_v | The number of control points on the first and second axis |
| [in] | deg_u,deg_v | The patch's degree on the first and second axis |
|
inline |
Constructor for a NURBS Patch from arrays of coordinates and weights.
| [in] | pts | A 1D C-style array of (ord_u+1)*(ord_v+1) control points |
| [in] | weights | A 1D C-style array of (ord_u+1)*(ord_v+1) positive weights |
| [in] | npts_u,npts_v | The number of control points on the first and second axis |
| [in] | deg_u,deg_v | The patch's degree on the first and second axis |
|
inline |
Constructor for a NURBS Patch from 1D arrays of coordinates and degrees.
| [in] | pts | A 1D axom::Array of npts_u*npts_v control points |
| [in] | npts_u,npts_v | The number of control points on the first and second axis |
| [in] | deg_u,deg_v | The patch's degree on the first and second axis |
|
inline |
Constructor for a NURBS Patch from 1D arrays of coordinates and weights.
| [in] | pts | A 1D axom::Array of (ord_u+1)*(ord_v+1) control points |
| [in] | weights | A 1D axom::Array of (ord_u+1)*(ord_v+1) positive weights |
| [in] | npts_u,npts_v | The number of control points on the first and second axis |
| [in] | deg_u,deg_v | The patch's degree on the first and second axis |
|
inline |
Constructor for a NURBS Patch from 2D arrays of coordinates and degrees.
| [in] | pts | A 2D axom::Array of (npts_u, npts_v) control points |
| [in] | deg_u,deg_v | The patch's degree on the first and second axis |
|
inline |
Constructor for a NURBS Patch from 2D arrays of coordinates and weights.
| [in] | pts | A 2D axom::Array of (ord_u+1, ord_v+1) control points |
| [in] | weights | A 2D axom::Array of (ord_u+1, ord_v+1) positive weights |
| [in] | deg_u,deg_v | The patch's degree on the first and second axis |
|
inline |
Constructor for a NURBS Patch from C-style arrays of coordinates and knot vectors.
| [in] | pts | A 1D C-style array of npts_u*npts_v control points |
| [in] | npts_u,npts_v | The number of control points on the first and second axis |
| [in] | knots_u | A 1D C-style array of npts_u + deg_u + 1 knots |
| [in] | nkts_u | The number of knots in the u direction |
| [in] | knots_v | A 1D C-style array of npts_v + deg_v + 1 knots |
| [in] | nkts_v | The number of knots in the v direction |
For clamped and continuous patch axes, npts and the knot vector uniquely determine the degree
|
inline |
Constructor for a NURBS Patch from C-style arrays of coordinates and weights.
| [in] | pts | A 1D C-style array of npts_u*npts_v control points |
| [in] | weights | A 1D C-style array of npts_u*npts_v positive weights |
| [in] | npts_u,npts_v | The number of control points on the first and second axis |
| [in] | knots_u | A 1D C-style array of npts_u + deg_u + 1 knots |
| [in] | nkts_u | The number of knots in the u direction |
| [in] | knots_v | A 1D C-style array of npts_v + deg_v + 1 knots |
| [in] | nkts_v | The number of knots in the v direction |
For clamped and continuous patch axes, npts and the knot vector uniquely determine the degree
|
inline |
Constructor for a NURBS Patch from 1D axom::Array arrays of coordinates and knots.
| [in] | pts | A 1D axom::Array of npts_u*npts_v control points |
| [in] | npts_u,npts_v | The number of control points on the first and second axis |
| [in] | knots_u | An axom::Array of npts_u + deg_u + 1 knots |
| [in] | knots_v | An axom::Array of npts_v + deg_v + 1 knots |
For clamped and continuous patch axes, npts and the knot vector uniquely determine the degree
|
inline |
Constructor for a NURBS Patch from 1D axom::Array arrays of coordinates, weights, and knots.
| [in] | pts | A 1D axom::Array of npts_u*npts_v control points |
| [in] | weights | A 1D axom::Array of npts_u*npts_v positive weights |
| [in] | npts_u,npts_v | The number of control points on the first and second axis |
| [in] | knots_u | An axom::Array of npts_u + deg_u + 1 knots |
| [in] | knots_v | An axom::Array of npts_v + deg_v + 1 knots |
For clamped and continuous patch axes, npts and the knot vector uniquely determine the degree
|
inline |
Constructor for a NURBS Patch from 1D axom::Array arrays of coordinates and KnotVectors.
| [in] | pts | A 1D axom::Array of npts_u*npts_v control points |
| [in] | npts_u,npts_v | The number of control points on the first and second axis |
| [in] | knotvec_u,knotvec_v | KnotVector objects for the first and second axis |
For clamped and continuous patch axes, npts and the knot vectoruniquely determine the degree
|
inline |
Constructor for a NURBS Patch from 1D axom::Array arrays of coordinates, weights, and KnotVectors.
| [in] | pts | A 1D axom::Array of npts_u*npts_v control points |
| [in] | weights | A 1D axom::Array of npts_u*npts_v positive weights |
| [in] | npts_u,npts_v | The number of control points on the first and second axis |
| [in] | knotvec_u,knotvec_v | KnotVector objects for the first and second axis |
For clamped and continuous patch axes, npts and the knot vector uniquely determine the degree
|
inline |
Constructor for a NURBS Patch from 2D axom::Array array of coordinates and array of knots.
| [in] | pts | A 2D axom::Array of (npts_u, npts_v) control points |
| [in] | knots_u | An axom::Array of npts_u + deg_u + 1 knots |
| [in] | knots_v | An axom::Array of npts_v + deg_v + 1 knots |
For clamped and continuous patch axes, npts and the knot vector uniquely determine the degree
|
inline |
Constructor for a NURBS Patch from 2D axom::Array array of coordinates, weights, and array of knots.
| [in] | pts | A 2D axom::Array of (ord_u+1, ord_v+1) control points |
| [in] | weights | A 2D axom::Array of (ord_u+1, ord_v+1) positive weights |
| [in] | knots_u | An axom::Array of npts_u + deg_u + 1 knots |
| [in] | knots_v | An axom::Array of npts_v + deg_v + 1 knots |
For clamped and continuous patch axes, npts and the knot vector uniquely determine the degree
|
inline |
Constructor for a NURBS Patch from 1D axom::Array array of coordinates and KnotVector objects.
| [in] | pts | A 2D axom::Array of (ord_u+1, ord_v+1) control points |
| [in] | knotvec_u,knotvec_v | KnotVector objects for the first and second axis |
For clamped and continuous patch axes, npts and the knot vector uniquely determine the degree
|
inline |
Constructor for a NURBS Patch from 2D axom::Array array of coordinates, weights, and KnotVector objects.
| [in] | pts | A 2D axom::Array of (ord_u+1, ord_v+1) control points |
| [in] | weights | A 2D axom::Array of (ord_u+1, ord_v+1) positive weights |
| [in] | knotvec_u,knotvec_v | KnotVector objects for the first and second axis |
For clamped and continuous patch axes, npts and the knot vector uniquely determine the degree
| axom::primal::NURBSPatch< T, NDIMS >::AXOM_STATIC_ASSERT_MSG | ( | (NDIMS==1)||(NDIMS==2)||(NDIMS==3) | , |
| "A NURBS Patch object may be defined in 1- | , | ||
| 2- | , | ||
| or 3-D" | |||
| ) |
| axom::primal::NURBSPatch< T, NDIMS >::AXOM_STATIC_ASSERT_MSG | ( | std::is_arithmetic< T >::value | , |
| "A NURBS Patch must be defined using an arithmetic type" | |||
| ) |
|
inline |
Reset the degree and resize arrays of points (and weights)
| [in] | npts_u,npts_v | The target number of control points on the first and second axis |
| [in] | deg_u,deg_v | The target degrees on the first and second axis |
References axom::primal::NURBSPatch< T, NDIMS >::isRational(), axom::primal::NURBSPatch< T, NDIMS >::makeNonrational(), axom::Array< T, DIM, SPACE, StoragePolicy >::resize(), and SLIC_ASSERT.
|
inline |
Reset the knot vector in u.
| [in] | deg | The target degree |
References axom::primal::NURBSPatch< T, NDIMS >::getNumControlPoints_u(), axom::primal::KnotVector< T >::makeUniform(), and SLIC_ASSERT.
|
inline |
Reset the knot vector in v.
| [in] | deg | The target degree |
References axom::primal::NURBSPatch< T, NDIMS >::getNumControlPoints_v(), axom::primal::KnotVector< T >::makeUniform(), and SLIC_ASSERT.
|
inline |
Reset the knot vector and increase the number of control points.
| [in] | deg_u | The target degree in u |
| [in] | deg_v | The target degree in v |
References axom::primal::NURBSPatch< T, NDIMS >::setDegree_u(), and axom::primal::NURBSPatch< T, NDIMS >::setDegree_v().
|
inline |
Returns the degree of the NURBS Patch on the first axis.
References axom::primal::KnotVector< T >::getDegree().
|
inline |
Returns the degree of the NURBS Patch on the second axis.
References axom::primal::KnotVector< T >::getDegree().
|
inline |
Returns the order (degree + 1) of the NURBS Patch on the first axis.
References axom::primal::KnotVector< T >::getDegree().
|
inline |
Returns the order of the NURBS Patch on the second axis.
References axom::primal::KnotVector< T >::getDegree().
|
inline |
Set the number control points in u.
| [in] | npts | The target number of control points |
References axom::primal::NURBSPatch< T, NDIMS >::getDegree_u(), axom::primal::NURBSPatch< T, NDIMS >::getDegree_v(), axom::primal::NURBSPatch< T, NDIMS >::isRational(), axom::primal::KnotVector< T >::makeUniform(), axom::Array< T, DIM, SPACE, StoragePolicy >::resize(), and SLIC_ASSERT.
|
inline |
Returns the number of control points in the NURBS Patch on the first axis.
References axom::ArrayBase< T, DIM, ArrayType >::shape().
|
inline |
Returns the number of control points in the NURBS Patch on the second axis.
References axom::ArrayBase< T, DIM, ArrayType >::shape().
|
inline |
Set the number control points in u.
| [in] | npts | The target number of control points |
References axom::primal::NURBSPatch< T, NDIMS >::getDegree_u(), axom::primal::NURBSPatch< T, NDIMS >::getNumControlPoints_v(), axom::primal::NURBSPatch< T, NDIMS >::isRational(), axom::primal::KnotVector< T >::makeUniform(), axom::Array< T, DIM, SPACE, StoragePolicy >::resize(), and SLIC_ASSERT.
|
inline |
Set the number control points in v.
| [in] | npts | The target number of control points |
References axom::primal::NURBSPatch< T, NDIMS >::getDegree_v(), axom::primal::NURBSPatch< T, NDIMS >::getNumControlPoints_u(), axom::primal::NURBSPatch< T, NDIMS >::isRational(), axom::primal::KnotVector< T >::makeUniform(), axom::Array< T, DIM, SPACE, StoragePolicy >::resize(), and SLIC_ASSERT.
|
inline |
Clears the list of control points, make nonrational.
References axom::Array< T, DIM, SPACE, StoragePolicy >::clear(), axom::primal::KnotVector< T >::clear(), axom::primal::NURBSPatch< T, NDIMS >::makeNonrational(), and axom::primal::NURBSPatch< T, NDIMS >::makeUntrimmed().
|
inline |
Use array size as flag for rationality.
References axom::Array< T, DIM, SPACE, StoragePolicy >::empty().
|
inline |
Make trivially rational. If already rational, do nothing.
References axom::Array< T, DIM, SPACE, StoragePolicy >::fill(), axom::primal::NURBSPatch< T, NDIMS >::isRational(), axom::Array< T, DIM, SPACE, StoragePolicy >::resize(), and axom::ArrayBase< T, DIM, ArrayType >::shape().
|
inline |
Make nonrational by shrinking array of weights.
References axom::Array< T, DIM, SPACE, StoragePolicy >::clear().
|
inline |
Function to check if the NURBS surface is valid.
References axom::primal::KnotVector< T >::getDegree(), axom::primal::KnotVector< T >::getNumKnots(), axom::primal::NURBSPatch< T, NDIMS >::isRational(), axom::primal::KnotVector< T >::isValid(), and axom::ArrayBase< T, DIM, ArrayType >::shape().
|
inline |
Retrieves the control point at index (idx_p, idx_q)
|
inline |
Retrieves the vector of control points at index idx.
|
inline |
Returns a reference to the NURBS patch's control points.
|
inline |
Returns a reference to the NURBS patch's control points.
|
inline |
Get a specific weight.
| [in] | ui | The index of the weight on the first axis |
| [in] | vi | The index of the weight on the second axis |
References axom::primal::NURBSPatch< T, NDIMS >::isRational(), and SLIC_ASSERT.
|
inline |
Set the weight at a specific index.
| [in] | ui | The index of the weight in on the first axis |
| [in] | vi | The index of the weight in on the second axis |
| [in] | weight | The updated value of the weight |
References axom::primal::NURBSPatch< T, NDIMS >::isRational(), and SLIC_ASSERT.
|
inline |
Returns a reference to the NURBS patch's weights.
|
inline |
Returns a const reference to the NURBS patch's weights.
|
inline |
Returns an axis-aligned bounding box containing the patch.
References axom::Array< T, DIM, SPACE, StoragePolicy >::data(), and axom::Array< T, DIM, SPACE, StoragePolicy >::size().
|
inline |
Returns an oriented bounding box containing the patch.
References axom::Array< T, DIM, SPACE, StoragePolicy >::data(), and axom::Array< T, DIM, SPACE, StoragePolicy >::size().
|
inline |
Set the knot value in the u vector at a specific index.
| [in] | idx | The index of the knot |
| [in] | knot | The updated value of the knot |
|
inline |
Set the knot value in the v vector at a specific index.
| [in] | idx | The index of the knot |
| [in] | knot | The updated value of the knot |
|
inline |
Set the u knot vector by an axom::Array.
| [in] | knots | The new knot vector |
|
inline |
Set the v knot vector by an axom::Array.
| [in] | knots | The new knot vector |
|
inline |
Set the u knot vector by a KnotVector object.
| [in] | knotVector | The new knot vector |
|
inline |
Set the v knot vector by a KnotVector object.
| [in] | knotVector | The new knot vector |
|
inline |
Return a reference to the KnotVector instance on the first axis.
|
inline |
Return a const reference to the KnotVector instance on the first axis.
|
inline |
Get the minimum knot value in the u-axis.
References axom::primal::KnotVector< T >::getMinKnot().
|
inline |
Get the maximum knot value in the u-axis.
References axom::primal::KnotVector< T >::getMaxKnot().
|
inline |
Get the length of the parameter space bounding box.
References axom::primal::NURBSPatch< T, NDIMS >::getMaxKnot_u(), axom::primal::NURBSPatch< T, NDIMS >::getMaxKnot_v(), axom::primal::NURBSPatch< T, NDIMS >::getMinKnot_u(), and axom::primal::NURBSPatch< T, NDIMS >::getMinKnot_v().
|
inline |
Return a reference to the KnotVector instance on the second axis.
|
inline |
Return a const reference to the KnotVector instance on the second axis.
|
inline |
Get the minimum knot value in the v-axis.
References axom::primal::KnotVector< T >::getMinKnot().
|
inline |
Get the maximum knot value in the v-axis.
References axom::primal::KnotVector< T >::getMaxKnot().
|
inline |
Return the length of the knot vector on the first axis.
References axom::primal::KnotVector< T >::getNumKnots().
|
inline |
Return the length of the knot vector on the second axis.
References axom::primal::KnotVector< T >::getNumKnots().
|
inline |
Insert a knot to the u knot vector to have the given multiplicity.
| [in] | u | The parameter value of the knot to insert |
| [in] | target_multiplicity | The multiplicity of the knot to insert |
Algorithm A5.3 on p. 155 of "The NURBS Book"
References axom::utilities::clampVal(), axom::primal::KnotVector< T >::findSpan(), axom::primal::NURBSPatch< T, NDIMS >::getDegree_u(), axom::primal::NURBSPatch< T, NDIMS >::getMaxKnot_u(), axom::primal::NURBSPatch< T, NDIMS >::getMinKnot_u(), axom::primal::NURBSPatch< T, NDIMS >::getNumControlPoints_u(), axom::primal::NURBSPatch< T, NDIMS >::getNumControlPoints_v(), axom::primal::KnotVector< T >::insertKnotBySpan(), axom::primal::NURBSPatch< T, NDIMS >::isRational(), axom::primal::NURBSPatch< T, NDIMS >::isValidParameter_u(), axom::utilities::min(), axom::Array< T, DIM, SPACE, StoragePolicy >::resize(), SLIC_ASSERT, and SLIC_ASSERT_MSG.
|
inline |
Insert a knot to the v knot vector to have the given multiplicity.
| [in] | v | The parameter value of the knot to insert |
| [in] | target_multiplicity | The multiplicity of the knot to insert |
Algorithm A5.3 on p. 155 of "The NURBS Book"
References axom::utilities::clampVal(), axom::primal::KnotVector< T >::findSpan(), axom::primal::NURBSPatch< T, NDIMS >::getDegree_v(), axom::primal::NURBSPatch< T, NDIMS >::getMaxKnot_v(), axom::primal::NURBSPatch< T, NDIMS >::getMinKnot_v(), axom::primal::NURBSPatch< T, NDIMS >::getNumControlPoints_u(), axom::primal::NURBSPatch< T, NDIMS >::getNumControlPoints_v(), axom::primal::KnotVector< T >::insertKnotBySpan(), axom::primal::NURBSPatch< T, NDIMS >::isRational(), axom::primal::NURBSPatch< T, NDIMS >::isValidParameter_v(), axom::utilities::min(), axom::Array< T, DIM, SPACE, StoragePolicy >::resize(), SLIC_ASSERT, and SLIC_ASSERT_MSG.
|
inline |
Reverses all trimming curves in the patch.
|
inline |
Reverses the order of one direction of the NURBS patch's control points and weights.
This method does not affect the position of the patch in space, or its trimming curves, but it does reverse the patch's normal vectors.
| [in] | axis | orientation of patch. 0 to reverse in u, 1 for reverse in v |
References axom::primal::NURBSPatch< T, NDIMS >::reverseOrientation_u(), and axom::primal::NURBSPatch< T, NDIMS >::reverseOrientation_v().
|
inline |
Reverses the order of the control points, weights, and knots on the first axis.
References axom::primal::KnotVector< T >::getNumKnots(), axom::primal::NURBSPatch< T, NDIMS >::isRational(), axom::primal::KnotVector< T >::reverse(), axom::ArrayBase< T, DIM, ArrayType >::shape(), and axom::utilities::swap().
|
inline |
Reverses the order of the control points, weights, and knots on the second axis.
References axom::primal::KnotVector< T >::getNumKnots(), axom::primal::NURBSPatch< T, NDIMS >::isRational(), axom::primal::KnotVector< T >::reverse(), axom::ArrayBase< T, DIM, ArrayType >::shape(), and axom::utilities::swap().
|
inline |
Swap the axes such that s(u, v) becomes s(v, u)
This method does not affect the position of the patch in space, or its trimming curves.
References axom::primal::NURBSPatch< T, NDIMS >::isRational(), axom::ArrayBase< T, DIM, ArrayType >::shape(), and axom::utilities::swap().
|
inline |
Normalize the knot vectors to the span [0, 1].
References axom::primal::NURBSPatch< T, NDIMS >::getMaxKnot_u(), axom::primal::NURBSPatch< T, NDIMS >::getMaxKnot_v(), axom::primal::NURBSPatch< T, NDIMS >::getMinKnot_u(), axom::primal::NURBSPatch< T, NDIMS >::getMinKnot_v(), and axom::primal::KnotVector< T >::normalize().
|
inline |
Normalize the knot vector in u to the span [0, 1].
References axom::primal::NURBSPatch< T, NDIMS >::getMaxKnot_u(), axom::primal::NURBSPatch< T, NDIMS >::getMinKnot_u(), and axom::primal::KnotVector< T >::normalize().
|
inline |
Normalize the knot vector in v to the span [0, 1].
References axom::primal::NURBSPatch< T, NDIMS >::getMaxKnot_v(), axom::primal::NURBSPatch< T, NDIMS >::getMinKnot_v(), and axom::primal::KnotVector< T >::normalize().
|
inline |
Normalize to the span [0, N] x [0, M] where N and M are the number of spans in u and v.
References axom::primal::NURBSPatch< T, NDIMS >::getMaxKnot_u(), axom::primal::NURBSPatch< T, NDIMS >::getMaxKnot_v(), axom::primal::NURBSPatch< T, NDIMS >::getMinKnot_u(), axom::primal::NURBSPatch< T, NDIMS >::getMinKnot_v(), axom::primal::KnotVector< T >::getNumKnotSpans(), and axom::primal::KnotVector< T >::rescale().
|
inline |
Rescale both knot vectors to the span of [a, b].
| [in] | a | The lower bound of the new knot vector |
| [in] | b | The upper bound of the new knot vector |
References axom::primal::NURBSPatch< T, NDIMS >::getMaxKnot_u(), axom::primal::NURBSPatch< T, NDIMS >::getMaxKnot_v(), axom::primal::NURBSPatch< T, NDIMS >::getMinKnot_u(), axom::primal::NURBSPatch< T, NDIMS >::getMinKnot_v(), axom::primal::KnotVector< T >::rescale(), and SLIC_ASSERT.
|
inline |
Rescale the knot vector in u to the span of [a, b].
| [in] | a | The lower bound of the new knot vector |
| [in] | b | The upper bound of the new knot vector |
References axom::primal::NURBSPatch< T, NDIMS >::getMaxKnot_u(), axom::primal::NURBSPatch< T, NDIMS >::getMinKnot_u(), axom::primal::KnotVector< T >::rescale(), and SLIC_ASSERT.
|
inline |
Rescale the knot vector in v to the span of [a, b].
| [in] | a | The lower bound of the new knot vector |
| [in] | b | The upper bound of the new knot vector |
References axom::primal::NURBSPatch< T, NDIMS >::getMaxKnot_v(), axom::primal::NURBSPatch< T, NDIMS >::getMinKnot_v(), axom::primal::KnotVector< T >::rescale(), and SLIC_ASSERT.
|
inline |
Function to check if the u parameter is within the knot span.
References axom::primal::KnotVector< T >::getNumKnots().
|
inline |
Function to check if the v parameter is within the knot span.
References axom::primal::KnotVector< T >::getNumKnots().
|
inline |
Checks if given u parameter is interior to the knot span.
References axom::primal::KnotVector< T >::isValidInteriorParameter().
|
inline |
Checks if given v parameter is interior to the knot span.
References axom::primal::KnotVector< T >::isValidInteriorParameter().
|
inline |
Scale the parameter space of the NURBS patch geometry linearly (by tangents) in all directions.
| [in] | scaleFactor | The multiplicative factor to expand each knot vector by |
| [in] | removeTrimmingCurves | If true, the resulting patch has no trimming curves |
Algorithm from Wolters, Hans J., "Extensions: Extrapolation Methods for CAD", 1999
References axom::primal::NURBSPatch< T, NDIMS >::expandParameterSpace(), axom::primal::NURBSPatch< T, NDIMS >::getMaxKnot_u(), axom::primal::NURBSPatch< T, NDIMS >::getMaxKnot_v(), axom::primal::NURBSPatch< T, NDIMS >::getMinKnot_u(), axom::primal::NURBSPatch< T, NDIMS >::getMinKnot_v(), SLIC_ASSERT, and SLIC_WARNING_IF.
|
inline |
Expand the parameter space of the NURBS patch geometry linearly (by tangents) in all directions by a fixed amount.
| [in] | expansionAmount_u | The absolute additive amount by which the u is expanded |
| [in] | expansionAmount_v | The absolute additive amount by which the v is expanded |
| [in] | removeTrimmingCurves | If true, the resulting patch has no trimming curves |
Algorithm from Wolters, Hans J., "Extensions: Extrapolation Methods for CAD", 1999
References axom::primal::Vector< T, NDIMS >::array(), axom::Array< T, DIM, SPACE, StoragePolicy >::clear(), axom::Array< T, DIM, SPACE, StoragePolicy >::fill(), axom::primal::KnotVector< T >::getDegree(), axom::primal::NURBSPatch< T, NDIMS >::getDegree_u(), axom::primal::NURBSPatch< T, NDIMS >::getDegree_v(), axom::primal::NURBSPatch< T, NDIMS >::getMaxKnot_u(), axom::primal::NURBSPatch< T, NDIMS >::getMaxKnot_v(), axom::primal::NURBSPatch< T, NDIMS >::getMinKnot_u(), axom::primal::NURBSPatch< T, NDIMS >::getMinKnot_v(), axom::primal::NURBSPatch< T, NDIMS >::getNumControlPoints_u(), axom::primal::NURBSPatch< T, NDIMS >::getNumControlPoints_v(), axom::primal::KnotVector< T >::getNumKnots(), axom::primal::NURBSPatch< T, NDIMS >::isRational(), axom::primal::NURBSPatch< T, NDIMS >::isTrimmed(), axom::primal::NURBSPatch< T, NDIMS >::makeTriviallyTrimmed(), axom::utilities::min(), axom::Array< T, DIM, SPACE, StoragePolicy >::resize(), SLIC_ASSERT, and SLIC_WARNING_IF.
|
inline |
Evaluate the NURBS patch geometry at a particular parameter value t.
| [in] | u | The parameter value on the first axis |
| [in] | v | The parameter value on the second axis |
Adapted from Algorithm A3.5 on page 103 of "The NURBS Book"
References axom::primal::KnotVector< T >::calculateBasisFunctionsBySpan(), axom::utilities::clampVal(), axom::primal::KnotVector< T >::findSpan(), axom::primal::NURBSPatch< T, NDIMS >::getDegree_u(), axom::primal::NURBSPatch< T, NDIMS >::getDegree_v(), axom::primal::NURBSPatch< T, NDIMS >::getMaxKnot_u(), axom::primal::NURBSPatch< T, NDIMS >::getMaxKnot_v(), axom::primal::NURBSPatch< T, NDIMS >::getMinKnot_u(), axom::primal::NURBSPatch< T, NDIMS >::getMinKnot_v(), axom::primal::NURBSPatch< T, NDIMS >::isRational(), and axom::primal::Point< T, NDIMS >::zero().
|
inline |
Returns a NURBS patch isocurve for a fixed parameter value of u or v.
| [in] | uv | parameter value at which to construct the isocurve |
| [in] | axis | orientation of curve. 0 for fixed u, 1 for fixed v |
References axom::primal::NURBSPatch< T, NDIMS >::isocurve_u(), axom::primal::NURBSPatch< T, NDIMS >::isocurve_v(), and SLIC_ASSERT.
|
inline |
Returns a NURBS patch isocurve with a fixed value of u.
| [in] | u | Parameter value fixed in the isocurve |
References axom::primal::KnotVector< T >::calculateBasisFunctionsBySpan(), axom::utilities::clampVal(), axom::primal::KnotVector< T >::findSpan(), axom::primal::KnotVector< T >::getDegree(), axom::primal::NURBSPatch< T, NDIMS >::getMaxKnot_u(), axom::primal::NURBSPatch< T, NDIMS >::getMinKnot_u(), axom::primal::KnotVector< T >::getNumKnots(), axom::primal::NURBSPatch< T, NDIMS >::isRational(), axom::primal::NURBSPatch< T, NDIMS >::isValidParameter_u(), axom::utilities::lerp(), axom::primal::NURBSCurve< T, NDIMS >::makeRational(), axom::primal::NURBSCurve< T, NDIMS >::setKnots(), axom::primal::NURBSCurve< T, NDIMS >::setWeight(), axom::ArrayBase< T, DIM, ArrayType >::shape(), and SLIC_ASSERT_MSG.
|
inline |
Returns a NURBS patch isocurve with a fixed value of v.
| [in] | v | Parameter value fixed in the isocurve |
References axom::primal::KnotVector< T >::calculateBasisFunctionsBySpan(), axom::utilities::clampVal(), axom::primal::KnotVector< T >::findSpan(), axom::primal::KnotVector< T >::getDegree(), axom::primal::NURBSPatch< T, NDIMS >::getMaxKnot_v(), axom::primal::NURBSPatch< T, NDIMS >::getMinKnot_v(), axom::primal::KnotVector< T >::getNumKnots(), axom::primal::NURBSPatch< T, NDIMS >::isRational(), axom::primal::NURBSPatch< T, NDIMS >::isValidParameter_v(), axom::utilities::lerp(), axom::primal::NURBSCurve< T, NDIMS >::makeRational(), axom::primal::NURBSCurve< T, NDIMS >::setKnots(), axom::primal::NURBSCurve< T, NDIMS >::setWeight(), axom::ArrayBase< T, DIM, ArrayType >::shape(), and SLIC_ASSERT_MSG.
|
inline |
Evaluate the NURBS patch geometry derivatives up to order d at parameter u, v.
| [in] | u | The parameter value on the first axis |
| [in] | v | The parameter value on the second axis |
| [in] | ord | The maximum (or total) order of evaluated derivatives to evaluate |
| [out] | ders | A matrix of size d+1 x d+1 containing the derivatives |
| [in] | evalByTotalOrder | If true, only evaluate derivatives up to total order d instead of maximum component order d. |
ders[i][j] is the derivative of S with respect to u i times and v j times. For consistency, ders[0][0] contains the evaluation point stored as a vector
If evalByTotalOrder is false (default behavior), then ders contains for d == 3
| eval , S_u , S_uu |
ders = | S_v , S_uv , S_uuv | | S_vv , S_vvu , S_uuvv |
If evalByTotalOrder is true, then ders[i][j] == 0 whenever i + j > d
| eval , S_u , S_uu |
ders = | S_v , S_uv , 0 | | S_vv , 0 , 0 |
Implementation adapted from Algorithm A3.6 on p. 111 of "The NURBS Book". Rational derivatives from Algorithm A4.4 on p. 137 of "The NURBS Book".
References axom::utilities::binomialCoefficient(), axom::utilities::clampVal(), axom::primal::KnotVector< T >::derivativeBasisFunctionsBySpan(), axom::primal::NURBSPatch< T, NDIMS >::du(), axom::primal::NURBSPatch< T, NDIMS >::dv(), axom::Array< T, DIM, SPACE, StoragePolicy >::fill(), axom::primal::KnotVector< T >::findSpan(), axom::primal::NURBSPatch< T, NDIMS >::getDegree_u(), axom::primal::NURBSPatch< T, NDIMS >::getDegree_v(), axom::primal::NURBSPatch< T, NDIMS >::getMaxKnot_u(), axom::primal::NURBSPatch< T, NDIMS >::getMaxKnot_v(), axom::primal::NURBSPatch< T, NDIMS >::getMinKnot_u(), axom::primal::NURBSPatch< T, NDIMS >::getMinKnot_v(), axom::primal::NURBSPatch< T, NDIMS >::isRational(), axom::utilities::min(), axom::Array< T, DIM, SPACE, StoragePolicy >::resize(), and axom::primal::Point< T, NDIMS >::zero().
|
inline |
Evaluates all first derivatives of the NURBS patch geometry at (u, v)
| [in] | u | Parameter value at which to evaluate on the first axis |
| [in] | v | Parameter value at which to evaluate on the second axis |
| [out] | eval | The point value of the NURBS patch at (u, v) |
| [out] | Du | The vector value of S_u(u, v) |
| [out] | Dv | The vector value of S_v(u, v) |
Uses a specialized formula that is faster than evaluateDerivatives, avoiding repeated dynamic allocations in the generic implementation. This is performance-critical for 3D winding-number evaluations
References axom::utilities::clampVal(), axom::primal::KnotVector< T >::derivativeBasisFunctionsBySpan(), axom::primal::NURBSPatch< T, NDIMS >::du(), axom::primal::NURBSPatch< T, NDIMS >::dv(), axom::primal::KnotVector< T >::findSpan(), axom::primal::NURBSPatch< T, NDIMS >::getDegree_u(), axom::primal::NURBSPatch< T, NDIMS >::getDegree_v(), axom::primal::NURBSPatch< T, NDIMS >::getMaxKnot_u(), axom::primal::NURBSPatch< T, NDIMS >::getMaxKnot_v(), axom::primal::NURBSPatch< T, NDIMS >::getMinKnot_u(), axom::primal::NURBSPatch< T, NDIMS >::getMinKnot_v(), axom::primal::NURBSPatch< T, NDIMS >::isRational(), axom::utilities::min(), and axom::Array< T, DIM, SPACE, StoragePolicy >::resize().
|
inline |
Evaluates all linear derivatives of the NURBS patch geometry at (u, v)
| [in] | u | Parameter value at which to evaluate on the first axis |
| [in] | v | Parameter value at which to evaluate on the second axis |
| [out] | eval | The point value of the NURBS patch at (u, v) |
| [out] | Du | The vector value of S_u(u, v) |
| [out] | Dv | The vector value of S_v(u, v) |
| [out] | DuDv | The vector value of S_uv(u, v) == S_vu(u, v) |
References axom::primal::NURBSPatch< T, NDIMS >::evaluateDerivatives().
|
inline |
Evaluates all second derivatives of the NURBS patch geometry at (u, v)
| [in] | u | Parameter value at which to evaluate on the first axis |
| [in] | v | Parameter value at which to evaluate on the second axis |
| [out] | eval | The point value of the NURBS patch at (u, v) |
| [out] | Du | The vector value of S_u(u, v) |
| [out] | Dv | The vector value of S_v(u, v) |
| [out] | DuDu | The vector value of S_uu(u, v) |
| [out] | DvDv | The vector value of S_vv(u, v) |
| [out] | DuDv | The vector value of S_uu(u, v) |
References axom::primal::NURBSPatch< T, NDIMS >::evaluateDerivatives().
|
inline |
Computes a tangent in u of the NURBS patch geometry at (u, v)
| [in] | u | Parameter value at which to evaluate on the first axis |
| [in] | v | Parameter value at which to evaluate on the second axis |
References axom::primal::NURBSPatch< T, NDIMS >::evaluateDerivatives().
|
inline |
Computes a tangent in v of the NURBS patch geometry at (u, v)
| [in] | u | Parameter value at which to evaluate on the first axis |
| [in] | v | Parameter value at which to evaluate on the second axis |
References axom::primal::NURBSPatch< T, NDIMS >::evaluateDerivatives().
|
inline |
Computes the second derivative in u of the NURBS patch geometry patch at (u, v)
| [in] | u | Parameter value at which to evaluate on the first axis |
| [in] | v | Parameter value at which to evaluate on the second axis |
References axom::primal::NURBSPatch< T, NDIMS >::evaluateDerivatives().
|
inline |
Computes the second derivative in v of the NURBS patch geometry patch at (u, v)
| [in] | u | Parameter value at which to evaluate on the first axis |
| [in] | v | Parameter value at which to evaluate on the second axis |
References axom::primal::NURBSPatch< T, NDIMS >::evaluateDerivatives().
|
inline |
Computes the mixed second derivative in u and v of the NURBS patch geometry at (u, v)
| [in] | u | Parameter value at which to evaluate on the first axis |
| [in] | v | Parameter value at which to evaluate on the second axis |
References axom::primal::NURBSPatch< T, NDIMS >::evaluateDerivatives().
|
inline |
Computes the mixed second derivative in u and v of the NURBS patch geometry at (u, v)
| [in] | u | Parameter value at which to evaluate on the first axis |
| [in] | v | Parameter value at which to evaluate on the second axis |
References axom::primal::NURBSPatch< T, NDIMS >::dudv().
|
inline |
Computes the normal vector to the NURBS patch geometry at (u, v)
| [in] | u | Parameter value at which to evaluate on the first axis |
| [in] | v | Parameter value at which to evaluate on the second axis |
References axom::primal::Vector< T, NDIMS >::cross_product(), and axom::primal::NURBSPatch< T, NDIMS >::evaluateFirstDerivatives().
|
inline |
Calculate the average normal for the (untrimmed) patch.
| [in] | npts | The number of quadrature nodes used in each component integral |
Algorithm from "Mean normal vector to a surface bounded by Bézier curves" by Kenji Ueda, 1996
Projects the 4 boundary curves of the patch along each coordinate axis, then computes the 2D area of that projection to get the corresponding component of the average surface normal.
Evaluates the integral with Gauss-Legendre quadrature on each boundary curve
References axom::primal::evaluate_area_integral(), axom::primal::NURBSPatch< T, NDIMS >::getDegree_u(), axom::primal::NURBSPatch< T, NDIMS >::getDegree_v(), axom::primal::NURBSPatch< T, NDIMS >::getKnots_u(), axom::primal::NURBSPatch< T, NDIMS >::getKnots_v(), axom::primal::NURBSPatch< T, NDIMS >::getNumControlPoints_u(), axom::primal::NURBSPatch< T, NDIMS >::getNumControlPoints_v(), axom::primal::NURBSPatch< T, NDIMS >::isRational(), and SLIC_ASSERT.
|
inline |
Get array of trimming curves.
|
inline |
Get mutable array of trimming curves.
|
inline |
Get a trimming curve by index.
References axom::Array< T, DIM, SPACE, StoragePolicy >::size(), and SLIC_ASSERT.
|
inline |
Add a trimming curve.
References axom::Array< T, DIM, SPACE, StoragePolicy >::push_back().
|
inline |
Add array of trimming curves.
References axom::Array< T, DIM, SPACE, StoragePolicy >::push_back(), and axom::Array< T, DIM, SPACE, StoragePolicy >::size().
|
inline |
Set the array of trimming curves.
|
inline |
Clear trimming curves, but DON'T mark as untrimmed.
References axom::Array< T, DIM, SPACE, StoragePolicy >::clear().
|
inline |
Get number of trimming curves.
References axom::Array< T, DIM, SPACE, StoragePolicy >::size().
|
inline |
Predicate to check if the patch is "trivially trimmed" in parameter space.
A patch is considered trivially trimmed if it is marked as trimmed and has exactly four trimming curves that form an axis-aligned rectangle on the patch's parametric boundary:
| [in] | tol | Threshold for squared distance used by NURBSCurve::isLinear and for the axis-alignment check on the curve endpoints. |
References axom::primal::NURBSPatch< T, NDIMS >::du(), axom::primal::NURBSPatch< T, NDIMS >::dv(), axom::primal::NURBSPatch< T, NDIMS >::getMaxKnot_u(), axom::primal::NURBSPatch< T, NDIMS >::getMaxKnot_v(), axom::primal::NURBSPatch< T, NDIMS >::getMinKnot_u(), axom::primal::NURBSPatch< T, NDIMS >::getMinKnot_v(), axom::primal::NURBSPatch< T, NDIMS >::getNumTrimmingCurves(), and axom::primal::NURBSPatch< T, NDIMS >::isTrimmed().
|
inline |
use boolean flag for trimmed-ness
|
inline |
Predicate to check if the patch is entirely invisible due to trimming state.
A patch is considered invisible when it is marked as trimmed, but has no trimming curves. This represents a trimmed patch whose visible region is empty.
References axom::primal::NURBSPatch< T, NDIMS >::getNumTrimmingCurves(), and axom::primal::NURBSPatch< T, NDIMS >::isTrimmed().
|
inline |
Mark as trimmed.
|
inline |
Delete all trimming curves.
References axom::Array< T, DIM, SPACE, StoragePolicy >::clear().
|
inline |
Make trivially trimmed by adding trimming curves at each boundary.
References axom::primal::NURBSPatch< T, NDIMS >::addTrimmingCurve(), axom::Array< T, DIM, SPACE, StoragePolicy >::clear(), axom::primal::KnotVector< T >::getNumKnots(), axom::primal::NURBSPatch< T, NDIMS >::isTrimmed(), axom::primal::NURBSCurve< T, NDIMS >::make_linear_segment_nurbs(), and axom::primal::NURBSPatch< T, NDIMS >::markAsTrimmed().
|
inline |
Check if a parameter point is visible on the NURBS patch via a trim test.
| [in] | u | The parameter value on the first axis |
| [in] | v | The parameter value on the second axis |
Checks for containment of the parameter point in the collection of trimming curves via an even-odd rule.
If the collection of trimming curves does not form closed loops, then the (now fractional) generalized winding number is rounded to the nearest integer before the even-odd rule is applied.
References axom::primal::NURBSPatch< T, NDIMS >::isTrimmed(), and axom::primal::KnotVector< T >::isValidParameter().
|
inline |
Restrict the edges of a NURBS surface to the given parameter values, if necessary.
| [in] | min_u | The minimum value of the u parameter |
| [in] | max_u | The maximum value of the u parameter |
| [in] | min_v | The minimum value of the v parameter |
| [in] | max_v | The maximum value of the v parameter |
| [in] | normalize | If true, normalize the patch to the range [0, 1]^2 |
If a given parameter is less/greater than the minimum/maximum knot value, then the patch is not changed along that direction and axis
References axom::primal::NURBSPatch< T, NDIMS >::getMaxKnot_u(), axom::primal::NURBSPatch< T, NDIMS >::getMaxKnot_v(), axom::primal::NURBSPatch< T, NDIMS >::getMinKnot_u(), axom::primal::NURBSPatch< T, NDIMS >::getMinKnot_v(), axom::primal::NURBSPatch< T, NDIMS >::normalize(), SLIC_ASSERT, axom::primal::NURBSPatch< T, NDIMS >::split_u(), and axom::primal::NURBSPatch< T, NDIMS >::split_v().
|
inline |
Clip the edges of a NURBS surface to the AABB of the trimming curves.
| [in] | padding | The amount to be left on each side of the AABB after clipping |
References axom::primal::BoundingBox< T, NDIMS >::addBox(), axom::primal::BoundingBox< T, NDIMS >::getMax(), and axom::primal::BoundingBox< T, NDIMS >::getMin().
|
inline |
Splits the NURBS patch geometry (at each internal knot) into several Bezier patches.
If either degree_u or degree_v is zero, the resulting Bezier patches along that axis will be disconnected and order 0
This method ignores any trimming curves in the patch, and returns all extracted patches of the untrimmed patch.
Algorithm A5.7 on p. 177 of "The NURBS Book"
References axom::primal::NURBSPatch< T, NDIMS >::getDegree_u(), axom::primal::NURBSPatch< T, NDIMS >::getDegree_v(), axom::primal::NURBSPatch< T, NDIMS >::getNumControlPoints_u(), axom::primal::NURBSPatch< T, NDIMS >::getNumControlPoints_v(), axom::primal::KnotVector< T >::getNumKnotSpans(), axom::primal::NURBSPatch< T, NDIMS >::getWeight(), axom::primal::NURBSPatch< T, NDIMS >::isRational(), axom::utilities::max(), and axom::Array< T, DIM, SPACE, StoragePolicy >::size().
|
inline |
Splits the NURBS patch geometry into several one-span trimmed NURBS surfaces.
References axom::primal::NURBSPatch< T, NDIMS >::getKnots_u(), axom::primal::NURBSPatch< T, NDIMS >::getKnots_v(), axom::primal::KnotVector< T >::getUniqueKnots(), and axom::Array< T, DIM, SPACE, StoragePolicy >::size().
|
inline |
Calculate the average normal for the trimmed patch.
| [in] | npts | The number of quadrature nodes used in each component integral |
Decomposes the NURBS surface into trimmed Bezier components (to ensure differentiability of the integrand) and evaluates the integral numerically on each component using trimming curves
Evaluates the integral with Gauss-Legendre quadrature on each boundary curve
References axom::primal::evaluate_area_integral(), axom::primal::NURBSPatch< T, NDIMS >::extractTrimmedBezier(), axom::primal::NURBSPatch< T, NDIMS >::getTrimmingCurves(), axom::primal::NURBSPatch< T, NDIMS >::normal(), and SLIC_ASSERT.
|
inline |
Calculate the unsigned surface area and integrated normal for the trimmed patch.
| [in] | npts | The number of quadrature nodes used in each component integral |
| [in] | useBezierExtraction | Set whether to do Bezier extraction on input for exponential convergence of general NURBS input |
Decomposes the surface into trimmed Bezier components and evaluates the area and integrated normal numerically using trimming curves. Avoids the redundant geometry processing of computing each value separately
References axom::primal::area(), axom::primal::evaluate_area_integral(), axom::primal::NURBSPatch< T, NDIMS >::normal(), and SLIC_ASSERT.
|
inline |
Return a "clean" trimmed representation suitable for moment and GWN calculation.
| [in] | normalize_by_span | Normalize the patch parameter space |
| [in] | ensure_trimmed | If the patch isn't trimmed, make trivially trimmed |
| [in] | clip_to_curves | Clip patch parameter space to AABB of the trimming curves |
References axom::primal::NURBSPatch< T, NDIMS >::clipToCurves(), axom::primal::NURBSPatch< T, NDIMS >::getNumTrimmingCurves(), axom::primal::NURBSPatch< T, NDIMS >::isTrimmed(), axom::primal::NURBSPatch< T, NDIMS >::makeTriviallyTrimmed(), and axom::primal::NURBSPatch< T, NDIMS >::normalizeBySpan().
|
inline |
Calculate the surface moments for the trimmed patch for GWN evaluation.
| [in] | npts | The number of quadrature nodes used in each component integral |
| [in] | useBezierExtraction | Set whether to do Bezier extraction on input for exponential convergence of general NURBS input |
Decomposes the surface into trimmed Bezier components and evaluates up to second order moments without recomputing quadrature nodes, avoiding the redundant processing of evaluating each separately.
References axom::primal::Vector< T, NDIMS >::cross_product(), axom::primal::evaluate_area_integral(), and axom::primal::Vector< T, NDIMS >::norm().
|
inline |
Splits a NURBS surface into four NURBS patches.
| [in] | u | parameter value at which to bisect on the first axis |
| [in] | v | parameter value at which to bisect on the second axis |
| [out] | p1 | First output NURBS patch |
| [out] | p2 | Second output NURBS patch |
| [out] | p3 | Third output NURBS patch |
| [out] | p4 | Fourth output NURBS patch |
| [in] | normalizeParameters | If true, normalize the knot span of the output patches to the range [0, 1]^2 |
| | | | p3 | p4 | | | | -----—(u,v)------— | | | | p1 | p2 | | | | -------------------— u = u_max u/v_min
References axom::primal::NURBSPatch< T, NDIMS >::normalize(), and axom::primal::NURBSPatch< T, NDIMS >::split_v().
|
inline |
Split the NURBS surface in two along the u direction.
References axom::primal::NURBSPatch< T, NDIMS >::getTrimmingCurves(), and axom::primal::NURBSPatch< T, NDIMS >::normalize_u().
|
inline |
Split the NURBS surface in two along the v direction.
References axom::primal::NURBSPatch< T, NDIMS >::getTrimmingCurves(), and axom::primal::NURBSPatch< T, NDIMS >::normalize_v().
|
inline |
Split the patch in the longer parametric direction, determined via maximum control-net polyline length.
We measure the maximum polyline length of the control net in each parametric direction,
References axom::utilities::max().
|
inline |
For a disk of radius r and center (u, v), split a NURBS surface into the portion inside/outside.
| [in] | u | The x-coordinate of the center of the disk |
| [in] | v | The y-coordinate of the center of the disk |
| [in] | r | The radius of the disk |
| [out] | the_disk | The NURBS surface inside the disk |
| [out] | the_rest | The NURBS surface outside the disk |
| [in] | clipDisk | If true, the returned disk is clipped to the disk boundary |
|
inline |
Split a NURBS surface into two by cutting out a disk of radius r centered at (u, v)
| [in] | u | The x-coordinate of the center of the disk |
| [in] | v | The y-coordinate of the center of the disk |
| [in] | r | The radius of the disk |
| [out] | the_disk | The NURBS surface inside the disk |
| [out] | the_rest | The NURBS surface outside the disk |
| [out] | isDiskInside | True if the disk is entirely inside the trimming curves |
| [out] | isDiskOutside | True if the disk is entirely outside the trimming curves |
| [in] | ignoreInteriorDisk | If true, don't perform subdivision if disk is entirely inside the trimming curves |
| [in] | disk_padding | How much space is retained around the disk in each direction after clipping |
References axom::primal::NURBSPatch< T, NDIMS >::addTrimmingCurve(), axom::Array< T, DIM, SPACE, StoragePolicy >::begin(), axom::Array< T, DIM, SPACE, StoragePolicy >::clear(), axom::Array< T, DIM, SPACE, StoragePolicy >::end(), axom::primal::NURBSCurve< T, NDIMS >::getMaxKnot(), axom::primal::NURBSCurve< T, NDIMS >::getMinKnot(), axom::primal::NURBSPatch< T, NDIMS >::makeTriviallyTrimmed(), axom::primal::NURBSPatch< T, NDIMS >::markAsTrimmed(), axom::Array< T, DIM, SPACE, StoragePolicy >::push_back(), axom::primal::NURBSCurve< T, NDIMS >::reverseOrientation(), axom::Array< T, DIM, SPACE, StoragePolicy >::size(), axom::sort(), and axom::primal::NURBSCurve< T, NDIMS >::split().
|
inline |
Simple formatted print of a NURBS Patch instance.
| os | The output stream to write to |
|
friend |
Equality operator for NURBS patches.
| [in] | lhs | The left-hand side NURBS patch |
| [in] | rhs | The right-hand side NURBS patch |
|
friend |
Inequality operator for NURBS patches.
| [in] | lhs | The left-hand side NURBS patch |
| [in] | rhs | The right-hand side NURBS patch |