0030675: Visualization - remove redundant proxy classes in hierarchy of PrsMgr_Presen...
[occt.git] / src / LocOpe / LocOpe_SplitDrafts.hxx
CommitLineData
42cf5bc1 1// Created on: 1996-10-02
2// Created by: Jacques GOUSSARD
3// Copyright (c) 1996-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_SplitDrafts_HeaderFile
18#define _LocOpe_SplitDrafts_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <TopoDS_Shape.hxx>
25#include <TopTools_DataMapOfShapeListOfShape.hxx>
26#include <Standard_Real.hxx>
27#include <Standard_Boolean.hxx>
28#include <TopTools_ListOfShape.hxx>
29class StdFail_NotDone;
30class Standard_NoSuchObject;
31class Standard_ConstructionError;
32class Standard_NullObject;
33class TopoDS_Shape;
34class TopoDS_Face;
35class TopoDS_Wire;
36class gp_Dir;
37class gp_Pln;
38
39
40//! This class provides a tool to realize the
41//! following operations on a shape :
42//! - split a face of the shape with a wire,
43//! - put draft angle on both side of the wire.
44//! For each side, the draft angle may be different.
45class LocOpe_SplitDrafts
46{
47public:
48
49 DEFINE_STANDARD_ALLOC
50
51
52 //! Empty constructor.
53 LocOpe_SplitDrafts();
54
55 //! Creates the algoritm on the shape <S>.
56 LocOpe_SplitDrafts(const TopoDS_Shape& S);
57
58 //! Initializes the algoritm with the shape <S>.
59 Standard_EXPORT void Init (const TopoDS_Shape& S);
60
61 //! Splits the face <F> of the former given shape with
62 //! the wire <W>. The wire is assumed to lie on the
63 //! face. Puts a draft angle on both parts of the
64 //! wire. <Extractg>, <Nplg>, <Angleg> define the
65 //! arguments for the left part of the wire.
66 //! <Extractd>, <Npld>, <Angled> define the arguments
67 //! for the right part of the wire. The draft angle is
68 //! measured with the direction <Extract>. <Npl>
69 //! defines the neutral plane (points belonging to the
70 //! neutral plane are not modified). <Angle> is the
71 //! value of the draft angle. If <ModifyLeft> is set
72 //! to <Standard_False>, no draft angle is applied to
73 //! the left part of the wire. If <ModifyRight> is set
74 //! to <Standard_False>,no draft angle is applied to
75 //! the right part of the wire.
76 Standard_EXPORT void Perform (const TopoDS_Face& F, const TopoDS_Wire& W, const gp_Dir& Extractg, const gp_Pln& NPlg, const Standard_Real Angleg, const gp_Dir& Extractd, const gp_Pln& NPld, const Standard_Real Angled, const Standard_Boolean ModifyLeft = Standard_True, const Standard_Boolean ModifyRight = Standard_True);
77
78 //! Splits the face <F> of the former given shape with
79 //! the wire <W>. The wire is assumed to lie on the
80 //! face. Puts a draft angle on the left part of the
81 //! wire. The draft angle is measured with the
82 //! direction <Extract>. <Npl> defines the neutral
83 //! plane (points belonging to the neutral plane are
84 //! not modified). <Angle> is the value of the draft
85 //! angle.
86 Standard_EXPORT void Perform (const TopoDS_Face& F, const TopoDS_Wire& W, const gp_Dir& Extract, const gp_Pln& NPl, const Standard_Real Angle);
87
88 //! Returns <Standard_True> if the modification has
89 //! been succesfully performed.
90 Standard_Boolean IsDone() const;
91
92 const TopoDS_Shape& OriginalShape() const;
93
94 //! Returns the modified shape.
95 Standard_EXPORT const TopoDS_Shape& Shape() const;
96
97 //! Manages the descendant shapes.
98 Standard_EXPORT const TopTools_ListOfShape& ShapesFromShape (const TopoDS_Shape& S) const;
99
100
101
102
103protected:
104
105
106
107
108
109private:
110
111
112
113 TopoDS_Shape myShape;
114 TopoDS_Shape myResult;
115 TopTools_DataMapOfShapeListOfShape myMap;
116
117
118};
119
120
121#include <LocOpe_SplitDrafts.lxx>
122
123
124
125
126
127#endif // _LocOpe_SplitDrafts_HeaderFile