|
||||
File indexing completed on 2025-01-18 10:03:09
0001 // Created on: 1994-12-09 0002 // Created by: Jacques GOUSSARD 0003 // Copyright (c) 1994-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 _BRepBuilderAPI_Transform_HeaderFile 0018 #define _BRepBuilderAPI_Transform_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 #include <Standard_Handle.hxx> 0023 0024 #include <gp_Trsf.hxx> 0025 #include <BRepBuilderAPI_ModifyShape.hxx> 0026 #include <TopTools_ListOfShape.hxx> 0027 class TopoDS_Shape; 0028 0029 0030 //! Geometric transformation on a shape. 0031 //! The transformation to be applied is defined as a 0032 //! gp_Trsf transformation, i.e. a transformation which does 0033 //! not modify the underlying geometry of shapes. 0034 //! The transformation is applied to: 0035 //! - all curves which support edges of a shape, and 0036 //! - all surfaces which support its faces. 0037 //! A Transform object provides a framework for: 0038 //! - defining the geometric transformation to be applied, 0039 //! - implementing the transformation algorithm, and 0040 //! - consulting the results. 0041 class BRepBuilderAPI_Transform : public BRepBuilderAPI_ModifyShape 0042 { 0043 public: 0044 0045 DEFINE_STANDARD_ALLOC 0046 0047 0048 //! Constructs a framework for applying the geometric 0049 //! transformation T to a shape. Use the function Perform 0050 //! to define the shape to transform. 0051 Standard_EXPORT BRepBuilderAPI_Transform(const gp_Trsf& T); 0052 0053 //! Creates a transformation from the gp_Trsf <theTrsf>, and 0054 //! applies it to the shape <theShape>. If the transformation 0055 //! is direct and isometric (determinant = 1) and 0056 //! <theCopyGeom> = Standard_False, the resulting shape is 0057 //! <theShape> on which a new location has been set. 0058 //! Otherwise, the transformation is applied on a 0059 //! duplication of <theShape>. 0060 //! If <theCopyMesh> is true, the triangulation will be copied, 0061 //! and the copy will be assigned to the result shape. 0062 Standard_EXPORT BRepBuilderAPI_Transform(const TopoDS_Shape& theShape, 0063 const gp_Trsf& theTrsf, 0064 const Standard_Boolean theCopyGeom = Standard_False, 0065 const Standard_Boolean theCopyMesh = Standard_False); 0066 0067 //! Applies the geometric transformation defined at the 0068 //! time of construction of this framework to the shape S. 0069 //! - If the transformation T is direct and isometric, in 0070 //! other words, if the determinant of the vectorial part 0071 //! of T is equal to 1., and if theCopyGeom equals false (the 0072 //! default value), the resulting shape is the same as 0073 //! the original but with a new location assigned to it. 0074 //! - In all other cases, the transformation is applied to a duplicate of theShape. 0075 //! - If theCopyMesh is true, the triangulation will be copied, 0076 //! and the copy will be assigned to the result shape. 0077 //! Use the function Shape to access the result. 0078 //! Note: this framework can be reused to apply the same 0079 //! geometric transformation to other shapes. You only 0080 //! need to specify them by calling the function Perform again. 0081 Standard_EXPORT void Perform (const TopoDS_Shape& theShape, 0082 const Standard_Boolean theCopyGeom = Standard_False, 0083 const Standard_Boolean theCopyMesh = Standard_False); 0084 0085 //! Returns the modified shape corresponding to <S>. 0086 Standard_EXPORT virtual TopoDS_Shape ModifiedShape (const TopoDS_Shape& S) const Standard_OVERRIDE; 0087 0088 //! Returns the list of shapes modified from the shape 0089 //! <S>. 0090 Standard_EXPORT virtual const TopTools_ListOfShape& Modified (const TopoDS_Shape& S) Standard_OVERRIDE; 0091 0092 0093 0094 0095 protected: 0096 0097 0098 0099 0100 0101 private: 0102 0103 0104 0105 gp_Trsf myTrsf; 0106 TopLoc_Location myLocation; 0107 Standard_Boolean myUseModif; 0108 0109 0110 }; 0111 0112 0113 0114 0115 0116 0117 0118 #endif // _BRepBuilderAPI_Transform_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |