1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0024002: Overall code and build procedure refactoring -- automatic

Automatic upgrade of OCCT code by command "occt_upgrade . -nocdl":
- WOK-generated header files from inc and sources from drv are moved to src
- CDL files removed
- All packages are converted to nocdlpack
This commit is contained in:
abv
2015-07-12 07:42:38 +03:00
parent 543a996496
commit 42cf5bc1ca
15354 changed files with 623957 additions and 509844 deletions

View File

@@ -1,93 +0,0 @@
-- Created by: Peter KURNEV
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
package BOPAlgo
---Purpose:
uses
gp,
Bnd,
Message,
TopAbs,
Geom,
GeomAPI,
BRepClass3d,
TopoDS,
TopTools,
IntTools,
IntSurf,
--
BOPDS,
BOPCol,
BOPTools
is
enumeration Operation is
COMMON,
FUSE,
CUT,
CUT21,
SECTION,
UNKNOWN
end Operation;
enumeration CheckStatus is
CheckUnknown,
BadType,
SelfIntersect,
TooSmallEdge,
NonRecoverableFace,
IncompatibilityOfVertex,
IncompatibilityOfEdge,
IncompatibilityOfFace,
OperationAborted,
GeomAbs_C0,
InvalidCurveOnSurface,
NotValid
end CheckStatus;
--
-- classes
--
deferred class Algo;
deferred class BuilderShape;
class PaveFiller;
class Builder;
class BOP;
class Section;
--
deferred class BuilderArea;
class BuilderFace;
class WireEdgeSet;
class WireSplitter;
class ShellSplitter;
class BuilderSolid;
class Tools;
class SectionAttribute;
class CheckerSI;
class ArgumentAnalyzer;
class CheckResult;
class MakerVolume;
--
-- pointers
--
pointer PPaveFiller to PaveFiller from BOPAlgo;
pointer PWireEdgeSet to WireEdgeSet from BOPAlgo;
pointer PSection to Section from BOPAlgo;
pointer PBOP to BOP from BOPAlgo;
pointer PBuilder to Builder from BOPAlgo;
pointer PArgumentAnalyzer to ArgumentAnalyzer from BOPAlgo;
--
imported ListOfCheckResult;
end BOPAlgo;

View File

@@ -1,87 +0,0 @@
-- Created by: Peter KURNEV
-- Copyright (c) 2010-2014 OPEN CASCADE SAS
-- Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
-- Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT,
-- EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
deferred class Algo from BOPAlgo
---Purpose: provides the root interface for algorithms
uses
BaseAllocator from BOPCol,
ProgressIndicator from Message
--raises
is
Initialize
returns Algo from BOPAlgo;
---C++: alias "Standard_EXPORT virtual ~BOPAlgo_Algo();"
Initialize (theAllocator: BaseAllocator from BOPCol)
returns Algo from BOPAlgo;
GetParallelMode(myclass)
returns Boolean;
SetParallelMode(myclass;
theNewMode: Boolean from Standard);
Perform(me:out)
is deferred;
ErrorStatus (me)
returns Integer from Standard;
WarningStatus (me)
returns Integer from Standard;
CheckData(me:out)
is virtual protected;
CheckResult(me:out)
is virtual protected;
Allocator(me)
returns BaseAllocator from BOPCol;
---C++: return const &
SetRunParallel(me:out;
theFlag:Boolean from Standard);
---Purpose: Set the flag of parallel processing
-- if <theFlag> is true the parallel processing is switched on
-- if <theFlag> is false the parallel processing is switched off
--
RunParallel(me)
returns Boolean from Standard;
---Purpose: Returns the flag of parallel processing
SetProgressIndicator(me:out;
theObj: ProgressIndicator from Message);
---Purpose: Set the Progress Indicator object.
UserBreak(me)
is protected;
---Purpose: Breaks the execution if the break signal
-- is indicated by myProgressIndicator.
fields
myAllocator : BaseAllocator from BOPCol is protected;
myErrorStatus : Integer from Standard is protected;
myWarningStatus : Integer from Standard is protected;
myRunParallel : Boolean from Standard is protected;
myProgressIndicator : ProgressIndicator from Message is protected;
end Algo;

View File

@@ -15,12 +15,12 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BOPAlgo_Algo.ixx>
#include <BOPAlgo_Algo.hxx>
#include <Message_ProgressIndicator.hxx>
#include <NCollection_BaseAllocator.hxx>
#include <Standard_ProgramError.hxx>
#include <Standard_NotImplemented.hxx>
#include <Standard_ProgramError.hxx>
namespace
{

View File

@@ -0,0 +1,103 @@
// Created by: Peter KURNEV
// Copyright (c) 2010-2014 OPEN CASCADE SAS
// Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
// Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT,
// EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BOPAlgo_Algo_HeaderFile
#define _BOPAlgo_Algo_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <BOPCol_BaseAllocator.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Boolean.hxx>
class Message_ProgressIndicator;
//! provides the root interface for algorithms
class BOPAlgo_Algo
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT static Standard_Boolean GetParallelMode();
Standard_EXPORT static void SetParallelMode (const Standard_Boolean theNewMode);
Standard_EXPORT virtual void Perform() = 0;
Standard_EXPORT Standard_Integer ErrorStatus() const;
Standard_EXPORT Standard_Integer WarningStatus() const;
Standard_EXPORT const BOPCol_BaseAllocator& Allocator() const;
//! Set the flag of parallel processing
//! if <theFlag> is true the parallel processing is switched on
//! if <theFlag> is false the parallel processing is switched off
Standard_EXPORT void SetRunParallel (const Standard_Boolean theFlag);
//! Returns the flag of parallel processing
Standard_EXPORT Standard_Boolean RunParallel() const;
//! Set the Progress Indicator object.
Standard_EXPORT void SetProgressIndicator (const Handle(Message_ProgressIndicator)& theObj);
protected:
Standard_EXPORT BOPAlgo_Algo();
Standard_EXPORT virtual ~BOPAlgo_Algo();
Standard_EXPORT BOPAlgo_Algo(const BOPCol_BaseAllocator& theAllocator);
Standard_EXPORT virtual void CheckData();
Standard_EXPORT virtual void CheckResult();
//! Breaks the execution if the break signal
//! is indicated by myProgressIndicator.
Standard_EXPORT void UserBreak() const;
BOPCol_BaseAllocator myAllocator;
Standard_Integer myErrorStatus;
Standard_Integer myWarningStatus;
Standard_Boolean myRunParallel;
Handle(Message_ProgressIndicator) myProgressIndicator;
private:
};
#endif // _BOPAlgo_Algo_HeaderFile

View File

@@ -1,213 +0,0 @@
-- Created on: 2004-09-03
-- Created by: Oleg FEDYAEV
-- Copyright (c) 2004-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class ArgumentAnalyzer from BOPAlgo
inherits Algo from BOPAlgo
---Purpose: check the validity of argument(s) for Boolean Operations
uses
Shape from TopoDS,
Operation from BOPAlgo,
CheckStatus from BOPAlgo,
ShapeEnum from TopAbs,
ListOfCheckResult from BOPAlgo,
DataMapOfShapeReal from BOPCol
is
Create
returns ArgumentAnalyzer;
---C++: alias "Standard_EXPORT virtual ~BOPAlgo_ArgumentAnalyzer();"
---Purpose: empty constructor
SetShape1(me: in out; TheShape: Shape from TopoDS);
---Purpose: sets object shape
SetShape2(me: in out; TheShape: Shape from TopoDS);
---Purpose: sets tool shape
GetShape1(me)
returns Shape from TopoDS;
---C++: return const &
---Purpose: returns object shape;
GetShape2(me)
returns Shape from TopoDS;
---C++: return const &
---Purpose: returns tool shape
---options
OperationType(me: in out)
returns Operation from BOPAlgo;
---C++: return &
---Purpose: returns ref
StopOnFirstFaulty(me: in out)
returns Boolean from Standard;
---C++: return &
---Purpose: returns ref
ArgumentTypeMode(me: in out)
returns Boolean from Standard;
---C++: return &
---C++: inline
---Purpose: Returns (modifiable) mode
-- that means checking types of shapes.
Prepare(me: in out)
is protected;
---Purpose: Prepares data;
SelfInterMode(me: in out)
returns Boolean from Standard;
---C++: return &
---C++: inline
---Purpose: Returns (modifiable) mode that means
-- checking of self-intersection of shapes.
SmallEdgeMode(me: in out)
returns Boolean from Standard;
---C++: return &
---C++: inline
---Purpose: Returns (modifiable) mode that means
-- checking of small edges.
RebuildFaceMode(me: in out)
returns Boolean from Standard;
---C++: return &
---C++: inline
---Purpose: Returns (modifiable) mode that means
-- checking of possibility to split or rebuild faces.
TangentMode(me: in out)
returns Boolean from Standard;
---C++: return &
---C++: inline
---Purpose: Returns (modifiable) mode that means
-- checking of tangency between subshapes.
MergeVertexMode(me: in out)
returns Boolean from Standard;
---C++: return &
---C++: inline
---Purpose: Returns (modifiable) mode that means
-- checking of problem of merging vertices.
MergeEdgeMode(me: in out)
returns Boolean from Standard;
---C++: return &
---C++: inline
---Purpose: Returns (modifiable) mode that means
-- checking of problem of merging edges.
ContinuityMode(me: in out)
returns Boolean from Standard;
---C++: return &
---C++: inline
---Purpose: Returns (modifiable) mode that means
-- checking of problem of continuity of the shape.
CurveOnSurfaceMode(me: in out)
returns Boolean from Standard;
---C++: return &
---C++: inline
---Purpose: Returns (modifiable) mode that means
-- checking of problem of invalid curve on surface.
---
Perform(me: out);
---Purpose: performs analysis
HasFaulty(me)
returns Boolean from Standard;
---Purpose: result of test
GetCheckResult(me)
returns ListOfCheckResult from BOPAlgo;
---C++: return const &
---Purpose: returns a result of test
--- protected
TestTypes(me: out)
is protected;
TestSelfInterferences(me: out)
is protected;
TestSmallEdge(me: out)
is protected;
TestRebuildFace(me: out)
is protected;
TestTangent(me: out)
is protected;
TestMergeSubShapes(me: out; theType: ShapeEnum from TopAbs)
is protected;
TestMergeVertex(me: out)
is protected;
TestMergeEdge(me: out)
is protected;
TestContinuity(me: out)
is protected;
TestCurveOnSurface(me: out)
is protected;
-- TestMergeFace(me: out)
-- is protected;
SetFuzzyValue(me:out;
theFuzz : Real from Standard);
---C++: inline
---Purpose: Sets the additional tolerance
FuzzyValue(me)
returns Real from Standard;
---C++: inline
---Purpose: Returns the additional tolerance
UpdateTolerances(me:out)
is protected;
---Purpose: Updates the shapes tolerance values.
SetDefaultTolerances(me:out)
is protected;
---Purpose: Reverts the tolerance values for all entities to default values.
fields
myShape1 : Shape from TopoDS;
myShape2 : Shape from TopoDS;
myStopOnFirst : Boolean from Standard;
myOperation : Operation from BOPAlgo;
myArgumentTypeMode : Boolean from Standard;
mySelfInterMode : Boolean from Standard;
mySmallEdgeMode : Boolean from Standard;
myRebuildFaceMode : Boolean from Standard;
myTangentMode : Boolean from Standard;
myMergeVertexMode : Boolean from Standard;
myMergeEdgeMode : Boolean from Standard;
myContinuityMode : Boolean from Standard;
myCurveOnSurfaceMode : Boolean from Standard;
myEmpty1, myEmpty2 : Boolean from Standard;
myResult : ListOfCheckResult from BOPAlgo;
myFuzzyValue : Real from Standard;
myToleranceMap : DataMapOfShapeReal from BOPCol;
end ArgumentAnalyzer;

View File

@@ -12,57 +12,46 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BOPAlgo_ArgumentAnalyzer.ixx>
#include <Standard_ErrorHandler.hxx>
#include <Standard_Failure.hxx>
#include <TColStd_Array2OfBoolean.hxx>
#include <gp_Pnt.hxx>
#include <Geom_Surface.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Wire.hxx>
#include <TopoDS_Shell.hxx>
#include <TopoDS_Solid.hxx>
#include <BRep_TVertex.hxx>
#include <BRep_TEdge.hxx>
#include <BRep_TFace.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <BRepExtrema_DistShapeShape.hxx>
//
#include <BOPAlgo_ArgumentAnalyzer.hxx>
#include <BOPAlgo_BuilderFace.hxx>
#include <BOPAlgo_CheckerSI.hxx>
#include <BOPAlgo_Operation.hxx>
#include <BOPCol_ListOfShape.hxx>
#include <BOPCol_SequenceOfShape.hxx>
#include <BOPCol_MapOfShape.hxx>
#include <IntTools_Range.hxx>
#include <IntTools_EdgeEdge.hxx>
#include <IntTools_CommonPrt.hxx>
#include <IntTools_Context.hxx>
#include <BOPTools.hxx>
#include <BOPTools_AlgoTools3D.hxx>
#include <BOPTools_AlgoTools.hxx>
#include <BOPCol_SequenceOfShape.hxx>
#include <BOPDS_DS.hxx>
#include <BOPDS_MapOfPassKey.hxx>
#include <BOPTools.hxx>
#include <BOPTools_AlgoTools.hxx>
#include <BOPTools_AlgoTools3D.hxx>
#include <BRep_Builder.hxx>
#include <BRep_TEdge.hxx>
#include <BRep_TFace.hxx>
#include <BRep_Tool.hxx>
#include <BRep_TVertex.hxx>
#include <BRepExtrema_DistShapeShape.hxx>
#include <Geom_Surface.hxx>
#include <gp_Pnt.hxx>
#include <IntTools_CommonPrt.hxx>
#include <IntTools_Context.hxx>
#include <IntTools_EdgeEdge.hxx>
#include <IntTools_Range.hxx>
#include <Standard_ErrorHandler.hxx>
#include <Standard_Failure.hxx>
#include <TColStd_Array2OfBoolean.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Shell.hxx>
#include <TopoDS_Solid.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Wire.hxx>
#include <BOPAlgo_Operation.hxx>
#include <BOPAlgo_CheckerSI.hxx>
#include <BOPAlgo_BuilderFace.hxx>
//
// ================================================================================
// function: Constructor
// purpose:

View File

@@ -0,0 +1,186 @@
// Created on: 2004-09-03
// Created by: Oleg FEDYAEV
// Copyright (c) 2004-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BOPAlgo_ArgumentAnalyzer_HeaderFile
#define _BOPAlgo_ArgumentAnalyzer_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <TopoDS_Shape.hxx>
#include <Standard_Boolean.hxx>
#include <BOPAlgo_Operation.hxx>
#include <BOPAlgo_ListOfCheckResult.hxx>
#include <Standard_Real.hxx>
#include <BOPCol_DataMapOfShapeReal.hxx>
#include <BOPAlgo_Algo.hxx>
#include <TopAbs_ShapeEnum.hxx>
class TopoDS_Shape;
//! check the validity of argument(s) for Boolean Operations
class BOPAlgo_ArgumentAnalyzer : public BOPAlgo_Algo
{
public:
DEFINE_STANDARD_ALLOC
//! empty constructor
Standard_EXPORT BOPAlgo_ArgumentAnalyzer();
Standard_EXPORT virtual ~BOPAlgo_ArgumentAnalyzer();
//! sets object shape
Standard_EXPORT void SetShape1 (const TopoDS_Shape& TheShape);
//! sets tool shape
Standard_EXPORT void SetShape2 (const TopoDS_Shape& TheShape);
//! returns object shape;
Standard_EXPORT const TopoDS_Shape& GetShape1() const;
//! returns tool shape
Standard_EXPORT const TopoDS_Shape& GetShape2() const;
//! returns ref
Standard_EXPORT BOPAlgo_Operation& OperationType();
//! returns ref
Standard_EXPORT Standard_Boolean& StopOnFirstFaulty();
//! Returns (modifiable) mode
//! that means checking types of shapes.
Standard_Boolean& ArgumentTypeMode();
//! Returns (modifiable) mode that means
//! checking of self-intersection of shapes.
Standard_Boolean& SelfInterMode();
//! Returns (modifiable) mode that means
//! checking of small edges.
Standard_Boolean& SmallEdgeMode();
//! Returns (modifiable) mode that means
//! checking of possibility to split or rebuild faces.
Standard_Boolean& RebuildFaceMode();
//! Returns (modifiable) mode that means
//! checking of tangency between subshapes.
Standard_Boolean& TangentMode();
//! Returns (modifiable) mode that means
//! checking of problem of merging vertices.
Standard_Boolean& MergeVertexMode();
//! Returns (modifiable) mode that means
//! checking of problem of merging edges.
Standard_Boolean& MergeEdgeMode();
//! Returns (modifiable) mode that means
//! checking of problem of continuity of the shape.
Standard_Boolean& ContinuityMode();
//! Returns (modifiable) mode that means
//! checking of problem of invalid curve on surface.
Standard_Boolean& CurveOnSurfaceMode();
//! performs analysis
Standard_EXPORT void Perform();
//! result of test
Standard_EXPORT Standard_Boolean HasFaulty() const;
//! returns a result of test
Standard_EXPORT const BOPAlgo_ListOfCheckResult& GetCheckResult() const;
//! Sets the additional tolerance
void SetFuzzyValue (const Standard_Real theFuzz);
//! Returns the additional tolerance
Standard_Real FuzzyValue() const;
protected:
//! Prepares data;
Standard_EXPORT void Prepare();
Standard_EXPORT void TestTypes();
Standard_EXPORT void TestSelfInterferences();
Standard_EXPORT void TestSmallEdge();
Standard_EXPORT void TestRebuildFace();
Standard_EXPORT void TestTangent();
Standard_EXPORT void TestMergeSubShapes (const TopAbs_ShapeEnum theType);
Standard_EXPORT void TestMergeVertex();
Standard_EXPORT void TestMergeEdge();
Standard_EXPORT void TestContinuity();
Standard_EXPORT void TestCurveOnSurface();
//! Updates the shapes tolerance values.
Standard_EXPORT void UpdateTolerances();
//! Reverts the tolerance values for all entities to default values.
Standard_EXPORT void SetDefaultTolerances();
private:
TopoDS_Shape myShape1;
TopoDS_Shape myShape2;
Standard_Boolean myStopOnFirst;
BOPAlgo_Operation myOperation;
Standard_Boolean myArgumentTypeMode;
Standard_Boolean mySelfInterMode;
Standard_Boolean mySmallEdgeMode;
Standard_Boolean myRebuildFaceMode;
Standard_Boolean myTangentMode;
Standard_Boolean myMergeVertexMode;
Standard_Boolean myMergeEdgeMode;
Standard_Boolean myContinuityMode;
Standard_Boolean myCurveOnSurfaceMode;
Standard_Boolean myEmpty1;
Standard_Boolean myEmpty2;
BOPAlgo_ListOfCheckResult myResult;
Standard_Real myFuzzyValue;
BOPCol_DataMapOfShapeReal myToleranceMap;
};
#include <BOPAlgo_ArgumentAnalyzer.lxx>
#endif // _BOPAlgo_ArgumentAnalyzer_HeaderFile

View File

@@ -1,109 +0,0 @@
-- Created by: Peter KURNEV
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class BOP from BOPAlgo
inherits Builder from BOPAlgo
---Purpose:
uses
ShapeEnum from TopAbs,
Shape from TopoDS,
ListOfShape from TopTools,
--
BaseAllocator from BOPCol,
ListOfShape from BOPCol,
MapOfShape from BOPCol,
IndexedDataMapOfShapeListOfShape from BOPCol,
--
Operation from BOPAlgo,
PaveFiller from BOPAlgo
--raises
is
Create
---Purpose: Empty constructor
returns BOP from BOPAlgo;
---C++: alias "Standard_EXPORT virtual ~BOPAlgo_BOP();"
Create (theAllocator: BaseAllocator from BOPCol)
returns BOP from BOPAlgo;
Clear(me:out)
is redefined;
---Purpose: Clears internal fields and arguments
AddTool (me:out;
theShape: Shape from TopoDS)
---Purpose: Adds Tool argument of the operation
is virtual;
SetTools (me:out;
theShapes: ListOfShape from BOPCol)
is virtual;
SetOperation(me:out;
theOperation: Operation from BOPAlgo);
Operation(me)
returns Operation from BOPAlgo;
--
Perform(me:out)
is redefined;
--
-- protected methods
--
CheckData(me:out)
is redefined protected;
Prepare(me:out)
is redefined protected;
---Purpose: Provides preparing actions
PerformInternal1(me:out;
thePF:PaveFiller from BOPAlgo)
is redefined protected;
---Purpose: Performs calculations using prepared Filler
-- object <thePF>
BuildResult(me:out;
theType: ShapeEnum from TopAbs)
is redefined protected;
BuildShape(me:out)
is protected;
BuildRC(me:out)
is protected;
BuildSolid(me:out)
is protected;
IsBoundSplits(me:out;
theS:Shape from TopoDS;
theMEF:out IndexedDataMapOfShapeListOfShape from BOPCol)
returns Boolean from Standard
is protected;
fields
myOperation : Operation from BOPAlgo is protected;
myDims : Integer from Standard[2] is protected;
--
myRC : Shape from TopoDS is protected;
myTools : ListOfShape from BOPCol is protected;
myMapTools : MapOfShape from BOPCol is protected;
end BOP;

View File

@@ -12,39 +12,34 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BOPAlgo_BOP.ixx>
#include <TopAbs_ShapeEnum.hxx>
#include <TopoDS_Compound.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopoDS_Edge.hxx>
#include <BRep_Builder.hxx>
#include <TopExp_Explorer.hxx>
#include <BOPAlgo_BOP.hxx>
#include <BOPAlgo_BuilderSolid.hxx>
#include <BOPAlgo_PaveFiller.hxx>
#include <BOPCol_DataMapOfShapeShape.hxx>
#include <BOPCol_IndexedDataMapOfShapeListOfShape.hxx>
#include <BOPCol_IndexedMapOfShape.hxx>
#include <BOPCol_ListOfShape.hxx>
#include <BOPCol_MapOfShape.hxx>
#include <BOPCol_IndexedMapOfShape.hxx>
#include <BOPCol_IndexedDataMapOfShapeListOfShape.hxx>
#include <BOPCol_DataMapOfShapeShape.hxx>
#include <BOPDS_DS.hxx>
#include <BOPTools.hxx>
#include <BOPTools_AlgoTools.hxx>
#include <BOPTools_AlgoTools3D.hxx>
#include <BOPTools_AlgoTools.hxx>
#include <BOPAlgo_BuilderSolid.hxx>
#include <BRep_Tool.hxx>
#include <NCollection_IncAllocator.hxx>
//
#include <BOPTools_Set.hxx>
#include <BOPTools_SetMapHasher.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <NCollection_DataMap.hxx>
#include <NCollection_IncAllocator.hxx>
#include <TopAbs_ShapeEnum.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS_Compound.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopoDS_Shape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
//
typedef NCollection_DataMap
<BOPTools_Set,
TopoDS_Shape,

