|
|
|||
File indexing completed on 2026-09-26 09:02:47
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 <TopoDS_Shape.hxx> 0029 #include <NCollection_List.hxx> 0030 class TopoDS_Shape; 0031 class gp_Dir; 0032 class Geom_Surface; 0033 class TopoDS_Shell; 0034 0035 //! Build a draft surface along a wire 0036 class BRepOffsetAPI_MakeDraft : public BRepBuilderAPI_MakeShape 0037 { 0038 public: 0039 DEFINE_STANDARD_ALLOC 0040 0041 //! Constructs the draft surface object defined by the shape 0042 //! Shape, the direction Dir, and the angle Angle. 0043 //! Shape must be a TopoDS_Wire, Topo_DS_Face or 0044 //! TopoDS_Shell with free boundaries. 0045 //! Exceptions 0046 //! Standard_NotDone if Shape is not a TopoDS_Wire, 0047 //! Topo_DS_Face or TopoDS_Shell with free boundaries. 0048 Standard_EXPORT BRepOffsetAPI_MakeDraft(const TopoDS_Shape& Shape, 0049 const gp_Dir& Dir, 0050 const double 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( 0063 const BRepBuilderAPI_TransitionMode Style = BRepBuilderAPI_RightCorner, 0064 const double AngleMin = 0.01, 0065 const double AngleMax = 3.0); 0066 0067 //! Sets the direction of the draft for this object. 0068 //! If IsInternal is true, the draft is internal to the argument 0069 //! Shape used in the constructor. 0070 Standard_EXPORT void SetDraft(const bool IsInternal = false); 0071 0072 //! Performs the draft using the length LengthMax as the 0073 //! maximum length for the corner edge between two draft faces. 0074 Standard_EXPORT void Perform(const double LengthMax); 0075 0076 //! Performs the draft up to the surface Surface. 0077 //! If KeepInsideSurface is true, the part of Surface inside 0078 //! the draft is kept in the result. 0079 Standard_EXPORT void Perform(const occ::handle<Geom_Surface>& Surface, 0080 const bool KeepInsideSurface = true); 0081 0082 //! Performs the draft up to the shape StopShape. 0083 //! If KeepOutSide is true, the part of StopShape which is 0084 //! outside the Draft is kept in the result. 0085 Standard_EXPORT void Perform(const TopoDS_Shape& StopShape, const bool KeepOutSide = true); 0086 0087 //! Returns the shell resulting from performance of the 0088 //! draft along the wire. 0089 Standard_EXPORT TopoDS_Shell Shell() const; 0090 0091 //! Returns the list of shapes generated from the 0092 //! shape <S>. 0093 Standard_EXPORT const NCollection_List<TopoDS_Shape>& Generated(const TopoDS_Shape& S) override; 0094 0095 private: 0096 BRepFill_Draft myDraft; 0097 }; 0098 0099 #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 |
|