|
|
|||
File indexing completed on 2026-09-14 09:13:53
0001 // Created on: 1997-04-14 0002 // Created by: Olga PILLOT 0003 // Copyright (c) 1997-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_MakeLinearForm_HeaderFile 0018 #define _BRepFeat_MakeLinearForm_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 #include <Standard_Handle.hxx> 0023 0024 #include <gp_Vec.hxx> 0025 #include <TopoDS_Shape.hxx> 0026 #include <NCollection_List.hxx> 0027 #include <TopTools_ShapeMapHasher.hxx> 0028 #include <NCollection_DataMap.hxx> 0029 #include <BRepFeat_RibSlot.hxx> 0030 #include <Standard_Integer.hxx> 0031 class Geom_Curve; 0032 class Geom_Plane; 0033 class TopoDS_Shape; 0034 class TopoDS_Wire; 0035 class TopoDS_Edge; 0036 class TopoDS_Face; 0037 class gp_Pnt; 0038 0039 //! Builds a rib or a groove along a developable, planar surface. 0040 //! The semantics of mechanical features is built around 0041 //! giving thickness to a contour. This thickness can either 0042 //! be symmetrical - on one side of the contour - or 0043 //! dissymmetrical - on both sides. As in the semantics of 0044 //! form features, the thickness is defined by construction of 0045 //! shapes in specific contexts. 0046 //! The development contexts differ, however, in case of 0047 //! mechanical features. Here they include extrusion: 0048 //! - to a limiting face of the basis shape 0049 //! - to or from a limiting plane 0050 //! - to a height. 0051 class BRepFeat_MakeLinearForm : public BRepFeat_RibSlot 0052 { 0053 public: 0054 DEFINE_STANDARD_ALLOC 0055 0056 //! initializes the linear form class 0057 BRepFeat_MakeLinearForm(); 0058 0059 //! contour W, a shape Sbase and a 0060 //! plane P are initialized to serve as the basic 0061 //! elements in the construction of the rib or groove. 0062 //! Direction and Direction1 give The vectors for 0063 //! defining the direction(s) in which thickness will be built up. 0064 //! Fuse offers a choice between: 0065 //! - removing matter with a Boolean cut using the 0066 //! setting 0 in case of the groove 0067 //! - adding matter with Boolean fusion using the 0068 //! setting 1 in case of the rib. 0069 BRepFeat_MakeLinearForm(const TopoDS_Shape& Sbase, 0070 const TopoDS_Wire& W, 0071 const occ::handle<Geom_Plane>& P, 0072 const gp_Vec& Direction, 0073 const gp_Vec& Direction1, 0074 const int Fuse, 0075 const bool Modify); 0076 0077 //! Initializes this construction algorithm. 0078 //! A contour W, a shape Sbase and a plane P are 0079 //! initialized to serve as the basic elements in the 0080 //! construction of the rib or groove. The vectors for 0081 //! defining the direction(s) in which thickness will be built 0082 //! up are given by Direction and Direction1. 0083 //! Fuse offers a choice between: 0084 //! - removing matter with a Boolean cut using the setting 0085 //! 0 in case of the groove 0086 //! - adding matter with Boolean fusion using the setting 1 0087 //! in case of the rib. 0088 Standard_EXPORT void Init(const TopoDS_Shape& Sbase, 0089 const TopoDS_Wire& W, 0090 const occ::handle<Geom_Plane>& P, 0091 const gp_Vec& Direction, 0092 const gp_Vec& Direction1, 0093 const int Fuse, 0094 const bool Modify); 0095 0096 //! Indicates that the edge <E> will slide on the face 0097 //! <OnFace>. 0098 //! Raises ConstructionError if the face does not belong to the 0099 //! basis shape, or the edge to the prismed shape. 0100 Standard_EXPORT void Add(const TopoDS_Edge& E, const TopoDS_Face& OnFace); 0101 0102 //! Performs a prism from the wire to the plane along the 0103 //! basis shape Sbase. Reconstructs the feature topologically. 0104 Standard_EXPORT void Perform(); 0105 0106 //! Limits construction of the linear form feature by using 0107 //! one of the following three semantics: 0108 //! - from a limiting plane 0109 //! - to a limiting plane 0110 //! - from one limiting plane to another. 0111 //! The setting is provided by a flag, flag, which can be set 0112 //! to from and/or until. The third semantic possibility above 0113 //! is selected by showing both from and until at the same time. 0114 Standard_EXPORT void TransformShapeFU(const int flag); 0115 0116 Standard_EXPORT bool Propagate(NCollection_List<TopoDS_Shape>& L, 0117 const TopoDS_Face& F, 0118 const gp_Pnt& FPoint, 0119 const gp_Pnt& LPoint, 0120 bool& falseside); 0121 0122 private: 0123 occ::handle<Geom_Curve> myCrv; 0124 gp_Vec myDir; 0125 gp_Vec myDir1; 0126 occ::handle<Geom_Plane> myPln; 0127 double myBnd; 0128 NCollection_DataMap<TopoDS_Shape, NCollection_List<TopoDS_Shape>, TopTools_ShapeMapHasher> 0129 mySlface; 0130 NCollection_List<TopoDS_Shape> myListOfEdges; 0131 double myTol; 0132 }; 0133 0134 #include <BRepFeat_MakeLinearForm.lxx> 0135 0136 #endif // _BRepFeat_MakeLinearForm_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|