|
||||
File indexing completed on 2025-01-18 10:03:16
0001 // Created on: 1993-10-12 0002 // Created by: Remi LEQUETTE 0003 // Copyright (c) 1993-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 _BRepPrimAPI_MakePrism_HeaderFile 0018 #define _BRepPrimAPI_MakePrism_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 0023 #include <BRepSweep_Prism.hxx> 0024 #include <BRepPrimAPI_MakeSweep.hxx> 0025 #include <TopTools_ListOfShape.hxx> 0026 class TopoDS_Shape; 0027 class gp_Vec; 0028 class gp_Dir; 0029 0030 0031 //! Describes functions to build linear swept topologies, called prisms. 0032 //! A prism is defined by: 0033 //! - a basis shape, which is swept, and 0034 //! - a sweeping direction, which is: 0035 //! - a vector for finite prisms, or 0036 //! - a direction for infinite or semi-infinite prisms. 0037 //! The basis shape must not contain any solids. 0038 //! The profile generates objects according to the following rules: 0039 //! - Vertices generate Edges 0040 //! - Edges generate Faces. 0041 //! - Wires generate Shells. 0042 //! - Faces generate Solids. 0043 //! - Shells generate Composite Solids 0044 //! A MakePrism object provides a framework for: 0045 //! - defining the construction of a prism, 0046 //! - implementing the construction algorithm, and 0047 //! - consulting the result. 0048 class BRepPrimAPI_MakePrism : public BRepPrimAPI_MakeSweep 0049 { 0050 public: 0051 0052 DEFINE_STANDARD_ALLOC 0053 0054 0055 //! Builds the prism of base S and vector V. If C is true, 0056 //! S is copied. If Canonize is true then generated surfaces 0057 //! are attempted to be canonized in simple types 0058 Standard_EXPORT BRepPrimAPI_MakePrism(const TopoDS_Shape& S, const gp_Vec& V, const Standard_Boolean Copy = Standard_False, const Standard_Boolean Canonize = Standard_True); 0059 0060 //! Builds a semi-infinite or an infinite prism of base S. 0061 //! If Inf is true the prism is infinite, if Inf is false 0062 //! the prism is semi-infinite (in the direction D). If C 0063 //! is true S is copied (for semi-infinite prisms). 0064 //! If Canonize is true then generated surfaces 0065 //! are attempted to be canonized in simple types 0066 Standard_EXPORT BRepPrimAPI_MakePrism(const TopoDS_Shape& S, const gp_Dir& D, const Standard_Boolean Inf = Standard_True, const Standard_Boolean Copy = Standard_False, const Standard_Boolean Canonize = Standard_True); 0067 0068 //! Returns the internal sweeping algorithm. 0069 Standard_EXPORT const BRepSweep_Prism& Prism() const; 0070 0071 //! Builds the resulting shape (redefined from MakeShape). 0072 Standard_EXPORT virtual void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; 0073 0074 //! Returns the TopoDS Shape of the bottom of the prism. 0075 Standard_EXPORT TopoDS_Shape FirstShape() Standard_OVERRIDE; 0076 0077 //! Returns the TopoDS Shape of the top of the prism. 0078 //! In the case of a finite prism, FirstShape returns the 0079 //! basis of the prism, in other words, S if Copy is false; 0080 //! otherwise, the copy of S belonging to the prism. 0081 //! LastShape returns the copy of S translated by V at the 0082 //! time of construction. 0083 Standard_EXPORT TopoDS_Shape LastShape() Standard_OVERRIDE; 0084 0085 //! Returns ListOfShape from TopTools. 0086 Standard_EXPORT virtual const TopTools_ListOfShape& Generated (const TopoDS_Shape& S) Standard_OVERRIDE; 0087 0088 //! Returns true if the shape S has been deleted. 0089 Standard_EXPORT virtual Standard_Boolean IsDeleted(const TopoDS_Shape& S) Standard_OVERRIDE; 0090 0091 //! Returns the TopoDS Shape of the bottom of the prism. 0092 //! generated with theShape (subShape of the generating shape). 0093 Standard_EXPORT TopoDS_Shape FirstShape (const TopoDS_Shape& theShape); 0094 0095 //! Returns the TopoDS Shape of the top of the prism. 0096 //! generated with theShape (subShape of the generating shape). 0097 Standard_EXPORT TopoDS_Shape LastShape (const TopoDS_Shape& theShape); 0098 0099 protected: 0100 0101 0102 0103 0104 0105 private: 0106 0107 0108 0109 BRepSweep_Prism myPrism; 0110 0111 0112 }; 0113 0114 0115 0116 0117 0118 0119 0120 #endif // _BRepPrimAPI_MakePrism_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |