mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-12-28 02:10:36 +05:00
Porting to DEV version of OpenCASCADE.
This commit is contained in:
parent
04056cdd32
commit
4f8b67f9b1
@ -43,6 +43,10 @@
|
|||||||
#include <BOPCol_ListOfShape.hxx>
|
#include <BOPCol_ListOfShape.hxx>
|
||||||
#include <BOPDS_DS.hxx>
|
#include <BOPDS_DS.hxx>
|
||||||
#include <BOPDS_MapOfPassKey.hxx>
|
#include <BOPDS_MapOfPassKey.hxx>
|
||||||
|
#if OCC_VERSION_LARGE > 0x07010000
|
||||||
|
#include <BOPDS_MapOfPair.hxx>
|
||||||
|
#include <BOPDS_Pair.hxx>
|
||||||
|
#endif
|
||||||
#include <BRepBndLib.hxx>
|
#include <BRepBndLib.hxx>
|
||||||
#include <BRepBuilderAPI_Copy.hxx>
|
#include <BRepBuilderAPI_Copy.hxx>
|
||||||
#include <BRepCheck_ListIteratorOfListOfStatus.hxx>
|
#include <BRepCheck_ListIteratorOfListOfStatus.hxx>
|
||||||
@ -1574,18 +1578,31 @@ bool GEOMImpl_IMeasureOperations::CheckSelfIntersections
|
|||||||
|
|
||||||
//
|
//
|
||||||
Standard_Integer aNbS, n1, n2;
|
Standard_Integer aNbS, n1, n2;
|
||||||
|
#if OCC_VERSION_LARGE > 0x07010000
|
||||||
|
BOPDS_MapIteratorOfMapOfPair aItMPK;
|
||||||
|
#else
|
||||||
BOPDS_MapIteratorMapOfPassKey aItMPK;
|
BOPDS_MapIteratorMapOfPassKey aItMPK;
|
||||||
|
#endif
|
||||||
//
|
//
|
||||||
// 2. Take the shapes from DS
|
// 2. Take the shapes from DS
|
||||||
const BOPDS_DS& aDS = aCSI.DS();
|
const BOPDS_DS& aDS = aCSI.DS();
|
||||||
aNbS=aDS.NbShapes();
|
aNbS=aDS.NbShapes();
|
||||||
//
|
//
|
||||||
// 3. Get the pairs of interfered shapes
|
// 3. Get the pairs of interfered shapes
|
||||||
|
#if OCC_VERSION_LARGE > 0x07010000
|
||||||
|
const BOPDS_MapOfPair& aMPK=aDS.Interferences();
|
||||||
|
#else
|
||||||
const BOPDS_MapOfPassKey& aMPK=aDS.Interferences();
|
const BOPDS_MapOfPassKey& aMPK=aDS.Interferences();
|
||||||
|
#endif
|
||||||
aItMPK.Initialize(aMPK);
|
aItMPK.Initialize(aMPK);
|
||||||
for (; aItMPK.More(); aItMPK.Next()) {
|
for (; aItMPK.More(); aItMPK.Next()) {
|
||||||
|
#if OCC_VERSION_LARGE > 0x07010000
|
||||||
|
const BOPDS_Pair& aPK=aItMPK.Value();
|
||||||
|
aPK.Indices(n1, n2);
|
||||||
|
#else
|
||||||
const BOPDS_PassKey& aPK=aItMPK.Value();
|
const BOPDS_PassKey& aPK=aItMPK.Value();
|
||||||
aPK.Ids(n1, n2);
|
aPK.Ids(n1, n2);
|
||||||
|
#endif
|
||||||
//
|
//
|
||||||
if (n1 > aNbS || n2 > aNbS){
|
if (n1 > aNbS || n2 > aNbS){
|
||||||
return false; // Error
|
return false; // Error
|
||||||
|
@ -105,7 +105,7 @@ Standard_Integer GEOMImpl_OffsetDriver::Execute(LOGBOOK& log) const
|
|||||||
|
|
||||||
if (aType == TopAbs_FACE || aType == TopAbs_SHELL) {
|
if (aType == TopAbs_FACE || aType == TopAbs_SHELL) {
|
||||||
// Create a thick solid.
|
// Create a thick solid.
|
||||||
BRepClass3d_SolidClassifier aClassifier = BRepClass3d_SolidClassifier(aShapeBase);
|
BRepClass3d_SolidClassifier aClassifier(aShapeBase);
|
||||||
aClassifier.PerformInfinitePoint(Precision::Confusion());
|
aClassifier.PerformInfinitePoint(Precision::Confusion());
|
||||||
if (aClassifier.State()==TopAbs_IN)
|
if (aClassifier.State()==TopAbs_IN)
|
||||||
{
|
{
|
||||||
@ -125,7 +125,7 @@ Standard_Integer GEOMImpl_OffsetDriver::Execute(LOGBOOK& log) const
|
|||||||
|
|
||||||
// Control the solid orientation. This is mostly done to fix a bug in case of extrusion
|
// Control the solid orientation. This is mostly done to fix a bug in case of extrusion
|
||||||
// of a circle. The built solid is then badly oriented
|
// of a circle. The built solid is then badly oriented
|
||||||
BRepClass3d_SolidClassifier anotherClassifier = BRepClass3d_SolidClassifier(aShape);
|
BRepClass3d_SolidClassifier anotherClassifier(aShape);
|
||||||
anotherClassifier.PerformInfinitePoint(Precision::Confusion());
|
anotherClassifier.PerformInfinitePoint(Precision::Confusion());
|
||||||
if (anotherClassifier.State()==TopAbs_IN)
|
if (anotherClassifier.State()==TopAbs_IN)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user