public final class SurfaceFactory extends java.lang.Object
Modified by: Joseph A. Huwaldt
Modifier and Type | Method and Description |
---|---|
static BasicNurbsSurface |
approxPoints(int sDegree,
int tDegree,
int nS,
int nT,
PointArray<? extends GeomPoint> points)
Create a
NurbsSurface of the specified degrees that approximates, in a
least squares sense, the specified array of geometry points in the input order. |
static BasicNurbsSurface |
createRevolvedSurface(GeomVector<Dimensionless> axis,
NurbsCurve curve)
Create a surface of revolution
NurbsSurface by sweeping the specified curve
about the specified axis. |
static BasicNurbsSurface |
createRevolvedSurface(GeomVector<Dimensionless> axis,
NurbsCurve curve,
Parameter<Angle> theta)
Create a surface of revolution
NurbsSurface by sweeping the specified curve
about the specified axis with the specified curve and angular start and stop values
(relative to the curve and axis). |
static BasicNurbsSurface |
createRevolvedSurface(GeomVector<Dimensionless> axis,
NurbsCurve curve,
Parameter<Angle> thetaS,
Parameter<Angle> thetaE)
Create a surface of revolution
NurbsSurface by sweeping the specified curve
about the specified axis with the specified curve and angular start and stop values
(relative to the curve and axis). |
static BasicNurbsSurface |
createSkinnedSurface(java.util.List<? extends Curve> crvs,
int tDegree,
Parameter<Length> tol)
Create a surface that interpolates, is skinned or lofted, through the input list of
curves.
|
static BasicNurbsSurface |
createSphere(GeomPoint center,
Parameter<Length> radius)
Create a sphere
NurbsSurface about the specified center point with the
specified radius. |
static BasicNurbsSurface |
createTFISurface(Curve s0crv,
Curve t0crv,
Curve s1crv,
Curve t1crv,
Parameter<Length> tol)
Create a Transfinite Interpolation (TFI) NURBS surface, or Coons patch, from the
specified boundary curves.
|
static BasicNurbsSurface |
createTorus(GeomPoint center,
GeomVector<Dimensionless> axis,
Parameter<Length> innerRadius,
Parameter<Length> outerRadius)
Create a torus
NurbsSurface about the specified center point and axis. |
static BasicNurbsSurface |
fitPoints(int sDegree,
int tDegree,
PointArray<? extends GeomPoint> points)
Create a
NurbsSurface of the specified degrees that is fit to,
interpolates, or passes through the specified array of geometry points in the input
order. |
public static BasicNurbsSurface createSphere(GeomPoint center, Parameter<Length> radius)
NurbsSurface
about the specified center point with the
specified radius.center
- The center of the sphere. May not be null.radius
- The radius of the sphere. May not be null.public static BasicNurbsSurface createTorus(GeomPoint center, GeomVector<Dimensionless> axis, Parameter<Length> innerRadius, Parameter<Length> outerRadius) throws DimensionException
NurbsSurface
about the specified center point and axis. The
surface will be parameterized such that the "s" direction is around the
cross-section of the torus and the t-direction is around the axis.center
- The center of the torus. May not be null.axis
- The axis to place the torus about. May not be null.innerRadius
- The inner radius of the torus. May not be null.outerRadius
- The outer radius of the torus. May not be null.DimensionException
public static BasicNurbsSurface createRevolvedSurface(GeomVector<Dimensionless> axis, NurbsCurve curve) throws DimensionException
NurbsSurface
by sweeping the specified curve
about the specified axis. The surface will be parameterized such that the curve
defines the "s" direction and the revolution around the axis is the "t" direction.axis
- The axis to sweep the curve about (the vector gives direction; use
axis.setOrigin() to set a point on the axis). May not be null.curve
- The curve to be revolved around the axis. May not be null.DimensionException
public static BasicNurbsSurface createRevolvedSurface(GeomVector<Dimensionless> axis, NurbsCurve curve, Parameter<Angle> theta) throws DimensionException
NurbsSurface
by sweeping the specified curve
about the specified axis with the specified curve and angular start and stop values
(relative to the curve and axis). The surface will be parameterized such that the
curve defines the "s" direction and the revolution around the axis is the "t"
direction.axis
- The axis to sweep the curve about (the vector gives direction; use
axis.setOrigin() to set a point on the axis). May not be null.curve
- The curve to be revolved around the axis. May not be null.theta
- The angle to revolve the curve through (starting at the curve's
position). May not be null.DimensionException
public static BasicNurbsSurface createRevolvedSurface(GeomVector<Dimensionless> axis, NurbsCurve curve, Parameter<Angle> thetaS, Parameter<Angle> thetaE) throws DimensionException
NurbsSurface
by sweeping the specified curve
about the specified axis with the specified curve and angular start and stop values
(relative to the curve and axis). The surface will be parameterized such that the
curve defines the "s" direction and the revolution around the axis is the "t"
direction.axis
- The axis to sweep the curve about (the vector gives direction; use
axis.setOrigin() to set a point on the axis). May not be null.curve
- The curve to be revolved around the axis. May not be null.thetaS
- The start angle to revolve the curve through (starting at the curve's
position). May not be null.thetaE
- The end angle to revolve the curve through (starting at the curve's
position). If the end angle is smaller than the start angle, it is
increased by increments of 2*PI until it is larger than the start
angle. May not be null.DimensionException
public static BasicNurbsSurface createSkinnedSurface(java.util.List<? extends Curve> crvs, int tDegree, Parameter<Length> tol)
crvs
- A list of curves to be skinned. May not be null.tDegree
- The degree in the t-direction of the NURBS surface to create (must
be > 0 and < the number of curves in the list).tol
- The greatest possible difference between the input list of curves
and the NURBS surface returned. May not be null or zero.public static BasicNurbsSurface createTFISurface(Curve s0crv, Curve t0crv, Curve s1crv, Curve t1crv, Parameter<Length> tol) throws java.lang.IllegalArgumentException, ParameterException
s0crv
- The curve that represents the s=0 boundary of the TFI surface. May not
be null.t0crv
- The curve that represents the t=0 boundary of the TFI surface. May not
be null.s1crv
- The curve that represents the s=1 boundary of the TFI surface. May not
be null.t1crv
- The curve that represents the t=1 boundary of the TFI surface. May not
be null.tol
- The greatest possible difference between the input list of curves and
the NURBS surface returned. May not be null or zero.java.lang.IllegalArgumentException
ParameterException
public static BasicNurbsSurface fitPoints(int sDegree, int tDegree, PointArray<? extends GeomPoint> points) throws java.lang.IllegalArgumentException, ParameterException
NurbsSurface
of the specified degrees that is fit to,
interpolates, or passes through the specified array of geometry points in the input
order. This is a global interpolation of the points, meaning that if one of the
input points is moved, it will affect the entire surface, not just the local
portion near the point.sDegree
- The degree in the s-direction (down the strings of points) of the
NURBS surface to create (must be > 0 and < the number of
points in each string).tDegree
- The degree in the t-direction (across the rows of strings) of the
NURBS surface to create (must be > 0 and < the number of
strings in the array).points
- The array of GeomPoint objects to pass the surface through:
points[col idx][row idx] -> [t][s]. May not be null.ParameterException
- if there is a problem with the parameterization
resulting from fitting a curve through the supplied points.java.lang.IllegalArgumentException
approxPoints(int, int, int, int, geomss.geom.PointArray<? extends geomss.geom.GeomPoint>)
public static BasicNurbsSurface approxPoints(int sDegree, int tDegree, int nS, int nT, PointArray<? extends GeomPoint> points) throws java.lang.IllegalArgumentException, ParameterException
NurbsSurface
of the specified degrees that approximates, in a
least squares sense, the specified array of geometry points in the input order.
This is a global approximation of the points, meaning that if one of the input
points is moved, it will affect the entire surface, not just the local portion near
the point.sDegree
- The degree in the s-direction of the NURBS surface to create (must
be > 0 and < the number of points in each string).tDegree
- The degree in the t-direction of the NURBS surface to create (must
be > 0 and < the number of strings in the array).nS
- The number of surface control points to use in the parametric S
direction (must be > 1 and < the number of points in each
string).nT
- The number of surface control points to use in the parametric T
direction (must be > 1 and < the number of strings in the
array).points
- The array of GeomPoint objects approximate a surface through:
points[col idx][row idx] -> [t][s]. May not be null.ParameterException
- if there is a problem with the parameterization that
results from approximating the supplied points.java.lang.IllegalArgumentException
fitPoints(int, int, geomss.geom.PointArray<? extends geomss.geom.GeomPoint>)