111
src/BOPAlgo/BOPAlgo_BOP.hxx Normal file
View File

@@ -0,0 +1,111 @@
// Created by: Peter KURNEV
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BOPAlgo_BOP_HeaderFile
#define _BOPAlgo_BOP_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <BOPAlgo_Operation.hxx>
#include <Standard_Integer.hxx>
#include <TopoDS_Shape.hxx>
#include <BOPCol_ListOfShape.hxx>
#include <BOPCol_MapOfShape.hxx>
#include <BOPAlgo_Builder.hxx>
#include <BOPCol_BaseAllocator.hxx>
#include <TopAbs_ShapeEnum.hxx>
#include <Standard_Boolean.hxx>
#include <BOPCol_IndexedDataMapOfShapeListOfShape.hxx>
class TopoDS_Shape;
class BOPAlgo_PaveFiller;
class BOPAlgo_BOP : public BOPAlgo_Builder
{
public:
DEFINE_STANDARD_ALLOC
//! Empty constructor
Standard_EXPORT BOPAlgo_BOP();
Standard_EXPORT virtual ~BOPAlgo_BOP();
Standard_EXPORT BOPAlgo_BOP(const BOPCol_BaseAllocator& theAllocator);
//! Clears internal fields and arguments
Standard_EXPORT virtual void Clear() Standard_OVERRIDE;
//! Adds Tool argument of the operation
Standard_EXPORT virtual void AddTool (const TopoDS_Shape& theShape);
Standard_EXPORT virtual void SetTools (const BOPCol_ListOfShape& theShapes);
Standard_EXPORT void SetOperation (const BOPAlgo_Operation theOperation);
Standard_EXPORT BOPAlgo_Operation Operation() const;
Standard_EXPORT virtual void Perform() Standard_OVERRIDE;
protected:
Standard_EXPORT virtual void CheckData() Standard_OVERRIDE;
//! Provides preparing actions
Standard_EXPORT virtual void Prepare() Standard_OVERRIDE;
//! Performs calculations using prepared Filler
//! object <thePF>
Standard_EXPORT virtual void PerformInternal1 (const BOPAlgo_PaveFiller& thePF) Standard_OVERRIDE;
Standard_EXPORT virtual void BuildResult (const TopAbs_ShapeEnum theType) Standard_OVERRIDE;
Standard_EXPORT void BuildShape();
Standard_EXPORT void BuildRC();
Standard_EXPORT void BuildSolid();
Standard_EXPORT Standard_Boolean IsBoundSplits (const TopoDS_Shape& theS, BOPCol_IndexedDataMapOfShapeListOfShape& theMEF);
BOPAlgo_Operation myOperation;
Standard_Integer myDims[2];
TopoDS_Shape myRC;
BOPCol_ListOfShape myTools;
BOPCol_MapOfShape myMapTools;
private:
};
#endif // _BOPAlgo_BOP_HeaderFile

View File

@@ -1,248 +0,0 @@
-- Created by: Peter KURNEV
-- Copyright (c) 2010-2014 OPEN CASCADE SAS
-- Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
-- Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT,
-- EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class Builder from BOPAlgo
inherits BuilderShape from BOPAlgo
---Purpose:
uses
Box from Bnd,
ShapeEnum from TopAbs,
Shape from TopoDS,
ListOfShape from TopTools,
--
BaseAllocator from BOPCol,
ListOfInteger from BOPCol,
ListOfShape from BOPCol,
MapOfShape from BOPCol,
DataMapOfShapeShape from BOPCol,
DataMapOfShapeListOfShape from BOPCol,
Context from IntTools,
PDS from BOPDS,
PaveFiller from BOPAlgo,
PPaveFiller from BOPAlgo
--raises
is
Create
returns Builder from BOPAlgo;
---C++: alias "Standard_EXPORT virtual ~BOPAlgo_Builder();"
Create (theAllocator: BaseAllocator from BOPCol)
returns Builder from BOPAlgo;
Clear(me:out)
is virtual;
PPaveFiller(me:out)
returns PPaveFiller from BOPAlgo;
PDS(me:out)
returns PDS from BOPDS;
AddArgument (me:out;
theShape: Shape from TopoDS)
is virtual;
SetArguments (me:out;
theLS: ListOfShape from BOPCol)
is virtual;
Arguments(me)
returns ListOfShape from BOPCol;
---C++: return const &
Perform(me:out)
is redefined;
PerformWithFiller(me:out;
theFiller: PaveFiller from BOPAlgo)
is virtual;
--
-- History support
--
PrepareHistory (me:out)
---Purpose: Prepare information for history support
is redefined protected;
Generated (me:out;
theS : Shape from TopoDS)
---Purpose: Returns the list of shapes generated from the
-- shape theS.
returns ListOfShape from TopTools
is redefined;
---C++: return const &
Modified (me:out;
theS : Shape from TopoDS)
---Purpose: Returns the list of shapes modified from the shape
-- theS.
returns ListOfShape from TopTools
is redefined;
---C++: return const &
IsDeleted (me:out;
theS : Shape from TopoDS)
---Purpose: Returns true if the shape theS has been deleted.
returns Boolean from Standard
is redefined;
--
-- Debug
--
Images(me)
returns DataMapOfShapeListOfShape from BOPCol;
---C++: return const &
--
--
-- protected methods
--
PerformInternal(me:out;
thePF: PaveFiller from BOPAlgo)
is virtual protected;
PerformInternal1(me:out;
thePF: PaveFiller from BOPAlgo)
is virtual protected;
CheckData(me:out)
is redefined protected;
Prepare(me:out)
is virtual protected;
FillImagesVertices(me:out)
is protected;
FillImagesEdges(me:out)
is protected;
BuildResult(me:out;
theType: ShapeEnum from TopAbs)
is virtual protected;
IsInterferred(me;
theS:Shape from TopoDS)
returns Boolean from Standard;
FillImagesContainers(me:out;
theType:ShapeEnum from TopAbs)
is protected;
FillImagesCompounds(me:out)
is protected;
FillImagesContainer(me:out;
theS:Shape from TopoDS;
theType:ShapeEnum from TopAbs)
is protected;
FillImagesCompound(me:out;
theS:Shape from TopoDS;
theMF:out MapOfShape from BOPCol)
is protected;
FillImagesFaces (me:out)
is protected;
BuildSplitFaces (me:out)
is virtual protected;
FillSameDomainFaces (me:out)
is protected;
FillImagesFaces1 (me:out)
is protected;
--
-- solids
--
FillImagesSolids(me:out)
is protected;
BuildDraftSolid(me:out;
theSolid:Shape from TopoDS;
theDraftSolid:out Shape from TopoDS;
theLIF:out ListOfShape from BOPCol)
is protected;
FillIn3DParts(me:out;
theInParts:out DataMapOfShapeListOfShape from BOPCol;
theDraftSolids:out DataMapOfShapeShape from BOPCol;
theAllocator:BaseAllocator from BOPCol)
is virtual protected;
BuildSplitSolids(me:out;
theInParts:out DataMapOfShapeListOfShape from BOPCol;
theDraftSolids:out DataMapOfShapeShape from BOPCol;
theAllocator:BaseAllocator from BOPCol)
is protected;
FillInternalShapes(me:out)
is protected;
--
-- misc
--
PostTreat (me:out)
is virtual protected;
Origins(me)
returns DataMapOfShapeShape from BOPCol;
---C++: return const &
---Purpose: Returns myOrigins.
ShapesSD(me)
returns DataMapOfShapeShape from BOPCol;
---C++: return const &
---Purpose: Returns myShapesSD.
Splits (me)
returns DataMapOfShapeListOfShape from BOPCol;
---C++: return const &
---Purpose: Returns mySplits.
SetFuzzyValue(me:out;
theFuzz : Real from Standard);
---Purpose: Sets the additional tolerance
FuzzyValue(me)
returns Real from Standard;
---Purpose: Returns the additional tolerance
fields
myArguments : ListOfShape from BOPCol is protected;
myMapFence : MapOfShape from BOPCol is protected;
myPaveFiller : PPaveFiller from BOPAlgo is protected;
myDS : PDS from BOPDS is protected;
myContext : Context from IntTools is protected;
myEntryPoint : Integer from Standard is protected;
--
myImages : DataMapOfShapeListOfShape from BOPCol is protected;
myShapesSD : DataMapOfShapeShape from BOPCol is protected;
--
mySplits : DataMapOfShapeListOfShape from BOPCol is protected;
myOrigins : DataMapOfShapeShape from BOPCol is protected;
myFuzzyValue : Real from Standard is protected;
end Builder;

View File

@@ -15,17 +15,17 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BOPAlgo_Builder.ixx>
#include <BOPAlgo_Builder.hxx>
#include <BOPAlgo_PaveFiller.hxx>
#include <BOPTools_AlgoTools.hxx>
#include <BRep_Builder.hxx>
#include <IntTools_Context.hxx>
#include <NCollection_IncAllocator.hxx>
#include <Standard_ErrorHandler.hxx>
#include <Standard_Failure.hxx>
#include <NCollection_IncAllocator.hxx>
#include <TopoDS_Compound.hxx>
#include <BRep_Builder.hxx>
#include <BOPTools_AlgoTools.hxx>
#include <TopoDS_Shape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
//=======================================================================

View File

@@ -0,0 +1,181 @@
// Created by: Peter KURNEV
// Copyright (c) 2010-2014 OPEN CASCADE SAS
// Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
// Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT,
// EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BOPAlgo_Builder_HeaderFile
#define _BOPAlgo_Builder_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <BOPCol_ListOfShape.hxx>
#include <BOPCol_MapOfShape.hxx>
#include <BOPAlgo_PPaveFiller.hxx>
#include <BOPDS_PDS.hxx>
#include <Standard_Integer.hxx>
#include <BOPCol_DataMapOfShapeListOfShape.hxx>
#include <BOPCol_DataMapOfShapeShape.hxx>
#include <Standard_Real.hxx>
#include <BOPAlgo_BuilderShape.hxx>
#include <BOPCol_BaseAllocator.hxx>
#include <TopTools_ListOfShape.hxx>
#include <Standard_Boolean.hxx>
#include <TopAbs_ShapeEnum.hxx>
class IntTools_Context;
class TopoDS_Shape;
class BOPAlgo_PaveFiller;
class BOPAlgo_Builder : public BOPAlgo_BuilderShape
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT BOPAlgo_Builder();
Standard_EXPORT virtual ~BOPAlgo_Builder();
Standard_EXPORT BOPAlgo_Builder(const BOPCol_BaseAllocator& theAllocator);
Standard_EXPORT virtual void Clear();
Standard_EXPORT BOPAlgo_PPaveFiller PPaveFiller();
Standard_EXPORT BOPDS_PDS PDS();
Standard_EXPORT virtual void AddArgument (const TopoDS_Shape& theShape);
Standard_EXPORT virtual void SetArguments (const BOPCol_ListOfShape& theLS);
Standard_EXPORT const BOPCol_ListOfShape& Arguments() const;
Standard_EXPORT virtual void Perform() Standard_OVERRIDE;
Standard_EXPORT virtual void PerformWithFiller (const BOPAlgo_PaveFiller& theFiller);
//! Returns the list of shapes generated from the
//! shape theS.
Standard_EXPORT virtual const TopTools_ListOfShape& Generated (const TopoDS_Shape& theS) Standard_OVERRIDE;
//! Returns the list of shapes modified from the shape
//! theS.
Standard_EXPORT virtual const TopTools_ListOfShape& Modified (const TopoDS_Shape& theS) Standard_OVERRIDE;
//! Returns true if the shape theS has been deleted.
Standard_EXPORT virtual Standard_Boolean IsDeleted (const TopoDS_Shape& theS) Standard_OVERRIDE;
Standard_EXPORT const BOPCol_DataMapOfShapeListOfShape& Images() const;
Standard_EXPORT Standard_Boolean IsInterferred (const TopoDS_Shape& theS) const;
//! Returns myOrigins.
Standard_EXPORT const BOPCol_DataMapOfShapeShape& Origins() const;
//! Returns myShapesSD.
Standard_EXPORT const BOPCol_DataMapOfShapeShape& ShapesSD() const;
//! Returns mySplits.
Standard_EXPORT const BOPCol_DataMapOfShapeListOfShape& Splits() const;
//! Sets the additional tolerance
Standard_EXPORT void SetFuzzyValue (const Standard_Real theFuzz);
//! Returns the additional tolerance
Standard_EXPORT Standard_Real FuzzyValue() const;
protected:
//! Prepare information for history support
Standard_EXPORT virtual void PrepareHistory() Standard_OVERRIDE;
Standard_EXPORT virtual void PerformInternal (const BOPAlgo_PaveFiller& thePF);
Standard_EXPORT virtual void PerformInternal1 (const BOPAlgo_PaveFiller& thePF);
Standard_EXPORT virtual void CheckData() Standard_OVERRIDE;
Standard_EXPORT virtual void Prepare();
Standard_EXPORT void FillImagesVertices();
Standard_EXPORT void FillImagesEdges();
Standard_EXPORT virtual void BuildResult (const TopAbs_ShapeEnum theType);
Standard_EXPORT void FillImagesContainers (const TopAbs_ShapeEnum theType);
Standard_EXPORT void FillImagesCompounds();
Standard_EXPORT void FillImagesContainer (const TopoDS_Shape& theS, const TopAbs_ShapeEnum theType);
Standard_EXPORT void FillImagesCompound (const TopoDS_Shape& theS, BOPCol_MapOfShape& theMF);
Standard_EXPORT void FillImagesFaces();
Standard_EXPORT virtual void BuildSplitFaces();
Standard_EXPORT void FillSameDomainFaces();
Standard_EXPORT void FillImagesFaces1();
Standard_EXPORT void FillImagesSolids();
Standard_EXPORT void BuildDraftSolid (const TopoDS_Shape& theSolid, TopoDS_Shape& theDraftSolid, BOPCol_ListOfShape& theLIF);
Standard_EXPORT virtual void FillIn3DParts (BOPCol_DataMapOfShapeListOfShape& theInParts, BOPCol_DataMapOfShapeShape& theDraftSolids, const BOPCol_BaseAllocator& theAllocator);
Standard_EXPORT void BuildSplitSolids (BOPCol_DataMapOfShapeListOfShape& theInParts, BOPCol_DataMapOfShapeShape& theDraftSolids, const BOPCol_BaseAllocator& theAllocator);
Standard_EXPORT void FillInternalShapes();
Standard_EXPORT virtual void PostTreat();
BOPCol_ListOfShape myArguments;
BOPCol_MapOfShape myMapFence;
BOPAlgo_PPaveFiller myPaveFiller;
BOPDS_PDS myDS;
Handle(IntTools_Context) myContext;
Standard_Integer myEntryPoint;
BOPCol_DataMapOfShapeListOfShape myImages;
BOPCol_DataMapOfShapeShape myShapesSD;
BOPCol_DataMapOfShapeListOfShape mySplits;
BOPCol_DataMapOfShapeShape myOrigins;
Standard_Real myFuzzyValue;
private:
};
#endif // _BOPAlgo_Builder_HeaderFile

View File

@@ -1,79 +0,0 @@
-- Created by: Peter KURNEV
-- Copyright (c) 2010-2014 OPEN CASCADE SAS
-- Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
-- Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT,
-- EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
deferred class BuilderArea from BOPAlgo
inherits Algo from BOPAlgo
---Purpose: The root class for algorithms to build
-- faces/solids from set of edges/faces
uses
Shape from TopoDS,
BaseAllocator from BOPCol,
ListOfShape from BOPCol,
MapOfOrientedShape from BOPCol,
Context from IntTools
--raises
is
Initialize
returns BuilderArea from BOPAlgo;
---C++: alias "Standard_EXPORT virtual ~BOPAlgo_BuilderArea();"
Initialize(theAllocator: BaseAllocator from BOPCol)
returns BuilderArea from BOPAlgo;
SetContext(me:out;
theContext:Context from IntTools);
Shapes(me)
returns ListOfShape from BOPCol;
---C++: return const &
---C++: alias "Standard_EXPORT void SetShapes(const BOPCol_ListOfShape& theLS);"
Loops(me)
returns ListOfShape from BOPCol;
---C++: return const &
Areas(me)
returns ListOfShape from BOPCol;
---C++: return const &
PerformShapesToAvoid(me:out)
is deferred protected;
PerformLoops(me:out)
is deferred protected;
PerformAreas(me:out)
is deferred protected;
PerformInternalShapes(me:out)
is deferred protected;
fields
myContext : Context from IntTools is protected;
myShapes : ListOfShape from BOPCol is protected;
myLoops : ListOfShape from BOPCol is protected;
myLoopsInternal : ListOfShape from BOPCol is protected;
myAreas : ListOfShape from BOPCol is protected;
myShapesToAvoid : MapOfOrientedShape from BOPCol is protected;
end BuilderArea;

View File

@@ -15,11 +15,12 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BOPAlgo_BuilderArea.ixx>
#include <BOPAlgo_BuilderArea.hxx>
#include <BOPCol_ListOfShape.hxx>
#include <TopoDS_Shape.hxx>
#include <IntTools_Context.hxx>
#include <NCollection_BaseAllocator.hxx>
#include <TopoDS_Shape.hxx>
//=======================================================================
//function :

View File

@@ -0,0 +1,92 @@
// Created by: Peter KURNEV
// Copyright (c) 2010-2014 OPEN CASCADE SAS
// Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
// Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT,
// EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BOPAlgo_BuilderArea_HeaderFile
#define _BOPAlgo_BuilderArea_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <BOPCol_ListOfShape.hxx>
#include <BOPCol_MapOfOrientedShape.hxx>
#include <BOPAlgo_Algo.hxx>
#include <BOPCol_BaseAllocator.hxx>
class IntTools_Context;
//! The root class for algorithms to build
//! faces/solids from set of edges/faces
class BOPAlgo_BuilderArea : public BOPAlgo_Algo
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT void SetContext (const Handle(IntTools_Context)& theContext);
Standard_EXPORT const BOPCol_ListOfShape& Shapes() const;
Standard_EXPORT void SetShapes(const BOPCol_ListOfShape& theLS);
Standard_EXPORT const BOPCol_ListOfShape& Loops() const;
Standard_EXPORT const BOPCol_ListOfShape& Areas() const;
protected:
Standard_EXPORT BOPAlgo_BuilderArea();
Standard_EXPORT virtual ~BOPAlgo_BuilderArea();
Standard_EXPORT BOPAlgo_BuilderArea(const BOPCol_BaseAllocator& theAllocator);
Standard_EXPORT virtual void PerformShapesToAvoid() = 0;
Standard_EXPORT virtual void PerformLoops() = 0;
Standard_EXPORT virtual void PerformAreas() = 0;
Standard_EXPORT virtual void PerformInternalShapes() = 0;
Handle(IntTools_Context) myContext;
BOPCol_ListOfShape myShapes;
BOPCol_ListOfShape myLoops;
BOPCol_ListOfShape myLoopsInternal;
BOPCol_ListOfShape myAreas;
BOPCol_MapOfOrientedShape myShapesToAvoid;
private:
};
#endif // _BOPAlgo_BuilderArea_HeaderFile

View File

@@ -1,83 +0,0 @@
-- Created by: Peter KURNEV
-- Copyright (c) 2010-2014 OPEN CASCADE SAS
-- Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
-- Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT,
-- EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class BuilderFace from BOPAlgo
inherits BuilderArea from BOPAlgo
---Purpose: The algorithm to build faces from set of edges
uses
Orientation from TopAbs,
Face from TopoDS,
BaseAllocator from BOPCol
--raises
is
Create
returns BuilderFace from BOPAlgo;
---C++: alias "Standard_EXPORT virtual ~BOPAlgo_BuilderFace();"
Create (theAllocator: BaseAllocator from BOPCol)
returns BuilderFace from BOPAlgo;
SetFace(me:out;
theFace:Face from TopoDS);
---Purpose: Sets the face generatix
Face(me)
---Purpose: Returns the face generatix
returns Face from TopoDS;
---C++: return const &
Perform(me:out)
---Purpose: Performs the algorithm
is redefined;
PerformShapesToAvoid(me:out)
---Purpose: Collect the edges that
-- a) are internal
-- b) are the same and have different orientation
is redefined protected;
PerformLoops(me:out)
---Purpose: Build draft wires
-- a)myLoops - draft wires that consist of
-- boundary edges
-- b)myLoopsInternal - draft wires that contains
-- inner edges
is redefined protected;
PerformAreas(me:out)
---Purpose: Build draft faces that contains boundary edges
is redefined protected;
PerformInternalShapes(me:out)
---Purpose: Build finalized faces with internals
is redefined protected;
CheckData(me:out)
is redefined protected;
Orientation(me)
returns Orientation from TopAbs;
fields
myFace : Face from TopoDS is protected;
myOrientation: Orientation from TopAbs is protected;
end BuilderFace;

View File

