Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:16

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 
0032 //! Describes functions to build hollowed solids.
0033 //! A hollowed solid is built from an initial solid and a set of
0034 //! faces on this solid, which are to be removed. The
0035 //! remaining faces of the solid become the walls of the
0036 //! hollowed solid, their thickness defined at the time of construction.
0037 //! the solid is built from an initial
0038 //! solid  <S> and a  set of  faces {Fi} from  <S>,
0039 //! builds a   solid  composed  by two shells closed  by
0040 //! the {Fi}. First shell <SS>   is composed by all
0041 //! the faces of <S> expected {Fi}.  Second shell is
0042 //! the offset shell of <SS>.
0043 //! A MakeThickSolid object provides a framework for:
0044 //! - defining the cross-section of a hollowed solid,
0045 //! - implementing the construction algorithm, and
0046 //! - consulting the result.
0047 class BRepOffsetAPI_MakeThickSolid  : public BRepOffsetAPI_MakeOffsetShape
0048 {
0049 public:
0050 
0051   DEFINE_STANDARD_ALLOC
0052 
0053   //! Constructor does nothing.
0054   Standard_EXPORT BRepOffsetAPI_MakeThickSolid();
0055 
0056   //! Constructs solid using simple algorithm. 
0057   //! According to its nature it is not possible to set list of the closing faces.
0058   //! This algorithm does not support faces removing. It is caused by fact that 
0059   //! intersections are not computed during offset creation.
0060   //! Non-closed shell or face is expected as input.
0061   Standard_EXPORT void MakeThickSolidBySimple(const TopoDS_Shape& theS,
0062                                               const Standard_Real theOffsetValue);
0063 
0064   //! Constructs a hollowed solid from
0065   //! the solid S by removing the set of faces ClosingFaces from S, where:
0066   //! Offset defines the thickness of the walls. Its sign indicates
0067   //! which side of the surface of the solid the hollowed shape is built on;
0068   //! - Tol defines the tolerance criterion for coincidence in generated shapes;
0069   //! - Mode defines the construction type of parallels applied to free
0070   //! edges of shape S. Currently, only one construction type is
0071   //! implemented, namely the one where the free edges do not generate
0072   //! parallels; this corresponds to the default value BRepOffset_Skin;
0073   //! Intersection specifies how the algorithm must work in order to
0074   //! limit the parallels to two adjacent shapes:
0075   //! - if Intersection is false (default value), the intersection
0076   //! is calculated with the parallels to the two adjacent shapes,
0077   //! -     if Intersection is true, the intersection is calculated by
0078   //! taking account of all parallels generated; this computation
0079   //! method is more general as it avoids self-intersections
0080   //! generated in the offset shape from features of small dimensions
0081   //! on shape S, however this method has not been completely
0082   //! implemented and therefore is not recommended for use;
0083   //! -     SelfInter tells the algorithm whether a computation to
0084   //! eliminate self-intersections needs to be applied to the
0085   //! resulting shape. However, as this functionality is not yet
0086   //! implemented, you should use the default value (false);
0087   //! - Join defines how to fill the holes that may appear between
0088   //! parallels to the two adjacent faces. It may take values
0089   //! GeomAbs_Arc or GeomAbs_Intersection:
0090   //! - if Join is equal to GeomAbs_Arc, then pipes are generated
0091   //! between two free edges of two adjacent parallels,
0092   //! and spheres are generated on "images" of vertices;
0093   //! it is the default value,
0094   //! - if Join is equal to GeomAbs_Intersection,
0095   //! then the parallels to the two adjacent faces are
0096   //! enlarged and intersected, so that there are no free
0097   //! edges on parallels to faces.
0098   //! RemoveIntEdges flag defines whether to remove the INTERNAL edges 
0099   //! from the result or not.
0100   //! Warnings
0101   //! Since the algorithm of MakeThickSolid is based on
0102   //! MakeOffsetShape algorithm, the warnings are the same as for
0103   //! MakeOffsetShape.
0104   Standard_EXPORT void MakeThickSolidByJoin(const TopoDS_Shape& S,
0105                                             const TopTools_ListOfShape& ClosingFaces,
0106                                             const Standard_Real Offset,
0107                                             const Standard_Real Tol,
0108                                             const BRepOffset_Mode Mode = BRepOffset_Skin,
0109                                             const Standard_Boolean Intersection = Standard_False,
0110                                             const Standard_Boolean SelfInter = Standard_False,
0111                                             const GeomAbs_JoinType Join = GeomAbs_Arc,
0112                                             const Standard_Boolean RemoveIntEdges = Standard_False,
0113                                             const Message_ProgressRange& theRange = Message_ProgressRange());
0114 
0115   // Does nothing.
0116   Standard_EXPORT virtual void Build(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) Standard_OVERRIDE;
0121 };
0122 
0123 #endif // _BRepOffsetAPI_MakeThickSolid_HeaderFile