Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-27 09:19:08

0001 // Created on: 1998-07-07
0002 // Created by: Christian CAILLET
0003 // Copyright (c) 1998-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 _STEPConstruct_Assembly_HeaderFile
0018 #define _STEPConstruct_Assembly_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 class StepShape_ShapeDefinitionRepresentation;
0025 class StepShape_ShapeRepresentation;
0026 class StepGeom_Axis2Placement3d;
0027 class StepGeom_CartesianTransformationOperator3d;
0028 class StepRepr_NextAssemblyUsageOccurrence;
0029 class StepShape_ContextDependentShapeRepresentation;
0030 class Interface_Graph;
0031 
0032 //! This operator creates and checks an item of an assembly, from its
0033 //! basic data : a ShapeRepresentation, a Location ...
0034 //!
0035 //! Three ways of coding such item from a ShapeRepresentation :
0036 //! - do nothing : i.e. information for assembly are ignored
0037 //! - create a MappedItem
0038 //! - create a RepresentationRelationship (WithTransformation)
0039 class STEPConstruct_Assembly
0040 {
0041 public:
0042   DEFINE_STANDARD_ALLOC
0043 
0044   Standard_EXPORT STEPConstruct_Assembly();
0045 
0046   //! Initialises with starting values
0047   //! Ax0 : origin axis (typically, standard XYZ)
0048   //! Loc : location to which place the item
0049   //! Makes a MappedItem
0050   //! Resulting Value is returned by ItemValue
0051   Standard_EXPORT void Init(const occ::handle<StepShape_ShapeDefinitionRepresentation>& aSR,
0052                             const occ::handle<StepShape_ShapeDefinitionRepresentation>& SDR0,
0053                             const occ::handle<StepGeom_Axis2Placement3d>&               Ax0,
0054                             const occ::handle<StepGeom_Axis2Placement3d>&               Loc);
0055 
0056   //! Initialises with starting values
0057   //! theTrsfOp : local transformation to apply, may have scaling factor
0058   //! Makes a MappedItem
0059   //! Resulting Value is returned by ItemValue
0060   Standard_EXPORT void Init(
0061     const occ::handle<StepShape_ShapeDefinitionRepresentation>&    theSR,
0062     const occ::handle<StepShape_ShapeDefinitionRepresentation>&    theSDR0,
0063     const occ::handle<StepGeom_CartesianTransformationOperator3d>& theTrsfOp);
0064 
0065   //! Make a (ShapeRepresentationRelationship,...WithTransformation)
0066   //! Resulting Value is returned by ItemValue
0067   Standard_EXPORT void MakeRelationship();
0068 
0069   //! Returns the Value
0070   //! If no Make... has been called, returns the starting SR
0071   Standard_EXPORT occ::handle<Standard_Transient> ItemValue() const;
0072 
0073   //! Returns the location of the item, computed from starting aLoc
0074   Standard_EXPORT occ::handle<StepGeom_Axis2Placement3d> ItemLocation() const;
0075 
0076   //! Returns NAUO object describing the assembly link
0077   Standard_EXPORT occ::handle<StepRepr_NextAssemblyUsageOccurrence> GetNAUO() const;
0078 
0079   //! Checks whether SRR's definition of assembly and component contradicts
0080   //! with NAUO definition or not, according to model schema (AP214 or AP203)
0081   Standard_EXPORT static bool CheckSRRReversesNAUO(
0082     const Interface_Graph&                                            theGraph,
0083     const occ::handle<StepShape_ContextDependentShapeRepresentation>& CDSR);
0084 
0085 private:
0086   occ::handle<StepShape_ShapeDefinitionRepresentation>    thesdr;
0087   occ::handle<StepShape_ShapeDefinitionRepresentation>    thesdr0;
0088   occ::handle<StepShape_ShapeRepresentation>              thesr;
0089   occ::handle<StepShape_ShapeRepresentation>              thesr0;
0090   occ::handle<Standard_Transient>                         theval;
0091   occ::handle<StepGeom_Axis2Placement3d>                  theloc;
0092   occ::handle<StepGeom_Axis2Placement3d>                  theax0;
0093   occ::handle<StepGeom_CartesianTransformationOperator3d> myTrsfOp;
0094   bool                                                    myIsCartesianTrsf;
0095 };
0096 
0097 #endif // _STEPConstruct_Assembly_HeaderFile