CurveGetNextDiscontinuity Method (Continuity, Double, Double, Double, Double, Double) |
Searches for a derivative, tangent, or curvature discontinuity.
Namespace:
Rhino.Geometry
Assembly:
RhinoCommon (in RhinoCommon.dll)
Since: 7.4
Syntaxpublic bool GetNextDiscontinuity(
Continuity continuityType,
double t0,
double t1,
double cosAngleTolerance,
double curvatureTolerance,
out double t
)
Public Function GetNextDiscontinuity (
continuityType As Continuity,
t0 As Double,
t1 As Double,
cosAngleTolerance As Double,
curvatureTolerance As Double,
<OutAttribute> ByRef t As Double
) As Boolean
Parameters
- continuityType
- Type: Rhino.GeometryContinuity
Type of continuity to search for. - t0
- Type: SystemDouble
Search begins at t0. If there is a discontinuity at t0, it will be ignored. This makes it
possible to repeatedly call GetNextDiscontinuity() and step through the discontinuities.
- t1
- Type: SystemDouble
(t0 != t1) If there is a discontinuity at t1 it will be ignored unless continuityType is
a locus discontinuity type and t1 is at the start or end of the curve.
- cosAngleTolerance
- Type: SystemDouble
default = cos(1 degree) Used only when continuity is G1_continuous or G2_continuous.
If the cosine of the angle between two tangent vectors is <= cosAngleTolerance,
then a G1 discontinuity is reported.
For G2, values tighter than cos(1 degree) are treated as cos(1 degree), and angles
less than about 18 degrees are doubled for the curvature direction test. With the
default, a G2 discontinuity is reported if the curvature vectors differ by more than 2 degrees.
- curvatureTolerance
- Type: SystemDouble
(default = RhinoMath.SqrtEpsilon) Used only when continuity is G2_continuous. If K0 and K1
are curvatures evaluated from above and below and |K0 - K1| <= curvatureTolerance,
then the curvature is considered continuous. Otherwise, a curvature discontinuity is
reported if the curvature direction test fails or ||K0| - |K1|| > 0.05 * max(|K0|, |K1|).
Increasing curvatureTolerance can only loosen the test.
- t
- Type: SystemDouble
If a discontinuity is found, then t reports the parameter at the discontinuity.
Return Value
Type:
Boolean
Parametric continuity tests c = (C0_continuous, ..., G2_continuous):
true if a parametric discontinuity was found strictly between t0 and t1. Note well that
all curves are parametrically continuous at the ends of their domains.
Locus continuity tests c = (C0_locus_continuous, ...,G2_locus_continuous):
true if a locus discontinuity was found strictly between t0 and t1 or at t1 is the at the end
of a curve. Note well that all open curves (IsClosed()=false) are locus discontinuous at the
ends of their domains. All closed curves (IsClosed()=true) are at least C0_locus_continuous at
the ends of their domains.
See Also