0031682: Visualization - Prs3d_ShadingAspect::SetTransparency() has no effect with...
[occt.git] / src / BRepOffsetAPI / BRepOffsetAPI_MakeDraft.hxx
CommitLineData
42cf5bc1 1// Created on: 1999-01-13
2// Created by: Philippe MANGIN
3// Copyright (c) 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 _BRepOffsetAPI_MakeDraft_HeaderFile
18#define _BRepOffsetAPI_MakeDraft_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <BRepFill_Draft.hxx>
25#include <BRepBuilderAPI_MakeShape.hxx>
26#include <Standard_Real.hxx>
27#include <BRepBuilderAPI_TransitionMode.hxx>
28#include <Standard_Boolean.hxx>
29#include <TopTools_ListOfShape.hxx>
30class StdFail_NotDone;
31class Standard_NoSuchObject;
32class TopoDS_Shape;
33class gp_Dir;
34class Geom_Surface;
35class TopoDS_Shell;
36
37
38//! Build a draft surface along a wire
39class BRepOffsetAPI_MakeDraft : public BRepBuilderAPI_MakeShape
40{
41public:
42
43 DEFINE_STANDARD_ALLOC
44
45
46 //! Constructs the draft surface object defined by the shape
47 //! Shape, the direction Dir, and the angle Angle.
48 //! Shape must be a TopoDS_Wire, Topo_DS_Face or
49 //! TopoDS_Shell with free boundaries.
50 //! Exceptions
51 //! Standard_NotDone if Shape is not a TopoDS_Wire,
52 //! Topo_DS_Face or TopoDS_Shell with free boundaries.
53 Standard_EXPORT BRepOffsetAPI_MakeDraft(const TopoDS_Shape& Shape, const gp_Dir& Dir, const Standard_Real Angle);
54
55 //! Sets the options of this draft tool.
56 //! If a transition has to be performed, it can be defined by
57 //! the mode Style as RightCorner or RoundCorner,
58 //! RightCorner being a corner defined by a sharp angle,
59 //! and RoundCorner being a rounded corner.
60 //! AngleMin is an angular tolerance used to detect
61 //! whether a transition has to be performed or not.
62 //! AngleMax sets the maximum value within which a
63 //! RightCorner transition can be performed.
64 //! AngleMin and AngleMax are expressed in radians.
65 Standard_EXPORT void SetOptions (const BRepBuilderAPI_TransitionMode Style = BRepBuilderAPI_RightCorner, const Standard_Real AngleMin = 0.01, const Standard_Real AngleMax = 3.0);
66
67 //! Sets the direction of the draft for this object.
68 //! If IsInternal is true, the draft is internal to the argument
69 //! Shape used in the constructor.
70 Standard_EXPORT void SetDraft (const Standard_Boolean IsInternal = Standard_False);
71
72 //! Performs the draft using the length LengthMax as the
73 //! maximum length for the corner edge between two draft faces.
74 Standard_EXPORT void Perform (const Standard_Real LengthMax);
75
76 //! Performs the draft up to the surface Surface.
77 //! If KeepInsideSurface is true, the part of Surface inside
78 //! the draft is kept in the result.
79 Standard_EXPORT void Perform (const Handle(Geom_Surface)& Surface, const Standard_Boolean KeepInsideSurface = Standard_True);
80
81 //! Performs the draft up to the shape StopShape.
82 //! If KeepOutSide is true, the part of StopShape which is
83 //! outside the Draft is kept in the result.
84 Standard_EXPORT void Perform (const TopoDS_Shape& StopShape, const Standard_Boolean KeepOutSide = Standard_True);
85
86 //! Returns the shell resulting from performance of the
87 //! draft along the wire.
88 Standard_EXPORT TopoDS_Shell Shell() const;
89
90 //! Returns the list of shapes generated from the
91 //! shape <S>.
92 Standard_EXPORT virtual const TopTools_ListOfShape& Generated (const TopoDS_Shape& S) Standard_OVERRIDE;
93
94
95
96
97protected:
98
99
100
101
102
103private:
104
105
106
107 BRepFill_Draft myDraft;
108
109
110};
111
112
113
114
115
116
117
118#endif // _BRepOffsetAPI_MakeDraft_HeaderFile