mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +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:
@@ -1,114 +0,0 @@
|
||||
-- Created on: 1993-07-06
|
||||
-- Created by: Remi LEQUETTE
|
||||
-- Copyright (c) 1993-1999 Matra Datavision
|
||||
-- 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 BRepAlgoAPI
|
||||
|
||||
---Purpose: The BRepAlgoAPI package provides a full range of
|
||||
-- services to perform Boolean Operations on arguments (shapes
|
||||
-- that are defined in the BRep data structures). The
|
||||
-- implemented new algorithm is intended to replace the Old
|
||||
-- Boolean Operations algorithm in the BRepAlgoAPI package.
|
||||
-- The New algorithm is free of a large number of weak spots
|
||||
-- and limitations characteristics of the Old algorithm.
|
||||
-- It is more powerful and flexible.
|
||||
-- It can process arguments the Old algorithm was not adapted for.
|
||||
-- The new algorithm is based on a new approach to operations
|
||||
-- with interfered shapes. The advantages of the new algorithm
|
||||
-- include an ability to treat arguments that have shared
|
||||
-- entities. It can properly process two solids with shared
|
||||
-- faces (in terms of TopoDS_Shape::IsSame()), two
|
||||
-- faces that have shared edges and so on. Now the New Boolean
|
||||
-- Operation algorithm can treat a wide range of shapes while the
|
||||
-- Old one fails on them.
|
||||
-- A generalization of treatment of same-domain faces
|
||||
-- was included into the New algorithm. Two faces that share
|
||||
-- the same domain are processed according to the common rule
|
||||
-- even if the underlying surfaces are of different types. This
|
||||
-- allows to execute Boolean Operations properly for the same
|
||||
-- domain faces. It also concerns solids and shells that have the
|
||||
-- same domain faces. It is quite frequent when two faces share
|
||||
-- the same domain. And the New algorithm successfully copes
|
||||
-- with it in contrast to the Old one.
|
||||
-- Generalization oftreatment of degenerated edges
|
||||
-- gives a possibility to process them properly. Although there
|
||||
-- are still some difficulties with processing faces in areas close
|
||||
-- to degenerated edges.
|
||||
-- Now the processing of arguments having internal sub-shapes gives
|
||||
-- a correct result. Internal sub-shape means a sub-shape of a
|
||||
-- shape with the orientation TopAbs_INTERNAL and is located
|
||||
-- inside the shape boundaries. The New algorithm processes faces
|
||||
-- with internal edges properly. The new API of the Boolean
|
||||
-- Operations (in addition to the old API) allows to reuse the
|
||||
-- already computed interference between arguments in different
|
||||
-- types of Boolean Operations. It is possible to use once computed
|
||||
-- interference in FUSE, CUT and COMMON operations on given
|
||||
-- arguments. So there is no need to re-compute the interference
|
||||
-- between the arguments. It allows to reduce time for more than one
|
||||
-- operation on given arguments.
|
||||
-- The shape type of a Boolean Operation result and types of the arguments:
|
||||
-- - For arguments with the same shape type (e.g. SOLID /
|
||||
-- SOLID) the type of the resulting shape will be a
|
||||
-- COMPOUND, containing shapes of this type;
|
||||
-- - For arguments with different shape types (e.g.
|
||||
-- SHELL / SOLID) the type of the resulting shape will be a
|
||||
-- COMPOUND, containing shapes of the type that is the same as
|
||||
-- that of the low type of the argument. Example: For
|
||||
-- SHELL/SOLID the result is a COMPOUND of SHELLs.
|
||||
-- - For arguments with different shape types some of
|
||||
-- Boolean Operations can not be done using the default
|
||||
-- implementation, because of a non-manifold type of the
|
||||
-- result. Example: the FUSE operation for SHELL and SOLID
|
||||
-- can not be done, but the CUT operation can be done, where
|
||||
-- SHELL is the object and SOLID is the tool.
|
||||
-- It is possible to perform Boolean Operations on arguments
|
||||
-- of the COMPOUND shape type. In this case each compound must not
|
||||
-- be heterogeneous, i.e. it must contain equidimensional shapes
|
||||
-- (EDGEs or/and WIREs, FACEs or/and SHELLs, SOLIDs). SOLIDs
|
||||
-- inside the COMPOUND must not contact (intersect or touch)
|
||||
-- each other. The same condition is true for SHELLs or FACEs,
|
||||
-- WIREs or EDGEs.
|
||||
-- It does not support Boolean Operations for COMPSOLID type of shape.
|
||||
|
||||
uses
|
||||
TopTools,
|
||||
TopoDS,
|
||||
gp,
|
||||
Geom,
|
||||
Geom2d,
|
||||
Message,
|
||||
BOPCol,
|
||||
BOPAlgo,
|
||||
BOPDS,
|
||||
BRepBuilderAPI
|
||||
is
|
||||
|
||||
deferred class BooleanOperation;
|
||||
class Fuse;
|
||||
class Common;
|
||||
class Cut;
|
||||
class Section;
|
||||
class Check;
|
||||
---Purpose: Check shapes on validity for boolean
|
||||
--- operation.
|
||||
|
||||
deferred class Algo;
|
||||
class BuilderAlgo;
|
||||
|
||||
end BRepAlgoAPI;
|
||||
|
||||
|
||||
|
||||
|
@@ -1,86 +0,0 @@
|
||||
-- Created by: Peter KURNEV
|
||||
-- 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.
|
||||
|
||||
deferred class Algo from BRepAlgoAPI
|
||||
inherits MakeShape from BRepBuilderAPI
|
||||
---Purpose: provides the root interface for algorithms
|
||||
|
||||
uses
|
||||
BaseAllocator from BOPCol,
|
||||
ProgressIndicator from Message,
|
||||
Shape from TopoDS
|
||||
|
||||
--raises
|
||||
|
||||
is
|
||||
Initialize
|
||||
returns Algo from BRepAlgoAPI;
|
||||
---C++: alias "Standard_EXPORT virtual ~BRepAlgoAPI_Algo();"
|
||||
---Purpose: Empty constructor
|
||||
|
||||
Initialize (theAllocator: BaseAllocator from BOPCol)
|
||||
returns Algo from BRepAlgoAPI;
|
||||
---Purpose: Empty constructor
|
||||
|
||||
ErrorStatus (me)
|
||||
returns Integer from Standard;
|
||||
---Purpose: Returns error status of the algorithm
|
||||
-- ==0 - no errors occured
|
||||
-- !=0 - is in the event of various error conditions
|
||||
|
||||
WarningStatus (me)
|
||||
returns Integer from Standard;
|
||||
---Purpose: Returns warning status of the algorithm
|
||||
-- ==0 - no warning occured
|
||||
-- !=0 - is in the event of various warning conditions
|
||||
|
||||
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.
|
||||
|
||||
Shape(me)
|
||||
returns Shape from TopoDS
|
||||
is redefined;
|
||||
---C++: return const &
|
||||
|
||||
Clear(me:out)
|
||||
is virtual protected;
|
||||
|
||||
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;
|
@@ -12,10 +12,12 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <BRepAlgoAPI_Algo.ixx>
|
||||
|
||||
#include <Standard_NotImplemented.hxx>
|
||||
#include <BRepAlgoAPI_Algo.hxx>
|
||||
#include <Message_ProgressIndicator.hxx>
|
||||
#include <NCollection_BaseAllocator.hxx>
|
||||
#include <Standard_NotImplemented.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
|
||||
//=======================================================================
|
||||
// function:
|
||||
|
104
src/BRepAlgoAPI/BRepAlgoAPI_Algo.hxx
Normal file
104
src/BRepAlgoAPI/BRepAlgoAPI_Algo.hxx
Normal file
@@ -0,0 +1,104 @@
|
||||
// Created by: Peter KURNEV
|
||||
// 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 _BRepAlgoAPI_Algo_HeaderFile
|
||||
#define _BRepAlgoAPI_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>
|
||||
#include <BRepBuilderAPI_MakeShape.hxx>
|
||||
class Message_ProgressIndicator;
|
||||
class TopoDS_Shape;
|
||||
|
||||
|
||||
//! provides the root interface for algorithms
|
||||
class BRepAlgoAPI_Algo : public BRepBuilderAPI_MakeShape
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Returns error status of the algorithm
|
||||
//! ==0 - no errors occured
|
||||
//! !=0 - is in the event of various error conditions
|
||||
Standard_EXPORT Standard_Integer ErrorStatus() const;
|
||||
|
||||
//! Returns warning status of the algorithm
|
||||
//! ==0 - no warning occured
|
||||
//! !=0 - is in the event of various warning conditions
|
||||
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);
|
||||
|
||||
Standard_EXPORT virtual const TopoDS_Shape& Shape() const Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
//! Empty constructor
|
||||
Standard_EXPORT BRepAlgoAPI_Algo();
|
||||
Standard_EXPORT virtual ~BRepAlgoAPI_Algo();
|
||||
|
||||
//! Empty constructor
|
||||
Standard_EXPORT BRepAlgoAPI_Algo(const BOPCol_BaseAllocator& theAllocator);
|
||||
|
||||
//! Breaks the execution if the break signal
|
||||
//! is indicated by myProgressIndicator.
|
||||
Standard_EXPORT void UserBreak() const;
|
||||
|
||||
Standard_EXPORT virtual void Clear();
|
||||
|
||||
|
||||
BOPCol_BaseAllocator myAllocator;
|
||||
Standard_Integer myErrorStatus;
|
||||
Standard_Integer myWarningStatus;
|
||||
Standard_Boolean myRunParallel;
|
||||
Handle(Message_ProgressIndicator) myProgressIndicator;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _BRepAlgoAPI_Algo_HeaderFile
|
@@ -1,193 +0,0 @@
|
||||
-- Created on: 1993-10-14
|
||||
-- Created by: Remi LEQUETTE
|
||||
-- Copyright (c) 1993-1999 Matra Datavision
|
||||
-- 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.
|
||||
|
||||
deferred class BooleanOperation from BRepAlgoAPI
|
||||
inherits BuilderAlgo from BRepAlgoAPI
|
||||
|
||||
---Purpose:
|
||||
-- The abstract class BooleanOperation is the root
|
||||
-- class of Boolean Operations (see Overview).
|
||||
-- Boolean Operations algorithm is divided onto two parts.
|
||||
-- - The first one is computing interference between arguments.
|
||||
-- - The second one is building the result of operation.
|
||||
-- The class BooleanOperation provides API level of both parts
|
||||
|
||||
uses
|
||||
|
||||
Shape from TopoDS,
|
||||
DataMapOfShapeShape from TopTools,
|
||||
ListOfShape from TopTools,
|
||||
--
|
||||
Operation from BOPAlgo,
|
||||
PaveFiller from BOPAlgo
|
||||
|
||||
|
||||
is
|
||||
Initialize
|
||||
returns BooleanOperation from BRepAlgoAPI;
|
||||
---Purpose: Empty constructor
|
||||
|
||||
Initialize (PF :PaveFiller from BOPAlgo)
|
||||
returns BooleanOperation from BRepAlgoAPI;
|
||||
---Purpose: Empty constructor
|
||||
-- <PF> - PaveFiller object that is carried out
|
||||
|
||||
Initialize (S1 :Shape from TopoDS;
|
||||
S2 :Shape from TopoDS;
|
||||
anOperation:Operation from BOPAlgo);
|
||||
---Purpose: Constructor with two arguments
|
||||
-- <S1>, <S2> -arguments
|
||||
-- <anOperation> - the type of the operation
|
||||
-- Obsolete
|
||||
|
||||
Initialize (S1 :Shape from TopoDS;
|
||||
S2 :Shape from TopoDS;
|
||||
PF :PaveFiller from BOPAlgo;
|
||||
anOperation:Operation from BOPAlgo);
|
||||
---Purpose: Constructor with two arguments
|
||||
-- <S1>, <S2> -arguments
|
||||
-- <anOperation> - the type of the operation
|
||||
-- <PF> - PaveFiller object that is carried out
|
||||
-- Obsolete
|
||||
|
||||
Shape1(me)
|
||||
returns Shape from TopoDS
|
||||
is static;
|
||||
---Purpose: Returns the first argument involved in this Boolean operation.
|
||||
-- Obsolete
|
||||
---C++: return const &
|
||||
|
||||
|
||||
Shape2(me)
|
||||
returns Shape from TopoDS
|
||||
is static;
|
||||
---Purpose: Returns the second argument involved in this Boolean operation.
|
||||
-- Obsolete
|
||||
---C++: return const &
|
||||
|
||||
SetTools(me:out;
|
||||
theLS: ListOfShape from TopTools);
|
||||
---Purpose: Sets the tools
|
||||
|
||||
Tools(me)
|
||||
returns ListOfShape from TopTools;
|
||||
---C++: return const &
|
||||
---Purpose: Gets the tools
|
||||
|
||||
SetOperation (me:out;
|
||||
anOp: Operation from BOPAlgo);
|
||||
---Purpose: Sets the type of Boolean operation
|
||||
|
||||
Operation (me)
|
||||
returns Operation from BOPAlgo;
|
||||
---Purpose: Returns the type of Boolean Operation
|
||||
---C++: alias "Standard_EXPORT virtual ~BRepAlgoAPI_BooleanOperation();"
|
||||
|
||||
Build (me:out)
|
||||
is redefined ;
|
||||
---Purpose: Performs the algorithm
|
||||
-- Filling interference Data Structure (if it is necessary)
|
||||
-- Building the result of the operation.
|
||||
|
||||
BuilderCanWork(me)
|
||||
returns Boolean from Standard;
|
||||
---Purpose: Returns True if there was no errors occured
|
||||
-- obsolete
|
||||
|
||||
FuseEdges(me)
|
||||
returns Boolean from Standard;
|
||||
---Purpose: Returns the flag of edge refining
|
||||
|
||||
RefineEdges(me:out);
|
||||
---Purpose: Fuse C1 edges
|
||||
|
||||
SectionEdges (me: in out)
|
||||
returns ListOfShape from TopTools;
|
||||
--- Purpose: Returns a list of section edges.
|
||||
-- The edges represent the result of intersection between arguments of
|
||||
-- Boolean Operation. They are computed during operation execution.
|
||||
---C++: return const &
|
||||
|
||||
Modified (me: in out;
|
||||
aS : Shape from TopoDS)
|
||||
returns ListOfShape from TopTools
|
||||
is redefined;
|
||||
---Purpose: Returns the list of shapes modified from the shape <S>.
|
||||
---C++: return const &
|
||||
|
||||
IsDeleted (me: in out;
|
||||
aS : Shape from TopoDS)
|
||||
returns Boolean
|
||||
is redefined;
|
||||
---Purpose: Returns true if the shape S has been deleted. The
|
||||
-- result shape of the operation does not contain the shape S.
|
||||
|
||||
Generated (me: in out;
|
||||
S : Shape from TopoDS)
|
||||
returns ListOfShape from TopTools
|
||||
is redefined;
|
||||
---Purpose: Returns the list of shapes generated from the shape <S>.
|
||||
--- For use in BRepNaming.
|
||||
---C++: return const &
|
||||
|
||||
HasModified (me)
|
||||
returns Boolean from Standard
|
||||
is redefined;
|
||||
---Purpose: Returns true if there is at least one modified shape.
|
||||
--- For use in BRepNaming.
|
||||
|
||||
HasGenerated (me)
|
||||
returns Boolean from Standard
|
||||
is redefined;
|
||||
---Purpose: Returns true if there is at least one generated shape.
|
||||
--- For use in BRepNaming.
|
||||
|
||||
HasDeleted (me)
|
||||
returns Boolean from Standard
|
||||
is redefined;
|
||||
---Purpose: Returns true if there is at least one deleted shape.
|
||||
--- For use in BRepNaming.
|
||||
|
||||
--
|
||||
-- protected methods
|
||||
--
|
||||
Clear(me:out)
|
||||
is redefined protected;
|
||||
|
||||
SetAttributes (me:out)
|
||||
is virtual protected;
|
||||
|
||||
RefinedList (me: in out;
|
||||
theL : ListOfShape from TopTools)
|
||||
returns ListOfShape from TopTools
|
||||
is protected;
|
||||
---Purpose: Returns the list of shapes generated from the shape <S>.
|
||||
--- For use in BRepNaming.
|
||||
---C++: return const &
|
||||
|
||||
|
||||
|
||||
fields
|
||||
myTools : ListOfShape from TopTools is protected;
|
||||
myOperation: Operation from BOPAlgo is protected;
|
||||
--
|
||||
myBuilderCanWork : Boolean from Standard is protected;
|
||||
-- for edge refiner
|
||||
myFuseEdges : Boolean from Standard ;
|
||||
myModifFaces : DataMapOfShapeShape from TopTools;
|
||||
myEdgeMap : DataMapOfShapeShape from TopTools;
|
||||
|
||||
end BooleanOperation;
|
@@ -14,39 +14,34 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <BRepAlgoAPI_BooleanOperation.ixx>
|
||||
|
||||
///XXXXXXXXXX
|
||||
#include <stdio.h>
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
#include <BOPAlgo_BOP.hxx>
|
||||
#include <BOPAlgo_PaveFiller.hxx>
|
||||
#include <BOPAlgo_Section.hxx>
|
||||
#include <BOPDS_Curve.hxx>
|
||||
#include <BOPDS_DS.hxx>
|
||||
#include <BOPDS_Interf.hxx>
|
||||
#include <BOPDS_ListOfPaveBlock.hxx>
|
||||
#include <BOPDS_PDS.hxx>
|
||||
#include <BOPDS_VectorOfCurve.hxx>
|
||||
#include <BRepAlgoAPI_BooleanOperation.hxx>
|
||||
#include <BRepAlgoAPI_Check.hxx>
|
||||
#include <BRepLib_FuseEdges.hxx>
|
||||
#include <BRepTools.hxx>
|
||||
#include <OSD_File.hxx>
|
||||
//XXXXXXXXXX
|
||||
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
#include <TopExp.hxx>
|
||||
|
||||
#include <TopTools_IndexedMapOfShape.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TopTools_DataMapOfIntegerListOfShape.hxx>
|
||||
#include <TopTools_DataMapOfIntegerShape.hxx>
|
||||
#include <TopTools_MapOfShape.hxx>
|
||||
#include <TopTools_ListOfShape.hxx>
|
||||
#include <TopTools_IndexedMapOfShape.hxx>
|
||||
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
||||
#include <TopTools_ListOfShape.hxx>
|
||||
#include <TopTools_MapOfShape.hxx>
|
||||
|
||||
#include <BRepAlgoAPI_Check.hxx>
|
||||
|
||||
#include <BRepLib_FuseEdges.hxx>
|
||||
|
||||
#include <BOPDS_PDS.hxx>
|
||||
#include <BOPDS_DS.hxx>
|
||||
#include <BOPDS_VectorOfCurve.hxx>
|
||||
#include <BOPDS_Interf.hxx>
|
||||
#include <BOPDS_Curve.hxx>
|
||||
#include <BOPDS_ListOfPaveBlock.hxx>
|
||||
|
||||
#include <BOPAlgo_PaveFiller.hxx>
|
||||
#include <BOPAlgo_BOP.hxx>
|
||||
#include <BOPAlgo_Section.hxx>
|
||||
|
||||
#include <stdio.h>
|
||||
///XXXXXXXXXX
|
||||
//XXXXXXXXXX
|
||||
//XXXX
|
||||
//=======================================================================
|
||||
//class : BRepAlgoAPI_DumpOper
|
||||
|
168
src/BRepAlgoAPI/BRepAlgoAPI_BooleanOperation.hxx
Normal file
168
src/BRepAlgoAPI/BRepAlgoAPI_BooleanOperation.hxx
Normal file
@@ -0,0 +1,168 @@
|
||||
// Created on: 1993-10-14
|
||||
// Created by: Remi LEQUETTE
|
||||
// Copyright (c) 1993-1999 Matra Datavision
|
||||
// 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 _BRepAlgoAPI_BooleanOperation_HeaderFile
|
||||
#define _BRepAlgoAPI_BooleanOperation_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <TopTools_ListOfShape.hxx>
|
||||
#include <BOPAlgo_Operation.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <TopTools_DataMapOfShapeShape.hxx>
|
||||
#include <BRepAlgoAPI_BuilderAlgo.hxx>
|
||||
class BOPAlgo_PaveFiller;
|
||||
class TopoDS_Shape;
|
||||
|
||||
|
||||
|
||||
//! The abstract class BooleanOperation is the root
|
||||
//! class of Boolean Operations (see Overview).
|
||||
//! Boolean Operations algorithm is divided onto two parts.
|
||||
//! - The first one is computing interference between arguments.
|
||||
//! - The second one is building the result of operation.
|
||||
//! The class BooleanOperation provides API level of both parts
|
||||
class BRepAlgoAPI_BooleanOperation : public BRepAlgoAPI_BuilderAlgo
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Returns the first argument involved in this Boolean operation.
|
||||
//! Obsolete
|
||||
Standard_EXPORT const TopoDS_Shape& Shape1() const;
|
||||
|
||||
//! Returns the second argument involved in this Boolean operation.
|
||||
//! Obsolete
|
||||
Standard_EXPORT const TopoDS_Shape& Shape2() const;
|
||||
|
||||
//! Sets the tools
|
||||
Standard_EXPORT void SetTools (const TopTools_ListOfShape& theLS);
|
||||
|
||||
//! Gets the tools
|
||||
Standard_EXPORT const TopTools_ListOfShape& Tools() const;
|
||||
|
||||
//! Sets the type of Boolean operation
|
||||
Standard_EXPORT void SetOperation (const BOPAlgo_Operation anOp);
|
||||
|
||||
//! Returns the type of Boolean Operation
|
||||
Standard_EXPORT BOPAlgo_Operation Operation() const;
|
||||
Standard_EXPORT virtual ~BRepAlgoAPI_BooleanOperation();
|
||||
|
||||
//! Performs the algorithm
|
||||
//! Filling interference Data Structure (if it is necessary)
|
||||
//! Building the result of the operation.
|
||||
Standard_EXPORT virtual void Build() Standard_OVERRIDE;
|
||||
|
||||
//! Returns True if there was no errors occured
|
||||
//! obsolete
|
||||
Standard_EXPORT Standard_Boolean BuilderCanWork() const;
|
||||
|
||||
//! Returns the flag of edge refining
|
||||
Standard_EXPORT Standard_Boolean FuseEdges() const;
|
||||
|
||||
//! Fuse C1 edges
|
||||
Standard_EXPORT void RefineEdges();
|
||||
|
||||
//! Returns a list of section edges.
|
||||
//! The edges represent the result of intersection between arguments of
|
||||
//! Boolean Operation. They are computed during operation execution.
|
||||
Standard_EXPORT const TopTools_ListOfShape& SectionEdges();
|
||||
|
||||
//! Returns the list of shapes modified from the shape <S>.
|
||||
Standard_EXPORT virtual const TopTools_ListOfShape& Modified (const TopoDS_Shape& aS) Standard_OVERRIDE;
|
||||
|
||||
//! Returns true if the shape S has been deleted. The
|
||||
//! result shape of the operation does not contain the shape S.
|
||||
Standard_EXPORT virtual Standard_Boolean IsDeleted (const TopoDS_Shape& aS) Standard_OVERRIDE;
|
||||
|
||||
//! Returns the list of shapes generated from the shape <S>.
|
||||
//! For use in BRepNaming.
|
||||
Standard_EXPORT virtual const TopTools_ListOfShape& Generated (const TopoDS_Shape& S) Standard_OVERRIDE;
|
||||
|
||||
//! Returns true if there is at least one modified shape.
|
||||
//! For use in BRepNaming.
|
||||
Standard_EXPORT virtual Standard_Boolean HasModified() const Standard_OVERRIDE;
|
||||
|
||||
//! Returns true if there is at least one generated shape.
|
||||
//! For use in BRepNaming.
|
||||
Standard_EXPORT virtual Standard_Boolean HasGenerated() const Standard_OVERRIDE;
|
||||
|
||||
//! Returns true if there is at least one deleted shape.
|
||||
//! For use in BRepNaming.
|
||||
Standard_EXPORT virtual Standard_Boolean HasDeleted() const Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
//! Empty constructor
|
||||
Standard_EXPORT BRepAlgoAPI_BooleanOperation();
|
||||
|
||||
//! Empty constructor
|
||||
//! <PF> - PaveFiller object that is carried out
|
||||
Standard_EXPORT BRepAlgoAPI_BooleanOperation(const BOPAlgo_PaveFiller& PF);
|
||||
|
||||
//! Constructor with two arguments
|
||||
//! <S1>, <S2> -arguments
|
||||
//! <anOperation> - the type of the operation
|
||||
//! Obsolete
|
||||
Standard_EXPORT BRepAlgoAPI_BooleanOperation(const TopoDS_Shape& S1, const TopoDS_Shape& S2, const BOPAlgo_Operation anOperation);
|
||||
|
||||
//! Constructor with two arguments
|
||||
//! <S1>, <S2> -arguments
|
||||
//! <anOperation> - the type of the operation
|
||||
//! <PF> - PaveFiller object that is carried out
|
||||
//! Obsolete
|
||||
Standard_EXPORT BRepAlgoAPI_BooleanOperation(const TopoDS_Shape& S1, const TopoDS_Shape& S2, const BOPAlgo_PaveFiller& PF, const BOPAlgo_Operation anOperation);
|
||||
|
||||
Standard_EXPORT virtual void Clear() Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual void SetAttributes();
|
||||
|
||||
//! Returns the list of shapes generated from the shape <S>.
|
||||
//! For use in BRepNaming.
|
||||
Standard_EXPORT const TopTools_ListOfShape& RefinedList (const TopTools_ListOfShape& theL);
|
||||
|
||||
|
||||
TopTools_ListOfShape myTools;
|
||||
BOPAlgo_Operation myOperation;
|
||||
Standard_Boolean myBuilderCanWork;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Standard_Boolean myFuseEdges;
|
||||
TopTools_DataMapOfShapeShape myModifFaces;
|
||||
TopTools_DataMapOfShapeShape myEdgeMap;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _BRepAlgoAPI_BooleanOperation_HeaderFile
|
@@ -1,115 +0,0 @@
|
||||
-- Created by: Peter KURNEV
|
||||
-- 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 BuilderAlgo from BRepAlgoAPI
|
||||
inherits Algo from BRepAlgoAPI
|
||||
---Purpose:
|
||||
-- The clsss contains API level of General Fuse algorithm
|
||||
|
||||
uses
|
||||
Shape from TopoDS,
|
||||
ListOfShape from TopTools,
|
||||
--
|
||||
PPaveFiller from BOPAlgo,
|
||||
PaveFiller from BOPAlgo,
|
||||
PBuilder from BOPAlgo
|
||||
|
||||
--raises
|
||||
|
||||
is
|
||||
Create
|
||||
returns BuilderAlgo from BRepAlgoAPI;
|
||||
---Purpose: Empty constructor
|
||||
---C++: alias "Standard_EXPORT virtual ~BRepAlgoAPI_BuilderAlgo();"
|
||||
|
||||
|
||||
Create(thePF :PaveFiller from BOPAlgo)
|
||||
returns BuilderAlgo from BRepAlgoAPI;
|
||||
---Purpose: Empty constructor
|
||||
|
||||
SetFuzzyValue(me:out;
|
||||
theFuzz : Real from Standard);
|
||||
---Purpose: Sets the additional tolerance
|
||||
|
||||
FuzzyValue(me)
|
||||
returns Real from Standard;
|
||||
---Purpose: Returns the additional tolerance
|
||||
|
||||
SetArguments(me:out;
|
||||
theLS: ListOfShape from TopTools);
|
||||
---Purpose: Sets the arguments
|
||||
|
||||
Arguments(me)
|
||||
returns ListOfShape from TopTools;
|
||||
---C++: return const &
|
||||
---Purpose: Gets the arguments
|
||||
|
||||
Build (me:out)
|
||||
is redefined virtual;
|
||||
---Purpose: Performs the algorithm
|
||||
--
|
||||
-- H I S T O R Y
|
||||
--
|
||||
Modified (me: in out;
|
||||
aS : Shape from TopoDS)
|
||||
returns ListOfShape from TopTools
|
||||
is redefined virtual;
|
||||
---Purpose: Returns the list of shapes modified from the shape <S>.
|
||||
---C++: return const &
|
||||
|
||||
IsDeleted (me: in out;
|
||||
aS : Shape from TopoDS)
|
||||
returns Boolean
|
||||
is redefined virtual;
|
||||
---Purpose: Returns true if the shape S has been deleted. The
|
||||
-- result shape of the operation does not contain the shape S.
|
||||
|
||||
Generated (me: in out;
|
||||
S : Shape from TopoDS)
|
||||
returns ListOfShape from TopTools
|
||||
is redefined virtual;
|
||||
---Purpose: Returns the list of shapes generated from the shape <S>.
|
||||
--- For use in BRepNaming.
|
||||
---C++: return const &
|
||||
|
||||
HasModified (me)
|
||||
returns Boolean from Standard
|
||||
is virtual;
|
||||
---Purpose: Returns true if there is at least one modified shape.
|
||||
--- For use in BRepNaming.
|
||||
|
||||
HasGenerated (me)
|
||||
returns Boolean from Standard
|
||||
is virtual;
|
||||
---Purpose: Returns true if there is at least one generated shape.
|
||||
--- For use in BRepNaming.
|
||||
|
||||
HasDeleted (me)
|
||||
returns Boolean from Standard
|
||||
is virtual;
|
||||
---Purpose: Returns true if there is at least one deleted shape.
|
||||
--- For use in BRepNaming.
|
||||
--
|
||||
-- protected methods
|
||||
--
|
||||
Clear(me:out)
|
||||
is redefined protected;
|
||||
|
||||
fields
|
||||
myEntryType : Integer from Standard is protected;
|
||||
myDSFiller : PPaveFiller from BOPAlgo is protected;
|
||||
myBuilder : PBuilder from BOPAlgo is protected;
|
||||
myFuzzyValue : Real from Standard is protected;
|
||||
myArguments : ListOfShape from TopTools is protected;
|
||||
end BuilderAlgo;
|
@@ -12,10 +12,11 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <BRepAlgoAPI_BuilderAlgo.ixx>
|
||||
|
||||
#include <BOPAlgo_PaveFiller.hxx>
|
||||
#include <BOPAlgo_Builder.hxx>
|
||||
#include <BOPAlgo_PaveFiller.hxx>
|
||||
#include <BRepAlgoAPI_BuilderAlgo.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
|
||||
//=======================================================================
|
||||
// function:
|
||||
|
121
src/BRepAlgoAPI/BRepAlgoAPI_BuilderAlgo.hxx
Normal file
121
src/BRepAlgoAPI/BRepAlgoAPI_BuilderAlgo.hxx
Normal file
@@ -0,0 +1,121 @@
|
||||
// Created by: Peter KURNEV
|
||||
// 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 _BRepAlgoAPI_BuilderAlgo_HeaderFile
|
||||
#define _BRepAlgoAPI_BuilderAlgo_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <BOPAlgo_PPaveFiller.hxx>
|
||||
#include <BOPAlgo_PBuilder.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <TopTools_ListOfShape.hxx>
|
||||
#include <BRepAlgoAPI_Algo.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class BOPAlgo_PaveFiller;
|
||||
class TopoDS_Shape;
|
||||
|
||||
|
||||
|
||||
//! The clsss contains API level of General Fuse algorithm
|
||||
class BRepAlgoAPI_BuilderAlgo : public BRepAlgoAPI_Algo
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Empty constructor
|
||||
Standard_EXPORT BRepAlgoAPI_BuilderAlgo();
|
||||
Standard_EXPORT virtual ~BRepAlgoAPI_BuilderAlgo();
|
||||
|
||||
//! Empty constructor
|
||||
Standard_EXPORT BRepAlgoAPI_BuilderAlgo(const BOPAlgo_PaveFiller& thePF);
|
||||
|
||||
//! Sets the additional tolerance
|
||||
Standard_EXPORT void SetFuzzyValue (const Standard_Real theFuzz);
|
||||
|
||||
//! Returns the additional tolerance
|
||||
Standard_EXPORT Standard_Real FuzzyValue() const;
|
||||
|
||||
//! Sets the arguments
|
||||
Standard_EXPORT void SetArguments (const TopTools_ListOfShape& theLS);
|
||||
|
||||
//! Gets the arguments
|
||||
Standard_EXPORT const TopTools_ListOfShape& Arguments() const;
|
||||
|
||||
//! Performs the algorithm
|
||||
//!
|
||||
//! H I S T O R Y
|
||||
Standard_EXPORT virtual void Build() Standard_OVERRIDE;
|
||||
|
||||
//! Returns the list of shapes modified from the shape <S>.
|
||||
Standard_EXPORT virtual const TopTools_ListOfShape& Modified (const TopoDS_Shape& aS) Standard_OVERRIDE;
|
||||
|
||||
//! Returns true if the shape S has been deleted. The
|
||||
//! result shape of the operation does not contain the shape S.
|
||||
Standard_EXPORT virtual Standard_Boolean IsDeleted (const TopoDS_Shape& aS) Standard_OVERRIDE;
|
||||
|
||||
//! Returns the list of shapes generated from the shape <S>.
|
||||
//! For use in BRepNaming.
|
||||
Standard_EXPORT virtual const TopTools_ListOfShape& Generated (const TopoDS_Shape& S) Standard_OVERRIDE;
|
||||
|
||||
//! Returns true if there is at least one modified shape.
|
||||
//! For use in BRepNaming.
|
||||
Standard_EXPORT virtual Standard_Boolean HasModified() const;
|
||||
|
||||
//! Returns true if there is at least one generated shape.
|
||||
//! For use in BRepNaming.
|
||||
Standard_EXPORT virtual Standard_Boolean HasGenerated() const;
|
||||
|
||||
//! Returns true if there is at least one deleted shape.
|
||||
//! For use in BRepNaming.
|
||||
//!
|
||||
//! protected methods
|
||||
Standard_EXPORT virtual Standard_Boolean HasDeleted() const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
Standard_EXPORT virtual void Clear() Standard_OVERRIDE;
|
||||
|
||||
|
||||
Standard_Integer myEntryType;
|
||||
BOPAlgo_PPaveFiller myDSFiller;
|
||||
BOPAlgo_PBuilder myBuilder;
|
||||
Standard_Real myFuzzyValue;
|
||||
TopTools_ListOfShape myArguments;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _BRepAlgoAPI_BuilderAlgo_HeaderFile
|
@@ -1,135 +0,0 @@
|
||||
-- Created on: 2012-12-17
|
||||
-- Created by: Eugeny MALTCHIKOV
|
||||
-- Copyright (c) 2012-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 Check from BRepAlgoAPI
|
||||
inherits Algo from BRepAlgoAPI
|
||||
---Purpose:
|
||||
-- The class Check provides a diagnostic tool for checking
|
||||
-- single shape or couple of shapes.
|
||||
-- Single shape is checking on topological validity, small edges
|
||||
-- and self-interference. For couple of shapes added check
|
||||
-- on validity for boolean operation of given type.
|
||||
--
|
||||
-- The class provides two ways of checking shape(-s)
|
||||
-- 1. Constructors
|
||||
-- BRepAlgoAPI_Check aCh(theS);
|
||||
-- Standard_Boolean bV=aCh.IsValid();
|
||||
-- 2. Methods SetData and Perform
|
||||
-- BRepAlgoAPI_Check aCh;
|
||||
-- aCh.SetData(theS1, theS2, BOPAlgo_FUSE, Standard_False);
|
||||
-- aCh.Perform();
|
||||
-- Standard_Boolean bV=aCh.IsValid();
|
||||
|
||||
uses
|
||||
Shape from TopoDS,
|
||||
Operation from BOPAlgo,
|
||||
PArgumentAnalyzer from BOPAlgo,
|
||||
ListOfCheckResult from BOPAlgo
|
||||
|
||||
is
|
||||
Create
|
||||
returns Check from BRepAlgoAPI;
|
||||
---C++: alias "Standard_EXPORT virtual ~BRepAlgoAPI_Check();"
|
||||
---Purpose: Empty constructor.
|
||||
|
||||
Create(
|
||||
theS : Shape from TopoDS;
|
||||
bTestSE : Boolean from Standard = Standard_True;
|
||||
bTestSI : Boolean from Standard = Standard_True)
|
||||
returns Check from BRepAlgoAPI;
|
||||
---Purpose: Constructor for checking single shape.
|
||||
-- It calls methods
|
||||
-- Init(theS, TopoDS_Shape(), BOPAlgo_UNKNOWN, bTestSE, bTestSI)
|
||||
-- and Perform().
|
||||
-- Params:
|
||||
-- theS - the shape that should be checked;
|
||||
-- bTestSE - flag that specifies whether check on small edges
|
||||
-- should be performed; by default it is set to TRUE;
|
||||
-- bTestSI - flag that specifies whether check on self-interference
|
||||
-- should be performed; by default it is set to TRUE;
|
||||
|
||||
Create(
|
||||
theS1 : Shape from TopoDS;
|
||||
theS2 : Shape from TopoDS;
|
||||
theOp : Operation from BOPAlgo = BOPAlgo_UNKNOWN;
|
||||
bTestSE : Boolean from Standard = Standard_True;
|
||||
bTestSI : Boolean from Standard = Standard_True)
|
||||
returns Check from BRepAlgoAPI;
|
||||
---Purpose: Constructor for couple of shapes.
|
||||
-- It calls methods
|
||||
-- Init(theS1, theS2, theOp, bTestSE, bTestSI) and Perform().
|
||||
-- Params:
|
||||
-- theS1, theS2 - the initial shapes.
|
||||
-- theOp - the type of Boolean Operation;
|
||||
-- if it is not defined (set to UNKNOWN) for each shape
|
||||
-- performed check as for single shape.
|
||||
-- bTestSE - flag that specifies whether check on small edges
|
||||
-- should be performed; by default it is set to TRUE;
|
||||
-- bTestSI - flag that specifies whether check on self-interference
|
||||
-- should be performed; by default it is set to TRUE;
|
||||
|
||||
Init(me:out;
|
||||
theS1 : Shape from TopoDS;
|
||||
theS2 : Shape from TopoDS;
|
||||
theOp : Operation from BOPAlgo;
|
||||
bTestSE : Boolean from Standard;
|
||||
bTestSI : Boolean from Standard)
|
||||
is protected;
|
||||
---Purpose: Initialyzes data.
|
||||
|
||||
SetData(me:out;
|
||||
theS : Shape from TopoDS;
|
||||
bTestSE : Boolean from Standard = Standard_True;
|
||||
bTestSI : Boolean from Standard = Standard_True);
|
||||
---Purpose: Sets data for check by Init method.
|
||||
-- The method provides alternative way for checking single shape.
|
||||
|
||||
SetData(me:out;
|
||||
theS1 : Shape from TopoDS;
|
||||
theS2 : Shape from TopoDS;
|
||||
theOp : Operation from BOPAlgo = BOPAlgo_UNKNOWN;
|
||||
bTestSE : Boolean from Standard = Standard_True;
|
||||
bTestSI : Boolean from Standard = Standard_True);
|
||||
---Purpose: Sets data for check by Init method.
|
||||
-- The method provides alternative way for checking couple of shapes.
|
||||
|
||||
Perform(me:out);
|
||||
---Purpose: Performs the check.
|
||||
|
||||
IsValid(me:out)
|
||||
returns Boolean from Standard;
|
||||
---Purpose: Shows whether shape(s) valid or not.
|
||||
|
||||
Result(me:out)
|
||||
returns ListOfCheckResult from BOPAlgo;
|
||||
---C++: return const&
|
||||
---Purpose: Returns faulty shapes.
|
||||
|
||||
SetFuzzyValue(me:out;
|
||||
theFuzz : Real from Standard);
|
||||
---Purpose: Sets the additional tolerance
|
||||
|
||||
FuzzyValue(me)
|
||||
returns Real from Standard;
|
||||
---Purpose: Returns the additional tolerance
|
||||
|
||||
fields
|
||||
myS1, myS2 : Shape from TopoDS is protected;
|
||||
myAnalyzer : PArgumentAnalyzer from BOPAlgo is protected;
|
||||
myResult : ListOfCheckResult from BOPAlgo is protected;
|
||||
myFuzzyValue : Real from Standard is protected;
|
||||
|
||||
end BooleanOperation;
|
||||
|
@@ -13,9 +13,11 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <BRepAlgoAPI_Check.ixx>
|
||||
|
||||
#include <BOPAlgo_ArgumentAnalyzer.hxx>
|
||||
#include <BRepAlgoAPI_Check.hxx>
|
||||
#include <BRepCheck_Analyzer.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : BRepAlgoAPI_Check
|
||||
|
140
src/BRepAlgoAPI/BRepAlgoAPI_Check.hxx
Normal file
140
src/BRepAlgoAPI/BRepAlgoAPI_Check.hxx
Normal file
@@ -0,0 +1,140 @@
|
||||
// Created on: 2012-12-17
|
||||
// Created by: Eugeny MALTCHIKOV
|
||||
// Copyright (c) 2012-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 _BRepAlgoAPI_Check_HeaderFile
|
||||
#define _BRepAlgoAPI_Check_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <BOPAlgo_PArgumentAnalyzer.hxx>
|
||||
#include <BOPAlgo_ListOfCheckResult.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <BRepAlgoAPI_Algo.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <BOPAlgo_Operation.hxx>
|
||||
class TopoDS_Shape;
|
||||
|
||||
|
||||
|
||||
//! The class Check provides a diagnostic tool for checking
|
||||
//! single shape or couple of shapes.
|
||||
//! Single shape is checking on topological validity, small edges
|
||||
//! and self-interference. For couple of shapes added check
|
||||
//! on validity for boolean operation of given type.
|
||||
//!
|
||||
//! The class provides two ways of checking shape(-s)
|
||||
//! 1. Constructors
|
||||
//! BRepAlgoAPI_Check aCh(theS);
|
||||
//! Standard_Boolean bV=aCh.IsValid();
|
||||
//! 2. Methods SetData and Perform
|
||||
//! BRepAlgoAPI_Check aCh;
|
||||
//! aCh.SetData(theS1, theS2, BOPAlgo_FUSE, Standard_False);
|
||||
//! aCh.Perform();
|
||||
//! Standard_Boolean bV=aCh.IsValid();
|
||||
class BRepAlgoAPI_Check : public BRepAlgoAPI_Algo
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Empty constructor.
|
||||
Standard_EXPORT BRepAlgoAPI_Check();
|
||||
Standard_EXPORT virtual ~BRepAlgoAPI_Check();
|
||||
|
||||
//! Constructor for checking single shape.
|
||||
//! It calls methods
|
||||
//! Init(theS, TopoDS_Shape(), BOPAlgo_UNKNOWN, bTestSE, bTestSI)
|
||||
//! and Perform().
|
||||
//! Params:
|
||||
//! theS - the shape that should be checked;
|
||||
//! bTestSE - flag that specifies whether check on small edges
|
||||
//! should be performed; by default it is set to TRUE;
|
||||
//! bTestSI - flag that specifies whether check on self-interference
|
||||
//! should be performed; by default it is set to TRUE;
|
||||
Standard_EXPORT BRepAlgoAPI_Check(const TopoDS_Shape& theS, const Standard_Boolean bTestSE = Standard_True, const Standard_Boolean bTestSI = Standard_True);
|
||||
|
||||
//! Constructor for couple of shapes.
|
||||
//! It calls methods
|
||||
//! Init(theS1, theS2, theOp, bTestSE, bTestSI) and Perform().
|
||||
//! Params:
|
||||
//! theS1, theS2 - the initial shapes.
|
||||
//! theOp - the type of Boolean Operation;
|
||||
//! if it is not defined (set to UNKNOWN) for each shape
|
||||
//! performed check as for single shape.
|
||||
//! bTestSE - flag that specifies whether check on small edges
|
||||
//! should be performed; by default it is set to TRUE;
|
||||
//! bTestSI - flag that specifies whether check on self-interference
|
||||
//! should be performed; by default it is set to TRUE;
|
||||
Standard_EXPORT BRepAlgoAPI_Check(const TopoDS_Shape& theS1, const TopoDS_Shape& theS2, const BOPAlgo_Operation theOp = BOPAlgo_UNKNOWN, const Standard_Boolean bTestSE = Standard_True, const Standard_Boolean bTestSI = Standard_True);
|
||||
|
||||
//! Sets data for check by Init method.
|
||||
//! The method provides alternative way for checking single shape.
|
||||
Standard_EXPORT void SetData (const TopoDS_Shape& theS, const Standard_Boolean bTestSE = Standard_True, const Standard_Boolean bTestSI = Standard_True);
|
||||
|
||||
//! Sets data for check by Init method.
|
||||
//! The method provides alternative way for checking couple of shapes.
|
||||
Standard_EXPORT void SetData (const TopoDS_Shape& theS1, const TopoDS_Shape& theS2, const BOPAlgo_Operation theOp = BOPAlgo_UNKNOWN, const Standard_Boolean bTestSE = Standard_True, const Standard_Boolean bTestSI = Standard_True);
|
||||
|
||||
//! Performs the check.
|
||||
Standard_EXPORT void Perform();
|
||||
|
||||
//! Shows whether shape(s) valid or not.
|
||||
Standard_EXPORT Standard_Boolean IsValid();
|
||||
|
||||
//! Returns faulty shapes.
|
||||
Standard_EXPORT const BOPAlgo_ListOfCheckResult& Result();
|
||||
|
||||
//! Sets the additional tolerance
|
||||
Standard_EXPORT void SetFuzzyValue (const Standard_Real theFuzz);
|
||||
|
||||
//! Returns the additional tolerance
|
||||
Standard_EXPORT Standard_Real FuzzyValue() const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
//! Initialyzes data.
|
||||
Standard_EXPORT void Init (const TopoDS_Shape& theS1, const TopoDS_Shape& theS2, const BOPAlgo_Operation theOp, const Standard_Boolean bTestSE, const Standard_Boolean bTestSI);
|
||||
|
||||
|
||||
TopoDS_Shape myS1;
|
||||
TopoDS_Shape myS2;
|
||||
BOPAlgo_PArgumentAnalyzer myAnalyzer;
|
||||
BOPAlgo_ListOfCheckResult myResult;
|
||||
Standard_Real myFuzzyValue;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _BRepAlgoAPI_Check_HeaderFile
|
@@ -1,59 +0,0 @@
|
||||
-- Created on: 1993-10-14
|
||||
-- Created by: Remi LEQUETTE
|
||||
-- Copyright (c) 1993-1999 Matra Datavision
|
||||
-- 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 Common from BRepAlgoAPI
|
||||
inherits BooleanOperation from BRepAlgoAPI
|
||||
|
||||
---Purpose:
|
||||
-- The class provides Boolean common operation
|
||||
-- between arguments and tools (Boolean Intersection).
|
||||
|
||||
uses
|
||||
Shape from TopoDS,
|
||||
PaveFiller from BOPAlgo
|
||||
|
||||
is
|
||||
Create
|
||||
returns Common from BRepAlgoAPI;
|
||||
---C++: alias "Standard_EXPORT virtual ~BRepAlgoAPI_Common();"
|
||||
--- Purpose: Empty constructor
|
||||
|
||||
Create (PF: PaveFiller from BOPAlgo)
|
||||
returns Common from BRepAlgoAPI;
|
||||
--- Purpose: Empty constructor
|
||||
-- <PF> - PaveFiller object that is carried out
|
||||
|
||||
Create (S1,S2 : Shape from TopoDS)
|
||||
returns Common from BRepAlgoAPI;
|
||||
---Purpose: Constructor with two shapes
|
||||
-- <S1> -argument
|
||||
-- <S2> -tool
|
||||
-- <anOperation> - the type of the operation
|
||||
-- Obsolete
|
||||
|
||||
Create (S1: Shape from TopoDS;
|
||||
S2: Shape from TopoDS;
|
||||
PF: PaveFiller from BOPAlgo)
|
||||
returns Common from BRepAlgoAPI;
|
||||
---Purpose: Constructor with two shapes
|
||||
-- <S1> -argument
|
||||
-- <S2> -tool
|
||||
-- <anOperation> - the type of the operation
|
||||
-- <PF> - PaveFiller object that is carried out
|
||||
-- Obsolete
|
||||
|
||||
end Common;
|
||||
|
@@ -14,9 +14,11 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <BRepAlgoAPI_Common.ixx>
|
||||
|
||||
#include <BOPAlgo_PaveFiller.hxx>
|
||||
#include <BRepAlgoAPI_BooleanOperation.hxx>
|
||||
#include <BRepAlgoAPI_Common.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : BRepAlgoAPI_Common
|
||||
|
85
src/BRepAlgoAPI/BRepAlgoAPI_Common.hxx
Normal file
85
src/BRepAlgoAPI/BRepAlgoAPI_Common.hxx
Normal file
@@ -0,0 +1,85 @@
|
||||
// Created on: 1993-10-14
|
||||
// Created by: Remi LEQUETTE
|
||||
// Copyright (c) 1993-1999 Matra Datavision
|
||||
// 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 _BRepAlgoAPI_Common_HeaderFile
|
||||
#define _BRepAlgoAPI_Common_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <BRepAlgoAPI_BooleanOperation.hxx>
|
||||
class BOPAlgo_PaveFiller;
|
||||
class TopoDS_Shape;
|
||||
|
||||
|
||||
|
||||
//! The class provides Boolean common operation
|
||||
//! between arguments and tools (Boolean Intersection).
|
||||
class BRepAlgoAPI_Common : public BRepAlgoAPI_BooleanOperation
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Empty constructor
|
||||
Standard_EXPORT BRepAlgoAPI_Common();
|
||||
Standard_EXPORT virtual ~BRepAlgoAPI_Common();
|
||||
|
||||
//! Empty constructor
|
||||
//! <PF> - PaveFiller object that is carried out
|
||||
Standard_EXPORT BRepAlgoAPI_Common(const BOPAlgo_PaveFiller& PF);
|
||||
|
||||
//! Constructor with two shapes
|
||||
//! <S1> -argument
|
||||
//! <S2> -tool
|
||||
//! <anOperation> - the type of the operation
|
||||
//! Obsolete
|
||||
Standard_EXPORT BRepAlgoAPI_Common(const TopoDS_Shape& S1, const TopoDS_Shape& S2);
|
||||
|
||||
//! Constructor with two shapes
|
||||
//! <S1> -argument
|
||||
//! <S2> -tool
|
||||
//! <anOperation> - the type of the operation
|
||||
//! <PF> - PaveFiller object that is carried out
|
||||
//! Obsolete
|
||||
Standard_EXPORT BRepAlgoAPI_Common(const TopoDS_Shape& S1, const TopoDS_Shape& S2, const BOPAlgo_PaveFiller& PF);
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _BRepAlgoAPI_Common_HeaderFile
|
@@ -1,59 +0,0 @@
|
||||
-- Created on: 1993-10-14
|
||||
-- Created by: Remi LEQUETTE
|
||||
-- Copyright (c) 1993-1999 Matra Datavision
|
||||
-- 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 Cut from BRepAlgoAPI
|
||||
inherits BooleanOperation from BRepAlgoAPI
|
||||
|
||||
---Purpose:
|
||||
-- The class Cut provides Boolean cut operation
|
||||
-- between arguments and tools (Boolean Subtraction).
|
||||
|
||||
uses
|
||||
Shape from TopoDS,
|
||||
PaveFiller from BOPAlgo
|
||||
|
||||
is
|
||||
|
||||
Create
|
||||
returns Cut from BRepAlgoAPI;
|
||||
---C++: alias "Standard_EXPORT virtual ~BRepAlgoAPI_Cut();"
|
||||
--- Purpose: Empty constructor
|
||||
|
||||
Create (PF: PaveFiller from BOPAlgo)
|
||||
returns Cut from BRepAlgoAPI;
|
||||
--- Purpose: Empty constructor
|
||||
-- <PF> - PaveFiller object that is carried out
|
||||
|
||||
Create (S1,S2 : Shape from TopoDS)
|
||||
returns Cut from BRepAlgoAPI;
|
||||
---Purpose: Constructor with two shapes
|
||||
-- <S1> -argument
|
||||
-- <S2> -tool
|
||||
-- <anOperation> - the type of the operation
|
||||
-- Obsolete
|
||||
|
||||
Create (S1,S2 : Shape from TopoDS;
|
||||
aDSF : PaveFiller from BOPAlgo;
|
||||
bFWD : Boolean from Standard=Standard_True)
|
||||
returns Cut from BRepAlgoAPI;
|
||||
---Purpose: Constructor with two shapes
|
||||
-- <S1> -argument
|
||||
-- <S2> -tool
|
||||
-- <anOperation> - the type of the operation
|
||||
-- <PF> - PaveFiller object that is carried out
|
||||
-- Obsolete
|
||||
|
||||
end Cut;
|
@@ -14,9 +14,11 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <BRepAlgoAPI_Cut.ixx>
|
||||
|
||||
#include <BOPAlgo_PaveFiller.hxx>
|
||||
#include <BRepAlgoAPI_BooleanOperation.hxx>
|
||||
#include <BRepAlgoAPI_Cut.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : BRepAlgoAPI_Cut
|
||||
|
86
src/BRepAlgoAPI/BRepAlgoAPI_Cut.hxx
Normal file
86
src/BRepAlgoAPI/BRepAlgoAPI_Cut.hxx
Normal file
@@ -0,0 +1,86 @@
|
||||
// Created on: 1993-10-14
|
||||
// Created by: Remi LEQUETTE
|
||||
// Copyright (c) 1993-1999 Matra Datavision
|
||||
// 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 _BRepAlgoAPI_Cut_HeaderFile
|
||||
#define _BRepAlgoAPI_Cut_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <BRepAlgoAPI_BooleanOperation.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class BOPAlgo_PaveFiller;
|
||||
class TopoDS_Shape;
|
||||
|
||||
|
||||
|
||||
//! The class Cut provides Boolean cut operation
|
||||
//! between arguments and tools (Boolean Subtraction).
|
||||
class BRepAlgoAPI_Cut : public BRepAlgoAPI_BooleanOperation
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Empty constructor
|
||||
Standard_EXPORT BRepAlgoAPI_Cut();
|
||||
Standard_EXPORT virtual ~BRepAlgoAPI_Cut();
|
||||
|
||||
//! Empty constructor
|
||||
//! <PF> - PaveFiller object that is carried out
|
||||
Standard_EXPORT BRepAlgoAPI_Cut(const BOPAlgo_PaveFiller& PF);
|
||||
|
||||
//! Constructor with two shapes
|
||||
//! <S1> -argument
|
||||
//! <S2> -tool
|
||||
//! <anOperation> - the type of the operation
|
||||
//! Obsolete
|
||||
Standard_EXPORT BRepAlgoAPI_Cut(const TopoDS_Shape& S1, const TopoDS_Shape& S2);
|
||||
|
||||
//! Constructor with two shapes
|
||||
//! <S1> -argument
|
||||
//! <S2> -tool
|
||||
//! <anOperation> - the type of the operation
|
||||
//! <PF> - PaveFiller object that is carried out
|
||||
//! Obsolete
|
||||
Standard_EXPORT BRepAlgoAPI_Cut(const TopoDS_Shape& S1, const TopoDS_Shape& S2, const BOPAlgo_PaveFiller& aDSF, const Standard_Boolean bFWD = Standard_True);
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _BRepAlgoAPI_Cut_HeaderFile
|
@@ -1,58 +0,0 @@
|
||||
-- Created on: 1993-10-14
|
||||
-- Created by: Remi LEQUETTE
|
||||
-- Copyright (c) 1993-1999 Matra Datavision
|
||||
-- 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 Fuse from BRepAlgoAPI
|
||||
inherits BooleanOperation from BRepAlgoAPI
|
||||
|
||||
---Purpose:
|
||||
-- The class provides Boolean fusion operation
|
||||
-- between arguments and tools (Boolean Union).
|
||||
|
||||
uses
|
||||
Shape from TopoDS,
|
||||
PaveFiller from BOPAlgo
|
||||
|
||||
is
|
||||
|
||||
Create
|
||||
returns Fuse from BRepAlgoAPI;
|
||||
---C++: alias "Standard_EXPORT virtual ~BRepAlgoAPI_Fuse();"
|
||||
--- Purpose: Empty constructor
|
||||
|
||||
Create (PF: PaveFiller from BOPAlgo)
|
||||
returns Fuse from BRepAlgoAPI;
|
||||
--- Purpose: Empty constructor
|
||||
-- <PF> - PaveFiller object that is carried out
|
||||
|
||||
Create (S1,S2 : Shape from TopoDS)
|
||||
returns Fuse from BRepAlgoAPI;
|
||||
---Purpose: Constructor with two shapes
|
||||
-- <S1> -argument
|
||||
-- <S2> -tool
|
||||
-- <anOperation> - the type of the operation
|
||||
-- Obsolete
|
||||
|
||||
Create (S1,S2 : Shape from TopoDS;
|
||||
aDSF:PaveFiller from BOPAlgo)
|
||||
returns Fuse from BRepAlgoAPI;
|
||||
---Purpose: Constructor with two shapes
|
||||
-- <S1> -argument
|
||||
-- <S2> -tool
|
||||
-- <anOperation> - the type of the operation
|
||||
-- <PF> - PaveFiller object that is carried out
|
||||
-- Obsolete
|
||||
|
||||
end Fuse;
|
@@ -14,9 +14,11 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <BRepAlgoAPI_Fuse.ixx>
|
||||
|
||||
#include <BOPAlgo_PaveFiller.hxx>
|
||||
#include <BRepAlgoAPI_BooleanOperation.hxx>
|
||||
#include <BRepAlgoAPI_Fuse.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : BRepAlgoAPI_Fuse
|
||||
|
85
src/BRepAlgoAPI/BRepAlgoAPI_Fuse.hxx
Normal file
85
src/BRepAlgoAPI/BRepAlgoAPI_Fuse.hxx
Normal file
@@ -0,0 +1,85 @@
|
||||
// Created on: 1993-10-14
|
||||
// Created by: Remi LEQUETTE
|
||||
// Copyright (c) 1993-1999 Matra Datavision
|
||||
// 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 _BRepAlgoAPI_Fuse_HeaderFile
|
||||
#define _BRepAlgoAPI_Fuse_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <BRepAlgoAPI_BooleanOperation.hxx>
|
||||
class BOPAlgo_PaveFiller;
|
||||
class TopoDS_Shape;
|
||||
|
||||
|
||||
|
||||
//! The class provides Boolean fusion operation
|
||||
//! between arguments and tools (Boolean Union).
|
||||
class BRepAlgoAPI_Fuse : public BRepAlgoAPI_BooleanOperation
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Empty constructor
|
||||
Standard_EXPORT BRepAlgoAPI_Fuse();
|
||||
Standard_EXPORT virtual ~BRepAlgoAPI_Fuse();
|
||||
|
||||
//! Empty constructor
|
||||
//! <PF> - PaveFiller object that is carried out
|
||||
Standard_EXPORT BRepAlgoAPI_Fuse(const BOPAlgo_PaveFiller& PF);
|
||||
|
||||
//! Constructor with two shapes
|
||||
//! <S1> -argument
|
||||
//! <S2> -tool
|
||||
//! <anOperation> - the type of the operation
|
||||
//! Obsolete
|
||||
Standard_EXPORT BRepAlgoAPI_Fuse(const TopoDS_Shape& S1, const TopoDS_Shape& S2);
|
||||
|
||||
//! Constructor with two shapes
|
||||
//! <S1> -argument
|
||||
//! <S2> -tool
|
||||
//! <anOperation> - the type of the operation
|
||||
//! <PF> - PaveFiller object that is carried out
|
||||
//! Obsolete
|
||||
Standard_EXPORT BRepAlgoAPI_Fuse(const TopoDS_Shape& S1, const TopoDS_Shape& S2, const BOPAlgo_PaveFiller& aDSF);
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _BRepAlgoAPI_Fuse_HeaderFile
|
@@ -1,293 +0,0 @@
|
||||
-- Created on: 1994-02-18
|
||||
-- Created by: Remi LEQUETTE
|
||||
-- Copyright (c) 1994-1999 Matra Datavision
|
||||
-- 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.
|
||||
|
||||
-- modified by Michael KLOKOV Wed Mar 6 15:01:25 2002
|
||||
|
||||
class Section from BRepAlgoAPI
|
||||
inherits BooleanOperation from BRepAlgoAPI
|
||||
|
||||
---Purpose:
|
||||
-- The algorithm is to build a Secton operation between arguments and tools.
|
||||
-- The result of Section operation consists of vertices and edges.
|
||||
-- The result of Section operation 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
|
||||
-- --
|
||||
|
||||
-- Default values:
|
||||
-- - geometries built are NOT approximated.
|
||||
-- - PCurves are NOT computed on both parts.
|
||||
|
||||
-- Example of use:
|
||||
-- Standard_Boolean bRunParallel;
|
||||
-- Standard_Integer iErr;
|
||||
-- BRepAlgoAPI_Section aSection;
|
||||
-- //
|
||||
-- bRunParallel=...; // turn parallelism on/off
|
||||
-- const TopTools_ListOfShape& aLS=...; // Arguments
|
||||
-- const TopTools_ListOfShape& aLT=...; // Tools
|
||||
-- //
|
||||
-- aSection.SetRunParallel();
|
||||
-- aSection.SetArguments(aLS);
|
||||
-- aSection.SetTools(aLT);
|
||||
-- aSection.Approximation(Standard_True);
|
||||
-- //
|
||||
-- aSection.Build(); // perform the algorithm
|
||||
-- iErr=pBuilder->ErrorStatus();
|
||||
-- if (iErr) {
|
||||
-- // errors occured
|
||||
-- return 0;
|
||||
-- }
|
||||
-- //
|
||||
-- const TopoDS_Shape& aR=aSection.Shape();// the result
|
||||
-- //...
|
||||
|
||||
|
||||
uses
|
||||
Pln from gp,
|
||||
Shape from TopoDS,
|
||||
Surface from Geom,
|
||||
Curve from Geom2d,
|
||||
PaveFiller from BOPAlgo,
|
||||
Operation from BOPAlgo,
|
||||
ListOfShape from TopTools,
|
||||
BaseAllocator from BOPCol
|
||||
|
||||
is
|
||||
Create
|
||||
returns Section from BRepAlgoAPI;
|
||||
---C++: alias "Standard_EXPORT virtual ~BRepAlgoAPI_Section();"
|
||||
--- Purpose: Empty constructor
|
||||
|
||||
Create (PF: PaveFiller from BOPAlgo)
|
||||
returns Section from BRepAlgoAPI;
|
||||
--- Purpose: Empty constructor
|
||||
-- <PF> - PaveFiller object that is carried out
|
||||
|
||||
Create(S1 : Shape from TopoDS;
|
||||
S2 : Shape from TopoDS;
|
||||
PerformNow : Boolean = Standard_True)
|
||||
returns Section from BRepAlgoAPI;
|
||||
---Purpose: Constructor with two shapes
|
||||
-- <S1> -argument
|
||||
-- <S2> -tool
|
||||
-- <PerformNow> - the flag:
|
||||
-- if <PerformNow>=True - the algorithm is performed immediatly
|
||||
-- Obsolete
|
||||
|
||||
Create (S1 : Shape from TopoDS;
|
||||
S2 : Shape from TopoDS;
|
||||
aDSF:PaveFiller from BOPAlgo;
|
||||
PerformNow : Boolean = Standard_True)
|
||||
returns Section from BRepAlgoAPI;
|
||||
---Purpose: Constructor with two shapes
|
||||
-- <S1> -argument
|
||||
-- <S2> -tool
|
||||
-- <PF> - PaveFiller object that is carried out
|
||||
-- <PerformNow> - the flag:
|
||||
-- if <PerformNow>=True - the algorithm is performed immediatly
|
||||
-- Obsolete
|
||||
|
||||
Create(S1 : Shape from TopoDS;
|
||||
Pl : Pln from gp;
|
||||
PerformNow : Boolean = Standard_True)
|
||||
returns Section from BRepAlgoAPI;
|
||||
---Purpose: Constructor with two shapes
|
||||
-- <S1> - argument
|
||||
-- <Pl> - tool
|
||||
-- <PerformNow> - the flag:
|
||||
-- if <PerformNow>=True - the algorithm is performed immediatly
|
||||
-- Obsolete
|
||||
|
||||
|
||||
Create(S1 : Shape from TopoDS;
|
||||
Sf : Surface from Geom;
|
||||
PerformNow : Boolean = Standard_True)
|
||||
returns Section from BRepAlgoAPI;
|
||||
---Purpose: Constructor with two shapes
|
||||
-- <S1> - argument
|
||||
-- <Sf> - tool
|
||||
-- <PerformNow> - the flag:
|
||||
-- if <PerformNow>=True - the algorithm is performed immediatly
|
||||
-- Obsolete
|
||||
|
||||
|
||||
Create(Sf : Surface from Geom;
|
||||
S2 : Shape from TopoDS;
|
||||
PerformNow : Boolean = Standard_True)
|
||||
returns Section from BRepAlgoAPI;
|
||||
---Purpose: Constructor with two shapes
|
||||
-- <Sf> - argument
|
||||
-- <S2> - tool
|
||||
-- <PerformNow> - the flag:
|
||||
-- if <PerformNow>=True - the algorithm is performed immediatly
|
||||
-- Obsolete
|
||||
|
||||
Create(Sf1 : Surface from Geom;
|
||||
Sf2 : Surface from Geom;
|
||||
PerformNow : Boolean = Standard_True)
|
||||
returns Section from BRepAlgoAPI;
|
||||
---Purpose:
|
||||
---Purpose: Constructor with two shapes
|
||||
-- <Sf1> - argument
|
||||
-- <Sf2> - tool
|
||||
-- <PerformNow> - the flag:
|
||||
-- if <PerformNow>=True - the algorithm is performed immediatly
|
||||
-- Obsolete
|
||||
|
||||
Init1(me : out;
|
||||
S1 : Shape from TopoDS);
|
||||
---Purpose: initialize the argument
|
||||
-- <S1> - argument
|
||||
-- Obsolete
|
||||
|
||||
Init1(me : out;
|
||||
Pl : Pln from gp);
|
||||
---Purpose: initialize the argument
|
||||
-- <Pl> - argument
|
||||
-- Obsolete
|
||||
|
||||
Init1(me : out;
|
||||
Sf : Surface from Geom);
|
||||
---Purpose: initialize the argument
|
||||
-- <Sf> - argument
|
||||
-- Obsolete
|
||||
|
||||
Init2(me : out;
|
||||
S2 : Shape from TopoDS);
|
||||
---Purpose: initialize the tool
|
||||
-- <S2> - tool
|
||||
-- Obsolete
|
||||
|
||||
Init2(me : out;
|
||||
Pl : Pln from gp);
|
||||
---Purpose: initialize the tool
|
||||
-- <Pl> - tool
|
||||
-- Obsolete
|
||||
|
||||
Init2(me : out;
|
||||
Sf : Surface from Geom);
|
||||
---Purpose: initialize the tool
|
||||
-- <Sf> - tool
|
||||
-- Obsolete
|
||||
|
||||
Approximation(me : out;
|
||||
B : Boolean from Standard);
|
||||
---Purpose:
|
||||
--Defines an option for computation
|
||||
-- of further intersections.
|
||||
-- By default, the underlying 3D geometry attached to each
|
||||
-- elementary edge of the result is:
|
||||
-- - analytic where possible, provided the corresponding
|
||||
-- geometry corresponds to a type of analytic curve defined in
|
||||
-- - or elsewhere, given as a succession of points grouped
|
||||
-- together in a BSpline curve of degree 1.
|
||||
-- If Approx equals true, these edges will have an attached 3D
|
||||
-- geometry which is a BSpline approximation of the computed
|
||||
-- set of points.
|
||||
-- Note that as a result, approximations will be computed
|
||||
-- on edges built only on new intersection curves.
|
||||
|
||||
ComputePCurveOn1(me : out;
|
||||
B : Boolean from Standard);
|
||||
---Purpose:
|
||||
-- Indicates whether the P-Curve should be (or not)
|
||||
-- performed on the argument.
|
||||
-- By default, no parametric 2D curve (pcurve) is defined for the
|
||||
-- edges of the result.
|
||||
-- If ComputePCurve1 equals true, further computations performed
|
||||
-- to attach an P-Curve in the parametric space of the argument
|
||||
-- to the constructed edges.
|
||||
-- Obsolete
|
||||
|
||||
ComputePCurveOn2(me : out;
|
||||
B : Boolean from Standard);
|
||||
---Purpose:
|
||||
-- Indicates whether the P-Curve should be (or not)
|
||||
-- performed on the tool.
|
||||
-- By default, no parametric 2D curve (pcurve) is defined for the
|
||||
-- edges of the result.
|
||||
-- If ComputePCurve1 equals true, further computations performed
|
||||
-- to attach an P-Curve in the parametric space of the tool
|
||||
-- to the constructed edges.
|
||||
-- Obsolete
|
||||
|
||||
Build(me : in out)
|
||||
is redefined;
|
||||
---Purpose: Performs the algorithm
|
||||
-- Filling interference Data Structure (if it is necessary)
|
||||
-- Building the result of the operation.
|
||||
|
||||
HasAncestorFaceOn1(me;
|
||||
E : Shape from TopoDS;
|
||||
F : out Shape from TopoDS)
|
||||
returns Boolean from Standard;
|
||||
---Purpose:
|
||||
-- get the face of the first part giving section edge <E>.
|
||||
-- Returns True on the 3 following conditions :
|
||||
-- 1/ <E> is an edge returned by the Shape() metwod.
|
||||
-- 2/ First part of section performed is a shape.
|
||||
-- 3/ <E> is built on a intersection curve (i.e <E>
|
||||
-- is not the result of common edges)
|
||||
-- When False, F remains untouched.
|
||||
-- Obsolete
|
||||
|
||||
HasAncestorFaceOn2(me;
|
||||
E : Shape from TopoDS;
|
||||
F : out Shape from TopoDS)
|
||||
returns Boolean from Standard;
|
||||
---Purpose: Identifies the ancestor faces of
|
||||
-- the intersection edge E resulting from the last
|
||||
-- computation performed in this framework, that is, the faces of
|
||||
-- the two original shapes on which the edge E lies:
|
||||
-- - HasAncestorFaceOn1 gives the ancestor face in the first shape, and
|
||||
-- - HasAncestorFaceOn2 gives the ancestor face in the second shape.
|
||||
-- These functions return true if an ancestor face F is found, or false if not.
|
||||
-- An ancestor face is identifiable for the edge E if the following
|
||||
-- conditions are satisfied:
|
||||
-- - the first part on which this algorithm performed its
|
||||
-- last computation is a shape, that is, it was not given as
|
||||
-- a surface or a plane at the time of construction of this
|
||||
-- algorithm or at a later time by the Init1 function,
|
||||
-- - E is one of the elementary edges built by the
|
||||
-- last computation of this section algorithm.
|
||||
-- To use these functions properly, you have to test the returned
|
||||
-- Boolean value before using the ancestor face: F is significant
|
||||
-- only if the returned Boolean value equals true.
|
||||
-- Obsolete
|
||||
|
||||
--
|
||||
-- protected methods
|
||||
--
|
||||
Init(me: out;
|
||||
PerformNow : Boolean)
|
||||
is protected;
|
||||
|
||||
SetAttributes (me:out)
|
||||
is redefined protected;
|
||||
|
||||
fields
|
||||
myParametersChanged : Boolean from Standard;
|
||||
myApprox : Boolean from Standard;
|
||||
myComputePCurve1 : Boolean from Standard;
|
||||
myComputePCurve2 : Boolean from Standard;
|
||||
|
||||
end Section from BRepAlgoAPI;
|
@@ -17,25 +17,24 @@
|
||||
// modified by Michael KLOKOV Wed Mar 6 15:01:25 2002
|
||||
// modified by Eugeny MALTCHIKOV Wed Jul 04 11:13:01 2012
|
||||
|
||||
#include <BRepAlgoAPI_Section.ixx>
|
||||
|
||||
|
||||
#include <BOPAlgo_BOP.hxx>
|
||||
#include <BOPAlgo_PaveFiller.hxx>
|
||||
#include <BOPAlgo_Section.hxx>
|
||||
#include <BOPDS_DS.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <BRepAlgoAPI_Section.hxx>
|
||||
#include <BRepBuilderAPI_MakeFace.hxx>
|
||||
#include <BRepBuilderAPI_MakeShell.hxx>
|
||||
#include <Geom_Plane.hxx>
|
||||
#include <Geom2d_TrimmedCurve.hxx>
|
||||
|
||||
#include <Geom_Plane.hxx>
|
||||
#include <Geom_Surface.hxx>
|
||||
#include <gp_Pln.hxx>
|
||||
#include <TopExp.hxx>
|
||||
#include <TopTools_IndexedMapOfShape.hxx>
|
||||
#include <TopTools_MapOfShape.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Face.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
|
||||
#include <BOPDS_DS.hxx>
|
||||
#include <BOPAlgo_PaveFiller.hxx>
|
||||
#include <BOPAlgo_BOP.hxx>
|
||||
#include <BOPAlgo_Section.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TopTools_IndexedMapOfShape.hxx>
|
||||
#include <TopTools_MapOfShape.hxx>
|
||||
|
||||
//
|
||||
static
|
||||
|
226
src/BRepAlgoAPI/BRepAlgoAPI_Section.hxx
Normal file
226
src/BRepAlgoAPI/BRepAlgoAPI_Section.hxx
Normal file
@@ -0,0 +1,226 @@
|
||||
// Created on: 1994-02-18
|
||||
// Created by: Remi LEQUETTE
|
||||
// Copyright (c) 1994-1999 Matra Datavision
|
||||
// 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 _BRepAlgoAPI_Section_HeaderFile
|
||||
#define _BRepAlgoAPI_Section_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <BRepAlgoAPI_BooleanOperation.hxx>
|
||||
class BOPAlgo_PaveFiller;
|
||||
class TopoDS_Shape;
|
||||
class gp_Pln;
|
||||
class Geom_Surface;
|
||||
|
||||
|
||||
|
||||
//! The algorithm is to build a Secton operation between arguments and tools.
|
||||
//! The result of Section operation consists of vertices and edges.
|
||||
//! The result of Section operation 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 BRepAlgoAPI_Section : public BRepAlgoAPI_BooleanOperation
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Empty constructor
|
||||
Standard_EXPORT BRepAlgoAPI_Section();
|
||||
Standard_EXPORT virtual ~BRepAlgoAPI_Section();
|
||||
|
||||
//! Empty constructor
|
||||
//! <PF> - PaveFiller object that is carried out
|
||||
Standard_EXPORT BRepAlgoAPI_Section(const BOPAlgo_PaveFiller& PF);
|
||||
|
||||
//! Constructor with two shapes
|
||||
//! <S1> -argument
|
||||
//! <S2> -tool
|
||||
//! <PerformNow> - the flag:
|
||||
//! if <PerformNow>=True - the algorithm is performed immediatly
|
||||
//! Obsolete
|
||||
Standard_EXPORT BRepAlgoAPI_Section(const TopoDS_Shape& S1, const TopoDS_Shape& S2, const Standard_Boolean PerformNow = Standard_True);
|
||||
|
||||
//! Constructor with two shapes
|
||||
//! <S1> -argument
|
||||
//! <S2> -tool
|
||||
//! <PF> - PaveFiller object that is carried out
|
||||
//! <PerformNow> - the flag:
|
||||
//! if <PerformNow>=True - the algorithm is performed immediatly
|
||||
//! Obsolete
|
||||
Standard_EXPORT BRepAlgoAPI_Section(const TopoDS_Shape& S1, const TopoDS_Shape& S2, const BOPAlgo_PaveFiller& aDSF, const Standard_Boolean PerformNow = Standard_True);
|
||||
|
||||
//! Constructor with two shapes
|
||||
//! <S1> - argument
|
||||
//! <Pl> - tool
|
||||
//! <PerformNow> - the flag:
|
||||
//! if <PerformNow>=True - the algorithm is performed immediatly
|
||||
//! Obsolete
|
||||
Standard_EXPORT BRepAlgoAPI_Section(const TopoDS_Shape& S1, const gp_Pln& Pl, const Standard_Boolean PerformNow = Standard_True);
|
||||
|
||||
//! Constructor with two shapes
|
||||
//! <S1> - argument
|
||||
//! <Sf> - tool
|
||||
//! <PerformNow> - the flag:
|
||||
//! if <PerformNow>=True - the algorithm is performed immediatly
|
||||
//! Obsolete
|
||||
Standard_EXPORT BRepAlgoAPI_Section(const TopoDS_Shape& S1, const Handle(Geom_Surface)& Sf, const Standard_Boolean PerformNow = Standard_True);
|
||||
|
||||
//! Constructor with two shapes
|
||||
//! <Sf> - argument
|
||||
//! <S2> - tool
|
||||
//! <PerformNow> - the flag:
|
||||
//! if <PerformNow>=True - the algorithm is performed immediatly
|
||||
//! Obsolete
|
||||
Standard_EXPORT BRepAlgoAPI_Section(const Handle(Geom_Surface)& Sf, const TopoDS_Shape& S2, const Standard_Boolean PerformNow = Standard_True);
|
||||
|
||||
//! Constructor with two shapes
|
||||
//! <Sf1> - argument
|
||||
//! <Sf2> - tool
|
||||
//! <PerformNow> - the flag:
|
||||
//! if <PerformNow>=True - the algorithm is performed immediatly
|
||||
//! Obsolete
|
||||
Standard_EXPORT BRepAlgoAPI_Section(const Handle(Geom_Surface)& Sf1, const Handle(Geom_Surface)& Sf2, const Standard_Boolean PerformNow = Standard_True);
|
||||
|
||||
//! initialize the argument
|
||||
//! <S1> - argument
|
||||
//! Obsolete
|
||||
Standard_EXPORT void Init1 (const TopoDS_Shape& S1);
|
||||
|
||||
//! initialize the argument
|
||||
//! <Pl> - argument
|
||||
//! Obsolete
|
||||
Standard_EXPORT void Init1 (const gp_Pln& Pl);
|
||||
|
||||
//! initialize the argument
|
||||
//! <Sf> - argument
|
||||
//! Obsolete
|
||||
Standard_EXPORT void Init1 (const Handle(Geom_Surface)& Sf);
|
||||
|
||||
//! initialize the tool
|
||||
//! <S2> - tool
|
||||
//! Obsolete
|
||||
Standard_EXPORT void Init2 (const TopoDS_Shape& S2);
|
||||
|
||||
//! initialize the tool
|
||||
//! <Pl> - tool
|
||||
//! Obsolete
|
||||
Standard_EXPORT void Init2 (const gp_Pln& Pl);
|
||||
|
||||
//! initialize the tool
|
||||
//! <Sf> - tool
|
||||
//! Obsolete
|
||||
Standard_EXPORT void Init2 (const Handle(Geom_Surface)& Sf);
|
||||
|
||||
Standard_EXPORT void Approximation (const Standard_Boolean B);
|
||||
|
||||
|
||||
//! Indicates whether the P-Curve should be (or not)
|
||||
//! performed on the argument.
|
||||
//! By default, no parametric 2D curve (pcurve) is defined for the
|
||||
//! edges of the result.
|
||||
//! If ComputePCurve1 equals true, further computations performed
|
||||
//! to attach an P-Curve in the parametric space of the argument
|
||||
//! to the constructed edges.
|
||||
//! Obsolete
|
||||
Standard_EXPORT void ComputePCurveOn1 (const Standard_Boolean B);
|
||||
|
||||
|
||||
//! Indicates whether the P-Curve should be (or not)
|
||||
//! performed on the tool.
|
||||
//! By default, no parametric 2D curve (pcurve) is defined for the
|
||||
//! edges of the result.
|
||||
//! If ComputePCurve1 equals true, further computations performed
|
||||
//! to attach an P-Curve in the parametric space of the tool
|
||||
//! to the constructed edges.
|
||||
//! Obsolete
|
||||
Standard_EXPORT void ComputePCurveOn2 (const Standard_Boolean B);
|
||||
|
||||
//! Performs the algorithm
|
||||
//! Filling interference Data Structure (if it is necessary)
|
||||
//! Building the result of the operation.
|
||||
Standard_EXPORT virtual void Build() Standard_OVERRIDE;
|
||||
|
||||
|
||||
//! get the face of the first part giving section edge <E>.
|
||||
//! Returns True on the 3 following conditions :
|
||||
//! 1/ <E> is an edge returned by the Shape() metwod.
|
||||
//! 2/ First part of section performed is a shape.
|
||||
//! 3/ <E> is built on a intersection curve (i.e <E>
|
||||
//! is not the result of common edges)
|
||||
//! When False, F remains untouched.
|
||||
//! Obsolete
|
||||
Standard_EXPORT Standard_Boolean HasAncestorFaceOn1 (const TopoDS_Shape& E, TopoDS_Shape& F) const;
|
||||
|
||||
//! Identifies the ancestor faces of
|
||||
//! the intersection edge E resulting from the last
|
||||
//! computation performed in this framework, that is, the faces of
|
||||
//! the two original shapes on which the edge E lies:
|
||||
//! - HasAncestorFaceOn1 gives the ancestor face in the first shape, and
|
||||
//! - HasAncestorFaceOn2 gives the ancestor face in the second shape.
|
||||
//! These functions return true if an ancestor face F is found, or false if not.
|
||||
//! An ancestor face is identifiable for the edge E if the following
|
||||
//! conditions are satisfied:
|
||||
//! - the first part on which this algorithm performed its
|
||||
//! last computation is a shape, that is, it was not given as
|
||||
//! a surface or a plane at the time of construction of this
|
||||
//! algorithm or at a later time by the Init1 function,
|
||||
//! - E is one of the elementary edges built by the
|
||||
//! last computation of this section algorithm.
|
||||
//! To use these functions properly, you have to test the returned
|
||||
//! Boolean value before using the ancestor face: F is significant
|
||||
//! only if the returned Boolean value equals true.
|
||||
//! Obsolete
|
||||
Standard_EXPORT Standard_Boolean HasAncestorFaceOn2 (const TopoDS_Shape& E, TopoDS_Shape& F) const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
Standard_EXPORT void Init (const Standard_Boolean PerformNow);
|
||||
|
||||
Standard_EXPORT virtual void SetAttributes() Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Standard_Boolean myParametersChanged;
|
||||
Standard_Boolean myApprox;
|
||||
Standard_Boolean myComputePCurve1;
|
||||
Standard_Boolean myComputePCurve2;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _BRepAlgoAPI_Section_HeaderFile
|
16
src/BRepAlgoAPI/FILES
Normal file
16
src/BRepAlgoAPI/FILES
Normal file
@@ -0,0 +1,16 @@
|
||||
BRepAlgoAPI_Algo.cxx
|
||||
BRepAlgoAPI_Algo.hxx
|
||||
BRepAlgoAPI_BooleanOperation.cxx
|
||||
BRepAlgoAPI_BooleanOperation.hxx
|
||||
BRepAlgoAPI_BuilderAlgo.cxx
|
||||
BRepAlgoAPI_BuilderAlgo.hxx
|
||||
BRepAlgoAPI_Check.cxx
|
||||
BRepAlgoAPI_Check.hxx
|
||||
BRepAlgoAPI_Common.cxx
|
||||
BRepAlgoAPI_Common.hxx
|
||||
BRepAlgoAPI_Cut.cxx
|
||||
BRepAlgoAPI_Cut.hxx
|
||||
BRepAlgoAPI_Fuse.cxx
|
||||
BRepAlgoAPI_Fuse.hxx
|
||||
BRepAlgoAPI_Section.cxx
|
||||
BRepAlgoAPI_Section.hxx
|
Reference in New Issue
Block a user