Open CASCADE Technology 6.6.0
|
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.
#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 characteristics of the batten (elastic beam) These include the real number values for height of deformation Height, slope value Slope, and kind of energy PhysicalRatio. The kinds of energy include: | |
void | SetCurvature1 (const Standard_Real Curvature) |
Allows you to set a new constraint on curvature at the first point. | |
void | SetCurvature2 (const Standard_Real Curvature) |
Allows you to set a new constraint on curvature at the second point. | |
void | SetPhysicalRatio (const Standard_Real Ratio) |
Allows you to set the physical ratio Ratio. 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 | |
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, 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. | |
Standard_Real | GetCurvature1 () const |
Returns the first established curvature. | |
Standard_Real | GetCurvature2 () const |
Returns the second established curvature. | |
Standard_Real | GetPhysicalRatio () const |
Returns the physical ratio, or kind of energy. | |
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 <<. |
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 |
||
) |
virtual Standard_Boolean FairCurve_MinimalVariation::Compute | ( | FairCurve_AnalysisCode & | ACode, |
const Standard_Integer | NbIterations = 50 , |
||
const Standard_Real | Tolerance = 1.0e-3 |
||
) | [virtual] |
Reimplemented from FairCurve_Batten.
virtual void FairCurve_MinimalVariation::Dump | ( | Standard_OStream & | o | ) | const [virtual] |
Reimplemented from FairCurve_Batten.
Standard_Real FairCurve_MinimalVariation::GetCurvature1 | ( | ) | const |
Standard_Real FairCurve_MinimalVariation::GetCurvature2 | ( | ) | const |
Standard_Real FairCurve_MinimalVariation::GetPhysicalRatio | ( | ) | const |
void FairCurve_MinimalVariation::SetCurvature1 | ( | const Standard_Real | Curvature | ) |
void FairCurve_MinimalVariation::SetCurvature2 | ( | const Standard_Real | Curvature | ) |
void FairCurve_MinimalVariation::SetPhysicalRatio | ( | const Standard_Real | Ratio | ) |