@@ -16,60 +16,60 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BOPAlgo_BuilderFace.ixx>
//
#include <NCollection_UBTreeFiller.hxx>
#include <NCollection_DataMap.hxx>
//
#include <TColStd_MapIntegerHasher.hxx>
//
#include <gp_Pnt2d.hxx>
#include <gp_Pln.hxx>
#include <gp_Vec.hxx>
#include <gp_Dir.hxx>
#include <gp_Pnt.hxx>
//
#include <Geom_Surface.hxx>
//
#include <TopAbs.hxx>
#include <TopLoc_Location.hxx>
//
#include <TopoDS_Iterator.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Wire.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Vertex.hxx>
//
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <BRepTools.hxx>
//
#include <Bnd_Box.hxx>
//
#include <BRepBndLib.hxx>
//
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <IntTools_FClass2d.hxx>
#include <IntTools_Context.hxx>
//
#include <Bnd_Box.hxx>
#include <BOPAlgo_BuilderFace.hxx>
#include <BOPAlgo_WireEdgeSet.hxx>
#include <BOPAlgo_WireSplitter.hxx>
#include <BOPCol_Box2DBndTree.hxx>
#include <BOPCol_DataMapOfShapeListOfShape.hxx>
#include <BOPCol_DataMapOfShapeShape.hxx>
#include <BOPCol_IndexedDataMapOfShapeListOfShape.hxx>
#include <BOPCol_ListOfShape.hxx>
#include <BOPCol_MapOfShape.hxx>
#include <BOPTools.hxx>
#include <BOPTools_AlgoTools.hxx>
#include <BOPTools_AlgoTools2D.hxx>
#include <BOPAlgo_WireEdgeSet.hxx>
//
#include <BOPCol_IndexedDataMapOfShapeListOfShape.hxx>
#include <BOPTools.hxx>
#include <BOPCol_ListOfShape.hxx>
//
#include <BOPCol_DataMapOfShapeShape.hxx>
#include <BOPCol_DataMapOfShapeListOfShape.hxx>
#include <BOPCol_MapOfShape.hxx>
#include <BOPCol_Box2DBndTree.hxx>
//
#include <BOPAlgo_WireSplitter.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <BRepBndLib.hxx>
#include <BRepTools.hxx>
#include <Geom_Surface.hxx>
#include <gp_Dir.hxx>
#include <gp_Pln.hxx>
#include <gp_Pnt.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Vec.hxx>
#include <IntTools_Context.hxx>
#include <IntTools_FClass2d.hxx>
#include <NCollection_DataMap.hxx>
#include <NCollection_UBTreeFiller.hxx>
#include <TColStd_MapIntegerHasher.hxx>
#include <TopAbs.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopLoc_Location.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Wire.hxx>
//
//
//
//
//
//
//
//
//
//
//
//
//
//
static
Standard_Boolean IsGrowthWire(const TopoDS_Shape& ,
const BOPCol_IndexedMapOfShape& );

View File

@@ -0,0 +1,101 @@
// Created by: Peter KURNEV
// Copyright (c) 2010-2014 OPEN CASCADE SAS
// Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
// Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT,
// EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BOPAlgo_BuilderFace_HeaderFile
#define _BOPAlgo_BuilderFace_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <TopoDS_Face.hxx>
#include <TopAbs_Orientation.hxx>
#include <BOPAlgo_BuilderArea.hxx>
#include <BOPCol_BaseAllocator.hxx>
class TopoDS_Face;
//! The algorithm to build faces from set of edges
class BOPAlgo_BuilderFace : public BOPAlgo_BuilderArea
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT BOPAlgo_BuilderFace();
Standard_EXPORT virtual ~BOPAlgo_BuilderFace();
Standard_EXPORT BOPAlgo_BuilderFace(const BOPCol_BaseAllocator& theAllocator);
//! Sets the face generatix
Standard_EXPORT void SetFace (const TopoDS_Face& theFace);
//! Returns the face generatix
Standard_EXPORT const TopoDS_Face& Face() const;
//! Performs the algorithm
Standard_EXPORT virtual void Perform() Standard_OVERRIDE;
Standard_EXPORT TopAbs_Orientation Orientation() const;
protected:
//! Collect the edges that
//! a) are internal
//! b) are the same and have different orientation
Standard_EXPORT virtual void PerformShapesToAvoid() Standard_OVERRIDE;
//! Build draft wires
//! a)myLoops - draft wires that consist of
//! boundary edges
//! b)myLoopsInternal - draft wires that contains
//! inner edges
Standard_EXPORT virtual void PerformLoops() Standard_OVERRIDE;
//! Build draft faces that contains boundary edges
Standard_EXPORT virtual void PerformAreas() Standard_OVERRIDE;
//! Build finalized faces with internals
Standard_EXPORT virtual void PerformInternalShapes() Standard_OVERRIDE;
Standard_EXPORT virtual void CheckData() Standard_OVERRIDE;
TopoDS_Face myFace;
TopAbs_Orientation myOrientation;
private:
};
#endif // _BOPAlgo_BuilderFace_HeaderFile

View File

@@ -1,108 +0,0 @@
-- Created by: Peter KURNEV
-- Copyright (c) 2010-2014 OPEN CASCADE SAS
-- Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
-- Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT,
-- EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
deferred class BuilderShape from BOPAlgo
inherits Algo from BOPAlgo
---Purpose: Root class for algorithms that has shape as result
uses
Shape from TopoDS,
ListOfShape from TopTools,
BaseAllocator from BOPCol,
MapOfShape from BOPCol,
IndexedDataMapOfShapeListOfShape from BOPCol
--raises
is
Initialize
returns BuilderShape from BOPAlgo;
---C++: alias "Standard_EXPORT virtual ~BOPAlgo_BuilderShape();"
Initialize (theAllocator: BaseAllocator from BOPCol)
returns BuilderShape from BOPAlgo;
Shape(me)
---Purpose: Returns the result of algorithm
returns Shape from TopoDS;
---C++: return const &
------------------------------------------------------------------
--- The following methods are not implemented at this level.
-- An empty list is returned.
--- They are optional and can be redefined.
------------------------------------------------------------------
Generated (me:out;
theS : Shape from TopoDS)
---Purpose: Returns the list of shapes generated from the
-- shape theS.
returns ListOfShape from TopTools
is virtual;
---C++: return const &
Modified (me:out;
theS : Shape from TopoDS)
---Purpose: Returns the list of shapes modified from the
-- shape theS.
returns ListOfShape from TopTools
is virtual;
---C++: return const &
IsDeleted (me:out;
theS : Shape from TopoDS)
---Purpose: Returns true if the shape theS has been deleted.
returns Boolean from Standard
is virtual;
HasDeleted (me)
---Purpose: Returns true if the at least one shape(or subshape)
-- of arguments has been deleted.
returns Boolean from Standard;
HasGenerated (me)
---Purpose: Returns true if the at least one shape(or subshape)
-- of arguments has generated shapes.
returns Boolean from Standard;
HasModified (me)
---Purpose: Returns true if the at least one shape(or subshape)
-- of arguments has modified shapes.
returns Boolean from Standard;
PrepareHistory (me:out)
---Purpose: Prepare information for history support
is virtual protected;
ImagesResult(me)
returns IndexedDataMapOfShapeListOfShape from BOPCol;
---C++: return const &
fields
myShape : Shape from TopoDS is protected;
--
myHistShapes : ListOfShape from TopTools is protected;
myMapShape : MapOfShape from BOPCol is protected;
myHasDeleted : Boolean from Standard is protected;
myHasGenerated : Boolean from Standard is protected;
myHasModified : Boolean from Standard is protected;
myImagesResult : IndexedDataMapOfShapeListOfShape from BOPCol is protected;
myFlagHistory : Boolean from Standard is protected;
end BuilderShape;

View File

@@ -15,7 +15,10 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BOPAlgo_BuilderShape.ixx>
#include <BOPAlgo_BuilderShape.hxx>
#include <TopoDS_Shape.hxx>
//=======================================================================
//function :
//purpose :

View File

@@ -0,0 +1,110 @@
// Created by: Peter KURNEV
// Copyright (c) 2010-2014 OPEN CASCADE SAS
// Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
// Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT,
// EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BOPAlgo_BuilderShape_HeaderFile
#define _BOPAlgo_BuilderShape_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <TopoDS_Shape.hxx>
#include <TopTools_ListOfShape.hxx>
#include <BOPCol_MapOfShape.hxx>
#include <Standard_Boolean.hxx>
#include <BOPCol_IndexedDataMapOfShapeListOfShape.hxx>
#include <BOPAlgo_Algo.hxx>
#include <BOPCol_BaseAllocator.hxx>
class TopoDS_Shape;
//! Root class for algorithms that has shape as result
class BOPAlgo_BuilderShape : public BOPAlgo_Algo
{
public:
DEFINE_STANDARD_ALLOC
//! Returns the result of algorithm
Standard_EXPORT const TopoDS_Shape& Shape() const;
//! Returns the list of shapes generated from the
//! shape theS.
Standard_EXPORT virtual const TopTools_ListOfShape& Generated (const TopoDS_Shape& theS);
//! Returns the list of shapes modified from the
//! shape theS.
Standard_EXPORT virtual const TopTools_ListOfShape& Modified (const TopoDS_Shape& theS);
//! Returns true if the shape theS has been deleted.
Standard_EXPORT virtual Standard_Boolean IsDeleted (const TopoDS_Shape& theS);
//! Returns true if the at least one shape(or subshape)
//! of arguments has been deleted.
Standard_EXPORT Standard_Boolean HasDeleted() const;
//! Returns true if the at least one shape(or subshape)
//! of arguments has generated shapes.
Standard_EXPORT Standard_Boolean HasGenerated() const;
//! Returns true if the at least one shape(or subshape)
//! of arguments has modified shapes.
Standard_EXPORT Standard_Boolean HasModified() const;
Standard_EXPORT const BOPCol_IndexedDataMapOfShapeListOfShape& ImagesResult() const;
protected:
Standard_EXPORT BOPAlgo_BuilderShape();
Standard_EXPORT virtual ~BOPAlgo_BuilderShape();
Standard_EXPORT BOPAlgo_BuilderShape(const BOPCol_BaseAllocator& theAllocator);
//! Prepare information for history support
Standard_EXPORT virtual void PrepareHistory();
TopoDS_Shape myShape;
TopTools_ListOfShape myHistShapes;
BOPCol_MapOfShape myMapShape;
Standard_Boolean myHasDeleted;
Standard_Boolean myHasGenerated;
Standard_Boolean myHasModified;
BOPCol_IndexedDataMapOfShapeListOfShape myImagesResult;
Standard_Boolean myFlagHistory;
private:
};
#endif // _BOPAlgo_BuilderShape_HeaderFile

View File

@@ -1,76 +0,0 @@
-- Created by: Peter KURNEV
-- Copyright (c) 2010-2014 OPEN CASCADE SAS
-- Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
-- Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT,
-- EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class BuilderSolid from BOPAlgo
inherits BuilderArea from BOPAlgo
---Purpose: The algorithm to build solids from set of faces
uses
BaseAllocator from BOPCol,
Solid from TopoDS
--raises
is
Create
returns BuilderSolid from BOPAlgo;
---C++: alias "Standard_EXPORT virtual ~BOPAlgo_BuilderSolid();"
Create (theAllocator: BaseAllocator from BOPCol)
returns BuilderSolid from BOPAlgo;
SetSolid(me:out;
theSolid:Solid from TopoDS);
---Purpose: Sets the source solid <theSolid>
Solid(me)
returns Solid from TopoDS;
---C++: return const &
---Purpose: Returns the source solid
Perform(me:out)
---Purpose: Performs the algorithm
is redefined;
PerformShapesToAvoid(me:out)
---Purpose: Collect the faces that
-- a) are internal
-- b) are the same and have different orientation
is redefined protected;
PerformLoops(me:out)
---Purpose: Build draft shells
-- a)myLoops - draft shells that consist of
-- boundary faces
-- b)myLoopsInternal - draft shells that contains
-- inner faces
is redefined protected;
PerformAreas(me:out)
---Purpose: Build draft solids that contains boundary faces
is redefined protected;
PerformInternalShapes(me:out)
---Purpose: Build finalized solids with internal shells
is redefined protected;
fields
mySolid:Solid from TopoDS is protected;
end BuilderSolid;

View File

@@ -15,66 +15,66 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
//
#include <BOPAlgo_BuilderSolid.ixx>
//
#include <NCollection_List.hxx>
#include <NCollection_DataMap.hxx>
#include <NCollection_UBTreeFiller.hxx>
#include <NCollection_IncAllocator.hxx>
//
#include <gp_Pnt2d.hxx>
#include <gp_Pln.hxx>
#include <gp_Vec.hxx>
#include <gp_Dir.hxx>
#include <gp_Pnt.hxx>
//
#include <TColStd_MapIntegerHasher.hxx>
//
#include <Geom_Curve.hxx>
#include <Geom_Surface.hxx>
#include <Geom2d_Curve.hxx>
//
#include <TopAbs.hxx>
//
#include <TopoDS_Iterator.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Shell.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Solid.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Compound.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
//
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
//
#include <BRepBndLib.hxx>
#include <BRepClass3d_SolidClassifier.hxx>
//
#include <BOPAlgo_BuilderSolid.hxx>
#include <BOPAlgo_ShellSplitter.hxx>
#include <BOPCol_BoxBndTree.hxx>
#include <BOPCol_DataMapOfShapeListOfShape.hxx>
#include <BOPCol_DataMapOfShapeShape.hxx>
#include <BOPCol_IndexedDataMapOfShapeListOfShape.hxx>
#include <BOPCol_ListOfInteger.hxx>
#include <BOPCol_ListOfShape.hxx>
#include <BOPCol_MapOfOrientedShape.hxx>
#include <BOPCol_DataMapOfShapeShape.hxx>
#include <BOPCol_DataMapOfShapeListOfShape.hxx>
#include <BOPCol_MapOfShape.hxx>
#include <BOPCol_BoxBndTree.hxx>
#include <BOPCol_ListOfInteger.hxx>
#include <BOPCol_NCVector.hxx>
#include <BOPCol_Parallel.hxx>
//
#include <BOPTools.hxx>
#include <BOPTools_CoupleOfShape.hxx>
#include <BOPTools_AlgoTools.hxx>
#include <BOPTools_AlgoTools3D.hxx>
//
#include <BOPTools_CoupleOfShape.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <BRepBndLib.hxx>
#include <BRepClass3d_SolidClassifier.hxx>
#include <Geom2d_Curve.hxx>
#include <Geom_Curve.hxx>
#include <Geom_Surface.hxx>
#include <gp_Dir.hxx>
#include <gp_Pln.hxx>
#include <gp_Pnt.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Vec.hxx>
#include <IntTools_Context.hxx>
#include <NCollection_DataMap.hxx>
#include <NCollection_IncAllocator.hxx>
#include <NCollection_List.hxx>
#include <NCollection_UBTreeFiller.hxx>
#include <TColStd_MapIntegerHasher.hxx>
#include <TopAbs.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS_Compound.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Shell.hxx>
#include <TopoDS_Solid.hxx>
#include <TopoDS_Vertex.hxx>
//
//
//
//
//
//
//
//
//
//
//
//
#include <BOPAlgo_ShellSplitter.hxx>
static
Standard_Boolean IsGrowthShell(const TopoDS_Shape& ,
const BOPCol_IndexedMapOfShape& );

View File

@@ -0,0 +1,95 @@
// Created by: Peter KURNEV
// Copyright (c) 2010-2014 OPEN CASCADE SAS
// Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
// Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT,
// EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BOPAlgo_BuilderSolid_HeaderFile
#define _BOPAlgo_BuilderSolid_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <TopoDS_Solid.hxx>
#include <BOPAlgo_BuilderArea.hxx>
#include <BOPCol_BaseAllocator.hxx>
class TopoDS_Solid;
//! The algorithm to build solids from set of faces
class BOPAlgo_BuilderSolid : public BOPAlgo_BuilderArea
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT BOPAlgo_BuilderSolid();
Standard_EXPORT virtual ~BOPAlgo_BuilderSolid();
Standard_EXPORT BOPAlgo_BuilderSolid(const BOPCol_BaseAllocator& theAllocator);
//! Sets the source solid <theSolid>
Standard_EXPORT void SetSolid (const TopoDS_Solid& theSolid);
//! Returns the source solid
Standard_EXPORT const TopoDS_Solid& Solid() const;
//! Performs the algorithm
Standard_EXPORT virtual void Perform() Standard_OVERRIDE;
protected:
//! Collect the faces that
//! a) are internal
//! b) are the same and have different orientation
Standard_EXPORT virtual void PerformShapesToAvoid() Standard_OVERRIDE;
//! Build draft shells
//! a)myLoops - draft shells that consist of
//! boundary faces
//! b)myLoopsInternal - draft shells that contains
//! inner faces
Standard_EXPORT virtual void PerformLoops() Standard_OVERRIDE;
//! Build draft solids that contains boundary faces
Standard_EXPORT virtual void PerformAreas() Standard_OVERRIDE;
//! Build finalized solids with internal shells
Standard_EXPORT virtual void PerformInternalShapes() Standard_OVERRIDE;
TopoDS_Solid mySolid;
private:
};
#endif // _BOPAlgo_BuilderSolid_HeaderFile

View File

@@ -15,25 +15,23 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BOPAlgo_Builder.ixx>
#include <TopAbs_ShapeEnum.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Iterator.hxx>
#include <BRep_Builder.hxx>
#include <BOPAlgo_Builder.hxx>
#include <BOPAlgo_PaveFiller.hxx>
#include <BOPCol_DataMapOfIntegerInteger.hxx>
#include <BOPCol_ListOfShape.hxx>
#include <BOPCol_MapOfShape.hxx>
#include <BOPDS_DS.hxx>
#include <BOPDS_VectorOfListOfPaveBlock.hxx>
#include <BOPDS_PaveBlock.hxx>
#include <BOPDS_ListOfPaveBlock.hxx>
#include <BOPDS_PaveBlock.hxx>
#include <BOPDS_ShapeInfo.hxx>
#include <BOPDS_VectorOfListOfPaveBlock.hxx>
#include <BOPTools_AlgoTools.hxx>
#include <BRep_Builder.hxx>
#include <IntTools_Context.hxx>
#include <TopAbs_ShapeEnum.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopoDS_Shape.hxx>
//=======================================================================
//function : FillImagesVertices

View File

@@ -15,52 +15,53 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BOPAlgo_Builder.ixx>
//
#include <NCollection_IncAllocator.hxx>
//
#include <TopoDS_Shape.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Compound.hxx>
//
#include <BRep_Tool.hxx>
#include <BRep_Builder.hxx>
//
#include <TopExp_Explorer.hxx>
//
#include <BOPCol_ListOfShape.hxx>
#include <BOPCol_ListOfInteger.hxx>
#include <BOPCol_MapOfInteger.hxx>
#include <BOPAlgo_Builder.hxx>
#include <BOPAlgo_BuilderFace.hxx>
#include <BOPAlgo_PaveFiller.hxx>
#include <BOPCol_DataMapOfIntegerListOfShape.hxx>
#include <BOPCol_DataMapOfShapeShape.hxx>
#include <BOPCol_ListOfInteger.hxx>
#include <BOPCol_ListOfShape.hxx>
#include <BOPCol_MapOfInteger.hxx>
#include <BOPCol_NCVector.hxx>
#include <BOPCol_Parallel.hxx>
//
#include <IntTools_Context.hxx>
//
#include <BOPDS_PaveBlock.hxx>
#include <BOPDS_ShapeInfo.hxx>
#include <BOPDS_DS.hxx>
#include <BOPDS_FaceInfo.hxx>
#include <BOPDS_MapOfPaveBlock.hxx>
#include <BOPDS_VectorOfInterfFF.hxx>
#include <BOPDS_Interf.hxx>
#include <BOPDS_MapOfPaveBlock.hxx>
#include <BOPDS_PaveBlock.hxx>
#include <BOPDS_ShapeInfo.hxx>
#include <BOPDS_VectorOfCurve.hxx>
#include <BOPDS_VectorOfInterfFF.hxx>
#include <BOPDS_VectorOfPoint.hxx>
//
#include <BOPTools.hxx>
#include <BOPTools_AlgoTools.hxx>
#include <BOPTools_AlgoTools2D.hxx>
#include <BOPTools_AlgoTools3D.hxx>
#include <BOPAlgo_BuilderFace.hxx>
#include <BOPTools_CoupleOfShape.hxx>
#include <BOPTools_DataMapOfShapeSet.hxx>
#include <BOPTools_ListOfCoupleOfShape.hxx>
#include <BOPTools_MapOfSet.hxx>
#include <BOPTools_DataMapOfShapeSet.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <IntTools_Context.hxx>
#include <NCollection_IncAllocator.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS_Compound.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Vertex.hxx>
//
//
//
//
//
//
//
//
static
Standard_Boolean HasPaveBlocksOnIn(const BOPDS_FaceInfo& aFI1,
const BOPDS_FaceInfo& aFI2);

View File

@@ -15,18 +15,17 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BOPAlgo_Builder.ixx>
#include <TopoDS_Iterator.hxx>
#include <BOPAlgo_Builder.hxx>
#include <BOPAlgo_PaveFiller.hxx>
#include <BOPCol_ListOfShape.hxx>
#include <BOPCol_MapOfShape.hxx>
#include <BOPDS_DS.hxx>
#include <BOPTools_AlgoTools.hxx>
#include <BOPTools.hxx>
#include <BOPTools_AlgoTools.hxx>
#include <IntTools_Context.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopoDS_Shape.hxx>
//=======================================================================
//function : Generated

View File

