mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +03:00
0025192: Unification of LineConstructor algorithms used by GeomInt_IntSS and BOP
Small correction. Correction of test case bug/modalg_5/bug24472
This commit is contained in:
@@ -51,10 +51,20 @@ is
|
||||
Quadric from IntSurf,
|
||||
QuadricTool from IntSurf,
|
||||
WLine from IntPatch);
|
||||
|
||||
|
||||
private class ParameterAndOrientation;
|
||||
|
||||
private class SequenceOfParameterAndOrientation instantiates
|
||||
Sequence from TCollection(ParameterAndOrientation);
|
||||
|
||||
AdjustPeriodic(thePar : Real from Standard;
|
||||
theParMin : Real from Standard;
|
||||
theParMax : Real from Standard;
|
||||
thePeriod : Real from Standard;
|
||||
theNewPar : out Real from Standard;
|
||||
theOffset : out Real from Standard;
|
||||
theEps : Real from Standard = 0.0)
|
||||
returns Boolean from Standard;
|
||||
---Purpose: Adjusts the parameter <thePar> to the range [theParMin, theParMax]
|
||||
|
||||
end GeomInt;
|
||||
|
39
src/GeomInt/GeomInt.cxx
Normal file
39
src/GeomInt/GeomInt.cxx
Normal file
@@ -0,0 +1,39 @@
|
||||
// File: GeomInt.cxx
|
||||
// Created: 25.08.14 17:59:59
|
||||
// Author: jgv@VIVEX
|
||||
// Copyright: Open CASCADE 2014
|
||||
|
||||
#include <GeomInt.hxx>
|
||||
#include <TColStd_IndexedMapOfInteger.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : AdjustPeriodic
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Boolean GeomInt::AdjustPeriodic(const Standard_Real thePar,
|
||||
const Standard_Real theParMin,
|
||||
const Standard_Real theParMax,
|
||||
const Standard_Real thePeriod,
|
||||
Standard_Real &theNewPar,
|
||||
Standard_Real &theOffset,
|
||||
const Standard_Real theEps)
|
||||
{
|
||||
Standard_Boolean bMin, bMax;
|
||||
//
|
||||
theOffset = 0.;
|
||||
theNewPar = thePar;
|
||||
bMin = theParMin - thePar > theEps;
|
||||
bMax = thePar - theParMax > theEps;
|
||||
//
|
||||
if (bMin || bMax) {
|
||||
Standard_Real dp, aNbPer;
|
||||
//
|
||||
dp = (bMin) ? (theParMax - thePar) : (theParMin - thePar);
|
||||
modf(dp / thePeriod, &aNbPer);
|
||||
//
|
||||
theOffset = aNbPer * thePeriod;
|
||||
theNewPar += theOffset;
|
||||
}
|
||||
//
|
||||
return (theOffset > 0.);
|
||||
}
|
@@ -77,8 +77,14 @@ is
|
||||
--- for given index of split
|
||||
---
|
||||
|
||||
PeriodicLine(me; L: Line from IntPatch)
|
||||
is static private;
|
||||
TreatCircle(me:out;
|
||||
aLine : Line from IntPatch;
|
||||
aTol: Real from Standard)
|
||||
is protected;
|
||||
|
||||
|
||||
--PeriodicLine(me; L: Line from IntPatch)
|
||||
--is static private;
|
||||
|
||||
fields
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user