0022048: Visualization, AIS_InteractiveContext - single object selection should alway...
[occt.git] / src / BRepOffsetAPI / BRepOffsetAPI_MakeThickSolid.hxx
CommitLineData
42cf5bc1 1// Created on: 1996-02-13
2// Created by: Yves FRICAUD
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 _BRepOffsetAPI_MakeThickSolid_HeaderFile
18#define _BRepOffsetAPI_MakeThickSolid_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <BRepOffsetAPI_MakeOffsetShape.hxx>
25#include <TopTools_ListOfShape.hxx>
26#include <Standard_Real.hxx>
27#include <BRepOffset_Mode.hxx>
28#include <Standard_Boolean.hxx>
29#include <GeomAbs_JoinType.hxx>
30class TopoDS_Shape;
31
32
33//! Describes functions to build hollowed solids.
34//! A hollowed solid is built from an initial solid and a set of
35//! faces on this solid, which are to be removed. The
36//! remaining faces of the solid become the walls of the
37//! hollowed solid, their thickness defined at the time of construction.
38//! the solid is built from an initial
39//! solid <S> and a set of faces {Fi} from <S>,
40//! builds a solid composed by two shells closed by
41//! the {Fi}. First shell <SS> is composed by all
42//! the faces of <S> expected {Fi}. Second shell is
43//! the offset shell of <SS>.
44//! A MakeThickSolid object provides a framework for:
45//! - defining the cross-section of a hollowed solid,
46//! - implementing the construction algorithm, and
47//! - consulting the result.
48class BRepOffsetAPI_MakeThickSolid : public BRepOffsetAPI_MakeOffsetShape
49{
50public:
51
52 DEFINE_STANDARD_ALLOC
53
8013367c 54 //! Constructor does nothing.
42cf5bc1 55 Standard_EXPORT BRepOffsetAPI_MakeThickSolid();
8013367c 56
57 //! Deprecated constructor. Please avoid usage of this constructor.
58 Standard_DEPRECATED("Deprecated constructor. Please use constructor without parameters and one of make methods.")
59 Standard_EXPORT BRepOffsetAPI_MakeThickSolid(const TopoDS_Shape& S,
60 const TopTools_ListOfShape& ClosingFaces,
61 const Standard_Real Offset,
62 const Standard_Real Tol,
63 const BRepOffset_Mode Mode = BRepOffset_Skin,
64 const Standard_Boolean Intersection = Standard_False,
65 const Standard_Boolean SelfInter = Standard_False,
66 const GeomAbs_JoinType Join = GeomAbs_Arc,
67 const Standard_Boolean RemoveIntEdges = Standard_False);
68
69 //! Constructs solid using simple algorithm.
70 //! According to its nature it is not possible to set list of the closing faces.
71 //! This algorithm does not support faces removing. It is caused by fact that
72 //! intersections are not computed during offset creation.
73 //! Non-closed shell or face is expected as input.
74 Standard_EXPORT void MakeThickSolidBySimple(const TopoDS_Shape& theS,
75 const Standard_Real theOffsetValue);
76
42cf5bc1 77 //! Constructs a hollowed solid from
78 //! the solid S by removing the set of faces ClosingFaces from S, where:
79 //! Offset defines the thickness of the walls. Its sign indicates
80 //! which side of the surface of the solid the hollowed shape is built on;
81 //! - Tol defines the tolerance criterion for coincidence in generated shapes;
82 //! - Mode defines the construction type of parallels applied to free
83 //! edges of shape S. Currently, only one construction type is
84 //! implemented, namely the one where the free edges do not generate
85 //! parallels; this corresponds to the default value BRepOffset_Skin;
86 //! Intersection specifies how the algorithm must work in order to
87 //! limit the parallels to two adjacent shapes:
88 //! - if Intersection is false (default value), the intersection
89 //! is calculated with the parallels to the two adjacent shapes,
90 //! - if Intersection is true, the intersection is calculated by
91 //! taking account of all parallels generated; this computation
92 //! method is more general as it avoids self-intersections
93 //! generated in the offset shape from features of small dimensions
94 //! on shape S, however this method has not been completely
95 //! implemented and therefore is not recommended for use;
96 //! - SelfInter tells the algorithm whether a computation to
97 //! eliminate self-intersections needs to be applied to the
98 //! resulting shape. However, as this functionality is not yet
99 //! implemented, you should use the default value (false);
100 //! - Join defines how to fill the holes that may appear between
101 //! parallels to the two adjacent faces. It may take values
102 //! GeomAbs_Arc or GeomAbs_Intersection:
103 //! - if Join is equal to GeomAbs_Arc, then pipes are generated
104 //! between two free edges of two adjacent parallels,
105 //! and spheres are generated on "images" of vertices;
106 //! it is the default value,
107 //! - if Join is equal to GeomAbs_Intersection,
108 //! then the parallels to the two adjacent faces are
109 //! enlarged and intersected, so that there are no free
110 //! edges on parallels to faces.
9b7f3f83 111 //! RemoveIntEdges flag defines whether to remove the INTERNAL edges
112 //! from the result or not.
42cf5bc1 113 //! Warnings
114 //! Since the algorithm of MakeThickSolid is based on
115 //! MakeOffsetShape algorithm, the warnings are the same as for
116 //! MakeOffsetShape.
8013367c 117 Standard_EXPORT void MakeThickSolidByJoin(const TopoDS_Shape& S,
118 const TopTools_ListOfShape& ClosingFaces,
119 const Standard_Real Offset,
120 const Standard_Real Tol,
121 const BRepOffset_Mode Mode = BRepOffset_Skin,
122 const Standard_Boolean Intersection = Standard_False,
123 const Standard_Boolean SelfInter = Standard_False,
124 const GeomAbs_JoinType Join = GeomAbs_Arc,
125 const Standard_Boolean RemoveIntEdges = Standard_False);
126
127 // Does nothing.
42cf5bc1 128 Standard_EXPORT virtual void Build() Standard_OVERRIDE;
129
130 //! Returns the list of shapes modified from the shape
131 //! <S>.
132 Standard_EXPORT virtual const TopTools_ListOfShape& Modified (const TopoDS_Shape& S) Standard_OVERRIDE;
42cf5bc1 133};
134
42cf5bc1 135#endif // _BRepOffsetAPI_MakeThickSolid_HeaderFile