![]() |
Open CASCADE Technology Reference Manual 8.0.0
|
Constructs curves with a constant or linearly increasing section to be used in the design of wooden or plastic battens. These curves are two-dimensional, and simulate physical splines or battens. More...
#include <FairCurve_Batten.hxx>

Public Member Functions | |
| FairCurve_Batten (const gp_Pnt2d &P1, const gp_Pnt2d &P2, const double Height, const double Slope=0) | |
| Constructor with the two points and the geometrical characteristics of the batten (elastic beam) Height is the height of the deformation, and Slope is the slope value, initialized at 0. The user can then supply the desired slope value by the method, SetSlope. Other parameters are initialized as follow : | |
| virtual | ~FairCurve_Batten () |
| void | SetFreeSliding (const bool FreeSliding) |
| Freesliding is initialized with the default setting false. When Freesliding is set to true and, as a result, sliding is free, the sliding factor is automatically computed to satisfy the equilibrium of the batten. | |
| void | SetConstraintOrder1 (const int ConstraintOrder) |
| Allows you to change the order of the constraint on the first point. ConstraintOrder has the default setting of 1. The following settings are available: | |
| void | SetConstraintOrder2 (const int ConstraintOrder) |
| Allows you to change the order of the constraint on the second point. ConstraintOrder is initialized with the default setting of 1. The following settings are available: | |
| void | SetP1 (const gp_Pnt2d &P1) |
| Allows you to change the location of the point, P1, and in doing so, modify the curve. Warning This method changes the angle as well as the point. Exceptions NullValue if the distance between P1 and P2 is less than or equal to the tolerance value for distance in Precision::Confusion: P1.IsEqual(P2,
Precision::Confusion()). The function gp_Pnt2d::IsEqual tests to see if this is the case. | |
| void | SetP2 (const gp_Pnt2d &P2) |
| Allows you to change the location of the point, P1, and in doing so, modify the curve. Warning This method changes the angle as well as the point. Exceptions NullValue if the distance between P1 and P2 is less than or equal to the tolerance value for distance in Precision::Confusion: P1.IsEqual(P2,
Precision::Confusion()). The function gp_Pnt2d::IsEqual tests to see if this is the case. | |
| void | SetAngle1 (const double Angle1) |
| Allows you to change the angle Angle1 at the first point, P1. The default setting is 0. | |
| void | SetAngle2 (const double Angle2) |
| Allows you to change the angle Angle2 at the second point, P2. The default setting is 0. | |
| void | SetHeight (const double Height) |
| Allows you to change the height of the deformation. Raises NegativeValue; – if Height <= 0 if Height <= 0. | |
| void | SetSlope (const double Slope) |
| Allows you to set the slope value, Slope. | |
| void | SetSlidingFactor (const double SlidingFactor) |
| Allows you to change the ratio SlidingFactor. This compares the length of the batten and the reference length, which is, in turn, a function of the constraints. This modification has one of the following two effects: | |
| virtual bool | Compute (FairCurve_AnalysisCode &Code, const int NbIterations=50, const double Tolerance=1.0e-3) |
| Performs the algorithm, using the arguments Code, NbIterations and Tolerance and computes the curve with respect to the constraints. Code will have one of the following values: | |
| double | SlidingOfReference () const |
| Computes the real number value for length Sliding of Reference for new constraints. If you want to give a specific length to a batten curve, use the following syntax: b.SetSlidingFactor(L / b.SlidingOfReference()) where b is the name of the batten curve object. | |
| bool | GetFreeSliding () const |
| Returns the initial free sliding value, false by default. Free sliding is generally more aesthetically pleasing than constrained sliding. However, the computation can fail with values such as angles greater than PI/2. This is because the resulting batten length is theoretically infinite. | |
| int | GetConstraintOrder1 () const |
| Returns the established first constraint order. | |
| int | GetConstraintOrder2 () const |
| Returns the established second constraint order. | |
| const gp_Pnt2d & | GetP1 () const |
| Returns the established location of the point P1. | |
| const gp_Pnt2d & | GetP2 () const |
| Returns the established location of the point P2. | |
| double | GetAngle1 () const |
| Returns the established first angle. | |
| double | GetAngle2 () const |
| Returns the established second angle. | |
| double | GetHeight () const |
| Returns the thickness of the lathe. | |
| double | GetSlope () const |
| Returns the established slope value. | |
| double | GetSlidingFactor () const |
| Returns the initial sliding factor. | |
| occ::handle< Geom2d_BSplineCurve > | Curve () const |
| Returns the computed curve a 2d BSpline. | |
| virtual void | Dump (Standard_OStream &o) const |
| Prints on the stream o information on the current state of the object. | |
Protected Member Functions | |
| double | SlidingOfReference (const double D, const double A1, const double A2) const |
| double | Compute (const double D, const double A1, const double A2) const |
| double | Compute (const double D, const double A) const |
| Returns the effective geometrical constraints at the last batten computation. This effectives values may be not equal with the wanted values if. | |
Constructs curves with a constant or linearly increasing section to be used in the design of wooden or plastic battens. These curves are two-dimensional, and simulate physical splines or battens.
| FairCurve_Batten::FairCurve_Batten | ( | const gp_Pnt2d & | P1, |
| const gp_Pnt2d & | P2, | ||
| const double | Height, | ||
| const double | Slope = 0 ) |
Constructor with the two points and the geometrical characteristics of the batten (elastic beam) Height is the height of the deformation, and Slope is the slope value, initialized at 0. The user can then supply the desired slope value by the method, SetSlope. Other parameters are initialized as follow :
|
virtual |
Returns the effective geometrical constraints at the last batten computation. This effectives values may be not equal with the wanted values if.
|
protected |
|
virtual |
Performs the algorithm, using the arguments Code, NbIterations and Tolerance and computes the curve with respect to the constraints. Code will have one of the following values:
Reimplemented in FairCurve_MinimalVariation.
| occ::handle< Geom2d_BSplineCurve > FairCurve_Batten::Curve | ( | ) | const |
Returns the computed curve a 2d BSpline.
|
virtual |
Prints on the stream o information on the current state of the object.
Private methodes -----------------------------------—
Reimplemented in FairCurve_MinimalVariation.
| double FairCurve_Batten::GetAngle1 | ( | ) | const |
Returns the established first angle.
| double FairCurve_Batten::GetAngle2 | ( | ) | const |
Returns the established second angle.
| int FairCurve_Batten::GetConstraintOrder1 | ( | ) | const |
Returns the established first constraint order.
| int FairCurve_Batten::GetConstraintOrder2 | ( | ) | const |
Returns the established second constraint order.
| bool FairCurve_Batten::GetFreeSliding | ( | ) | const |
Returns the initial free sliding value, false by default. Free sliding is generally more aesthetically pleasing than constrained sliding. However, the computation can fail with values such as angles greater than PI/2. This is because the resulting batten length is theoretically infinite.
| double FairCurve_Batten::GetHeight | ( | ) | const |
Returns the thickness of the lathe.
| const gp_Pnt2d & FairCurve_Batten::GetP1 | ( | ) | const |
Returns the established location of the point P1.
| const gp_Pnt2d & FairCurve_Batten::GetP2 | ( | ) | const |
Returns the established location of the point P2.
| double FairCurve_Batten::GetSlidingFactor | ( | ) | const |
Returns the initial sliding factor.
| double FairCurve_Batten::GetSlope | ( | ) | const |
Returns the established slope value.
Allows you to change the angle Angle1 at the first point, P1. The default setting is 0.
Allows you to change the angle Angle2 at the second point, P2. The default setting is 0.
Allows you to change the order of the constraint on the first point. ConstraintOrder has the default setting of 1. The following settings are available:
Allows you to change the order of the constraint on the second point. ConstraintOrder is initialized with the default setting of 1. The following settings are available:
Freesliding is initialized with the default setting false. When Freesliding is set to true and, as a result, sliding is free, the sliding factor is automatically computed to satisfy the equilibrium of the batten.
Allows you to change the height of the deformation. Raises NegativeValue; – if Height <= 0 if Height <= 0.
Allows you to change the location of the point, P1, and in doing so, modify the curve. Warning This method changes the angle as well as the point. Exceptions NullValue if the distance between P1 and P2 is less than or equal to the tolerance value for distance in Precision::Confusion: P1.IsEqual(P2, Precision::Confusion()). The function gp_Pnt2d::IsEqual tests to see if this is the case.
Allows you to change the location of the point, P1, and in doing so, modify the curve. Warning This method changes the angle as well as the point. Exceptions NullValue if the distance between P1 and P2 is less than or equal to the tolerance value for distance in Precision::Confusion: P1.IsEqual(P2, Precision::Confusion()). The function gp_Pnt2d::IsEqual tests to see if this is the case.
Allows you to change the ratio SlidingFactor. This compares the length of the batten and the reference length, which is, in turn, a function of the constraints. This modification has one of the following two effects:
| double FairCurve_Batten::SlidingOfReference | ( | ) | const |
Computes the real number value for length Sliding of Reference for new constraints. If you want to give a specific length to a batten curve, use the following syntax: b.SetSlidingFactor(L / b.SlidingOfReference()) where b is the name of the batten curve object.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |