1
0
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:
jgv
2014-09-04 13:49:45 +04:00
committed by bugmaster
parent a315743983
commit 2a78ec6a07
16 changed files with 920 additions and 1869 deletions

View File

@@ -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
View 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.);
}

View File

@@ -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