From: ika Date: Thu, 23 Apr 2020 08:22:16 +0000 (+0300) Subject: # Add rigit_link_representation entity X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=ccdb5696e0da922c4aceb6e0176258ab66dd6604;p=occt-copy.git # Add rigit_link_representation entity --- diff --git a/src/RWStepAP214/RWStepAP214_GeneralModule.cxx b/src/RWStepAP214/RWStepAP214_GeneralModule.cxx index a1be5d63eb..5afbe54a95 100644 --- a/src/RWStepAP214/RWStepAP214_GeneralModule.cxx +++ b/src/RWStepAP214/RWStepAP214_GeneralModule.cxx @@ -1405,6 +1405,7 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_GeneralModule,StepData_GeneralModule) #include #include #include +#include #include #include #include @@ -1475,6 +1476,7 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_GeneralModule,StepData_GeneralModule) #include #include #include +#include #include #include #include @@ -5779,6 +5781,13 @@ void RWStepAP214_GeneralModule::FillSharedCase(const Standard_Integer CN, tool.Share(anent, iter); } break; + case 789: + { + DeclareAndCast(StepKinematics_RigidLinkRepresentation, anent, ent); + RWStepKinematics_RWRigidLinkRepresentation tool; + tool.Share(anent, iter); + } + break; break; default : break; @@ -8000,6 +8009,9 @@ Standard_Boolean RWStepAP214_GeneralModule::NewVoid case 788: ent = new StepKinematics_PairRepresentationRelationship; break; + case 789: + ent = new StepKinematics_RigidLinkRepresentation; + break; default: @@ -8669,6 +8681,7 @@ Standard_Integer RWStepAP214_GeneralModule::CategoryNumber case 786: return cataux; case 787: return cataux; case 788: return cataux; + case 789: return cataux; default : break; diff --git a/src/RWStepAP214/RWStepAP214_ReadWriteModule.cxx b/src/RWStepAP214/RWStepAP214_ReadWriteModule.cxx index 7403443517..658d2cd03b 100644 --- a/src/RWStepAP214/RWStepAP214_ReadWriteModule.cxx +++ b/src/RWStepAP214/RWStepAP214_ReadWriteModule.cxx @@ -1452,6 +1452,7 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_ReadWriteModule,StepData_ReadWriteModule) #include #include #include +#include #include #include #include @@ -1521,6 +1522,7 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_ReadWriteModule,StepData_ReadWriteModule) #include #include #include +#include #include #include #include @@ -2233,6 +2235,7 @@ static TCollection_AsciiString Reco_RackAndPinionPairWithRange("RACK_AND_PINION_ static TCollection_AsciiString Reco_RevolutePair("REVOLUTE_PAIR"); static TCollection_AsciiString Reco_RevolutePairValue("REVOLUTE_PAIR_VALUE"); static TCollection_AsciiString Reco_RevolutePairWithRange("REVOLUTE_PAIR_WITH_RANGE"); +static TCollection_AsciiString Reco_RigidLinkRepresentation("RIGID_LINK_REPRESENTATION"); static TCollection_AsciiString Reco_RollingCurvePair("ROLLING_CURVE_PAIR"); static TCollection_AsciiString Reco_RollingCurvePairValue("ROLLING_CURVE_PAIR_VALUE"); static TCollection_AsciiString Reco_RollingSurfacePair("ROLLING_SURFACE_PAIR"); @@ -2982,6 +2985,7 @@ RWStepAP214_ReadWriteModule::RWStepAP214_ReadWriteModule () typenums.Bind(Reco_UniversalPairValue, 786); typenums.Bind(Reco_UniversalPairWithRange, 787); typenums.Bind(Reco_PairRepresentationRelationship, 788); + typenums.Bind(Reco_RigidLinkRepresentation, 789); // SHORT NAMES @@ -4907,6 +4911,7 @@ const TCollection_AsciiString& RWStepAP214_ReadWriteModule::StepType case 786: return Reco_UniversalPairValue; case 787: return Reco_UniversalPairWithRange; case 788: return Reco_PairRepresentationRelationship; + case 789: return Reco_RigidLinkRepresentation; default : return PasReco; @@ -10291,6 +10296,13 @@ void RWStepAP214_ReadWriteModule::ReadStep(const Standard_Integer CN, tool.ReadStep(data, num, ach, anent); } break; + case 789: + { + DeclareAndCast(StepKinematics_RigidLinkRepresentation, anent, ent); + RWStepKinematics_RWRigidLinkRepresentation tool; + tool.ReadStep(data, num, ach, anent); + } + break; default: ach->AddFail("Type Mismatch when reading - Entity"); @@ -15630,6 +15642,13 @@ void RWStepAP214_ReadWriteModule::WriteStep(const Standard_Integer CN, tool.WriteStep(SW, anent); } break; + case 789: + { + DeclareAndCast(StepKinematics_RigidLinkRepresentation, anent, ent); + RWStepKinematics_RWRigidLinkRepresentation tool; + tool.WriteStep(SW, anent); + } + break; default: return; diff --git a/src/RWStepKinematics/FILES b/src/RWStepKinematics/FILES index c5981f704a..88e053d56a 100644 --- a/src/RWStepKinematics/FILES +++ b/src/RWStepKinematics/FILES @@ -84,6 +84,8 @@ RWStepKinematics_RWRevolutePairValue.cxx RWStepKinematics_RWRevolutePairValue.hxx RWStepKinematics_RWRevolutePairWithRange.cxx RWStepKinematics_RWRevolutePairWithRange.hxx +RWStepKinematics_RWRigidLinkRepresentation.cxx +RWStepKinematics_RWRigidLinkRepresentation.hxx RWStepKinematics_RWRollingCurvePair.cxx RWStepKinematics_RWRollingCurvePair.hxx RWStepKinematics_RWRollingCurvePairValue.cxx diff --git a/src/RWStepKinematics/RWStepKinematics_RWRigidLinkRepresentation.cxx b/src/RWStepKinematics/RWStepKinematics_RWRigidLinkRepresentation.cxx new file mode 100644 index 0000000000..57f998d457 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWRigidLinkRepresentation.cxx @@ -0,0 +1,115 @@ +// Created on : Wed Apr 22 18:51:50 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWRigidLinkRepresentation +//purpose : +//======================================================================= + +RWStepKinematics_RWRigidLinkRepresentation::RWStepKinematics_RWRigidLinkRepresentation() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= + +void RWStepKinematics_RWRigidLinkRepresentation::ReadStep (const Handle(StepData_StepReaderData)& data, + const Standard_Integer num, + Handle(Interface_Check)& ach, + const Handle(StepKinematics_RigidLinkRepresentation)& ent) const +{ + // Check number of parameters + if ( ! data->CheckNbParams(num,3,ach,"rigid_link_representation") ) return; + + // Inherited fields of Representation + + Handle(TCollection_HAsciiString) aRepresentation_Name; + data->ReadString (num, 1, "representation.name", ach, aRepresentation_Name); + + Handle(StepRepr_HArray1OfRepresentationItem) aRepresentation_Items; + Standard_Integer sub2 = 0; + if ( data->ReadSubList (num, 2, "representation.items", ach, sub2) ) { + Standard_Integer nb0 = data->NbParams(sub2); + aRepresentation_Items = new StepRepr_HArray1OfRepresentationItem (1, nb0); + Standard_Integer num2 = sub2; + for ( Standard_Integer i0=1; i0 <= nb0; i0++ ) { + Handle(StepRepr_RepresentationItem) anIt0; + data->ReadEntity (num2, i0, "representation_item", ach, STANDARD_TYPE(StepRepr_RepresentationItem), anIt0); + aRepresentation_Items->SetValue(i0, anIt0); + } + } + + Handle(StepRepr_RepresentationContext) aRepresentation_ContextOfItems; + data->ReadEntity (num, 3, "representation.context_of_items", ach, STANDARD_TYPE(StepRepr_RepresentationContext), aRepresentation_ContextOfItems); + + // Initialize entity + ent->Init(aRepresentation_Name, + aRepresentation_Items, + aRepresentation_ContextOfItems); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= + +void RWStepKinematics_RWRigidLinkRepresentation::WriteStep (StepData_StepWriter& SW, + const Handle(StepKinematics_RigidLinkRepresentation)& ent) const +{ + + // Own fields of Representation + + SW.Send (ent->Name()); + + SW.OpenSub(); + for (Standard_Integer i1=1; i1 <= ent->Items()->Length(); i1++ ) { + Handle(StepRepr_RepresentationItem) Var0 = ent->Items()->Value(i1); + SW.Send (Var0); + } + SW.CloseSub(); + + SW.Send (ent->ContextOfItems()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= + +void RWStepKinematics_RWRigidLinkRepresentation::Share (const Handle(StepKinematics_RigidLinkRepresentation)& ent, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of Representation + + for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) { + Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1); + iter.AddItem (Var0); + } + + iter.AddItem (ent->StepRepr_Representation::ContextOfItems()); +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWRigidLinkRepresentation.hxx b/src/RWStepKinematics/RWStepKinematics_RWRigidLinkRepresentation.hxx new file mode 100644 index 0000000000..a87fef0830 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWRigidLinkRepresentation.hxx @@ -0,0 +1,46 @@ +// Created on : Wed Apr 22 18:51:50 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#ifndef _RWStepKinematics_RWRigidLinkRepresentation_HeaderFile_ +#define _RWStepKinematics_RWRigidLinkRepresentation_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_RigidLinkRepresentation; + +//! Read & Write tool for RigidLinkRepresentation +class RWStepKinematics_RWRigidLinkRepresentation +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWRigidLinkRepresentation(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& data, const Standard_Integer num, Handle(Interface_Check)& ach, const Handle(StepKinematics_RigidLinkRepresentation)& ent) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& SW, const Handle(StepKinematics_RigidLinkRepresentation)& ent) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_RigidLinkRepresentation)& ent, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWRigidLinkRepresentation_HeaderFile_ diff --git a/src/StepAP214/StepAP214_Protocol.cxx b/src/StepAP214/StepAP214_Protocol.cxx index 39f671ef71..358b6fdc0d 100644 --- a/src/StepAP214/StepAP214_Protocol.cxx +++ b/src/StepAP214/StepAP214_Protocol.cxx @@ -797,6 +797,7 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI #include #include #include +#include #include #include #include @@ -1601,6 +1602,7 @@ StepAP214_Protocol::StepAP214_Protocol () types.Bind(STANDARD_TYPE(StepKinematics_UniversalPairValue), 786); types.Bind(STANDARD_TYPE(StepKinematics_UniversalPairWithRange), 787); types.Bind(STANDARD_TYPE(StepKinematics_PairRepresentationRelationship), 788); + types.Bind(STANDARD_TYPE(StepKinematics_RigidLinkRepresentation), 789); } diff --git a/src/StepKinematics/FILES b/src/StepKinematics/FILES index d092dcc017..1dd4eb371e 100644 --- a/src/StepKinematics/FILES +++ b/src/StepKinematics/FILES @@ -97,6 +97,8 @@ StepKinematics_RevolutePairValue.cxx StepKinematics_RevolutePairValue.hxx StepKinematics_RevolutePairWithRange.cxx StepKinematics_RevolutePairWithRange.hxx +StepKinematics_RigidLinkRepresentation.cxx +StepKinematics_RigidLinkRepresentation.hxx StepKinematics_RigidPlacement.cxx StepKinematics_RigidPlacement.hxx StepKinematics_RollingCurvePair.cxx diff --git a/src/StepKinematics/StepKinematics_RigidLinkRepresentation.cxx b/src/StepKinematics/StepKinematics_RigidLinkRepresentation.cxx new file mode 100644 index 0000000000..82df53b931 --- /dev/null +++ b/src/StepKinematics/StepKinematics_RigidLinkRepresentation.cxx @@ -0,0 +1,28 @@ +// Created on : Wed Apr 22 18:51:50 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_RigidLinkRepresentation, StepKinematics_KinematicLinkRepresentation) + +//======================================================================= +//function : StepKinematics_RigidLinkRepresentation +//purpose : +//======================================================================= + +StepKinematics_RigidLinkRepresentation::StepKinematics_RigidLinkRepresentation () +{ +} diff --git a/src/StepKinematics/StepKinematics_RigidLinkRepresentation.hxx b/src/StepKinematics/StepKinematics_RigidLinkRepresentation.hxx new file mode 100644 index 0000000000..935a80c1c0 --- /dev/null +++ b/src/StepKinematics/StepKinematics_RigidLinkRepresentation.hxx @@ -0,0 +1,41 @@ +// Created on : Wed Apr 22 18:51:50 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#ifndef _StepKinematics_RigidLinkRepresentation_HeaderFile_ +#define _StepKinematics_RigidLinkRepresentation_HeaderFile_ + +#include +#include +#include + +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_RigidLinkRepresentation, StepKinematics_KinematicLinkRepresentation) + +//! Representation of STEP entity RigidLinkRepresentation +class StepKinematics_RigidLinkRepresentation : public StepKinematics_KinematicLinkRepresentation +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_RigidLinkRepresentation(); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_RigidLinkRepresentation, StepKinematics_KinematicLinkRepresentation) + +}; +#endif // _StepKinematics_RigidLinkRepresentation_HeaderFile_