@@ -1,115 +0,0 @@
-- Created on: 2004-09-03
-- Created by: Oleg FEDYAEV
-- Copyright (c) 2004-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class CheckResult from BOPAlgo
---Purpose: contains information about faulty shapes and faulty types
--- can't be processed by Boolean Operations
uses
Shape from TopoDS,
CheckStatus from BOPAlgo,
ListOfShape from BOPCol
is
Create
returns CheckResult;
---Purpose: empty constructor
SetShape1(me: in out; TheShape : Shape from TopoDS);
---Purpose: sets ancestor shape (object) for faulty sub-shapes
AddFaultyShape1(me: in out; TheShape: Shape from TopoDS);
---Purpose: adds faulty sub-shapes from object to a list
SetShape2(me: in out; TheShape: Shape from TopoDS);
---Purpose: sets ancestor shape (tool) for faulty sub-shapes
AddFaultyShape2(me: in out; TheShape: Shape from TopoDS);
---Purpose: adds faulty sub-shapes from tool to a list
GetShape1(me)
returns Shape from TopoDS;
---C++: return const&
---Purpose: returns ancestor shape (object) for faulties
GetShape2(me)
returns Shape from TopoDS;
---C++: return const&
---Purpose: returns ancestor shape (tool) for faulties
GetFaultyShapes1(me)
returns ListOfShape from BOPCol;
---C++: return const&
---Purpose: returns list of faulty shapes for object
GetFaultyShapes2(me)
returns ListOfShape from BOPCol;
---C++: return const&
---Purpose: returns list of faulty shapes for tool
SetCheckStatus(me: in out; TheStatus: CheckStatus from BOPAlgo);
---Purpose: set status of faulty
GetCheckStatus(me)
returns CheckStatus from BOPAlgo;
---Purpose: gets status of faulty
SetMaxDistance1(me:out;
theDist : Real from Standard);
---Purpose: Sets max distance for the first shape
SetMaxDistance2(me:out;
theDist : Real from Standard);
---Purpose: Sets max distance for the second shape
SetMaxParameter1(me:out;
thePar : Real from Standard);
---Purpose: Sets the parameter for the first shape
SetMaxParameter2(me:out;
thePar : Real from Standard);
---Purpose: Sets the parameter for the second shape
GetMaxDistance1(me)
returns Real from Standard;
---Purpose: Returns the distance for the first shape
GetMaxDistance2(me)
returns Real from Standard;
---Purpose: Returns the distance for the second shape
GetMaxParameter1(me)
returns Real from Standard;
---Purpose: Returns the parameter for the fircst shape
GetMaxParameter2(me)
returns Real from Standard;
---Purpose: Returns the parameter for the second shape
fields
myShape1 : Shape from TopoDS;
myShape2 : Shape from TopoDS;
myStatus : CheckStatus from BOPAlgo;
myFaulty1 : ListOfShape from BOPCol;
myFaulty2 : ListOfShape from BOPCol;
myMaxDist1 : Real from Standard;
myMaxDist2 : Real from Standard;
myMaxPar1 : Real from Standard;
myMaxPar2 : Real from Standard;
end CheckResult;

View File

@@ -13,7 +13,9 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BOPAlgo_CheckResult.ixx>
#include <BOPAlgo_CheckResult.hxx>
#include <TopoDS_Shape.hxx>
//=======================================================================
// function: BOPAlgo_CheckResult()

View File

@@ -0,0 +1,128 @@
// Created on: 2004-09-03
// Created by: Oleg FEDYAEV
// Copyright (c) 2004-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BOPAlgo_CheckResult_HeaderFile
#define _BOPAlgo_CheckResult_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <TopoDS_Shape.hxx>
#include <BOPAlgo_CheckStatus.hxx>
#include <BOPCol_ListOfShape.hxx>
#include <Standard_Real.hxx>
class TopoDS_Shape;
//! contains information about faulty shapes and faulty types
//! can't be processed by Boolean Operations
class BOPAlgo_CheckResult
{
public:
DEFINE_STANDARD_ALLOC
//! empty constructor
Standard_EXPORT BOPAlgo_CheckResult();
//! sets ancestor shape (object) for faulty sub-shapes
Standard_EXPORT void SetShape1 (const TopoDS_Shape& TheShape);
//! adds faulty sub-shapes from object to a list
Standard_EXPORT void AddFaultyShape1 (const TopoDS_Shape& TheShape);
//! sets ancestor shape (tool) for faulty sub-shapes
Standard_EXPORT void SetShape2 (const TopoDS_Shape& TheShape);
//! adds faulty sub-shapes from tool to a list
Standard_EXPORT void AddFaultyShape2 (const TopoDS_Shape& TheShape);
//! returns ancestor shape (object) for faulties
Standard_EXPORT const TopoDS_Shape& GetShape1() const;
//! returns ancestor shape (tool) for faulties
Standard_EXPORT const TopoDS_Shape& GetShape2() const;
//! returns list of faulty shapes for object
Standard_EXPORT const BOPCol_ListOfShape& GetFaultyShapes1() const;
//! returns list of faulty shapes for tool
Standard_EXPORT const BOPCol_ListOfShape& GetFaultyShapes2() const;
//! set status of faulty
Standard_EXPORT void SetCheckStatus (const BOPAlgo_CheckStatus TheStatus);
//! gets status of faulty
Standard_EXPORT BOPAlgo_CheckStatus GetCheckStatus() const;
//! Sets max distance for the first shape
Standard_EXPORT void SetMaxDistance1 (const Standard_Real theDist);
//! Sets max distance for the second shape
Standard_EXPORT void SetMaxDistance2 (const Standard_Real theDist);
//! Sets the parameter for the first shape
Standard_EXPORT void SetMaxParameter1 (const Standard_Real thePar);
//! Sets the parameter for the second shape
Standard_EXPORT void SetMaxParameter2 (const Standard_Real thePar);
//! Returns the distance for the first shape
Standard_EXPORT Standard_Real GetMaxDistance1() const;
//! Returns the distance for the second shape
Standard_EXPORT Standard_Real GetMaxDistance2() const;
//! Returns the parameter for the fircst shape
Standard_EXPORT Standard_Real GetMaxParameter1() const;
//! Returns the parameter for the second shape
Standard_EXPORT Standard_Real GetMaxParameter2() const;
protected:
private:
TopoDS_Shape myShape1;
TopoDS_Shape myShape2;
BOPAlgo_CheckStatus myStatus;
BOPCol_ListOfShape myFaulty1;
BOPCol_ListOfShape myFaulty2;
Standard_Real myMaxDist1;
Standard_Real myMaxDist2;
Standard_Real myMaxPar1;
Standard_Real myMaxPar2;
};
#endif // _BOPAlgo_CheckResult_HeaderFile

View File

@@ -0,0 +1,35 @@
// Created by: Peter KURNEV
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BOPAlgo_CheckStatus_HeaderFile
#define _BOPAlgo_CheckStatus_HeaderFile
enum BOPAlgo_CheckStatus
{
BOPAlgo_CheckUnknown,
BOPAlgo_BadType,
BOPAlgo_SelfIntersect,
BOPAlgo_TooSmallEdge,
BOPAlgo_NonRecoverableFace,
BOPAlgo_IncompatibilityOfVertex,
BOPAlgo_IncompatibilityOfEdge,
BOPAlgo_IncompatibilityOfFace,
BOPAlgo_OperationAborted,
BOPAlgo_GeomAbs_C0,
BOPAlgo_InvalidCurveOnSurface,
BOPAlgo_NotValid
};
#endif // _BOPAlgo_CheckStatus_HeaderFile

View File

@@ -1,82 +0,0 @@
-- Created by: Peter Kurnev
-- Copyright (c) 2010-2014 OPEN CASCADE SAS
-- Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
-- Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT,
-- EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
--
class CheckerSI from BOPAlgo
inherits PaveFiller from BOPAlgo
---Purpose: Checks shape on self-interference.
uses
DataMapOfShapeShape from BOPCol
is
Create
returns CheckerSI from BOPAlgo;
---C++: alias "Standard_EXPORT virtual ~BOPAlgo_CheckerSI();"
Perform(me:out)
is redefined;
Init (me:out)
is redefined protected;
SetLevelOfCheck(me:out;
theLevel: Integer from Standard);
---Purpose: Sets the level of checking shape on self-interference.
-- It defines which interferferences will be checked:
-- 0 - only V/V;
-- 1 - V/V and V/E;
-- 2 - V/V, V/E and E/E;
-- 3 - V/V, V/E, E/E and V/F;
-- 4 - V/V, V/E, E/E, V/F and E/F;
-- 5 - all interferences, default value.
SetNonDestructive(me:out;
theFlag: Boolean from Standard);
---Purpose: Sets the flag <theFlag> that defines
-- the mode of the treatment:
-- the copy of the argument when theFlag is true
-- the argument itself when theFlag is false
NonDestructive(me)
returns Boolean from Standard;
---Purpose: Returns the flag that defines the
-- mode of the treatment:
-- true when the copy of the argument is used
-- false when the argument itself is used
PostTreat (me:out)
is protected;
---Purpose: Provides post-treatment actions
PrepareCopy(me:out)
is virtual protected;
PostTreatCopy (me:out)
is protected;
---Purpose: Provides post-treatment actions for the copy
fields
myLevelOfCheck: Integer from Standard is protected;
myNonDestructive: Boolean from Standard is protected;
myNewOldMap : DataMapOfShapeShape from BOPCol is protected;
end CheckerSI;

View File

@@ -16,33 +16,27 @@
// commercial license or contractual agreement.
//
#include <BOPAlgo_CheckerSI.ixx>
#include <Standard_ErrorHandler.hxx>
#include <Standard_Failure.hxx>
#include <BRepBuilderAPI_Copy.hxx>
#include <TopTools_ListOfShape.hxx>
#include <BOPAlgo_CheckerSI.hxx>
#include <BOPCol_MapOfShape.hxx>
#include <BOPDS_DS.hxx>
#include <BOPDS_IteratorSI.hxx>
#include <BOPDS_PIteratorSI.hxx>
#include <BOPDS_Interf.hxx>
#include <BOPDS_IteratorSI.hxx>
#include <BOPDS_MapOfPassKey.hxx>
#include <BOPDS_PassKey.hxx>
#include <BOPDS_VectorOfInterfVV.hxx>
#include <BOPDS_VectorOfInterfVE.hxx>
#include <BOPDS_VectorOfInterfVE.hxx>
#include <BOPDS_VectorOfInterfVF.hxx>
#include <BOPDS_PIteratorSI.hxx>
#include <BOPDS_VectorOfInterfEF.hxx>
#include <BOPDS_VectorOfInterfFF.hxx>
#include <IntTools_Context.hxx>
#include <BOPDS_VectorOfInterfVE.hxx>
#include <BOPDS_VectorOfInterfVF.hxx>
#include <BOPDS_VectorOfInterfVV.hxx>
#include <BOPTools.hxx>
#include <BOPTools_AlgoTools.hxx>
#include <BRepBuilderAPI_Copy.hxx>
#include <IntTools_Context.hxx>
#include <Standard_ErrorHandler.hxx>
#include <Standard_Failure.hxx>
#include <TopTools_ListOfShape.hxx>
//=======================================================================
//function :

View File

@@ -0,0 +1,102 @@
// Created by: Peter Kurnev
// Copyright (c) 2010-2014 OPEN CASCADE SAS
// Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
// Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT,
// EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BOPAlgo_CheckerSI_HeaderFile
#define _BOPAlgo_CheckerSI_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Boolean.hxx>
#include <BOPCol_DataMapOfShapeShape.hxx>
#include <BOPAlgo_PaveFiller.hxx>
//! Checks shape on self-interference.
class BOPAlgo_CheckerSI : public BOPAlgo_PaveFiller
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT BOPAlgo_CheckerSI();
Standard_EXPORT virtual ~BOPAlgo_CheckerSI();
Standard_EXPORT virtual void Perform() Standard_OVERRIDE;
//! Sets the level of checking shape on self-interference.
//! It defines which interferferences will be checked:
//! 0 - only V/V;
//! 1 - V/V and V/E;
//! 2 - V/V, V/E and E/E;
//! 3 - V/V, V/E, E/E and V/F;
//! 4 - V/V, V/E, E/E, V/F and E/F;
//! 5 - all interferences, default value.
Standard_EXPORT void SetLevelOfCheck (const Standard_Integer theLevel);
//! Sets the flag <theFlag> that defines
//! the mode of the treatment:
//! the copy of the argument when theFlag is true
//! the argument itself when theFlag is false
Standard_EXPORT void SetNonDestructive (const Standard_Boolean theFlag);
//! Returns the flag that defines the
//! mode of the treatment:
//! true when the copy of the argument is used
//! false when the argument itself is used
Standard_EXPORT Standard_Boolean NonDestructive() const;
protected:
Standard_EXPORT virtual void Init() Standard_OVERRIDE;
//! Provides post-treatment actions
Standard_EXPORT void PostTreat();
Standard_EXPORT virtual void PrepareCopy();
//! Provides post-treatment actions for the copy
Standard_EXPORT void PostTreatCopy();
Standard_Integer myLevelOfCheck;
Standard_Boolean myNonDestructive;
BOPCol_DataMapOfShapeShape myNewOldMap;
private:
};
#endif // _BOPAlgo_CheckerSI_HeaderFile

View File

@@ -1,218 +0,0 @@
-- Created by: Eugeny MALTCHIKOV
-- Copyright (c) 2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class MakerVolume from BOPAlgo
inherits Builder from BOPAlgo
---Purpose:
-- The algorithm is to build solids from set of shapes.
-- It uses the BOPAlgo_Builder algorithm to intersect the given shapes
-- and build the images of faces (if needed) and BOPAlgo_BuilderSolid
-- algorithm to build the solids.
--
-- Steps of the algorithm:
-- 1. Collect all faces: intersect the shapes if necessary and collect
-- the images of faces, otherwise just collect the faces to the
-- <myFaces> list;
-- All faces on this step added twice, with orientation FORWARD
-- and REVERSED;
--
-- 2. Create bounding box covering all the faces from <myFaces> and
-- create solid box from corner points of that bounding box
-- (myBBox, mySBox). Add faces from that box to <myFaces>;
--
-- 3. Build solids from <myFaces> using BOPAlgo_BuilderSolid algorithm;
--
-- 4. Treat the result: Eliminate solid containig faces from <mySBox>;
--
-- 5. Fill internal shapes: add internal vertices and edges into
-- created solids;
--
-- 6. Prepare the history.
--
-- Fields:
-- <myIntersect> - boolean flag. It defines whether intersect shapes
-- from <myArguments> (if set to TRUE) or not (FALSE).
-- The default value is TRUE. By setting it to FALSE
-- the user should guarantee that shapes in <myArguments>
-- do not interfere with each other, otherwise the result
-- is unpredictable.
--
-- <myBBox> - bounding box, covering all faces from <myFaces>.
--
-- <mySBox> - Solid box created from the corner points of <myBBox>.
--
-- <myFaces> - the list is to keep the "final" faces, that will be
-- given to the BOPAlgo_BuilderSolid algorithm.
-- If the shapes have been interfered it should contain
-- the images of the source shapes, otherwise its just
-- the original faces.
-- It also contains the faces from <mySBox>.
--
--
-- Fields inherited from BOPAlgo_Builder:
--
-- <myArguments> - list of the source shapes. The source shapes can have
-- any type, but each shape must not be self-interfered.
--
-- <myShape> - Result shape:
-- - empty compound - if no solids were created;
-- - solid - if created only one solid;
-- - compound of solids - if created more than one solid.
--
--
-- Fields inherited from BOPAlgo_Algo:
--
-- <myRunParallel> - Defines whether the parallel processing is
-- switched on or not.
-- <myErrorStatus> - Error status of the operation:
-- 0 - operation successful;
-- 100 - no shapes to process;
-- 102 - BOPAlgo_PaveFiller algorithm has failed;
-- 103 - BOPAlgo_BuilderSolid algorithm has failed.
--
-- Example:
--
-- BOPAlgo_MakerVolume aMV;
-- //
-- aMV.SetArguments(aLS); //source shapes
-- aMV.SetRunParallel(bRunParallel); //parallel or single mode
-- aMV.SetIntersect(bIntersect); //intersect or not the shapes from <aLS>
-- //
-- aMV.Perform(); //perform the operation
-- if (aMV.ErrorStatus()) { //check error status
-- return;
-- }
-- //
-- const TopoDS_Shape& aResult = aMV.Shape(); //result of the operation
--
uses
Shape from TopoDS,
BaseAllocator from BOPCol,
ListOfShape from BOPCol,
MapOfShape from BOPCol,
Box from Bnd,
Solid from TopoDS,
PaveFiller from BOPAlgo
is
Create
returns MakerVolume from BOPAlgo;
---C++: alias "virtual ~BOPAlgo_MakerVolume();"
---C++: inline
---Purpose:
-- Empty contructor.
Create(theAllocator: BaseAllocator from BOPCol)
returns MakerVolume from BOPAlgo;
---C++: inline
---Purpose:
-- Empty contructor.
Clear(me:out)
is redefined;
---C++: inline
---Purpose:
-- Clears the data.
SetIntersect(me:out;
bIntersect : Boolean from Standard);
---C++: inline
---Purpose:
-- Sets the flag myIntersect:
-- if <bIntersect> is TRUE the shapes from <myArguments> will be intersected.
-- if <bIntersect> is FALSE no intersection will be done.
IsIntersect(me)
returns Boolean from Standard;
---C++: inline
---Purpose:
-- Returns the flag <myIntersect>.
Box(me)
returns Solid from TopoDS;
---C++: return const&
---C++: inline
---Purpose:
-- Returns the solid box <mySBox>.
Faces(me)
returns ListOfShape from BOPCol;
---C++: return const&
---C++: inline
---Purpose:
-- Returns the processed faces <myFaces>.
CheckData(me:out)
is redefined protected;
---Purpose:
-- Checks the data.
Perform(me:out)
is redefined;
---Purpose:
-- Performs the operation.
PerformInternal1(me:out;
thePF: PaveFiller from BOPAlgo)
is redefined protected;
---Purpose:
-- Performs the operation.
CollectFaces(me:out)
is protected;
---Purpose:
-- Collects all faces.
MakeBox(me:out;
theBoxFaces : out MapOfShape from BOPCol)
is protected;
---Purpose:
-- Makes solid box.
BuildSolids(me:out;
theLSR : out ListOfShape from BOPCol)
is protected;
---Purpose:
-- Builds solids.
RemoveBox(me:out;
theLSR : out ListOfShape from BOPCol;
theBoxFaces : MapOfShape from BOPCol)
is protected;
---Purpose:
-- Removes the covering box.
FillInternalShapes(me:out;
theLSR : ListOfShape from BOPCol)
is protected;
---Purpose:
-- Fills the solids with internal shapes.
BuildShape(me:out;
theLSR : ListOfShape from BOPCol)
is protected;
---Purpose:
-- Builds the result.
fields
myIntersect : Boolean from Standard is protected;
myBBox : Box from Bnd is protected;
mySBox : Solid from TopoDS is protected;
myFaces : ListOfShape from BOPCol is protected;
end MakerVolume;

View File

