0031682: Visualization - Prs3d_ShadingAspect::SetTransparency() has no effect with...
[occt.git] / src / BOPAlgo / BOPAlgo_Splitter.hxx
CommitLineData
c58055ad 1// Created by: Eugeny MALTCHIKOV
2// Copyright (c) 2017 OPEN CASCADE SAS
3//
4// This file is part of Open CASCADE Technology software library.
5//
6// This library is free software; you can redistribute it and/or modify it under
7// the terms of the GNU Lesser General Public License version 2.1 as published
8// by the Free Software Foundation, with special exception defined in the file
9// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10// distribution for complete text of the license and disclaimer of any warranty.
11//
12// Alternatively, this file may be used under the terms of Open CASCADE
13// commercial license or contractual agreement.
14
15#ifndef _BOPAlgo_Splitter_HeaderFile
16#define _BOPAlgo_Splitter_HeaderFile
17
18#include <Standard.hxx>
19#include <Standard_DefineAlloc.hxx>
20#include <Standard_Handle.hxx>
21
5fbe3d01 22#include <BOPAlgo_ToolsProvider.hxx>
c58055ad 23
aeee70d3 24//! The **Splitter algorithm** is the algorithm for splitting a group of
25//! arbitrary shapes by the other group of arbitrary shapes.<br>
26//! The arguments of the operation are divided on two groups:<br>
27//! *Objects* - shapes that will be split;<br>
28//! *Tools* - shapes by which the *Objects* will be split.<br>
29//! The result of the operation contains only the split parts
30//! of the shapes from the group of *Objects*.<br>
31//! The split parts of the shapes from the group of *Tools* are excluded
32//! from the result.<br>
33//! The shapes can be split by the other shapes from the same group
34//! (in case these shapes are interfering).
c58055ad 35//!
aeee70d3 36//! The class is a General Fuse based algorithm. Thus, all options
37//! of the General Fuse algorithm such as Fuzzy mode, safe processing mode,
38//! parallel processing mode, gluing mode and history support are also
39//! available in this algorithm.<br>
40//! There is no requirement on the existence of the *Tools* shapes.
41//! And if there are no *Tools* shapes, the result of the splitting
42//! operation will be equivalent to the General Fuse result.
c58055ad 43//!
44//! The implementation of the algorithm is minimal - only the methods
45//! CheckData() and Perform() have been overridden.<br>
46//! The method BOPAlgo_Builder::BuildResult(), which adds the split parts of the arguments
47//! into result, does not have to be overridden, because its native implementation
48//! performs the necessary actions for the Splitter algorithm - it adds
49//! the split parts of only Objects into result, avoiding the split parts of Tools.
5fbe3d01 50class BOPAlgo_Splitter : public BOPAlgo_ToolsProvider
c58055ad 51{
52public:
53
54 DEFINE_STANDARD_ALLOC
55
56 //! Empty constructor
57 Standard_EXPORT BOPAlgo_Splitter();
58 Standard_EXPORT virtual ~BOPAlgo_Splitter();
59
1155d05a 60 Standard_EXPORT BOPAlgo_Splitter(const Handle(NCollection_BaseAllocator)& theAllocator);
c58055ad 61
c58055ad 62 //! Performs the operation
63 Standard_EXPORT virtual void Perform() Standard_OVERRIDE;
64
65protected:
66
67 //! Checks the input data
68 Standard_EXPORT virtual void CheckData() Standard_OVERRIDE;
53a73fc1 69
70 //! Adds images of the argument shapes into result.
71 //! When called the for the last time (for compound) it rebuilds the result
72 //! shape to avoid multiple enclosure into compounds.
73 Standard_EXPORT virtual void BuildResult(const TopAbs_ShapeEnum theType) Standard_OVERRIDE;
74
c58055ad 75};
76
77#endif // _BOPAlgo_Splitter_HeaderFile