|
||||
File indexing completed on 2025-01-18 10:03:15
0001 // Created on: 1999-01-13 0002 // Created by: Philippe MANGIN 0003 // Copyright (c) 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_MakeDraft_HeaderFile 0018 #define _BRepOffsetAPI_MakeDraft_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 #include <Standard_Handle.hxx> 0023 0024 #include <BRepFill_Draft.hxx> 0025 #include <BRepBuilderAPI_MakeShape.hxx> 0026 #include <Standard_Real.hxx> 0027 #include <BRepBuilderAPI_TransitionMode.hxx> 0028 #include <TopTools_ListOfShape.hxx> 0029 class TopoDS_Shape; 0030 class gp_Dir; 0031 class Geom_Surface; 0032 class TopoDS_Shell; 0033 0034 0035 //! Build a draft surface along a wire 0036 class BRepOffsetAPI_MakeDraft : public BRepBuilderAPI_MakeShape 0037 { 0038 public: 0039 0040 DEFINE_STANDARD_ALLOC 0041 0042 0043 //! Constructs the draft surface object defined by the shape 0044 //! Shape, the direction Dir, and the angle Angle. 0045 //! Shape must be a TopoDS_Wire, Topo_DS_Face or 0046 //! TopoDS_Shell with free boundaries. 0047 //! Exceptions 0048 //! Standard_NotDone if Shape is not a TopoDS_Wire, 0049 //! Topo_DS_Face or TopoDS_Shell with free boundaries. 0050 Standard_EXPORT BRepOffsetAPI_MakeDraft(const TopoDS_Shape& Shape, const gp_Dir& Dir, const Standard_Real Angle); 0051 0052 //! Sets the options of this draft tool. 0053 //! If a transition has to be performed, it can be defined by 0054 //! the mode Style as RightCorner or RoundCorner, 0055 //! RightCorner being a corner defined by a sharp angle, 0056 //! and RoundCorner being a rounded corner. 0057 //! AngleMin is an angular tolerance used to detect 0058 //! whether a transition has to be performed or not. 0059 //! AngleMax sets the maximum value within which a 0060 //! RightCorner transition can be performed. 0061 //! AngleMin and AngleMax are expressed in radians. 0062 Standard_EXPORT void SetOptions (const BRepBuilderAPI_TransitionMode Style = BRepBuilderAPI_RightCorner, const Standard_Real AngleMin = 0.01, const Standard_Real AngleMax = 3.0); 0063 0064 //! Sets the direction of the draft for this object. 0065 //! If IsInternal is true, the draft is internal to the argument 0066 //! Shape used in the constructor. 0067 Standard_EXPORT void SetDraft (const Standard_Boolean IsInternal = Standard_False); 0068 0069 //! Performs the draft using the length LengthMax as the 0070 //! maximum length for the corner edge between two draft faces. 0071 Standard_EXPORT void Perform (const Standard_Real LengthMax); 0072 0073 //! Performs the draft up to the surface Surface. 0074 //! If KeepInsideSurface is true, the part of Surface inside 0075 //! the draft is kept in the result. 0076 Standard_EXPORT void Perform (const Handle(Geom_Surface)& Surface, const Standard_Boolean KeepInsideSurface = Standard_True); 0077 0078 //! Performs the draft up to the shape StopShape. 0079 //! If KeepOutSide is true, the part of StopShape which is 0080 //! outside the Draft is kept in the result. 0081 Standard_EXPORT void Perform (const TopoDS_Shape& StopShape, const Standard_Boolean KeepOutSide = Standard_True); 0082 0083 //! Returns the shell resulting from performance of the 0084 //! draft along the wire. 0085 Standard_EXPORT TopoDS_Shell Shell() const; 0086 0087 //! Returns the list of shapes generated from the 0088 //! shape <S>. 0089 Standard_EXPORT virtual const TopTools_ListOfShape& Generated (const TopoDS_Shape& S) Standard_OVERRIDE; 0090 0091 0092 0093 0094 protected: 0095 0096 0097 0098 0099 0100 private: 0101 0102 0103 0104 BRepFill_Draft myDraft; 0105 0106 0107 }; 0108 0109 0110 0111 0112 0113 0114 0115 #endif // _BRepOffsetAPI_MakeDraft_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |