Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-08-25 09:13:24

0001 // Created on: 1996-02-13
0002 // Created by: Yves FRICAUD
0003 // Copyright (c) 1996-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _BRepOffsetAPI_MakeThickSolid_HeaderFile
0018 #define _BRepOffsetAPI_MakeThickSolid_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <BRepOffsetAPI_MakeOffsetShape.hxx>
0025 #include <TopTools_ListOfShape.hxx>
0026 #include <BRepOffset_Mode.hxx>
0027 #include <Standard_Boolean.hxx>
0028 #include <GeomAbs_JoinType.hxx>
0029 class TopoDS_Shape;
0030 
0031 //! Describes functions to build hollowed solids.
0032 //! A hollowed solid is built from an initial solid and a set of
0033 //! faces on this solid, which are to be removed. The
0034 //! remaining faces of the solid become the walls of the
0035 //! hollowed solid, their thickness defined at the time of construction.
0036 //! the solid is built from an initial
0037 //! solid  <S> and a  set of  faces {Fi} from  <S>,
0038 //! builds a   solid  composed  by two shells closed  by
0039 //! the {Fi}. First shell <SS>   is composed by all
0040 //! the faces of <S> expected {Fi}.  Second shell is
0041 //! the offset shell of <SS>.
0042 //! A MakeThickSolid object provides a framework for:
0043 //! - defining the cross-section of a hollowed solid,
0044 //! - implementing the construction algorithm, and
0045 //! - consulting the result.
0046 class BRepOffsetAPI_MakeThickSolid : public BRepOffsetAPI_MakeOffsetShape
0047 {
0048 public:
0049   DEFINE_STANDARD_ALLOC
0050 
0051   //! Constructor does nothing.
0052   Standard_EXPORT BRepOffsetAPI_MakeThickSolid();
0053 
0054   //! Constructs solid using simple algorithm.
0055   //! According to its nature it is not possible to set list of the closing faces.
0056   //! This algorithm does not support faces removing. It is caused by fact that
0057   //! intersections are not computed during offset creation.
0058   //! Non-closed shell or face is expected as input.
0059   Standard_EXPORT void MakeThickSolidBySimple(const TopoDS_Shape& theS,
0060                                               const Standard_Real theOffsetValue);
0061 
0062   //! Constructs a hollowed solid from
0063   //! the solid S by removing the set of faces ClosingFaces from S, where:
0064   //! Offset defines the thickness of the walls. Its sign indicates
0065   //! which side of the surface of the solid the hollowed shape is built on;
0066   //! - Tol defines the tolerance criterion for coincidence in generated shapes;
0067   //! - Mode defines the construction type of parallels applied to free
0068   //! edges of shape S. Currently, only one construction type is
0069   //! implemented, namely the one where the free edges do not generate
0070   //! parallels; this corresponds to the default value BRepOffset_Skin;
0071   //! Intersection specifies how the algorithm must work in order to
0072   //! limit the parallels to two adjacent shapes:
0073   //! - if Intersection is false (default value), the intersection
0074   //! is calculated with the parallels to the two adjacent shapes,
0075   //! -     if Intersection is true, the intersection is calculated by
0076   //! taking account of all parallels generated; this computation
0077   //! method is more general as it avoids self-intersections
0078   //! generated in the offset shape from features of small dimensions
0079   //! on shape S, however this method has not been completely
0080   //! implemented and therefore is not recommended for use;
0081   //! -     SelfInter tells the algorithm whether a computation to
0082   //! eliminate self-intersections needs to be applied to the
0083   //! resulting shape. However, as this functionality is not yet
0084   //! implemented, you should use the default value (false);
0085   //! - Join defines how to fill the holes that may appear between
0086   //! parallels to the two adjacent faces. It may take values
0087   //! GeomAbs_Arc or GeomAbs_Intersection:
0088   //! - if Join is equal to GeomAbs_Arc, then pipes are generated
0089   //! between two free edges of two adjacent parallels,
0090   //! and spheres are generated on "images" of vertices;
0091   //! it is the default value,
0092   //! - if Join is equal to GeomAbs_Intersection,
0093   //! then the parallels to the two adjacent faces are
0094   //! enlarged and intersected, so that there are no free
0095   //! edges on parallels to faces.
0096   //! RemoveIntEdges flag defines whether to remove the INTERNAL edges
0097   //! from the result or not.
0098   //! Warnings
0099   //! Since the algorithm of MakeThickSolid is based on
0100   //! MakeOffsetShape algorithm, the warnings are the same as for
0101   //! MakeOffsetShape.
0102   Standard_EXPORT void MakeThickSolidByJoin(
0103     const TopoDS_Shape&          S,
0104     const TopTools_ListOfShape&  ClosingFaces,
0105     const Standard_Real          Offset,
0106     const Standard_Real          Tol,
0107     const BRepOffset_Mode        Mode           = BRepOffset_Skin,
0108     const Standard_Boolean       Intersection   = Standard_False,
0109     const Standard_Boolean       SelfInter      = Standard_False,
0110     const GeomAbs_JoinType       Join           = GeomAbs_Arc,
0111     const Standard_Boolean       RemoveIntEdges = Standard_False,
0112     const Message_ProgressRange& theRange       = Message_ProgressRange());
0113 
0114   // Does nothing.
0115   Standard_EXPORT virtual void Build(
0116     const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE;
0117 
0118   //! Returns the list  of shapes modified from the shape
0119   //! <S>.
0120   Standard_EXPORT virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& S)
0121     Standard_OVERRIDE;
0122 };
0123 
0124 #endif // _BRepOffsetAPI_MakeThickSolid_HeaderFile