Trimmed Curve MbTrimmedCurve3D
The MbTrimmedCurve3D class is declared in the cur_trimmed_curve3d.h file.
A trimmed curve is defined by the base curve MbCurve3D * basisCurve, the start parameter of trimming of the base curve trim1, the end parameter of trimming of the base curve trim2, and the flag of coincidence of the directions of the base curve and the trimmed curve sense.
The trimmed curve coincides with the base curve on the segment defined by the trim1 and trim2 parameters but can have the opposite direction. If sense = 1, then trim1 < trim2 and the trimmed curve coincides in direction with the base curve. If sense = -1, then trim2 < trim1 and the trimmed curve is directed opposite to the base curve.
In the method
PointOn( double & t,
MbCartPoint3D & r)
the radius vector of the curve r is described by the vector function
The trimmed curve is shown in the figure:
The curve parameter t takes values on the segment
The trimmed curve can theoretically be used to change the direction of a curve, but it is better to use the Inverse() method.
The trimmed curve can be used to change the position of the start point of a periodic curve. For this, the base curve must be periodic and trim2 = trim1 + period. In this case the trimmed curve will also be periodic.
Another trimmed curve must not be used as a base curve for a trimmed curve; the base curve of the latter must be used with the corresponding recalculation of trimming parameters.
Each curve can build its own trimmed copy using the virtual method
Trimmed( double t1, double t2, int sense).