|
Open CASCADE Technology
6.7.1
|
Computes a 2D curve using an algorithm which
minimizes tension, sagging, and jerk energy. As in
FairCurve_Batten, two reference points are used.
Unlike that class, FairCurve_MinimalVariation
requires curvature settings at the first and second
reference points. These are defined by the rays of
curvature desired at each point.
More...
#include <FairCurve_MinimalVariation.hxx>

Public Member Functions | |
| FairCurve_MinimalVariation (const gp_Pnt2d &P1, const gp_Pnt2d &P2, const Standard_Real Heigth, const Standard_Real Slope=0, const Standard_Real PhysicalRatio=0) | |
Constructs the two contact points P1 and P2 and the geometrical <br>
characteristics of the batten (elastic beam) <br>
These include the real number values for height of | |
| void | SetCurvature1 (const Standard_Real Curvature) |
| Allows you to set a new constraint on curvature at the first point. More... | |
| void | SetCurvature2 (const Standard_Real Curvature) |
Allows you to set a new constraint on curvature at the second point. <br> | |
| void | SetPhysicalRatio (const Standard_Real Ratio) |
Allows you to set the physical ratio Ratio. <br> The kinds of energy which you can specify include: | |
| virtual Standard_Boolean | Compute (FairCurve_AnalysisCode &ACode, const Standard_Integer NbIterations=50, const Standard_Real Tolerance=1.0e-3) |
Computes the curve with respect to the constraints, <br> NbIterations and Tolerance. The tolerance setting | |
| Standard_Real | GetCurvature1 () const |
| Returns the first established curvature. More... | |
| Standard_Real | GetCurvature2 () const |
| Returns the second established curvature. More... | |
| Standard_Real | GetPhysicalRatio () const |
| Returns the physical ratio, or kind of energy. More... | |
| virtual void | Dump (Standard_OStream &o) const |
| Prints on the stream o information on the current state of the object. Is used to redefine the operator <<. More... | |
Public Member Functions inherited from FairCurve_Batten | |
| FairCurve_Batten (const gp_Pnt2d &P1, const gp_Pnt2d &P2, const Standard_Real Height, const Standard_Real Slope=0) | |
Constructor with the two points and the geometrical <br>
characteristics of the batten (elastic beam) <br>
Height is the height of the deformation, and Slope is the | |
| virtual void | Delete () |
| virtual | ~FairCurve_Batten () |
| void | SetFreeSliding (const Standard_Boolean FreeSliding) |
Freesliding is initialized with the default setting false. <br> When Freesliding is set to true and, as a result, sliding | |
| void | SetConstraintOrder1 (const Standard_Integer ConstraintOrder) |
Allows you to change the order of the constraint on the <br> first point. ConstraintOrder has the default setting of 1. | |
| void | SetConstraintOrder2 (const Standard_Integer ConstraintOrder) |
Allows you to change the order of the constraint on the <br> second point. ConstraintOrder is initialized with the default setting of 1. | |
| void | SetP1 (const gp_Pnt2d &P1) |
Allows you to change the location of the point, P1, and in <br> doing so, modify the curve. | |
| void | SetP2 (const gp_Pnt2d &P2) |
Allows you to change the location of the point, P1, and in <br> doing so, modify the curve. | |
| void | SetAngle1 (const Standard_Real Angle1) |
Allows you to change the angle Angle1 at the first point, <br> P1. The default setting is 0. | |
| void | SetAngle2 (const Standard_Real Angle2) |
Allows you to change the angle Angle2 at the second <br> point, P2. The default setting is 0. | |
| void | SetHeight (const Standard_Real Height) |
Allows you to change the height of the deformation. <br> Raises NegativeValue; – if Height <= 0 | |
| void | SetSlope (const Standard_Real Slope) |
| Allows you to set the slope value, Slope. More... | |
| void | SetSlidingFactor (const Standard_Real SlidingFactor) |
Allows you to change the ratio SlidingFactor. This <br> compares the length of the batten and the reference | |
| Standard_Real | SlidingOfReference () const |
Computes the real number value for length Sliding of <br> Reference for new constraints. If you want to give a | |
| Standard_Boolean | GetFreeSliding () const |
Returns the initial free sliding value, false by default. <br> Free sliding is generally more aesthetically pleasing | |
| Standard_Integer | GetConstraintOrder1 () const |
| Returns the established first constraint order. More... | |
| Standard_Integer | GetConstraintOrder2 () const |
| Returns the established second constraint order. More... | |
| const gp_Pnt2d & | GetP1 () const |
| Returns the established location of the point P1. More... | |
| const gp_Pnt2d & | GetP2 () const |
| Returns the established location of the point P2. More... | |
| Standard_Real | GetAngle1 () const |
| Returns the established first angle. More... | |
| Standard_Real | GetAngle2 () const |
| Returns the established second angle. More... | |
| Standard_Real | GetHeight () const |
| Returns the thickness of the lathe. More... | |
| Standard_Real | GetSlope () const |
| Returns the established slope value. More... | |
| Standard_Real | GetSlidingFactor () const |
| Returns the initial sliding factor. More... | |
| Handle_Geom2d_BSplineCurve | Curve () const |
| Returns the computed curve a 2d BSpline. More... | |
Computes a 2D curve using an algorithm which
minimizes tension, sagging, and jerk energy. As in
FairCurve_Batten, two reference points are used.
Unlike that class, FairCurve_MinimalVariation
requires curvature settings at the first and second
reference points. These are defined by the rays of
curvature desired at each point.
| FairCurve_MinimalVariation::FairCurve_MinimalVariation | ( | const gp_Pnt2d & | P1, |
| const gp_Pnt2d & | P2, | ||
| const Standard_Real | Heigth, | ||
| const Standard_Real | Slope = 0, |
||
| const Standard_Real | PhysicalRatio = 0 |
||
| ) |
Constructs the two contact points P1 and P2 and the geometrical <br>
characteristics of the batten (elastic beam) <br>
These include the real number values for height of
deformation Height, slope value Slope, and kind of
energy PhysicalRatio. The kinds of energy include:
|
virtual |
Computes the curve with respect to the constraints, <br>
NbIterations and Tolerance. The tolerance setting
allows you to control the precision of computation, and
the maximum number of iterations allows you to set a limit on computation time.
Reimplemented from FairCurve_Batten.
|
virtual |
Prints on the stream o information on the current state
of the object.
Is used to redefine the operator <<.
Reimplemented from FairCurve_Batten.
| Standard_Real FairCurve_MinimalVariation::GetCurvature1 | ( | ) | const |
Returns the first established curvature.
| Standard_Real FairCurve_MinimalVariation::GetCurvature2 | ( | ) | const |
Returns the second established curvature.
| Standard_Real FairCurve_MinimalVariation::GetPhysicalRatio | ( | ) | const |
Returns the physical ratio, or kind of energy.
| void FairCurve_MinimalVariation::SetCurvature1 | ( | const Standard_Real | Curvature | ) |
Allows you to set a new constraint on curvature at the first point.
| void FairCurve_MinimalVariation::SetCurvature2 | ( | const Standard_Real | Curvature | ) |
Allows you to set a new constraint on curvature at the second point. <br>
| void FairCurve_MinimalVariation::SetPhysicalRatio | ( | const Standard_Real | Ratio | ) |
Allows you to set the physical ratio Ratio. <br>
The kinds of energy which you can specify include:
0 is only "Jerk" Energy
1 is only "Sagging" Energy like batten
Warning: if Ratio is 1 it is impossible to impose curvature constraints.
Raises DomainError if Ratio < 0 or Ratio > 1
1.8.5