|
|
|||
File indexing completed on 2026-09-17 09:19:49
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 <TopoDS_Shape.hxx> 0027 #include <NCollection_List.hxx> 0028 class TopoDS_Shape; 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 DEFINE_STANDARD_ALLOC 0056 0057 //! Constructs a framework for applying the geometric 0058 //! transformation T to a shape. Use the function 0059 //! Perform to define the shape to transform. 0060 Standard_EXPORT BRepBuilderAPI_GTransform(const gp_GTrsf& T); 0061 0062 //! Constructs a framework for applying the geometric 0063 //! transformation T to a shape, and applies it to the shape S. 0064 //! - If the transformation T is direct and isometric (i.e. if 0065 //! the determinant of the vectorial part of T is equal to 0066 //! 1.), and if Copy equals false (default value), the 0067 //! resulting shape is the same as the original but with 0068 //! a new location assigned to it. 0069 //! - In all other cases, the transformation is applied to 0070 //! a duplicate of S. 0071 //! Use the function Shape to access the result. 0072 //! Note: the constructed framework can be reused to 0073 //! apply the same geometric transformation to other 0074 //! shapes: just specify them with the function Perform. 0075 Standard_EXPORT BRepBuilderAPI_GTransform(const TopoDS_Shape& S, 0076 const gp_GTrsf& T, 0077 const bool Copy = 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 bool Copy = false); 0092 0093 //! Returns the list of shapes modified from the shape 0094 //! <S>. 0095 Standard_EXPORT const NCollection_List<TopoDS_Shape>& Modified(const TopoDS_Shape& S) override; 0096 0097 //! Returns the modified shape corresponding to <S>. 0098 Standard_EXPORT TopoDS_Shape ModifiedShape(const TopoDS_Shape& S) const override; 0099 0100 private: 0101 gp_GTrsf myGTrsf; 0102 BRepBuilderAPI_Collect myHist; 0103 }; 0104 0105 #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 |
|