Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1995-06-13
0002 // Created by: Jacques GOUSSARD
0003 // Copyright (c) 1995-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 _BRepFeat_HeaderFile
0018 #define _BRepFeat_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <TColgp_SequenceOfPnt.hxx>
0025 #include <Standard_Real.hxx>
0026 #include <Standard_Boolean.hxx>
0027 #include <TopAbs_Orientation.hxx>
0028 #include <Standard_OStream.hxx>
0029 #include <BRepFeat_StatusError.hxx>
0030 class TopoDS_Shape;
0031 class gp_Pnt;
0032 class Geom_Curve;
0033 class TopoDS_Face;
0034 class BRepTopAdaptor_FClass2d;
0035 class Geom2dAdaptor_Curve;
0036 class TopoDS_Solid;
0037 
0038 
0039 //! BRepFeat is necessary for the
0040 //! creation and manipulation of both form and mechanical features in a
0041 //! Boundary Representation framework. Form features can be depressions or
0042 //! protrusions and include the following types:
0043 //! -          Cylinder
0044 //! -          Draft Prism
0045 //! -          Prism
0046 //! -          Revolved feature
0047 //! -          Pipe
0048 //! Depending on whether you wish to make a depression or a protrusion,
0049 //! you can choose your operation type between the following:
0050 //! - removing matter (a Boolean cut: Fuse setting 0)
0051 //! - adding matter (Boolean fusion: Fuse setting 1)
0052 //! The semantics of form feature creation is based on the
0053 //! construction of shapes:
0054 //! -          for a certain length in a certain direction
0055 //! -          up to a limiting face
0056 //! -          from a limiting face at a height
0057 //! -          above and/or below a plane
0058 //! The shape defining the construction of a feature can be either a
0059 //! supporting edge or a concerned area of a face.
0060 //! In case of supporting edge, this contour can be attached to a face
0061 //! of the basis shape by binding. When the contour is bound to this face,
0062 //! the information that the contour will slide on the face becomes
0063 //! available to the relevant class methods. In case of the concerned
0064 //! area of a face, you could, for example, cut it out and move it at
0065 //! a different height, which will define the limiting face of a
0066 //! protrusion or depression. Topological definition with local
0067 //! operations of this sort makes calculations simpler and faster
0068 //! than a global operation. The latter would entail a second phase of
0069 //! removing unwanted matter to get the same result.
0070 //! Mechanical features include ribs - protrusions - and grooves (or
0071 //! slots) - depressions along planar (linear) surfaces or revolution surfaces.
0072 //! The semantics of mechanical features is based on giving
0073 //! thickness to a contour. This thickness can either be unilateral
0074 //! - on one side of the contour - or bilateral - on both sides. As in
0075 //! the semantics of form features, the thickness is defined by
0076 //! construction of shapes in specific contexts.
0077 //! However, in case of mechanical features, development contexts
0078 //! differ. Here they include extrusion:
0079 //! -          to a limiting face of the basis shape
0080 //! -          to or from a limiting plane
0081 //! -          to a height.
0082 class BRepFeat 
0083 {
0084 public:
0085 
0086   DEFINE_STANDARD_ALLOC
0087 
0088   
0089   Standard_EXPORT static void SampleEdges (const TopoDS_Shape& S, TColgp_SequenceOfPnt& Pt);
0090   
0091   Standard_EXPORT static void Barycenter (const TopoDS_Shape& S, gp_Pnt& Pt);
0092   
0093   Standard_EXPORT static Standard_Real ParametricBarycenter (const TopoDS_Shape& S, const Handle(Geom_Curve)& C);
0094   
0095   //! Ori = True taking account the orientation
0096   Standard_EXPORT static void ParametricMinMax (const TopoDS_Shape& S, const Handle(Geom_Curve)& C, Standard_Real& prmin, Standard_Real& prmax, Standard_Real& prbmin, Standard_Real& prbmax, Standard_Boolean& flag, const Standard_Boolean Ori = Standard_False);
0097   
0098   Standard_EXPORT static Standard_Boolean IsInside (const TopoDS_Face& F1, const TopoDS_Face& F2);
0099   
0100   Standard_EXPORT static Standard_Boolean IsInOut (const BRepTopAdaptor_FClass2d& FC, const Geom2dAdaptor_Curve& AC);
0101   
0102   Standard_EXPORT static void FaceUntil (const TopoDS_Shape& S, TopoDS_Face& F);
0103   
0104   Standard_EXPORT static TopoDS_Solid Tool (const TopoDS_Shape& SRef, const TopoDS_Face& Fac, const TopAbs_Orientation Orf);
0105   
0106   //! Prints the Error description of the State <St> as a String on
0107   //! the Stream <S> and returns <S>.
0108   Standard_EXPORT static Standard_OStream& Print (const BRepFeat_StatusError SE, Standard_OStream& S);
0109 
0110 };
0111 
0112 #endif // _BRepFeat_HeaderFile