@@ -12,28 +12,20 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BOPAlgo_MakerVolume.ixx>
#include <NCollection_IncAllocator.hxx>
#include <Bnd_Box.hxx>
#include <TopoDS_Solid.hxx>
#include <TopExp_Explorer.hxx>
#include <BRepPrimAPI_MakeBox.hxx>
#include <BOPCol_ListOfShape.hxx>
#include <BOPCol_DataMapOfShapeListOfShape.hxx>
#include <BOPDS_DS.hxx>
#include <BOPAlgo_PaveFiller.hxx>
#include <BOPAlgo_BuilderSolid.hxx>
#include <BOPAlgo_MakerVolume.hxx>
#include <BOPAlgo_PaveFiller.hxx>
#include <BOPCol_DataMapOfShapeListOfShape.hxx>
#include <BOPCol_ListOfShape.hxx>
#include <BOPDS_DS.hxx>
#include <BOPTools.hxx>
#include <BOPTools_AlgoTools.hxx>
#include <BRepPrimAPI_MakeBox.hxx>
#include <NCollection_IncAllocator.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS_Solid.hxx>
static
void AddFace(const TopoDS_Shape& theF,

View File

@@ -0,0 +1,214 @@
// Created by: Eugeny MALTCHIKOV
// Copyright (c) 2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BOPAlgo_MakerVolume_HeaderFile
#define _BOPAlgo_MakerVolume_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Boolean.hxx>
#include <Bnd_Box.hxx>
#include <TopoDS_Solid.hxx>
#include <BOPCol_ListOfShape.hxx>
#include <BOPAlgo_Builder.hxx>
#include <BOPCol_BaseAllocator.hxx>
#include <BOPCol_MapOfShape.hxx>
class TopoDS_Solid;
class BOPAlgo_PaveFiller;
//! The algorithm is to build solids from set of shapes.
//! It uses the BOPAlgo_Builder algorithm to intersect the given shapes
//! and build the images of faces (if needed) and BOPAlgo_BuilderSolid
//! algorithm to build the solids.
//!
//! Steps of the algorithm:
//! 1. Collect all faces: intersect the shapes if necessary and collect
//! the images of faces, otherwise just collect the faces to the
//! <myFaces> list;
//! All faces on this step added twice, with orientation FORWARD
//! and REVERSED;
//!
//! 2. Create bounding box covering all the faces from <myFaces> and
//! create solid box from corner points of that bounding box
//! (myBBox, mySBox). Add faces from that box to <myFaces>;
//!
//! 3. Build solids from <myFaces> using BOPAlgo_BuilderSolid algorithm;
//!
//! 4. Treat the result: Eliminate solid containig faces from <mySBox>;
//!
//! 5. Fill internal shapes: add internal vertices and edges into
//! created solids;
//!
//! 6. Prepare the history.
//!
//! Fields:
//! <myIntersect> - boolean flag. It defines whether intersect shapes
//! from <myArguments> (if set to TRUE) or not (FALSE).
//! The default value is TRUE. By setting it to FALSE
//! the user should guarantee that shapes in <myArguments>
//! do not interfere with each other, otherwise the result
//! is unpredictable.
//!
//! <myBBox> - bounding box, covering all faces from <myFaces>.
//!
//! <mySBox> - Solid box created from the corner points of <myBBox>.
//!
//! <myFaces> - the list is to keep the "final" faces, that will be
//! given to the BOPAlgo_BuilderSolid algorithm.
//! If the shapes have been interfered it should contain
//! the images of the source shapes, otherwise its just
//! the original faces.
//! It also contains the faces from <mySBox>.
//!
//! Fields inherited from BOPAlgo_Builder:
//!
//! <myArguments> - list of the source shapes. The source shapes can have
//! any type, but each shape must not be self-interfered.
//!
//! <myShape> - Result shape:
//! - empty compound - if no solids were created;
//! - solid - if created only one solid;
//! - compound of solids - if created more than one solid.
//!
//! Fields inherited from BOPAlgo_Algo:
//!
//! <myRunParallel> - Defines whether the parallel processing is
//! switched on or not.
//! <myErrorStatus> - Error status of the operation:
//! 0 - operation successful;
//! 100 - no shapes to process;
//! 102 - BOPAlgo_PaveFiller algorithm has failed;
//! 103 - BOPAlgo_BuilderSolid algorithm has failed.
//!
//! Example:
//!
//! BOPAlgo_MakerVolume aMV;
//! //
//! aMV.SetArguments(aLS); //source shapes
//! aMV.SetRunParallel(bRunParallel); //parallel or single mode
//! aMV.SetIntersect(bIntersect); //intersect or not the shapes from <aLS>
//! //
//! aMV.Perform(); //perform the operation
//! if (aMV.ErrorStatus()) { //check error status
//! return;
//! }
//! //
//! const TopoDS_Shape& aResult = aMV.Shape(); //result of the operation
class BOPAlgo_MakerVolume : public BOPAlgo_Builder
{
public:
DEFINE_STANDARD_ALLOC
//! Empty contructor.
BOPAlgo_MakerVolume();
virtual ~BOPAlgo_MakerVolume();
//! Empty contructor.
BOPAlgo_MakerVolume(const BOPCol_BaseAllocator& theAllocator);
//! Clears the data.
virtual void Clear() Standard_OVERRIDE;
//! Sets the flag myIntersect:
//! if <bIntersect> is TRUE the shapes from <myArguments> will be intersected.
//! if <bIntersect> is FALSE no intersection will be done.
void SetIntersect (const Standard_Boolean bIntersect);
//! Returns the flag <myIntersect>.
Standard_Boolean IsIntersect() const;
//! Returns the solid box <mySBox>.
const TopoDS_Solid& Box() const;
//! Returns the processed faces <myFaces>.
const BOPCol_ListOfShape& Faces() const;
//! Performs the operation.
Standard_EXPORT virtual void Perform() Standard_OVERRIDE;
protected:
//! Checks the data.
Standard_EXPORT virtual void CheckData() Standard_OVERRIDE;
//! Performs the operation.
Standard_EXPORT virtual void PerformInternal1 (const BOPAlgo_PaveFiller& thePF) Standard_OVERRIDE;
//! Collects all faces.
Standard_EXPORT void CollectFaces();
//! Makes solid box.
Standard_EXPORT void MakeBox (BOPCol_MapOfShape& theBoxFaces);
//! Builds solids.
Standard_EXPORT void BuildSolids (BOPCol_ListOfShape& theLSR);
//! Removes the covering box.
Standard_EXPORT void RemoveBox (BOPCol_ListOfShape& theLSR, const BOPCol_MapOfShape& theBoxFaces);
//! Fills the solids with internal shapes.
Standard_EXPORT void FillInternalShapes (const BOPCol_ListOfShape& theLSR);
//! Builds the result.
Standard_EXPORT void BuildShape (const BOPCol_ListOfShape& theLSR);
Standard_Boolean myIntersect;
Bnd_Box myBBox;
TopoDS_Solid mySBox;
BOPCol_ListOfShape myFaces;
private:
};
#include <BOPAlgo_MakerVolume.lxx>
#endif // _BOPAlgo_MakerVolume_HeaderFile

View File

@@ -0,0 +1,29 @@
// Created by: Peter KURNEV
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BOPAlgo_Operation_HeaderFile
#define _BOPAlgo_Operation_HeaderFile
enum BOPAlgo_Operation
{
BOPAlgo_COMMON,
BOPAlgo_FUSE,
BOPAlgo_CUT,
BOPAlgo_CUT21,
BOPAlgo_SECTION,
BOPAlgo_UNKNOWN
};
#endif // _BOPAlgo_Operation_HeaderFile

View File

@@ -0,0 +1,21 @@
// Created by: Peter KURNEV
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BOPAlgo_PArgumentAnalyzer_HeaderFile
#define _BOPAlgo_PArgumentAnalyzer_HeaderFile
class BOPAlgo_ArgumentAnalyzer;
typedef BOPAlgo_ArgumentAnalyzer* BOPAlgo_PArgumentAnalyzer;
#endif // _BOPAlgo_PArgumentAnalyzer_HeaderFile

View File

@@ -0,0 +1,21 @@
// Created by: Peter KURNEV
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BOPAlgo_PBOP_HeaderFile
#define _BOPAlgo_PBOP_HeaderFile
class BOPAlgo_BOP;
typedef BOPAlgo_BOP* BOPAlgo_PBOP;
#endif // _BOPAlgo_PBOP_HeaderFile

View File

@@ -0,0 +1,21 @@
// Created by: Peter KURNEV
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BOPAlgo_PBuilder_HeaderFile
#define _BOPAlgo_PBuilder_HeaderFile
class BOPAlgo_Builder;
typedef BOPAlgo_Builder* BOPAlgo_PBuilder;
#endif // _BOPAlgo_PBuilder_HeaderFile

View File

@@ -0,0 +1,21 @@
// Created by: Peter KURNEV
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BOPAlgo_PPaveFiller_HeaderFile
#define _BOPAlgo_PPaveFiller_HeaderFile
class BOPAlgo_PaveFiller;
typedef BOPAlgo_PaveFiller* BOPAlgo_PPaveFiller;
#endif // _BOPAlgo_PPaveFiller_HeaderFile

View File

@@ -0,0 +1,21 @@
// Created by: Peter KURNEV
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BOPAlgo_PSection_HeaderFile
#define _BOPAlgo_PSection_HeaderFile
class BOPAlgo_Section;
typedef BOPAlgo_Section* BOPAlgo_PSection;
#endif // _BOPAlgo_PSection_HeaderFile

View File

@@ -0,0 +1,21 @@
// Created by: Peter KURNEV
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BOPAlgo_PWireEdgeSet_HeaderFile
#define _BOPAlgo_PWireEdgeSet_HeaderFile
class BOPAlgo_WireEdgeSet;
typedef BOPAlgo_WireEdgeSet* BOPAlgo_PWireEdgeSet;
#endif // _BOPAlgo_PWireEdgeSet_HeaderFile

View File

@@ -1,486 +0,0 @@
-- Created by: Peter KURNEV
-- Copyright (c) 2010-2014 OPEN CASCADE SAS
-- Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
-- Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT,
-- EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class PaveFiller from BOPAlgo
inherits Algo from BOPAlgo
---Purpose:
uses
Pnt from gp,
ShapeEnum from TopAbs,
Vertex from TopoDS,
Face from TopoDS,
Edge from TopoDS,
ListOfShape from TopTools,
BaseAllocator from BOPCol,
ListOfShape from BOPCol,
MapOfInteger from BOPCol,
ListOfInteger from BOPCol,
DataMapOfShapeInteger from BOPCol,
IndexedDataMapOfShapeInteger from BOPCol,
DataMapOfIntegerListOfInteger from BOPCol,
DataMapOfShapeListOfShape from BOPCol,
IndexedDataMapOfShapeListOfShape from BOPCol,
DataMapOfIntegerReal from BOPCol,
DataMapOfIntegerInteger from BOPCol,
--
Context from IntTools,
--
SectionAttribute from BOPAlgo,
DS from BOPDS,
PDS from BOPDS,
Iterator from BOPDS,
PIterator from BOPDS,
PaveBlock from BOPDS,
Curve from BOPDS,
IndexedDataMapOfShapeCoupleOfPaveBlocks from BOPDS,
MapOfPaveBlock from BOPDS,
IndexedMapOfPaveBlock from BOPDS,
ListOfPaveBlock from BOPDS,
ListOfPave from BOPDS,
ListOfPntOn2S from IntSurf,
Curve from IntTools,
DataMapOfPaveBlockListOfPaveBlock from BOPDS,
VectorOfCurve from BOPDS
--raises
is
Create
returns PaveFiller from BOPAlgo;
---C++: alias "Standard_EXPORT virtual ~BOPAlgo_PaveFiller();"
Create (theAllocator: BaseAllocator from BOPCol)
returns PaveFiller from BOPAlgo;
DS(me:out)
returns DS from BOPDS;
---C++:return const &
PDS(me:out)
returns PDS from BOPDS;
Iterator(me:out)
returns PIterator from BOPDS;
---C++:return const &
SetArguments(me:out;
theLS:ListOfShape from BOPCol);
Arguments(me)
returns ListOfShape from BOPCol;
---C++: return const &
Context(me:out)
returns Context from IntTools;
SetSectionAttribute(me:out;
theSecAttr : SectionAttribute from BOPAlgo);
Perform(me:out)
is redefined;
--
-- protected methods
--
PerformInternal (me:out)
is virtual protected;
Clear(me:out)
is virtual protected;
Init(me:out)
is virtual protected;
Prepare(me:out)
is protected;
PerformVV(me:out)
is virtual protected;
PerformVE(me:out)
is virtual protected;
PerformVF(me:out)
is virtual protected;
PerformEE(me:out)
is virtual protected;
PerformEF(me:out)
is virtual protected;
PerformFF(me:out)
is virtual protected;
PerformVZ(me:out)
is virtual protected;
--Purpose: Computes Vertex/Solid interferences
PerformEZ(me:out)
is virtual protected;
--Purpose: Computes Edge/Solid interferences
PerformFZ(me:out)
is virtual protected;
--Purpose: Computes Face/Solid interferences
PerformZZ(me:out)
is virtual protected;
--Purpose: Computes Solid/Solid interferences
TreatVerticesEE(me:out)
is protected;
MakeSplitEdges(me:out)
is protected;
MakeBlocks(me:out)
is protected;
MakePCurves(me:out)
is protected;
ProcessDE(me:out)
is protected;
FillShrunkData(me:out;
thePB:out PaveBlock from BOPDS)
is protected;
FillShrunkData(me:out;
theType1: ShapeEnum from TopAbs;
theType2: ShapeEnum from TopAbs)
is protected;
PerformVerticesEE(me:out;
theMVCPB:out IndexedDataMapOfShapeCoupleOfPaveBlocks from BOPDS;
theAllocator:out BaseAllocator from BOPCol)
returns Integer from Standard
is protected;
PerformVerticesEF(me:out;
theMVCPB:out IndexedDataMapOfShapeCoupleOfPaveBlocks from BOPDS;
theAllocator:out BaseAllocator from BOPCol)
returns Integer from Standard
is protected;
CheckFacePaves(me:out;
theVnew:Vertex from TopoDS;
theMIF:MapOfInteger from BOPCol)
returns Boolean from Standard
is protected;
CheckFacePaves(myclass;
theN:Integer from Standard;
theMIFOn:MapOfInteger from BOPCol;
theMIFIn:MapOfInteger from BOPCol)
returns Boolean from Standard
is protected;
IsExistingVertex(me;
theP:Pnt from gp;
theTol:Real from Standard;
theMVOn:MapOfInteger from BOPCol)
returns Boolean from Standard
is protected;
PutPavesOnCurve(me:out;
theMVOn : MapOfInteger from BOPCol;
theTolR3D : Real from Standard;
theNC : out Curve from BOPDS;
nF1 : Integer from Standard;
nF2 : Integer from Standard;
theMI : MapOfInteger from BOPCol;
theMVEF : MapOfInteger from BOPCol;
theMVTol : out DataMapOfIntegerReal from BOPCol)
is protected;
---Purpose:
-- Checks and puts paves from <theMVOn> on the curve <theNC>.
ExtendedTolerance(me:out;
nV : Integer from Standard;
aMI : MapOfInteger from BOPCol;
aTolVExt : out Real from Standard;
aType : Integer from Standard = 0)
returns Boolean from Standard
is protected;
---Purpose:
-- Depending on the parameter aType it checks whether
-- the vertex nV was created in EE or EF intersections.
-- If so, it increases aTolVExt from tolerance value of vertex to
-- the max distance from vertex nV to the ends of the range of common part.
-- Possible values of aType:
-- 1 - checks only EE;
-- 2 - checks only EF;
-- other - checks both types of intersections.
PutBoundPaveOnCurve(me:out;
theF1: Face from TopoDS;
theF2: Face from TopoDS;
theTolR3D:Real from Standard;
theNC:out Curve from BOPDS;
theLBV:out ListOfInteger from BOPCol)
is protected;
IsExistingPaveBlock(me:out;
thePB:PaveBlock from BOPDS;
theNC:Curve from BOPDS;
theTolR3D:Real from Standard;
theMPB:IndexedMapOfPaveBlock from BOPDS;
thePBOut:out PaveBlock from BOPDS)
returns Boolean from Standard
is protected;
IsExistingPaveBlock(me:out;
thePB:PaveBlock from BOPDS;
theNC:Curve from BOPDS;
theTolR3D:Real from Standard;
theLSE:ListOfInteger from BOPCol)
returns Boolean from Standard
is protected;
PostTreatFF(me:out;
theMSCPB:out IndexedDataMapOfShapeCoupleOfPaveBlocks from BOPDS;
theMVI:out DataMapOfShapeInteger from BOPCol;
theDMExEdges:out DataMapOfPaveBlockListOfPaveBlock from BOPDS;
theDMI:out DataMapOfIntegerInteger from BOPCol;
theAllocator:out BaseAllocator from BOPCol)
returns Integer from Standard
is protected;
---Purpose:
-- Treatment of section edges.
--
-- Treatment of degenerated edges
--
FindPaveBlocks(me:out;
theV:Integer from Standard;
theF:Integer from Standard;
theLPB:out ListOfPaveBlock from BOPDS)
is protected;
FillPaves(me:out;
theV:Integer from Standard;
theE:Integer from Standard;
theF:Integer from Standard;
theLPB: ListOfPaveBlock from BOPDS;
thePB: PaveBlock from BOPDS)
is protected;
MakeSplitEdge(me:out;
theV:Integer from Standard;
theF:Integer from Standard)
is protected;
GetEFPnts(me:out;
nF1 : Integer from Standard;
nF2 : Integer from Standard;
aListOfPnts: out ListOfPntOn2S from IntSurf)
is protected;
PutEFPavesOnCurve(me:out;
theNC : out Curve from BOPDS;
theMI : MapOfInteger from BOPCol;
theMVEF : MapOfInteger from BOPCol;
theMVTol : out DataMapOfIntegerReal from BOPCol)
is protected;
---Purpose:
-- Checks and puts paves created in EF intersections on the curve <theNC>.
PutStickPavesOnCurve(me:out;
aF1 : Face from TopoDS;
aF2 : Face from TopoDS;
theMI : MapOfInteger from BOPCol;
theNC : out Curve from BOPDS;
theMVStick : MapOfInteger from BOPCol;
theMVTol : out DataMapOfIntegerReal from BOPCol)
is protected;
---Purpose:
-- Puts stick paves on the curve <theNC>
GetStickVertices(me:out;
nF1 : Integer from Standard;
nF2 : Integer from Standard;
theMVStick : out MapOfInteger from BOPCol;
theMVEF : out MapOfInteger from BOPCol;
theMI : out MapOfInteger from BOPCol)
is protected;
---Purpose:
-- Collects indices of vertices created in all intersections between
-- two faces (<nF1> and <nF2>) to the map <theMVStick>.
-- Also, it collects indices of EF vertices to the <theMVEF> map
-- and indices of all subshapes of these two faces to the <theMI> map.
GetFullShapeMap(me:out;
nF : Integer from Standard;
theMI : out MapOfInteger from BOPCol)
is protected;
---Purpose:
-- Collects index nF and indices of all subshapes of the shape with index <nF>
-- to the map <theMI>.
RemoveUsedVertices(me:out;
theNC : out Curve from BOPDS;
theMV : out MapOfInteger from BOPCol)
is protected;
---Purpose:
-- Removes indices of vertices that are already on the
-- curve <theNC> from the map <theMV>.
-- It is used in PutEFPavesOnCurve and PutStickPavesOnCurve methods.
PutPaveOnCurve(me:out;
nV : Integer from Standard;
theTolR3D : Real from Standard;
theNC : out Curve from BOPDS;
theMI : MapOfInteger from BOPCol;
theMVTol : out DataMapOfIntegerReal from BOPCol;
aType : Integer from Standard = 0)
is protected;
---Purpose:
-- Puts the pave nV on the curve theNC.
-- Parameter aType defines whether to check the pave with
-- extended tolerance:
-- 0 - do not perform the check;
-- other - perform the check (aType goes to ExtendedTolerance).
ProcessExistingPaveBlocks(me:out;
theInt : Integer from Standard;
theMPBOnIn : IndexedMapOfPaveBlock from BOPDS;
theDMBV : DataMapOfIntegerListOfInteger from BOPCol;
theMSCPB : out IndexedDataMapOfShapeCoupleOfPaveBlocks from BOPDS;
theMVI : out DataMapOfShapeInteger from BOPCol;
theMPB : out MapOfPaveBlock from BOPDS)
is protected;
---Purpose:
-- Adds the existing edges from the map <theMPBOnIn> which interfere
-- with the vertices from <theMVB> map to the post treatment of section edges.
UpdateExistingPaveBlocks(me:out;
thePB : PaveBlock from BOPDS;
theLPB : out ListOfPaveBlock from BOPDS;
nF1 : Integer from Standard;
nF2 : Integer from Standard)
is protected;
---Purpose:
-- Replaces existing pave block <thePB> with new pave blocks <theLPB>.
-- The list <theLPB> contains images of <thePB> which were created in
-- the post treatment of section edges.
TreatNewVertices(me:out;
theMVI : IndexedDataMapOfShapeInteger from BOPCol;
theImages : out IndexedDataMapOfShapeListOfShape from BOPCol)
is protected;
---Purpose:
-- Treatment of vertices that were created in EE intersections.
PutClosingPaveOnCurve (me:out;
aNC :out Curve from BOPDS)
is protected;
---Purpose:
-- Put paves on the curve <aBC> in case when <aBC>
-- is closed 3D-curve
PreparePostTreatFF(me:out;
aInt : Integer from Standard;
aCur : Integer from Standard;
aPB : PaveBlock from BOPDS;
aMSCPB : out IndexedDataMapOfShapeCoupleOfPaveBlocks from BOPDS;
aMVI : out DataMapOfShapeInteger from BOPCol;
aLPB : out ListOfPaveBlock from BOPDS)
is protected;
---Purpose:
-- Keeps data for post treatment
RefineFaceInfoOn(me:out)
is protected;
---Purpose:
-- Refines the state On for the all faces having
-- state information
UpdateFaceInfo(me:out;
theDME:out DataMapOfPaveBlockListOfPaveBlock from BOPDS;
theDMV: DataMapOfIntegerInteger from BOPCol)
is protected;
---Purpose:
-- Updates the information about faces
ForceInterfVE(me:out;
nV : Integer from Standard;
aPB : out PaveBlock from BOPDS;
aMPB : out MapOfPaveBlock from BOPDS)
is protected;
---Purpose:
-- Updates tolerance of vertex with index <nV>
-- to make it interfere with edge
ForceInterfVF(me:out;
nV : Integer from Standard;
nF : Integer from Standard)
returns Boolean from Standard
is protected;
---Purpose:
-- Updates tolerance of vertex with index <nV>
-- to make it interfere with face with index <nF>
CheckPlanes(me;
nF1 : Integer from Standard;
nF2 : Integer from Standard)
returns Boolean from Standard
is protected;
---Purpose:
-- Checks if there are any common or intersecting sub shapes
-- between two planar faces.
SplitEdge(me:out;
nE : Integer from Standard;
nV1 : Integer from Standard;
aT1 : Real from Standard;
nV2 : Integer from Standard;
aT2 : Real from Standard)
returns Integer from Standard
is protected;
---Purpose:
-- Creates new edge from the edge nE with vertices nV1 and nV2
-- and returns the index of that new edge in the DS.
UpdatePaveBlocks(me:out;
theDMI : DataMapOfIntegerInteger from BOPCol)
is protected;
---Purpose:
-- Updates pave blocks which have the paves with indices contained
-- in the map <theDMI>.
SetFuzzyValue(me:out;
theFuzz : Real from Standard);
---Purpose: Sets the additional tolerance
FuzzyValue(me)
returns Real from Standard;
---Purpose: Returns the additional tolerance
fields
myArguments : ListOfShape from BOPCol is protected;
myDS : PDS from BOPDS is protected;
myIterator : PIterator from BOPDS is protected;
myContext : Context from IntTools is protected;
mySectionAttribute : SectionAttribute from BOPAlgo is protected;
myFuzzyValue : Real from Standard is protected;
end PaveFiller;

View File

@@ -15,19 +15,22 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BOPAlgo_PaveFiller.ixx>
#include <Standard_ErrorHandler.hxx>
#include <Standard_Failure.hxx>
#include <NCollection_BaseAllocator.hxx>
#include <IntTools_Context.hxx>
#include <BOPAlgo_PaveFiller.hxx>
#include <BOPAlgo_SectionAttribute.hxx>
#include <BOPDS_Curve.hxx>
#include <BOPDS_DS.hxx>
#include <BOPDS_Iterator.hxx>
#include <BOPDS_PaveBlock.hxx>
#include <gp_Pnt.hxx>
#include <IntTools_Context.hxx>
#include <NCollection_BaseAllocator.hxx>
#include <Standard_ErrorHandler.hxx>
#include <Standard_Failure.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
//=======================================================================
//function :
//purpose :

View File

@@ -0,0 +1,300 @@
// Created by: Peter KURNEV
// Copyright (c) 2010-2014 OPEN CASCADE SAS
// Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
// Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT,
// EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BOPAlgo_PaveFiller_HeaderFile
#define _BOPAlgo_PaveFiller_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <BOPCol_ListOfShape.hxx>
#include <BOPDS_PDS.hxx>
#include <BOPDS_PIterator.hxx>
#include <BOPAlgo_SectionAttribute.hxx>
#include <Standard_Real.hxx>
#include <BOPAlgo_Algo.hxx>
#include <BOPCol_BaseAllocator.hxx>
#include <TopAbs_ShapeEnum.hxx>
#include <Standard_Integer.hxx>
#include <BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks.hxx>
#include <Standard_Boolean.hxx>
#include <BOPCol_MapOfInteger.hxx>
#include <BOPCol_DataMapOfIntegerReal.hxx>
#include <BOPCol_ListOfInteger.hxx>
#include <BOPDS_IndexedMapOfPaveBlock.hxx>
#include <BOPCol_DataMapOfShapeInteger.hxx>
#include <BOPDS_DataMapOfPaveBlockListOfPaveBlock.hxx>
#include <BOPCol_DataMapOfIntegerInteger.hxx>
#include <BOPDS_ListOfPaveBlock.hxx>
#include <IntSurf_ListOfPntOn2S.hxx>
#include <BOPCol_DataMapOfIntegerListOfInteger.hxx>
#include <BOPDS_MapOfPaveBlock.hxx>
#include <BOPCol_IndexedDataMapOfShapeInteger.hxx>
#include <BOPCol_IndexedDataMapOfShapeListOfShape.hxx>
class IntTools_Context;
class BOPDS_DS;
class BOPAlgo_SectionAttribute;
class BOPDS_PaveBlock;
class TopoDS_Vertex;
class gp_Pnt;
class BOPDS_Curve;
class TopoDS_Face;
class BOPAlgo_PaveFiller : public BOPAlgo_Algo
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT BOPAlgo_PaveFiller();
Standard_EXPORT virtual ~BOPAlgo_PaveFiller();
Standard_EXPORT BOPAlgo_PaveFiller(const BOPCol_BaseAllocator& theAllocator);
Standard_EXPORT const BOPDS_DS& DS();
Standard_EXPORT BOPDS_PDS PDS();
Standard_EXPORT const BOPDS_PIterator& Iterator();
Standard_EXPORT void SetArguments (const BOPCol_ListOfShape& theLS);
Standard_EXPORT const BOPCol_ListOfShape& Arguments() const;
Standard_EXPORT Handle(IntTools_Context) Context();
Standard_EXPORT void SetSectionAttribute (const BOPAlgo_SectionAttribute& theSecAttr);
Standard_EXPORT virtual void Perform() Standard_OVERRIDE;
//! Sets the additional tolerance
Standard_EXPORT void SetFuzzyValue (const Standard_Real theFuzz);
//! Returns the additional tolerance
Standard_EXPORT Standard_Real FuzzyValue() const;
protected:
Standard_EXPORT virtual void PerformInternal();
Standard_EXPORT virtual void Clear();
Standard_EXPORT virtual void Init();
Standard_EXPORT void Prepare();
Standard_EXPORT virtual void PerformVV();
Standard_EXPORT virtual void PerformVE();
Standard_EXPORT virtual void PerformVF();
Standard_EXPORT virtual void PerformEE();
Standard_EXPORT virtual void PerformEF();
Standard_EXPORT virtual void PerformFF();
Standard_EXPORT virtual void PerformVZ();
Standard_EXPORT virtual void PerformEZ();
Standard_EXPORT virtual void PerformFZ();
Standard_EXPORT virtual void PerformZZ();
Standard_EXPORT void TreatVerticesEE();
Standard_EXPORT void MakeSplitEdges();
Standard_EXPORT void MakeBlocks();
Standard_EXPORT void MakePCurves();
Standard_EXPORT void ProcessDE();
Standard_EXPORT void FillShrunkData (Handle(BOPDS_PaveBlock)& thePB);
Standard_EXPORT void FillShrunkData (const TopAbs_ShapeEnum theType1, const TopAbs_ShapeEnum theType2);
Standard_EXPORT Standard_Integer PerformVerticesEE (BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks& theMVCPB, BOPCol_BaseAllocator& theAllocator);
Standard_EXPORT Standard_Integer PerformVerticesEF (BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks& theMVCPB, BOPCol_BaseAllocator& theAllocator);
Standard_EXPORT Standard_Boolean CheckFacePaves (const TopoDS_Vertex& theVnew, const BOPCol_MapOfInteger& theMIF);
Standard_EXPORT static Standard_Boolean CheckFacePaves (const Standard_Integer theN, const BOPCol_MapOfInteger& theMIFOn, const BOPCol_MapOfInteger& theMIFIn);
Standard_EXPORT Standard_Boolean IsExistingVertex (const gp_Pnt& theP, const Standard_Real theTol, const BOPCol_MapOfInteger& theMVOn) const;
//! Checks and puts paves from <theMVOn> on the curve <theNC>.
Standard_EXPORT void PutPavesOnCurve (const BOPCol_MapOfInteger& theMVOn, const Standard_Real theTolR3D, BOPDS_Curve& theNC, const Standard_Integer nF1, const Standard_Integer nF2, const BOPCol_MapOfInteger& theMI, const BOPCol_MapOfInteger& theMVEF, BOPCol_DataMapOfIntegerReal& theMVTol);
//! Depending on the parameter aType it checks whether
//! the vertex nV was created in EE or EF intersections.
//! If so, it increases aTolVExt from tolerance value of vertex to
//! the max distance from vertex nV to the ends of the range of common part.
//! Possible values of aType:
//! 1 - checks only EE;
//! 2 - checks only EF;
//! other - checks both types of intersections.
Standard_EXPORT Standard_Boolean ExtendedTolerance (const Standard_Integer nV, const BOPCol_MapOfInteger& aMI, Standard_Real& aTolVExt, const Standard_Integer aType = 0);
Standard_EXPORT void PutBoundPaveOnCurve (const TopoDS_Face& theF1, const TopoDS_Face& theF2, const Standard_Real theTolR3D, BOPDS_Curve& theNC, BOPCol_ListOfInteger& theLBV);
Standard_EXPORT Standard_Boolean IsExistingPaveBlock (const Handle(BOPDS_PaveBlock)& thePB, const BOPDS_Curve& theNC, const Standard_Real theTolR3D, const BOPDS_IndexedMapOfPaveBlock& theMPB, Handle(BOPDS_PaveBlock)& thePBOut);
Standard_EXPORT Standard_Boolean IsExistingPaveBlock (const Handle(BOPDS_PaveBlock)& thePB, const BOPDS_Curve& theNC, const Standard_Real theTolR3D, const BOPCol_ListOfInteger& theLSE);
//! Treatment of section edges.
Standard_EXPORT Standard_Integer PostTreatFF (BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks& theMSCPB, BOPCol_DataMapOfShapeInteger& theMVI, BOPDS_DataMapOfPaveBlockListOfPaveBlock& theDMExEdges, BOPCol_DataMapOfIntegerInteger& theDMI, BOPCol_BaseAllocator& theAllocator);
Standard_EXPORT void FindPaveBlocks (const Standard_Integer theV, const Standard_Integer theF, BOPDS_ListOfPaveBlock& theLPB);
Standard_EXPORT void FillPaves (const Standard_Integer theV, const Standard_Integer theE, const Standard_Integer theF, const BOPDS_ListOfPaveBlock& theLPB, const Handle(BOPDS_PaveBlock)& thePB);
Standard_EXPORT void MakeSplitEdge (const Standard_Integer theV, const Standard_Integer theF);
Standard_EXPORT void GetEFPnts (const Standard_Integer nF1, const Standard_Integer nF2, IntSurf_ListOfPntOn2S& aListOfPnts);
//! Checks and puts paves created in EF intersections on the curve <theNC>.
Standard_EXPORT void PutEFPavesOnCurve (BOPDS_Curve& theNC, const BOPCol_MapOfInteger& theMI, const BOPCol_MapOfInteger& theMVEF, BOPCol_DataMapOfIntegerReal& theMVTol);
//! Puts stick paves on the curve <theNC>
Standard_EXPORT void PutStickPavesOnCurve (const TopoDS_Face& aF1, const TopoDS_Face& aF2, const BOPCol_MapOfInteger& theMI, BOPDS_Curve& theNC, const BOPCol_MapOfInteger& theMVStick, BOPCol_DataMapOfIntegerReal& theMVTol);
//! Collects indices of vertices created in all intersections between
//! two faces (<nF1> and <nF2>) to the map <theMVStick>.
//! Also, it collects indices of EF vertices to the <theMVEF> map
//! and indices of all subshapes of these two faces to the <theMI> map.
Standard_EXPORT void GetStickVertices (const Standard_Integer nF1, const Standard_Integer nF2, BOPCol_MapOfInteger& theMVStick, BOPCol_MapOfInteger& theMVEF, BOPCol_MapOfInteger& theMI);
//! Collects index nF and indices of all subshapes of the shape with index <nF>
//! to the map <theMI>.
Standard_EXPORT void GetFullShapeMap (const Standard_Integer nF, BOPCol_MapOfInteger& theMI);
//! Removes indices of vertices that are already on the
//! curve <theNC> from the map <theMV>.
//! It is used in PutEFPavesOnCurve and PutStickPavesOnCurve methods.
Standard_EXPORT void RemoveUsedVertices (BOPDS_Curve& theNC, BOPCol_MapOfInteger& theMV);
//! Puts the pave nV on the curve theNC.
//! Parameter aType defines whether to check the pave with
//! extended tolerance:
//! 0 - do not perform the check;
//! other - perform the check (aType goes to ExtendedTolerance).
Standard_EXPORT void PutPaveOnCurve (const Standard_Integer nV, const Standard_Real theTolR3D, BOPDS_Curve& theNC, const BOPCol_MapOfInteger& theMI, BOPCol_DataMapOfIntegerReal& theMVTol, const Standard_Integer aType = 0);
//! Adds the existing edges from the map <theMPBOnIn> which interfere
//! with the vertices from <theMVB> map to the post treatment of section edges.
Standard_EXPORT void ProcessExistingPaveBlocks (const Standard_Integer theInt, const BOPDS_IndexedMapOfPaveBlock& theMPBOnIn, const BOPCol_DataMapOfIntegerListOfInteger& theDMBV, BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks& theMSCPB, BOPCol_DataMapOfShapeInteger& theMVI, BOPDS_MapOfPaveBlock& theMPB);
//! Replaces existing pave block <thePB> with new pave blocks <theLPB>.
//! The list <theLPB> contains images of <thePB> which were created in
//! the post treatment of section edges.
Standard_EXPORT void UpdateExistingPaveBlocks (const Handle(BOPDS_PaveBlock)& thePB, BOPDS_ListOfPaveBlock& theLPB, const Standard_Integer nF1, const Standard_Integer nF2);
//! Treatment of vertices that were created in EE intersections.
Standard_EXPORT void TreatNewVertices (const BOPCol_IndexedDataMapOfShapeInteger& theMVI, BOPCol_IndexedDataMapOfShapeListOfShape& theImages);
//! Put paves on the curve <aBC> in case when <aBC>
//! is closed 3D-curve
Standard_EXPORT void PutClosingPaveOnCurve (BOPDS_Curve& aNC);
//! Keeps data for post treatment
Standard_EXPORT void PreparePostTreatFF (const Standard_Integer aInt, const Standard_Integer aCur, const Handle(BOPDS_PaveBlock)& aPB, BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks& aMSCPB, BOPCol_DataMapOfShapeInteger& aMVI, BOPDS_ListOfPaveBlock& aLPB);
//! Refines the state On for the all faces having
//! state information
Standard_EXPORT void RefineFaceInfoOn();
//! Updates the information about faces
Standard_EXPORT void UpdateFaceInfo (BOPDS_DataMapOfPaveBlockListOfPaveBlock& theDME, const BOPCol_DataMapOfIntegerInteger& theDMV);
//! Updates tolerance of vertex with index <nV>
//! to make it interfere with edge
Standard_EXPORT void ForceInterfVE (const Standard_Integer nV, Handle(BOPDS_PaveBlock)& aPB, BOPDS_MapOfPaveBlock& aMPB);
//! Updates tolerance of vertex with index <nV>
//! to make it interfere with face with index <nF>
Standard_EXPORT Standard_Boolean ForceInterfVF (const Standard_Integer nV, const Standard_Integer nF);
//! Checks if there are any common or intersecting sub shapes
//! between two planar faces.
Standard_EXPORT Standard_Boolean CheckPlanes (const Standard_Integer nF1, const Standard_Integer nF2) const;
//! Creates new edge from the edge nE with vertices nV1 and nV2
//! and returns the index of that new edge in the DS.
Standard_EXPORT Standard_Integer SplitEdge (const Standard_Integer nE, const Standard_Integer nV1, const Standard_Real aT1, const Standard_Integer nV2, const Standard_Real aT2);
//! Updates pave blocks which have the paves with indices contained
//! in the map <theDMI>.
Standard_EXPORT void UpdatePaveBlocks (const BOPCol_DataMapOfIntegerInteger& theDMI);
BOPCol_ListOfShape myArguments;
BOPDS_PDS myDS;
BOPDS_PIterator myIterator;
Handle(IntTools_Context) myContext;
BOPAlgo_SectionAttribute mySectionAttribute;
Standard_Real myFuzzyValue;
private:
};
#endif // _BOPAlgo_PaveFiller_HeaderFile

