Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:05:15

0001 // Created on: 1997-04-28
0002 // Created by: Christian CAILLET
0003 // Copyright (c) 1997-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 _StepToTopoDS_MakeTransformed_HeaderFile
0018 #define _StepToTopoDS_MakeTransformed_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <gp_Trsf.hxx>
0025 #include <StepToTopoDS_Root.hxx>
0026 #include <Message_ProgressRange.hxx>
0027 
0028 class StepData_Factors;
0029 class StepGeom_Axis2Placement3d;
0030 class StepGeom_CartesianTransformationOperator3d;
0031 class TopoDS_Shape;
0032 class StepRepr_MappedItem;
0033 class Transfer_TransientProcess;
0034 
0035 //! Produces instances by Transformation of a basic item
0036 class StepToTopoDS_MakeTransformed  : public StepToTopoDS_Root
0037 {
0038 public:
0039 
0040   DEFINE_STANDARD_ALLOC
0041 
0042   
0043   Standard_EXPORT StepToTopoDS_MakeTransformed();
0044   
0045   //! Computes a transformation to pass from an Origin placement to
0046   //! a Target placement. Returns True when done
0047   //! If not done, the transformation will by Identity
0048   Standard_EXPORT Standard_Boolean Compute (const Handle(StepGeom_Axis2Placement3d)& Origin,
0049                                             const Handle(StepGeom_Axis2Placement3d)& Target,
0050                                             const StepData_Factors& theLocalFactors);
0051   
0052   //! Computes a transformation defined by an operator 3D
0053   Standard_EXPORT Standard_Boolean Compute (const Handle(StepGeom_CartesianTransformationOperator3d)& Operator,
0054                                             const StepData_Factors& theLocalFactors);
0055   
0056   //! Returns the computed transformation (Identity if not yet or
0057   //! if failed)
0058   Standard_EXPORT const gp_Trsf& Transformation() const;
0059   
0060   //! Applies the computed transformation to a shape
0061   //! Returns False if the transformation is Identity
0062   Standard_EXPORT Standard_Boolean Transform (TopoDS_Shape& shape) const;
0063   
0064   //! Translates a MappedItem. More precisely
0065   //! A MappedItem has a MappingSource and a MappingTarget
0066   //! MappingSource has a MappedRepresentation and a MappingOrigin
0067   //! MappedRepresentation is the basic item to be instanced
0068   //! MappingOrigin is the starting placement
0069   //! MappingTarget is the final placement
0070   //!
0071   //! Hence, the transformation from MappingOrigin and MappingTarget
0072   //! is computed, the MappedRepr. is converted to a Shape, then
0073   //! transformed as an instance of this Shape
0074   Standard_EXPORT TopoDS_Shape TranslateMappedItem (const Handle(StepRepr_MappedItem)& mapit,
0075                                                     const Handle(Transfer_TransientProcess)& TP,
0076                                                     const StepData_Factors& theLocalFactors,
0077                                                     const Message_ProgressRange& theProgress = Message_ProgressRange());
0078 
0079 
0080 
0081 
0082 protected:
0083 
0084 
0085 
0086 
0087 
0088 private:
0089 
0090 
0091 
0092   gp_Trsf theTrsf;
0093 
0094 
0095 };
0096 
0097 
0098 
0099 
0100 
0101 
0102 
0103 #endif // _StepToTopoDS_MakeTransformed_HeaderFile