diff --git a/src/RWStepBasic/FILES b/src/RWStepBasic/FILES index 55f8417568..f71dd7636b 100644 --- a/src/RWStepBasic/FILES +++ b/src/RWStepBasic/FILES @@ -180,6 +180,10 @@ RWStepBasic_RWProductDefinitionFormationRelationship.cxx RWStepBasic_RWProductDefinitionFormationRelationship.hxx RWStepBasic_RWProductDefinitionFormationWithSpecifiedSource.cxx RWStepBasic_RWProductDefinitionFormationWithSpecifiedSource.hxx +RWStepBasic_RWProductDefinitionReference.cxx +RWStepBasic_RWProductDefinitionReference.hxx +RWStepBasic_RWProductDefinitionReferenceWithLocalRepresentation.cxx +RWStepBasic_RWProductDefinitionReferenceWithLocalRepresentation.hxx RWStepBasic_RWProductDefinitionRelationship.cxx RWStepBasic_RWProductDefinitionRelationship.hxx RWStepBasic_RWProductDefinitionWithAssociatedDocuments.cxx diff --git a/src/RWStepBasic/RWStepBasic_RWProductDefinitionReference.cxx b/src/RWStepBasic/RWStepBasic_RWProductDefinitionReference.cxx new file mode 100644 index 0000000000..e7c7dbe9aa --- /dev/null +++ b/src/RWStepBasic/RWStepBasic_RWProductDefinitionReference.cxx @@ -0,0 +1,111 @@ +// Created on: 2016-03-31 +// Created by: Irina KRYLOVA +// Copyright (c) 2016 OPEN CASCADE SAS +// +// 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. + +//gka 05.03.99 S4134 upgrade from CD to DIS + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : StepBasic_ProductDefinitionReference +//purpose : +//======================================================================= +RWStepBasic_RWProductDefinitionReference::RWStepBasic_RWProductDefinitionReference () {} + +//======================================================================= +//function : StepBasic_ProductDefinitionReference +//purpose : +//======================================================================= +void RWStepBasic_RWProductDefinitionReference::ReadStep + (const Handle(StepData_StepReaderData)& data, + const Standard_Integer num, + Handle(Interface_Check)& ach, + const Handle(StepBasic_ProductDefinitionReference)& ent) const +{ + // Number of Parameter Control + if (!data->CheckNbParams(num, 5, ach, "product_definition_reference")) return; + + // Own field source + Handle(StepBasic_ExternalSource) aSource; + data->ReadEntity(num, 1,"source", ach, STANDARD_TYPE(StepBasic_ExternalSource), aSource); + + // Own field : product_id + Handle(TCollection_HAsciiString) aProductId; + data->ReadString (num, 2, "product_id", ach, aProductId); + + // Own field : product_definition_formation_id + Handle(TCollection_HAsciiString) aProductDefinitionFormationId; + data->ReadString (num, 3, "product_definition_formation_id", ach, aProductDefinitionFormationId); + + // Own field : product_definition_id + Handle(TCollection_HAsciiString) aProductDefinitionId; + data->ReadString (num, 4, "product_definition_id", ach, aProductDefinitionId); + + // Own field : id_owning_organization_name + Handle(TCollection_HAsciiString) aIdOwningOrganizationName; + if (data->IsParamDefined (num, 5)) { + data->ReadString (num, 5, "id_owning_organization_name", ach, aIdOwningOrganizationName); + } + + //--- Initialisation of the read entity --- + ent->Init(aSource, aProductId, aProductDefinitionFormationId, aProductDefinitionId, aIdOwningOrganizationName); +} + + +//======================================================================= +//function : StepBasic_ProductDefinitionReference +//purpose : +//======================================================================= +void RWStepBasic_RWProductDefinitionReference::WriteStep + (StepData_StepWriter& SW, + const Handle(StepBasic_ProductDefinitionReference)& ent) const +{ + + // Own field : source + SW.Send(ent->Source()); + + // Own field : product_id + SW.Send(ent->ProductId()); + + // Own field : product_definition_formation_id + SW.Send(ent->ProductDefinitionFormationId()); + + // Own field : product_definition_id + SW.Send(ent->ProductDefinitionId()); + + // Own field : id_owning_organization_name + if (ent->HasIdOwningOrganizationName()) + SW.Send(ent->IdOwningOrganizationName()); + else + SW.SendUndef(); +} + + +//======================================================================= +//function : StepBasic_ProductDefinitionReference +//purpose : +//======================================================================= +void RWStepBasic_RWProductDefinitionReference::Share(const Handle(StepBasic_ProductDefinitionReference)& ent, Interface_EntityIterator& iter) const +{ + iter.GetOneItem(ent->Source()); +} + diff --git a/src/RWStepBasic/RWStepBasic_RWProductDefinitionReference.hxx b/src/RWStepBasic/RWStepBasic_RWProductDefinitionReference.hxx new file mode 100644 index 0000000000..5eaf14cd23 --- /dev/null +++ b/src/RWStepBasic/RWStepBasic_RWProductDefinitionReference.hxx @@ -0,0 +1,47 @@ +// Created on: 2016-03-31 +// Created by: Irina KRYLOVA +// Copyright (c) 2016 OPEN CASCADE SAS +// +// 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 _RWStepBasic_RWProductDefinitionReference_HeaderFile +#define _RWStepBasic_RWProductDefinitionReference_HeaderFile + +#include +#include +#include + +#include +class StepData_StepReaderData; +class Interface_Check; +class StepBasic_ProductDefinitionReference; +class StepData_StepWriter; +class Interface_EntityIterator; + + +//! Read & Write Module for ProductDefinitionReference +class RWStepBasic_RWProductDefinitionReference +{ +public: + + DEFINE_STANDARD_ALLOC + + + Standard_EXPORT RWStepBasic_RWProductDefinitionReference(); + + Standard_EXPORT void ReadStep (const Handle(StepData_StepReaderData)& data, const Standard_Integer num, Handle(Interface_Check)& ach, const Handle(StepBasic_ProductDefinitionReference)& ent) const; + + Standard_EXPORT void WriteStep (StepData_StepWriter& SW, const Handle(StepBasic_ProductDefinitionReference)& ent) const; + + Standard_EXPORT void Share (const Handle(StepBasic_ProductDefinitionReference)& ent, Interface_EntityIterator& iter) const; +}; +#endif // _RWStepBasic_RWProductDefinitionReference_HeaderFile diff --git a/src/RWStepBasic/RWStepBasic_RWProductDefinitionReferenceWithLocalRepresentation.cxx b/src/RWStepBasic/RWStepBasic_RWProductDefinitionReferenceWithLocalRepresentation.cxx new file mode 100644 index 0000000000..8260af4ef3 --- /dev/null +++ b/src/RWStepBasic/RWStepBasic_RWProductDefinitionReferenceWithLocalRepresentation.cxx @@ -0,0 +1,110 @@ +// Created on: 2016-03-31 +// Created by: Irina KRYLOVA +// Copyright (c) 2016 OPEN CASCADE SAS +// +// 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 : RWStepBasic_RWProductDefinitionReferenceWithLocalRepresentation +//purpose : +//======================================================================= +RWStepBasic_RWProductDefinitionReferenceWithLocalRepresentation:: + RWStepBasic_RWProductDefinitionReferenceWithLocalRepresentation () {} + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepBasic_RWProductDefinitionReferenceWithLocalRepresentation::ReadStep + (const Handle(StepData_StepReaderData)& data, + const Standard_Integer num, + Handle(Interface_Check)& ach, + const Handle(StepBasic_ProductDefinitionReferenceWithLocalRepresentation)& ent) const +{ + // Number of Parameter Control + if (!data->CheckNbParams(num, 5, ach, "product_definition_reference_with_local_representation")) return; + + // Own field source + Handle(StepBasic_ExternalSource) aSource; + data->ReadEntity(num, 1,"source", ach, STANDARD_TYPE(StepBasic_ExternalSource), aSource); + + // Inherited field : id + Handle(TCollection_HAsciiString) aId; + data->ReadString (num, 2, "id", ach, aId); + + // Inherited field : description + Handle(TCollection_HAsciiString) aDescription; + if (data->IsParamDefined (num, 3)) { + data->ReadString (num, 3, "description", ach, aDescription); + } + + // Inherited field : formation + Handle(StepBasic_ProductDefinitionFormation) aFormation; + data->ReadEntity(num, 4, "formation", ach, STANDARD_TYPE(StepBasic_ProductDefinitionFormation), aFormation); + + // Inherited : frame_of_reference + Handle(StepBasic_ProductDefinitionContext) aFrameOfReference; + data->ReadEntity(num, 5,"frame_of_reference", ach, STANDARD_TYPE(StepBasic_ProductDefinitionContext), aFrameOfReference); + + // Initialisation of the read entity + ent->Init(aSource, aId, aDescription, aFormation, aFrameOfReference); +} + + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepBasic_RWProductDefinitionReferenceWithLocalRepresentation::WriteStep + (StepData_StepWriter& SW, + const Handle(StepBasic_ProductDefinitionReferenceWithLocalRepresentation)& ent) const +{ + // Own field : source + SW.Send(ent->Source()); + + // Inherited field : id + SW.Send(ent->Id()); + + // Inherited field : description + SW.Send(ent->Description()); + + // Inherited field : formation + SW.Send(ent->Formation()); + + // Inherited field : frame_of_reference + SW.Send(ent->FrameOfReference()); +} + + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepBasic_RWProductDefinitionReferenceWithLocalRepresentation::Share( + const Handle(StepBasic_ProductDefinitionReferenceWithLocalRepresentation)& ent, + Interface_EntityIterator& iter) const +{ + iter.GetOneItem(ent->Source()); + iter.GetOneItem(ent->Formation()); + iter.GetOneItem(ent->FrameOfReference()); +} + diff --git a/src/RWStepBasic/RWStepBasic_RWProductDefinitionReferenceWithLocalRepresentation.hxx b/src/RWStepBasic/RWStepBasic_RWProductDefinitionReferenceWithLocalRepresentation.hxx new file mode 100644 index 0000000000..efaafe5da4 --- /dev/null +++ b/src/RWStepBasic/RWStepBasic_RWProductDefinitionReferenceWithLocalRepresentation.hxx @@ -0,0 +1,47 @@ +// Created on: 2016-03-31 +// Created by: Irina KRYLOVA +// Copyright (c) 2016 OPEN CASCADE SAS +// +// 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 _RWStepBasic_RWProductDefinitionReferenceWithLocalRepresentation_HeaderFile +#define _RWStepBasic_RWProductDefinitionReferenceWithLocalRepresentation_HeaderFile + +#include +#include +#include + +#include +class StepData_StepReaderData; +class Interface_Check; +class StepBasic_ProductDefinitionReferenceWithLocalRepresentation; +class StepData_StepWriter; +class Interface_EntityIterator; + + +//! Read & Write Module for ProductDefinitionReferenceWithLocalRepresentation +class RWStepBasic_RWProductDefinitionReferenceWithLocalRepresentation +{ +public: + + DEFINE_STANDARD_ALLOC + + + Standard_EXPORT RWStepBasic_RWProductDefinitionReferenceWithLocalRepresentation(); + + Standard_EXPORT void ReadStep (const Handle(StepData_StepReaderData)& data, const Standard_Integer num, Handle(Interface_Check)& ach, const Handle(StepBasic_ProductDefinitionReferenceWithLocalRepresentation)& ent) const; + + Standard_EXPORT void WriteStep (StepData_StepWriter& SW, const Handle(StepBasic_ProductDefinitionReferenceWithLocalRepresentation)& ent) const; + + Standard_EXPORT void Share (const Handle(StepBasic_ProductDefinitionReferenceWithLocalRepresentation)& ent, Interface_EntityIterator& iter) const; +}; +#endif // _RWStepBasic_RWProductDefinitionReferenceWithLocalRepresentation_HeaderFile diff --git a/src/RWStepBasic/RWStepBasic_RWProductDefinitionRelationship.cxx b/src/RWStepBasic/RWStepBasic_RWProductDefinitionRelationship.cxx index fab0c6fca2..2e3debcabd 100644 --- a/src/RWStepBasic/RWStepBasic_RWProductDefinitionRelationship.cxx +++ b/src/RWStepBasic/RWStepBasic_RWProductDefinitionRelationship.cxx @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include #include @@ -61,11 +61,11 @@ void RWStepBasic_RWProductDefinitionRelationship::ReadStep (const Handle(StepDat hasDescription = Standard_False; } - Handle(StepBasic_ProductDefinition) aRelatingProductDefinition; - data->ReadEntity (num, 4, "relating_product_definition", ach, STANDARD_TYPE(StepBasic_ProductDefinition), aRelatingProductDefinition); + StepBasic_ProductDefinitionOrReference aRelatingProductDefinition; + data->ReadEntity (num, 4, "relating_product_definition", ach, aRelatingProductDefinition); - Handle(StepBasic_ProductDefinition) aRelatedProductDefinition; - data->ReadEntity (num, 5, "related_product_definition", ach, STANDARD_TYPE(StepBasic_ProductDefinition), aRelatedProductDefinition); + StepBasic_ProductDefinitionOrReference aRelatedProductDefinition; + data->ReadEntity (num, 5, "related_product_definition", ach, aRelatedProductDefinition); // Initialize entity ent->Init(aId, @@ -96,9 +96,9 @@ void RWStepBasic_RWProductDefinitionRelationship::WriteStep (StepData_StepWriter } else SW.SendUndef(); - SW.Send (ent->RelatingProductDefinition()); + SW.Send (ent->RelatingProductDefinitionAP242().Value()); - SW.Send (ent->RelatedProductDefinition()); + SW.Send (ent->RelatedProductDefinitionAP242().Value()); } //======================================================================= @@ -112,7 +112,7 @@ void RWStepBasic_RWProductDefinitionRelationship::Share (const Handle(StepBasic_ // Own fields of ProductDefinitionRelationship - iter.AddItem (ent->RelatingProductDefinition()); + iter.AddItem (ent->RelatingProductDefinitionAP242().Value()); - iter.AddItem (ent->RelatedProductDefinition()); + iter.AddItem (ent->RelatedProductDefinitionAP242().Value()); } diff --git a/src/RWStepRepr/RWStepRepr_RWAssemblyComponentUsage.cxx b/src/RWStepRepr/RWStepRepr_RWAssemblyComponentUsage.cxx index 40efb30457..6771dad1a2 100644 --- a/src/RWStepRepr/RWStepRepr_RWAssemblyComponentUsage.cxx +++ b/src/RWStepRepr/RWStepRepr_RWAssemblyComponentUsage.cxx @@ -62,27 +62,27 @@ void RWStepRepr_RWAssemblyComponentUsage::ReadStep (const Handle(StepData_StepRe hasProductDefinitionRelationship_Description = Standard_False; } - Handle(StepBasic_ProductDefinition) aProductDefinitionRelationship_RelatingProductDefinition; - data->ReadEntity (num, 4, "product_definition_relationship.relating_product_definition", ach, STANDARD_TYPE(StepBasic_ProductDefinition), aProductDefinitionRelationship_RelatingProductDefinition); - if (aProductDefinitionRelationship_RelatingProductDefinition.IsNull()) + StepBasic_ProductDefinitionOrReference aProductDefinitionRelationship_RelatingProductDefinition; + data->ReadEntity (num, 4, "product_definition_relationship.relating_product_definition", ach, aProductDefinitionRelationship_RelatingProductDefinition); + if (aProductDefinitionRelationship_RelatingProductDefinition.Value().IsNull()) { Handle(StepRepr_ProductDefinitionShape) aProductDefinitionShape; data->ReadEntity (num, 4, "product_definition_relationship.relating_product_definition_shape", ach, STANDARD_TYPE(StepRepr_ProductDefinitionShape), aProductDefinitionShape); if (!aProductDefinitionShape.IsNull()) { - aProductDefinitionRelationship_RelatingProductDefinition = aProductDefinitionShape->Definition().ProductDefinition(); + aProductDefinitionRelationship_RelatingProductDefinition.SetValue(aProductDefinitionShape->Definition().ProductDefinition()); } } - Handle(StepBasic_ProductDefinition) aProductDefinitionRelationship_RelatedProductDefinition; - data->ReadEntity (num, 5, "product_definition_relationship.related_product_definition", ach, STANDARD_TYPE(StepBasic_ProductDefinition), aProductDefinitionRelationship_RelatedProductDefinition); - if (aProductDefinitionRelationship_RelatedProductDefinition.IsNull()) + StepBasic_ProductDefinitionOrReference aProductDefinitionRelationship_RelatedProductDefinition; + data->ReadEntity (num, 5, "product_definition_relationship.related_product_definition", ach, aProductDefinitionRelationship_RelatedProductDefinition); + if (aProductDefinitionRelationship_RelatedProductDefinition.Value().IsNull()) { Handle(StepRepr_ProductDefinitionShape) aProductDefinitionShape; data->ReadEntity (num, 5, "product_definition_relationship.related_product_definition_shape", ach, STANDARD_TYPE(StepRepr_ProductDefinitionShape), aProductDefinitionShape); if (!aProductDefinitionShape.IsNull()) { - aProductDefinitionRelationship_RelatedProductDefinition = aProductDefinitionShape->Definition().ProductDefinition(); + aProductDefinitionRelationship_RelatedProductDefinition.SetValue(aProductDefinitionShape->Definition().ProductDefinition()); } } @@ -128,9 +128,9 @@ void RWStepRepr_RWAssemblyComponentUsage::WriteStep (StepData_StepWriter& SW, } else SW.SendUndef(); - SW.Send (ent->StepBasic_ProductDefinitionRelationship::RelatingProductDefinition()); + SW.Send (ent->StepBasic_ProductDefinitionRelationship::RelatingProductDefinitionAP242().Value()); - SW.Send (ent->StepBasic_ProductDefinitionRelationship::RelatedProductDefinition()); + SW.Send (ent->StepBasic_ProductDefinitionRelationship::RelatedProductDefinitionAP242().Value()); // Own fields of AssemblyComponentUsage @@ -151,9 +151,9 @@ void RWStepRepr_RWAssemblyComponentUsage::Share (const Handle(StepRepr_AssemblyC // Inherited fields of ProductDefinitionRelationship - iter.AddItem (ent->StepBasic_ProductDefinitionRelationship::RelatingProductDefinition()); + iter.AddItem (ent->StepBasic_ProductDefinitionRelationship::RelatingProductDefinitionAP242().Value()); - iter.AddItem (ent->StepBasic_ProductDefinitionRelationship::RelatedProductDefinition()); + iter.AddItem (ent->StepBasic_ProductDefinitionRelationship::RelatedProductDefinitionAP242().Value()); // Own fields of AssemblyComponentUsage } diff --git a/src/RWStepRepr/RWStepRepr_RWMakeFromUsageOption.cxx b/src/RWStepRepr/RWStepRepr_RWMakeFromUsageOption.cxx index 62e62cbbd1..1687c59130 100644 --- a/src/RWStepRepr/RWStepRepr_RWMakeFromUsageOption.cxx +++ b/src/RWStepRepr/RWStepRepr_RWMakeFromUsageOption.cxx @@ -62,11 +62,11 @@ void RWStepRepr_RWMakeFromUsageOption::ReadStep (const Handle(StepData_StepReade hasProductDefinitionRelationship_Description = Standard_False; } - Handle(StepBasic_ProductDefinition) aProductDefinitionRelationship_RelatingProductDefinition; - data->ReadEntity (num, 4, "product_definition_relationship.relating_product_definition", ach, STANDARD_TYPE(StepBasic_ProductDefinition), aProductDefinitionRelationship_RelatingProductDefinition); + StepBasic_ProductDefinitionOrReference aProductDefinitionRelationship_RelatingProductDefinition; + data->ReadEntity (num, 4, "product_definition_relationship.relating_product_definition", ach, aProductDefinitionRelationship_RelatingProductDefinition); - Handle(StepBasic_ProductDefinition) aProductDefinitionRelationship_RelatedProductDefinition; - data->ReadEntity (num, 5, "product_definition_relationship.related_product_definition", ach, STANDARD_TYPE(StepBasic_ProductDefinition), aProductDefinitionRelationship_RelatedProductDefinition); + StepBasic_ProductDefinitionOrReference aProductDefinitionRelationship_RelatedProductDefinition; + data->ReadEntity (num, 5, "product_definition_relationship.related_product_definition", ach, aProductDefinitionRelationship_RelatedProductDefinition); // Own fields of MakeFromUsageOption @@ -111,9 +111,9 @@ void RWStepRepr_RWMakeFromUsageOption::WriteStep (StepData_StepWriter& SW, } else SW.SendUndef(); - SW.Send (ent->StepBasic_ProductDefinitionRelationship::RelatingProductDefinition()); + SW.Send (ent->StepBasic_ProductDefinitionRelationship::RelatingProductDefinitionAP242().Value()); - SW.Send (ent->StepBasic_ProductDefinitionRelationship::RelatedProductDefinition()); + SW.Send (ent->StepBasic_ProductDefinitionRelationship::RelatedProductDefinitionAP242().Value()); // Own fields of MakeFromUsageOption @@ -135,9 +135,9 @@ void RWStepRepr_RWMakeFromUsageOption::Share (const Handle(StepRepr_MakeFromUsag // Inherited fields of ProductDefinitionRelationship - iter.AddItem (ent->StepBasic_ProductDefinitionRelationship::RelatingProductDefinition()); + iter.AddItem (ent->StepBasic_ProductDefinitionRelationship::RelatingProductDefinitionAP242().Value()); - iter.AddItem (ent->StepBasic_ProductDefinitionRelationship::RelatedProductDefinition()); + iter.AddItem (ent->StepBasic_ProductDefinitionRelationship::RelatedProductDefinitionAP242().Value()); // Own fields of MakeFromUsageOption diff --git a/src/RWStepRepr/RWStepRepr_RWQuantifiedAssemblyComponentUsage.cxx b/src/RWStepRepr/RWStepRepr_RWQuantifiedAssemblyComponentUsage.cxx index 9622890ecc..549cf852bc 100644 --- a/src/RWStepRepr/RWStepRepr_RWQuantifiedAssemblyComponentUsage.cxx +++ b/src/RWStepRepr/RWStepRepr_RWQuantifiedAssemblyComponentUsage.cxx @@ -62,11 +62,11 @@ void RWStepRepr_RWQuantifiedAssemblyComponentUsage::ReadStep (const Handle(StepD hasProductDefinitionRelationship_Description = Standard_False; } - Handle(StepBasic_ProductDefinition) aProductDefinitionRelationship_RelatingProductDefinition; - data->ReadEntity (num, 4, "product_definition_relationship.relating_product_definition", ach, STANDARD_TYPE(StepBasic_ProductDefinition), aProductDefinitionRelationship_RelatingProductDefinition); + StepBasic_ProductDefinitionOrReference aProductDefinitionRelationship_RelatingProductDefinition; + data->ReadEntity (num, 4, "product_definition_relationship.relating_product_definition", ach, aProductDefinitionRelationship_RelatingProductDefinition); - Handle(StepBasic_ProductDefinition) aProductDefinitionRelationship_RelatedProductDefinition; - data->ReadEntity (num, 5, "product_definition_relationship.related_product_definition", ach, STANDARD_TYPE(StepBasic_ProductDefinition), aProductDefinitionRelationship_RelatedProductDefinition); + StepBasic_ProductDefinitionOrReference aProductDefinitionRelationship_RelatedProductDefinition; + data->ReadEntity (num, 5, "product_definition_relationship.related_product_definition", ach, aProductDefinitionRelationship_RelatedProductDefinition); // Inherited fields of AssemblyComponentUsage @@ -116,9 +116,9 @@ void RWStepRepr_RWQuantifiedAssemblyComponentUsage::WriteStep (StepData_StepWrit } else SW.SendUndef(); - SW.Send (ent->StepBasic_ProductDefinitionRelationship::RelatingProductDefinition()); + SW.Send (ent->StepBasic_ProductDefinitionRelationship::RelatingProductDefinitionAP242().Value()); - SW.Send (ent->StepBasic_ProductDefinitionRelationship::RelatedProductDefinition()); + SW.Send (ent->StepBasic_ProductDefinitionRelationship::RelatedProductDefinitionAP242().Value()); // Inherited fields of AssemblyComponentUsage @@ -143,9 +143,9 @@ void RWStepRepr_RWQuantifiedAssemblyComponentUsage::Share (const Handle(StepRepr // Inherited fields of ProductDefinitionRelationship - iter.AddItem (ent->StepBasic_ProductDefinitionRelationship::RelatingProductDefinition()); + iter.AddItem (ent->StepBasic_ProductDefinitionRelationship::RelatingProductDefinitionAP242().Value()); - iter.AddItem (ent->StepBasic_ProductDefinitionRelationship::RelatedProductDefinition()); + iter.AddItem (ent->StepBasic_ProductDefinitionRelationship::RelatedProductDefinitionAP242().Value()); // Inherited fields of AssemblyComponentUsage diff --git a/src/RWStepRepr/RWStepRepr_RWSpecifiedHigherUsageOccurrence.cxx b/src/RWStepRepr/RWStepRepr_RWSpecifiedHigherUsageOccurrence.cxx index 7673b1c7be..8549ef6f26 100644 --- a/src/RWStepRepr/RWStepRepr_RWSpecifiedHigherUsageOccurrence.cxx +++ b/src/RWStepRepr/RWStepRepr_RWSpecifiedHigherUsageOccurrence.cxx @@ -63,11 +63,11 @@ void RWStepRepr_RWSpecifiedHigherUsageOccurrence::ReadStep (const Handle(StepDat hasProductDefinitionRelationship_Description = Standard_False; } - Handle(StepBasic_ProductDefinition) aProductDefinitionRelationship_RelatingProductDefinition; - data->ReadEntity (num, 4, "product_definition_relationship.relating_product_definition", ach, STANDARD_TYPE(StepBasic_ProductDefinition), aProductDefinitionRelationship_RelatingProductDefinition); + StepBasic_ProductDefinitionOrReference aProductDefinitionRelationship_RelatingProductDefinition; + data->ReadEntity (num, 4, "product_definition_relationship.relating_product_definition", ach, aProductDefinitionRelationship_RelatingProductDefinition); - Handle(StepBasic_ProductDefinition) aProductDefinitionRelationship_RelatedProductDefinition; - data->ReadEntity (num, 5, "product_definition_relationship.related_product_definition", ach, STANDARD_TYPE(StepBasic_ProductDefinition), aProductDefinitionRelationship_RelatedProductDefinition); + StepBasic_ProductDefinitionOrReference aProductDefinitionRelationship_RelatedProductDefinition; + data->ReadEntity (num, 5, "product_definition_relationship.related_product_definition", ach, aProductDefinitionRelationship_RelatedProductDefinition); // Inherited fields of AssemblyComponentUsage @@ -121,9 +121,9 @@ void RWStepRepr_RWSpecifiedHigherUsageOccurrence::WriteStep (StepData_StepWriter } else SW.SendUndef(); - SW.Send (ent->StepBasic_ProductDefinitionRelationship::RelatingProductDefinition()); + SW.Send (ent->StepBasic_ProductDefinitionRelationship::RelatingProductDefinitionAP242().Value()); - SW.Send (ent->StepBasic_ProductDefinitionRelationship::RelatedProductDefinition()); + SW.Send (ent->StepBasic_ProductDefinitionRelationship::RelatedProductDefinitionAP242().Value()); // Inherited fields of AssemblyComponentUsage @@ -150,9 +150,9 @@ void RWStepRepr_RWSpecifiedHigherUsageOccurrence::Share (const Handle(StepRepr_S // Inherited fields of ProductDefinitionRelationship - iter.AddItem (ent->StepBasic_ProductDefinitionRelationship::RelatingProductDefinition()); + iter.AddItem (ent->StepBasic_ProductDefinitionRelationship::RelatingProductDefinitionAP242().Value()); - iter.AddItem (ent->StepBasic_ProductDefinitionRelationship::RelatedProductDefinition()); + iter.AddItem (ent->StepBasic_ProductDefinitionRelationship::RelatedProductDefinitionAP242().Value()); // Inherited fields of AssemblyComponentUsage diff --git a/src/RWStepVisual/RWStepVisual_RWAnnotationCurveOccurrence.cxx b/src/RWStepVisual/RWStepVisual_RWAnnotationCurveOccurrence.cxx index dce49234a2..f17d73acdc 100644 --- a/src/RWStepVisual/RWStepVisual_RWAnnotationCurveOccurrence.cxx +++ b/src/RWStepVisual/RWStepVisual_RWAnnotationCurveOccurrence.cxx @@ -62,8 +62,8 @@ void RWStepVisual_RWAnnotationCurveOccurrence::ReadStep } // Inherited field : item - Handle(StepRepr_RepresentationItem) aItem; - data->ReadEntity(num, 3,"item", ach, STANDARD_TYPE(StepRepr_RepresentationItem), aItem); + Handle(MMgt_TShared) aItem; + data->ReadEntity(num, 3,"item", ach, STANDARD_TYPE(MMgt_TShared), aItem); // Initialisation of the read entity ent->Init(aName, aStyles, aItem); diff --git a/src/RWStepVisual/RWStepVisual_RWAnnotationOccurrence.cxx b/src/RWStepVisual/RWStepVisual_RWAnnotationOccurrence.cxx index 8de83e803d..dc4e1ae5a9 100644 --- a/src/RWStepVisual/RWStepVisual_RWAnnotationOccurrence.cxx +++ b/src/RWStepVisual/RWStepVisual_RWAnnotationOccurrence.cxx @@ -62,8 +62,8 @@ void RWStepVisual_RWAnnotationOccurrence::ReadStep } // Inherited field : item - Handle(StepRepr_RepresentationItem) aItem; - data->ReadEntity(num, 3, "item", ach, STANDARD_TYPE(StepRepr_RepresentationItem), aItem); + Handle(MMgt_TShared) aItem; + data->ReadEntity(num, 3,"item", ach, STANDARD_TYPE(MMgt_TShared), aItem); // Initialisation of the read entity ent->Init(aName, aStyles, aItem); diff --git a/src/RWStepVisual/RWStepVisual_RWAnnotationPlane.cxx b/src/RWStepVisual/RWStepVisual_RWAnnotationPlane.cxx index 1f1f6d1bd0..96de4de162 100644 --- a/src/RWStepVisual/RWStepVisual_RWAnnotationPlane.cxx +++ b/src/RWStepVisual/RWStepVisual_RWAnnotationPlane.cxx @@ -62,8 +62,8 @@ void RWStepVisual_RWAnnotationPlane::ReadStep } // Inherited field : item - Handle(StepRepr_RepresentationItem) aItem; - data->ReadEntity(num, 3, "item", ach, STANDARD_TYPE(StepRepr_RepresentationItem), aItem); + Handle(MMgt_TShared) aItem; + data->ReadEntity(num, 3,"item", ach, STANDARD_TYPE(MMgt_TShared), aItem); // Own field: elements Handle(StepVisual_HArray1OfAnnotationPlaneElement) anElements; diff --git a/src/RWStepVisual/RWStepVisual_RWContextDependentOverRidingStyledItem.cxx b/src/RWStepVisual/RWStepVisual_RWContextDependentOverRidingStyledItem.cxx index 94e6482c3f..37db3e3755 100644 --- a/src/RWStepVisual/RWStepVisual_RWContextDependentOverRidingStyledItem.cxx +++ b/src/RWStepVisual/RWStepVisual_RWContextDependentOverRidingStyledItem.cxx @@ -63,9 +63,8 @@ void RWStepVisual_RWContextDependentOverRidingStyledItem::ReadStep // --- inherited field : item --- - Handle(StepRepr_RepresentationItem) aItem; - //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed - data->ReadEntity(num, 3,"item", ach, STANDARD_TYPE(StepRepr_RepresentationItem), aItem); + Handle(MMgt_TShared) aItem; + data->ReadEntity(num, 3,"item", ach, STANDARD_TYPE(MMgt_TShared), aItem); // --- inherited field : overRiddenStyle --- diff --git a/src/RWStepVisual/RWStepVisual_RWOverRidingStyledItem.cxx b/src/RWStepVisual/RWStepVisual_RWOverRidingStyledItem.cxx index 07a8c71bc0..b938f9d883 100644 --- a/src/RWStepVisual/RWStepVisual_RWOverRidingStyledItem.cxx +++ b/src/RWStepVisual/RWStepVisual_RWOverRidingStyledItem.cxx @@ -61,9 +61,8 @@ void RWStepVisual_RWOverRidingStyledItem::ReadStep // --- inherited field : item --- - Handle(StepRepr_RepresentationItem) aItem; - //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed - data->ReadEntity(num, 3,"item", ach, STANDARD_TYPE(StepRepr_RepresentationItem), aItem); + Handle(MMgt_TShared) aItem; + data->ReadEntity(num, 3,"item", ach, STANDARD_TYPE(MMgt_TShared), aItem); // --- own field : overRiddenStyle --- diff --git a/src/RWStepVisual/RWStepVisual_RWStyledItem.cxx b/src/RWStepVisual/RWStepVisual_RWStyledItem.cxx index 1a14a3171d..858232787b 100644 --- a/src/RWStepVisual/RWStepVisual_RWStyledItem.cxx +++ b/src/RWStepVisual/RWStepVisual_RWStyledItem.cxx @@ -60,13 +60,11 @@ void RWStepVisual_RWStyledItem::ReadStep // --- own field : item --- - Handle(StepRepr_RepresentationItem) aItem; - //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed - data->ReadEntity(num, 3,"item", ach, STANDARD_TYPE(StepRepr_RepresentationItem), aItem); + Handle(MMgt_TShared) aItem; + data->ReadEntity(num, 3,"item", ach, STANDARD_TYPE(MMgt_TShared), aItem); //--- Initialisation of the read entity --- - ent->Init(aName, aStyles, aItem); } diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedAnnotationOccurrence.cxx b/src/RWStepVisual/RWStepVisual_RWTessellatedAnnotationOccurrence.cxx index cf34fc9361..e820b219c7 100644 --- a/src/RWStepVisual/RWStepVisual_RWTessellatedAnnotationOccurrence.cxx +++ b/src/RWStepVisual/RWStepVisual_RWTessellatedAnnotationOccurrence.cxx @@ -62,8 +62,8 @@ void RWStepVisual_RWTessellatedAnnotationOccurrence::ReadStep } // Inherited field : item - Handle(StepRepr_RepresentationItem) aItem; - data->ReadEntity(num, 3,"item", ach, STANDARD_TYPE(StepRepr_RepresentationItem), aItem); + Handle(MMgt_TShared) aItem; + data->ReadEntity(num, 3,"item", ach, STANDARD_TYPE(MMgt_TShared), aItem); // Initialisation of the read entity ent->Init(aName, aStyles, aItem); diff --git a/src/STEPCAFControl/STEPCAFControl_Reader.cxx b/src/STEPCAFControl/STEPCAFControl_Reader.cxx index abab08952a..7d329c9ef0 100644 --- a/src/STEPCAFControl/STEPCAFControl_Reader.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Reader.cxx @@ -914,89 +914,97 @@ Standard_Boolean STEPCAFControl_Reader::ReadColors (const Handle(XSControl_WorkS continue; // find shape - TopoDS_Shape S = STEPConstruct::FindShape ( Styles.TransientProcess(), style->Item() ); - Standard_Boolean isSkipSHUOstyle = Standard_False; - // take shape with real location. - while ( IsComponent ) { - // take SR of NAUO - Handle(StepShape_ShapeRepresentation) aSR; - findStyledSR( style, aSR ); - // search for SR along model - if (aSR.IsNull()) + NCollection_Vector anItems; + if (!style->Item().IsNull()) { + anItems.Append(style->Item()); + } + else if (!style->ItemAP242().Representation().IsNull()){ + //special case for AP242: item can be Reprsentation + Handle(StepRepr_Representation) aRepr = style->ItemAP242().Representation(); + for (Standard_Integer i = 1; i <= aRepr->Items()->Length(); i++) + anItems.Append(aRepr->Items()->Value(i)); + } + for (Standard_Integer itemIt = 0; itemIt < anItems.Length(); itemIt++) { + TopoDS_Shape S = STEPConstruct::FindShape ( Styles.TransientProcess(), + Handle(StepRepr_RepresentationItem)::DownCast(anItems.Value(itemIt)) ); + Standard_Boolean isSkipSHUOstyle = Standard_False; + // take shape with real location. + while ( IsComponent ) { + // take SR of NAUO + Handle(StepShape_ShapeRepresentation) aSR; + findStyledSR( style, aSR ); + // search for SR along model + if (aSR.IsNull()) + break; + Handle(XSControl_TransferReader) TR = WS->TransferReader(); + Handle(Transfer_TransientProcess) TP = TR->TransientProcess(); + Interface_EntityIterator subs = WS->HGraph()->Graph().Sharings( aSR ); + Handle(StepShape_ShapeDefinitionRepresentation) aSDR; + for (subs.Start(); subs.More(); subs.Next()) { + aSDR = Handle(StepShape_ShapeDefinitionRepresentation)::DownCast(subs.Value()); + if ( aSDR.IsNull() ) + continue; + StepRepr_RepresentedDefinition aPDSselect = aSDR->Definition(); + Handle(StepRepr_ProductDefinitionShape) PDS = + Handle(StepRepr_ProductDefinitionShape)::DownCast(aPDSselect.PropertyDefinition()); + if ( PDS.IsNull() ) + continue; + StepRepr_CharacterizedDefinition aCharDef = PDS->Definition(); + + Handle(StepRepr_AssemblyComponentUsage) ACU = + Handle(StepRepr_AssemblyComponentUsage)::DownCast(aCharDef.ProductDefinitionRelationship()); + // PTV 10.02.2003 skip styled item that refer to SHUO + if (ACU->IsKind(STANDARD_TYPE(StepRepr_SpecifiedHigherUsageOccurrence))) { + isSkipSHUOstyle = Standard_True; + break; + } + Handle(StepRepr_NextAssemblyUsageOccurrence) NAUO = + Handle(StepRepr_NextAssemblyUsageOccurrence)::DownCast(ACU); + if ( NAUO.IsNull() ) + continue; + + TopoDS_Shape aSh; + // PTV 10.02.2003 to find component of assembly CORRECTLY + STEPConstruct_Tool Tool( WS ); + TDF_Label aShLab = FindInstance ( NAUO, CTool->ShapeTool(), Tool, PDFileMap, ShapeLabelMap ); + aSh = CTool->ShapeTool()->GetShape(aShLab); + if (!aSh.IsNull()) { + S = aSh; + break; + } + } break; -// Handle(Interface_InterfaceModel) Model = WS->Model(); - Handle(XSControl_TransferReader) TR = WS->TransferReader(); - Handle(Transfer_TransientProcess) TP = TR->TransientProcess(); - Interface_EntityIterator subs = WS->HGraph()->Graph().Sharings( aSR ); - Handle(StepShape_ShapeDefinitionRepresentation) aSDR; - for (subs.Start(); subs.More(); subs.Next()) { - aSDR = Handle(StepShape_ShapeDefinitionRepresentation)::DownCast(subs.Value()); - if ( aSDR.IsNull() ) - continue; - StepRepr_RepresentedDefinition aPDSselect = aSDR->Definition(); - Handle(StepRepr_ProductDefinitionShape) PDS = - Handle(StepRepr_ProductDefinitionShape)::DownCast(aPDSselect.PropertyDefinition()); - if ( PDS.IsNull() ) - continue; - StepRepr_CharacterizedDefinition aCharDef = PDS->Definition(); - - Handle(StepRepr_AssemblyComponentUsage) ACU = - Handle(StepRepr_AssemblyComponentUsage)::DownCast(aCharDef.ProductDefinitionRelationship()); - // PTV 10.02.2003 skip styled item that refer to SHUO - if (ACU->IsKind(STANDARD_TYPE(StepRepr_SpecifiedHigherUsageOccurrence))) { - isSkipSHUOstyle = Standard_True; - break; - } - Handle(StepRepr_NextAssemblyUsageOccurrence) NAUO = - Handle(StepRepr_NextAssemblyUsageOccurrence)::DownCast(ACU); - if ( NAUO.IsNull() ) - continue; - - TopoDS_Shape aSh; - // PTV 10.02.2003 to find component of assembly CORRECTLY - STEPConstruct_Tool Tool( WS ); - TDF_Label aShLab = FindInstance ( NAUO, CTool->ShapeTool(), Tool, PDFileMap, ShapeLabelMap ); - aSh = CTool->ShapeTool()->GetShape(aShLab); -// Handle(Transfer_Binder) binder = TP->Find(NAUO); -// if ( binder.IsNull() || ! binder->HasResult() ) -// continue; -// aSh = TransferBRep::ShapeResult ( TP, binder ); - if (!aSh.IsNull()) { - S = aSh; - break; - } } - break; - } - if (isSkipSHUOstyle) - continue; // skip styled item which refer to SHUO - - if ( S.IsNull() ) - continue; - - if ( ! SurfCol.IsNull() ) { - Quantity_Color col; - Styles.DecodeColor ( SurfCol, col ); - if ( ! CTool->SetColor ( S, col, XCAFDoc_ColorSurf )) - SetColorToSubshape( CTool, S, col, XCAFDoc_ColorSurf ); - } - if ( ! BoundCol.IsNull() ) { - Quantity_Color col; - Styles.DecodeColor ( BoundCol, col ); - if ( ! CTool->SetColor ( S, col, XCAFDoc_ColorCurv )) - SetColorToSubshape( CTool, S, col, XCAFDoc_ColorCurv ); - } - if ( ! CurveCol.IsNull() ) { - Quantity_Color col; - Styles.DecodeColor ( CurveCol, col ); - if ( ! CTool->SetColor ( S, col, XCAFDoc_ColorCurv )) - SetColorToSubshape( CTool, S, col, XCAFDoc_ColorCurv ); - } - if ( !IsVisible ) { - // sets the invisibility for shape. - TDF_Label aInvL; - if ( CTool->ShapeTool()->Search( S, aInvL ) ) - CTool->SetVisibility( aInvL, Standard_False ); + if (isSkipSHUOstyle) + continue; // skip styled item which refer to SHUO + + if ( S.IsNull() ) + continue; + + if ( ! SurfCol.IsNull() ) { + Quantity_Color col; + Styles.DecodeColor ( SurfCol, col ); + if ( ! CTool->SetColor ( S, col, XCAFDoc_ColorSurf )) + SetColorToSubshape( CTool, S, col, XCAFDoc_ColorSurf ); + } + if ( ! BoundCol.IsNull() ) { + Quantity_Color col; + Styles.DecodeColor ( BoundCol, col ); + if ( ! CTool->SetColor ( S, col, XCAFDoc_ColorCurv )) + SetColorToSubshape( CTool, S, col, XCAFDoc_ColorCurv ); + } + if ( ! CurveCol.IsNull() ) { + Quantity_Color col; + Styles.DecodeColor ( CurveCol, col ); + if ( ! CTool->SetColor ( S, col, XCAFDoc_ColorCurv )) + SetColorToSubshape( CTool, S, col, XCAFDoc_ColorCurv ); + } + if ( !IsVisible ) { + // sets the invisibility for shape. + TDF_Label aInvL; + if ( CTool->ShapeTool()->Search( S, aInvL ) ) + CTool->SetVisibility( aInvL, Standard_False ); + } } } CTool->ReverseChainsOfTreeNodes(); diff --git a/src/STEPCAFControl/STEPCAFControl_Writer.cxx b/src/STEPCAFControl/STEPCAFControl_Writer.cxx index 7a053b1820..f72aab68a4 100644 --- a/src/STEPCAFControl/STEPCAFControl_Writer.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Writer.cxx @@ -628,8 +628,14 @@ Standard_Boolean STEPCAFControl_Writer::Transfer (STEPControl_Writer &writer, WriteSHUOs ( writer.WS(), sublabels ); // write G&DTs - if(GetDimTolMode()) - WriteDGTs(writer.WS(),sublabels); + if(GetDimTolMode()) { + if (ap == 5) { + WriteDGTsAP242(writer.WS(), sublabels); + } + else { + WriteDGTs(writer.WS(), sublabels); + } + } // write Materials if(GetMaterialMode()) @@ -3196,11 +3202,6 @@ Standard_Boolean STEPCAFControl_Writer::WriteDGTs (const Handle(XSControl_WorkSe TDF_LabelSequence DGTLabels; - // Check for number of Application Protocol - DGTTool->GetDimTolLabels(DGTLabels); - if (DGTLabels.Length() == 0) - return WriteDGTsAP242(WS, labels); - STEPConstruct_DataMapOfAsciiStringTransient DatumMap; // write Datums diff --git a/src/STEPConstruct/STEPConstruct_ContextTool.cxx b/src/STEPConstruct/STEPConstruct_ContextTool.cxx index 6f22ac6b4e..0b93e40b9e 100644 --- a/src/STEPConstruct/STEPConstruct_ContextTool.cxx +++ b/src/STEPConstruct/STEPConstruct_ContextTool.cxx @@ -137,6 +137,11 @@ void STEPConstruct_ContextTool::AddAPD (const Standard_Boolean enforce) theAPD->SetApplicationInterpretedModelSchemaName (new TCollection_HAsciiString("automotive_design")); break; + case 5: theAPD->SetApplicationProtocolYear (2013); + theAPD->SetStatus (new TCollection_HAsciiString("international standard")); + theAPD->SetApplicationInterpretedModelSchemaName + (new TCollection_HAsciiString("ap242_managed_model_based_3d_engineering")); + break; } if (theAPD->Application().IsNull()) @@ -149,6 +154,8 @@ void STEPConstruct_ContextTool::AddAPD (const Standard_Boolean enforce) break; case 3: appl = new TCollection_HAsciiString ( "configuration controlled 3D designs of mechanical parts and assemblies" ); break; + case 5: appl = new TCollection_HAsciiString ( "Managed model based 3d engineering"); + break; } theAPD->Application()->SetApplication ( appl ); // if (noapd || enforce) aStepModel->AddWithRefs (theAPD); @@ -184,6 +191,21 @@ Standard_Boolean STEPConstruct_ContextTool::IsAP214 () const return sch == "automotive_design"; } +//======================================================================= +//function : IsAP242 +//purpose : +//======================================================================= + +Standard_Boolean STEPConstruct_ContextTool::IsAP242 () const +{ + if ( theAPD.IsNull() ) return Standard_False; + Handle(TCollection_HAsciiString) schema = theAPD->ApplicationInterpretedModelSchemaName(); + if ( schema.IsNull() ) return Standard_False; + TCollection_AsciiString sch = schema->String(); + sch.LowerCase(); + return sch == "ap242_managed_model_based_3d_engineering"; +} + // ================================================================ // Data Section : Basic Product Information (level S1) // * Get methods diff --git a/src/STEPConstruct/STEPConstruct_ContextTool.hxx b/src/STEPConstruct/STEPConstruct_ContextTool.hxx index e245ecc8e4..ed024587ac 100644 --- a/src/STEPConstruct/STEPConstruct_ContextTool.hxx +++ b/src/STEPConstruct/STEPConstruct_ContextTool.hxx @@ -66,6 +66,9 @@ public: //! Returns True if APD.schema_name is automotive_design Standard_EXPORT Standard_Boolean IsAP214() const; + + //! Returns True if APD.schema_name is ap242_managed_model_based_3d_engineering + Standard_EXPORT Standard_Boolean IsAP242() const; Standard_EXPORT Handle(TCollection_HAsciiString) GetACstatus(); diff --git a/src/STEPConstruct/STEPConstruct_Part.cxx b/src/STEPConstruct/STEPConstruct_Part.cxx index ca83668c33..18b9ee1a42 100644 --- a/src/STEPConstruct/STEPConstruct_Part.cxx +++ b/src/STEPConstruct/STEPConstruct_Part.cxx @@ -73,6 +73,7 @@ void STEPConstruct_Part::MakeSDR(const Handle(StepShape_ShapeRepresentation)& SR case 1: PC = new StepBasic_MechanicalContext; break; case 4: + case 5: case 2: PC = new StepBasic_ProductContext; break; case 3: PC = new StepBasic_MechanicalContext; @@ -95,7 +96,8 @@ void STEPConstruct_Part::MakeSDR(const Handle(StepShape_ShapeRepresentation)& SR switch (schema) { default: case 1: - case 2: PDF = new StepBasic_ProductDefinitionFormation; + case 2: + case 5: PDF = new StepBasic_ProductDefinitionFormation; break; case 3: PDF = new StepBasic_ProductDefinitionFormationWithSpecifiedSource; Handle(StepBasic_ProductDefinitionFormationWithSpecifiedSource)::DownCast(PDF)-> @@ -112,7 +114,8 @@ void STEPConstruct_Part::MakeSDR(const Handle(StepShape_ShapeRepresentation)& SR switch (schema) { default: case 1: - case 2: PDC = new StepBasic_ProductDefinitionContext; + case 2: + case 5: PDC = new StepBasic_ProductDefinitionContext; PDCname = new TCollection_HAsciiString ("part definition"); break; case 3: PDC = new StepBasic_DesignContext; @@ -151,7 +154,8 @@ void STEPConstruct_Part::MakeSDR(const Handle(StepShape_ShapeRepresentation)& SR PRPCName = new TCollection_HAsciiString("part") ; break; case 4: - case 2: + case 2: + case 5: myPRPC = new StepBasic_ProductRelatedProductCategory; PRPCName = new TCollection_HAsciiString("part"); break; diff --git a/src/STEPControl/STEPControl_Controller.cxx b/src/STEPControl/STEPControl_Controller.cxx index 18ad6c9836..b349335c12 100644 --- a/src/STEPControl/STEPControl_Controller.cxx +++ b/src/STEPControl/STEPControl_Controller.cxx @@ -85,7 +85,8 @@ STEPControl_Controller::STEPControl_Controller () Interface_Static::Init("step","write.step.schema",'&',"eval AP214CD"); Interface_Static::Init("step","write.step.schema",'&',"eval AP214DIS"); Interface_Static::Init("step","write.step.schema",'&',"eval AP203"); - Interface_Static::Init("step","write.step.schema",'&',"eval AP214IS"); + Interface_Static::Init("step","write.step.schema",'&',"eval AP214IS"); + Interface_Static::Init("step","write.step.schema",'&',"eval AP242DIS"); Interface_Static::SetCVal("write.step.schema","AP214IS"); // Type of Product Definition for reading diff --git a/src/StepAP214/StepAP214_ApprovalItem.cxx b/src/StepAP214/StepAP214_ApprovalItem.cxx index fe31debcd9..08bd0968ba 100644 --- a/src/StepAP214/StepAP214_ApprovalItem.cxx +++ b/src/StepAP214/StepAP214_ApprovalItem.cxx @@ -15,15 +15,24 @@ #include #include #include +#include +#include #include +#include +#include +#include #include #include #include +#include #include #include #include +#include #include #include +#include +#include #include #include #include @@ -46,8 +55,16 @@ Standard_Integer StepAP214_ApprovalItem::CaseNum(const Handle(Standard_Transient if (ent->IsKind(STANDARD_TYPE(StepRepr_PropertyDefinition))) return 10; if (ent->IsKind(STANDARD_TYPE(StepShape_ShapeRepresentation))) return 11; if (ent->IsKind(STANDARD_TYPE(StepBasic_SecurityClassification))) return 12; - - return 0; + if (ent->IsKind(STANDARD_TYPE(StepRepr_ConfigurationItem))) return 13; + if (ent->IsKind(STANDARD_TYPE(StepBasic_Date))) return 14; + if (ent->IsKind(STANDARD_TYPE(StepBasic_Document))) return 15; + if (ent->IsKind(STANDARD_TYPE(StepBasic_Effectivity))) return 16; + if (ent->IsKind(STANDARD_TYPE(StepBasic_Group))) return 17; + if (ent->IsKind(STANDARD_TYPE(StepBasic_GroupRelationship))) return 18; + if (ent->IsKind(STANDARD_TYPE(StepBasic_ProductDefinitionFormationRelationship))) return 19; + if (ent->IsKind(STANDARD_TYPE(StepRepr_Representation))) return 20; + if (ent->IsKind(STANDARD_TYPE(StepRepr_ShapeAspectRelationship))) return 21; + return 0; } @@ -87,3 +104,30 @@ Handle(StepShape_ShapeRepresentation) StepAP214_ApprovalItem::ShapeRepresentatio Handle(StepBasic_SecurityClassification) StepAP214_ApprovalItem::SecurityClassification() const { return GetCasted(StepBasic_SecurityClassification,Value()); } + +Handle(StepRepr_ConfigurationItem) StepAP214_ApprovalItem::ConfigurationItem() const +{ return GetCasted(StepRepr_ConfigurationItem,Value()); } + +Handle(StepBasic_Date) StepAP214_ApprovalItem::Date() const +{ return GetCasted(StepBasic_Date,Value()); } + +Handle(StepBasic_Document) StepAP214_ApprovalItem::Document() const +{ return GetCasted(StepBasic_Document,Value()); } + +Handle(StepBasic_Effectivity) StepAP214_ApprovalItem::Effectivity() const +{ return GetCasted(StepBasic_Effectivity,Value()); } + +Handle(StepBasic_Group) StepAP214_ApprovalItem::Group() const +{ return GetCasted(StepBasic_Group,Value()); } + +Handle(StepBasic_GroupRelationship) StepAP214_ApprovalItem::GroupRelationship() const +{ return GetCasted(StepBasic_GroupRelationship,Value()); } + +Handle(StepBasic_ProductDefinitionFormationRelationship) StepAP214_ApprovalItem::ProductDefinitionFormationRelationship() const +{ return GetCasted(StepBasic_ProductDefinitionFormationRelationship,Value()); } + +Handle(StepRepr_Representation) StepAP214_ApprovalItem::Representation() const +{ return GetCasted(StepRepr_Representation,Value()); } + +Handle(StepRepr_ShapeAspectRelationship) StepAP214_ApprovalItem::ShapeAspectRelationship() const +{ return GetCasted(StepRepr_ShapeAspectRelationship,Value()); } diff --git a/src/StepAP214/StepAP214_ApprovalItem.hxx b/src/StepAP214/StepAP214_ApprovalItem.hxx index 5c78d7e7fa..155e3dc344 100644 --- a/src/StepAP214/StepAP214_ApprovalItem.hxx +++ b/src/StepAP214/StepAP214_ApprovalItem.hxx @@ -36,8 +36,15 @@ class StepBasic_ProductDefinitionRelationship; class StepRepr_PropertyDefinition; class StepShape_ShapeRepresentation; class StepBasic_SecurityClassification; - - +class StepRepr_ConfigurationItem; +class StepBasic_Date; +class StepBasic_Document; +class StepBasic_Effectivity; +class StepBasic_Group; +class StepBasic_GroupRelationship; +class StepBasic_ProductDefinitionFormationRelationship; +class StepRepr_Representation; +class StepRepr_ShapeAspectRelationship; class StepAP214_ApprovalItem : public StepData_SelectType { @@ -62,6 +69,15 @@ public: //! 10 -> PropertyDefinition //! 11 -> ShapeRepresentation //! 12 -> SecurityClassification + //! 13 -> ConfigurationItem + //! 14 -> Date + //! 15 -> Document + //! 16 -> Effectivity + //! 17 -> Group + //! 18 -> GroupRelationship + //! 19 -> ProductDefinitionFormationRelationship + //! 20 -> Representation + //! 21 -> ShapeAspectRelationship //! 0 else Standard_EXPORT virtual Standard_Integer CaseNum (const Handle(Standard_Transient)& ent) const; @@ -101,8 +117,32 @@ public: //! returns Value as a SecurityClassification (Null if another type) Standard_EXPORT virtual Handle(StepBasic_SecurityClassification) SecurityClassification() const; + //! returns Value as a ConfigurationItem (Null if another type) + Standard_EXPORT virtual Handle(StepRepr_ConfigurationItem) ConfigurationItem() const; + //! returns Value as a Date (Null if another type) + Standard_EXPORT virtual Handle(StepBasic_Date) Date() const; + //! returns Value as a Document (Null if another type) + Standard_EXPORT virtual Handle(StepBasic_Document) Document() const; + + //! returns Value as a Effectivity (Null if another type) + Standard_EXPORT virtual Handle(StepBasic_Effectivity) Effectivity() const; + + //! returns Value as a Group (Null if another type) + Standard_EXPORT virtual Handle(StepBasic_Group) Group() const; + + //! returns Value as a GroupRelationship (Null if another type) + Standard_EXPORT virtual Handle(StepBasic_GroupRelationship) GroupRelationship() const; + + //! returns Value as a ProductDefinitionFormationRelationship (Null if another type) + Standard_EXPORT virtual Handle(StepBasic_ProductDefinitionFormationRelationship) ProductDefinitionFormationRelationship() const; + + //! returns Value as a Representation (Null if another type) + Standard_EXPORT virtual Handle(StepRepr_Representation) Representation() const; + + //! returns Value as a ShapeAspectRelationship (Null if another type) + Standard_EXPORT virtual Handle(StepRepr_ShapeAspectRelationship) ShapeAspectRelationship() const; protected: diff --git a/src/StepAP214/StepAP214_DateAndTimeItem.cxx b/src/StepAP214/StepAP214_DateAndTimeItem.cxx index 0d13ba9836..1138271f91 100644 --- a/src/StepAP214/StepAP214_DateAndTimeItem.cxx +++ b/src/StepAP214/StepAP214_DateAndTimeItem.cxx @@ -69,9 +69,3 @@ Handle(StepAP214_AppliedPersonAndOrganizationAssignment) StepAP214_DateAndTimeIt Handle(StepAP214_AppliedOrganizationAssignment) StepAP214_DateAndTimeItem::AppliedOrganizationAssignment() const { return GetCasted(StepAP214_AppliedOrganizationAssignment,Value()); } - - -Handle(StepBasic_Effectivity) StepAP214_DateAndTimeItem::Effectivity() const -{ return GetCasted(StepBasic_Effectivity,Value()); } - - diff --git a/src/StepAP214/StepAP214_DateAndTimeItem.hxx b/src/StepAP214/StepAP214_DateAndTimeItem.hxx index f61880e525..5f181468ca 100644 --- a/src/StepAP214/StepAP214_DateAndTimeItem.hxx +++ b/src/StepAP214/StepAP214_DateAndTimeItem.hxx @@ -27,8 +27,6 @@ class Standard_Transient; class StepBasic_ApprovalPersonOrganization; class StepAP214_AppliedPersonAndOrganizationAssignment; class StepAP214_AppliedOrganizationAssignment; -class StepBasic_Effectivity; - class StepAP214_DateAndTimeItem : public StepAP214_ApprovalItem @@ -69,12 +67,6 @@ public: //! returns Value as a AppliedOrganizationAssignment (Null if another type) Standard_EXPORT Handle(StepAP214_AppliedOrganizationAssignment) AppliedOrganizationAssignment() const; - - //! returns Value as a Effectivity (Null if another type) - Standard_EXPORT Handle(StepBasic_Effectivity) Effectivity() const; - - - protected: diff --git a/src/StepAP214/StepAP214_DateItem.cxx b/src/StepAP214/StepAP214_DateItem.cxx index 55e05b183c..d40f956cc4 100644 --- a/src/StepAP214/StepAP214_DateItem.cxx +++ b/src/StepAP214/StepAP214_DateItem.cxx @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -51,6 +52,8 @@ Standard_Integer StepAP214_DateItem::CaseNum(const Handle(Standard_Transient)& e if (ent->IsKind(STANDARD_TYPE(StepBasic_ProductDefinitionRelationship))) return 13; if (ent->IsKind(STANDARD_TYPE(StepRepr_PropertyDefinition))) return 14; if (ent->IsKind(STANDARD_TYPE(StepShape_ShapeRepresentation))) return 15; + if (ent->IsKind(STANDARD_TYPE(StepAP214_AppliedSecurityClassificationAssignment))) return 16; + if (ent->IsKind(STANDARD_TYPE(StepBasic_Document))) return 17; return 0; } @@ -67,8 +70,5 @@ Handle(StepAP214_AppliedPersonAndOrganizationAssignment) StepAP214_DateItem::App Handle(StepAP214_AppliedOrganizationAssignment) StepAP214_DateItem::AppliedOrganizationAssignment() const { return GetCasted(StepAP214_AppliedOrganizationAssignment,Value()); } - -Handle(StepBasic_Effectivity) StepAP214_DateItem::Effectivity() const -{ return GetCasted(StepBasic_Effectivity,Value()); } - - +Handle(StepAP214_AppliedSecurityClassificationAssignment) StepAP214_DateItem::AppliedSecurityClassificationAssignment() const +{ return GetCasted(StepAP214_AppliedSecurityClassificationAssignment,Value()); } diff --git a/src/StepAP214/StepAP214_DateItem.hxx b/src/StepAP214/StepAP214_DateItem.hxx index 5e5cd72180..9aacf8d00c 100644 --- a/src/StepAP214/StepAP214_DateItem.hxx +++ b/src/StepAP214/StepAP214_DateItem.hxx @@ -27,9 +27,7 @@ class Standard_Transient; class StepBasic_ApprovalPersonOrganization; class StepAP214_AppliedPersonAndOrganizationAssignment; class StepAP214_AppliedOrganizationAssignment; -class StepBasic_Effectivity; - - +class StepAP214_AppliedSecurityClassificationAssignment; class StepAP214_DateItem : public StepAP214_ApprovalItem { @@ -57,6 +55,8 @@ public: //! 13 -> ProductDefinitionRelationship //! 14 -> PropertyDefinition //! 15 -> ShapeRepresentation + //! 16 -> AppliedSecurityClassificationAssignment + //! 17 -> Document //! 0 else Standard_EXPORT virtual Standard_Integer CaseNum (const Handle(Standard_Transient)& ent) const Standard_OVERRIDE; @@ -68,12 +68,9 @@ public: //! returns Value as a AppliedOrganizationAssignment (Null if another type) Standard_EXPORT Handle(StepAP214_AppliedOrganizationAssignment) AppliedOrganizationAssignment() const; - - //! returns Value as a Effectivity (Null if another type) - Standard_EXPORT Handle(StepBasic_Effectivity) Effectivity() const; - - + //! returns Value as a AppliedSecurityClassificationAssignment (Null if another type) + Standard_EXPORT Handle(StepAP214_AppliedSecurityClassificationAssignment) AppliedSecurityClassificationAssignment() const; protected: diff --git a/src/StepAP214/StepAP214_DocumentReferenceItem.cxx b/src/StepAP214/StepAP214_DocumentReferenceItem.cxx index c930c72886..96c16afb9c 100644 --- a/src/StepAP214/StepAP214_DocumentReferenceItem.cxx +++ b/src/StepAP214/StepAP214_DocumentReferenceItem.cxx @@ -14,32 +14,54 @@ #include #include +#include #include #include +#include +#include +#include +#include +#include #include +#include #include +#include #include #include +#include #include #include +#include #include #include +#include StepAP214_DocumentReferenceItem::StepAP214_DocumentReferenceItem () { } Standard_Integer StepAP214_DocumentReferenceItem::CaseNum(const Handle(Standard_Transient)& ent) const { - if (ent.IsNull()) return 0; - if (ent->IsKind(STANDARD_TYPE(StepBasic_Approval))) return 1; - if (ent->IsKind(STANDARD_TYPE(StepRepr_DescriptiveRepresentationItem))) return 2; - if (ent->IsKind(STANDARD_TYPE(StepRepr_MaterialDesignation))) return 3; - if (ent->IsKind(STANDARD_TYPE(StepBasic_ProductDefinition))) return 4; - if (ent->IsKind(STANDARD_TYPE(StepBasic_ProductDefinitionRelationship))) return 5; - if (ent->IsKind(STANDARD_TYPE(StepRepr_PropertyDefinition))) return 6; - if (ent->IsKind(STANDARD_TYPE(StepRepr_Representation))) return 7; - if (ent->IsKind(STANDARD_TYPE(StepRepr_ShapeAspect))) return 8; - if (ent->IsKind(STANDARD_TYPE(StepRepr_ShapeAspectRelationship))) return 9; - return 0; + if (ent.IsNull()) return 0; + if (ent->IsKind(STANDARD_TYPE(StepBasic_Approval))) return 1; + if (ent->IsKind(STANDARD_TYPE(StepRepr_DescriptiveRepresentationItem))) return 2; + if (ent->IsKind(STANDARD_TYPE(StepRepr_MaterialDesignation))) return 3; + if (ent->IsKind(STANDARD_TYPE(StepBasic_ProductDefinition))) return 4; + if (ent->IsKind(STANDARD_TYPE(StepBasic_ProductDefinitionRelationship))) return 5; + if (ent->IsKind(STANDARD_TYPE(StepRepr_PropertyDefinition))) return 6; + if (ent->IsKind(STANDARD_TYPE(StepRepr_Representation))) return 7; + if (ent->IsKind(STANDARD_TYPE(StepRepr_ShapeAspect))) return 8; + if (ent->IsKind(STANDARD_TYPE(StepRepr_ShapeAspectRelationship))) return 9; + if (ent->IsKind(STANDARD_TYPE(StepAP214_AppliedExternalIdentificationAssignment))) return 10; + if (ent->IsKind(STANDARD_TYPE(StepRepr_AssemblyComponentUsage))) return 11; + if (ent->IsKind(STANDARD_TYPE(StepBasic_CharacterizedObject))) return 12; + if (ent->IsKind(STANDARD_TYPE(StepShape_DimensionalSize))) return 13; + if (ent->IsKind(STANDARD_TYPE(StepBasic_ExternallyDefinedItem))) return 14; + if (ent->IsKind(STANDARD_TYPE(StepBasic_Group))) return 15; + if (ent->IsKind(STANDARD_TYPE(StepBasic_GroupRelationship))) return 16; + if (ent->IsKind(STANDARD_TYPE(StepRepr_MeasureRepresentationItem))) return 17; + if (ent->IsKind(STANDARD_TYPE(StepBasic_ProductCategory))) return 18; + if (ent->IsKind(STANDARD_TYPE(StepBasic_ProductDefinitionContext))) return 19; + if (ent->IsKind(STANDARD_TYPE(StepRepr_RepresentationItem))) return 20; + return 0; } @@ -71,3 +93,36 @@ Handle(StepRepr_ShapeAspect) StepAP214_DocumentReferenceItem::ShapeAspect() con Handle(StepRepr_ShapeAspectRelationship) StepAP214_DocumentReferenceItem::ShapeAspectRelationship() const { return GetCasted(StepRepr_ShapeAspectRelationship,Value()); } + +Handle(StepAP214_AppliedExternalIdentificationAssignment) StepAP214_DocumentReferenceItem::AppliedExternalIdentificationAssignment() const +{ return GetCasted(StepAP214_AppliedExternalIdentificationAssignment,Value()); } + +Handle(StepRepr_AssemblyComponentUsage) StepAP214_DocumentReferenceItem::AssemblyComponentUsage() const +{ return GetCasted(StepRepr_AssemblyComponentUsage,Value()); } + +Handle(StepBasic_CharacterizedObject) StepAP214_DocumentReferenceItem::CharacterizedObject() const +{ return GetCasted(StepBasic_CharacterizedObject,Value()); } + +Handle(StepShape_DimensionalSize) StepAP214_DocumentReferenceItem::DimensionalSize() const +{ return GetCasted(StepShape_DimensionalSize,Value()); } + +Handle(StepBasic_ExternallyDefinedItem) StepAP214_DocumentReferenceItem::ExternallyDefinedItem() const +{ return GetCasted(StepBasic_ExternallyDefinedItem,Value()); } + +Handle(StepBasic_Group) StepAP214_DocumentReferenceItem::Group() const +{ return GetCasted(StepBasic_Group,Value()); } + +Handle(StepBasic_GroupRelationship) StepAP214_DocumentReferenceItem::GroupRelationship() const +{ return GetCasted(StepBasic_GroupRelationship,Value()); } + +Handle(StepRepr_MeasureRepresentationItem) StepAP214_DocumentReferenceItem::MeasureRepresentationItem() const +{ return GetCasted(StepRepr_MeasureRepresentationItem,Value()); } + +Handle(StepBasic_ProductCategory) StepAP214_DocumentReferenceItem::ProductCategory() const +{ return GetCasted(StepBasic_ProductCategory,Value()); } + +Handle(StepBasic_ProductDefinitionContext) StepAP214_DocumentReferenceItem::ProductDefinitionContext() const +{ return GetCasted(StepBasic_ProductDefinitionContext,Value()); } + +Handle(StepRepr_RepresentationItem) StepAP214_DocumentReferenceItem::RepresentationItem() const +{ return GetCasted(StepRepr_RepresentationItem,Value()); } diff --git a/src/StepAP214/StepAP214_DocumentReferenceItem.hxx b/src/StepAP214/StepAP214_DocumentReferenceItem.hxx index 8437eaf1d0..20ca235b3f 100644 --- a/src/StepAP214/StepAP214_DocumentReferenceItem.hxx +++ b/src/StepAP214/StepAP214_DocumentReferenceItem.hxx @@ -33,8 +33,17 @@ class StepRepr_PropertyDefinition; class StepRepr_Representation; class StepRepr_ShapeAspect; class StepRepr_ShapeAspectRelationship; - - +class StepAP214_AppliedExternalIdentificationAssignment; +class StepRepr_AssemblyComponentUsage; +class StepBasic_CharacterizedObject; +class StepShape_DimensionalSize; +class StepBasic_ExternallyDefinedItem; +class StepBasic_Group; +class StepBasic_GroupRelationship; +class StepBasic_ProductCategory; +class StepRepr_MeasureRepresentationItem; +class StepBasic_ProductDefinitionContext; +class StepRepr_RepresentationItem; class StepAP214_DocumentReferenceItem : public StepData_SelectType { @@ -76,8 +85,38 @@ public: //! returns Value as a ShapeAspectRelationship (Null if another type) Standard_EXPORT Handle(StepRepr_ShapeAspectRelationship) ShapeAspectRelationship() const; + //! returns Value as a AppliedExternalIdentificationAssignment (Null if another type) + Standard_EXPORT Handle(StepAP214_AppliedExternalIdentificationAssignment) AppliedExternalIdentificationAssignment() const; + //! returns Value as a AssemblyComponentUsage (Null if another type) + Standard_EXPORT Handle(StepRepr_AssemblyComponentUsage) AssemblyComponentUsage() const; + //! returns Value as a CharacterizedObject (Null if another type) + Standard_EXPORT Handle(StepBasic_CharacterizedObject) CharacterizedObject() const; + + //! returns Value as a DimensionalSize (Null if another type) + Standard_EXPORT Handle(StepShape_DimensionalSize) DimensionalSize() const; + + //! returns Value as a ExternallyDefinedItem (Null if another type) + Standard_EXPORT Handle(StepBasic_ExternallyDefinedItem) ExternallyDefinedItem() const; + + //! returns Value as a Group (Null if another type) + Standard_EXPORT Handle(StepBasic_Group) Group() const; + + //! returns Value as a GroupRelationship (Null if another type) + Standard_EXPORT Handle(StepBasic_GroupRelationship) GroupRelationship() const; + + //! returns Value as a MeasureRepresentationItem (Null if another type) + Standard_EXPORT Handle(StepRepr_MeasureRepresentationItem) MeasureRepresentationItem() const; + + //! returns Value as a ProductCategory (Null if another type) + Standard_EXPORT Handle(StepBasic_ProductCategory) ProductCategory() const; + + //! returns Value as a ProductDefinitionContext (Null if another type) + Standard_EXPORT Handle(StepBasic_ProductDefinitionContext) ProductDefinitionContext() const; + + //! returns Value as a RepresentationItem (Null if another type) + Standard_EXPORT Handle(StepRepr_RepresentationItem) RepresentationItem() const; protected: diff --git a/src/StepAP214/StepAP214_ExternalIdentificationItem.cxx b/src/StepAP214/StepAP214_ExternalIdentificationItem.cxx index ff7bda7498..6925463e62 100644 --- a/src/StepAP214/StepAP214_ExternalIdentificationItem.cxx +++ b/src/StepAP214/StepAP214_ExternalIdentificationItem.cxx @@ -16,11 +16,22 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 #include +#include +#include #include #include #include +#include +#include +#include +#include #include +#include +#include #include +#include +#include +#include //======================================================================= //function : StepAP214_ExternalIdentificationItem @@ -42,6 +53,17 @@ Standard_Integer StepAP214_ExternalIdentificationItem::CaseNum (const Handle(Sta if (ent->IsKind(STANDARD_TYPE(StepAP214_ExternallyDefinedClass))) return 2; if (ent->IsKind(STANDARD_TYPE(StepAP214_ExternallyDefinedGeneralProperty))) return 3; if (ent->IsKind(STANDARD_TYPE(StepBasic_ProductDefinition))) return 4; + if (ent->IsKind(STANDARD_TYPE(StepAP214_AppliedOrganizationAssignment))) return 5; + if (ent->IsKind(STANDARD_TYPE(StepAP214_AppliedPersonAndOrganizationAssignment))) return 6; + if (ent->IsKind(STANDARD_TYPE(StepBasic_Approval))) return 7; + if (ent->IsKind(STANDARD_TYPE(StepBasic_ApprovalStatus))) return 8; + if (ent->IsKind(STANDARD_TYPE(StepBasic_ExternalSource))) return 9; + if (ent->IsKind(STANDARD_TYPE(StepBasic_OrganizationalAddress))) return 10; + if (ent->IsKind(STANDARD_TYPE(StepBasic_SecurityClassification))) return 11; + if (ent->IsKind(STANDARD_TYPE(StepGeom_TrimmedCurve))) return 12; + if (ent->IsKind(STANDARD_TYPE(StepBasic_VersionedActionRequest))) return 13; + if (ent->IsKind(STANDARD_TYPE(StepBasic_DateAndTimeAssignment))) return 14; + if (ent->IsKind(STANDARD_TYPE(StepBasic_DateAssignment))) return 15; return 0; } @@ -84,3 +106,112 @@ Handle(StepBasic_ProductDefinition) StepAP214_ExternalIdentificationItem::Produc { return Handle(StepBasic_ProductDefinition)::DownCast(Value()); } + +//======================================================================= +//function : AppliedOrganizationAssignment +//purpose : +//======================================================================= + +Handle(StepAP214_AppliedOrganizationAssignment) StepAP214_ExternalIdentificationItem::AppliedOrganizationAssignment () const +{ + return Handle(StepAP214_AppliedOrganizationAssignment)::DownCast(Value()); +} + +//======================================================================= +//function : AppliedPersonAndOrganizationAssignment +//purpose : +//======================================================================= + +Handle(StepAP214_AppliedPersonAndOrganizationAssignment) StepAP214_ExternalIdentificationItem::AppliedPersonAndOrganizationAssignment () const +{ + return Handle(StepAP214_AppliedPersonAndOrganizationAssignment)::DownCast(Value()); +} + +//======================================================================= +//function : Approval +//purpose : +//======================================================================= + +Handle(StepBasic_Approval) StepAP214_ExternalIdentificationItem::Approval () const +{ + return Handle(StepBasic_Approval)::DownCast(Value()); +} + +//======================================================================= +//function : ApprovalStatus +//purpose : +//======================================================================= + +Handle(StepBasic_ApprovalStatus) StepAP214_ExternalIdentificationItem::ApprovalStatus () const +{ + return Handle(StepBasic_ApprovalStatus)::DownCast(Value()); +} + +//======================================================================= +//function : ExternalSource +//purpose : +//======================================================================= + +Handle(StepBasic_ExternalSource) StepAP214_ExternalIdentificationItem::ExternalSource () const +{ + return Handle(StepBasic_ExternalSource)::DownCast(Value()); +} + +//======================================================================= +//function : OrganizationalAddress +//purpose : +//======================================================================= + +Handle(StepBasic_OrganizationalAddress) StepAP214_ExternalIdentificationItem::OrganizationalAddress () const +{ + return Handle(StepBasic_OrganizationalAddress)::DownCast(Value()); +} + +//======================================================================= +//function : SecurityClassification +//purpose : +//======================================================================= + +Handle(StepBasic_SecurityClassification) StepAP214_ExternalIdentificationItem::SecurityClassification () const +{ + return Handle(StepBasic_SecurityClassification)::DownCast(Value()); +} + +//======================================================================= +//function : TrimmedCurve +//purpose : +//======================================================================= + +Handle(StepGeom_TrimmedCurve) StepAP214_ExternalIdentificationItem::TrimmedCurve () const +{ + return Handle(StepGeom_TrimmedCurve)::DownCast(Value()); +} +//======================================================================= +//function : VersionedActionRequest +//purpose : +//======================================================================= + +Handle(StepBasic_VersionedActionRequest) StepAP214_ExternalIdentificationItem::VersionedActionRequest () const +{ + return Handle(StepBasic_VersionedActionRequest)::DownCast(Value()); +} + +//======================================================================= +//function : DateAndTimeAssignment +//purpose : +//======================================================================= + +Handle(StepBasic_DateAndTimeAssignment) StepAP214_ExternalIdentificationItem::DateAndTimeAssignment () const +{ + return Handle(StepBasic_DateAndTimeAssignment)::DownCast(Value()); +} + +//======================================================================= +//function : DateAssignment +//purpose : +//======================================================================= + +Handle(StepBasic_DateAssignment) StepAP214_ExternalIdentificationItem::DateAssignment () const +{ + return Handle(StepBasic_DateAssignment)::DownCast(Value()); +} diff --git a/src/StepAP214/StepAP214_ExternalIdentificationItem.hxx b/src/StepAP214/StepAP214_ExternalIdentificationItem.hxx index 5c205bbe10..832808fd27 100644 --- a/src/StepAP214/StepAP214_ExternalIdentificationItem.hxx +++ b/src/StepAP214/StepAP214_ExternalIdentificationItem.hxx @@ -24,10 +24,20 @@ #include class Standard_Transient; class StepBasic_DocumentFile; +class StepAP214_AppliedOrganizationAssignment; +class StepAP214_AppliedPersonAndOrganizationAssignment; class StepAP214_ExternallyDefinedClass; class StepAP214_ExternallyDefinedGeneralProperty; +class StepBasic_Approval; +class StepBasic_ApprovalStatus; +class StepBasic_ExternalSource; +class StepBasic_OrganizationalAddress; class StepBasic_ProductDefinition; - +class StepBasic_SecurityClassification; +class StepBasic_VersionedActionRequest; +class StepGeom_TrimmedCurve; +class StepBasic_DateAndTimeAssignment; +class StepBasic_DateAssignment; //! Representation of STEP SELECT type ExternalIdentificationItem class StepAP214_ExternalIdentificationItem : public StepData_SelectType @@ -45,6 +55,17 @@ public: //! 2 -> ExternallyDefinedClass from StepAP214 //! 3 -> ExternallyDefinedGeneralProperty from StepAP214 //! 4 -> ProductDefinition from StepBasic + //! 5 -> AppliedOrganizationAssignment from AP214 + //! 6 -> AppliedPersonAndOrganizationAssignment from AP214 + //! 7 -> Approval from StepBasic + //! 8 -> ApprovalStatus from StepBasic + //! 9 -> ExternalSource from StepBasic + //! 10 -> OrganizationalAddress from StepBasic + //! 11 -> SecurityClassification from StepBasic + //! 12 -> TrimmedCurve from StepGeom + //! 13 -> VersionedActionRequest from StepBasic + //! 14 -> DateAndTimeAssignment from StepBasic + //! 15 -> DateAssignment from StepBasic //! 0 else Standard_EXPORT Standard_Integer CaseNum (const Handle(Standard_Transient)& ent) const; @@ -60,8 +81,38 @@ public: //! Returns Value as ProductDefinition (or Null if another type) Standard_EXPORT Handle(StepBasic_ProductDefinition) ProductDefinition() const; + //! Returns Value as AppliedOrganizationAssignment (or Null if another type) + Standard_EXPORT Handle(StepAP214_AppliedOrganizationAssignment) AppliedOrganizationAssignment() const; + //! Returns Value as AppliedPersonAndOrganizationAssignment (or Null if another type) + Standard_EXPORT Handle(StepAP214_AppliedPersonAndOrganizationAssignment) AppliedPersonAndOrganizationAssignment() const; + //! Returns Value as Approval (or Null if another type) + Standard_EXPORT Handle(StepBasic_Approval) Approval() const; + + //! Returns Value as ApprovalStatus (or Null if another type) + Standard_EXPORT Handle(StepBasic_ApprovalStatus) ApprovalStatus() const; + + //! Returns Value as ExternalSource (or Null if another type) + Standard_EXPORT Handle(StepBasic_ExternalSource) ExternalSource() const; + + //! Returns Value as OrganizationalAddress (or Null if another type) + Standard_EXPORT Handle(StepBasic_OrganizationalAddress) OrganizationalAddress() const; + + //! Returns Value as SecurityClassification (or Null if another type) + Standard_EXPORT Handle(StepBasic_SecurityClassification) SecurityClassification() const; + + //! Returns Value as TrimmedCurve (or Null if another type) + Standard_EXPORT Handle(StepGeom_TrimmedCurve) TrimmedCurve() const; + + //! Returns Value as VersionedActionRequest (or Null if another type) + Standard_EXPORT Handle(StepBasic_VersionedActionRequest) VersionedActionRequest() const; + + //! Returns Value as DateAndTimeAssignment (or Null if another type) + Standard_EXPORT Handle(StepBasic_DateAndTimeAssignment) DateAndTimeAssignment() const; + + //! Returns Value as DateAssignment (or Null if another type) + Standard_EXPORT Handle(StepBasic_DateAssignment) DateAssignment() const; protected: diff --git a/src/StepAP214/StepAP214_GroupItem.cxx b/src/StepAP214/StepAP214_GroupItem.cxx index d1f803f64f..a871d67beb 100644 --- a/src/StepAP214/StepAP214_GroupItem.cxx +++ b/src/StepAP214/StepAP214_GroupItem.cxx @@ -15,7 +15,21 @@ #include #include #include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + StepAP214_GroupItem::StepAP214_GroupItem () { } @@ -23,7 +37,19 @@ Standard_Integer StepAP214_GroupItem::CaseNum(const Handle(Standard_Transient)& { if (ent.IsNull()) return 0; if (ent->IsKind(STANDARD_TYPE(StepGeom_GeometricRepresentationItem))) return 1; - + if (ent->IsKind(STANDARD_TYPE(StepBasic_GroupRelationship))) return 2; + if (ent->IsKind(STANDARD_TYPE(StepRepr_MappedItem))) return 3; + if (ent->IsKind(STANDARD_TYPE(StepBasic_ProductDefinition))) return 4; + if (ent->IsKind(STANDARD_TYPE(StepBasic_ProductDefinitionFormation))) return 5; + if (ent->IsKind(STANDARD_TYPE(StepRepr_PropertyDefinitionRepresentation))) return 6; + if (ent->IsKind(STANDARD_TYPE(StepRepr_Representation))) return 7; + if (ent->IsKind(STANDARD_TYPE(StepRepr_RepresentationItem))) return 8; + if (ent->IsKind(STANDARD_TYPE(StepRepr_RepresentationRelationshipWithTransformation))) return 9; + if (ent->IsKind(STANDARD_TYPE(StepRepr_ShapeAspect))) return 10; + if (ent->IsKind(STANDARD_TYPE(StepRepr_ShapeAspectRelationship))) return 11; + if (ent->IsKind(STANDARD_TYPE(StepRepr_ShapeRepresentationRelationship))) return 12; + if (ent->IsKind(STANDARD_TYPE(StepVisual_StyledItem))) return 13; + if (ent->IsKind(STANDARD_TYPE(StepShape_TopologicalRepresentationItem))) return 14; return 0; } @@ -32,3 +58,68 @@ Handle(StepGeom_GeometricRepresentationItem) StepAP214_GroupItem::GeometricRepre return GetCasted(StepGeom_GeometricRepresentationItem,Value()); } +Handle(StepBasic_GroupRelationship) StepAP214_GroupItem::GroupRelationship() const +{ + return GetCasted(StepBasic_GroupRelationship,Value()); +} + +Handle(StepRepr_MappedItem) StepAP214_GroupItem::MappedItem() const +{ + return GetCasted(StepRepr_MappedItem,Value()); +} + +Handle(StepBasic_ProductDefinition) StepAP214_GroupItem::ProductDefinition() const +{ + return GetCasted(StepBasic_ProductDefinition,Value()); +} + +Handle(StepBasic_ProductDefinitionFormation) StepAP214_GroupItem::ProductDefinitionFormation() const +{ + return GetCasted(StepBasic_ProductDefinitionFormation,Value()); +} + +Handle(StepRepr_PropertyDefinitionRepresentation) StepAP214_GroupItem::PropertyDefinitionRepresentation() const +{ + return GetCasted(StepRepr_PropertyDefinitionRepresentation,Value()); +} + +Handle(StepRepr_Representation) StepAP214_GroupItem::Representation() const +{ + return GetCasted(StepRepr_Representation,Value()); +} + +Handle(StepRepr_RepresentationItem) StepAP214_GroupItem::RepresentationItem() const +{ + return GetCasted(StepRepr_RepresentationItem,Value()); +} + +Handle(StepRepr_RepresentationRelationshipWithTransformation) StepAP214_GroupItem::RepresentationRelationshipWithTransformation() const +{ + return GetCasted(StepRepr_RepresentationRelationshipWithTransformation,Value()); +} + +Handle(StepRepr_ShapeAspect) StepAP214_GroupItem::ShapeAspect() const +{ + return GetCasted(StepRepr_ShapeAspect,Value()); +} + +Handle(StepRepr_ShapeAspectRelationship) StepAP214_GroupItem::ShapeAspectRelationship() const +{ + return GetCasted(StepRepr_ShapeAspectRelationship,Value()); +} + +Handle(StepRepr_ShapeRepresentationRelationship) StepAP214_GroupItem::ShapeRepresentationRelationship() const +{ + return GetCasted(StepRepr_ShapeRepresentationRelationship,Value()); +} + +Handle(StepVisual_StyledItem) StepAP214_GroupItem::StyledItem() const +{ + return GetCasted(StepVisual_StyledItem,Value()); +} + +Handle(StepShape_TopologicalRepresentationItem) StepAP214_GroupItem::TopologicalRepresentationItem() const +{ + return GetCasted(StepShape_TopologicalRepresentationItem,Value()); +} + diff --git a/src/StepAP214/StepAP214_GroupItem.hxx b/src/StepAP214/StepAP214_GroupItem.hxx index e5b20d5182..432ac11ea8 100644 --- a/src/StepAP214/StepAP214_GroupItem.hxx +++ b/src/StepAP214/StepAP214_GroupItem.hxx @@ -25,7 +25,19 @@ #include class Standard_Transient; class StepGeom_GeometricRepresentationItem; - +class StepBasic_GroupRelationship; +class StepRepr_MappedItem; +class StepBasic_ProductDefinition; +class StepBasic_ProductDefinitionFormation; +class StepRepr_PropertyDefinitionRepresentation; +class StepRepr_Representation; +class StepRepr_RepresentationItem; +class StepRepr_RepresentationRelationshipWithTransformation; +class StepRepr_ShapeAspect; +class StepRepr_ShapeAspectRelationship; +class StepRepr_ShapeRepresentationRelationship; +class StepVisual_StyledItem; +class StepShape_TopologicalRepresentationItem; class StepAP214_GroupItem : public StepData_SelectType @@ -40,15 +52,63 @@ public: //! Recognizes a GroupItem Kind Entity that is : //! 1 -> GeometricRepresentationItem + //! 2 -> GroupRelationship + //! 3 -> MappedItem + //! 4 -> ProductDefinition + //! 5 -> ProductDefinitionFormation + //! 6 -> PropertyDefinitionRepresentation + //! 7 -> Representation + //! 8 -> RepresentationItem + //! 9 -> RepresentationRelationshipWithTransformation + //! 10 -> ShapeAspect + //! 11 -> ShapeAspectRelationship + //! 12 -> ShapeRepresentationRelationship + //! 13 -> StyledItem + //! 14 -> TopologicalRepresentationItem //! 0 else Standard_EXPORT virtual Standard_Integer CaseNum (const Handle(Standard_Transient)& ent) const; //! returns Value as a GeometricRepresentationItem (Null if another type) Standard_EXPORT virtual Handle(StepGeom_GeometricRepresentationItem) GeometricRepresentationItem() const; + //! returns Value as a GroupRelationship (Null if another type) + Standard_EXPORT virtual Handle(StepBasic_GroupRelationship) GroupRelationship() const; + //! returns Value as a MappedItem (Null if another type) + Standard_EXPORT virtual Handle(StepRepr_MappedItem) MappedItem() const; + //! returns Value as a ProductDefinition (Null if another type) + Standard_EXPORT virtual Handle(StepBasic_ProductDefinition) ProductDefinition() const; + //! returns Value as a ProductDefinitionFormation (Null if another type) + Standard_EXPORT virtual Handle(StepBasic_ProductDefinitionFormation) ProductDefinitionFormation() const; + + //! returns Value as a PropertyDefinitionRepresentation (Null if another type) + Standard_EXPORT virtual Handle(StepRepr_PropertyDefinitionRepresentation) PropertyDefinitionRepresentation() const; + + //! returns Value as a Representation (Null if another type) + Standard_EXPORT virtual Handle(StepRepr_Representation) Representation() const; + + //! returns Value as a RepresentationItem (Null if another type) + Standard_EXPORT virtual Handle(StepRepr_RepresentationItem) RepresentationItem() const; + + //! returns Value as a RepresentationRelationshipWithTransformation (Null if another type) + Standard_EXPORT virtual Handle(StepRepr_RepresentationRelationshipWithTransformation) RepresentationRelationshipWithTransformation() const; + + //! returns Value as a ShapeAspect (Null if another type) + Standard_EXPORT virtual Handle(StepRepr_ShapeAspect) ShapeAspect() const; + + //! returns Value as a ShapeAspectRelationship (Null if another type) + Standard_EXPORT virtual Handle(StepRepr_ShapeAspectRelationship) ShapeAspectRelationship() const; + + //! returns Value as a ShapeRepresentationRelationship (Null if another type) + Standard_EXPORT virtual Handle(StepRepr_ShapeRepresentationRelationship) ShapeRepresentationRelationship() const; + + //! returns Value as a StyledItem (Null if another type) + Standard_EXPORT virtual Handle(StepVisual_StyledItem) StyledItem() const; + + //! returns Value as a TopologicalRepresentationItem (Null if another type) + Standard_EXPORT virtual Handle(StepShape_TopologicalRepresentationItem) TopologicalRepresentationItem() const; protected: diff --git a/src/StepAP214/StepAP214_OrganizationItem.cxx b/src/StepAP214/StepAP214_OrganizationItem.cxx index c9ffd014f8..1a5d55ad1e 100644 --- a/src/StepAP214/StepAP214_OrganizationItem.cxx +++ b/src/StepAP214/StepAP214_OrganizationItem.cxx @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -49,6 +50,7 @@ Standard_Integer StepAP214_OrganizationItem::CaseNum (const Handle(Standard_Tra if (ent->IsKind(STANDARD_TYPE(StepRepr_PropertyDefinition))) return 12; if (ent->IsKind(STANDARD_TYPE(StepShape_ShapeRepresentation))) return 13; if (ent->IsKind(STANDARD_TYPE(StepBasic_SecurityClassification))) return 14; + if (ent->IsKind(STANDARD_TYPE(StepAP214_AppliedSecurityClassificationAssignment))) return 15; return 0; } @@ -57,3 +59,6 @@ Handle(StepAP214_AppliedOrganizationAssignment) StepAP214_OrganizationItem::App Handle(StepBasic_Approval) StepAP214_OrganizationItem::Approval() const { return GetCasted(StepBasic_Approval,Value()); } + +Handle(StepAP214_AppliedSecurityClassificationAssignment) StepAP214_OrganizationItem::AppliedSecurityClassificationAssignment() const +{ return GetCasted(StepAP214_AppliedSecurityClassificationAssignment,Value()); } diff --git a/src/StepAP214/StepAP214_OrganizationItem.hxx b/src/StepAP214/StepAP214_OrganizationItem.hxx index c004576df4..09d9b8380e 100644 --- a/src/StepAP214/StepAP214_OrganizationItem.hxx +++ b/src/StepAP214/StepAP214_OrganizationItem.hxx @@ -26,6 +26,7 @@ class Standard_Transient; class StepAP214_AppliedOrganizationAssignment; class StepBasic_Approval; +class StepAP214_AppliedSecurityClassificationAssignment; @@ -48,7 +49,8 @@ public: //! returns Value as a Approval (Null if another type) Standard_EXPORT Handle(StepBasic_Approval) Approval() const; - + //! returns Value as a AppliedSecurityClassificationAssignment (Null if another type) + Standard_EXPORT Handle(StepAP214_AppliedSecurityClassificationAssignment) AppliedSecurityClassificationAssignment() const; protected: diff --git a/src/StepAP214/StepAP214_PersonAndOrganizationItem.cxx b/src/StepAP214/StepAP214_PersonAndOrganizationItem.cxx index 2349d0c5bd..3850b5196c 100644 --- a/src/StepAP214/StepAP214_PersonAndOrganizationItem.cxx +++ b/src/StepAP214/StepAP214_PersonAndOrganizationItem.cxx @@ -15,7 +15,9 @@ #include #include #include +#include #include +#include #include #include #include @@ -47,7 +49,8 @@ Standard_Integer StepAP214_PersonAndOrganizationItem::CaseNum(const Handle(Stand if (ent->IsKind(STANDARD_TYPE(StepRepr_PropertyDefinition))) return 11; if (ent->IsKind(STANDARD_TYPE(StepShape_ShapeRepresentation))) return 12; if (ent->IsKind(STANDARD_TYPE(StepBasic_SecurityClassification))) return 13; - + if (ent->IsKind(STANDARD_TYPE(StepAP214_AppliedSecurityClassificationAssignment))) return 14; + if (ent->IsKind(STANDARD_TYPE(StepBasic_Approval))) return 15; return 0; } @@ -57,4 +60,12 @@ Handle(StepAP214_AppliedOrganizationAssignment) StepAP214_PersonAndOrganizationI return GetCasted(StepAP214_AppliedOrganizationAssignment,Value()); } +Handle(StepAP214_AppliedSecurityClassificationAssignment) StepAP214_PersonAndOrganizationItem::AppliedSecurityClassificationAssignment() const +{ + return GetCasted(StepAP214_AppliedSecurityClassificationAssignment,Value()); +} +Handle(StepBasic_Approval) StepAP214_PersonAndOrganizationItem::Approval() const +{ + return GetCasted(StepBasic_Approval,Value()); +} diff --git a/src/StepAP214/StepAP214_PersonAndOrganizationItem.hxx b/src/StepAP214/StepAP214_PersonAndOrganizationItem.hxx index ba486be81b..d6ca122607 100644 --- a/src/StepAP214/StepAP214_PersonAndOrganizationItem.hxx +++ b/src/StepAP214/StepAP214_PersonAndOrganizationItem.hxx @@ -25,6 +25,8 @@ #include class Standard_Transient; class StepAP214_AppliedOrganizationAssignment; +class StepAP214_AppliedSecurityClassificationAssignment; +class StepBasic_Approval; @@ -52,14 +54,19 @@ public: //! 11 -> PropertyDefinition //! 12 -> ShapeRepresentation //! 13 -> SecurityClassification + //! 14 -> AppliedSecurityClassificationAssignment + //! 15 -> Approval //! 0 else Standard_EXPORT virtual Standard_Integer CaseNum (const Handle(Standard_Transient)& ent) const Standard_OVERRIDE; //! returns Value as a AppliedOrganizationAssignment (Null if another type) Standard_EXPORT Handle(StepAP214_AppliedOrganizationAssignment) AppliedOrganizationAssignment() const; + //! returns Value as a AppliedSecurityClassificationAssignment (Null if another type) + Standard_EXPORT Handle(StepAP214_AppliedSecurityClassificationAssignment) AppliedSecurityClassificationAssignment() const; - + //! returns Value as a Approval (Null if another type) + Standard_EXPORT Handle(StepBasic_Approval) Approval() const; protected: diff --git a/src/StepAP214/StepAP214_Protocol.cxx b/src/StepAP214/StepAP214_Protocol.cxx index fc9830cfb5..331b356eff 100644 --- a/src/StepAP214/StepAP214_Protocol.cxx +++ b/src/StepAP214/StepAP214_Protocol.cxx @@ -25,6 +25,7 @@ static Standard_CString schemaAP214CD = "AUTOMOTIVE_DESIGN_CC2 { 1 2 10303 214 static Standard_CString schemaAP214DIS = "AUTOMOTIVE_DESIGN { 1 2 10303 214 0 1 1 1 }"; static Standard_CString schemaAP214IS = "AUTOMOTIVE_DESIGN { 1 0 10303 214 1 1 1 1 }"; static Standard_CString schemaAP203 = "CONFIG_CONTROL_DESIGN"; +static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERING_MIM_LF. {1 0 10303 442 1 1 4 }"; #include @@ -1468,6 +1469,7 @@ Standard_CString StepAP214_Protocol::SchemaName() const case 2 : return schemaAP214DIS; break; case 3 : return schemaAP203; break; case 4: return schemaAP214IS; break; + case 5 : return schemaAP242DIS; break; } } diff --git a/src/StepAP214/StepAP214_SecurityClassificationItem.cxx b/src/StepAP214/StepAP214_SecurityClassificationItem.cxx index 6c9f6ce168..bcf9d971f0 100644 --- a/src/StepAP214/StepAP214_SecurityClassificationItem.cxx +++ b/src/StepAP214/StepAP214_SecurityClassificationItem.cxx @@ -14,6 +14,106 @@ #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include StepAP214_SecurityClassificationItem::StepAP214_SecurityClassificationItem () { } +Standard_Integer StepAP214_SecurityClassificationItem::CaseNum(const Handle(Standard_Transient)& ent) const +{ + + if (ent.IsNull()) return 0; + if (ent->IsKind(STANDARD_TYPE(StepBasic_Action))) return 1; + if (ent->IsKind(STANDARD_TYPE(StepRepr_AssemblyComponentUsage))) return 2; + if (ent->IsKind(STANDARD_TYPE(StepRepr_AssemblyComponentUsageSubstitute))) return 3; + if (ent->IsKind(STANDARD_TYPE(StepRepr_ConfigurationDesign))) return 4; + if (ent->IsKind(STANDARD_TYPE(StepRepr_ConfigurationEffectivity))) return 5; + if (ent->IsKind(STANDARD_TYPE(StepBasic_Document))) return 6; + if (ent->IsKind(STANDARD_TYPE(StepBasic_DocumentFile))) return 7; + if (ent->IsKind(STANDARD_TYPE(StepVisual_DraughtingModel))) return 8; + if (ent->IsKind(STANDARD_TYPE(StepBasic_GeneralProperty))) return 9; + if (ent->IsKind(STANDARD_TYPE(StepRepr_MakeFromUsageOption))) return 10; + if (ent->IsKind(STANDARD_TYPE(StepRepr_MaterialDesignation))) return 11; + if (ent->IsKind(STANDARD_TYPE(StepVisual_MechanicalDesignGeometricPresentationRepresentation))) return 12; + if (ent->IsKind(STANDARD_TYPE(StepVisual_PresentationArea))) return 13; + if (ent->IsKind(STANDARD_TYPE(StepBasic_Product))) return 14; + if (ent->IsKind(STANDARD_TYPE(StepRepr_ProductConcept))) return 15; + if (ent->IsKind(STANDARD_TYPE(StepBasic_ProductDefinition))) return 16; + if (ent->IsKind(STANDARD_TYPE(StepBasic_ProductDefinitionFormation))) return 17; + if (ent->IsKind(STANDARD_TYPE(StepBasic_ProductDefinitionRelationship))) return 18; + if (ent->IsKind(STANDARD_TYPE(StepRepr_ProductDefinitionUsage))) return 19; + if (ent->IsKind(STANDARD_TYPE(StepRepr_PropertyDefinition))) return 20; + if (ent->IsKind(STANDARD_TYPE(StepShape_ShapeRepresentation))) return 21; + if (ent->IsKind(STANDARD_TYPE(StepBasic_VersionedActionRequest))) return 22; + return 0; +} + +Handle(StepBasic_Action) StepAP214_SecurityClassificationItem::Action() const +{ + return GetCasted(StepBasic_Action,Value()); +} + +Handle(StepRepr_AssemblyComponentUsage) StepAP214_SecurityClassificationItem::AssemblyComponentUsage() const +{ + return GetCasted(StepRepr_AssemblyComponentUsage,Value()); +} + +Handle(StepRepr_ConfigurationDesign) StepAP214_SecurityClassificationItem::ConfigurationDesign() const +{ + return GetCasted(StepRepr_ConfigurationDesign,Value()); +} + +Handle(StepRepr_ConfigurationEffectivity) StepAP214_SecurityClassificationItem::ConfigurationEffectivity() const +{ + return GetCasted(StepRepr_ConfigurationEffectivity,Value()); +} + +Handle(StepVisual_DraughtingModel) StepAP214_SecurityClassificationItem::DraughtingModel() const +{ + return GetCasted(StepVisual_DraughtingModel,Value()); +} + +Handle(StepBasic_GeneralProperty) StepAP214_SecurityClassificationItem::GeneralProperty() const +{ + return GetCasted(StepBasic_GeneralProperty,Value()); +} + +Handle(StepRepr_MakeFromUsageOption) StepAP214_SecurityClassificationItem::MakeFromUsageOption() const +{ + return GetCasted(StepRepr_MakeFromUsageOption,Value()); +} + +Handle(StepRepr_ProductConcept) StepAP214_SecurityClassificationItem::ProductConcept() const +{ + return GetCasted(StepRepr_ProductConcept,Value()); +} + +Handle(StepRepr_ProductDefinitionUsage) StepAP214_SecurityClassificationItem::ProductDefinitionUsage() const +{ + return GetCasted(StepRepr_ProductDefinitionUsage,Value()); +} + +Handle(StepBasic_VersionedActionRequest) StepAP214_SecurityClassificationItem::VersionedActionRequest() const +{ + return GetCasted(StepBasic_VersionedActionRequest,Value()); +} diff --git a/src/StepAP214/StepAP214_SecurityClassificationItem.hxx b/src/StepAP214/StepAP214_SecurityClassificationItem.hxx index 1650913ef0..68dc434c8e 100644 --- a/src/StepAP214/StepAP214_SecurityClassificationItem.hxx +++ b/src/StepAP214/StepAP214_SecurityClassificationItem.hxx @@ -23,7 +23,16 @@ #include - +class StepBasic_Action; +class StepRepr_AssemblyComponentUsage; +class StepRepr_ConfigurationDesign; +class StepRepr_ConfigurationEffectivity; +class StepVisual_DraughtingModel; +class StepBasic_GeneralProperty; +class StepRepr_MakeFromUsageOption; +class StepRepr_ProductConcept; +class StepRepr_ProductDefinitionUsage; +class StepBasic_VersionedActionRequest; class StepAP214_SecurityClassificationItem : public StepAP214_ApprovalItem { @@ -35,8 +44,61 @@ public: //! Returns a SecurityClassificationItem SelectType Standard_EXPORT StepAP214_SecurityClassificationItem(); + //! Recognizes a SecurityClassificationItem Kind Entity that is : + //! 1 -> Action + //! 2 -> AssemblyComponentUsage + //! 3 -> AssemblyComponentUsageSubstitute + //! 4 -> ConfigurationDesign + //! 5 -> ConfigurationEffectivity + //! 6 -> Document + //! 7 -> DocumentFile + //! 8 -> DraughtingModel + //! 9 -> GeneralProperty + //! 10 -> MakeFromUsageOption + //! 11 -> MaterialDesignation + //! 12 -> MechanicalDesignGeometricPresentationRepresentation + //! 13 -> PresentationArea + //! 14 -> Product + //! 15 -> ProductConcept + //! 16 -> ProductDefinition + //! 17 -> ProductDefinitionFormation + //! 18 -> ProductDefinitionRelationship + //! 19 -> ProductDefinitionUsage + //! 20 -> PropertyDefinition + //! 21 -> ShapeRepresentation + //! 22 -> VersionedActionRequest + //! 0 else + Standard_EXPORT virtual Standard_Integer CaseNum (const Handle(Standard_Transient)& ent) const; + //! returns Value as a Action (Null if another type) + Standard_EXPORT virtual Handle(StepBasic_Action) Action() const; + //! returns Value as a AssemblyComponentUsage (Null if another type) + Standard_EXPORT virtual Handle(StepRepr_AssemblyComponentUsage) AssemblyComponentUsage() const; + + //! returns Value as a ConfigurationDesign (Null if another type) + Standard_EXPORT virtual Handle(StepRepr_ConfigurationDesign) ConfigurationDesign() const; + + //! returns Value as a ConfigurationEffectivity (Null if another type) + Standard_EXPORT virtual Handle(StepRepr_ConfigurationEffectivity) ConfigurationEffectivity() const; + + //! returns Value as a DraughtingModel (Null if another type) + Standard_EXPORT virtual Handle(StepVisual_DraughtingModel) DraughtingModel() const; + + //! returns Value as a GeneralProperty (Null if another type) + Standard_EXPORT virtual Handle(StepBasic_GeneralProperty) GeneralProperty() const; + + //! returns Value as a MakeFromUsageOption (Null if another type) + Standard_EXPORT virtual Handle(StepRepr_MakeFromUsageOption) MakeFromUsageOption() const; + + //! returns Value as a ProductConcept (Null if another type) + Standard_EXPORT virtual Handle(StepRepr_ProductConcept) ProductConcept() const; + + //! returns Value as a ProductDefinitionUsage (Null if another type) + Standard_EXPORT virtual Handle(StepRepr_ProductDefinitionUsage) ProductDefinitionUsage() const; + + //! returns Value as a VersionedActionRequest (Null if another type) + Standard_EXPORT virtual Handle(StepBasic_VersionedActionRequest) VersionedActionRequest() const; protected: diff --git a/src/StepBasic/FILES b/src/StepBasic/FILES index 1828ba3cd6..d40fe74e7a 100644 --- a/src/StepBasic/FILES +++ b/src/StepBasic/FILES @@ -227,6 +227,12 @@ StepBasic_ProductDefinitionFormationRelationship.cxx StepBasic_ProductDefinitionFormationRelationship.hxx StepBasic_ProductDefinitionFormationWithSpecifiedSource.cxx StepBasic_ProductDefinitionFormationWithSpecifiedSource.hxx +StepBasic_ProductDefinitionOrReference.cxx +StepBasic_ProductDefinitionOrReference.hxx +StepBasic_ProductDefinitionReference.cxx +StepBasic_ProductDefinitionReference.hxx +StepBasic_ProductDefinitionReferenceWithLocalRepresentation.cxx +StepBasic_ProductDefinitionReferenceWithLocalRepresentation.hxx StepBasic_ProductDefinitionRelationship.cxx StepBasic_ProductDefinitionRelationship.hxx StepBasic_ProductDefinitionWithAssociatedDocuments.cxx diff --git a/src/StepBasic/StepBasic_ProductDefinitionOrReference.cxx b/src/StepBasic/StepBasic_ProductDefinitionOrReference.cxx new file mode 100644 index 0000000000..ff295ec07c --- /dev/null +++ b/src/StepBasic/StepBasic_ProductDefinitionOrReference.cxx @@ -0,0 +1,70 @@ +// Created on: 2016-03-31 +// Created by: Irina KRYLOVA +// Copyright (c) 2016 OPEN CASCADE SAS +// +// 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 + +//======================================================================= +//function : StepBasic_ProductDefinitionOrReference +//purpose : +//======================================================================= +StepBasic_ProductDefinitionOrReference::StepBasic_ProductDefinitionOrReference () { } + +//======================================================================= +//function : CaseNum +//purpose : +//======================================================================= +Standard_Integer StepBasic_ProductDefinitionOrReference::CaseNum(const Handle(Standard_Transient)& ent) const +{ + if (ent.IsNull()) return 0; + if (ent->IsKind(STANDARD_TYPE(StepBasic_ProductDefinition))) return 1; + if (ent->IsKind(STANDARD_TYPE(StepBasic_ProductDefinitionReference))) return 2; + if (ent->IsKind(STANDARD_TYPE(StepBasic_ProductDefinitionReferenceWithLocalRepresentation))) return 3; + return 0; +} + +//======================================================================= +//function : ProductDefinition +//purpose : +//======================================================================= +Handle(StepBasic_ProductDefinition) StepBasic_ProductDefinitionOrReference::ProductDefinition () const +{ + return GetCasted(StepBasic_ProductDefinition, Value()); +} + +//======================================================================= +//function : ProductDefinitionReference +//purpose : +//======================================================================= +Handle(StepBasic_ProductDefinitionReference) StepBasic_ProductDefinitionOrReference:: + ProductDefinitionReference () const +{ + return GetCasted(StepBasic_ProductDefinitionReference, Value()); +} + +//======================================================================= +//function : ProductDefinitionReferenceWithLocalRepresentation +//purpose : +//======================================================================= +Handle(StepBasic_ProductDefinitionReferenceWithLocalRepresentation) StepBasic_ProductDefinitionOrReference:: + ProductDefinitionReferenceWithLocalRepresentation () const +{ + return GetCasted(StepBasic_ProductDefinitionReferenceWithLocalRepresentation, Value()); +} diff --git a/src/StepBasic/StepBasic_ProductDefinitionOrReference.hxx b/src/StepBasic/StepBasic_ProductDefinitionOrReference.hxx new file mode 100644 index 0000000000..9307b87253 --- /dev/null +++ b/src/StepBasic/StepBasic_ProductDefinitionOrReference.hxx @@ -0,0 +1,55 @@ +// Created on: 2016-03-31 +// Created by: Irina KRYLOVA +// Copyright (c) 2016 OPEN CASCADE SAS +// +// 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 _StepBasic_ProductDefinitionOrReference_HeaderFile +#define _StepBasic_ProductDefinitionOrReference_HeaderFile + +#include +#include +#include + +#include +#include +class Standard_Transient; +class StepBasic_ProductDefinition; +class StepBasic_ProductDefinitionReference; +class StepBasic_ProductDefinitionReferenceWithLocalRepresentation; + +class StepBasic_ProductDefinitionOrReference : public StepData_SelectType +{ +public: + + DEFINE_STANDARD_ALLOC + + //! Returns a ProductDefinitionOrReference SelectType + Standard_EXPORT StepBasic_ProductDefinitionOrReference(); + + //! Recognizes a ProductDefinitionOrReference Kind Entity that is : + //! 1 -> ProductDefinition + //! 2 -> ProductDefinitionReference + //! 3 -> ProductDefinitionReferenceWithLocalPresentation + //! 0 else + Standard_EXPORT Standard_Integer CaseNum (const Handle(Standard_Transient)& ent) const; + + //! returns Value as a ProductDefinition (Null if another type) + Standard_EXPORT Handle(StepBasic_ProductDefinition) ProductDefinition() const; + + //! returns Value as a ProductDefinitionReference (Null if another type) + Standard_EXPORT Handle(StepBasic_ProductDefinitionReference) ProductDefinitionReference() const; + + //! returns Value as a ProductDefinitionReferenceWithLocalRepresentation (Null if another type) + Standard_EXPORT Handle(StepBasic_ProductDefinitionReferenceWithLocalRepresentation) ProductDefinitionReferenceWithLocalRepresentation() const; +}; +#endif // _StepBasic_ProductDefinitionOrReference_HeaderFile diff --git a/src/StepBasic/StepBasic_ProductDefinitionReference.cxx b/src/StepBasic/StepBasic_ProductDefinitionReference.cxx new file mode 100644 index 0000000000..10d39ed021 --- /dev/null +++ b/src/StepBasic/StepBasic_ProductDefinitionReference.cxx @@ -0,0 +1,60 @@ +// Created on: 2016-03-30 +// Created by: Irina KRYLOVA +// Copyright (c) 2016 OPEN CASCADE SAS +// +// 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 + +IMPLEMENT_STANDARD_RTTIEXT(StepBasic_ProductDefinitionReference, MMgt_TShared) + +//======================================================================= +//function : StepBasic_ProductDefinitionReference +//purpose : +//======================================================================= +StepBasic_ProductDefinitionReference::StepBasic_ProductDefinitionReference () {} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepBasic_ProductDefinitionReference::Init (const Handle(StepBasic_ExternalSource)& theSource, + const Handle(TCollection_HAsciiString)& theProductId, + const Handle(TCollection_HAsciiString)& theProductDefinitionFormationId, + const Handle(TCollection_HAsciiString)& theProductDefinitionId, + const Handle(TCollection_HAsciiString)& theIdOwningOrganizationName) +{ + mySource = theSource; + myProductId = theProductId; + myProductDefinitionFormationId = theProductDefinitionFormationId; + myProductDefinitionId = theProductDefinitionId; + myIdOwningOrganizationName = theIdOwningOrganizationName; + hasIdOwningOrganizationName = (!theIdOwningOrganizationName.IsNull()); +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepBasic_ProductDefinitionReference::Init (const Handle(StepBasic_ExternalSource)& theSource, + const Handle(TCollection_HAsciiString)& theProductId, + const Handle(TCollection_HAsciiString)& theProductDefinitionFormationId, + const Handle(TCollection_HAsciiString)& theProductDefinitionId) +{ + mySource = theSource; + myProductId = theProductId; + myProductDefinitionFormationId = theProductDefinitionFormationId; + myProductDefinitionId = theProductDefinitionId; + hasIdOwningOrganizationName = Standard_False; +} \ No newline at end of file diff --git a/src/StepBasic/StepBasic_ProductDefinitionReference.hxx b/src/StepBasic/StepBasic_ProductDefinitionReference.hxx new file mode 100644 index 0000000000..944e78147b --- /dev/null +++ b/src/StepBasic/StepBasic_ProductDefinitionReference.hxx @@ -0,0 +1,130 @@ +// Created on: 2016-03-30 +// Created by: Irina KRYLOVA +// Copyright (c) 2016 OPEN CASCADE SAS +// +// 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 _StepBasic_ProductDefinitionReference_HeaderFile +#define _StepBasic_ProductDefinitionReference_HeaderFile + +#include +#include + +#include +#include +class TCollection_HAsciiString; + +class StepBasic_ExternalSource; + +class StepBasic_ProductDefinitionReference; +DEFINE_STANDARD_HANDLE(StepBasic_ProductDefinitionReference, MMgt_TShared) + +//! Representation of STEP entity Product_Definition_Reference +class StepBasic_ProductDefinitionReference : public MMgt_TShared +{ +public: + + //! Empty constructor + Standard_EXPORT StepBasic_ProductDefinitionReference(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init (const Handle(StepBasic_ExternalSource)& theSource, + const Handle(TCollection_HAsciiString)& theProductId, + const Handle(TCollection_HAsciiString)& theProductDefinitionFormationId, + const Handle(TCollection_HAsciiString)& theProductDefinitionId, + const Handle(TCollection_HAsciiString)& theIdOwningOrganizationName); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init (const Handle(StepBasic_ExternalSource)& theSource, + const Handle(TCollection_HAsciiString)& theProductId, + const Handle(TCollection_HAsciiString)& theProductDefinitionFormationId, + const Handle(TCollection_HAsciiString)& theProductDefinitionId); + + //! Returns field Source + inline Handle(StepBasic_ExternalSource) Source() const + { + return mySource; + } + + //! Set field Source + inline void SetSource (const Handle(StepBasic_ExternalSource)& theSource) + { + mySource = theSource; + } + + //! Returns field ProductId + inline Handle(TCollection_HAsciiString) ProductId() const + { + return myProductId; + } + + //! Set field ProductId + inline void SetProductId (const Handle(TCollection_HAsciiString)& theProductId) + { + myProductId = theProductId; + } + + //! Returns field ProductDefinitionFormationId + inline Handle(TCollection_HAsciiString) ProductDefinitionFormationId() const + { + return myProductDefinitionFormationId; + } + + //! Set field ProductDefinitionFormationId + inline void SetProductDefinitionFormationId (const Handle(TCollection_HAsciiString)& theProductDefinitionFormationId) + { + myProductDefinitionFormationId = theProductDefinitionFormationId; + } + + //! Returns field ProductDefinitionId + inline Handle(TCollection_HAsciiString) ProductDefinitionId() const + { + return myProductDefinitionId; + } + + //! Set field ProductDefinitionId + inline void SetProductDefinitionId (const Handle(TCollection_HAsciiString)& theProductDefinitionId) + { + myProductDefinitionId = theProductDefinitionId; + } + + //! Returns field IdOwningOrganizationName + inline Handle(TCollection_HAsciiString) IdOwningOrganizationName() const + { + return myIdOwningOrganizationName; + } + + //! Set field IdOwningOrganizationName + inline void SetIdOwningOrganizationName (const Handle(TCollection_HAsciiString)& theIdOwningOrganizationName) + { + myIdOwningOrganizationName = theIdOwningOrganizationName; + hasIdOwningOrganizationName = (!theIdOwningOrganizationName.IsNull()); + } + + //! Returns true if IdOwningOrganizationName exists + inline Standard_Boolean HasIdOwningOrganizationName() const + { + return hasIdOwningOrganizationName; + } + + DEFINE_STANDARD_RTTIEXT(StepBasic_ProductDefinitionReference, MMgt_TShared) + +private: + Handle(StepBasic_ExternalSource) mySource; + Handle(TCollection_HAsciiString) myProductId; + Handle(TCollection_HAsciiString) myProductDefinitionFormationId; + Handle(TCollection_HAsciiString) myProductDefinitionId; + Handle(TCollection_HAsciiString) myIdOwningOrganizationName; + Standard_Boolean hasIdOwningOrganizationName; +}; + +#endif // _StepBasic_ProductDefinitionReference_HeaderFile diff --git a/src/StepBasic/StepBasic_ProductDefinitionReferenceWithLocalRepresentation.cxx b/src/StepBasic/StepBasic_ProductDefinitionReferenceWithLocalRepresentation.cxx new file mode 100644 index 0000000000..7260722b29 --- /dev/null +++ b/src/StepBasic/StepBasic_ProductDefinitionReferenceWithLocalRepresentation.cxx @@ -0,0 +1,42 @@ +// Created on: 2016-03-30 +// Created by: Irina KRYLOVA +// Copyright (c) 2016 OPEN CASCADE SAS +// +// 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 + +IMPLEMENT_STANDARD_RTTIEXT(StepBasic_ProductDefinitionReferenceWithLocalRepresentation, StepBasic_ProductDefinition) + +//======================================================================= +//function : StepBasic_ProductDefinitionReferenceWithLocalRepresentation +//purpose : +//======================================================================= +StepBasic_ProductDefinitionReferenceWithLocalRepresentation::StepBasic_ProductDefinitionReferenceWithLocalRepresentation () {} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepBasic_ProductDefinitionReferenceWithLocalRepresentation::Init( + const Handle(StepBasic_ExternalSource)& theSource, + const Handle(TCollection_HAsciiString)& theId, + const Handle(TCollection_HAsciiString)& theDescription, + const Handle(StepBasic_ProductDefinitionFormation)& theFormation, + const Handle(StepBasic_ProductDefinitionContext)& theFrameOfReference) +{ + StepBasic_ProductDefinition::Init(theId, theDescription, theFormation, theFrameOfReference); + mySource = theSource; +} diff --git a/src/StepBasic/StepBasic_ProductDefinitionReferenceWithLocalRepresentation.hxx b/src/StepBasic/StepBasic_ProductDefinitionReferenceWithLocalRepresentation.hxx new file mode 100644 index 0000000000..8afb85b1d9 --- /dev/null +++ b/src/StepBasic/StepBasic_ProductDefinitionReferenceWithLocalRepresentation.hxx @@ -0,0 +1,61 @@ +// Created on: 2016-03-30 +// Created by: Irina KRYLOVA +// Copyright (c) 2016 OPEN CASCADE SAS +// +// 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 _StepBasic_ProductDefinitionReferenceWithLocalRepresentation_HeaderFile +#define _StepBasic_ProductDefinitionReferenceWithLocalRepresentation_HeaderFile + +#include +#include + +#include + +class StepBasic_ExternalSource; + +class StepBasic_ProductDefinition; +DEFINE_STANDARD_HANDLE(StepBasic_ProductDefinitionReferenceWithLocalRepresentation, StepBasic_ProductDefinition) + + +class StepBasic_ProductDefinitionReferenceWithLocalRepresentation : public StepBasic_ProductDefinition +{ + +public: + + //! Returns a ProductDefinitionReferenceWithLocalRepresentation + Standard_EXPORT StepBasic_ProductDefinitionReferenceWithLocalRepresentation(); + + Standard_EXPORT void Init (const Handle(StepBasic_ExternalSource)& theSource, + const Handle(TCollection_HAsciiString)& theId, + const Handle(TCollection_HAsciiString)& theDescription, + const Handle(StepBasic_ProductDefinitionFormation)& theFormation, + const Handle(StepBasic_ProductDefinitionContext)& theFrameOfReference); + + //! Returns field Source + inline Handle(StepBasic_ExternalSource) Source() const + { + return mySource; + } + + //! Set field Source + inline void SetSource (const Handle(StepBasic_ExternalSource)& theSource) + { + mySource = theSource; + } + + DEFINE_STANDARD_RTTIEXT(StepBasic_ProductDefinitionReferenceWithLocalRepresentation, StepBasic_ProductDefinition) + +private: + Handle(StepBasic_ExternalSource) mySource; +}; +#endif // _StepBasic_ProductDefinitionReferenceWithLocalRepresentation_HeaderFile diff --git a/src/StepBasic/StepBasic_ProductDefinitionRelationship.cxx b/src/StepBasic/StepBasic_ProductDefinitionRelationship.cxx index be3b80423f..1830981903 100644 --- a/src/StepBasic/StepBasic_ProductDefinitionRelationship.cxx +++ b/src/StepBasic/StepBasic_ProductDefinitionRelationship.cxx @@ -17,6 +17,7 @@ #include #include +#include #include #include @@ -54,8 +55,32 @@ void StepBasic_ProductDefinitionRelationship::Init (const Handle(TCollection_HAs } else theDescription.Nullify(); - theRelatingProductDefinition = aRelatingProductDefinition; + theRelatingProductDefinition.SetValue(aRelatingProductDefinition); + theRelatedProductDefinition.SetValue(aRelatedProductDefinition); +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= + +void StepBasic_ProductDefinitionRelationship::Init (const Handle(TCollection_HAsciiString) &aId, + const Handle(TCollection_HAsciiString) &aName, + const Standard_Boolean hasDescription, + const Handle(TCollection_HAsciiString) &aDescription, + const StepBasic_ProductDefinitionOrReference &aRelatingProductDefinition, + const StepBasic_ProductDefinitionOrReference &aRelatedProductDefinition) +{ + + theId = aId; + theName = aName; + defDescription = hasDescription; + if (defDescription) { + theDescription = aDescription; + } + else theDescription.Nullify(); + theRelatingProductDefinition = aRelatingProductDefinition; theRelatedProductDefinition = aRelatedProductDefinition; } @@ -135,6 +160,16 @@ Standard_Boolean StepBasic_ProductDefinitionRelationship::HasDescription () cons //======================================================================= Handle(StepBasic_ProductDefinition) StepBasic_ProductDefinitionRelationship::RelatingProductDefinition () const +{ + return theRelatingProductDefinition.ProductDefinition(); +} + +//======================================================================= +//function : RelatingProductDefinitionAP242 +//purpose : +//======================================================================= + +StepBasic_ProductDefinitionOrReference StepBasic_ProductDefinitionRelationship::RelatingProductDefinitionAP242 () const { return theRelatingProductDefinition; } @@ -145,6 +180,16 @@ Handle(StepBasic_ProductDefinition) StepBasic_ProductDefinitionRelationship::Rel //======================================================================= void StepBasic_ProductDefinitionRelationship::SetRelatingProductDefinition (const Handle(StepBasic_ProductDefinition) &aRelatingProductDefinition) +{ + theRelatingProductDefinition.SetValue(aRelatingProductDefinition); +} + +//======================================================================= +//function : SetRelatingProductDefinition +//purpose : +//======================================================================= + +void StepBasic_ProductDefinitionRelationship::SetRelatingProductDefinition (const StepBasic_ProductDefinitionOrReference &aRelatingProductDefinition) { theRelatingProductDefinition = aRelatingProductDefinition; } @@ -155,6 +200,16 @@ void StepBasic_ProductDefinitionRelationship::SetRelatingProductDefinition (cons //======================================================================= Handle(StepBasic_ProductDefinition) StepBasic_ProductDefinitionRelationship::RelatedProductDefinition () const +{ + return theRelatedProductDefinition.ProductDefinition(); +} + +//======================================================================= +//function : RelatedProductDefinitionAP242 +//purpose : +//======================================================================= + +StepBasic_ProductDefinitionOrReference StepBasic_ProductDefinitionRelationship::RelatedProductDefinitionAP242 () const { return theRelatedProductDefinition; } @@ -166,5 +221,15 @@ Handle(StepBasic_ProductDefinition) StepBasic_ProductDefinitionRelationship::Rel void StepBasic_ProductDefinitionRelationship::SetRelatedProductDefinition (const Handle(StepBasic_ProductDefinition) &aRelatedProductDefinition) { - theRelatedProductDefinition = aRelatedProductDefinition; + theRelatedProductDefinition.SetValue(aRelatedProductDefinition); +} + +//======================================================================= +//function : SetRelatedProductDefinition +//purpose : +//======================================================================= + +void StepBasic_ProductDefinitionRelationship::SetRelatedProductDefinition (const StepBasic_ProductDefinitionOrReference &aRelatedProductDefinition) +{ + theRelatedProductDefinition = aRelatedProductDefinition; } diff --git a/src/StepBasic/StepBasic_ProductDefinitionRelationship.hxx b/src/StepBasic/StepBasic_ProductDefinitionRelationship.hxx index 6e81ee4b7c..9396feaaf5 100644 --- a/src/StepBasic/StepBasic_ProductDefinitionRelationship.hxx +++ b/src/StepBasic/StepBasic_ProductDefinitionRelationship.hxx @@ -21,6 +21,7 @@ #include #include +#include class TCollection_HAsciiString; class StepBasic_ProductDefinition; @@ -40,6 +41,9 @@ public: //! Initialize all fields (own and inherited) Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& aId, const Handle(TCollection_HAsciiString)& aName, const Standard_Boolean hasDescription, const Handle(TCollection_HAsciiString)& aDescription, const Handle(StepBasic_ProductDefinition)& aRelatingProductDefinition, const Handle(StepBasic_ProductDefinition)& aRelatedProductDefinition); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& aId, const Handle(TCollection_HAsciiString)& aName, const Standard_Boolean hasDescription, const Handle(TCollection_HAsciiString)& aDescription, const StepBasic_ProductDefinitionOrReference& aRelatingProductDefinition, const StepBasic_ProductDefinitionOrReference& aRelatedProductDefinition); //! Returns field Id Standard_EXPORT Handle(TCollection_HAsciiString) Id() const; @@ -64,17 +68,27 @@ public: //! Returns field RelatingProductDefinition Standard_EXPORT Handle(StepBasic_ProductDefinition) RelatingProductDefinition() const; + + //! Returns field RelatingProductDefinition in AP242 + Standard_EXPORT StepBasic_ProductDefinitionOrReference RelatingProductDefinitionAP242() const; //! Set field RelatingProductDefinition Standard_EXPORT void SetRelatingProductDefinition (const Handle(StepBasic_ProductDefinition)& RelatingProductDefinition); + //! Set field RelatingProductDefinition in AP242 + Standard_EXPORT void SetRelatingProductDefinition (const StepBasic_ProductDefinitionOrReference& RelatingProductDefinition); + //! Returns field RelatedProductDefinition Standard_EXPORT Handle(StepBasic_ProductDefinition) RelatedProductDefinition() const; + + //! Returns field RelatedProductDefinition in AP242 + Standard_EXPORT StepBasic_ProductDefinitionOrReference RelatedProductDefinitionAP242() const; //! Set field RelatedProductDefinition Standard_EXPORT void SetRelatedProductDefinition (const Handle(StepBasic_ProductDefinition)& RelatedProductDefinition); - + //! Set field RelatedProductDefinition in AP242 + Standard_EXPORT void SetRelatedProductDefinition (const StepBasic_ProductDefinitionOrReference& RelatedProductDefinition); DEFINE_STANDARD_RTTIEXT(StepBasic_ProductDefinitionRelationship,MMgt_TShared) @@ -90,8 +104,8 @@ private: Handle(TCollection_HAsciiString) theId; Handle(TCollection_HAsciiString) theName; Handle(TCollection_HAsciiString) theDescription; - Handle(StepBasic_ProductDefinition) theRelatingProductDefinition; - Handle(StepBasic_ProductDefinition) theRelatedProductDefinition; + StepBasic_ProductDefinitionOrReference theRelatingProductDefinition; + StepBasic_ProductDefinitionOrReference theRelatedProductDefinition; Standard_Boolean defDescription; diff --git a/src/StepRepr/StepRepr_AssemblyComponentUsage.cxx b/src/StepRepr/StepRepr_AssemblyComponentUsage.cxx index 995efe4c35..8a2318c511 100644 --- a/src/StepRepr/StepRepr_AssemblyComponentUsage.cxx +++ b/src/StepRepr/StepRepr_AssemblyComponentUsage.cxx @@ -59,6 +59,34 @@ void StepRepr_AssemblyComponentUsage::Init (const Handle(TCollection_HAsciiStrin else theReferenceDesignator.Nullify(); } +//======================================================================= +//function : Init +//purpose : +//======================================================================= + +void StepRepr_AssemblyComponentUsage::Init (const Handle(TCollection_HAsciiString) &aProductDefinitionRelationship_Id, + const Handle(TCollection_HAsciiString) &aProductDefinitionRelationship_Name, + const Standard_Boolean hasProductDefinitionRelationship_Description, + const Handle(TCollection_HAsciiString) &aProductDefinitionRelationship_Description, + const StepBasic_ProductDefinitionOrReference &aProductDefinitionRelationship_RelatingProductDefinition, + const StepBasic_ProductDefinitionOrReference &aProductDefinitionRelationship_RelatedProductDefinition, + const Standard_Boolean hasReferenceDesignator, + const Handle(TCollection_HAsciiString) &aReferenceDesignator) +{ + StepRepr_ProductDefinitionUsage::Init(aProductDefinitionRelationship_Id, + aProductDefinitionRelationship_Name, + hasProductDefinitionRelationship_Description, + aProductDefinitionRelationship_Description, + aProductDefinitionRelationship_RelatingProductDefinition, + aProductDefinitionRelationship_RelatedProductDefinition); + + defReferenceDesignator = hasReferenceDesignator; + if (defReferenceDesignator) { + theReferenceDesignator = aReferenceDesignator; + } + else theReferenceDesignator.Nullify(); +} + //======================================================================= //function : ReferenceDesignator //purpose : diff --git a/src/StepRepr/StepRepr_AssemblyComponentUsage.hxx b/src/StepRepr/StepRepr_AssemblyComponentUsage.hxx index 7bebc6788a..197068efb6 100644 --- a/src/StepRepr/StepRepr_AssemblyComponentUsage.hxx +++ b/src/StepRepr/StepRepr_AssemblyComponentUsage.hxx @@ -40,6 +40,9 @@ public: //! Initialize all fields (own and inherited) Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& aProductDefinitionRelationship_Id, const Handle(TCollection_HAsciiString)& aProductDefinitionRelationship_Name, const Standard_Boolean hasProductDefinitionRelationship_Description, const Handle(TCollection_HAsciiString)& aProductDefinitionRelationship_Description, const Handle(StepBasic_ProductDefinition)& aProductDefinitionRelationship_RelatingProductDefinition, const Handle(StepBasic_ProductDefinition)& aProductDefinitionRelationship_RelatedProductDefinition, const Standard_Boolean hasReferenceDesignator, const Handle(TCollection_HAsciiString)& aReferenceDesignator); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& aProductDefinitionRelationship_Id, const Handle(TCollection_HAsciiString)& aProductDefinitionRelationship_Name, const Standard_Boolean hasProductDefinitionRelationship_Description, const Handle(TCollection_HAsciiString)& aProductDefinitionRelationship_Description, const StepBasic_ProductDefinitionOrReference& aProductDefinitionRelationship_RelatingProductDefinition, const StepBasic_ProductDefinitionOrReference& aProductDefinitionRelationship_RelatedProductDefinition, const Standard_Boolean hasReferenceDesignator, const Handle(TCollection_HAsciiString)& aReferenceDesignator); //! Returns field ReferenceDesignator Standard_EXPORT Handle(TCollection_HAsciiString) ReferenceDesignator() const; diff --git a/src/StepRepr/StepRepr_MakeFromUsageOption.cxx b/src/StepRepr/StepRepr_MakeFromUsageOption.cxx index 88546c794b..2c8b58cc7a 100644 --- a/src/StepRepr/StepRepr_MakeFromUsageOption.cxx +++ b/src/StepRepr/StepRepr_MakeFromUsageOption.cxx @@ -60,6 +60,35 @@ void StepRepr_MakeFromUsageOption::Init (const Handle(TCollection_HAsciiString) theQuantity = aQuantity; } +//======================================================================= +//function : Init +//purpose : +//======================================================================= + +void StepRepr_MakeFromUsageOption::Init (const Handle(TCollection_HAsciiString) &aProductDefinitionRelationship_Id, + const Handle(TCollection_HAsciiString) &aProductDefinitionRelationship_Name, + const Standard_Boolean hasProductDefinitionRelationship_Description, + const Handle(TCollection_HAsciiString) &aProductDefinitionRelationship_Description, + const StepBasic_ProductDefinitionOrReference &aProductDefinitionRelationship_RelatingProductDefinition, + const StepBasic_ProductDefinitionOrReference &aProductDefinitionRelationship_RelatedProductDefinition, + const Standard_Integer aRanking, + const Handle(TCollection_HAsciiString) &aRankingRationale, + const Handle(StepBasic_MeasureWithUnit) &aQuantity) +{ + StepRepr_ProductDefinitionUsage::Init(aProductDefinitionRelationship_Id, + aProductDefinitionRelationship_Name, + hasProductDefinitionRelationship_Description, + aProductDefinitionRelationship_Description, + aProductDefinitionRelationship_RelatingProductDefinition, + aProductDefinitionRelationship_RelatedProductDefinition); + + theRanking = aRanking; + + theRankingRationale = aRankingRationale; + + theQuantity = aQuantity; +} + //======================================================================= //function : Ranking //purpose : diff --git a/src/StepRepr/StepRepr_MakeFromUsageOption.hxx b/src/StepRepr/StepRepr_MakeFromUsageOption.hxx index c7e6442aa6..04be16c7e7 100644 --- a/src/StepRepr/StepRepr_MakeFromUsageOption.hxx +++ b/src/StepRepr/StepRepr_MakeFromUsageOption.hxx @@ -42,6 +42,9 @@ public: //! Initialize all fields (own and inherited) Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& aProductDefinitionRelationship_Id, const Handle(TCollection_HAsciiString)& aProductDefinitionRelationship_Name, const Standard_Boolean hasProductDefinitionRelationship_Description, const Handle(TCollection_HAsciiString)& aProductDefinitionRelationship_Description, const Handle(StepBasic_ProductDefinition)& aProductDefinitionRelationship_RelatingProductDefinition, const Handle(StepBasic_ProductDefinition)& aProductDefinitionRelationship_RelatedProductDefinition, const Standard_Integer aRanking, const Handle(TCollection_HAsciiString)& aRankingRationale, const Handle(StepBasic_MeasureWithUnit)& aQuantity); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& aProductDefinitionRelationship_Id, const Handle(TCollection_HAsciiString)& aProductDefinitionRelationship_Name, const Standard_Boolean hasProductDefinitionRelationship_Description, const Handle(TCollection_HAsciiString)& aProductDefinitionRelationship_Description, const StepBasic_ProductDefinitionOrReference& aProductDefinitionRelationship_RelatingProductDefinition, const StepBasic_ProductDefinitionOrReference& aProductDefinitionRelationship_RelatedProductDefinition, const Standard_Integer aRanking, const Handle(TCollection_HAsciiString)& aRankingRationale, const Handle(StepBasic_MeasureWithUnit)& aQuantity); //! Returns field Ranking Standard_EXPORT Standard_Integer Ranking() const; diff --git a/src/StepRepr/StepRepr_QuantifiedAssemblyComponentUsage.cxx b/src/StepRepr/StepRepr_QuantifiedAssemblyComponentUsage.cxx index aae6faea42..9e760ea96b 100644 --- a/src/StepRepr/StepRepr_QuantifiedAssemblyComponentUsage.cxx +++ b/src/StepRepr/StepRepr_QuantifiedAssemblyComponentUsage.cxx @@ -58,6 +58,33 @@ void StepRepr_QuantifiedAssemblyComponentUsage::Init (const Handle(TCollection_H theQuantity = aQuantity; } +//======================================================================= +//function : Init +//purpose : +//======================================================================= + +void StepRepr_QuantifiedAssemblyComponentUsage::Init (const Handle(TCollection_HAsciiString) &aProductDefinitionRelationship_Id, + const Handle(TCollection_HAsciiString) &aProductDefinitionRelationship_Name, + const Standard_Boolean hasProductDefinitionRelationship_Description, + const Handle(TCollection_HAsciiString) &aProductDefinitionRelationship_Description, + const StepBasic_ProductDefinitionOrReference &aProductDefinitionRelationship_RelatingProductDefinition, + const StepBasic_ProductDefinitionOrReference &aProductDefinitionRelationship_RelatedProductDefinition, + const Standard_Boolean hasAssemblyComponentUsage_ReferenceDesignator, + const Handle(TCollection_HAsciiString) &aAssemblyComponentUsage_ReferenceDesignator, + const Handle(StepBasic_MeasureWithUnit) &aQuantity) +{ + StepRepr_AssemblyComponentUsage::Init(aProductDefinitionRelationship_Id, + aProductDefinitionRelationship_Name, + hasProductDefinitionRelationship_Description, + aProductDefinitionRelationship_Description, + aProductDefinitionRelationship_RelatingProductDefinition, + aProductDefinitionRelationship_RelatedProductDefinition, + hasAssemblyComponentUsage_ReferenceDesignator, + aAssemblyComponentUsage_ReferenceDesignator); + + theQuantity = aQuantity; +} + //======================================================================= //function : Quantity //purpose : diff --git a/src/StepRepr/StepRepr_QuantifiedAssemblyComponentUsage.hxx b/src/StepRepr/StepRepr_QuantifiedAssemblyComponentUsage.hxx index 25fc137cc5..7d93d5ea8d 100644 --- a/src/StepRepr/StepRepr_QuantifiedAssemblyComponentUsage.hxx +++ b/src/StepRepr/StepRepr_QuantifiedAssemblyComponentUsage.hxx @@ -41,6 +41,9 @@ public: //! Initialize all fields (own and inherited) Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& aProductDefinitionRelationship_Id, const Handle(TCollection_HAsciiString)& aProductDefinitionRelationship_Name, const Standard_Boolean hasProductDefinitionRelationship_Description, const Handle(TCollection_HAsciiString)& aProductDefinitionRelationship_Description, const Handle(StepBasic_ProductDefinition)& aProductDefinitionRelationship_RelatingProductDefinition, const Handle(StepBasic_ProductDefinition)& aProductDefinitionRelationship_RelatedProductDefinition, const Standard_Boolean hasAssemblyComponentUsage_ReferenceDesignator, const Handle(TCollection_HAsciiString)& aAssemblyComponentUsage_ReferenceDesignator, const Handle(StepBasic_MeasureWithUnit)& aQuantity); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& aProductDefinitionRelationship_Id, const Handle(TCollection_HAsciiString)& aProductDefinitionRelationship_Name, const Standard_Boolean hasProductDefinitionRelationship_Description, const Handle(TCollection_HAsciiString)& aProductDefinitionRelationship_Description, const StepBasic_ProductDefinitionOrReference& aProductDefinitionRelationship_RelatingProductDefinition, const StepBasic_ProductDefinitionOrReference& aProductDefinitionRelationship_RelatedProductDefinition, const Standard_Boolean hasAssemblyComponentUsage_ReferenceDesignator, const Handle(TCollection_HAsciiString)& aAssemblyComponentUsage_ReferenceDesignator, const Handle(StepBasic_MeasureWithUnit)& aQuantity); //! Returns field Quantity Standard_EXPORT Handle(StepBasic_MeasureWithUnit) Quantity() const; diff --git a/src/StepRepr/StepRepr_SpecifiedHigherUsageOccurrence.cxx b/src/StepRepr/StepRepr_SpecifiedHigherUsageOccurrence.cxx index b3b70845bc..26e0d181c4 100644 --- a/src/StepRepr/StepRepr_SpecifiedHigherUsageOccurrence.cxx +++ b/src/StepRepr/StepRepr_SpecifiedHigherUsageOccurrence.cxx @@ -62,6 +62,36 @@ void StepRepr_SpecifiedHigherUsageOccurrence::Init (const Handle(TCollection_HAs theNextUsage = aNextUsage; } +//======================================================================= +//function : Init +//purpose : +//======================================================================= + +void StepRepr_SpecifiedHigherUsageOccurrence::Init (const Handle(TCollection_HAsciiString) &aProductDefinitionRelationship_Id, + const Handle(TCollection_HAsciiString) &aProductDefinitionRelationship_Name, + const Standard_Boolean hasProductDefinitionRelationship_Description, + const Handle(TCollection_HAsciiString) &aProductDefinitionRelationship_Description, + const StepBasic_ProductDefinitionOrReference &aProductDefinitionRelationship_RelatingProductDefinition, + const StepBasic_ProductDefinitionOrReference &aProductDefinitionRelationship_RelatedProductDefinition, + const Standard_Boolean hasAssemblyComponentUsage_ReferenceDesignator, + const Handle(TCollection_HAsciiString) &aAssemblyComponentUsage_ReferenceDesignator, + const Handle(StepRepr_AssemblyComponentUsage) &aUpperUsage, + const Handle(StepRepr_NextAssemblyUsageOccurrence) &aNextUsage) +{ + StepRepr_AssemblyComponentUsage::Init(aProductDefinitionRelationship_Id, + aProductDefinitionRelationship_Name, + hasProductDefinitionRelationship_Description, + aProductDefinitionRelationship_Description, + aProductDefinitionRelationship_RelatingProductDefinition, + aProductDefinitionRelationship_RelatedProductDefinition, + hasAssemblyComponentUsage_ReferenceDesignator, + aAssemblyComponentUsage_ReferenceDesignator); + + theUpperUsage = aUpperUsage; + + theNextUsage = aNextUsage; +} + //======================================================================= //function : UpperUsage //purpose : diff --git a/src/StepRepr/StepRepr_SpecifiedHigherUsageOccurrence.hxx b/src/StepRepr/StepRepr_SpecifiedHigherUsageOccurrence.hxx index 9814eeb743..244f3bec0b 100644 --- a/src/StepRepr/StepRepr_SpecifiedHigherUsageOccurrence.hxx +++ b/src/StepRepr/StepRepr_SpecifiedHigherUsageOccurrence.hxx @@ -42,6 +42,9 @@ public: //! Initialize all fields (own and inherited) Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& aProductDefinitionRelationship_Id, const Handle(TCollection_HAsciiString)& aProductDefinitionRelationship_Name, const Standard_Boolean hasProductDefinitionRelationship_Description, const Handle(TCollection_HAsciiString)& aProductDefinitionRelationship_Description, const Handle(StepBasic_ProductDefinition)& aProductDefinitionRelationship_RelatingProductDefinition, const Handle(StepBasic_ProductDefinition)& aProductDefinitionRelationship_RelatedProductDefinition, const Standard_Boolean hasAssemblyComponentUsage_ReferenceDesignator, const Handle(TCollection_HAsciiString)& aAssemblyComponentUsage_ReferenceDesignator, const Handle(StepRepr_AssemblyComponentUsage)& aUpperUsage, const Handle(StepRepr_NextAssemblyUsageOccurrence)& aNextUsage); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& aProductDefinitionRelationship_Id, const Handle(TCollection_HAsciiString)& aProductDefinitionRelationship_Name, const Standard_Boolean hasProductDefinitionRelationship_Description, const Handle(TCollection_HAsciiString)& aProductDefinitionRelationship_Description, const StepBasic_ProductDefinitionOrReference& aProductDefinitionRelationship_RelatingProductDefinition, const StepBasic_ProductDefinitionOrReference& aProductDefinitionRelationship_RelatedProductDefinition, const Standard_Boolean hasAssemblyComponentUsage_ReferenceDesignator, const Handle(TCollection_HAsciiString)& aAssemblyComponentUsage_ReferenceDesignator, const Handle(StepRepr_AssemblyComponentUsage)& aUpperUsage, const Handle(StepRepr_NextAssemblyUsageOccurrence)& aNextUsage); //! Returns field UpperUsage Standard_EXPORT Handle(StepRepr_AssemblyComponentUsage) UpperUsage() const; diff --git a/src/StepShape/StepShape_ValueQualifier.cxx b/src/StepShape/StepShape_ValueQualifier.cxx index 2fd64416d7..65682afece 100644 --- a/src/StepShape/StepShape_ValueQualifier.cxx +++ b/src/StepShape/StepShape_ValueQualifier.cxx @@ -26,6 +26,7 @@ Standard_Integer StepShape_ValueQualifier::CaseNum if (ent.IsNull()) return 0; if (ent->IsKind(STANDARD_TYPE(StepShape_PrecisionQualifier))) return 1; if (ent->IsKind(STANDARD_TYPE(StepShape_TypeQualifier))) return 2; + if (ent->IsKind(STANDARD_TYPE(StepShape_ValueFormatTypeQualifier))) return 4; return 0; } diff --git a/src/StepShape/StepShape_ValueQualifier.hxx b/src/StepShape/StepShape_ValueQualifier.hxx index f9f833cb33..5b1de0ca86 100644 --- a/src/StepShape/StepShape_ValueQualifier.hxx +++ b/src/StepShape/StepShape_ValueQualifier.hxx @@ -42,6 +42,7 @@ public: //! 1 -> PrecisionQualifier from StepShape //! 2 -> TypeQualifier from StepShape //! 3 -> UnceraintyQualifier .. not yet implemented + //! 4 -> ValueFormatTypeQualifier Standard_EXPORT Standard_Integer CaseNum (const Handle(Standard_Transient)& ent) const; //! Returns Value as PrecisionQualifier diff --git a/src/StepVisual/FILES b/src/StepVisual/FILES index 387555749a..c4e377f6db 100644 --- a/src/StepVisual/FILES +++ b/src/StepVisual/FILES @@ -175,6 +175,8 @@ StepVisual_StyleContextSelect.cxx StepVisual_StyleContextSelect.hxx StepVisual_StyledItem.cxx StepVisual_StyledItem.hxx +StepVisual_StyledItemTarget.cxx +StepVisual_StyledItemTarget.hxx StepVisual_SurfaceSide.hxx StepVisual_SurfaceSideStyle.cxx StepVisual_SurfaceSideStyle.hxx diff --git a/src/StepVisual/StepVisual_AnnotationPlane.cxx b/src/StepVisual/StepVisual_AnnotationPlane.cxx index 65e9245d66..b1e2e6be87 100644 --- a/src/StepVisual/StepVisual_AnnotationPlane.cxx +++ b/src/StepVisual/StepVisual_AnnotationPlane.cxx @@ -30,7 +30,7 @@ StepVisual_AnnotationPlane::StepVisual_AnnotationPlane () {} //======================================================================= void StepVisual_AnnotationPlane::Init (const Handle(TCollection_HAsciiString)& theName, const Handle(StepVisual_HArray1OfPresentationStyleAssignment)& theStyles, - const Handle(StepRepr_RepresentationItem)& theItem, + const Handle(MMgt_TShared)& theItem, const Handle(StepVisual_HArray1OfAnnotationPlaneElement)& theElements) { StepVisual_AnnotationOccurrence::Init(theName, theStyles, theItem); diff --git a/src/StepVisual/StepVisual_AnnotationPlane.hxx b/src/StepVisual/StepVisual_AnnotationPlane.hxx index b969509fd6..596c6e13ef 100644 --- a/src/StepVisual/StepVisual_AnnotationPlane.hxx +++ b/src/StepVisual/StepVisual_AnnotationPlane.hxx @@ -34,7 +34,7 @@ public: Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& theName, const Handle(StepVisual_HArray1OfPresentationStyleAssignment)& theStyles, - const Handle(StepRepr_RepresentationItem)& theItem, + const Handle(MMgt_TShared)& theItem, const Handle(StepVisual_HArray1OfAnnotationPlaneElement)& theElements); //! Returns field Elements diff --git a/src/StepVisual/StepVisual_ContextDependentOverRidingStyledItem.cxx b/src/StepVisual/StepVisual_ContextDependentOverRidingStyledItem.cxx index 05a10b4446..41c9f87061 100644 --- a/src/StepVisual/StepVisual_ContextDependentOverRidingStyledItem.cxx +++ b/src/StepVisual/StepVisual_ContextDependentOverRidingStyledItem.cxx @@ -26,7 +26,7 @@ StepVisual_ContextDependentOverRidingStyledItem::StepVisual_ContextDependentOver void StepVisual_ContextDependentOverRidingStyledItem::Init( const Handle(TCollection_HAsciiString)& aName, const Handle(StepVisual_HArray1OfPresentationStyleAssignment)& aStyles, - const Handle(StepRepr_RepresentationItem)& aItem, + const Handle(MMgt_TShared)& aItem, const Handle(StepVisual_StyledItem)& aOverRiddenStyle, const Handle(StepVisual_HArray1OfStyleContextSelect)& aStyleContext) { diff --git a/src/StepVisual/StepVisual_ContextDependentOverRidingStyledItem.hxx b/src/StepVisual/StepVisual_ContextDependentOverRidingStyledItem.hxx index 0fa3ec259b..09a7ea95c1 100644 --- a/src/StepVisual/StepVisual_ContextDependentOverRidingStyledItem.hxx +++ b/src/StepVisual/StepVisual_ContextDependentOverRidingStyledItem.hxx @@ -43,7 +43,7 @@ public: //! Returns a ContextDependentOverRidingStyledItem Standard_EXPORT StepVisual_ContextDependentOverRidingStyledItem(); - Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& aName, const Handle(StepVisual_HArray1OfPresentationStyleAssignment)& aStyles, const Handle(StepRepr_RepresentationItem)& aItem, const Handle(StepVisual_StyledItem)& aOverRiddenStyle, const Handle(StepVisual_HArray1OfStyleContextSelect)& aStyleContext); + Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& aName, const Handle(StepVisual_HArray1OfPresentationStyleAssignment)& aStyles, const Handle(MMgt_TShared)& aItem, const Handle(StepVisual_StyledItem)& aOverRiddenStyle, const Handle(StepVisual_HArray1OfStyleContextSelect)& aStyleContext); Standard_EXPORT void SetStyleContext (const Handle(StepVisual_HArray1OfStyleContextSelect)& aStyleContext); diff --git a/src/StepVisual/StepVisual_DraughtingCalloutElement.cxx b/src/StepVisual/StepVisual_DraughtingCalloutElement.cxx index 829b514e1f..23aebbe398 100644 --- a/src/StepVisual/StepVisual_DraughtingCalloutElement.cxx +++ b/src/StepVisual/StepVisual_DraughtingCalloutElement.cxx @@ -16,7 +16,7 @@ #include #include #include - +#include #include //======================================================================= @@ -35,15 +35,16 @@ Standard_Integer StepVisual_DraughtingCalloutElement::CaseNum(const Handle(Stand { if (ent.IsNull()) return 0; if (ent->IsKind(STANDARD_TYPE(StepVisual_AnnotationCurveOccurrence))) return 1; - else if (ent->IsKind(STANDARD_TYPE(StepVisual_TessellatedAnnotationOccurrence))) return 2; + if (ent->IsKind(STANDARD_TYPE(StepVisual_AnnotationTextOccurrence))) return 2; + if (ent->IsKind(STANDARD_TYPE(StepVisual_TessellatedAnnotationOccurrence))) return 3; return 0; } Handle(StepVisual_AnnotationCurveOccurrence) StepVisual_DraughtingCalloutElement::AnnotationCurveOccurrence() const { return GetCasted(StepVisual_AnnotationCurveOccurrence,Value()); } - - Handle(StepVisual_TessellatedAnnotationOccurrence) StepVisual_DraughtingCalloutElement::TessellatedAnnotationOccurrence() const { return GetCasted(StepVisual_TessellatedAnnotationOccurrence,Value()); } +Handle(StepVisual_AnnotationTextOccurrence) StepVisual_DraughtingCalloutElement::AnnotationTextOccurrence() const +{ return GetCasted(StepVisual_AnnotationTextOccurrence, Value()); } diff --git a/src/StepVisual/StepVisual_DraughtingCalloutElement.hxx b/src/StepVisual/StepVisual_DraughtingCalloutElement.hxx index 772c9ad050..d3eb981622 100644 --- a/src/StepVisual/StepVisual_DraughtingCalloutElement.hxx +++ b/src/StepVisual/StepVisual_DraughtingCalloutElement.hxx @@ -24,6 +24,7 @@ #include class Standard_Transient; class StepVisual_AnnotationCurveOccurrence; +class StepVisual_AnnotationTextOccurrence; class StepVisual_TessellatedAnnotationOccurrence; class StepVisual_DraughtingCalloutElement : public StepData_SelectType @@ -37,13 +38,18 @@ public: //! Recognizes a IdAttributeSelect Kind Entity that is : //! 1 -> AnnotationCurveOccurrence + //! 2 -> AnnotationTextOccurrence + //! 3 -> TessellatedAnnotationOccurrence //! 0 else Standard_EXPORT Standard_Integer CaseNum (const Handle(Standard_Transient)& ent) const; //! returns Value as a AnnotationCurveOccurrence (Null if another type) Standard_EXPORT Handle(StepVisual_AnnotationCurveOccurrence) AnnotationCurveOccurrence() const; - //! returns Value as a AnnotationOccurrence for Tesselated Anotation Occurence + //! returns Value as a AnnotationTextOccurrence + Standard_EXPORT Handle(StepVisual_AnnotationTextOccurrence) AnnotationTextOccurrence() const; + + //! returns Value as a TessellatedAnnotationOccurrence Standard_EXPORT Handle(StepVisual_TessellatedAnnotationOccurrence) TessellatedAnnotationOccurrence() const; }; #endif // StepVisual_DraughtingCalloutElement diff --git a/src/StepVisual/StepVisual_InvisibilityContext.cxx b/src/StepVisual/StepVisual_InvisibilityContext.cxx index 2cf598ff38..66ba311e99 100644 --- a/src/StepVisual/StepVisual_InvisibilityContext.cxx +++ b/src/StepVisual/StepVisual_InvisibilityContext.cxx @@ -14,6 +14,7 @@ #include #include +#include #include #include #include @@ -22,10 +23,11 @@ StepVisual_InvisibilityContext::StepVisual_InvisibilityContext () { } Standard_Integer StepVisual_InvisibilityContext::CaseNum(const Handle(Standard_Transient)& ent) const { - if (ent.IsNull()) return 0; - if (ent->IsKind(STANDARD_TYPE(StepVisual_PresentationRepresentation))) return 1; - if (ent->IsKind(STANDARD_TYPE(StepVisual_PresentationSet))) return 2; - return 0; + if (ent.IsNull()) return 0; + if (ent->IsKind(STANDARD_TYPE(StepVisual_PresentationRepresentation))) return 1; + if (ent->IsKind(STANDARD_TYPE(StepVisual_PresentationSet))) return 2; + if (ent->IsKind(STANDARD_TYPE(StepVisual_DraughtingModel))) return 3; + return 0; } Handle(StepVisual_PresentationRepresentation) StepVisual_InvisibilityContext::PresentationRepresentation () const @@ -37,3 +39,8 @@ Handle(StepVisual_PresentationSet) StepVisual_InvisibilityContext::PresentationS { return GetCasted(StepVisual_PresentationSet,Value()); } + +Handle(StepVisual_DraughtingModel) StepVisual_InvisibilityContext::DraughtingModel () const +{ + return GetCasted(StepVisual_DraughtingModel, Value()); +} diff --git a/src/StepVisual/StepVisual_InvisibilityContext.hxx b/src/StepVisual/StepVisual_InvisibilityContext.hxx index 37c5128ac6..ecb619c92a 100644 --- a/src/StepVisual/StepVisual_InvisibilityContext.hxx +++ b/src/StepVisual/StepVisual_InvisibilityContext.hxx @@ -24,6 +24,7 @@ #include #include class Standard_Transient; +class StepVisual_DraughtingModel; class StepVisual_PresentationRepresentation; class StepVisual_PresentationSet; @@ -42,6 +43,7 @@ public: //! Recognizes a InvisibilityContext Kind Entity that is : //! 1 -> PresentationRepresentation //! 2 -> PresentationSet + //! 2 -> DraughtingModel //! 0 else Standard_EXPORT Standard_Integer CaseNum (const Handle(Standard_Transient)& ent) const; @@ -51,6 +53,8 @@ public: //! returns Value as a PresentationSet (Null if another type) Standard_EXPORT Handle(StepVisual_PresentationSet) PresentationSet() const; + //! returns Value as a PresentationSet (Null if another type) + Standard_EXPORT Handle(StepVisual_DraughtingModel) DraughtingModel() const; diff --git a/src/StepVisual/StepVisual_OverRidingStyledItem.cxx b/src/StepVisual/StepVisual_OverRidingStyledItem.cxx index 3bcdfe0839..3cc6f017ee 100644 --- a/src/StepVisual/StepVisual_OverRidingStyledItem.cxx +++ b/src/StepVisual/StepVisual_OverRidingStyledItem.cxx @@ -25,7 +25,7 @@ StepVisual_OverRidingStyledItem::StepVisual_OverRidingStyledItem () {} void StepVisual_OverRidingStyledItem::Init( const Handle(TCollection_HAsciiString)& aName, const Handle(StepVisual_HArray1OfPresentationStyleAssignment)& aStyles, - const Handle(StepRepr_RepresentationItem)& aItem, + const Handle(MMgt_TShared)& aItem, const Handle(StepVisual_StyledItem)& aOverRiddenStyle) { // --- classe own fields --- diff --git a/src/StepVisual/StepVisual_OverRidingStyledItem.hxx b/src/StepVisual/StepVisual_OverRidingStyledItem.hxx index 6f98328f37..3b24879c96 100644 --- a/src/StepVisual/StepVisual_OverRidingStyledItem.hxx +++ b/src/StepVisual/StepVisual_OverRidingStyledItem.hxx @@ -40,7 +40,7 @@ public: //! Returns a OverRidingStyledItem Standard_EXPORT StepVisual_OverRidingStyledItem(); - Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& aName, const Handle(StepVisual_HArray1OfPresentationStyleAssignment)& aStyles, const Handle(StepRepr_RepresentationItem)& aItem, const Handle(StepVisual_StyledItem)& aOverRiddenStyle); + Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& aName, const Handle(StepVisual_HArray1OfPresentationStyleAssignment)& aStyles, const Handle(MMgt_TShared)& aItem, const Handle(StepVisual_StyledItem)& aOverRiddenStyle); Standard_EXPORT void SetOverRiddenStyle (const Handle(StepVisual_StyledItem)& aOverRiddenStyle); diff --git a/src/StepVisual/StepVisual_StyledItem.cxx b/src/StepVisual/StepVisual_StyledItem.cxx index 48f892946b..0f5b85efc3 100644 --- a/src/StepVisual/StepVisual_StyledItem.cxx +++ b/src/StepVisual/StepVisual_StyledItem.cxx @@ -11,11 +11,11 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - #include #include #include #include +#include #include IMPLEMENT_STANDARD_RTTIEXT(StepVisual_StyledItem,StepRepr_RepresentationItem) @@ -23,45 +23,60 @@ IMPLEMENT_STANDARD_RTTIEXT(StepVisual_StyledItem,StepRepr_RepresentationItem) StepVisual_StyledItem::StepVisual_StyledItem () {} void StepVisual_StyledItem::Init( - const Handle(TCollection_HAsciiString)& aName, - const Handle(StepVisual_HArray1OfPresentationStyleAssignment)& aStyles, - const Handle(StepRepr_RepresentationItem)& aItem) + const Handle(TCollection_HAsciiString)& aName, + const Handle(StepVisual_HArray1OfPresentationStyleAssignment)& aStyles, + const Handle(MMgt_TShared)& aItem) { - // --- classe own fields --- - styles = aStyles; - item = aItem; - // --- classe inherited fields --- - StepRepr_RepresentationItem::Init(aName); + // --- classe own fields --- + myStyles = aStyles; + myItem = aItem; + // --- classe inherited fields --- + StepRepr_RepresentationItem::Init(aName); } - void StepVisual_StyledItem::SetStyles(const Handle(StepVisual_HArray1OfPresentationStyleAssignment)& aStyles) { - styles = aStyles; + myStyles = aStyles; } Handle(StepVisual_HArray1OfPresentationStyleAssignment) StepVisual_StyledItem::Styles() const { - return styles; + return myStyles; } Handle(StepVisual_PresentationStyleAssignment) StepVisual_StyledItem::StylesValue(const Standard_Integer num) const { - return styles->Value(num); + return myStyles->Value(num); } Standard_Integer StepVisual_StyledItem::NbStyles () const { - if (styles.IsNull()) return 0; - return styles->Length(); + if (myStyles.IsNull()) return 0; + return myStyles->Length(); } void StepVisual_StyledItem::SetItem(const Handle(StepRepr_RepresentationItem)& aItem) { - item = aItem; + myItem = aItem; +} + +void StepVisual_StyledItem::SetItem(const StepVisual_StyledItemTarget& theItem) +{ + myItem = Handle(MMgt_TShared)::DownCast(theItem.Value()); } Handle(StepRepr_RepresentationItem) StepVisual_StyledItem::Item() const { - return item; + if (myItem->IsKind(STANDARD_TYPE(StepRepr_RepresentationItem))) + return Handle(StepRepr_RepresentationItem)::DownCast(myItem); + else + return NULL; +} + +StepVisual_StyledItemTarget StepVisual_StyledItem::ItemAP242() const +{ + StepVisual_StyledItemTarget anItem; + if (anItem.CaseNum(myItem) > 0) + anItem.SetValue(myItem); + return anItem; } diff --git a/src/StepVisual/StepVisual_StyledItem.hxx b/src/StepVisual/StepVisual_StyledItem.hxx index 8a014f48ec..d201d4d419 100644 --- a/src/StepVisual/StepVisual_StyledItem.hxx +++ b/src/StepVisual/StepVisual_StyledItem.hxx @@ -22,6 +22,7 @@ #include #include +#include #include class StepRepr_RepresentationItem; class TCollection_HAsciiString; @@ -41,7 +42,7 @@ public: //! Returns a StyledItem Standard_EXPORT StepVisual_StyledItem(); - Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& aName, const Handle(StepVisual_HArray1OfPresentationStyleAssignment)& aStyles, const Handle(StepRepr_RepresentationItem)& aItem); + Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& aName, const Handle(StepVisual_HArray1OfPresentationStyleAssignment)& aStyles, const Handle(MMgt_TShared)& aItem); Standard_EXPORT void SetStyles (const Handle(StepVisual_HArray1OfPresentationStyleAssignment)& aStyles); @@ -55,6 +56,9 @@ public: Standard_EXPORT Handle(StepRepr_RepresentationItem) Item() const; + Standard_EXPORT void SetItem (const StepVisual_StyledItemTarget& aItem); + + Standard_EXPORT StepVisual_StyledItemTarget ItemAP242() const; @@ -68,9 +72,9 @@ protected: private: - Handle(StepVisual_HArray1OfPresentationStyleAssignment) styles; - Handle(StepRepr_RepresentationItem) item; - + Handle(StepVisual_HArray1OfPresentationStyleAssignment) myStyles; + // May be StepRepr_RepresentationItem for AP214(203) and StepVisual_StyledItemTarget for AP242 + Handle(MMgt_TShared) myItem; }; diff --git a/src/StepVisual/StepVisual_StyledItemTarget.cxx b/src/StepVisual/StepVisual_StyledItemTarget.cxx new file mode 100644 index 0000000000..4b577bcefb --- /dev/null +++ b/src/StepVisual/StepVisual_StyledItemTarget.cxx @@ -0,0 +1,63 @@ +// Created on: 2016-03-18 +// Created by: Irina KRYLOVA +// Copyright (c) 2016 OPEN CASCADE SAS +// +// 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 + +//======================================================================= +//function : StepVisual_StyledItemTarget +//purpose : +//======================================================================= + +StepVisual_StyledItemTarget::StepVisual_StyledItemTarget () { } + +//======================================================================= +//function : CaseNum +//purpose : +//======================================================================= + +Standard_Integer StepVisual_StyledItemTarget::CaseNum(const Handle(Standard_Transient)& ent) const +{ + if (ent.IsNull()) return 0; + if (ent->IsKind(STANDARD_TYPE(StepGeom_GeometricRepresentationItem))) return 1; + if (ent->IsKind(STANDARD_TYPE(StepRepr_MappedItem))) return 2; + if (ent->IsKind(STANDARD_TYPE(StepRepr_Representation))) return 3; + if (ent->IsKind(STANDARD_TYPE(StepShape_TopologicalRepresentationItem))) return 4; + return 0; +} + +Handle(StepGeom_GeometricRepresentationItem) StepVisual_StyledItemTarget::GeometricRepresentationItem() const +{ + return GetCasted(StepGeom_GeometricRepresentationItem,Value()); +} + +Handle(StepRepr_MappedItem) StepVisual_StyledItemTarget::MappedItem() const +{ + return GetCasted(StepRepr_MappedItem,Value()); +} + +Handle(StepRepr_Representation) StepVisual_StyledItemTarget::Representation() const +{ + return GetCasted(StepRepr_Representation,Value()); +} + +Handle(StepShape_TopologicalRepresentationItem) StepVisual_StyledItemTarget::TopologicalRepresentationItem() const +{ + return GetCasted(StepShape_TopologicalRepresentationItem,Value()); +} diff --git a/src/StepVisual/StepVisual_StyledItemTarget.hxx b/src/StepVisual/StepVisual_StyledItemTarget.hxx new file mode 100644 index 0000000000..90aa1ed84f --- /dev/null +++ b/src/StepVisual/StepVisual_StyledItemTarget.hxx @@ -0,0 +1,61 @@ +// Created on: 2016-03-18 +// Created by: Irina KRYLOVA +// Copyright (c) 2016 OPEN CASCADE SAS +// +// 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 _StepVisual_StyledItemTarget_HeaderFile +#define _StepVisual_StyledItemTarget_HeaderFile + +#include +#include +#include + +#include +#include + +class Standard_Transient; +class StepGeom_GeometricRepresentationItem; +class StepRepr_MappedItem; +class StepRepr_Representation; +class StepShape_TopologicalRepresentationItem; + +class StepVisual_StyledItemTarget : public StepData_SelectType +{ +public: + + DEFINE_STANDARD_ALLOC + + //! Returns a StyledItemTarget select type + Standard_EXPORT StepVisual_StyledItemTarget(); + + //! Recognizes a StyledItemTarget Kind Entity that is : + //! 1 -> GeometricRepresentationItem + //! 2 -> MappedItem + //! 3 -> Representation + //! 4 -> TopologicalRepresentationItem + //! 0 else + Standard_EXPORT Standard_Integer CaseNum (const Handle(Standard_Transient)& ent) const; + + //! returns Value as a GeometricRepresentationItem (Null if another type) + Standard_EXPORT Handle(StepGeom_GeometricRepresentationItem) GeometricRepresentationItem() const; + + //! returns Value as a MappedItem (Null if another type) + Standard_EXPORT Handle(StepRepr_MappedItem) MappedItem() const; + + //! returns Value as a Representation (Null if another type) + Standard_EXPORT Handle(StepRepr_Representation) Representation() const; + + //! returns Value as a TopologicalRepresentationItem (Null if another type) + Standard_EXPORT Handle(StepShape_TopologicalRepresentationItem) TopologicalRepresentationItem() const; +}; +#endif // _StepVisual_StyledItemTarget_HeaderFile diff --git a/tests/gdt/begin b/tests/gdt/begin index 9ecb225779..a23adb9271 100644 --- a/tests/gdt/begin +++ b/tests/gdt/begin @@ -1,2 +1,4 @@ cpulimit 1000 -pload ALL \ No newline at end of file +pload ALL +param write.step.schema 5 +newmodel diff --git a/tests/gdt/end b/tests/gdt/end index e69de29bb2..74b88beb48 100644 --- a/tests/gdt/end +++ b/tests/gdt/end @@ -0,0 +1,2 @@ +param write.step.schema 4 +newmodel