Package geomss.geom
Interface ParametricGeometry<T extends ParametricGeometry>
-
- Type Parameters:
T
- The type of this parametric geometry object.
- All Superinterfaces:
java.lang.Cloneable
,java.lang.Comparable
,GeomElement<T>
,java.io.Serializable
,Transformable<T>
,javolution.xml.XMLSerializable
- All Known Implementing Classes:
AbstractCurve
,AbstractSurface
,BasicCSTCurve
,BasicNurbsCurve
,BasicNurbsSurface
,CSTCurve
,CSTCurveTrans
,LinearComboCurve
,LineSeg
,LineSegment
,LineSegTrans
,LoftedSurface
,NurbsCurve
,NurbsCurveTrans
,NurbsSurface
,NurbsSurfaceTrans
,SubrangeCurve
,SubrangeSurface
,TFISurface
public interface ParametricGeometry<T extends ParametricGeometry> extends GeomElement<T>, Transformable<T>
Defines the interface forGeomElement
objects that have parametric dimensions.Modified by: Joseph A. Huwaldt
- Version:
- February 17, 2025
- Author:
- Joseph A. Huwaldt, Date: March 31, 2000
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
copy()
Returns a copy of this ParametricGeometry instanceallocated
by the calling thread (possibly on the stack).SubrangePoint
getClosest(GeomPoint point, double tol)
Returns the closest point on this parametric object to the specified point.java.util.List<java.util.List<Vector<javax.measure.quantity.Length>>>
getDerivatives(GeomPoint s, int grade)
Calculate all the derivatives from0
tograde
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 parametric object from the specified point.SubrangePoint
getPoint(GeomPoint s)
Return a subrange point on the parametric geometry for the given parametric distance along the parametric geometry.Point
getRealPoint(GeomPoint s)
Calculate a point on the parametric geometry for the given parametric distance along the parametric geometry.boolean
isDegenerate(Parameter<javax.measure.quantity.Length> tol)
Returntrue
if this element is degenerate (i.e.: has length or area less than the specified tolerance).T
to(javax.measure.unit.Unit<javax.measure.quantity.Length> unit)
Returns the equivalent to this parametric object but stated in the specified unit.T
toDimension(int newDim)
Return a copy of this parametric geometry converted to the specified number of physical dimensions.-
Methods inherited from interface geomss.geom.GeomElement
addChangeListener, copyToReal, getAllUserData, getBoundsMax, getBoundsMin, getID, getLimitPoint, getName, getParDimension, getPhyDimension, getUnit, getUserData, isValid, putAllUserData, putUserData, removeChangeListener, removeUserData, setName, size, toText
-
Methods inherited from interface geomss.geom.Transformable
getTransformed
-
-
-
-
Method Detail
-
getPoint
SubrangePoint getPoint(GeomPoint s)
Return a subrange point on the parametric geometry for the given parametric distance along the parametric geometry.- Parameters:
s
- parametric distance to calculate a point for. Must be a 1-dimensional point with a value in the range 0 to 1.0.- Returns:
- The subrange point
-
getRealPoint
Point getRealPoint(GeomPoint s)
Calculate a point on the parametric geometry for the given parametric distance along the parametric geometry.- Parameters:
s
- parametric distance to calculate a point for. Must be a 1-dimensional point with a value in the range 0 to 1.0.- Returns:
- The calculated point.
-
getDerivatives
java.util.List<java.util.List<Vector<javax.measure.quantity.Length>>> getDerivatives(GeomPoint s, int grade)
Calculate all the derivatives from0
tograde
with respect to parametric position(s) on a parametric object for the given parametric position on the object,d^{grade}p(s)/d^{grade}s
.Example:
1st derivative (grade = 1), this returns[p(s), dp(s)/ds]
;
2nd derivative (grade = 2), this returns[p(s), dp(s)/ds, d^2p(s)/d^2s]
; etc.- Parameters:
s
- parametric position to calculate the derivatives for. Must match the parametric dimension of this parametric surface and have each value in the range 0 to 1.0. Units are ignored.grade
- The maximum grade to calculate the derivatives for (1=1st derivative, 2=2nd derivative, etc)- Returns:
- A list of lists of derivatives (one list for each parametric dimension). Each list contains derivatives up to the specified grade at the specified parametric position. Example: for a surface list element 0 is the array of derivatives int the 1st parametric dimension (s), then 2nd list element is the array of derivatives in the 2nd parametric dimension (t).
- Throws:
java.lang.IllegalArgumentException
- if the grade is < 0.
-
getClosest
SubrangePoint getClosest(GeomPoint point, double tol)
Returns the closest point on this parametric object to the specified point.- Parameters:
point
- The point to find the closest point on this parametric object to.tol
- Fractional tolerance (in parameter space) to refine the point position to.- Returns:
- The point on this parametric object that is closest to the specified point.
-
getFarthest
SubrangePoint getFarthest(GeomPoint point, double tol)
Returns the farthest point on this parametric object from the specified point.- Parameters:
point
- The point to find the farthest point on this parametric object from.tol
- Fractional tolerance (in parameter space) to refine the point position to.- Returns:
- The
SubrangePoint
on this parametric object that is farthest from the specified point.
-
isDegenerate
boolean isDegenerate(Parameter<javax.measure.quantity.Length> tol)
Returntrue
if this element is degenerate (i.e.: has length or area less than the specified tolerance).- Parameters:
tol
- The tolerance for determining if this element is degenerate. May not be null.- Returns:
- true if this element is degenerate.
-
to
T to(javax.measure.unit.Unit<javax.measure.quantity.Length> unit) throws javax.measure.converter.ConversionException
Returns the equivalent to this parametric object but stated in the specified unit.- Specified by:
to
in interfaceGeomElement<T extends ParametricGeometry>
- Parameters:
unit
- the length unit of the parametric object to be returned.- Returns:
- an equivalent to this parametric object but stated in the specified unit.
- Throws:
javax.measure.converter.ConversionException
- if the the input unit is not a length unit.
-
toDimension
T toDimension(int newDim)
Return a copy of this parametric geometry converted to the specified number of physical dimensions. If the number of dimensions is greater than this element, then zeros are added to the additional dimensions. If the number of dimensions is less than this element, then the extra dimensions are simply dropped (truncated). If the new dimensions are the same as the dimension of this element, then this element is simply returned.- Specified by:
toDimension
in interfaceGeomElement<T extends ParametricGeometry>
- Parameters:
newDim
- The dimension of the parametric geometry element to return.- Returns:
- This parametric geometry element converted to the new dimensions.
-
copy
T copy()
Returns a copy of this ParametricGeometry instanceallocated
by the calling thread (possibly on the stack).- Specified by:
copy
in interfaceGeomElement<T extends ParametricGeometry>
- Returns:
- an identical and independent copy of this object.
-
-