From fe0d928d97e2efcc9da86ef8c47133e3099df1b0 Mon Sep 17 00:00:00 2001 From: ika Date: Fri, 26 Aug 2016 16:10:19 +0300 Subject: [PATCH] 0027807: Units are lost during import presentation of GDT. Add entities to import a subtype of draughting_model, Add units calculating during STEP reading. --- src/RWStepAP214/RWStepAP214_GeneralModule.cxx | 35 ++++-- .../RWStepAP214_ReadWriteModule.cxx | 49 ++++++++ src/RWStepRepr/FILES | 2 + ...StepRepr_RWCharacterizedRepresentation.cxx | 118 ++++++++++++++++++ ...StepRepr_RWCharacterizedRepresentation.hxx | 48 +++++++ src/RWStepVisual/FILES | 2 + ...ionAndDraughtingModelAndRepresentation.cxx | 115 +++++++++++++++++ ...ionAndDraughtingModelAndRepresentation.hxx | 51 ++++++++ src/STEPCAFControl/STEPCAFControl_Reader.cxx | 74 +++++++++-- src/StepAP214/StepAP214_Protocol.cxx | 4 + src/StepRepr/FILES | 2 + .../StepRepr_CharacterizedRepresentation.cxx | 43 +++++++ .../StepRepr_CharacterizedRepresentation.hxx | 60 +++++++++ src/StepVisual/FILES | 2 + ...ionAndDraughtingModelAndRepresentation.cxx | 24 ++++ ...ionAndDraughtingModelAndRepresentation.hxx | 38 ++++++ tests/gdt/presentation/A5 | 10 ++ tests/gdt/presentation/A6 | 10 ++ tests/gdt/presentation/A7 | 10 ++ tests/gdt/presentation/A8 | 10 ++ tests/gdt/presentation/A9 | 8 ++ tests/gdt/presentation/B1 | 8 ++ tests/gdt/presentation/B2 | 10 ++ tests/gdt/presentation/B3 | 8 ++ tests/gdt/presentation/B4 | 8 ++ 25 files changed, 733 insertions(+), 16 deletions(-) create mode 100644 src/RWStepRepr/RWStepRepr_RWCharacterizedRepresentation.cxx create mode 100644 src/RWStepRepr/RWStepRepr_RWCharacterizedRepresentation.hxx create mode 100644 src/RWStepVisual/RWStepVisual_RWCharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation.cxx create mode 100644 src/RWStepVisual/RWStepVisual_RWCharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation.hxx create mode 100644 src/StepRepr/StepRepr_CharacterizedRepresentation.cxx create mode 100644 src/StepRepr/StepRepr_CharacterizedRepresentation.hxx create mode 100644 src/StepVisual/StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation.cxx create mode 100644 src/StepVisual/StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation.hxx create mode 100644 tests/gdt/presentation/A5 create mode 100644 tests/gdt/presentation/A6 create mode 100644 tests/gdt/presentation/A7 create mode 100644 tests/gdt/presentation/A8 create mode 100644 tests/gdt/presentation/A9 create mode 100644 tests/gdt/presentation/B1 create mode 100644 tests/gdt/presentation/B2 create mode 100644 tests/gdt/presentation/B3 create mode 100644 tests/gdt/presentation/B4 diff --git a/src/RWStepAP214/RWStepAP214_GeneralModule.cxx b/src/RWStepAP214/RWStepAP214_GeneralModule.cxx index 34e877f6dd..7cdb5cdd9a 100644 --- a/src/RWStepAP214/RWStepAP214_GeneralModule.cxx +++ b/src/RWStepAP214/RWStepAP214_GeneralModule.cxx @@ -1355,7 +1355,10 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_GeneralModule,StepData_GeneralModule) #include #include #include - +#include +#include +#include +#include static Standard_Integer catsh,catdr,catstr,catdsc,cataux; @@ -5101,6 +5104,20 @@ void RWStepAP214_GeneralModule::FillSharedCase(const Standard_Integer CN, tool.Share(anent,iter); } break; + case 714: + { + DeclareAndCast(StepRepr_CharacterizedRepresentation, anent, ent); + RWStepRepr_RWCharacterizedRepresentation tool; + tool.Share(anent, iter); + } + break; + case 715: + { + DeclareAndCast(StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation, anent, ent); + RWStepVisual_RWCharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation tool; + tool.Share(anent, iter); + } + break; default : break; } } @@ -7068,34 +7085,34 @@ Standard_Boolean RWStepAP214_GeneralModule::NewVoid case 706: ent = new StepDimTol_GeoTolAndGeoTolWthMaxTol; break; - case 707: ent = new StepVisual_TessellatedAnnotationOccurrence; break; - case 708: ent = new StepVisual_TessellatedItem; break; - case 709: ent = new StepVisual_TessellatedGeometricSet; break; - case 710: ent = new StepVisual_TessellatedCurveSet; break; - case 711: ent = new StepVisual_CoordinatesList; break; - case 712: ent = new StepRepr_ConstructiveGeometryRepresentation; break; - case 713: ent = new StepRepr_ConstructiveGeometryRepresentationRelationship; break; + case 714: + ent = new StepRepr_CharacterizedRepresentation; + break; + case 715: + ent = new StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation; + break; + default: return Standard_False; @@ -7689,6 +7706,8 @@ Standard_Integer RWStepAP214_GeneralModule::CategoryNumber case 711: return cataux; case 712: case 713: return catsh; + case 714: return catstr; + case 715: return catdsc; default : break; } diff --git a/src/RWStepAP214/RWStepAP214_ReadWriteModule.cxx b/src/RWStepAP214/RWStepAP214_ReadWriteModule.cxx index 4d018151f1..8a362657ac 100644 --- a/src/RWStepAP214/RWStepAP214_ReadWriteModule.cxx +++ b/src/RWStepAP214/RWStepAP214_ReadWriteModule.cxx @@ -1381,6 +1381,7 @@ Handle(atype) result = Handle(atype)::DownCast (start) #include #include #include +#include #include #include @@ -1389,8 +1390,12 @@ Handle(atype) result = Handle(atype)::DownCast (start) #include #include #include +#include #include #include +#include +#include + // -- General Declarations (Recognize, StepType) --- @@ -2028,6 +2033,7 @@ static TCollection_AsciiString Reco_TessellatedCurveSet("TESSELLATED_CURVE_SET") static TCollection_AsciiString Reco_CoordinatesList("COORDINATES_LIST"); static TCollection_AsciiString Reco_ConstructiveGeometryRepresentation("CONSTRUCTIVE_GEOMETRY_REPRESENTATION"); static TCollection_AsciiString Reco_ConstructiveGeometryRepresentationRelationship("CONSTRUCTIVE_GEOMETRY_REPRESENTATION_RELATIONSHIP"); +static TCollection_AsciiString Reco_CharacterizedRepresentation("CHARACTERIZED_REPRESENTATION"); // -- Definition of the libraries -- static Handle(Dico_DictionaryOfInteger) typenums; @@ -2681,6 +2687,7 @@ RWStepAP214_ReadWriteModule::RWStepAP214_ReadWriteModule () typenums->SetItem ( Reco_CoordinatesList, 711); typenums->SetItem ( Reco_ConstructiveGeometryRepresentation, 712); typenums->SetItem ( Reco_ConstructiveGeometryRepresentationRelationship, 713); + typenums->SetItem ( Reco_CharacterizedRepresentation, 714); // SHORT NAMES @@ -3556,6 +3563,12 @@ Standard_Integer RWStepAP214_ReadWriteModule::CaseStep types(4).IsEqual(StepType(624))))) { return 706; } + else if (types(1).IsEqual(StepType(402)) && + types(2).IsEqual(StepType(714)) && + types(3).IsEqual(StepType(441)) && + types(4).IsEqual(StepType(245))) { + return 715; + } } else if (NbComp == 3) { if ((types(1).IsEqual(StepType(158))) && @@ -3850,6 +3863,8 @@ Standard_Boolean RWStepAP214_ReadWriteModule::IsComplex return Standard_True; case 706: return Standard_True; + case 715: + return Standard_True; default: return Standard_False; } @@ -4504,6 +4519,7 @@ const TCollection_AsciiString& RWStepAP214_ReadWriteModule::StepType case 711 : return Reco_CoordinatesList; case 712 : return Reco_ConstructiveGeometryRepresentation; case 713 : return Reco_ConstructiveGeometryRepresentationRelationship; + case 714 : return Reco_CharacterizedRepresentation; default : return PasReco; } @@ -4813,6 +4829,11 @@ Standard_Boolean RWStepAP214_ReadWriteModule::ComplexType(const Standard_Integer types.Append (StepType(676)); types.Append (StepType(625)); break; + case 715: + types.Append(StepType(402)); + types.Append(StepType(714)); + types.Append(StepType(441)); + types.Append(StepType(245)); } return Standard_True; } @@ -9335,6 +9356,20 @@ void RWStepAP214_ReadWriteModule::ReadStep(const Standard_Integer CN, tool.ReadStep (data,num,ach,anent); } break; + case 714: + { + DeclareAndCast(StepRepr_CharacterizedRepresentation, anent, ent); + RWStepRepr_RWCharacterizedRepresentation tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 715: + { + DeclareAndCast(StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation, anent, ent); + RWStepVisual_RWCharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation tool; + tool.ReadStep(data, num, ach, anent); + } + break; default: ach->AddFail("Type Mismatch when reading - Entity"); @@ -14135,6 +14170,20 @@ void RWStepAP214_ReadWriteModule::WriteStep(const Standard_Integer CN, tool.WriteStep(SW,anent); } break; + case 714: + { + DeclareAndCast(StepRepr_CharacterizedRepresentation, anent, ent); + RWStepRepr_RWCharacterizedRepresentation tool; + tool.WriteStep(SW, anent); + } + break; + case 715: + { + DeclareAndCast(StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation, anent, ent); + RWStepVisual_RWCharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation tool; + tool.WriteStep(SW, anent); + } + break; default: return; diff --git a/src/RWStepRepr/FILES b/src/RWStepRepr/FILES index 62e0204a9f..e1dc12da99 100644 --- a/src/RWStepRepr/FILES +++ b/src/RWStepRepr/FILES @@ -10,6 +10,8 @@ RWStepRepr_RWBetweenShapeAspect.cxx RWStepRepr_RWBetweenShapeAspect.hxx RWStepRepr_RWCentreOfSymmetry.cxx RWStepRepr_RWCentreOfSymmetry.hxx +RWStepRepr_RWCharacterizedRepresentation.cxx +RWStepRepr_RWCharacterizedRepresentation.hxx RWStepRepr_RWCompGroupShAspAndCompShAspAndDatumFeatAndShAsp.cxx RWStepRepr_RWCompGroupShAspAndCompShAspAndDatumFeatAndShAsp.hxx RWStepRepr_RWCompositeGroupShapeAspect.cxx diff --git a/src/RWStepRepr/RWStepRepr_RWCharacterizedRepresentation.cxx b/src/RWStepRepr/RWStepRepr_RWCharacterizedRepresentation.cxx new file mode 100644 index 0000000000..e16bb431c3 --- /dev/null +++ b/src/RWStepRepr/RWStepRepr_RWCharacterizedRepresentation.cxx @@ -0,0 +1,118 @@ +// Created on: 2016-08-25 +// 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 : RWStepRepr_RWCharacterizedRepresentation +//purpose : +//======================================================================= +RWStepRepr_RWCharacterizedRepresentation::RWStepRepr_RWCharacterizedRepresentation () {} + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepRepr_RWCharacterizedRepresentation::ReadStep + (const Handle(StepData_StepReaderData)& data, + const Standard_Integer num, + Handle(Interface_Check)& ach, + const Handle(StepRepr_CharacterizedRepresentation)& ent) const +{ + // Number of Parameter Control + if (!data->CheckNbParams(num, 4, ach, "characterized_representation")) return; + + // name + Handle(TCollection_HAsciiString) aName; + data->ReadString (num, 1, "name", ach, aName); + + // description + Handle(TCollection_HAsciiString) aDescription; + data->ReadString (num, 2, "description", ach, aDescription); + + // items + Handle(StepRepr_HArray1OfRepresentationItem) anItems; + Handle(StepRepr_RepresentationItem) anItem; + Standard_Integer nsub; + if (data->ReadSubList (num, 3, "items", ach, nsub)) { + Standard_Integer nb = data->NbParams(nsub); + anItems = new StepRepr_HArray1OfRepresentationItem (1, nb); + for (Standard_Integer i = 1; i <= nb; i ++) { + if (data->ReadEntity (nsub, i,"representation_item", ach, + STANDARD_TYPE(StepRepr_RepresentationItem), anItem)) + anItems->SetValue(i, anItem); + } + } + + // context_of_items + Handle(StepRepr_RepresentationContext) aContextOfItems; + data->ReadEntity(num, 4, "context_of_items", ach, STANDARD_TYPE(StepRepr_RepresentationContext), aContextOfItems); + + // Initialization of the read entity + ent->Init(aName, aDescription, anItems, aContextOfItems); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepRepr_RWCharacterizedRepresentation::WriteStep + (StepData_StepWriter& SW, + const Handle(StepRepr_CharacterizedRepresentation)& ent) const +{ + // name + SW.Send(ent->Name()); + + // description + if (!ent->Description().IsNull()) + SW.Send(ent->Description()); + else + SW.SendUndef(); + + // items + SW.OpenSub(); + for (Standard_Integer i = 1; i <= ent->NbItems(); i ++) { + SW.Send(ent->ItemsValue(i)); + } + SW.CloseSub(); + + // context_of_items + SW.Send(ent->ContextOfItems()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepRepr_RWCharacterizedRepresentation::Share + (const Handle(StepRepr_CharacterizedRepresentation)& ent, + Interface_EntityIterator& iter) const +{ + Standard_Integer nbElem = ent->NbItems(); + for (Standard_Integer i=1; i <= nbElem; i++) { + iter.GetOneItem(ent->ItemsValue(i)); + } + iter.GetOneItem(ent->ContextOfItems()); +} + diff --git a/src/RWStepRepr/RWStepRepr_RWCharacterizedRepresentation.hxx b/src/RWStepRepr/RWStepRepr_RWCharacterizedRepresentation.hxx new file mode 100644 index 0000000000..6bb160895b --- /dev/null +++ b/src/RWStepRepr/RWStepRepr_RWCharacterizedRepresentation.hxx @@ -0,0 +1,48 @@ +// Created on: 2016-08-25 +// 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 _RWStepRepr_RWCharacterizedRepresentation_HeaderFile +#define _RWStepRepr_RWCharacterizedRepresentation_HeaderFile + +#include +#include +#include + +#include +class StepData_StepReaderData; +class Interface_Check; +class StepRepr_CharacterizedRepresentation; +class StepData_StepWriter; +class Interface_EntityIterator; + + +//! Read & Write Module for CharacterizedRepresentation +class RWStepRepr_RWCharacterizedRepresentation +{ +public: + + DEFINE_STANDARD_ALLOC + + + Standard_EXPORT RWStepRepr_RWCharacterizedRepresentation(); + + Standard_EXPORT void ReadStep (const Handle(StepData_StepReaderData)& data, const Standard_Integer num, Handle(Interface_Check)& ach, const Handle(StepRepr_CharacterizedRepresentation)& ent) const; + + Standard_EXPORT void WriteStep (StepData_StepWriter& SW, const Handle(StepRepr_CharacterizedRepresentation)& ent) const; + + Standard_EXPORT void Share (const Handle(StepRepr_CharacterizedRepresentation)& ent, Interface_EntityIterator& iter) const; +}; + +#endif // _RWStepRepr_RWCharacterizedRepresentation_HeaderFile diff --git a/src/RWStepVisual/FILES b/src/RWStepVisual/FILES index 7208bb7023..059401d1a1 100644 --- a/src/RWStepVisual/FILES +++ b/src/RWStepVisual/FILES @@ -18,6 +18,8 @@ RWStepVisual_RWCameraModelD3.cxx RWStepVisual_RWCameraModelD3.hxx RWStepVisual_RWCameraUsage.cxx RWStepVisual_RWCameraUsage.hxx +RWStepVisual_RWCharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation.cxx +RWStepVisual_RWCharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation.hxx RWStepVisual_RWColour.cxx RWStepVisual_RWColour.hxx RWStepVisual_RWColourRgb.cxx diff --git a/src/RWStepVisual/RWStepVisual_RWCharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation.cxx b/src/RWStepVisual/RWStepVisual_RWCharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation.cxx new file mode 100644 index 0000000000..797356839a --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWCharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation.cxx @@ -0,0 +1,115 @@ +// Created on: 2016-08-25 +// 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 + +//======================================================================= +//function : RWStepVisual_RWChObjAndChReprAndDModelAndRepr +//purpose : +//======================================================================= +RWStepVisual_RWCharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation:: + RWStepVisual_RWCharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation() +{ +} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= + +void RWStepVisual_RWCharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation::ReadStep + (const Handle(StepData_StepReaderData)& data, + const Standard_Integer num0, Handle(Interface_Check)& ach, + const Handle(StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation)& ent) const +{ + Standard_Integer num = 0; + data->NamedForComplex("REPRESENTATION","RPRSNT", num0, num, ach); + if (!data->CheckNbParams(num, 3, ach, "shape_aspect")) return; + + // name + Handle(TCollection_HAsciiString) aName; + data->ReadString(num, 1, "name", ach, aName); + + // items + Handle(StepRepr_HArray1OfRepresentationItem) anItems; + Handle(StepRepr_RepresentationItem) anItem; + Standard_Integer nsub; + if (data->ReadSubList(num, 2, "items", ach, nsub)) { + Standard_Integer nb = data->NbParams(nsub); + anItems = new StepRepr_HArray1OfRepresentationItem(1, nb); + for (Standard_Integer i = 1; i <= nb; i++) { + if (data->ReadEntity(nsub, i, "representation_item", ach, + STANDARD_TYPE(StepRepr_RepresentationItem), anItem)) + anItems->SetValue(i, anItem); + } + } + + // context_of_items + Handle(StepRepr_RepresentationContext) aContextOfItems; + data->ReadEntity(num, 3, "context_of_items", ach, STANDARD_TYPE(StepRepr_RepresentationContext), aContextOfItems); + + // Initialize the entity + ent->Init(aName, anItems, aContextOfItems); +} + + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= + +void RWStepVisual_RWCharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation::WriteStep + (StepData_StepWriter& SW, + const Handle(StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation)& ent) const +{ + SW.StartEntity("CHARACTERIZED_OBJECT"); + SW.SendDerived(); + SW.SendDerived(); + SW.StartEntity("CHARACTERIZED_REPRESENTATION"); + SW.StartEntity("DRAUGHTING_MODEL"); + SW.StartEntity("REPRESENTATION"); + SW.Send(ent->Name()); + SW.OpenSub(); + for (Standard_Integer i = 1; i <= ent->NbItems(); i++) { + SW.Send(ent->ItemsValue(i)); + } + SW.CloseSub(); + SW.Send(ent->ContextOfItems()); +} + + +//======================================================================= +//function : Share +//purpose : +//======================================================================= + +void RWStepVisual_RWCharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation::Share +(const Handle(StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation)& ent, + Interface_EntityIterator& iter) const +{ + Standard_Integer nbElem = ent->NbItems(); + for (Standard_Integer i = 1; i <= nbElem; i++) { + iter.GetOneItem(ent->ItemsValue(i)); + } + iter.GetOneItem(ent->ContextOfItems()); +} diff --git a/src/RWStepVisual/RWStepVisual_RWCharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation.hxx b/src/RWStepVisual/RWStepVisual_RWCharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation.hxx new file mode 100644 index 0000000000..65264c928e --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWCharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation.hxx @@ -0,0 +1,51 @@ +// Created on: 2016-08-25 +// 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 _RWStepVisual_RWCharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation_HeaderFile +#define _RWStepVisual_RWCharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation_HeaderFile + +#include +#include +#include + +#include +class StepData_StepReaderData; +class Interface_Check; +class StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation; +class StepData_StepWriter; +class Interface_EntityIterator; + + +//! Read & Write Module for complex STEP entity Characterized_Object & Characterized_Representation & Draughting_Model & Representation +class RWStepVisual_RWCharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation +{ +public: + + DEFINE_STANDARD_ALLOC + + + Standard_EXPORT RWStepVisual_RWCharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& data, + const Standard_Integer num, Handle(Interface_Check)& ach, + const Handle(StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation)& ent) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& SW, + const Handle(StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation)& ent) const; + + Standard_EXPORT void Share(const Handle(StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation)& ent, + Interface_EntityIterator& iter) const; +}; +#endif // _RRWStepVisual_RWCharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation_HeaderFile diff --git a/src/STEPCAFControl/STEPCAFControl_Reader.cxx b/src/STEPCAFControl/STEPCAFControl_Reader.cxx index eab34c7f47..b5f30d9c52 100644 --- a/src/STEPCAFControl/STEPCAFControl_Reader.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Reader.cxx @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -97,6 +98,8 @@ #include #include #include +#include +#include #include #include #include @@ -174,6 +177,7 @@ #include #include #include +#include #include #include #include @@ -1642,7 +1646,7 @@ Standard_Boolean STEPCAFControl_Reader::ReadSHUOs (const Handle(XSControl_WorkSe //function : GetLengthConversionFactor //purpose : //======================================================================= -static Standard_Boolean GetLengthConversionFactor(Handle(StepBasic_NamedUnit)& NU, +static Standard_Boolean GetLengthConversionFactor(const Handle(StepBasic_NamedUnit)& NU, Standard_Real& afact) { afact=1.; @@ -1667,6 +1671,44 @@ static Standard_Boolean GetLengthConversionFactor(Handle(StepBasic_NamedUnit)& N return Standard_True; } +//======================================================================= +//function : GetLengthConversionFactorFromContext +//purpose : +//======================================================================= +static Standard_Boolean GetLengthConversionFactorFromContext(const Handle(StepRepr_RepresentationContext)& theRC, + Standard_Real& theFact) +{ + theFact = 1; + if (theRC.IsNull()) + return Standard_False; + Handle(StepBasic_ConversionBasedUnitAndLengthUnit) aSiLU; + Handle(StepGeom_GeometricRepresentationContextAndGlobalUnitAssignedContext) aCtx = + Handle(StepGeom_GeometricRepresentationContextAndGlobalUnitAssignedContext)::DownCast(theRC); + if (!aCtx.IsNull()) { + for (Standard_Integer j = 1; j <= aCtx->NbUnits(); j++) { + if (aCtx->UnitsValue(j)->IsKind(STANDARD_TYPE(StepBasic_ConversionBasedUnitAndLengthUnit))) { + aSiLU = Handle(StepBasic_ConversionBasedUnitAndLengthUnit)::DownCast(aCtx->UnitsValue(j)); + break; + } + } + } + if (aSiLU.IsNull()) { + Handle(StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx) aCtx1 = + Handle(StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx)::DownCast(theRC); + if (!aCtx1.IsNull()) { + for (Standard_Integer j = 1; j <= aCtx1->NbUnits(); j++) { + if (aCtx1->UnitsValue(j)->IsKind(STANDARD_TYPE(StepBasic_ConversionBasedUnitAndLengthUnit))) { + aSiLU = Handle(StepBasic_ConversionBasedUnitAndLengthUnit)::DownCast(aCtx1->UnitsValue(j)); + break; + } + } + } + } + if (aSiLU.IsNull()) + return Standard_False; + return GetLengthConversionFactor(aSiLU, theFact); + +} //======================================================================= //function : GetAngleConversionFactor @@ -1753,6 +1795,13 @@ void readAnnotation(const Handle(XSControl_TransferReader)& theTR, if (aDMIA.IsNull() || aDMIA->NbIdentifiedItem() == 0) return; + // calculate units + Handle(StepVisual_DraughtingModel) aDModel = + Handle(StepVisual_DraughtingModel)::DownCast(aDMIA->UsedRepresentation()); + Standard_Real aFact = 1; + if (!aDModel.IsNull()) + GetLengthConversionFactorFromContext(aDModel->ContextOfItems(), aFact); + // retrieve AnnotationPlane Standard_Boolean isHasPlane = Standard_False; gp_Ax2 aPlaneAxes; @@ -1792,7 +1841,7 @@ void readAnnotation(const Handle(XSControl_TransferReader)& theTR, //set location of the annotation plane Handle(TColStd_HArray1OfReal) aLocCoords; Handle(StepGeom_CartesianPoint) aLoc = aA2P3D->Location(); - gp_Pnt aLocPos( aLoc->CoordinatesValue (1), aLoc->CoordinatesValue (2), aLoc->CoordinatesValue (3)); + gp_Pnt aLocPos( aLoc->CoordinatesValue(1) * aFact, aLoc->CoordinatesValue(2) * aFact, aLoc->CoordinatesValue(3) * aFact); aPlaneAxes.SetLocation(aLocPos); isHasPlane = Standard_True; } @@ -1878,7 +1927,7 @@ void readAnnotation(const Handle(XSControl_TransferReader)& theTR, } } } - //case of tesselated entities + //case of tessellated entities else { Handle(StepRepr_RepresentationItem) aTessItem = anItem->Item(); @@ -1921,8 +1970,8 @@ void readAnnotation(const Handle(XSControl_TransferReader)& theTR, Standard_Integer indnext = anIndexes->Value(n + 1); if( ind > aPoints->Length() || indnext > aPoints->Length()) continue; - gp_Pnt aP1(aPoints->Value(ind)); - gp_Pnt aP2(aPoints->Value(indnext)); + gp_Pnt aP1(aPoints->Value(ind) * aFact); + gp_Pnt aP2(aPoints->Value(indnext) * aFact); BRepBuilderAPI_MakeEdge aMaker(aP1, aP2); if( aMaker.IsDone()) { @@ -1995,6 +2044,15 @@ void readConnectionPoints(const Handle(XSControl_TransferReader)& theTR, { Handle(Transfer_TransientProcess) aTP = theTR->TransientProcess(); const Interface_Graph& aGraph = aTP->Graph(); + + //calculate units + Standard_Real aFact = 1; + Handle(StepShape_ShapeDimensionRepresentation) aSDR = NULL; + for (Interface_EntityIterator anIt = aGraph.Sharings(theGDT); aSDR.IsNull() && anIt.More(); anIt.Next()) { + aSDR = Handle(StepShape_ShapeDimensionRepresentation)::DownCast(anIt.Value()); + } + if (!aSDR.IsNull()) + GetLengthConversionFactorFromContext(aSDR->ContextOfItems(), aFact); if (theGDT->IsKind(STANDARD_TYPE(StepShape_DimensionalSize))) { // retrieve derived geometry @@ -2019,7 +2077,7 @@ void readConnectionPoints(const Handle(XSControl_TransferReader)& theTR, } // set connection point to object - gp_Pnt aPnt(aPoint->CoordinatesValue(1), aPoint->CoordinatesValue(2), aPoint->CoordinatesValue(3)); + gp_Pnt aPnt(aPoint->CoordinatesValue(1) * aFact, aPoint->CoordinatesValue(2) * aFact, aPoint->CoordinatesValue(3) * aFact); theDimObject->SetPoint(aPnt); } else if (theGDT->IsKind(STANDARD_TYPE(StepShape_DimensionalLocation))) { @@ -2053,7 +2111,7 @@ void readConnectionPoints(const Handle(XSControl_TransferReader)& theTR, } if (!aPoint.IsNull()) { // set connection point to object - gp_Pnt aPnt(aPoint->CoordinatesValue(1), aPoint->CoordinatesValue(2), aPoint->CoordinatesValue(3)); + gp_Pnt aPnt(aPoint->CoordinatesValue(1) * aFact, aPoint->CoordinatesValue(2) * aFact, aPoint->CoordinatesValue(3) * aFact); theDimObject->SetPoint(aPnt); } } @@ -2069,7 +2127,7 @@ void readConnectionPoints(const Handle(XSControl_TransferReader)& theTR, } if (!aPoint.IsNull()) { // set connection point to object - gp_Pnt aPnt(aPoint->CoordinatesValue(1), aPoint->CoordinatesValue(2), aPoint->CoordinatesValue(3)); + gp_Pnt aPnt(aPoint->CoordinatesValue(1) * aFact, aPoint->CoordinatesValue(2) * aFact, aPoint->CoordinatesValue(3) * aFact); theDimObject->SetPoint2(aPnt); } } diff --git a/src/StepAP214/StepAP214_Protocol.cxx b/src/StepAP214/StepAP214_Protocol.cxx index 54a91d3293..da1074cac4 100644 --- a/src/StepAP214/StepAP214_Protocol.cxx +++ b/src/StepAP214/StepAP214_Protocol.cxx @@ -739,8 +739,10 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI #include #include #include +#include #include #include +#include static int init = 0; static Interface_DataMapOfTransientInteger types(800); @@ -1442,6 +1444,8 @@ StepAP214_Protocol::StepAP214_Protocol () types.Bind (STANDARD_TYPE(StepVisual_CoordinatesList), 711); types.Bind (STANDARD_TYPE(StepRepr_ConstructiveGeometryRepresentation), 712); types.Bind (STANDARD_TYPE(StepRepr_ConstructiveGeometryRepresentationRelationship), 713); + types.Bind (STANDARD_TYPE(StepRepr_CharacterizedRepresentation), 714); + types.Bind (STANDARD_TYPE(StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation), 715); } diff --git a/src/StepRepr/FILES b/src/StepRepr/FILES index 1b3d6d14c5..39c589d91e 100644 --- a/src/StepRepr/FILES +++ b/src/StepRepr/FILES @@ -16,6 +16,8 @@ StepRepr_CentreOfSymmetry.cxx StepRepr_CentreOfSymmetry.hxx StepRepr_CharacterizedDefinition.cxx StepRepr_CharacterizedDefinition.hxx +StepRepr_CharacterizedRepresentation.cxx +StepRepr_CharacterizedRepresentation.hxx StepRepr_CompGroupShAspAndCompShAspAndDatumFeatAndShAsp.cxx StepRepr_CompGroupShAspAndCompShAspAndDatumFeatAndShAsp.hxx StepRepr_CompositeGroupShapeAspect.cxx diff --git a/src/StepRepr/StepRepr_CharacterizedRepresentation.cxx b/src/StepRepr/StepRepr_CharacterizedRepresentation.cxx new file mode 100644 index 0000000000..999edc4872 --- /dev/null +++ b/src/StepRepr/StepRepr_CharacterizedRepresentation.cxx @@ -0,0 +1,43 @@ +// Created on: 2016-08-25 +// 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 + +IMPLEMENT_STANDARD_RTTIEXT(StepRepr_CharacterizedRepresentation, StepRepr_Representation) + +//======================================================================= +//function : StepRepr_CharacterizedRepresentation +//purpose : +//======================================================================= +StepRepr_CharacterizedRepresentation::StepRepr_CharacterizedRepresentation () {} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepRepr_CharacterizedRepresentation::Init + (const Handle(TCollection_HAsciiString)& theName, + const Handle(TCollection_HAsciiString)& theDescription, + const Handle(StepRepr_HArray1OfRepresentationItem)& theItems, + const Handle(StepRepr_RepresentationContext)& theContextOfItems) +{ + myDescription = theDescription; + StepRepr_Representation::Init(theName, theItems, theContextOfItems); +} diff --git a/src/StepRepr/StepRepr_CharacterizedRepresentation.hxx b/src/StepRepr/StepRepr_CharacterizedRepresentation.hxx new file mode 100644 index 0000000000..84aeae0de1 --- /dev/null +++ b/src/StepRepr/StepRepr_CharacterizedRepresentation.hxx @@ -0,0 +1,60 @@ +// Created on: 2016-08-25 +// 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 _StepRepr_CharacterizedRepresentation_HeaderFile +#define _StepRepr_CharacterizedRepresentation_HeaderFile + +#include +#include + +#include +class TCollection_HAsciiString; +class StepRepr_RepresentationContext; +class StepRepr_RepresentationItem; + + +class StepRepr_CharacterizedRepresentation; +DEFINE_STANDARD_HANDLE(StepRepr_CharacterizedRepresentation, StepRepr_Representation) + + +class StepRepr_CharacterizedRepresentation : public StepRepr_Representation +{ + +public: + + Standard_EXPORT StepRepr_CharacterizedRepresentation(); + + //! Returns a CharacterizedRepresentation + Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& theName, + const Handle(TCollection_HAsciiString)& theDescription, + const Handle(StepRepr_HArray1OfRepresentationItem)& theItems, + const Handle(StepRepr_RepresentationContext)& theContextOfItems); + + Standard_EXPORT void SetDescription (const Handle(TCollection_HAsciiString)& theDescription) { + myDescription = theDescription; + } + + Standard_EXPORT Handle(TCollection_HAsciiString) Description() const { + return myDescription; + } + + DEFINE_STANDARD_RTTIEXT(StepRepr_CharacterizedRepresentation, StepRepr_Representation) + +private: + + Handle(TCollection_HAsciiString) myDescription; + +}; +#endif // _StepRepr_CharacterizedRepresentation_HeaderFile diff --git a/src/StepVisual/FILES b/src/StepVisual/FILES index c4e377f6db..9de42462ec 100644 --- a/src/StepVisual/FILES +++ b/src/StepVisual/FILES @@ -46,6 +46,8 @@ StepVisual_CameraModelD3.hxx StepVisual_CameraUsage.cxx StepVisual_CameraUsage.hxx StepVisual_CentralOrParallel.hxx +StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation.cxx +StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation.hxx StepVisual_Colour.cxx StepVisual_Colour.hxx StepVisual_ColourRgb.cxx diff --git a/src/StepVisual/StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation.cxx b/src/StepVisual/StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation.cxx new file mode 100644 index 0000000000..210f7bfbbe --- /dev/null +++ b/src/StepVisual/StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation.cxx @@ -0,0 +1,24 @@ +// Created on: 2016-08-25 +// 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 + +IMPLEMENT_STANDARD_RTTIEXT(StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation, StepVisual_DraughtingModel) + +//======================================================================= +//function : StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation +//purpose : +//======================================================================= +StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation::StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation() { } diff --git a/src/StepVisual/StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation.hxx b/src/StepVisual/StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation.hxx new file mode 100644 index 0000000000..d8df7d28c6 --- /dev/null +++ b/src/StepVisual/StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation.hxx @@ -0,0 +1,38 @@ +// Created on: 2016-08-25 +// 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_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation_HeaderFile +#define _StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation_HeaderFile + +#include +#include + +#include + +class StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation; +DEFINE_STANDARD_HANDLE(StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation, StepVisual_DraughtingModel) +//! Added for Dimensional Tolerances +//! Complex STEP entity Characterized_Object & Characterized_Representation & Draughting_Model & Representation +class StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation : public StepVisual_DraughtingModel +{ + +public: + + Standard_EXPORT StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation(); + + DEFINE_STANDARD_RTTIEXT(CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation, StepVisual_DraughtingModel) + +}; +#endif // _StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation_HeaderFile diff --git a/tests/gdt/presentation/A5 b/tests/gdt/presentation/A5 new file mode 100644 index 0000000000..8665be418d --- /dev/null +++ b/tests/gdt/presentation/A5 @@ -0,0 +1,10 @@ +# !!!! This file is generated automatically, do not edit manually! See end script +set filename bug27645_nist_ftc_06_asme1_cr3000_rd.prt.stp +puts "TODO CR27235 ALL:Error : 4 differences with reference data found :" +puts "TODO CR27235 ALL:Error on writing file" + +set ref_data { +Centre of mass: 571.08730967855467 2205.0751810551806 -1537.7275040606771 +Mass: 535373.51735687314 + +} diff --git a/tests/gdt/presentation/A6 b/tests/gdt/presentation/A6 new file mode 100644 index 0000000000..7b96aaa1c2 --- /dev/null +++ b/tests/gdt/presentation/A6 @@ -0,0 +1,10 @@ +# !!!! This file is generated automatically, do not edit manually! See end script +set filename bug27645_nist_ftc_06_asme1_ct5240_rd.stp +puts "TODO CR27235 ALL:Error : 4 differences with reference data found :" +puts "TODO CR27235 ALL:Error on writing file" + +set ref_data { +Centre of mass: 1.2441670631221204 66.716892937106863 -65.116654400171385 +Mass: 21888.331129713944 + +} diff --git a/tests/gdt/presentation/A7 b/tests/gdt/presentation/A7 new file mode 100644 index 0000000000..cc25eb338c --- /dev/null +++ b/tests/gdt/presentation/A7 @@ -0,0 +1,10 @@ +# !!!! This file is generated automatically, do not edit manually! See end script +set filename bug27645_nist_ftc_06_asme1_ct5240_rd-1.stp +puts "TODO CR27235 ALL:Error : 4 differences with reference data found :" +puts "TODO CR27235 ALL:Error on writing file" + +set ref_data { +Centre of mass: 31.601843403303537 1694.6090806025425 -1653.9630217643687 +Mass: 555963.61069472972 + +} diff --git a/tests/gdt/presentation/A8 b/tests/gdt/presentation/A8 new file mode 100644 index 0000000000..fdd328bf66 --- /dev/null +++ b/tests/gdt/presentation/A8 @@ -0,0 +1,10 @@ +# !!!! This file is generated automatically, do not edit manually! See end script +set filename bug27645_nist_ftc_08_asme1_cr3000_rc.prt.stp +puts "TODO CR27235 ALL:Error : 4 differences with reference data found :" +puts "TODO CR27235 ALL:Error on writing file" + +set ref_data { +Centre of mass: 1104.9937982009856 239.05520712068363 1053.1493316328786 +Mass: 707651.56598301406 + +} diff --git a/tests/gdt/presentation/A9 b/tests/gdt/presentation/A9 new file mode 100644 index 0000000000..91b1a96a29 --- /dev/null +++ b/tests/gdt/presentation/A9 @@ -0,0 +1,8 @@ +# !!!! This file is generated automatically, do not edit manually! See end script +set filename bug27645_nist_ftc_08_asme1_ct5240_rc.stp + +set ref_data { +Centre of mass: 45.768141003733746 46.547197794287811 34.003050733925484 +Mass: 21424.556049917097 + +} diff --git a/tests/gdt/presentation/B1 b/tests/gdt/presentation/B1 new file mode 100644 index 0000000000..124e7966a7 --- /dev/null +++ b/tests/gdt/presentation/B1 @@ -0,0 +1,8 @@ +# !!!! This file is generated automatically, do not edit manually! See end script +set filename bug27645_nist_ftc_08_asme1_ct5240_rc-1.stp + +set ref_data { +Centre of mass: 1162.5107814948756 1182.2988239749477 863.67748864175542 +Mass: 544183.72366787971 + +} diff --git a/tests/gdt/presentation/B2 b/tests/gdt/presentation/B2 new file mode 100644 index 0000000000..b8552a468c --- /dev/null +++ b/tests/gdt/presentation/B2 @@ -0,0 +1,10 @@ +# !!!! This file is generated automatically, do not edit manually! See end script +set filename bug27645_nist_ftc_09_asme1_cr3000_rd.prt.stp +puts "TODO CR27235 ALL:Error : 4 differences with reference data found :" +puts "TODO CR27235 ALL:Error on writing file" + +set ref_data { +Centre of mass: 502.07157406480525 128.63296443659232 -279.83117556867592 +Mass: 480992.45347041014 + +} diff --git a/tests/gdt/presentation/B3 b/tests/gdt/presentation/B3 new file mode 100644 index 0000000000..9c8a7a45ef --- /dev/null +++ b/tests/gdt/presentation/B3 @@ -0,0 +1,8 @@ +# !!!! This file is generated automatically, do not edit manually! See end script +set filename bug27645_nist_ftc_09_asme1_ct5240_rd.stp + +set ref_data { +Centre of mass: -21.689685614183912 7.533923731961659 -1.9615575977866939 +Mass: 22433.616210032662 + +} diff --git a/tests/gdt/presentation/B4 b/tests/gdt/presentation/B4 new file mode 100644 index 0000000000..eaca02f090 --- /dev/null +++ b/tests/gdt/presentation/B4 @@ -0,0 +1,8 @@ +# !!!! This file is generated automatically, do not edit manually! See end script +set filename bug27645_nist_ftc_09_asme1_ct5240_rd-1.stp + +set ref_data { +Centre of mass: -550.91801460026238 191.36166279182876 -49.823562983782956 +Mass: 569813.85173483356 + +}