|
||||
File indexing completed on 2025-01-18 10:03:09
0001 // Created on: 1996-12-30 0002 // Created by: Stagiaire Mary FABIEN 0003 // Copyright (c) 1996-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_GTransform_HeaderFile 0018 #define _BRepBuilderAPI_GTransform_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 0023 #include <gp_GTrsf.hxx> 0024 #include <BRepBuilderAPI_Collect.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 gp_GTrsf 0032 //! transformation. It may be: 0033 //! - a transformation equivalent to a gp_Trsf transformation, the 0034 //! most common case: you should , however, use a BRepAPI_Transform 0035 //! object to perform this kind of transformation; or 0036 //! - an affinity, or 0037 //! - more generally, any type of point transformation which may 0038 //! be defined by a three row, four column matrix of transformation. 0039 //! In the last two cases, the underlying geometry of the 0040 //! following shapes may change: 0041 //! - a curve which supports an edge of the shape, or 0042 //! - a surface which supports a face of the shape; 0043 //! For example, a circle may be transformed into an ellipse when 0044 //! applying an affinity transformation. 0045 //! The transformation is applied to: 0046 //! - all the curves which support edges of the shape, and 0047 //! - all the surfaces which support faces of the shape. 0048 //! A GTransform object provides a framework for: 0049 //! - defining the geometric transformation to be applied, 0050 //! - implementing the transformation algorithm, and 0051 //! - consulting the result. 0052 class BRepBuilderAPI_GTransform : public BRepBuilderAPI_ModifyShape 0053 { 0054 public: 0055 0056 DEFINE_STANDARD_ALLOC 0057 0058 0059 //! Constructs a framework for applying the geometric 0060 //! transformation T to a shape. Use the function 0061 //! Perform to define the shape to transform. 0062 Standard_EXPORT BRepBuilderAPI_GTransform(const gp_GTrsf& T); 0063 0064 //! Constructs a framework for applying the geometric 0065 //! transformation T to a shape, and applies it to the shape S. 0066 //! - If the transformation T is direct and isometric (i.e. if 0067 //! the determinant of the vectorial part of T is equal to 0068 //! 1.), and if Copy equals false (default value), the 0069 //! resulting shape is the same as the original but with 0070 //! a new location assigned to it. 0071 //! - In all other cases, the transformation is applied to 0072 //! a duplicate of S. 0073 //! Use the function Shape to access the result. 0074 //! Note: the constructed framework can be reused to 0075 //! apply the same geometric transformation to other 0076 //! shapes: just specify them with the function Perform. 0077 Standard_EXPORT BRepBuilderAPI_GTransform(const TopoDS_Shape& S, const gp_GTrsf& T, const Standard_Boolean Copy = Standard_False); 0078 0079 //! Applies the geometric transformation defined at the 0080 //! time of construction of this framework to the shape S. 0081 //! - If the transformation T is direct and isometric (i.e. if 0082 //! the determinant of the vectorial part of T is equal to 0083 //! 1.), and if Copy equals false (default value), the 0084 //! resulting shape is the same as the original but with 0085 //! a new location assigned to it. 0086 //! - In all other cases, the transformation is applied to a duplicate of S. 0087 //! Use the function Shape to access the result. 0088 //! Note: this framework can be reused to apply the same 0089 //! geometric transformation to other shapes: just specify 0090 //! them by calling the function Perform again. 0091 Standard_EXPORT void Perform (const TopoDS_Shape& S, const Standard_Boolean Copy = Standard_False); 0092 0093 //! Returns the list of shapes modified from the shape 0094 //! <S>. 0095 Standard_EXPORT virtual const TopTools_ListOfShape& Modified (const TopoDS_Shape& S) Standard_OVERRIDE; 0096 0097 //! Returns the modified shape corresponding to <S>. 0098 Standard_EXPORT virtual TopoDS_Shape ModifiedShape (const TopoDS_Shape& S) const Standard_OVERRIDE; 0099 0100 0101 0102 0103 protected: 0104 0105 0106 0107 0108 0109 private: 0110 0111 0112 0113 gp_GTrsf myGTrsf; 0114 BRepBuilderAPI_Collect myHist; 0115 0116 0117 }; 0118 0119 0120 0121 0122 0123 0124 0125 #endif // _BRepBuilderAPI_GTransform_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |