Logo Search packages:      
Sourcecode: opencascade version File versions  Download package

void ElCLib::AdjustPeriodic ( const Standard_Real  UFirst,
const Standard_Real  ULast,
const Standard_Real  Precision,
Standard_Real &  U1,
Standard_Real &  U2 
) [static]

Adjust U1 and U2 in the parametric range UFirst
Ulast of a periodic curve, where ULast -
UFirst is its period. To do this, this function:

  • sets U1 in the range [ UFirst, ULast ] by
    adding/removing the period to/from the value U1, then
  • sets U2 in the range [ U1, U1 + period ] by
    adding/removing the period to/from the value U2.
    Precision is used to test the equalities.

Definition at line 38 of file ElCLib.cxx.

Referenced by BndLib_Add3dCurve::Add(), ChFi2d_Builder::BuildFilletEdge(), BRepLib_MakeFace::Init(), Adaptor3d_IsoCurve::Load(), MAT2d_Tool2d::Projection(), BRepSweep_Rotation::SetDirectingPCurve(), BRepSweep_Rotation::SetGeneratingPCurve(), Geom_TrimmedCurve::SetTrim(), Geom_RectangularTrimmedSurface::SetTrim(), Geom2d_TrimmedCurve::SetTrim(), TopOpeBRepDS_BuildTool::UpdateEdge(), and ShapeAnalysis_Curve::ValidateRange().

  Standard_Real period = ULast - UFirst;
  U1 -= Floor((U1-UFirst)/period) * period;
  if (ULast - U1 < Preci) U1 -= period;
  U2 -= Floor((U2-U1)/period) * period;
  if (U2 - U1 < Preci) U2 += period;

Generated by  Doxygen 1.6.0   Back to index