T
- The sub-type of this AbstractSurface element.public abstract class AbstractSurface<T extends AbstractSurface> extends AbstractGeomElement<T> implements Surface<T>
Modified by: Joseph A. Huwaldt
Modifier and Type | Field and Description |
---|---|
static double |
GTOL
Generic/default tolerance for use in root finders, etc.
|
RESOURCES
Constructor and Description |
---|
AbstractSurface() |
Modifier and Type | Method and Description |
---|---|
PointArray<SubrangePoint> |
extractGrid(GridRule gridRule,
java.util.List<java.lang.Double> bottomSpacing,
java.util.List<java.lang.Double> topSpacing,
java.util.List<java.lang.Double> leftSpacing,
java.util.List<java.lang.Double> rightSpacing)
Return an array of SubrangePoint objects that are gridded onto the surface using
the specified spacings and gridding rule.
|
Parameter<Area> |
getArea(double eps)
Return the surface area of this entire surface.
|
Parameter<Area> |
getArea(double s1,
double t1,
double s2,
double t2,
double eps)
Return the surface area of a portion of this surface.
|
Parameter<Area> |
getArea(GeomPoint st1,
GeomPoint st2,
double eps)
Return the surface area of a portion of this surface.
|
PointString<SubrangePoint> |
getClosest(Curve curve,
double tol)
Returns the closest points (giving the minimum distance) between this surface and
the specified curve.
|
SubrangePoint |
getClosest(GeomPlane plane,
double tol)
Returns the closest point (giving the minimum distance) between this surface and
the specified plane.
|
SubrangePoint |
getClosest(GeomPoint point,
double tol)
Returns the closest point on this surface to the specified point.
|
SubrangePoint |
getClosest(GeomPoint point,
double nearS,
double nearT,
double tol)
Returns the closest point on this surface to the specified point near the specified
parametric position.
|
PointArray<SubrangePoint> |
getClosest(java.util.List<? extends java.util.List<GeomPoint>> points,
double tol)
Returns the array of closest points on this surface to the specified array (list of
lists) of points.
|
PointString<SubrangePoint> |
getClosest(Surface surface,
double tol)
Returns the closest points (giving the minimum distance) between this surface and
the specified surface.
|
SubrangeCurve |
getCurve(Curve pcrv)
Return a subrange curve on the surface for the given parametric position curve.
|
java.util.List<java.util.List<Vector<Length>>> |
getDerivatives(GeomPoint st,
int grade)
Calculate all the derivatives from
0 to grade with
respect to parametric position(s) on a parametric object for the given parametric
position on the object, d^{grade}p(s)/d^{grade}s . |
SubrangePoint |
getFarthest(GeomPoint point,
double tol)
Returns the farthest point on this surface from the specified point.
|
SubrangePoint |
getFarthest(GeomPoint point,
double nearS,
double nearT,
double tol)
Returns the farthest point on this surface from the specified point near the
specified parametric position on the surface.
|
PointArray<SubrangePoint> |
getFarthest(java.util.List<? extends java.util.List<GeomPoint>> points,
double tol)
Returns the array of farthest points on this surface from the specified array (list
of lists) of points.
|
Parameter |
getGaussianCurvature(double s,
double t)
Returns the Gaussian Curvature for this surface at the given parametric position
(s,t) on this surface.
|
Parameter |
getGaussianCurvature(GeomPoint st)
Returns the Gaussian Curvature for this surface at the given parametric position
(s,t) on this surface.
|
SubrangePoint |
getLimitPoint(int dim,
boolean max,
double tol)
Returns the most extreme point, either minimum or maximum, in the specified
coordinate direction on this surface.
|
Parameter |
getMeanCurvature(double s,
double t)
Returns the Mean Curvature for this surface at the given parametric position (s,t)
on this surface.
|
Parameter |
getMeanCurvature(GeomPoint st)
Returns the Mean Curvature for this surface at the given parametric position (s,t)
on this surface.
|
Vector<Dimensionless> |
getNormal(double s,
double t)
Return the at least 3D normal vector for this surface at the given parametric
position (s,t) on this surface.
|
Vector<Dimensionless> |
getNormal(GeomPoint st)
Return the normal vector for this surface at the given parametric position (s,t) on
this surface.
|
int |
getParDimension()
Returns the number of parametric dimensions of the geometry element.
|
SubrangePoint |
getPoint(double s,
double t)
Return a subrange point on the surface for the given parametric position on the
surface.
|
SubrangePoint |
getPoint(GeomPoint st)
Return a subrange point on the surface for the given parametric position on the
surface.
|
Point |
getRealPoint(GeomPoint st)
Calculate a point on the surface for the given parametric position on the surface.
|
SubrangeCurve |
getSCurve(double s)
Return a subrange curve at a constant parametric s-value.
|
Vector<Length> |
getSDerivative(double s,
double t,
int grade)
Calculate a derivative with respect to parametric s-distance of the given grade on
the surface for the given parametric position on the surface,
d^{grade}p(s,t)/d^{grade}s . |
Vector<Length> |
getSDerivative(GeomPoint st,
int grade)
Calculate a derivative with respect to parametric s-distance of the given grade on
the surface for the given parametric position on the surface,
d^{grade}p(s,t)/d^{grade}s . |
java.util.List<Vector<Length>> |
getSDerivatives(double s,
double t,
int grade)
Calculate all the derivatives from
0 to grade with
respect to parametric s-position on the surface for the given parametric position
on the surface, d^{grade}p(s,t)/d^{grade}s . |
abstract java.util.List<Vector<Length>> |
getSDerivatives(double s,
double t,
int grade,
boolean scaled)
Calculate all the derivatives from
0 to grade with
respect to parametric s-position on the surface for the given parametric position
on the surface, d^{grade}p(s,t)/d^{grade}s . |
java.util.List<Vector<Length>> |
getSDerivatives(GeomPoint st,
int grade)
Calculate all the derivatives from
0 to grade with
respect to parametric s-position on the surface for the given parametric position
on the surface, d^{grade}p(s,t)/d^{grade}s . |
Plane |
getTangentPlane(double s,
double t)
Return the tangent plane to this surface at the given parametric position (s,t) on
this surface.
|
Plane |
getTangentPlane(GeomPoint st)
Return the tangent plane to this surface at the given parametric position (s,t) on
this surface.
|
SubrangeCurve |
getTCurve(double t)
Return a subrange curve at a constant parametric t-value.
|
Vector<Length> |
getTDerivative(double s,
double t,
int grade)
Calculate a derivative with respect to parametric t-distance of the given grade on
the surface for the given parametric position on the surface,
d^{grade}p(s,t)/d^{grade}t . |
Vector<Length> |
getTDerivative(GeomPoint st,
int grade)
Calculate a derivative with respect to parametric t-distance of the given grade on
the surface for the given parametric position on the surface,
d^{grade}p(s,t)/d^{grade}t . |
java.util.List<Vector<Length>> |
getTDerivatives(double s,
double t,
int grade)
Calculate all the derivatives from
0 to grade with
respect to parametric t-position on the surface for the given parametric position
on the surface, d^{grade}p(s,t)/d^{grade}t . |
abstract java.util.List<Vector<Length>> |
getTDerivatives(double s,
double t,
int grade,
boolean scaled)
Calculate all the derivatives from
0 to grade with
respect to parametric t-position on the surface for the given parametric position
on the surface, d^{grade}p(s,t)/d^{grade}t . |
java.util.List<Vector<Length>> |
getTDerivatives(GeomPoint st,
int grade)
Calculate all the derivatives from
0 to grade with
respect to parametric t-position on the surface for the given parametric position
on the surface, d^{grade}p(s,t)/d^{grade}t . |
Vector<Length> |
getTwistVector(GeomPoint st)
Calculate the twist vector (d^2P/(ds*dt) = d(dP/ds)/dt) for this surface at the
specified position on this surface.
|
Parameter<Volume> |
getVolume(double eps)
Return the enclosed volume of this entire surface.
|
Parameter<Volume> |
getVolume(double s1,
double t1,
double s2,
double t2,
double eps)
Return the enclosed volume of a portion of this surface.
|
Parameter<Volume> |
getVolume(GeomPoint st1,
GeomPoint st2,
double eps)
Return the enclosed volume of a portion of this surface.
|
PointArray<SubrangePoint> |
gridToTolerance(Parameter<Length> tol)
Return an array of points that are gridded onto the surface with the number of
points and spacing chosen to result in straight line segments between the points
that have mid-points that are all within the specified tolerance of this surface.
|
GeomList<PointString<SubrangePoint>> |
intersect(Curve curve,
Parameter<Length> tol)
Return the intersections between a curve and this surface.
|
GeomList<SubrangeCurve> |
intersect(GeomPlane plane,
Parameter<Length> tol)
Return the intersections between an infinite plane and this surface.
|
PointString<SubrangePoint> |
intersect(GeomPoint L0,
GeomVector Ldir,
Parameter<Length> tol)
Return the intersections between an infinite line and this surface.
|
GeomList<PointString<SubrangePoint>> |
intersect(LineSegment line,
Parameter<Length> tol)
Return the intersections between a line segment and this surface.
|
GeomList<GeomList<SubrangeCurve>> |
intersect(Surface surface,
Parameter<Length> tol)
Return the intersections between another surface and this surface.
|
boolean |
isDegenerate(Parameter<Length> tol)
Return
true if this surface is degenerate (i.e.: has area less than
the specified tolerance squared). |
boolean |
isPlanar(double epsFT,
double epsELT)
Return
true if this surface is planar or false if it is
not. |
boolean |
isPlanar(Parameter<Length> tol)
Return
true if this surface is planar or false if it is
not. |
GeomList<T> |
splitAtS(GeomPoint st)
Split this surface at the specified parametric S-position returning a list
containing two new surfaces (a lower surface with smaller S-parametric positions
than "s" and an upper surface with larger S-parametric positions).
|
GeomList<T> |
splitAtT(GeomPoint st)
Split this surface at the specified parametric T-position returning a list
containing two new surfaces (a lower surface with smaller T-parametric positions
than "t" and an upper surface with larger T-parametric positions).
|
T |
transpose()
Always throws UnsupportedOperationException as this method is not supported for
this object type! Subclasses that do support transpose() should override this
method.
|
addChangeListener, clone, compareTo, equals, getAllUserData, getID, getName, getUserData, hashCode, putAllUserData, putUserData, removeChangeListener, removeUserData, reset, setName, toString, toText
copy, getRealPoint, getS0Curve, getS1Curve, getT0Curve, getT1Curve, getTwistVector, reverseS, reverseT, splitAtS, splitAtT, to, toDimension, toNurbs
getTransformed
addChangeListener, copyToReal, getAllUserData, getBoundsMax, getBoundsMin, getID, getName, getPhyDimension, getUnit, getUserData, isValid, putAllUserData, putUserData, removeChangeListener, removeUserData, setName, size, toText
public static final double GTOL
public AbstractSurface()
public int getParDimension()
getParDimension
in interface GeomElement<T extends AbstractSurface>
public T transpose()
transpose
in interface Surface<T extends AbstractSurface>
java.lang.UnsupportedOperationException
- as this method is not supported on this
object type.public GeomList<T> splitAtS(GeomPoint st)
splitAtS
in interface Surface<T extends AbstractSurface>
st
- The S-parametric position where this surface should be split (must not be
0 or 1!). Must be a 2-dimensional point with each value in the range 0 to
1, only the 1st value is used. Units are ignored. May not be null.public GeomList<T> splitAtT(GeomPoint st)
splitAtT
in interface Surface<T extends AbstractSurface>
st
- The T-parametric position where this surface should be split (must not be
0 or 1!). Must be a 2-dimensional point with each value in the range 0 to
1, only the 2nd value is used. Units are ignored. May not be null.public SubrangePoint getPoint(double s, double t)
getPoint
in interface Surface<T extends AbstractSurface>
s
- 1st parametric dimension distance to calculate a point for (0.0 to 1.0
inclusive).t
- 2nd parametric dimension distance to calculate a point for (0.0 to 1.0
inclusive).java.lang.IllegalArgumentException
- if there is any problem with the parameter values.public SubrangePoint getPoint(GeomPoint st)
getPoint
in interface ParametricGeometry<T extends AbstractSurface>
getPoint
in interface Surface<T extends AbstractSurface>
st
- The parametric position to calculate a point for. Must be a 2-dimensional
point with each value in the range 0 to 1.0. Units are ignored.java.lang.IllegalArgumentException
- if there is any problem with the parameter values.public Point getRealPoint(GeomPoint st)
getRealPoint
in interface ParametricGeometry<T extends AbstractSurface>
getRealPoint
in interface Surface<T extends AbstractSurface>
st
- The parametric position to calculate a point for. Must be a 2-dimensional
point with each value in the range 0 to 1.0. Units are ignored.java.lang.IllegalArgumentException
- if there is any problem with the parameter values.public SubrangeCurve getCurve(Curve pcrv)
getCurve
in interface Surface<T extends AbstractSurface>
pcrv
- A curve in parametric space indicating the parametric positions on the
the surface represented by the subrange curve. Must be 2D with values
between 0 and 1.public SubrangeCurve getSCurve(double s)
getSCurve
in interface Surface<T extends AbstractSurface>
s
- The parametric s-position to extract a subrange curve.java.lang.IllegalArgumentException
- if there is any problem with the parameter value.public SubrangeCurve getTCurve(double t)
getTCurve
in interface Surface<T extends AbstractSurface>
t
- The parametric t-position to extract a subrange curve.java.lang.IllegalArgumentException
- if there is any problem with the parameter value.public java.util.List<java.util.List<Vector<Length>>> getDerivatives(GeomPoint st, int grade)
0
to grade
with
respect to parametric position(s) on a parametric object for the given parametric
position on the object, d^{grade}p(s)/d^{grade}s
.
Example:
1st derivative (grade = 1), this returns [p(s), dp(s)/ds]
;
2nd derivative (grade = 2), this returns [p(s), dp(s)/ds, d^2p(s)/d^2s]
; etc.
getDerivatives
in interface ParametricGeometry<T extends AbstractSurface>
getDerivatives
in interface Surface<T extends AbstractSurface>
st
- The parametric position to calculate the derivatives for. Must match
the parametric dimension of this parametric surface and have each
value in the range 0 to 1.0. Units are ignored.grade
- The maximum grade to calculate the derivatives for (1=1st derivative,
2=2nd derivative, etc)java.lang.IllegalArgumentException
- if the grade is < 0 or the parameter values are
invalid.public java.util.List<Vector<Length>> getSDerivatives(GeomPoint st, int grade)
0
to grade
with
respect to parametric s-position on the surface for the given parametric position
on the surface, d^{grade}p(s,t)/d^{grade}s
.
Example:
1st derivative (grade = 1), this returns [p(s,t), dp(s,t)/ds]
;
2nd derivative (grade = 2), this returns [p(s,t), dp(s,t)/ds, d^2p(s,t)/d^2s]
; etc.
getSDerivatives
in interface Surface<T extends AbstractSurface>
st
- The parametric position to calculate the derivatives for. Must be a
2-dimensional point with each value in the range 0 to 1.0. Units are
ignored.grade
- The maximum grade to calculate the derivatives for (1=1st derivative,
2=2nd derivative, etc)java.lang.IllegalArgumentException
- if the grade is < 0 or the parameter values are
invalid.public java.util.List<Vector<Length>> getSDerivatives(double s, double t, int grade)
0
to grade
with
respect to parametric s-position on the surface for the given parametric position
on the surface, d^{grade}p(s,t)/d^{grade}s
.
Example:
1st derivative (grade = 1), this returns [p(s,t), dp(s,t)/ds]
;
2nd derivative (grade = 2), this returns [p(s,t), dp(s,t)/ds, d^2p(s,t)/d^2s]
; etc.
getSDerivatives
in interface Surface<T extends AbstractSurface>
s
- 1st parametric dimension distance to calculate derivative for (0.0 to
1.0 inclusive).t
- 2nd parametric dimension distance to calculate derivative for (0.0 to
1.0 inclusive).grade
- The maximum grade to calculate the u-derivatives for (1=1st
derivative, 2=2nd derivative, etc)java.lang.IllegalArgumentException
- if the grade is < 0 or the parameter values are
invalid.public abstract java.util.List<Vector<Length>> getSDerivatives(double s, double t, int grade, boolean scaled)
0
to grade
with
respect to parametric s-position on the surface for the given parametric position
on the surface, d^{grade}p(s,t)/d^{grade}s
.
Example:
1st derivative (grade = 1), this returns [p(s,t), dp(s,t)/ds]
;
2nd derivative (grade = 2), this returns [p(s,t), dp(s,t)/ds, d^2p(s,t)/d^2s]
; etc.
s
- 1st parametric dimension distance to calculate derivative for (0.0 to
1.0 inclusive).t
- 2nd parametric dimension distance to calculate derivative for (0.0 to
1.0 inclusive).grade
- The maximum grade to calculate the u-derivatives for (1=1st
derivative, 2=2nd derivative, etc)scaled
- Pass true
for properly scaled derivatives or
false
if the magnitude of the derivative vector is not
required -- this sometimes results in faster calculation times.java.lang.IllegalArgumentException
- if the grade is < 0 or the parameter values are
invalid.public java.util.List<Vector<Length>> getTDerivatives(GeomPoint st, int grade)
0
to grade
with
respect to parametric t-position on the surface for the given parametric position
on the surface, d^{grade}p(s,t)/d^{grade}t
.
Example:
1st derivative (grade = 1), this returns [p(s,t), dp(s,t)/dt]
;
2nd derivative (grade = 2), this returns [p(s,t), dp(s,t)/dt, d^2p(s,t)/d^2t]
; etc.
getTDerivatives
in interface Surface<T extends AbstractSurface>
st
- The parametric position to calculate the derivatives for. Must be a
2-dimensional point with each value in the range 0 to 1.0. Units are
ignored.grade
- The maximum grade to calculate the derivatives for (1=1st derivative,
2=2nd derivative, etc)java.lang.IllegalArgumentException
- if the grade is < 0 or the parameter values are
invalid.public java.util.List<Vector<Length>> getTDerivatives(double s, double t, int grade)
0
to grade
with
respect to parametric t-position on the surface for the given parametric position
on the surface, d^{grade}p(s,t)/d^{grade}t
.
Example:
1st derivative (grade = 1), this returns [p(s,t), dp(s,t)/dt]
;
2nd derivative (grade = 2), this returns [p(s,t), dp(s,t)/dt, d^2p(s,t)/d^2t]
; etc.
getTDerivatives
in interface Surface<T extends AbstractSurface>
s
- 1st parametric dimension distance to calculate derivative for (0.0 to
1.0 inclusive).t
- 2nd parametric dimension distance to calculate derivative for (0.0 to
1.0 inclusive).grade
- The maximum grade to calculate the v-derivatives for (1=1st
derivative, 2=2nd derivative, etc)java.lang.IllegalArgumentException
- if the grade is < 0 or the parameter values are
invalid.public abstract java.util.List<Vector<Length>> getTDerivatives(double s, double t, int grade, boolean scaled)
0
to grade
with
respect to parametric t-position on the surface for the given parametric position
on the surface, d^{grade}p(s,t)/d^{grade}t
.
Example:
1st derivative (grade = 1), this returns [p(s,t), dp(s,t)/dt]
;
2nd derivative (grade = 2), this returns [p(s,t), dp(s,t)/dt, d^2p(s,t)/d^2t]
; etc.
s
- 1st parametric dimension distance to calculate derivative for (0.0 to
1.0 inclusive).t
- 2nd parametric dimension distance to calculate derivative for (0.0 to
1.0 inclusive).grade
- The maximum grade to calculate the v-derivatives for (1=1st
derivative, 2=2nd derivative, etc)scaled
- Pass true
for properly scaled derivatives or
false
if the magnitude of the derivative vector is not
required -- this sometimes results in faster calculation times.java.lang.IllegalArgumentException
- if the grade is < 0 or the parameter values are
invalid.public Vector<Length> getSDerivative(GeomPoint st, int grade)
d^{grade}p(s,t)/d^{grade}s
.
Example:
1st derivative (grade = 1), this returns dp(s,t)/ds
;
2nd derivative (grade = 2), this returns d^2p(s,t)/d^2s
; etc.
getSDerivative
in interface Surface<T extends AbstractSurface>
st
- The parametric position to calculate the derivative for. Must be a
2-dimensional point with each value in the range 0 to 1.0. Units are
ignored.grade
- The grade to calculate the derivative for (1=1st derivative, 2=2nd
derivative, etc)java.lang.IllegalArgumentException
- if the grade is < 0 or the parameter values are
invalid.public Vector<Length> getSDerivative(double s, double t, int grade)
d^{grade}p(s,t)/d^{grade}s
.
Example:
1st derivative (grade = 1), this returns dp(s,t)/ds
;
2nd derivative (grade = 2), this returns d^2p(s,t)/d^2s
; etc.
getSDerivative
in interface Surface<T extends AbstractSurface>
s
- 1st parametric dimension distance to calculate derivative for (0.0 to
1.0 inclusive).t
- 2nd parametric dimension distance to calculate derivative for (0.0 to
1.0 inclusive).grade
- The grade to calculate the derivative for (1=1st derivative, 2=2nd
derivative, etc)java.lang.IllegalArgumentException
- if the grade is < 0 or the parameter values are
invalid.public Vector<Length> getTDerivative(GeomPoint st, int grade)
d^{grade}p(s,t)/d^{grade}t
.
Example:
1st derivative (grade = 1), this returns dp(s,t)/dt
;
2nd derivative (grade = 2), this returns d^2p(s,t)/d^2t
; etc.
getTDerivative
in interface Surface<T extends AbstractSurface>
st
- The parametric position to calculate the derivative for. Must be a
2-dimensional point with each value in the range 0 to 1.0. Units are
ignored.grade
- The grade to calculate the derivative for (1=1st derivative, 2=2nd
derivative, etc)java.lang.IllegalArgumentException
- if the grade is < 0 or the parameter values are
invalid.public Vector<Length> getTDerivative(double s, double t, int grade)
d^{grade}p(s,t)/d^{grade}t
.
Example:
1st derivative (grade = 1), this returns dp(s,t)/dt
;
2nd derivative (grade = 2), this returns d^2p(s,t)/d^2t
; etc.
getTDerivative
in interface Surface<T extends AbstractSurface>
s
- 1st parametric dimension distance to calculate derivative for (0.0 to
1.0 inclusive).t
- 2nd parametric dimension distance to calculate derivative for (0.0 to
1.0 inclusive).grade
- The grade to calculate the derivative for (1=1st derivative, 2=2nd
derivative, etc)java.lang.IllegalArgumentException
- if the grade is < 0 or the parameter values are
invalid.public Vector<Length> getTwistVector(GeomPoint st)
getTwistVector
in interface Surface<T extends AbstractSurface>
st
- The parametric position to calculate the twist vector for. Must be a
2-dimensional point with each value in the range 0 to 1.0. Units are
ignored.java.lang.IllegalArgumentException
- if the parameter values are invalid.public Vector<Dimensionless> getNormal(double s, double t)
getNormal
in interface Surface<T extends AbstractSurface>
s
- 1st parametric dimension distance to calculate normal for (0.0 to 1.0
inclusive).t
- 2nd parametric dimension distance to calculate normal for (0.0 to 1.0
inclusive).public Vector<Dimensionless> getNormal(GeomPoint st)
getNormal
in interface Surface<T extends AbstractSurface>
st
- The parametric position to calculate the normal for. Must be a
2-dimensional point with each value in the range 0 to 1.0. Units are
ignored.public Plane getTangentPlane(double s, double t)
getTangentPlane
in interface Surface<T extends AbstractSurface>
s
- 1st parametric dimension distance to calculate tangent plane for (0.0 to
1.0 inclusive).t
- 2nd parametric dimension distance to calculate tangent plane for (0.0 to
1.0 inclusive).public Plane getTangentPlane(GeomPoint st)
getTangentPlane
in interface Surface<T extends AbstractSurface>
st
- The parametric position to calculate the tangent plane for. Must be a
2-dimensional point with each value in the range 0 to 1.0. Units are
ignored.public Parameter getGaussianCurvature(double s, double t)
getGaussianCurvature
in interface Surface<T extends AbstractSurface>
s
- 1st parametric dimension distance to calculate curvature for (0.0 to 1.0
inclusive).t
- 2nd parametric dimension distance to calculate curvature for (0.0 to 1.0
inclusive).public Parameter getGaussianCurvature(GeomPoint st)
getGaussianCurvature
in interface Surface<T extends AbstractSurface>
st
- The parametric position to calculate the curvature for. Must be a
2-dimensional point with each value in the range 0 to 1.0. Units are
ignored.public Parameter getMeanCurvature(GeomPoint st)
getMeanCurvature
in interface Surface<T extends AbstractSurface>
st
- The parametric position to calculate the curvature for. Must be a
2-dimensional point with each value in the range 0 to 1.0. Units are
ignored.public Parameter getMeanCurvature(double s, double t)
getMeanCurvature
in interface Surface<T extends AbstractSurface>
s
- 1st parametric dimension distance to calculate curvature for (0.0 to 1.0
inclusive).t
- 2nd parametric dimension distance to calculate curvature for (0.0 to 1.0
inclusive).public Parameter<Area> getArea(double eps)
getArea
in interface Surface<T extends AbstractSurface>
eps
- The desired fractional accuracy on the surface area.public Parameter<Area> getArea(GeomPoint st1, GeomPoint st2, double eps)
getArea
in interface Surface<T extends AbstractSurface>
st1
- The starting parametric position to calculate the area for. Must be a
2-dimensional point with each value in the range 0 to 1.0. Units are
ignored.st2
- The ending parametric position to calculate the area for. Must be a
2-dimensional point with each value in the range 0 to 1.0. Units are
ignored.eps
- The desired fractional accuracy on the surface area.public Parameter<Area> getArea(double s1, double t1, double s2, double t2, double eps)
getArea
in interface Surface<T extends AbstractSurface>
s1
- The starting 1st parametric dimension distance to calculate area for
(0.0 to 1.0 inclusive).t1
- The starting 2nd parametric dimension distance to calculate area for
(0.0 to 1.0 inclusive).s2
- The ending 1st parametric dimension distance to calculate area for (0.0
to 1.0 inclusive).t2
- The ending 2nd parametric dimension distance to calculate area for (0.0
to 1.0 inclusive).eps
- The desired fractional accuracy on the surface area.public Parameter<Volume> getVolume(double eps)
getVolume
in interface Surface<T extends AbstractSurface>
eps
- The desired fractional accuracy on the enclosed volume.public Parameter<Volume> getVolume(GeomPoint st1, GeomPoint st2, double eps)
getVolume
in interface Surface<T extends AbstractSurface>
st1
- The starting parametric position to calculate the volume for. Must be a
2-dimensional point with each value in the range 0 to 1.0. Units are
ignored.st2
- The ending parametric position to calculate the volume for. Must be a
2-dimensional point with each value in the range 0 to 1.0. Units are
ignored.eps
- The desired fractional accuracy on the enclosed volume.public Parameter<Volume> getVolume(double s1, double t1, double s2, double t2, double eps)
getVolume
in interface Surface<T extends AbstractSurface>
s1
- The starting 1st parametric dimension distance to calculate volume for
(0.0 to 1.0 inclusive).t1
- The starting 2nd parametric dimension distance to calculate volume for
(0.0 to 1.0 inclusive).s2
- The ending 1st parametric dimension distance to calculate volume for
(0.0 to 1.0 inclusive).t2
- The ending 2nd parametric dimension distance to calculate volume for
(0.0 to 1.0 inclusive).eps
- The desired fractional accuracy on the enclosed volume.public PointArray<SubrangePoint> extractGrid(GridRule gridRule, java.util.List<java.lang.Double> bottomSpacing, java.util.List<java.lang.Double> topSpacing, java.util.List<java.lang.Double> leftSpacing, java.util.List<java.lang.Double> rightSpacing)
gridRule
specifies whether
the subdivision spacing is applied with respect to arc-length in real space or
parameter space. If the spacing is arc-length, then the values are interpreted as
fractions of the arc length of the edge curves from 0 to 1.extractGrid
in interface Surface<T extends AbstractSurface>
gridRule
- Specifies whether the subdivision spacing is applied with
respect to arc-length in real space or parameter space.
May not be null.bottomSpacing
- A list of values used to define the subdivision spacing along
the T=0 parametric boundary of the surface. May not be null.topSpacing
- An optional list of values used to define the subdivision
spacing along the T=1 parametric boundary of the surface. If
null
is passed, the bottomSpacing is used for the
top. If topSpacing is provided, then it must have the same
number of values as the bottomSpacing.leftSpacing
- A list of values used to define the subdivision spacing along
the S=0 parametric boundary of the surface. May not be null.rightSpacing
- An optional list of values used to define the subdivision
spacing along the S=1 parametric boundary of the surface. If
null
is passed, the leftSpacing is used for the
right. If rightSpacing is provided, then it must have the same
number of values as the leftSpacing.public PointArray<SubrangePoint> gridToTolerance(Parameter<Length> tol)
gridToTolerance
in interface Surface<T extends AbstractSurface>
tol
- The maximum distance that a straight line between gridded points may
deviate from this surface. May not be null or zero.public SubrangePoint getClosest(GeomPoint point, double tol)
getClosest
in interface ParametricGeometry<T extends AbstractSurface>
getClosest
in interface Surface<T extends AbstractSurface>
point
- The point to find the closest point on this surface to. May not be null.tol
- Fractional tolerance to refine the distance to.SubrangePoint
on this surface that is closest to the specified
point.public SubrangePoint getClosest(GeomPoint point, double nearS, double nearT, double tol)
getClosest
in interface Surface<T extends AbstractSurface>
point
- The point to find the closest point on this surface to. May not be null.nearS
- The parametric s-position where the search for the closest point
should begin.nearT
- The parametric t-position where the search for the closest point
should begin.tol
- Fractional tolerance to refine the distance to.SubrangePoint
on this surface that is closest to the specified
point near the specified parametric position.public PointArray<SubrangePoint> getClosest(java.util.List<? extends java.util.List<GeomPoint>> points, double tol)
getClosest
in interface Surface<T extends AbstractSurface>
points
- A list of lists of points to find the closest point on this surface
to. May not be null.tol
- Fractional tolerance to refine the distance to.PointArray
of SubrangePoint
on this surface that is
closest to the specified list of lists of points.public SubrangePoint getFarthest(GeomPoint point, double tol)
getFarthest
in interface ParametricGeometry<T extends AbstractSurface>
getFarthest
in interface Surface<T extends AbstractSurface>
point
- The point to find the farthest point on this surface from. May not be
null.tol
- Fractional tolerance to refine the distance to.SubrangePoint
on this surface that is farthest from the
specified point.public SubrangePoint getFarthest(GeomPoint point, double nearS, double nearT, double tol)
getFarthest
in interface Surface<T extends AbstractSurface>
point
- The point to find the farthest point on this surface from. May not be
null.nearS
- The parametric s-position where the search for the closest point
should begin.nearT
- The parametric t-position where the search for the closest point
should begin.tol
- Fractional tolerance to refine the distance to.SubrangePoint
on this surface that is farthest from the
specified point.public PointArray<SubrangePoint> getFarthest(java.util.List<? extends java.util.List<GeomPoint>> points, double tol)
getFarthest
in interface Surface<T extends AbstractSurface>
points
- A list of lists of points to find the farthest point on this surface
from. May not be null.tol
- Fractional tolerance to refine the distance to.PointArray
of SubrangePoint
on this surface that is
farthest from the specified list of lists of points.public PointString<SubrangePoint> getClosest(Curve curve, double tol)
getClosest
in interface Surface<T extends AbstractSurface>
curve
- The curve to find the closest points between this surface and that
curve on. May not be null.tol
- Fractional tolerance (in parameter space) to refine the point position
to.public PointString<SubrangePoint> getClosest(Surface surface, double tol)
getClosest
in interface Surface<T extends AbstractSurface>
surface
- The surface to find the closest points between this surface and that
surface on. May not be null.tol
- Fractional tolerance (in parameter space) to refine the point
position to.public SubrangePoint getClosest(GeomPlane plane, double tol)
getClosest
in interface Surface<T extends AbstractSurface>
plane
- The plane to find the closest points between this surface and that
plane on. May not be null.tol
- Fractional tolerance (in parameter space) to refine the point position
to.public SubrangePoint getLimitPoint(int dim, boolean max, double tol)
getBoundsMax()
& getBoundsMin()
, but also typically takes
longer to compute.getLimitPoint
in interface GeomElement<T extends AbstractSurface>
dim
- An index indicating the dimension to find the min/max point for (0=X,
1=Y, 2=Z, etc).max
- Set to true
to return the maximum value, false
to return the minimum.tol
- Fractional tolerance (in parameter space) to refine the min/max point
position to.GeomElement.getBoundsMin()
,
GeomElement.getBoundsMax()
public PointString<SubrangePoint> intersect(GeomPoint L0, GeomVector Ldir, Parameter<Length> tol)
intersect
in interface Surface<T extends AbstractSurface>
L0
- A point on the line (origin of the line). May not be null.Ldir
- The direction vector for the line (does not have to be a unit vector).
May not be null.tol
- Tolerance (in physical space) to refine the point positions to. May not
be null.public GeomList<PointString<SubrangePoint>> intersect(LineSegment line, Parameter<Length> tol)
intersect
in interface Surface<T extends AbstractSurface>
line
- A line segment to intersect with this surface. May not be null.tol
- Tolerance (in physical space) to refine the point positions to. May not
be null.public GeomList<PointString<SubrangePoint>> intersect(Curve curve, Parameter<Length> tol)
intersect
in interface Surface<T extends AbstractSurface>
curve
- The curve to intersect with this surface. May not be null.tol
- Tolerance (in physical space) to refine the point positions to. May
not be null.public GeomList<SubrangeCurve> intersect(GeomPlane plane, Parameter<Length> tol)
intersect
in interface Surface<T extends AbstractSurface>
plane
- The infinite plane to intersect with this surface. May not be null.tol
- Tolerance (in physical space) to refine the point positions to. May not be null.public GeomList<GeomList<SubrangeCurve>> intersect(Surface surface, Parameter<Length> tol)
intersect
in interface Surface<T extends AbstractSurface>
surface
- A surface to intersect with this surface. May not be null.tol
- Tolerance (in physical space) to refine the point positions to. May
not be null.public boolean isDegenerate(Parameter<Length> tol)
true
if this surface is degenerate (i.e.: has area less than
the specified tolerance squared).isDegenerate
in interface ParametricGeometry<T extends AbstractSurface>
isDegenerate
in interface Surface<T extends AbstractSurface>
tol
- The tolerance for determining if this surface is degenerate. May not be null.public boolean isPlanar(Parameter<Length> tol)
true
if this surface is planar or false
if it is
not.isPlanar
in interface Surface<T extends AbstractSurface>
tol
- The geometric tolerance to use in determining if the surface is planar.
May not be null.public boolean isPlanar(double epsFT, double epsELT)
true
if this surface is planar or false
if it is
not.isPlanar
in interface Surface<T extends AbstractSurface>
epsFT
- Flatness tolerance (cosine of the angle allowable between normal
vectors).epsELT
- Edge linearity tolerance (cosine of the angle allowable between edge
vectors).