View File

@@ -15,27 +15,28 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BOPAlgo_PaveFiller.ixx>
#include <NCollection_IncAllocator.hxx>
#include <NCollection_BaseAllocator.hxx>
#include <Bnd_Box.hxx>
#include <TopoDS_Vertex.hxx>
#include <BRepBndLib.hxx>
#include <BOPAlgo_PaveFiller.hxx>
#include <BOPAlgo_SectionAttribute.hxx>
#include <BOPAlgo_Tools.hxx>
#include <BOPCol_DataMapOfIntegerListOfInteger.hxx>
#include <BOPCol_MapOfInteger.hxx>
#include <BOPCol_ListOfShape.hxx>
#include <BOPCol_MapOfInteger.hxx>
#include <BOPDS_Curve.hxx>
#include <BOPDS_DS.hxx>
#include <BOPDS_Iterator.hxx>
#include <BOPTools_AlgoTools.hxx>
#include <BOPDS_VectorOfInterfVV.hxx>
#include <BOPDS_PaveBlock.hxx>
#include <BOPDS_ShapeInfo.hxx>
#include <BOPAlgo_Tools.hxx>
#include <BOPDS_VectorOfInterfVV.hxx>
#include <BOPTools_AlgoTools.hxx>
#include <BRepBndLib.hxx>
#include <gp_Pnt.hxx>
#include <IntTools_Context.hxx>
#include <NCollection_BaseAllocator.hxx>
#include <NCollection_IncAllocator.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Vertex.hxx>
//=======================================================================
// function: PerformVV

View File

@@ -15,22 +15,22 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BOPAlgo_PaveFiller.ixx>
#include <gp_Pnt.hxx>
#include <TopAbs_State.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Solid.hxx>
#include <BOPAlgo_PaveFiller.hxx>
#include <BOPAlgo_SectionAttribute.hxx>
#include <BOPDS_Curve.hxx>
#include <BOPDS_DS.hxx>
#include <BOPDS_Interf.hxx>
#include <BOPDS_IteratorSI.hxx>
#include <BOPDS_PaveBlock.hxx>
#include <BRep_Tool.hxx>
#include <BRepClass3d_SolidClassifier.hxx>
#include <gp_Pnt.hxx>
#include <IntTools_Context.hxx>
#include <BOPDS_DS.hxx>
#include <BOPDS_IteratorSI.hxx>
#include <BOPDS_Interf.hxx>
#include <TopAbs_State.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Solid.hxx>
#include <TopoDS_Vertex.hxx>
//=======================================================================
//function : PerformVZ

View File

@@ -15,24 +15,27 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BOPAlgo_PaveFiller.ixx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Edge.hxx>
#include <BRep_Tool.hxx>
#include <BOPAlgo_PaveFiller.hxx>
#include <BOPAlgo_SectionAttribute.hxx>
#include <BOPCol_NCVector.hxx>
#include <BOPCol_Parallel.hxx>
#include <IntTools_Context.hxx>
#include <BOPDS_Iterator.hxx>
#include <BOPDS_VectorOfInterfVE.hxx>
#include <BOPDS_Curve.hxx>
#include <BOPDS_DS.hxx>
#include <BOPDS_Interf.hxx>
#include <BOPDS_PassKey.hxx>
#include <BOPDS_Iterator.hxx>
#include <BOPDS_MapOfPassKey.hxx>
#include <BRepBndLib.hxx>
#include <BOPDS_PassKey.hxx>
#include <BOPDS_PaveBlock.hxx>
#include <BOPDS_VectorOfInterfVE.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <BRepBndLib.hxx>
#include <gp_Pnt.hxx>
#include <IntTools_Context.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Vertex.hxx>
//=======================================================================
//class : BOPAlgo_VertexEdgeEdge

View File

@@ -15,56 +15,59 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BOPAlgo_PaveFiller.ixx>
#include <Precision.hxx>
#include <NCollection_IncAllocator.hxx>
#include <NCollection_UBTreeFiller.hxx>
#include <Bnd_Box.hxx>
#include <GeomAPI_ProjectPointOnCurve.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Compound.hxx>
#include <BRep_Tool.hxx>
#include <BOPAlgo_PaveFiller.hxx>
#include <BOPAlgo_SectionAttribute.hxx>
#include <BOPAlgo_Tools.hxx>
#include <BOPCol_BoxBndTree.hxx>
#include <BOPCol_DataMapOfIntegerShape.hxx>
#include <BOPCol_DataMapOfShapeInteger.hxx>
#include <BOPCol_DataMapOfShapeListOfShape.hxx>
#include <BOPCol_IndexedDataMapOfShapeBox.hxx>
#include <BOPCol_NCVector.hxx>
#include <BOPCol_Parallel.hxx>
#include <BOPDS_CommonBlock.hxx>
#include <BOPDS_CoupleOfPaveBlocks.hxx>
#include <BOPDS_Curve.hxx>
#include <BOPDS_DataMapOfPaveBlockListOfInteger.hxx>
#include <BOPDS_DataMapOfPaveBlockListOfPaveBlock.hxx>
#include <BOPDS_DS.hxx>
#include <BOPDS_Interf.hxx>
#include <BOPDS_Iterator.hxx>
#include <BOPDS_MapOfPaveBlock.hxx>
#include <BOPDS_Pave.hxx>
#include <BOPDS_PaveBlock.hxx>
#include <BOPDS_VectorOfInterfEE.hxx>
#include <BOPTools_AlgoTools.hxx>
#include <BRep_Builder.hxx>
#include <BRepTools.hxx>
#include <BRep_Tool.hxx>
#include <BRepBndLib.hxx>
//
#include <BRepTools.hxx>
#include <GeomAPI_ProjectPointOnCurve.hxx>
#include <gp_Pnt.hxx>
#include <IntTools_CommonPrt.hxx>
#include <IntTools_Context.hxx>
#include <IntTools_EdgeEdge.hxx>
#include <IntTools_Range.hxx>
#include <IntTools_SequenceOfCommonPrts.hxx>
#include <IntTools_CommonPrt.hxx>
#include <IntTools_SequenceOfRanges.hxx>
//
#include <BOPTools_AlgoTools.hxx>
//
#include <BOPCol_DataMapOfShapeInteger.hxx>
#include <BOPCol_DataMapOfShapeListOfShape.hxx>
#include <BOPCol_DataMapOfIntegerShape.hxx>
#include <BOPCol_IndexedDataMapOfShapeBox.hxx>
#include <BOPCol_BoxBndTree.hxx>
#include <BOPCol_NCVector.hxx>
#include <BOPCol_Parallel.hxx>
//
#include <IntTools_Context.hxx>
#include <IntTools_ShrunkRange.hxx>
#include <IntTools_Tools.hxx>
//
#include <BOPDS_DataMapOfPaveBlockListOfPaveBlock.hxx>
#include <BOPDS_MapOfPaveBlock.hxx>
#include <BOPDS_CommonBlock.hxx>
#include <BOPDS_CoupleOfPaveBlocks.hxx>
#include <BOPDS_DataMapOfPaveBlockListOfInteger.hxx>
#include <BOPDS_Iterator.hxx>
#include <BOPDS_VectorOfInterfEE.hxx>
#include <BOPDS_Interf.hxx>
#include <BOPDS_Pave.hxx>
//
#include <BOPAlgo_Tools.hxx>
#include <NCollection_IncAllocator.hxx>
#include <NCollection_UBTreeFiller.hxx>
#include <Precision.hxx>
#include <TopoDS_Compound.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Vertex.hxx>
//
//
//
//
//
//
/////////////////////////////////////////////////////////////////////////
//=======================================================================
//class : BOPAlgo_EdgeEdge

View File

@@ -15,29 +15,35 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BOPAlgo_PaveFiller.ixx>
//
#include <NCollection_IncAllocator.hxx>
//
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Face.hxx>
#include <BRep_Tool.hxx>
#include <BRep_Builder.hxx>
#include <BRepBndLib.hxx>
//
#include <BOPAlgo_PaveFiller.hxx>
#include <BOPAlgo_SectionAttribute.hxx>
#include <BOPCol_MapOfInteger.hxx>
#include <BOPCol_NCVector.hxx>
#include <BOPCol_Parallel.hxx>
//
#include <IntTools_Context.hxx>
//
#include <BOPDS_Iterator.hxx>
#include <BOPDS_VectorOfInterfVF.hxx>
#include <BOPDS_Interf.hxx>
#include <BOPDS_SubIterator.hxx>
#include <BOPDS_MapOfPaveBlock.hxx>
#include <BOPDS_Curve.hxx>
#include <BOPDS_DS.hxx>
#include <BOPDS_FaceInfo.hxx>
#include <BOPDS_Interf.hxx>
#include <BOPDS_Iterator.hxx>
#include <BOPDS_MapOfPaveBlock.hxx>
#include <BOPDS_PaveBlock.hxx>
#include <BOPDS_SubIterator.hxx>
#include <BOPDS_VectorOfInterfVF.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <BRepBndLib.hxx>
#include <gp_Pnt.hxx>
#include <IntTools_Context.hxx>
#include <NCollection_IncAllocator.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Vertex.hxx>
//
//
//
//
//
//=======================================================================
//class : BOPAlgo_VertexFace
//purpose :

View File

@@ -15,47 +15,51 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BOPAlgo_PaveFiller.ixx>
#include <NCollection_IncAllocator.hxx>
//
#include <GeomAPI_ProjectPointOnSurf.hxx>
//
#include <Bnd_Box.hxx>
//
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <BRep_Tool.hxx>
#include <BRepBndLib.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRep_Builder.hxx>
//
#include <IntTools_EdgeFace.hxx>
#include <IntTools_Range.hxx>
#include <IntTools_SequenceOfCommonPrts.hxx>
#include <IntTools_CommonPrt.hxx>
//
#include <BOPAlgo_PaveFiller.hxx>
#include <BOPAlgo_SectionAttribute.hxx>
#include <BOPAlgo_Tools.hxx>
#include <BOPCol_MapOfInteger.hxx>
#include <BOPCol_NCVector.hxx>
#include <BOPCol_Parallel.hxx>
//
#include <IntTools_Context.hxx>
#include <IntTools_Tools.hxx>
//
#include <BOPDS_CommonBlock.hxx>
#include <BOPDS_CoupleOfPaveBlocks.hxx>
#include <BOPDS_Curve.hxx>
#include <BOPDS_DataMapOfPaveBlockListOfInteger.hxx>
#include <BOPDS_DS.hxx>
#include <BOPDS_Interf.hxx>
#include <BOPDS_Iterator.hxx>
#include <BOPDS_PaveBlock.hxx>
#include <BOPDS_MapOfPaveBlock.hxx>
#include <BOPDS_DataMapOfPaveBlockListOfInteger.hxx>
#include <BOPDS_CommonBlock.hxx>
#include <BOPDS_Pave.hxx>
#include <BOPDS_CoupleOfPaveBlocks.hxx>
//
#include <BOPDS_PaveBlock.hxx>
#include <BOPTools_AlgoTools.hxx>
//
#include <BOPAlgo_Tools.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepBndLib.hxx>
#include <GeomAPI_ProjectPointOnSurf.hxx>
#include <gp_Pnt.hxx>
#include <IntTools_CommonPrt.hxx>
#include <IntTools_Context.hxx>
#include <IntTools_EdgeFace.hxx>
#include <IntTools_Range.hxx>
#include <IntTools_SequenceOfCommonPrts.hxx>
#include <IntTools_Tools.hxx>
#include <NCollection_IncAllocator.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Vertex.hxx>
//
//
//
//
//
//
//
//
//
//=======================================================================
//class : BOPAlgo_EdgeFace
//purpose :

