0031682: Visualization - Prs3d_ShadingAspect::SetTransparency() has no effect with...
[occt.git] / src / LocOpe / LocOpe_SplitShape.hxx
CommitLineData
42cf5bc1 1// Created on: 1995-07-11
2// Created by: Jacques GOUSSARD
3// Copyright (c) 1995-1999 Matra Datavision
4// Copyright (c) 1999-2014 OPEN CASCADE SAS
5//
6// This file is part of Open CASCADE Technology software library.
7//
8// This library is free software; you can redistribute it and/or modify it under
9// the terms of the GNU Lesser General Public License version 2.1 as published
10// by the Free Software Foundation, with special exception defined in the file
11// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12// distribution for complete text of the license and disclaimer of any warranty.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _LocOpe_SplitShape_HeaderFile
18#define _LocOpe_SplitShape_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <Standard_Boolean.hxx>
25#include <TopoDS_Shape.hxx>
26#include <TopTools_DataMapOfShapeListOfShape.hxx>
27#include <TopTools_MapOfShape.hxx>
28#include <TopTools_ListOfShape.hxx>
29#include <Standard_Real.hxx>
30class StdFail_NotDone;
31class Standard_ConstructionError;
32class Standard_NoSuchObject;
33class TopoDS_Shape;
34class TopoDS_Edge;
35class TopoDS_Vertex;
36class TopoDS_Wire;
37class TopoDS_Face;
38
39
40//! Provides a tool to cut :
41//! - edges with a vertices,
42//! - faces with wires,
43//! and rebuilds the shape containing the edges and
44//! the faces.
45class LocOpe_SplitShape
46{
47public:
48
49 DEFINE_STANDARD_ALLOC
50
51
52 //! Empty constructor.
53 LocOpe_SplitShape();
54
55 //! Creates the process with the shape <S>.
56 LocOpe_SplitShape(const TopoDS_Shape& S);
57
58 //! Initializes the process on the shape <S>.
59 Standard_EXPORT void Init (const TopoDS_Shape& S);
60
61 //! Tests if it is possible to split the edge <E>.
62 Standard_EXPORT Standard_Boolean CanSplit (const TopoDS_Edge& E) const;
63
64 //! Adds the vertex <V> on the edge <E>, at parameter <P>.
65 Standard_EXPORT void Add (const TopoDS_Vertex& V, const Standard_Real P, const TopoDS_Edge& E);
66
67 //! Adds the wire <W> on the face <F>.
aee24cb5 68 Standard_EXPORT Standard_Boolean Add (const TopoDS_Wire& W, const TopoDS_Face& F);
42cf5bc1 69
70 //! Adds the list of wires <Lwires> on the face <F>.
aee24cb5 71 Standard_EXPORT Standard_Boolean Add (const TopTools_ListOfShape& Lwires, const TopoDS_Face& F);
42cf5bc1 72
73 //! Returns the "original" shape.
74 const TopoDS_Shape& Shape() const;
75
76 //! Returns the list of descendant shapes of <S>.
77 Standard_EXPORT const TopTools_ListOfShape& DescendantShapes (const TopoDS_Shape& S);
78
79 //! Returns the "left" part defined by the wire <W> on
80 //! the face <F>. The returned list of shape is in
81 //! fact a list of faces. The face <F> is considered
82 //! with its topological orientation in the original
83 //! shape. <W> is considered with its orientation.
84 Standard_EXPORT const TopTools_ListOfShape& LeftOf (const TopoDS_Wire& W, const TopoDS_Face& F);
85
86
87
88
89protected:
90
91
92
93
94
95private:
96
97
aee24cb5 98 Standard_EXPORT Standard_Boolean AddOpenWire (const TopoDS_Wire& W, const TopoDS_Face& F);
42cf5bc1 99
aee24cb5 100 Standard_EXPORT Standard_Boolean AddClosedWire (const TopoDS_Wire& W, const TopoDS_Face& F);
42cf5bc1 101
102 Standard_EXPORT void Put (const TopoDS_Shape& S);
103
104 Standard_EXPORT Standard_Boolean Rebuild (const TopoDS_Shape& S);
105
106
107 Standard_Boolean myDone;
108 TopoDS_Shape myShape;
109 TopTools_DataMapOfShapeListOfShape myMap;
110 TopTools_MapOfShape myDblE;
111 TopTools_ListOfShape myLeft;
112
113
114};
115
116
117#include <LocOpe_SplitShape.lxx>
118
119
120
121
122
123#endif // _LocOpe_SplitShape_HeaderFile