View File

@@ -15,83 +15,70 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BOPAlgo_PaveFiller.ixx>
//
#include <Precision.hxx>
#include <NCollection_IncAllocator.hxx>
#include <Bnd_Box.hxx>
#include <Geom_Curve.hxx>
#include <BOPAlgo_PaveFiller.hxx>
#include <BOPAlgo_SectionAttribute.hxx>
#include <BOPAlgo_Tools.hxx>
#include <BOPCol_DataMapOfIntegerReal.hxx>
#include <BOPCol_DataMapOfShapeInteger.hxx>
#include <BOPCol_IndexedMapOfInteger.hxx>
#include <BOPCol_ListOfInteger.hxx>
#include <BOPCol_ListOfShape.hxx>
#include <BOPCol_MapOfInteger.hxx>
#include <BOPCol_NCVector.hxx>
#include <BOPCol_Parallel.hxx>
#include <BOPDS_CommonBlock.hxx>
#include <BOPDS_CoupleOfPaveBlocks.hxx>
#include <BOPDS_Curve.hxx>
#include <BOPDS_DataMapOfPaveBlockListOfPaveBlock.hxx>
#include <BOPDS_DS.hxx>
#include <BOPDS_FaceInfo.hxx>
#include <BOPDS_Interf.hxx>
#include <BOPDS_Iterator.hxx>
#include <BOPDS_ListOfPave.hxx>
#include <BOPDS_ListOfPaveBlock.hxx>
#include <BOPDS_MapOfPaveBlock.hxx>
#include <BOPDS_PaveBlock.hxx>
#include <BOPDS_Point.hxx>
#include <BOPDS_ShapeInfo.hxx>
#include <BOPDS_VectorOfCurve.hxx>
#include <BOPDS_VectorOfPoint.hxx>
#include <BOPTools_AlgoTools.hxx>
#include <BOPTools_AlgoTools3D.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <BRepBndLib.hxx>
#include <BRepBuilderAPI_MakeVertex.hxx>
#include <BRepTools.hxx>
#include <Geom2d_Curve.hxx>
#include <Geom_Curve.hxx>
#include <GeomAPI_ProjectPointOnCurve.hxx>
#include <GeomAPI_ProjectPointOnSurf.hxx>
#include <gp_Pnt.hxx>
#include <IntSurf_ListOfPntOn2S.hxx>
#include <IntSurf_PntOn2S.hxx>
#include <IntTools_Context.hxx>
#include <IntTools_Curve.hxx>
#include <IntTools_EdgeFace.hxx>
#include <IntTools_FaceFace.hxx>
#include <IntTools_PntOn2Faces.hxx>
#include <IntTools_SequenceOfCurves.hxx>
#include <IntTools_SequenceOfPntOn2Faces.hxx>
#include <IntTools_ShrunkRange.hxx>
#include <IntTools_Tools.hxx>
#include <NCollection_IncAllocator.hxx>
#include <Precision.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS_Compound.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Compound.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <BRepBuilderAPI_MakeVertex.hxx>
#include <BRepBndLib.hxx>
#include <BRepTools.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <IntTools_FaceFace.hxx>
#include <IntTools_SequenceOfCurves.hxx>
#include <IntTools_SequenceOfPntOn2Faces.hxx>
#include <IntTools_Curve.hxx>
#include <IntTools_PntOn2Faces.hxx>
#include <IntTools_ShrunkRange.hxx>
#include <IntTools_Context.hxx>
#include <IntTools_Tools.hxx>
#include <IntTools_EdgeFace.hxx>
#include <IntSurf_ListOfPntOn2S.hxx>
#include <IntSurf_PntOn2S.hxx>
#include <BOPTools_AlgoTools.hxx>
#include <BOPTools_AlgoTools3D.hxx>
#include <BOPCol_MapOfInteger.hxx>
#include <BOPCol_ListOfShape.hxx>
#include <BOPCol_DataMapOfShapeInteger.hxx>
#include <BOPCol_ListOfInteger.hxx>
#include <BOPCol_IndexedMapOfInteger.hxx>
#include <BOPCol_DataMapOfIntegerReal.hxx>
#include <BOPCol_NCVector.hxx>
#include <BOPCol_Parallel.hxx>
#include <BOPDS_Interf.hxx>
#include <BOPDS_Iterator.hxx>
#include <BOPDS_Curve.hxx>
#include <BOPDS_Point.hxx>
#include <BOPDS_FaceInfo.hxx>
#include <BOPDS_Curve.hxx>
#include <BOPDS_MapOfPaveBlock.hxx>
#include <BOPDS_PaveBlock.hxx>
#include <BOPDS_VectorOfCurve.hxx>
#include <BOPDS_VectorOfPoint.hxx>
#include <BOPDS_ShapeInfo.hxx>
#include <BOPDS_PaveBlock.hxx>
#include <BOPDS_ListOfPave.hxx>
#include <BOPDS_ListOfPaveBlock.hxx>
#include <BOPDS_CoupleOfPaveBlocks.hxx>
#include <BOPDS_FaceInfo.hxx>
#include <BOPDS_CommonBlock.hxx>
#include <BOPDS_DataMapOfPaveBlockListOfPaveBlock.hxx>
#include <BOPAlgo_Tools.hxx>
//
static void ToleranceFF(const BRepAdaptor_Surface& aBAS1,
const BRepAdaptor_Surface& aBAS2,
Standard_Real& aTolFF);

View File

@@ -15,53 +15,45 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BOPAlgo_PaveFiller.ixx>
#include <NCollection_IncAllocator.hxx>
#include <Geom_RectangularTrimmedSurface.hxx>
#include <Geom_Plane.hxx>
#include <Geom_Surface.hxx>
#include <Geom_RectangularTrimmedSurface.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <BRepBndLib.hxx>
#include <BRep_Tool.hxx>
#include <BRep_Builder.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <Geom_Curve.hxx>
#include <Geom_Surface.hxx>
#include <Geom2d_Curve.hxx>
#include <BOPAlgo_PaveFiller.hxx>
#include <BOPAlgo_SectionAttribute.hxx>
#include <BOPCol_MapOfShape.hxx>
#include <BOPCol_NCVector.hxx>
#include <BOPCol_Parallel.hxx>
#include <BOPCol_MapOfShape.hxx>
#include <BOPDS_VectorOfListOfPaveBlock.hxx>
#include <BOPDS_ListOfPaveBlock.hxx>
#include <BOPDS_PaveBlock.hxx>
#include <BOPDS_CommonBlock.hxx>
#include <BOPDS_Pave.hxx>
#include <BOPDS_ShapeInfo.hxx>
#include <BOPDS_MapOfPaveBlock.hxx>
#include <BOPDS_VectorOfInterfFF.hxx>
#include <BOPDS_Curve.hxx>
#include <BOPDS_DS.hxx>
#include <BOPDS_FaceInfo.hxx>
#include <BOPDS_Interf.hxx>
#include <BOPDS_Iterator.hxx>
#include <BOPDS_ListOfPaveBlock.hxx>
#include <BOPDS_MapOfPaveBlock.hxx>
#include <BOPDS_Pave.hxx>
#include <BOPDS_PaveBlock.hxx>
#include <BOPDS_ShapeInfo.hxx>
#include <BOPDS_VectorOfCurve.hxx>
#include <BOPDS_VectorOfFaceInfo.hxx>
#include <BOPDS_FaceInfo.hxx>
#include <BOPDS_MapOfPaveBlock.hxx>
#include <BOPDS_Curve.hxx>
#include <BOPDS_Iterator.hxx>
#include <BOPDS_VectorOfInterfFF.hxx>
#include <BOPDS_VectorOfListOfPaveBlock.hxx>
#include <BOPTools_AlgoTools.hxx>
#include <BOPTools_AlgoTools2D.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <BRepBndLib.hxx>
#include <Geom2d_Curve.hxx>
#include <Geom_Curve.hxx>
#include <Geom_Plane.hxx>
#include <Geom_RectangularTrimmedSurface.hxx>
#include <Geom_Surface.hxx>
#include <gp_Pnt.hxx>
#include <IntTools_Context.hxx>
#include <NCollection_IncAllocator.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Vertex.hxx>
static
Standard_Boolean IsBasedOnPlane(const TopoDS_Face& aF);

View File

@@ -15,39 +15,35 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BOPAlgo_PaveFiller.ixx>
#include <Precision.hxx>
#include <NCollection_IncAllocator.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Lin2d.hxx>
#include <ElCLib.hxx>
#include <IntRes2d_IntersectionPoint.hxx>
#include <Geom2d_Curve.hxx>
#include <Geom2d_TrimmedCurve.hxx>
#include <Geom2d_Line.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dInt_GInter.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Vertex.hxx>
#include <BRep_Tool.hxx>
#include <BRep_Builder.hxx>
#include <BOPAlgo_PaveFiller.hxx>
#include <BOPAlgo_SectionAttribute.hxx>
#include <BOPCol_ListOfInteger.hxx>
#include <BOPDS_ShapeInfo.hxx>
#include <BOPDS_Curve.hxx>
#include <BOPDS_DS.hxx>
#include <BOPDS_FaceInfo.hxx>
#include <BOPDS_MapOfPaveBlock.hxx>
#include <BOPDS_PaveBlock.hxx>
#include <BOPDS_Pave.hxx>
#include <BOPDS_PaveBlock.hxx>
#include <BOPDS_ShapeInfo.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <ElCLib.hxx>
#include <Geom2d_Curve.hxx>
#include <Geom2d_Line.hxx>
#include <Geom2d_TrimmedCurve.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dInt_GInter.hxx>
#include <gp_Lin2d.hxx>
#include <gp_Pnt.hxx>
#include <gp_Pnt2d.hxx>
#include <IntRes2d_IntersectionPoint.hxx>
#include <IntTools_Context.hxx>
#include <NCollection_IncAllocator.hxx>
#include <Precision.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Vertex.hxx>
static
void MakeSplitEdge1 (const TopoDS_Edge& aE,

View File

@@ -12,24 +12,27 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BOPAlgo_PaveFiller.ixx>
//
#include <Bnd_Box.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Vertex.hxx>
#include <BOPCol_NCVector.hxx>
#include <BOPAlgo_PaveFiller.hxx>
#include <BOPAlgo_SectionAttribute.hxx>
#include <BOPCol_MapOfInteger.hxx>
#include <BOPCol_NCVector.hxx>
#include <BOPCol_Parallel.hxx>
#include <BOPDS_ShapeInfo.hxx>
#include <BOPDS_PaveBlock.hxx>
#include <BOPDS_Curve.hxx>
#include <BOPDS_DS.hxx>
#include <BOPDS_Iterator.hxx>
#include <BOPDS_ListOfPaveBlock.hxx>
#include <BOPDS_PaveBlock.hxx>
#include <BOPDS_ShapeInfo.hxx>
#include <gp_Pnt.hxx>
#include <IntTools_Context.hxx>
#include <IntTools_ShrunkRange.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Vertex.hxx>
//
//=======================================================================
//class : BOPAlgo_ShrunkRange
//purpose :

View File

@@ -1,75 +0,0 @@
-- Created by: Peter KURNEV
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class Section from BOPAlgo
inherits Builder from BOPAlgo
---Purpose:
-- The algorithm to build a Secton between the arguments.
-- The Section consists of vertices and edges.
-- The Section contains:
-- 1. new vertices that are subjects of V/V, E/E, E/F, F/F interferences
-- 2. vertices that are subjects of V/E, V/F interferences
-- 3. new edges that are subjects of F/F interferences
-- 4. edges that are Common Blocks
-- The vertex is included in Section only when it is not shared
-- between the edges above
uses
ShapeEnum from TopAbs,
Shape from TopoDS,
ListOfShape from TopTools,
BaseAllocator from BOPCol,
PaveFiller from BOPAlgo
--raises
is
Create
returns Section from BOPAlgo;
---C++: alias "Standard_EXPORT virtual ~BOPAlgo_Section();"
---Purpose: Empty constructor
Create (theAllocator: BaseAllocator from BOPCol)
returns Section from BOPAlgo;
---Purpose: Empty constructor
--
-- protected methods
--
CheckData(me:out)
is redefined protected;
---Purpose:
PerformInternal1(me:out;
thePF:PaveFiller from BOPAlgo)
is redefined protected;
---Purpose: Performs calculations using prepared Filler
-- object <thePF>
BuildSection(me:out)
is virtual;
--
-- History
--
Generated (me:out;
theS : Shape from TopoDS)
returns ListOfShape from TopTools
is redefined;
---C++: return const &
---Purpose: Returns the list of shapes generated from the
-- shape theS.
end Section;

View File

@@ -12,42 +12,38 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BOPAlgo_Section.ixx>
#include <NCollection_IncAllocator.hxx>
#include <TopAbs_ShapeEnum.hxx>
#include <TopoDS_Compound.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopoDS_Edge.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <TopExp_Explorer.hxx>
#include <BOPAlgo_BuilderSolid.hxx>
#include <BOPAlgo_PaveFiller.hxx>
#include <BOPAlgo_Section.hxx>
#include <BOPCol_DataMapOfShapeShape.hxx>
#include <BOPCol_IndexedDataMapOfShapeListOfShape.hxx>
#include <BOPCol_IndexedMapOfShape.hxx>
#include <BOPCol_ListOfShape.hxx>
#include <BOPCol_MapOfShape.hxx>
#include <BOPCol_IndexedMapOfShape.hxx>
#include <BOPCol_IndexedDataMapOfShapeListOfShape.hxx>
#include <BOPCol_DataMapOfShapeShape.hxx>
#include <BOPDS_DS.hxx>
#include <BOPDS_PaveBlock.hxx>
#include <BOPDS_CommonBlock.hxx>
#include <BOPDS_DS.hxx>
#include <BOPDS_FaceInfo.hxx>
#include <BOPDS_ListOfPaveBlock.hxx>
#include <BOPDS_MapOfPaveBlock.hxx>
#include <BOPDS_VectorOfListOfPaveBlock.hxx>
#include <BOPDS_PaveBlock.hxx>
#include <BOPDS_VectorOfFaceInfo.hxx>
//
#include <BOPDS_VectorOfListOfPaveBlock.hxx>
#include <BOPTools.hxx>
#include <BOPTools_AlgoTools.hxx>
#include <BOPTools_AlgoTools3D.hxx>
#include <BOPTools_AlgoTools.hxx>
//
#include <BOPAlgo_BuilderSolid.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <NCollection_IncAllocator.hxx>
#include <TopAbs_ShapeEnum.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS_Compound.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopoDS_Shape.hxx>
//
//
//=======================================================================
//function :
//purpose :

View File

@@ -0,0 +1,88 @@
// Created by: Peter KURNEV
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BOPAlgo_Section_HeaderFile
#define _BOPAlgo_Section_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <BOPAlgo_Builder.hxx>
#include <BOPCol_BaseAllocator.hxx>
#include <TopTools_ListOfShape.hxx>
class BOPAlgo_PaveFiller;
class TopoDS_Shape;
//! The algorithm to build a Secton between the arguments.
//! The Section consists of vertices and edges.
//! The Section contains:
//! 1. new vertices that are subjects of V/V, E/E, E/F, F/F interferences
//! 2. vertices that are subjects of V/E, V/F interferences
//! 3. new edges that are subjects of F/F interferences
//! 4. edges that are Common Blocks
class BOPAlgo_Section : public BOPAlgo_Builder
{
public:
DEFINE_STANDARD_ALLOC
//! Empty constructor
Standard_EXPORT BOPAlgo_Section();
Standard_EXPORT virtual ~BOPAlgo_Section();
//! Empty constructor
//!
//! protected methods
Standard_EXPORT BOPAlgo_Section(const BOPCol_BaseAllocator& theAllocator);
Standard_EXPORT virtual void BuildSection();
//! Returns the list of shapes generated from the
//! shape theS.
Standard_EXPORT virtual const TopTools_ListOfShape& Generated (const TopoDS_Shape& theS) Standard_OVERRIDE;
protected:
Standard_EXPORT virtual void CheckData() Standard_OVERRIDE;
//! Performs calculations using prepared Filler
//! object <thePF>
Standard_EXPORT virtual void PerformInternal1 (const BOPAlgo_PaveFiller& thePF) Standard_OVERRIDE;
private:
};
#endif // _BOPAlgo_Section_HeaderFile

View File

@@ -1,71 +0,0 @@
-- Created on: 2002-03-04
-- Created by: Michael KLOKOV
-- Copyright (c) 2002-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class SectionAttribute from BOPAlgo
---Purpose: Class is a container of three flags used
--- by intersection algorithm
---
is
Create(Aproximation : Boolean from Standard = Standard_True;
PCurveOnS1 : Boolean from Standard = Standard_True;
PCurveOnS2 : Boolean from Standard = Standard_True)
returns SectionAttribute from BOPAlgo;
---Purpose:
--- Initializes me by flags
Approximation(me: in out; theFlag: Boolean from Standard);
---Purpose:
--- Modifier
---
PCurveOnS1(me: in out; theFlag: Boolean from Standard);
---Purpose:
--- Modifier
---
PCurveOnS2(me: in out; theFlag: Boolean from Standard);
---Purpose:
--- Modifier
---
Approximation(me)
returns Boolean from Standard;
---C++: inline
---Purpose:
--- Selector
---
PCurveOnS1(me)
returns Boolean from Standard;
---C++: inline
---Purpose:
--- Selector
---
PCurveOnS2(me)
returns Boolean from Standard;
---C++: inline
---Purpose:
--- Selector
---
fields
myApproximation : Boolean from Standard;
myPCurve1 : Boolean from Standard;
myPCurve2 : Boolean from Standard;
end SectionAttribute from BOPAlgo;

View File

@@ -13,7 +13,9 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BOPAlgo_SectionAttribute.ixx>
#include <BOPAlgo_SectionAttribute.hxx>
//=======================================================================
// function: BOPAlgo_SectionAttribute
// purpose:

View File

@@ -0,0 +1,90 @@
// Created on: 2002-03-04
// Created by: Michael KLOKOV
// Copyright (c) 2002-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BOPAlgo_SectionAttribute_HeaderFile
#define _BOPAlgo_SectionAttribute_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Boolean.hxx>
//! Class is a container of three flags used
//! by intersection algorithm
class BOPAlgo_SectionAttribute
{
public:
DEFINE_STANDARD_ALLOC
//! Initializes me by flags
Standard_EXPORT BOPAlgo_SectionAttribute(const Standard_Boolean Aproximation = Standard_True, const Standard_Boolean PCurveOnS1 = Standard_True, const Standard_Boolean PCurveOnS2 = Standard_True);
//! Modifier
Standard_EXPORT void Approximation (const Standard_Boolean theFlag);
//! Modifier
Standard_EXPORT void PCurveOnS1 (const Standard_Boolean theFlag);
//! Modifier
Standard_EXPORT void PCurveOnS2 (const Standard_Boolean theFlag);
//! Selector
Standard_Boolean Approximation() const;
//! Selector
Standard_Boolean PCurveOnS1() const;
//! Selector
Standard_Boolean PCurveOnS2() const;
protected:
private:
Standard_Boolean myApproximation;
Standard_Boolean myPCurve1;
Standard_Boolean myPCurve2;
};
#include <BOPAlgo_SectionAttribute.lxx>
#endif // _BOPAlgo_SectionAttribute_HeaderFile

View File

@@ -1,73 +0,0 @@
-- Created by: Peter KURNEV
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class ShellSplitter from BOPAlgo
inherits Algo from BOPAlgo
---Purpose:
-- The class provides the splitting of the set of connected faces
-- on separate loops
uses
BaseAllocator from BOPCol,
Shape from TopoDS,
ListOfShape from BOPCol,
ConnexityBlock from BOPTools,
ListOfConnexityBlock from BOPTools
--raises
is
Create
returns ShellSplitter from BOPAlgo;
---C++: alias "Standard_EXPORT virtual ~BOPAlgo_ShellSplitter();"
---Purpose: empty constructor
Create(theAllocator: BaseAllocator from BOPCol)
returns ShellSplitter from BOPAlgo;
---Purpose: constructor
AddStartElement(me:out;
theS: Shape from TopoDS);
---Purpose: adds a face <theS> to process
StartElements(me)
returns ListOfShape from BOPCol;
---C++: return const &
---Purpose: return the faces to process
Perform(me:out)
is redefined;
---Purpose: performs the algorithm
Shells(me)
returns ListOfShape from BOPCol;
---C++: return const &
---Purpose: returns the loops
MakeConnexityBlocks(me:out)
is protected;
MakeShells (me:out)
is protected;
SplitBlock(myclass;
theCB:out ConnexityBlock from BOPTools);
fields
myStartShapes: ListOfShape from BOPCol is protected;
myShells: ListOfShape from BOPCol is protected;
myLCB : ListOfConnexityBlock from BOPTools is protected;
end ShellSplitter;

View File

@@ -15,28 +15,27 @@
// File: BOPAlgo_ShellSplitter.cxx
// Created: Thu Jan 16 08:33:50 2014
#include <BOPAlgo_ShellSplitter.ixx>
//
#include <TopoDS_Shape.hxx>
#include <TopoDS_Shell.hxx>
#include <TopoDS_Edge.hxx>
#include <BRep_Builder.hxx>
#include <TopExp_Explorer.hxx>
//
#include <BOPCol_Parallel.hxx>
#include <BOPCol_IndexedMapOfShape.hxx>
#include <BOPCol_MapOfShape.hxx>
#include <BOPCol_MapOfOrientedShape.hxx>
#include <BOPCol_NCVector.hxx>
#include <BOPAlgo_ShellSplitter.hxx>
#include <BOPCol_IndexedDataMapOfShapeListOfShape.hxx>
//
#include <IntTools_Context.hxx>
//
#include <BOPCol_IndexedMapOfShape.hxx>
#include <BOPCol_MapOfOrientedShape.hxx>
#include <BOPCol_MapOfShape.hxx>
#include <BOPCol_NCVector.hxx>
#include <BOPCol_Parallel.hxx>
#include <BOPTools.hxx>
#include <BOPTools_AlgoTools.hxx>
#include <BOPTools_CoupleOfShape.hxx>
#include <BRep_Builder.hxx>
#include <IntTools_Context.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Shell.hxx>
//
//
//
//
//
static
void MakeShell(const BOPCol_ListOfShape& ,

View File

@@ -0,0 +1,91 @@
// Created by: Peter KURNEV
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BOPAlgo_ShellSplitter_HeaderFile
#define _BOPAlgo_ShellSplitter_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <BOPCol_ListOfShape.hxx>
#include <BOPTools_ListOfConnexityBlock.hxx>
#include <BOPAlgo_Algo.hxx>
#include <BOPCol_BaseAllocator.hxx>
#include <BOPTools_ConnexityBlock.hxx>
class TopoDS_Shape;
//! The class provides the splitting of the set of connected faces
//! on separate loops
class BOPAlgo_ShellSplitter : public BOPAlgo_Algo
{
public:
DEFINE_STANDARD_ALLOC
//! empty constructor
Standard_EXPORT BOPAlgo_ShellSplitter();
Standard_EXPORT virtual ~BOPAlgo_ShellSplitter();
//! constructor
Standard_EXPORT BOPAlgo_ShellSplitter(const BOPCol_BaseAllocator& theAllocator);
//! adds a face <theS> to process
Standard_EXPORT void AddStartElement (const TopoDS_Shape& theS);
//! return the faces to process
Standard_EXPORT const BOPCol_ListOfShape& StartElements() const;
//! performs the algorithm
Standard_EXPORT virtual void Perform() Standard_OVERRIDE;
//! returns the loops
Standard_EXPORT const BOPCol_ListOfShape& Shells() const;
Standard_EXPORT static void SplitBlock (BOPTools_ConnexityBlock& theCB);
protected:
Standard_EXPORT void MakeConnexityBlocks();
Standard_EXPORT void MakeShells();
BOPCol_ListOfShape myStartShapes;
BOPCol_ListOfShape myShells;
BOPTools_ListOfConnexityBlock myLCB;
private:
};
#endif // _BOPAlgo_ShellSplitter_HeaderFile

View File

@@ -1,74 +0,0 @@
-- Created by: Peter KURNEV
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class Tools from BOPAlgo
---Purpose:
uses
BaseAllocator from BOPCol,
IndexedDataMapOfIntegerListOfInteger from BOPCol,
DataMapOfIntegerListOfInteger from BOPCol,
PDS from BOPDS,
PaveBlock from BOPDS,
IndexedDataMapOfPaveBlockListOfInteger from BOPDS,
IndexedDataMapOfPaveBlockListOfPaveBlock from BOPDS,
DataMapOfIntegerListOfPaveBlock from BOPDS
--raises
is
---
--- static methods
---
MakeBlocksCnx(myclass;
theMILI :IndexedDataMapOfIntegerListOfInteger from BOPCol;
theMBlocks :out DataMapOfIntegerListOfInteger from BOPCol;
theAllocator:out BaseAllocator from BOPCol);
MakeBlocks(myclass;
theMILI :IndexedDataMapOfPaveBlockListOfPaveBlock from BOPDS;
theMBlocks :out DataMapOfIntegerListOfPaveBlock from BOPDS;
theAllocator:out BaseAllocator from BOPCol);
PerformCommonBlocks(myclass;
theMBlocks :out IndexedDataMapOfPaveBlockListOfPaveBlock from BOPDS;
theAllocator:out BaseAllocator from BOPCol;
pDS: out PDS from BOPDS);
FillMap(myclass;
tneN1:Integer from Standard;
tneN2:Integer from Standard;
theMILI : out IndexedDataMapOfIntegerListOfInteger from BOPCol;
theAllocator: out BaseAllocator from BOPCol);
FillMap(myclass;
tnePB1:PaveBlock from BOPDS;
tnePB2:PaveBlock from BOPDS;
theMILI : out IndexedDataMapOfPaveBlockListOfPaveBlock from BOPDS;
theAllocator: out BaseAllocator from BOPCol);
FillMap(myclass;
tnePB1:PaveBlock from BOPDS;
tneF:Integer from Standard;
theMILI : out IndexedDataMapOfPaveBlockListOfInteger from BOPDS;
theAllocator: out BaseAllocator from BOPCol);
PerformCommonBlocks(myclass;
theMBlocks :IndexedDataMapOfPaveBlockListOfInteger from BOPDS;
theAllocator:out BaseAllocator from BOPCol;
pDS: out PDS from BOPDS);
--fields
end Tools;

View File

@@ -12,13 +12,15 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BOPAlgo_Tools.ixx>
#include <BOPDS_DS.hxx>
#include <BOPDS_MapOfPaveBlock.hxx>
#include <BOPDS_IndexedMapOfPaveBlock.hxx>
#include <BOPAlgo_Tools.hxx>
#include <BOPCol_IndexedMapOfInteger.hxx>
#include <BOPDS_CommonBlock.hxx>
#include <BOPDS_DataMapOfPaveBlockListOfPaveBlock.hxx>
#include <BOPCol_IndexedMapOfInteger.hxx>
#include <BOPDS_DS.hxx>
#include <BOPDS_IndexedMapOfPaveBlock.hxx>
#include <BOPDS_MapOfPaveBlock.hxx>
#include <BOPDS_PaveBlock.hxx>
//=======================================================================
//function : MakeBlocksCnx

View File

@@ -0,0 +1,78 @@
// Created by: Peter KURNEV
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BOPAlgo_Tools_HeaderFile
#define _BOPAlgo_Tools_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <BOPCol_IndexedDataMapOfIntegerListOfInteger.hxx>
#include <BOPCol_DataMapOfIntegerListOfInteger.hxx>
#include <BOPCol_BaseAllocator.hxx>
#include <BOPDS_IndexedDataMapOfPaveBlockListOfPaveBlock.hxx>
#include <BOPDS_DataMapOfIntegerListOfPaveBlock.hxx>
#include <BOPDS_PDS.hxx>
#include <Standard_Integer.hxx>
#include <BOPDS_IndexedDataMapOfPaveBlockListOfInteger.hxx>
class BOPDS_PaveBlock;
class BOPAlgo_Tools
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT static void MakeBlocksCnx (const BOPCol_IndexedDataMapOfIntegerListOfInteger& theMILI, BOPCol_DataMapOfIntegerListOfInteger& theMBlocks, BOPCol_BaseAllocator& theAllocator);
Standard_EXPORT static void MakeBlocks (const BOPDS_IndexedDataMapOfPaveBlockListOfPaveBlock& theMILI, BOPDS_DataMapOfIntegerListOfPaveBlock& theMBlocks, BOPCol_BaseAllocator& theAllocator);
Standard_EXPORT static void PerformCommonBlocks (BOPDS_IndexedDataMapOfPaveBlockListOfPaveBlock& theMBlocks, BOPCol_BaseAllocator& theAllocator, BOPDS_PDS& pDS);
Standard_EXPORT static void FillMap (const Standard_Integer tneN1, const Standard_Integer tneN2, BOPCol_IndexedDataMapOfIntegerListOfInteger& theMILI, BOPCol_BaseAllocator& theAllocator);
Standard_EXPORT static void FillMap (const Handle(BOPDS_PaveBlock)& tnePB1, const Handle(BOPDS_PaveBlock)& tnePB2, BOPDS_IndexedDataMapOfPaveBlockListOfPaveBlock& theMILI, BOPCol_BaseAllocator& theAllocator);
Standard_EXPORT static void FillMap (const Handle(BOPDS_PaveBlock)& tnePB1, const Standard_Integer tneF, BOPDS_IndexedDataMapOfPaveBlockListOfInteger& theMILI, BOPCol_BaseAllocator& theAllocator);
Standard_EXPORT static void PerformCommonBlocks (const BOPDS_IndexedDataMapOfPaveBlockListOfInteger& theMBlocks, BOPCol_BaseAllocator& theAllocator, BOPDS_PDS& pDS);
protected:
private:
};
#endif // _BOPAlgo_Tools_HeaderFile

View File

@@ -1,75 +0,0 @@
-- Created by: Peter KURNEV
-- Copyright (c) 2010-2014 OPEN CASCADE SAS
-- Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
-- Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT,
-- EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class WireEdgeSet from BOPAlgo
---Purpose:
uses
Face from TopoDS,
Shape from TopoDS,
ListOfShape from BOPCol,
BaseAllocator from BOPCol
--raises
is
Create
returns WireEdgeSet from BOPAlgo;
---C++: inline
---C++: alias " virtual ~BOPAlgo_WireEdgeSet();"
Create (theAllocator: BaseAllocator from BOPCol)
returns WireEdgeSet from BOPAlgo;
---C++: inline
Clear(me:out);
---C++: inline
SetFace(me:out;
aF:Face from TopoDS);
---C++: inline
Face(me)
returns Face from TopoDS;
---C++: return const &
---C++: inline
AddStartElement(me:out;
sS: Shape from TopoDS);
---C++: inline
StartElements(me)
returns ListOfShape from BOPCol;
---C++: return const &
---C++: inline
AddShape(me:out;
sS:Shape from TopoDS);
---C++: inline
Shapes(me)
returns ListOfShape from BOPCol;
---C++: return const &
---C++: inline
fields
myFace : Face from TopoDS is protected;
myStartShapes : ListOfShape from BOPCol is protected;
myShapes : ListOfShape from BOPCol is protected;
end WireEdgeSet;

View File

@@ -15,4 +15,7 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BOPAlgo_WireEdgeSet.ixx>
#include <BOPAlgo_WireEdgeSet.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Shape.hxx>

View File

@@ -0,0 +1,86 @@
// Created by: Peter KURNEV
// Copyright (c) 2010-2014 OPEN CASCADE SAS
// Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
// Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT,
// EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BOPAlgo_WireEdgeSet_HeaderFile
#define _BOPAlgo_WireEdgeSet_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <TopoDS_Face.hxx>
#include <BOPCol_ListOfShape.hxx>
#include <BOPCol_BaseAllocator.hxx>
class TopoDS_Face;
class TopoDS_Shape;
class BOPAlgo_WireEdgeSet
{
public:
DEFINE_STANDARD_ALLOC
BOPAlgo_WireEdgeSet();
virtual ~BOPAlgo_WireEdgeSet();
BOPAlgo_WireEdgeSet(const BOPCol_BaseAllocator& theAllocator);
void Clear();
void SetFace (const TopoDS_Face& aF);
const TopoDS_Face& Face() const;
void AddStartElement (const TopoDS_Shape& sS);
const BOPCol_ListOfShape& StartElements() const;
void AddShape (const TopoDS_Shape& sS);
const BOPCol_ListOfShape& Shapes() const;
protected:
TopoDS_Face myFace;
BOPCol_ListOfShape myStartShapes;
BOPCol_ListOfShape myShapes;
private:
};
#include <BOPAlgo_WireEdgeSet.lxx>
#endif // _BOPAlgo_WireEdgeSet_HeaderFile

View File

@@ -1,78 +0,0 @@
-- Created by: Peter KURNEV
-- Copyright (c) 1999-2012 OPEN CASCADE SAS
--
-- The content of this file is subject to the Open CASCADE Technology Public
-- License Version 6.5 (the "License"). You may not use the content of this file
-- except in compliance with the License. Please obtain a copy of the License
-- at http://www.opencascade.org and read it completely before using this file.
--
-- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
--
-- The Original Code and all software distributed under the License is
-- distributed on an "AS IS" basis, without warranty of any kind, and the
-- Initial Developer hereby disclaims all such warranties, including without
-- limitation, any warranties of merchantability, fitness for a particular
-- purpose or non-infringement. Please see the License for the specific terms
-- and conditions governing the rights and limitations under the License.
class WireSplitter from BOPAlgo
inherits Algo from BOPAlgo
---Purpose:
uses
Wire from TopoDS,
Face from TopoDS,
BaseAllocator from BOPCol,
ListOfShape from BOPCol,
WireEdgeSet from BOPAlgo,
PWireEdgeSet from BOPAlgo,
ConnexityBlock from BOPTools,
ListOfConnexityBlock from BOPTools
--raises
is
Create
returns WireSplitter from BOPAlgo;
---C++: alias "Standard_EXPORT virtual ~BOPAlgo_WireSplitter();"
Create(theAllocator: BaseAllocator from BOPCol)
returns WireSplitter from BOPAlgo;
SetWES(me:out;
theWES: WireEdgeSet from BOPAlgo);
WES(me:out)
returns WireEdgeSet from BOPAlgo;
---C++: return &
Perform(me:out)
is redefined;
MakeWire(myclass;
theLE:out ListOfShape from BOPCol;
theW :out Wire from TopoDS);
---C++: inline
CheckData(me:out)
is redefined protected;
MakeConnexityBlocks(me:out)
is protected;
MakeWires(me:out)
is protected;
SplitBlock(myclass;
theF :Face from TopoDS;
theCB:out ConnexityBlock from BOPTools);
fields
myWES : PWireEdgeSet from BOPAlgo is protected;
myLCB : ListOfConnexityBlock from BOPTools is protected;
end WireSplitter;

View File

@@ -13,26 +13,24 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BOPAlgo_WireSplitter.ixx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Wire.hxx>
#include <BRep_Tool.hxx>
#include <BRep_Builder.hxx>
#include <BOPCol_ListOfShape.hxx>
#include <BOPCol_IndexedMapOfShape.hxx>
#include <BOPCol_MapOfShape.hxx>
#include <BOPAlgo_WireEdgeSet.hxx>
#include <BOPAlgo_WireSplitter.hxx>
#include <BOPCol_IndexedDataMapOfShapeListOfShape.hxx>
#include <BOPCol_Parallel.hxx>
#include <BOPCol_IndexedMapOfShape.hxx>
#include <BOPCol_ListOfShape.hxx>
#include <BOPCol_MapOfShape.hxx>
#include <BOPCol_NCVector.hxx>
#include <BOPCol_Parallel.hxx>
#include <BOPTools.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Wire.hxx>
//=======================================================================
//function :

View File

@@ -0,0 +1,92 @@
// Created by: Peter KURNEV
// Copyright (c) 1999-2012 OPEN CASCADE SAS
//
// The content of this file is subject to the Open CASCADE Technology Public
// License Version 6.5 (the "License"). You may not use the content of this file
// except in compliance with the License. Please obtain a copy of the License
// at http://www.opencascade.org and read it completely before using this file.
//
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
//
// The Original Code and all software distributed under the License is
// distributed on an "AS IS" basis, without warranty of any kind, and the
// Initial Developer hereby disclaims all such warranties, including without
// limitation, any warranties of merchantability, fitness for a particular
// purpose or non-infringement. Please see the License for the specific terms
// and conditions governing the rights and limitations under the License.
#ifndef _BOPAlgo_WireSplitter_HeaderFile
#define _BOPAlgo_WireSplitter_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <BOPAlgo_PWireEdgeSet.hxx>
#include <BOPTools_ListOfConnexityBlock.hxx>
#include <BOPAlgo_Algo.hxx>
#include <BOPCol_BaseAllocator.hxx>
#include <BOPCol_ListOfShape.hxx>
#include <BOPTools_ConnexityBlock.hxx>
class BOPAlgo_WireEdgeSet;
class TopoDS_Wire;
class TopoDS_Face;
class BOPAlgo_WireSplitter : public BOPAlgo_Algo
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT BOPAlgo_WireSplitter();
Standard_EXPORT virtual ~BOPAlgo_WireSplitter();
Standard_EXPORT BOPAlgo_WireSplitter(const BOPCol_BaseAllocator& theAllocator);
Standard_EXPORT void SetWES (const BOPAlgo_WireEdgeSet& theWES);
Standard_EXPORT BOPAlgo_WireEdgeSet& WES();
Standard_EXPORT virtual void Perform() Standard_OVERRIDE;
static void MakeWire (BOPCol_ListOfShape& theLE, TopoDS_Wire& theW);
Standard_EXPORT static void SplitBlock (const TopoDS_Face& theF, BOPTools_ConnexityBlock& theCB);
protected:
Standard_EXPORT virtual void CheckData() Standard_OVERRIDE;
Standard_EXPORT void MakeConnexityBlocks();
Standard_EXPORT void MakeWires();
BOPAlgo_PWireEdgeSet myWES;
BOPTools_ListOfConnexityBlock myLCB;
private:
};
#include <BOPAlgo_WireSplitter.lxx>
#endif // _BOPAlgo_WireSplitter_HeaderFile

View File

@@ -12,50 +12,43 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BOPAlgo_WireSplitter.ixx>
#include <Precision.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Vec2d.hxx>
#include <gp_Dir2d.hxx>
#include <Geom_Surface.hxx>
#include <Geom_Plane.hxx>
#include <Geom_RectangularTrimmedSurface.hxx>
#include <BOPAlgo_WireEdgeSet.hxx>
#include <BOPAlgo_WireSplitter.hxx>
#include <BOPCol_DataMapOfShapeInteger.hxx>
#include <BOPCol_IndexedDataMapOfShapeListOfShape.hxx>
#include <BOPCol_ListOfShape.hxx>
#include <BOPCol_MapOfShape.hxx>
#include <BOPCol_SequenceOfPnt2d.hxx>
#include <BOPCol_SequenceOfReal.hxx>
#include <BOPCol_SequenceOfShape.hxx>
#include <BOPTools_AlgoTools2D.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <Geom2d_Curve.hxx>
#include <Geom2d_Line.hxx>
#include <GeomAdaptor_Surface.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dInt_GInter.hxx>
#include <Geom_Plane.hxx>
#include <Geom_RectangularTrimmedSurface.hxx>
#include <Geom_Surface.hxx>
#include <GeomAdaptor_Surface.hxx>
#include <gp_Dir2d.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Vec2d.hxx>
#include <IntRes2d_Domain.hxx>
#include <IntRes2d_IntersectionPoint.hxx>
#include <TopLoc_Location.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Wire.hxx>
#include <TopoDS_Iterator.hxx>
#include <BRep_Tool.hxx>
#include <BRep_Builder.hxx>
#include <TopTools_ShapeMapHasher.hxx>
#include <Precision.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <BOPCol_ListOfShape.hxx>
#include <BOPCol_SequenceOfShape.hxx>
#include <BOPCol_SequenceOfPnt2d.hxx>
#include <BOPCol_IndexedDataMapOfShapeListOfShape.hxx>
#include <BOPCol_SequenceOfReal.hxx>
#include <BOPCol_DataMapOfShapeInteger.hxx>
#include <BOPCol_MapOfShape.hxx>
#include <BOPTools_AlgoTools2D.hxx>
#include <TopLoc_Location.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Wire.hxx>
#include <TopTools_ShapeMapHasher.hxx>
typedef NCollection_DataMap \
<TopoDS_Shape, Standard_Boolean, TopTools_ShapeMapHasher> \

View File

@@ -1,3 +1,37 @@
BOPAlgo_Algo.cxx
BOPAlgo_Algo.hxx
BOPAlgo_ArgumentAnalyzer.cxx
BOPAlgo_ArgumentAnalyzer.hxx
BOPAlgo_ArgumentAnalyzer.lxx
BOPAlgo_BOP.cxx
BOPAlgo_BOP.hxx
BOPAlgo_Builder.cxx
BOPAlgo_Builder.hxx
BOPAlgo_Builder_1.cxx
BOPAlgo_Builder_2.cxx
BOPAlgo_Builder_3.cxx
BOPAlgo_Builder_4.cxx
BOPAlgo_BuilderArea.cxx
BOPAlgo_BuilderArea.hxx
BOPAlgo_BuilderFace.cxx
BOPAlgo_BuilderFace.hxx
BOPAlgo_BuilderShape.cxx
BOPAlgo_BuilderShape.hxx
BOPAlgo_BuilderSolid.cxx
BOPAlgo_BuilderSolid.hxx
BOPAlgo_CheckerSI.cxx
BOPAlgo_CheckerSI.hxx
BOPAlgo_CheckResult.cxx
BOPAlgo_CheckResult.hxx
BOPAlgo_CheckStatus.hxx
BOPAlgo_ListOfCheckResult.hxx
BOPAlgo_MakerVolume.cxx
BOPAlgo_MakerVolume.hxx
BOPAlgo_MakerVolume.lxx
BOPAlgo_Operation.hxx
BOPAlgo_PArgumentAnalyzer.hxx
BOPAlgo_PaveFiller.cxx
BOPAlgo_PaveFiller.hxx
BOPAlgo_PaveFiller_1.cxx
BOPAlgo_PaveFiller_2.cxx
BOPAlgo_PaveFiller_3.cxx
@@ -8,11 +42,24 @@ BOPAlgo_PaveFiller_7.cxx
BOPAlgo_PaveFiller_8.cxx
BOPAlgo_PaveFiller_9.cxx
BOPAlgo_PaveFiller_10.cxx
BOPAlgo_Builder_1.cxx
BOPAlgo_Builder_2.cxx
BOPAlgo_Builder_3.cxx
BOPAlgo_Builder_4.cxx
BOPAlgo_PBOP.hxx
BOPAlgo_PBuilder.hxx
BOPAlgo_PPaveFiller.hxx
BOPAlgo_PSection.hxx
BOPAlgo_PWireEdgeSet.hxx
BOPAlgo_Section.cxx
BOPAlgo_Section.hxx
BOPAlgo_SectionAttribute.cxx
BOPAlgo_SectionAttribute.hxx
BOPAlgo_SectionAttribute.lxx
BOPAlgo_ShellSplitter.cxx
BOPAlgo_ShellSplitter.hxx
BOPAlgo_Tools.cxx
BOPAlgo_Tools.hxx
BOPAlgo_WireEdgeSet.cxx
BOPAlgo_WireEdgeSet.hxx
BOPAlgo_WireEdgeSet.lxx
BOPAlgo_WireSplitter.cxx
BOPAlgo_WireSplitter.hxx
BOPAlgo_WireSplitter.lxx
BOPAlgo_WireSplitter_1.cxx
BOPAlgo_ListOfCheckResult.hxx