0027455: Implementation of connection points
authorika <ika@opencascade.com>
Mon, 25 Apr 2016 06:51:57 +0000 (09:51 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 12 May 2016 07:30:09 +0000 (10:30 +0300)
Add Import/Export connection points.
Make some improvements in STEP reading in collections shapes, to which dimension is attached.
Update tests.

23 files changed:
src/RWStepAP214/RWStepAP214_GeneralModule.cxx
src/RWStepAP214/RWStepAP214_ReadWriteModule.cxx
src/RWStepRepr/FILES
src/RWStepRepr/RWStepRepr_RWConstructiveGeometryRepresentation.cxx [new file with mode: 0644]
src/RWStepRepr/RWStepRepr_RWConstructiveGeometryRepresentation.hxx [new file with mode: 0644]
src/RWStepRepr/RWStepRepr_RWConstructiveGeometryRepresentationRelationship.cxx [new file with mode: 0644]
src/RWStepRepr/RWStepRepr_RWConstructiveGeometryRepresentationRelationship.hxx [new file with mode: 0644]
src/STEPCAFControl/STEPCAFControl_Reader.cxx
src/STEPCAFControl/STEPCAFControl_Writer.cxx
src/StepAP214/StepAP214_Protocol.cxx
src/StepRepr/FILES
src/StepRepr/StepRepr_ConstructiveGeometryRepresentation.cxx [new file with mode: 0644]
src/StepRepr/StepRepr_ConstructiveGeometryRepresentation.hxx [new file with mode: 0644]
src/StepRepr/StepRepr_ConstructiveGeometryRepresentationRelationship.cxx [new file with mode: 0644]
src/StepRepr/StepRepr_ConstructiveGeometryRepresentationRelationship.hxx [new file with mode: 0644]
src/XCAFDimTolObjects/XCAFDimTolObjects_DimensionObject.cxx
src/XCAFDimTolObjects/XCAFDimTolObjects_DimensionObject.hxx
src/XCAFDoc/XCAFDoc_Dimension.cxx
src/XDEDRAW/XDEDRAW_GDTs.cxx
tests/gdt/dimensions/A9 [new file with mode: 0644]
tests/gdt/export/A4
tests/gdt/import/A4
tests/gdt/presentation/A3

index b7baa69..34e877f 100644 (file)
 #include <RWStepRepr_RWCompoundRepresentationItem.hxx>
 #include <RWStepRepr_RWConfigurationDesign.hxx>
 #include <RWStepRepr_RWConfigurationEffectivity.hxx>
+#include <RWStepRepr_RWConstructiveGeometryRepresentation.hxx>
+#include <RWStepRepr_RWConstructiveGeometryRepresentationRelationship.hxx>
 #include <RWStepRepr_RWDataEnvironment.hxx>
 #include <RWStepRepr_RWDefinitionalRepresentation.hxx>
 #include <RWStepRepr_RWDerivedShapeAspect.hxx>
 #include <StepRepr_CompoundRepresentationItem.hxx>
 #include <StepRepr_ConfigurationDesign.hxx>
 #include <StepRepr_ConfigurationEffectivity.hxx>
+#include <StepRepr_ConstructiveGeometryRepresentation.hxx>
+#include <StepRepr_ConstructiveGeometryRepresentationRelationship.hxx>
 #include <StepRepr_DataEnvironment.hxx>
 #include <StepRepr_DefinitionalRepresentation.hxx>
 #include <StepRepr_DerivedShapeAspect.hxx>
@@ -5083,6 +5087,20 @@ void RWStepAP214_GeneralModule::FillSharedCase(const Standard_Integer CN,
       tool.Share(anent,iter);
     }
     break;
+  case 712:
+    {
+      DeclareAndCast(StepRepr_ConstructiveGeometryRepresentation,anent,ent);
+      RWStepRepr_RWConstructiveGeometryRepresentation tool;
+      tool.Share(anent,iter);
+    }
+    break;
+  case 713:
+    {
+      DeclareAndCast(StepRepr_ConstructiveGeometryRepresentationRelationship,anent,ent);
+      RWStepRepr_RWConstructiveGeometryRepresentationRelationship tool;
+      tool.Share(anent,iter);
+    }
+    break;
     default : break;
     }
 }
@@ -7059,17 +7077,25 @@ Standard_Boolean RWStepAP214_GeneralModule::NewVoid
      ent = new StepVisual_TessellatedItem;     
     break;
 
-     case 709:
-       ent = new StepVisual_TessellatedGeometricSet;
-     break;
+   case 709:
+     ent = new StepVisual_TessellatedGeometricSet;
+   break;
 
-     case 710:
-       ent = new StepVisual_TessellatedCurveSet;
-     break;
-    
-      case 711:
-          ent = new StepVisual_CoordinatesList;
-      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;
     
   default: 
     return Standard_False;
@@ -7660,8 +7686,9 @@ Standard_Integer  RWStepAP214_GeneralModule::CategoryNumber
   case 708: 
   case 709:
   case 710:
-  case 711: 
-    return cataux;
+  case 711: return cataux;
+  case 712:
+  case 713: return catsh;
     
   default : break;
   }
index 06a6208..4d01815 100644 (file)
@@ -1381,12 +1381,16 @@ Handle(atype) result = Handle(atype)::DownCast (start)
 #include <StepVisual_TessellatedGeometricSet.hxx>
 #include <StepVisual_TessellatedCurveSet.hxx>
 #include <StepVisual_CoordinatesList.hxx>
+#include <StepRepr_ConstructiveGeometryRepresentation.hxx>
+#include <StepRepr_ConstructiveGeometryRepresentationRelationship.hxx>
 
 #include <RWStepVisual_RWTessellatedAnnotationOccurrence.hxx>
 #include <RWStepVisual_RWTessellatedItem.hxx>
 #include <RWStepVisual_RWTessellatedGeometricSet.hxx>
 #include <RWStepVisual_RWTessellatedCurveSet.hxx>
 #include <RWStepVisual_RWCoordinatesList.hxx>
+#include <RWStepRepr_RWConstructiveGeometryRepresentation.hxx>
+#include <RWStepRepr_RWConstructiveGeometryRepresentationRelationship.hxx>
 
 // -- General Declarations (Recognize, StepType) ---
 
@@ -2022,6 +2026,8 @@ static TCollection_AsciiString Reco_TessellatedAnnotationOccurrence("TESSELLATED
 static TCollection_AsciiString Reco_TessellatedGeometricSet("TESSELLATED_GEOMETRIC_SET");
 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");
 // -- Definition of the libraries --
 
 static Handle(Dico_DictionaryOfInteger) typenums;
@@ -2673,6 +2679,8 @@ RWStepAP214_ReadWriteModule::RWStepAP214_ReadWriteModule ()
 
   typenums->SetItem ( Reco_TessellatedCurveSet, 710);
   typenums->SetItem ( Reco_CoordinatesList, 711);
+  typenums->SetItem ( Reco_ConstructiveGeometryRepresentation, 712);
+  typenums->SetItem ( Reco_ConstructiveGeometryRepresentationRelationship, 713);
 
   
 //    SHORT NAMES
@@ -3214,6 +3222,8 @@ RWStepAP214_ReadWriteModule::RWStepAP214_ReadWriteModule ()
   typeshor->SetItem ("VLRPIT",701);
   typeshor->SetItem ("DMIA", 703);
   typeshor->SetItem ("ANNPLN", 704);
+  typeshor->SetItem ("CNGMRP", 712);
+  typeshor->SetItem ("CGRR", 713);
     
 }
 
@@ -4492,6 +4502,8 @@ const TCollection_AsciiString& RWStepAP214_ReadWriteModule::StepType
 
   case 710 : return Reco_TessellatedCurveSet;
   case 711 : return Reco_CoordinatesList;
+  case 712 : return Reco_ConstructiveGeometryRepresentation;
+  case 713 : return Reco_ConstructiveGeometryRepresentationRelationship;
 
   default : return PasReco;
   }
@@ -9309,6 +9321,20 @@ void RWStepAP214_ReadWriteModule::ReadStep(const Standard_Integer CN,
       tool.ReadStep (data,num,ach,anent);
     }
     break;
+     case 712:
+    {
+      DeclareAndCast(StepRepr_ConstructiveGeometryRepresentation,anent,ent);
+      RWStepRepr_RWConstructiveGeometryRepresentation tool;
+      tool.ReadStep (data,num,ach,anent);
+    }
+    break;
+     case 713:
+    {
+      DeclareAndCast(StepRepr_ConstructiveGeometryRepresentationRelationship,anent,ent);
+      RWStepRepr_RWConstructiveGeometryRepresentationRelationship tool;
+      tool.ReadStep (data,num,ach,anent);
+    }
+    break;
 
   default: 
     ach->AddFail("Type Mismatch when reading - Entity");
@@ -14093,7 +14119,20 @@ void RWStepAP214_ReadWriteModule::WriteStep(const Standard_Integer CN,
       DeclareAndCast(StepVisual_CoordinatesList,anent,ent);
       RWStepVisual_RWCoordinatesList tool;
       tool.WriteStep(SW,anent);
-     
+    }
+    break;
+      case 712:
+    {
+      DeclareAndCast(StepRepr_ConstructiveGeometryRepresentation,anent,ent);
+      RWStepRepr_RWConstructiveGeometryRepresentation tool;
+      tool.WriteStep(SW,anent);
+    }
+    break;
+      case 713:
+    {
+      DeclareAndCast(StepRepr_ConstructiveGeometryRepresentationRelationship,anent,ent);
+      RWStepRepr_RWConstructiveGeometryRepresentationRelationship tool;
+      tool.WriteStep(SW,anent);
     }
     break;
 
index 55feba9..62e0204 100644 (file)
@@ -26,6 +26,10 @@ RWStepRepr_RWConfigurationEffectivity.cxx
 RWStepRepr_RWConfigurationEffectivity.hxx
 RWStepRepr_RWConfigurationItem.cxx
 RWStepRepr_RWConfigurationItem.hxx
+RWStepRepr_RWConstructiveGeometryRepresentation.cxx
+RWStepRepr_RWConstructiveGeometryRepresentation.hxx
+RWStepRepr_RWConstructiveGeometryRepresentationRelationship.cxx
+RWStepRepr_RWConstructiveGeometryRepresentationRelationship.hxx
 RWStepRepr_RWContinuosShapeAspect.cxx
 RWStepRepr_RWContinuosShapeAspect.hxx
 RWStepRepr_RWDataEnvironment.cxx
diff --git a/src/RWStepRepr/RWStepRepr_RWConstructiveGeometryRepresentation.cxx b/src/RWStepRepr/RWStepRepr_RWConstructiveGeometryRepresentation.cxx
new file mode 100644 (file)
index 0000000..9126694
--- /dev/null
@@ -0,0 +1,106 @@
+// Created on: 2016-04-26
+// 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 <Interface_Check.hxx>
+#include <Interface_EntityIterator.hxx>
+#include <RWStepRepr_RWConstructiveGeometryRepresentation.hxx>
+#include <StepData_StepReaderData.hxx>
+#include <StepData_StepWriter.hxx>
+#include <StepRepr_HArray1OfRepresentationItem.hxx>
+#include <StepRepr_RepresentationContext.hxx>
+#include <StepRepr_RepresentationItem.hxx>
+#include <StepRepr_ConstructiveGeometryRepresentation.hxx>
+
+//=======================================================================
+//function : RWStepRepr_RWConstructiveGeometryRepresentation
+//purpose  : 
+//=======================================================================
+RWStepRepr_RWConstructiveGeometryRepresentation::RWStepRepr_RWConstructiveGeometryRepresentation () {}
+
+//=======================================================================
+//function : ReadStep
+//purpose  : 
+//=======================================================================
+void RWStepRepr_RWConstructiveGeometryRepresentation::ReadStep
+  (const Handle(StepData_StepReaderData)& data,
+   const Standard_Integer num,
+   Handle(Interface_Check)& ach,
+   const Handle(StepRepr_ConstructiveGeometryRepresentation)& ent) const
+{
+  // Number of Parameter Control
+  if (!data->CheckNbParams(num, 3, ach, "constructive_geometry_representation")) return;
+
+  // Inherited field : name
+  Handle(TCollection_HAsciiString) aName;
+  data->ReadString (num, 1, "name" ,ach, aName);
+
+  // Inherited field : items
+  Handle(StepRepr_HArray1OfRepresentationItem) aItems;
+  Handle(StepRepr_RepresentationItem) anEnt;
+  Standard_Integer nsub;
+  if (data->ReadSubList (num, 2, "items", ach, nsub)) {
+    Standard_Integer nb = data->NbParams(nsub);
+    aItems = 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), anEnt))
+        aItems->SetValue(i, anEnt);
+    }
+  }
+
+  // Inherited field : context_of_items
+  Handle(StepRepr_RepresentationContext) aContextOfItems;
+  data->ReadEntity(num, 3,"context_of_items", ach, STANDARD_TYPE(StepRepr_RepresentationContext), aContextOfItems);
+
+  // Initialisation of the read entity
+  ent->Init(aName, aItems, aContextOfItems);
+}
+
+//=======================================================================
+//function : WriteStep
+//purpose  : 
+//=======================================================================
+void RWStepRepr_RWConstructiveGeometryRepresentation::WriteStep
+  (StepData_StepWriter& SW,
+   const Handle(StepRepr_ConstructiveGeometryRepresentation)& ent) const
+{
+  // Inherited field : name
+  SW.Send(ent->Name());
+
+  // Inherited field : items
+  SW.OpenSub();
+  for (Standard_Integer i = 1;  i <= ent->NbItems();  i++) {
+    SW.Send(ent->ItemsValue(i));
+  }
+  SW.CloseSub();
+
+  // Inherited field : context_of_items
+  SW.Send(ent->ContextOfItems());
+}
+
+//=======================================================================
+//function : Share
+//purpose  : 
+//=======================================================================
+void RWStepRepr_RWConstructiveGeometryRepresentation::Share(const Handle(StepRepr_ConstructiveGeometryRepresentation)& 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_RWConstructiveGeometryRepresentation.hxx b/src/RWStepRepr/RWStepRepr_RWConstructiveGeometryRepresentation.hxx
new file mode 100644 (file)
index 0000000..d33a609
--- /dev/null
@@ -0,0 +1,48 @@
+// Created on: 2016-04-26
+// Created on: 2016-04-26
+// 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_RWConstructiveGeometryRepresentation_HeaderFile
+#define _RWStepRepr_RWConstructiveGeometryRepresentation_HeaderFile
+
+#include <Standard.hxx>
+#include <Standard_DefineAlloc.hxx>
+#include <Standard_Handle.hxx>
+
+#include <Standard_Integer.hxx>
+class StepData_StepReaderData;
+class Interface_Check;
+class StepRepr_ConstructiveGeometryRepresentation;
+class StepData_StepWriter;
+class Interface_EntityIterator;
+
+
+//! Read & Write Module for ConstructiveGeometryRepresentation
+class RWStepRepr_RWConstructiveGeometryRepresentation 
+{
+public:
+
+  DEFINE_STANDARD_ALLOC
+
+  Standard_EXPORT RWStepRepr_RWConstructiveGeometryRepresentation();
+  
+  Standard_EXPORT void ReadStep (const Handle(StepData_StepReaderData)& data, const Standard_Integer num, Handle(Interface_Check)& ach, const Handle(StepRepr_ConstructiveGeometryRepresentation)& ent) const;
+  
+  Standard_EXPORT void WriteStep (StepData_StepWriter& SW, const Handle(StepRepr_ConstructiveGeometryRepresentation)& ent) const;
+  
+  Standard_EXPORT void Share (const Handle(StepRepr_ConstructiveGeometryRepresentation)& ent, Interface_EntityIterator& iter) const;
+
+};
+#endif // _RWStepRepr_RWConstructiveGeometryRepresentation_HeaderFile
diff --git a/src/RWStepRepr/RWStepRepr_RWConstructiveGeometryRepresentationRelationship.cxx b/src/RWStepRepr/RWStepRepr_RWConstructiveGeometryRepresentationRelationship.cxx
new file mode 100644 (file)
index 0000000..e392caf
--- /dev/null
@@ -0,0 +1,80 @@
+// Created on: 2016-04-26
+// 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 <Interface_Check.hxx>
+#include <Interface_EntityIterator.hxx>
+#include <RWStepRepr_RWConstructiveGeometryRepresentationRelationship.hxx>
+#include <StepData_StepReaderData.hxx>
+#include <StepData_StepWriter.hxx>
+#include <StepRepr_ConstructiveGeometryRepresentation.hxx>
+#include <StepRepr_ConstructiveGeometryRepresentationRelationship.hxx>
+
+RWStepRepr_RWConstructiveGeometryRepresentationRelationship::
+  RWStepRepr_RWConstructiveGeometryRepresentationRelationship () {}
+
+void RWStepRepr_RWConstructiveGeometryRepresentationRelationship::ReadStep
+  (const Handle(StepData_StepReaderData)& data,
+   const Standard_Integer num,
+   Handle(Interface_Check)& ach,
+   const Handle(StepRepr_ConstructiveGeometryRepresentationRelationship)& ent) const
+{
+  // Number of Parameter Control
+  if (!data->CheckNbParams(num, 4, ach, "constructive_geometry_representation_relationship")) return;
+
+  // Inherited field : name
+  Handle(TCollection_HAsciiString) aName;
+  data->ReadString (num, 1, "name" ,ach, aName);
+
+  // Inherited field : description
+  Handle(TCollection_HAsciiString) aDescription;
+  if (data->IsParamDefined (num, 2)) {
+    data->ReadString (num, 2, "description", ach, aDescription);
+  }
+  // Inherited field : rep_1
+  Handle(StepRepr_Representation) aRep1;
+  data->ReadEntity(num, 3, "rep_1", ach, STANDARD_TYPE(StepRepr_Representation), aRep1);
+
+  // Inherited field : rep_2
+  Handle(StepRepr_Representation) aRep2;
+  data->ReadEntity(num, 4,"rep_2", ach, STANDARD_TYPE(StepRepr_Representation), aRep2);
+
+// Initialisation of the read entity
+  ent->Init(aName, aDescription, aRep1, aRep2);
+}
+
+void RWStepRepr_RWConstructiveGeometryRepresentationRelationship::WriteStep
+  (StepData_StepWriter& SW,
+   const Handle(StepRepr_ConstructiveGeometryRepresentationRelationship)& ent) const
+{
+  // Inherited field : name
+  SW.Send(ent->Name());
+
+  // Inherited field : description
+  SW.Send(ent->Description());
+
+  // Inherited field : rep_1
+  SW.Send(ent->Rep1());
+
+  // Inherited field : rep_2
+  SW.Send(ent->Rep2());
+}
+
+void RWStepRepr_RWConstructiveGeometryRepresentationRelationship::Share
+  (const Handle(StepRepr_ConstructiveGeometryRepresentationRelationship)& ent,
+   Interface_EntityIterator& iter) const
+{
+  iter.GetOneItem(ent->Rep1());
+  iter.GetOneItem(ent->Rep2());
+}
diff --git a/src/RWStepRepr/RWStepRepr_RWConstructiveGeometryRepresentationRelationship.hxx b/src/RWStepRepr/RWStepRepr_RWConstructiveGeometryRepresentationRelationship.hxx
new file mode 100644 (file)
index 0000000..6417d95
--- /dev/null
@@ -0,0 +1,47 @@
+// Created on: 2016-04-26
+// 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_RWConstructiveGeometryRepresentationRelationship_HeaderFile
+#define _RWStepRepr_RWConstructiveGeometryRepresentationRelationship_HeaderFile
+
+#include <Standard.hxx>
+#include <Standard_DefineAlloc.hxx>
+#include <Standard_Handle.hxx>
+
+#include <Standard_Integer.hxx>
+class StepData_StepReaderData;
+class Interface_Check;
+class StepRepr_ConstructiveGeometryRepresentationRelationship;
+class StepData_StepWriter;
+class Interface_EntityIterator;
+
+
+//! Read & Write Module for ConstructiveGeometryRepresentationRelationship
+class RWStepRepr_RWConstructiveGeometryRepresentationRelationship 
+{
+public:
+
+  DEFINE_STANDARD_ALLOC
+
+  Standard_EXPORT RWStepRepr_RWConstructiveGeometryRepresentationRelationship();
+  
+  Standard_EXPORT void ReadStep (const Handle(StepData_StepReaderData)& data, const Standard_Integer num, Handle(Interface_Check)& ach, const Handle(StepRepr_ConstructiveGeometryRepresentationRelationship)& ent) const;
+  
+  Standard_EXPORT void WriteStep (StepData_StepWriter& SW, const Handle(StepRepr_ConstructiveGeometryRepresentationRelationship)& ent) const;
+  
+  Standard_EXPORT void Share (const Handle(StepRepr_ConstructiveGeometryRepresentationRelationship)& ent, Interface_EntityIterator& iter) const;
+
+};
+#endif // _RWStepRepr_RWConstructiveGeometryRepresentationRelationship_HeaderFile
index 2d3daea..4653347 100644 (file)
 #include <StepRepr_AssemblyComponentUsage.hxx>
 #include <StepRepr_CharacterizedDefinition.hxx>
 #include <StepRepr_CompoundRepresentationItem.hxx>
+#include <StepRepr_DerivedShapeAspect.hxx>
 #include <StepRepr_DescriptiveRepresentationItem.hxx>
 #include <StepRepr_HArray1OfRepresentationItem.hxx>
 #include <StepRepr_MeasureRepresentationItem.hxx>
 #include <StepRepr_ReprItemAndPlaneAngleMeasureWithUnit.hxx>
 #include <StepRepr_SequenceOfRepresentationItem.hxx>
 #include <StepRepr_ShapeAspect.hxx>
+#include <StepRepr_ShapeAspectDerivingRelationship.hxx>
 #include <StepRepr_CompositeShapeAspect.hxx>
 #include <StepRepr_AllAroundShapeAspect.hxx>
 #include <StepRepr_CompShAspAndDatumFeatAndShAsp.hxx>
@@ -1724,7 +1726,7 @@ static Standard_Boolean GetMassConversionFactor(Handle(StepBasic_NamedUnit)& NU,
 
 //=======================================================================
 //function : readAnnotation
-//purpose  : return annotation plane and position for given GDT
+//purpose  : read annotation plane and position for given GDT
 // (Dimension, Geometric_Tolerance, Datum_Feature or Placed_Datum_Target_Feature)
 //=======================================================================
 void readAnnotation(const Handle(XSControl_TransferReader)& theTR, 
@@ -1984,6 +1986,97 @@ void readAnnotation(const Handle(XSControl_TransferReader)& theTR,
 }
 
 //=======================================================================
+//function : readConnectionPoints
+//purpose  : read connection points for given dimension
+//=======================================================================
+void readConnectionPoints(const Handle(XSControl_TransferReader)& theTR, 
+  const Handle(Standard_Transient) theGDT,
+  const Handle(XCAFDimTolObjects_DimensionObject)& theDimObject)
+{
+  Handle(Transfer_TransientProcess) aTP = theTR->TransientProcess();
+  const Interface_Graph& aGraph = aTP->Graph();
+  
+  if (theGDT->IsKind(STANDARD_TYPE(StepShape_DimensionalSize))) {
+    // retrieve derived geometry
+    Handle(StepShape_DimensionalSize) aDim = Handle(StepShape_DimensionalSize)::DownCast(theGDT);
+    Handle(StepRepr_DerivedShapeAspect) aDSA = Handle(StepRepr_DerivedShapeAspect)::DownCast(aDim->AppliesTo());
+    if (aDSA.IsNull())
+      return;
+    Handle(StepAP242_GeometricItemSpecificUsage) aGISU = NULL;
+    for (Interface_EntityIterator anIt = aGraph.Sharings(aDSA); aGISU.IsNull() && anIt.More(); anIt.Next()) {
+      aGISU = Handle(StepAP242_GeometricItemSpecificUsage)::DownCast(anIt.Value());
+    }
+    if (aGISU.IsNull() || aGISU->NbIdentifiedItem() == 0)
+      return;
+    Handle(StepGeom_CartesianPoint) aPoint = Handle(StepGeom_CartesianPoint)::DownCast(aGISU->IdentifiedItem()->Value(1));
+    if (aPoint.IsNull()) {
+      // try Axis2Placement3d.location instead of CartesianPoint
+      Handle(StepGeom_Axis2Placement3d) anA2P3D =
+        Handle(StepGeom_Axis2Placement3d)::DownCast(aGISU->IdentifiedItem()->Value(1));
+      if (anA2P3D.IsNull())
+        return;
+      aPoint = anA2P3D->Location();
+    }
+  
+    // set connection point to object
+    gp_Pnt aPnt(aPoint->CoordinatesValue(1), aPoint->CoordinatesValue(2), aPoint->CoordinatesValue(3));
+    theDimObject->SetPoint(aPnt);
+  }
+  else if (theGDT->IsKind(STANDARD_TYPE(StepShape_DimensionalLocation))) {
+    // retrieve derived geometry
+    Handle(StepShape_DimensionalLocation) aDim = Handle(StepShape_DimensionalLocation)::DownCast(theGDT);
+    Handle(StepRepr_DerivedShapeAspect) aDSA1 = Handle(StepRepr_DerivedShapeAspect)::DownCast(aDim->RelatingShapeAspect());
+    Handle(StepRepr_DerivedShapeAspect) aDSA2 = Handle(StepRepr_DerivedShapeAspect)::DownCast(aDim->RelatedShapeAspect());
+    if (aDSA1.IsNull() && aDSA2.IsNull())
+      return;
+    Handle(StepAP242_GeometricItemSpecificUsage) aGISU1 = NULL;
+    Handle(StepAP242_GeometricItemSpecificUsage) aGISU2 = NULL;
+    if (!aDSA1.IsNull()) {
+      for (Interface_EntityIterator anIt = aGraph.Sharings(aDSA1); aGISU1.IsNull() && anIt.More(); anIt.Next()) {
+        aGISU1 = Handle(StepAP242_GeometricItemSpecificUsage)::DownCast(anIt.Value());
+      }
+    }
+    if (!aDSA2.IsNull()) {
+      for (Interface_EntityIterator anIt = aGraph.Sharings(aDSA2); aGISU2.IsNull() && anIt.More(); anIt.Next()) {
+        aGISU2 = Handle(StepAP242_GeometricItemSpecificUsage)::DownCast(anIt.Value());
+      }
+    }
+    // first point
+    if (!aGISU1.IsNull() && aGISU1->NbIdentifiedItem() > 0) {
+      Handle(StepGeom_CartesianPoint) aPoint = Handle(StepGeom_CartesianPoint)::DownCast(aGISU1->IdentifiedItem()->Value(1));
+      if (aPoint.IsNull()) {
+        // try Axis2Placement3d.location instead of CartesianPoint
+        Handle(StepGeom_Axis2Placement3d) anA2P3D =
+          Handle(StepGeom_Axis2Placement3d)::DownCast(aGISU1->IdentifiedItem()->Value(1));
+        if (!anA2P3D.IsNull())
+          aPoint = anA2P3D->Location();
+      }
+      if (!aPoint.IsNull()) {
+        // set connection point to object
+        gp_Pnt aPnt(aPoint->CoordinatesValue(1), aPoint->CoordinatesValue(2), aPoint->CoordinatesValue(3));
+        theDimObject->SetPoint(aPnt);
+      }
+    }
+    // second point
+    if (!aGISU2.IsNull() && aGISU2->NbIdentifiedItem() > 0) {
+      Handle(StepGeom_CartesianPoint) aPoint = Handle(StepGeom_CartesianPoint)::DownCast(aGISU2->IdentifiedItem()->Value(1));
+      if (aPoint.IsNull()) {
+        // try Axis2Placement3d.location instead of CartesianPoint
+        Handle(StepGeom_Axis2Placement3d) anA2P3D =
+          Handle(StepGeom_Axis2Placement3d)::DownCast(aGISU2->IdentifiedItem()->Value(1));
+        if (!anA2P3D.IsNull())
+          aPoint = anA2P3D->Location();
+      }
+      if (!aPoint.IsNull()) {
+        // set connection point to object
+        gp_Pnt aPnt(aPoint->CoordinatesValue(1), aPoint->CoordinatesValue(2), aPoint->CoordinatesValue(3));
+        theDimObject->SetPoint2(aPnt);
+      }
+    }
+  }
+}
+
+//=======================================================================
 //function : ReadDatums
 //purpose  : auxilary
 //=======================================================================
@@ -2433,7 +2526,49 @@ static Standard_Boolean readDatumsAP242(const Handle(Standard_Transient)& theEnt
 }
 
 //=======================================================================
-//function : craeteGeomTolObjectInXCAF
+//function : collectShapeAspect
+//purpose  : 
+//=======================================================================
+static void collectShapeAspect(const Handle(StepRepr_ShapeAspect)& theSA,
+                               const Handle(XSControl_WorkSession)& theWS,
+                               NCollection_Sequence<Handle(StepRepr_ShapeAspect)>& theSAs)
+{
+  Handle(XSControl_TransferReader) aTR = theWS->TransferReader();
+  Handle(Transfer_TransientProcess) aTP = aTR->TransientProcess();
+  const Interface_Graph& aGraph = aTP->Graph();
+  // Retrieve Shape_Aspect, connected to Representation_Item from Derived_Shape_Aspect
+  if (theSA->IsKind(STANDARD_TYPE(StepRepr_DerivedShapeAspect))) {
+    Interface_EntityIterator anIter = aGraph.Sharings(theSA);
+    Handle(StepRepr_ShapeAspectDerivingRelationship) aSADR = NULL;
+    for (; aSADR.IsNull() && anIter.More(); anIter.Next()) {
+      aSADR = Handle(StepRepr_ShapeAspectDerivingRelationship)::DownCast(anIter.Value());
+    }
+    if (!aSADR.IsNull())
+      collectShapeAspect(aSADR->RelatedShapeAspect(), theWS, theSAs);
+  }
+  else {
+    // Find all children Shape_Aspect
+    Standard_Boolean isSimple = Standard_True;
+    Interface_EntityIterator anIter = aGraph.Sharings(theSA);
+    for (; anIter.More(); anIter.Next()) {
+      if (anIter.Value()->IsKind(STANDARD_TYPE(StepRepr_ShapeAspectRelationship)) &&
+          !anIter.Value()->IsKind(STANDARD_TYPE(StepShape_DimensionalLocation))) {
+        Handle(StepRepr_ShapeAspectRelationship) aSAR =
+          Handle(StepRepr_ShapeAspectRelationship)::DownCast(anIter.Value());
+        if (aSAR->RelatingShapeAspect() == theSA) {
+          collectShapeAspect(aSAR->RelatedShapeAspect(), theWS, theSAs);
+          isSimple = Standard_False;
+        }
+      }
+    }
+    // If not Composite_Shape_Aspect (or subtype) append to sequence.
+    if (isSimple)
+      theSAs.Append(theSA);
+  }
+}
+
+//=======================================================================
+//function : createGeomTolObjectInXCAF
 //purpose  : 
 //=======================================================================
 static TDF_Label createGDTObjectInXCAF(const Handle(Standard_Transient)& theEnt,
@@ -2459,6 +2594,7 @@ static TDF_Label createGDTObjectInXCAF(const Handle(Standard_Transient)& theEnt,
   // find RepresentationItem for current Ent
   NCollection_Sequence<Handle(Standard_Transient)> aSeqRI1, aSeqRI2;
 
+  // Collect all Shape_Aspect entities
   Interface_EntityIterator anIter = aGraph.Shareds(theEnt);
   for(anIter.Start(); anIter.More(); anIter.Next()) {
     Handle(Standard_Transient) anAtr = anIter.Value();
@@ -2492,69 +2628,27 @@ static TDF_Label createGDTObjectInXCAF(const Handle(Standard_Transient)& theEnt,
       Interface_EntityIterator anIterDim = aGraph.Shareds(anAtr);
       for(anIterDim.Start(); anIterDim.More(); anIterDim.Next()) 
       {
-        Handle(Standard_Transient) anAtrDim = anIterDim.Value();
-        if(anAtrDim->IsKind(STANDARD_TYPE(StepRepr_CompositeShapeAspect)) || 
-          anAtrDim->IsKind(STANDARD_TYPE(StepRepr_CompShAspAndDatumFeatAndShAsp)))
-        {
-          Interface_EntityIterator anIterCSA = aGraph.Sharings(anAtrDim);
-          for(anIterCSA.Start(); anIterCSA.More(); anIterCSA.Next()) {
-            if (anIterCSA.Value()->IsKind(STANDARD_TYPE(StepRepr_ShapeAspectRelationship))){
-              Interface_EntityIterator anIterSAR = aGraph.Shareds(anIterCSA.Value());
-              for(anIterSAR.Start(); anIterSAR.More(); anIterSAR.Next()) {
-                if (anIterSAR.Value()->IsKind(STANDARD_TYPE(StepRepr_ShapeAspect))){
-                  aSAs.Append(Handle(StepRepr_ShapeAspect)::DownCast(anIterSAR.Value()));
-                }
-              }
-            }
-          }
-        }
-        else if(anAtrDim->IsKind(STANDARD_TYPE(StepRepr_ShapeAspect)))
-        {
-          aSAs.Append( Handle(StepRepr_ShapeAspect)::DownCast(anAtrDim));
+        Handle(StepRepr_ShapeAspect) aSA = Handle(StepRepr_ShapeAspect)::DownCast(anIterDim.Value());
+        if(!aSA.IsNull()) {
+          collectShapeAspect(aSA, theWS, aSAs);
         }
       }
     }
-    else if(anAtr->IsKind(STANDARD_TYPE(StepRepr_CompositeShapeAspect)) || 
-      anAtr->IsKind(STANDARD_TYPE(StepRepr_CompShAspAndDatumFeatAndShAsp)))
+    else if(anAtr->IsKind(STANDARD_TYPE(StepRepr_ShapeAspect)))
     {
-      //processing for composite entity
-      Handle(Standard_Transient) anAtrTmp = anAtr;
       if(anAtr->IsKind(STANDARD_TYPE(StepRepr_AllAroundShapeAspect)))
       {
         // if applyed AllAround Modifier
         isAllAround = Standard_True;
-        Interface_EntityIterator anIterAASA = aGraph.Sharings(anAtrTmp);
-        for(anIterAASA.Start(); anIterAASA.More(); anIterAASA.Next()) {
-          if (anIterAASA.Value()->IsKind(STANDARD_TYPE(StepRepr_ShapeAspectRelationship))){
-            Interface_EntityIterator anIterSAR = aGraph.Shareds(anIterAASA.Value());
-            for(anIterSAR.Start(); anIterSAR.More(); anIterSAR.Next()) {
-              if ((anIterSAR.Value()->IsKind(STANDARD_TYPE(StepRepr_CompositeShapeAspect)) || 
-                anIterSAR.Value()->IsKind(STANDARD_TYPE(StepRepr_CompShAspAndDatumFeatAndShAsp))) &&
-                anAtrTmp != anIterSAR.Value()){
-                  anAtrTmp = anIterSAR.Value();
-                  break;
-              }
-            }
-          }
-        }
       }
-      Interface_EntityIterator anIterCSA = aGraph.Sharings(anAtrTmp);
-      for(anIterCSA.Start(); anIterCSA.More(); anIterCSA.Next()) {
-        if (anIterCSA.Value()->IsKind(STANDARD_TYPE(StepRepr_ShapeAspectRelationship))){
-          Interface_EntityIterator anIterSAR = aGraph.Shareds(anIterCSA.Value());
-          for(anIterSAR.Start(); anIterSAR.More(); anIterSAR.Next()) {
-            if (anIterSAR.Value()->IsKind(STANDARD_TYPE(StepRepr_ShapeAspect))){
-              aSAs.Append(Handle(StepRepr_ShapeAspect)::DownCast(anIterSAR.Value()));
-            }
-          }
-        }
+      // dimensions and default tolerances
+      Handle(StepRepr_ShapeAspect) aSA = Handle(StepRepr_ShapeAspect)::DownCast(anAtr);
+      if(!aSA.IsNull()) {
+        collectShapeAspect(aSA, theWS, aSAs);
       }
     }
-    else if(anAtr->IsKind(STANDARD_TYPE(StepRepr_ShapeAspect)))
-    {
-      //default
-      aSAs.Append( Handle(StepRepr_ShapeAspect)::DownCast(anAtr));
-    }
+
+    // Collect all representation items
     if(!aSAs.IsEmpty())
     {
       //get representation items
@@ -2767,8 +2861,8 @@ static TDF_Label createGDTObjectInXCAF(const Handle(Standard_Transient)& theEnt,
         else
         {
           if(aGISU.IsNull()) continue;
-          if(aGISU->NbIdentifiedItem() > 0) {
-            aSeqRI.Append(aGISU->IdentifiedItemValue(1));
+          for (Standard_Integer i = 1; i <= aGISU->NbIdentifiedItem(); i++) {
+            aSeqRI.Append(aGISU->IdentifiedItemValue(i));
           }
         }
       }
@@ -2785,6 +2879,7 @@ static TDF_Label createGDTObjectInXCAF(const Handle(Standard_Transient)& theEnt,
 
   TDF_LabelSequence aShLS1, aShLS2;
 
+  // Collect shapes
   for(Standard_Integer i = aSeqRI1.Lower(); i <= aSeqRI1.Upper() ;i++)
   {
     Standard_Integer anIndex = aTP->MapIndex(aSeqRI1.Value(i));
@@ -3058,7 +3153,7 @@ static void setDimObjectToXCAF(const Handle(Standard_Transient)& theEnt,
       }
       else
       {
-        // calss of tolerance
+        // class of tolerance
         aLAF = aTMD.LimitsAndFits();
       }
     }
@@ -3249,6 +3344,7 @@ static void setDimObjectToXCAF(const Handle(Standard_Transient)& theEnt,
     if(aDimL.FindAttribute(XCAFDoc_Dimension::GetID(),aDim))
     {
       readAnnotation(aTR, theEnt, aDimObj);
+      readConnectionPoints(aTR, theEnt, aDimObj);
       aDim->SetObject(aDimObj);
     }
   }
index fc4ceb2..3636257 100644 (file)
 #include <StepGeom_Surface.hxx>
 #include <StepRepr_CompGroupShAspAndCompShAspAndDatumFeatAndShAsp.hxx>
 #include <StepRepr_CompositeShapeAspect.hxx>
+#include <StepRepr_ConstructiveGeometryRepresentation.hxx>
+#include <StepRepr_ConstructiveGeometryRepresentationRelationship.hxx>
+#include <StepRepr_DerivedShapeAspect.hxx>
 #include <StepRepr_DescriptiveRepresentationItem.hxx>
 #include <StepRepr_FeatureForDatumTargetRelationship.hxx>
 #include <StepRepr_HArray1OfRepresentationItem.hxx>
 #include <StepRepr_ReprItemAndPlaneAngleMeasureWithUnit.hxx>
 #include <StepRepr_ReprItemAndPlaneAngleMeasureWithUnitAndQRI.hxx>
 #include <StepRepr_ShapeAspect.hxx>
+#include <StepRepr_ShapeAspectDerivingRelationship.hxx>
 #include <StepRepr_ShapeAspectRelationship.hxx>
 #include <StepRepr_SpecifiedHigherUsageOccurrence.hxx>
 #include <StepRepr_ValueRange.hxx>
@@ -2703,7 +2707,7 @@ static void WriteDimValues(const Handle(XSControl_WorkSession) &WS,
     Handle(StepGeom_Axis2Placement3d) anOrientation = new StepGeom_Axis2Placement3d();
     gp_Dir aDir;
     theObject->GetDirection(aDir);
-    GeomToStep_MakeCartesianPoint MkPoint(theObject->GetPoints()->Value(1));
+    GeomToStep_MakeCartesianPoint MkPoint(gp_Pnt(0, 0, 0));
     Handle(StepGeom_CartesianPoint) aLoc = MkPoint.Value();
     Handle(StepGeom_Direction) anAxis = new StepGeom_Direction();
     Handle(TColStd_HArray1OfReal) aCoords = new TColStd_HArray1OfReal(1, 3);
@@ -2786,6 +2790,59 @@ static void WriteDimValues(const Handle(XSControl_WorkSession) &WS,
 }
 
 //=======================================================================
+//function : WriteDerivedGeometry
+//purpose  : auxiliary (write connection point for dimensions)
+//======================================================================
+static void WriteDerivedGeometry (const Handle(XSControl_WorkSession) &WS,
+                                  const Handle(XCAFDimTolObjects_DimensionObject)& theObject,
+                                  const Handle(StepRepr_ConstructiveGeometryRepresentation) theRepr,
+                                  Handle(StepRepr_ShapeAspect)& theFirstSA,
+                                  Handle(StepRepr_ShapeAspect)& theSecondSA,
+                                  NCollection_Vector<Handle(StepGeom_CartesianPoint)>& thePnts)
+{
+  const Handle(Interface_InterfaceModel) &aModel = WS->Model();
+  // First point
+  if (theObject->HasPoint()) {
+    GeomToStep_MakeCartesianPoint aPointMaker(theObject->GetPoint());
+    Handle(StepGeom_CartesianPoint) aPoint = aPointMaker.Value();
+    thePnts.Append(aPoint);
+    Handle(StepRepr_DerivedShapeAspect) aDSA = new StepRepr_DerivedShapeAspect();
+    aDSA->Init(new TCollection_HAsciiString(), new TCollection_HAsciiString(), theFirstSA->OfShape(), StepData_LFalse);
+    Handle(StepAP242_GeometricItemSpecificUsage) aGISU = new StepAP242_GeometricItemSpecificUsage();
+    StepAP242_ItemIdentifiedRepresentationUsageDefinition aDefinition;
+    aDefinition.SetValue(aDSA);
+    Handle(StepRepr_HArray1OfRepresentationItem) anItem = new StepRepr_HArray1OfRepresentationItem(1, 1);
+    anItem->SetValue(1, aPoint);
+    aGISU->Init(new TCollection_HAsciiString(), new TCollection_HAsciiString(), aDefinition, theRepr, anItem);
+    Handle(StepRepr_ShapeAspectDerivingRelationship) aSADR = new StepRepr_ShapeAspectDerivingRelationship();
+    aSADR->Init(new TCollection_HAsciiString(), Standard_False, new TCollection_HAsciiString(), aDSA, theFirstSA);
+    theFirstSA = aDSA;
+    aModel->AddWithRefs(aGISU);
+    aModel->AddWithRefs(aSADR);
+  }
+  
+  // Second point (for locations)
+  if (theObject->HasPoint2()) {
+    GeomToStep_MakeCartesianPoint aPointMaker(theObject->GetPoint2());
+    Handle(StepGeom_CartesianPoint) aPoint = aPointMaker.Value();
+    thePnts.Append(aPoint);
+    Handle(StepRepr_DerivedShapeAspect) aDSA = new StepRepr_DerivedShapeAspect();
+    aDSA->Init(new TCollection_HAsciiString(), new TCollection_HAsciiString(), theFirstSA->OfShape(), StepData_LFalse);
+    Handle(StepAP242_GeometricItemSpecificUsage) aGISU = new StepAP242_GeometricItemSpecificUsage();
+    StepAP242_ItemIdentifiedRepresentationUsageDefinition aDefinition;
+    aDefinition.SetValue(aDSA);
+    Handle(StepRepr_HArray1OfRepresentationItem) anItem = new StepRepr_HArray1OfRepresentationItem(1, 1);
+    anItem->SetValue(1, aPoint);
+    aGISU->Init(new TCollection_HAsciiString(), new TCollection_HAsciiString(), aDefinition, theRepr, anItem);
+    Handle(StepRepr_ShapeAspectDerivingRelationship) aSADR = new StepRepr_ShapeAspectDerivingRelationship();
+    aSADR->Init(new TCollection_HAsciiString(), Standard_False, new TCollection_HAsciiString(), aDSA, theSecondSA);
+    theSecondSA = aDSA;
+    aModel->AddWithRefs(aGISU);
+    aModel->AddWithRefs(aSADR);
+  }
+}
+
+//=======================================================================
 //function : WriteDatumSystem
 //purpose  : auxiliary (write Write datum system for given
 //           geometric_tolerance)
@@ -3611,6 +3668,14 @@ Standard_Boolean STEPCAFControl_Writer::WriteDGTsAP242 (const Handle(XSControl_W
   //------------------//
   aDGTLabels.Clear();
   DGTTool->GetDimensionLabels(aDGTLabels);
+  // Auxiliary entities for derived geometry
+  Handle(StepRepr_ConstructiveGeometryRepresentation) aCGRepr =
+    new StepRepr_ConstructiveGeometryRepresentation();
+  Handle(StepRepr_ConstructiveGeometryRepresentationRelationship) aCGReprRel =
+    new StepRepr_ConstructiveGeometryRepresentationRelationship();
+  NCollection_Vector<Handle(StepGeom_CartesianPoint)> aConnectionPnts;
+  Handle(StepRepr_RepresentationContext) dummyRC;
+  Handle(StepAP242_GeometricItemSpecificUsage) dummyGISU;
   for (Standard_Integer i = 1; i <= aDGTLabels.Length(); i++) {
     TDF_Label aDimensionL = aDGTLabels.Value(i);
     TDF_LabelSequence aFirstShapeL, aSecondShapeL;
@@ -3624,8 +3689,6 @@ Standard_Boolean STEPCAFControl_Writer::WriteDGTsAP242 (const Handle(XSControl_W
       continue;
 
     // Write links with shapes
-    Handle(StepRepr_RepresentationContext) dummyRC;
-    Handle(StepAP242_GeometricItemSpecificUsage) dummyGISU;
     Handle(StepRepr_ShapeAspect) aFirstSA, aSecondSA;
     if (aFirstShapeL.Length() == 1) {
       TopoDS_Shape aShape = XCAFDoc_ShapeTool::GetShape(aFirstShapeL.Value(1));
@@ -3679,6 +3742,8 @@ Standard_Boolean STEPCAFControl_Writer::WriteDGTsAP242 (const Handle(XSControl_W
 
     // Write dimensions
     StepShape_DimensionalCharacteristic aDimension;
+    if (anObject->HasPoint() || anObject->HasPoint2())
+      WriteDerivedGeometry(WS, anObject, aCGRepr, aFirstSA, aSecondSA, aConnectionPnts);
     XCAFDimTolObjects_DimensionType aDimType = anObject->GetType();
     if (STEPCAFControl_GDTProperty::IsDimensionalLocation(aDimType)) {
       // Dimensional_Location
@@ -3746,6 +3811,15 @@ Standard_Boolean STEPCAFControl_Writer::WriteDGTsAP242 (const Handle(XSControl_W
     //Annotation plane and Presentation
     WritePresentation(WS, anObject->GetPresentation(), anObject->GetPlane(), anObject->GetPointTextAttach(), aDimension.Value());
   }
+  // Write Derived geometry
+  if (aConnectionPnts.Length() > 0) {
+    Handle(StepRepr_HArray1OfRepresentationItem) anItems = new StepRepr_HArray1OfRepresentationItem(1, aConnectionPnts.Length());
+    for (Standard_Integer i = 0; i < aConnectionPnts.Length(); i++)
+      anItems->SetValue(i + 1, aConnectionPnts(i));
+    aCGRepr->Init(new TCollection_HAsciiString(), anItems, dummyRC);
+    aCGReprRel->Init(new TCollection_HAsciiString(), new TCollection_HAsciiString(), dummyGISU->UsedRepresentation(), aCGRepr);
+    aModel->AddWithRefs(aCGReprRel);
+  }
 
   //----------------------------//
   // write Geometric Tolerances //
index 331b356..54a91d3 100644 (file)
@@ -739,6 +739,8 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI
 #include <StepVisual_TessellatedGeometricSet.hxx>
 #include <StepVisual_TessellatedCurveSet.hxx>
 #include <StepVisual_CoordinatesList.hxx>
+#include <StepRepr_ConstructiveGeometryRepresentation.hxx>
+#include <StepRepr_ConstructiveGeometryRepresentationRelationship.hxx>
 
 static int init = 0;
 static Interface_DataMapOfTransientInteger types(800);
@@ -1437,8 +1439,9 @@ StepAP214_Protocol::StepAP214_Protocol ()
   types.Bind (STANDARD_TYPE(StepVisual_TessellatedItem), 708);
   types.Bind (STANDARD_TYPE(StepVisual_TessellatedGeometricSet), 709);
   types.Bind (STANDARD_TYPE(StepVisual_TessellatedCurveSet), 710);
-
   types.Bind (STANDARD_TYPE(StepVisual_CoordinatesList), 711);
+  types.Bind (STANDARD_TYPE(StepRepr_ConstructiveGeometryRepresentation), 712);
+  types.Bind (STANDARD_TYPE(StepRepr_ConstructiveGeometryRepresentationRelationship), 713);
 }
 
 
index 7eced5d..1b3d6d1 100644 (file)
@@ -34,6 +34,10 @@ StepRepr_ConfigurationEffectivity.cxx
 StepRepr_ConfigurationEffectivity.hxx
 StepRepr_ConfigurationItem.cxx
 StepRepr_ConfigurationItem.hxx
+StepRepr_ConstructiveGeometryRepresentation.cxx
+StepRepr_ConstructiveGeometryRepresentation.hxx
+StepRepr_ConstructiveGeometryRepresentationRelationship.cxx
+StepRepr_ConstructiveGeometryRepresentationRelationship.hxx
 StepRepr_ContinuosShapeAspect.cxx
 StepRepr_ContinuosShapeAspect.hxx
 StepRepr_DataEnvironment.cxx
diff --git a/src/StepRepr/StepRepr_ConstructiveGeometryRepresentation.cxx b/src/StepRepr/StepRepr_ConstructiveGeometryRepresentation.cxx
new file mode 100644 (file)
index 0000000..d0334f5
--- /dev/null
@@ -0,0 +1,22 @@
+// Created on: 2016-04-26
+// 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 <Standard_Type.hxx>
+#include <StepRepr_ConstructiveGeometryRepresentation.hxx>
+
+IMPLEMENT_STANDARD_RTTIEXT(StepRepr_ConstructiveGeometryRepresentation, StepRepr_Representation)
+
+StepRepr_ConstructiveGeometryRepresentation::StepRepr_ConstructiveGeometryRepresentation ()  {}
diff --git a/src/StepRepr/StepRepr_ConstructiveGeometryRepresentation.hxx b/src/StepRepr/StepRepr_ConstructiveGeometryRepresentation.hxx
new file mode 100644 (file)
index 0000000..5c561ae
--- /dev/null
@@ -0,0 +1,39 @@
+// Created on: 2016-04-26
+// 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_ConstructiveGeometryRepresentation_HeaderFile
+#define _StepRepr_ConstructiveGeometryRepresentation_HeaderFile
+
+#include <Standard.hxx>
+#include <Standard_Type.hxx>
+
+#include <StepRepr_Representation.hxx>
+
+
+class StepRepr_ConstructiveGeometryRepresentation;
+DEFINE_STANDARD_HANDLE(StepRepr_ConstructiveGeometryRepresentation, StepRepr_Representation)
+
+
+class StepRepr_ConstructiveGeometryRepresentation : public StepRepr_Representation
+{
+public:
+  
+  //! Returns a ConstructiveGeometryRepresentation
+  Standard_EXPORT StepRepr_ConstructiveGeometryRepresentation();
+
+  DEFINE_STANDARD_RTTIEXT(StepRepr_ConstructiveGeometryRepresentation,StepRepr_Representation)
+};
+
+#endif // _StepRepr_ConstructiveGeometryRepresentation_HeaderFile
diff --git a/src/StepRepr/StepRepr_ConstructiveGeometryRepresentationRelationship.cxx b/src/StepRepr/StepRepr_ConstructiveGeometryRepresentationRelationship.cxx
new file mode 100644 (file)
index 0000000..0a991e8
--- /dev/null
@@ -0,0 +1,22 @@
+// Created on: 2016-04-26
+// 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 <Standard_Type.hxx>
+#include <StepRepr_ConstructiveGeometryRepresentationRelationship.hxx>
+
+IMPLEMENT_STANDARD_RTTIEXT(StepRepr_ConstructiveGeometryRepresentationRelationship, StepRepr_RepresentationRelationship)
+
+StepRepr_ConstructiveGeometryRepresentationRelationship::StepRepr_ConstructiveGeometryRepresentationRelationship() {  }
diff --git a/src/StepRepr/StepRepr_ConstructiveGeometryRepresentationRelationship.hxx b/src/StepRepr/StepRepr_ConstructiveGeometryRepresentationRelationship.hxx
new file mode 100644 (file)
index 0000000..1abe96d
--- /dev/null
@@ -0,0 +1,36 @@
+// Created on: 2016-04-26
+// 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_ConstructiveGeometryRepresentationRelationship_HeaderFile
+#define _StepRepr_ConstructiveGeometryRepresentationRelationship_HeaderFile
+
+#include <Standard.hxx>
+#include <Standard_Type.hxx>
+
+#include <StepRepr_RepresentationRelationship.hxx>
+
+class StepRepr_ConstructiveGeometryRepresentationRelationship;
+DEFINE_STANDARD_HANDLE(StepRepr_ConstructiveGeometryRepresentationRelationship, StepRepr_RepresentationRelationship)
+
+class StepRepr_ConstructiveGeometryRepresentationRelationship : public StepRepr_RepresentationRelationship
+{
+public:
+
+  Standard_EXPORT StepRepr_ConstructiveGeometryRepresentationRelationship();
+
+  DEFINE_STANDARD_RTTIEXT(StepRepr_ConstructiveGeometryRepresentationRelationship, StepRepr_RepresentationRelationship)
+
+};
+#endif // _StepRepr_ConstructiveGeometryRepresentationRelationship_HeaderFile
index c66d685..5cfb370 100644 (file)
@@ -27,6 +27,8 @@ XCAFDimTolObjects_DimensionObject::XCAFDimTolObjects_DimensionObject()
 {
   myHasPlane = Standard_False;
   myHasPntText = Standard_False;
+  myHasPoint1 = Standard_False;
+  myHasPoint2 = Standard_False;
 }
 
 //=======================================================================
@@ -47,7 +49,10 @@ XCAFDimTolObjects_DimensionObject::XCAFDimTolObjects_DimensionObject(const Handl
   myModifiers = theObj->myModifiers;
   myPath = theObj->myPath;
   myDir = theObj->myDir;
-  myPnts = theObj->myPnts;
+  myHasPoint1 = theObj->myHasPoint1;
+  myPnt1 = theObj->myPnt1;
+  myHasPoint2 = theObj->myHasPoint2;
+  myPnt2 = theObj->myPnt2;
   myPntText= theObj->myPntText;
   myHasPlane = theObj->myHasPlane;
   myPlane = theObj->myPlane;
@@ -426,24 +431,6 @@ Standard_Boolean XCAFDimTolObjects_DimensionObject::SetDirection (const gp_Dir&
 }
 
 //=======================================================================
-//function : GetPoints
-//purpose  : 
-//=======================================================================
-Handle(TColgp_HArray1OfPnt) XCAFDimTolObjects_DimensionObject::GetPoints ()  const
-{
-  return myPnts;
-}
-  
-//=======================================================================
-//function : SetPoints
-//purpose  : 
-//=======================================================================
-void XCAFDimTolObjects_DimensionObject::SetPoints (const Handle(TColgp_HArray1OfPnt)& thePnts)
-{
-  myPnts = thePnts;
-}
-
-//=======================================================================
 //function : RemoveDescription
 //purpose  : 
 //=======================================================================
index 7c3a295..7e635b1 100644 (file)
@@ -117,8 +117,6 @@ public:
   Standard_EXPORT Standard_Boolean SetDirection (const gp_Dir& theDir);
   
   Standard_EXPORT Handle(TColgp_HArray1OfPnt) GetPoints() const;
-  
-  Standard_EXPORT void SetPoints (const Handle(TColgp_HArray1OfPnt)& thePnts);
 
   Standard_EXPORT void SetPointTextAttach (const gp_Pnt& thePntText)
   {
@@ -143,7 +141,36 @@ public:
 
   Standard_EXPORT Standard_Boolean HasPlane() const { return myHasPlane; }
 
-  Standard_EXPORT Standard_Boolean HasPoints() const { return (!myPnts.IsNull() && myPnts->Length() > 0); }
+  //! Returns true, if connection point exists (for dimesional_size),
+  //! if connection point for first shape exists (for dimensional_location)
+  Standard_EXPORT Standard_Boolean HasPoint() const { return myHasPoint1; }
+
+  // Returns true, if connection point for second shape exists (for dimensional_location only)
+  Standard_EXPORT Standard_Boolean HasPoint2() const { return myHasPoint2; }
+
+  //! Set connection point (for dimesional_size),
+  //! Set connection point for first shape (for dimensional_location)
+  Standard_EXPORT void SetPoint(const gp_Pnt thePnt) {
+    myPnt1 = thePnt;
+    myHasPoint1 = Standard_True;
+  }
+
+  // Set connection point for second shape(for dimensional_location only)
+  Standard_EXPORT void SetPoint2(const gp_Pnt thePnt) {
+    myPnt2 = thePnt;
+    myHasPoint2 = Standard_True;
+  }
+
+  //! Get connection point (for dimesional_size),
+  //! Get connection point for first shape (for dimensional_location)
+  Standard_EXPORT gp_Pnt GetPoint() const {
+    return myPnt1;
+  }
+
+  // Get connection point for second shape(for dimensional_location only)
+  Standard_EXPORT gp_Pnt GetPoint2() const {
+    return myPnt2;
+  }
 
   //! Set graphical presentation for object
   Standard_EXPORT void SetPresentation(const TopoDS_Shape& thePresentation, 
@@ -218,7 +245,8 @@ private:
   XCAFDimTolObjects_DimensionModifiersSequence myModifiers;
   TopoDS_Edge myPath;
   gp_Dir myDir;
-  Handle(TColgp_HArray1OfPnt) myPnts;
+  gp_Pnt myPnt1, myPnt2;
+  Standard_Boolean myHasPoint1, myHasPoint2;
   gp_Ax2 myPlane;
   Standard_Boolean myHasPlane;
   Standard_Boolean myHasPntText;
index 1255fb8..e5b3001 100644 (file)
@@ -44,7 +44,8 @@ enum ChildLab
   ChildLab_Modifiers,
   ChildLab_Path,
   ChildLab_Dir,
-  ChildLab_Pnts,
+  ChildLab_Pnt1,
+  ChildLab_Pnt2,
   ChildLab_PlaneLoc,
   ChildLab_PlaneN,
   ChildLab_PlaneRef,
@@ -178,22 +179,30 @@ void XCAFDoc_Dimension::SetObject (const Handle(XCAFDimTolObjects_DimensionObjec
     aDir->ChangeArray(anArrR);
   }
 
-  Handle(TColgp_HArray1OfPnt) aP = theObject->GetPoints();
-  if(!aP.IsNull() && aP->Length() > 0)
+  if (theObject->HasPoint())
   {
-    anArrR = new TColStd_HArray1OfReal(1,aP->Length() * 3);
-    Handle(TDataStd_RealArray) aPnts;
-    anArrR->SetValue(1,aP->Value(1).X());
-    anArrR->SetValue(2,aP->Value(1).Y());
-    anArrR->SetValue(3,aP->Value(1).Z());
-    if (aP->Length() == 2) {
-      anArrR->SetValue(4,aP->Value(2).X());
-      anArrR->SetValue(5,aP->Value(2).Y());
-      anArrR->SetValue(6,aP->Value(2).Z());
-    }
-    aPnts = new TDataStd_RealArray();
-    Label().FindChild(ChildLab_Pnts).AddAttribute(aPnts);
-    aPnts->ChangeArray(anArrR);
+    Handle(TDataStd_RealArray) aPnt = new TDataStd_RealArray();
+    gp_Pnt aPnt1 = theObject->GetPoint();
+
+    Handle(TColStd_HArray1OfReal) aPntArr = new TColStd_HArray1OfReal(1, 3);
+    for (Standard_Integer i = 1; i <= 3; i++)
+      aPntArr->SetValue(i, aPnt1.Coord(i));
+    aPnt->ChangeArray(aPntArr);
+
+    Label().FindChild(ChildLab_Pnt1).AddAttribute(aPnt);
+  }
+
+  if (theObject->HasPoint2())
+  {
+    Handle(TDataStd_RealArray) aPnt = new TDataStd_RealArray();
+    gp_Pnt aPnt2 = theObject->GetPoint2();
+
+    Handle(TColStd_HArray1OfReal) aPntArr = new TColStd_HArray1OfReal(1, 3);
+    for (Standard_Integer i = 1; i <= 3; i++)
+      aPntArr->SetValue(i, aPnt2.Coord(i));
+    aPnt->ChangeArray(aPntArr);
+
+    Label().FindChild(ChildLab_Pnt2).AddAttribute(aPnt);
   }
 
   if (theObject->HasPlane())
@@ -336,19 +345,18 @@ Handle(XCAFDimTolObjects_DimensionObject) XCAFDoc_Dimension::GetObject()  const
     anObj->SetDirection(aD);
   }
 
-  Handle(TDataStd_RealArray) aPnts;
-  if(Label().FindChild(ChildLab_Pnts).FindAttribute(TDataStd_RealArray::GetID(), aPnts) 
-     && !aPnts->Array().IsNull() && aPnts->Array()->Length() > 2)
+  Handle(TDataStd_RealArray) aPnt1;
+  if(Label().FindChild(ChildLab_Pnt1).FindAttribute(TDataStd_RealArray::GetID(), aPnt1) && aPnt1->Length() == 3 )
   {
-    Handle(TColgp_HArray1OfPnt) aP = new TColgp_HArray1OfPnt(1,aPnts->Array()->Length()/3);
-    gp_Pnt aP1(aPnts->Array()->Value(1), aPnts->Array()->Value(2), aPnts->Array()->Value(3)); 
-    aP->SetValue(1, aP1);
-    if (aPnts->Array()->Length() == 6)
-    {
-      gp_Pnt aP2(aPnts->Array()->Value(4), aPnts->Array()->Value(5), aPnts->Array()->Value(6)); 
-      aP->SetValue(2, aP2);
-    }
-    anObj->SetPoints(aP);
+    gp_Pnt aP(aPnt1->Value(aPnt1->Lower()), aPnt1->Value(aPnt1->Lower()+1), aPnt1->Value(aPnt1->Lower()+2));
+    anObj->SetPoint(aP);
+  }
+
+  Handle(TDataStd_RealArray) aPnt2;
+  if(Label().FindChild(ChildLab_Pnt2).FindAttribute(TDataStd_RealArray::GetID(), aPnt2) && aPnt2->Length() == 3 )
+  {
+    gp_Pnt aP(aPnt2->Value(aPnt2->Lower()), aPnt2->Value(aPnt2->Lower()+1), aPnt2->Value(aPnt2->Lower()+2));
+    anObj->SetPoint2(aP);
   }
 
   Handle(TDataStd_RealArray) aLoc, aN, aR;
index 16884c5..6475344 100644 (file)
@@ -2018,8 +2018,8 @@ static Standard_Integer addDimPath (Draw_Interpretor& di, Standard_Integer argc,
 
 static Standard_Integer addDimPoints (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
 {
-  if (argc < 5) {
-    di<<"Use: XSetDimensionPoints Doc Dim_Label v1 v2\n";
+  if (argc < 4) {
+    di<<"Use: XSetDimensionPoints Doc Dim_Label v1 [v2]\n";
     return 1;
   }
   Handle(TDocStd_Document) Doc;
@@ -2038,17 +2038,19 @@ static Standard_Integer addDimPoints (Draw_Interpretor& di, Standard_Integer arg
   Handle(XCAFDoc_Dimension) aDimension;
   if(aLabel.FindAttribute(XCAFDoc_Dimension::GetID(), aDimension))
   {
+    Handle(XCAFDimTolObjects_DimensionObject) anObj = aDimension->GetObject();
+
     TopoDS_Vertex aV1 = TopoDS::Vertex(DBRep::Get(argv[3],TopAbs_VERTEX));
-    TopoDS_Vertex aV2 = TopoDS::Vertex(DBRep::Get(argv[4],TopAbs_VERTEX));
-    if(!aV1.IsNull() && !aV1.IsNull())
-    {
-      Handle(TColgp_HArray1OfPnt) arr = new TColgp_HArray1OfPnt(1,2);
-      arr->SetValue(1, BRep_Tool::Pnt(aV1));
-      arr->SetValue(2, BRep_Tool::Pnt(aV2));
-      Handle(XCAFDimTolObjects_DimensionObject) anObj = aDimension->GetObject();
-      anObj->SetPoints(arr);
-      aDimension->SetObject(anObj);
+    if(!aV1.IsNull()) {
+      anObj->SetPoint(BRep_Tool::Pnt(aV1));
     }
+    if (argc == 5) {
+      TopoDS_Vertex aV2 = TopoDS::Vertex(DBRep::Get(argv[4],TopAbs_VERTEX));
+      if(!aV2.IsNull()) {
+        anObj->SetPoint2(BRep_Tool::Pnt(aV2));
+      }
+    }
+    aDimension->SetObject(anObj);
   }
   return 0;
 }
@@ -2075,11 +2077,12 @@ static Standard_Integer getDimPoints (Draw_Interpretor& di, Standard_Integer arg
   Handle(XCAFDoc_Dimension) aDimension;
   if(aLabel.FindAttribute(XCAFDoc_Dimension::GetID(), aDimension))
   {
-    Handle(TColgp_HArray1OfPnt) pnts = aDimension->GetObject()->GetPoints();
-    if(!pnts.IsNull() && pnts->Length() == 2)
-    {
-      di << pnts->Value(1).X() << ";" << pnts->Value(1).Y() << ";" << pnts->Value(1).Z() << " ";
-      di << pnts->Value(2).X() << ";" << pnts->Value(2).Y() << ";" << pnts->Value(2).Z();
+    Handle(XCAFDimTolObjects_DimensionObject) anObj = aDimension->GetObject();
+    if(anObj->HasPoint()) {
+      di << anObj->GetPoint().X() << ";" << anObj->GetPoint().Y() << ";" << anObj->GetPoint().Z() << " ";
+    }
+    if(anObj->HasPoint2()) {
+      di << anObj->GetPoint2().X() << ";" << anObj->GetPoint2().Y() << ";" << anObj->GetPoint2().Z();
     }
  }
   return 0;
@@ -2732,7 +2735,7 @@ void XDEDRAW_GDTs::InitCommands(Draw_Interpretor& di)
   di.Add ("XSetDimensionPath","XSetDimensionPath Doc Dim_Label path(edge)",
     __FILE__, addDimPath, g);
 
-  di.Add ("XSetDimensionPoints","XSetDimensionPoints Doc Dim_Label v1 v2",
+  di.Add ("XSetDimensionPoints","XSetDimensionPoints Doc Dim_Label v1 [v2]",
     __FILE__, addDimPoints, g);
 
   di.Add ("XGetDimensionPoints","XGetDimensionPoints Doc Dim_Label",
diff --git a/tests/gdt/dimensions/A9 b/tests/gdt/dimensions/A9
new file mode 100644 (file)
index 0000000..7daba04
--- /dev/null
@@ -0,0 +1,35 @@
+# test connection points
+box b 10 10 10
+explode b e
+
+NewDocument D_init
+XAddShape D_init b
+XAddDimension D_init b_1 b_2
+#0:1:4:1
+XSetDimensionType D_init 0:1:4:1 2
+XSetDimensionValue D_init 0:1:4:1 10
+# Connection points
+vertex v1 1 0 0
+vertex v2 9 0 0 
+XSetDimensionPoints D_init 0:1:4:1 v1 v2
+
+# Export
+set isOK 1
+set filename $imagedir/${casename}_D_init.stp
+if { [catch { WriteStep D_init $filename } catch_result] } {
+  puts "Error: File was not written - exception"
+  set isOK 0
+  }
+# Import
+if {$isOK} {
+  if { [catch { ReadStep D $filename } catch_result] } {
+    puts "Error: File was not read - exception"
+    set isOK 0
+    }
+  }
+# Reference data
+if {$isOK} {
+  set c_value "10"
+  set c_type "Location_LinearDistance"
+  set c_pnts "1;0;0 9;0;0"
+}
index ba9cee6..d5714ab 100644 (file)
@@ -3,16 +3,16 @@ set filename bug26689_nist_ctc_04_asme1_ap242.stp
 
 set ref_data {
 
- NbOfDimensions          : 5
-  NbOfDimensionalSize    : 3
-  NbOfDimensionalLocation: 2
+ NbOfDimensions          : 9
+  NbOfDimensionalSize    : 6
+  NbOfDimensionalLocation: 3
   NbOfAngular            : 1
   NbOfWithPath           : 0
- NbOfTolerances          : 4
+ NbOfTolerances          : 6
   NbOfGTWithModifiers    : 0
   NbOfGTWithMaxTolerance : 0
-  NbOfGTWithDatums       : 4
- NbOfDatumFeature        : 6
- NbOfAttachedDatum       : 10
+  NbOfGTWithDatums       : 6
+ NbOfDatumFeature        : 8
+ NbOfAttachedDatum       : 15
  NbOfDatumTarget         : 0
 }
index 3e99492..88a01f3 100644 (file)
@@ -3,177 +3,423 @@ set filename bug26689_nist_ctc_04_asme1_ap242.stp
 
 set ref_data {
 
- NbOfDimensions          : 5
- NbOfTolerances          : 4
- NbOfDatumFeature        : 6
- NbOfAttachedDatum       : 10
+ NbOfDimensions          : 9
+ NbOfTolerances          : 6
+ NbOfDatumFeature        : 8
+ NbOfAttachedDatum       : 15
  NbOfDatumTarget         : 0
 
  0:1:1:2:1 Shape.4
-        0:1:4:1 GeomTolerance.4.1 ( T 10 TV 1, V 0.34999999999999998 )
+        0:1:4:22 Dimension.4.1 ( T 15, V 6.6500000000000004, VL 0.12, VU 0.12, P 0 )
+        0:1:4:1 GeomTolerance.4.1 ( T 10 TV 1, V 1.5 )
                 0:1:4:2 Datum.4.1.1 ( )
                 0:1:4:3 Datum.4.1.2 ( )
                 0:1:4:4 Datum.4.1.3 ( )
+        0:1:4:5 GeomTolerance.4.2 ( T 10 TV 1, V 0.29999999999999999 )
+                0:1:4:6 Datum.4.2.1 ( )
+                0:1:4:7 Datum.4.2.2 ( )
  0:1:1:2:2 Shape.5
-        0:1:4:1 GeomTolerance.5.1 ( T 10 TV 1, V 0.34999999999999998 )
+        0:1:4:22 Dimension.5.1 ( T 15, V 6.6500000000000004, VL 0.12, VU 0.12, P 0 )
+        0:1:4:1 GeomTolerance.5.1 ( T 10 TV 1, V 1.5 )
                 0:1:4:2 Datum.5.1.1 ( )
                 0:1:4:3 Datum.5.1.2 ( )
                 0:1:4:4 Datum.5.1.3 ( )
+        0:1:4:5 GeomTolerance.5.2 ( T 10 TV 1, V 0.29999999999999999 )
+                0:1:4:6 Datum.5.2.1 ( )
+                0:1:4:7 Datum.5.2.2 ( )
+ 0:1:1:2:3 Shape.6
+        0:1:4:22 Dimension.6.1 ( T 15, V 6.6500000000000004, VL 0.12, VU 0.12, P 0 )
+        0:1:4:1 GeomTolerance.6.1 ( T 10 TV 1, V 1.5 )
+                0:1:4:2 Datum.6.1.1 ( )
+                0:1:4:3 Datum.6.1.2 ( )
+                0:1:4:4 Datum.6.1.3 ( )
+        0:1:4:5 GeomTolerance.6.2 ( T 10 TV 1, V 0.29999999999999999 )
+                0:1:4:6 Datum.6.2.1 ( )
+                0:1:4:7 Datum.6.2.2 ( )
+ 0:1:1:2:4 Shape.7
+        0:1:4:22 Dimension.7.1 ( T 15, V 6.6500000000000004, VL 0.12, VU 0.12, P 0 )
+        0:1:4:1 GeomTolerance.7.1 ( T 10 TV 1, V 1.5 )
+                0:1:4:2 Datum.7.1.1 ( )
+                0:1:4:3 Datum.7.1.2 ( )
+                0:1:4:4 Datum.7.1.3 ( )
+        0:1:4:5 GeomTolerance.7.2 ( T 10 TV 1, V 0.29999999999999999 )
+                0:1:4:6 Datum.7.2.1 ( )
+                0:1:4:7 Datum.7.2.2 ( )
+ 0:1:1:2:5 Shape.8
+        0:1:4:22 Dimension.8.1 ( T 15, V 6.6500000000000004, VL 0.12, VU 0.12, P 0 )
+        0:1:4:1 GeomTolerance.8.1 ( T 10 TV 1, V 1.5 )
+                0:1:4:2 Datum.8.1.1 ( )
+                0:1:4:3 Datum.8.1.2 ( )
+                0:1:4:4 Datum.8.1.3 ( )
+        0:1:4:5 GeomTolerance.8.2 ( T 10 TV 1, V 0.29999999999999999 )
+                0:1:4:6 Datum.8.2.1 ( )
+                0:1:4:7 Datum.8.2.2 ( )
  0:1:1:2:6 Shape.9
-        0:1:4:5 GeomTolerance.9.1 ( T 12 TV 0, V 2 )
-                0:1:4:6 Datum.9.1.1 ( )
-                0:1:4:7 Datum.9.1.2 ( )
-                0:1:4:8 Datum.9.1.3 ( )
-        0:1:4:9 GeomTolerance.9.2 ( T 12 TV 0, V 0.20000000000000001 )
-                0:1:4:10 Datum.9.2.1 ( )
+        0:1:4:22 Dimension.9.1 ( T 15, V 6.6500000000000004, VL 0.12, VU 0.12, P 0 )
+        0:1:4:1 GeomTolerance.9.1 ( T 10 TV 1, V 1.5 )
+                0:1:4:2 Datum.9.1.1 ( )
+                0:1:4:3 Datum.9.1.2 ( )
+                0:1:4:4 Datum.9.1.3 ( )
+        0:1:4:5 GeomTolerance.9.2 ( T 10 TV 1, V 0.29999999999999999 )
+                0:1:4:6 Datum.9.2.1 ( )
+                0:1:4:7 Datum.9.2.2 ( )
  0:1:1:2:7 Shape.10
-        0:1:4:5 GeomTolerance.10.1 ( T 12 TV 0, V 2 )
-                0:1:4:6 Datum.10.1.1 ( )
-                0:1:4:7 Datum.10.1.2 ( )
-                0:1:4:8 Datum.10.1.3 ( )
-        0:1:4:9 GeomTolerance.10.2 ( T 12 TV 0, V 0.20000000000000001 )
-                0:1:4:10 Datum.10.2.1 ( )
+        0:1:4:22 Dimension.10.1 ( T 15, V 6.6500000000000004, VL 0.12, VU 0.12, P 0 )
+        0:1:4:1 GeomTolerance.10.1 ( T 10 TV 1, V 1.5 )
+                0:1:4:2 Datum.10.1.1 ( )
+                0:1:4:3 Datum.10.1.2 ( )
+                0:1:4:4 Datum.10.1.3 ( )
+        0:1:4:5 GeomTolerance.10.2 ( T 10 TV 1, V 0.29999999999999999 )
+                0:1:4:6 Datum.10.2.1 ( )
+                0:1:4:7 Datum.10.2.2 ( )
+ 0:1:1:2:8 Shape.11
+        0:1:4:22 Dimension.11.1 ( T 15, V 6.6500000000000004, VL 0.12, VU 0.12, P 0 )
+        0:1:4:1 GeomTolerance.11.1 ( T 10 TV 1, V 1.5 )
+                0:1:4:2 Datum.11.1.1 ( )
+                0:1:4:3 Datum.11.1.2 ( )
+                0:1:4:4 Datum.11.1.3 ( )
+        0:1:4:5 GeomTolerance.11.2 ( T 10 TV 1, V 0.29999999999999999 )
+                0:1:4:6 Datum.11.2.1 ( )
+                0:1:4:7 Datum.11.2.2 ( )
+ 0:1:1:2:9 Shape.12
+        0:1:4:22 Dimension.12.1 ( T 15, V 6.6500000000000004, VL 0.12, VU 0.12, P 0 )
+        0:1:4:1 GeomTolerance.12.1 ( T 10 TV 1, V 1.5 )
+                0:1:4:2 Datum.12.1.1 ( )
+                0:1:4:3 Datum.12.1.2 ( )
+                0:1:4:4 Datum.12.1.3 ( )
+        0:1:4:5 GeomTolerance.12.2 ( T 10 TV 1, V 0.29999999999999999 )
+                0:1:4:6 Datum.12.2.1 ( )
+                0:1:4:7 Datum.12.2.2 ( )
+ 0:1:1:2:10 Shape.13
+        0:1:4:22 Dimension.13.1 ( T 15, V 6.6500000000000004, VL 0.12, VU 0.12, P 0 )
+        0:1:4:1 GeomTolerance.13.1 ( T 10 TV 1, V 1.5 )
+                0:1:4:2 Datum.13.1.1 ( )
+                0:1:4:3 Datum.13.1.2 ( )
+                0:1:4:4 Datum.13.1.3 ( )
+        0:1:4:5 GeomTolerance.13.2 ( T 10 TV 1, V 0.29999999999999999 )
+                0:1:4:6 Datum.13.2.1 ( )
+                0:1:4:7 Datum.13.2.2 ( )
  0:1:1:2:11 Shape.14
-        0:1:4:11 GeomTolerance.14.1 ( T 12 TV 0, V 0.5 )
-                0:1:4:12 Datum.14.1.1 ( )
-                0:1:4:13 Datum.14.1.2 ( )
-                0:1:4:14 Datum.14.1.3 ( )
+        0:1:4:22 Dimension.14.1 ( T 15, V 6.6500000000000004, VL 0.12, VU 0.12, P 0 )
+        0:1:4:1 GeomTolerance.14.1 ( T 10 TV 1, V 1.5 )
+                0:1:4:2 Datum.14.1.1 ( )
+                0:1:4:3 Datum.14.1.2 ( )
+                0:1:4:4 Datum.14.1.3 ( )
+        0:1:4:5 GeomTolerance.14.2 ( T 10 TV 1, V 0.29999999999999999 )
+                0:1:4:6 Datum.14.2.1 ( )
+                0:1:4:7 Datum.14.2.2 ( )
  0:1:1:2:12 Shape.15
-        0:1:4:15 Dimension.15.1 ( T 15, V 10, P 0 )
- 0:1:1:2:13 Shape.16
-        0:1:4:15 Dimension.16.1 ( T 15, V 10, P 0 )
- 0:1:1:2:14 Shape.17
-        0:1:4:16 Dimension.17.1 ( T 2, V 20, VL 0.20000000000000001, VU 0.20000000000000001, P 0 )
- 0:1:1:2:15 Shape.18
-        0:1:4:17 Dimension.18.1 ( T 14, V 25, VL 0.25, VU 0.25, P 0 )
-        0:1:4:16 Dimension.18.2 ( T 2, V 20, VL 0.20000000000000001, VU 0.20000000000000001, P 0 )
+        0:1:4:22 Dimension.15.1 ( T 15, V 6.6500000000000004, VL 0.12, VU 0.12, P 0 )
+        0:1:4:1 GeomTolerance.15.1 ( T 10 TV 1, V 1.5 )
+                0:1:4:2 Datum.15.1.1 ( )
+                0:1:4:3 Datum.15.1.2 ( )
+                0:1:4:4 Datum.15.1.3 ( )
+        0:1:4:5 GeomTolerance.15.2 ( T 10 TV 1, V 0.29999999999999999 )
+                0:1:4:6 Datum.15.2.1 ( )
+                0:1:4:7 Datum.15.2.2 ( )
  0:1:1:2:16 Shape.19
-        0:1:4:18 Dimension.19.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.19.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
+        0:1:4:8 GeomTolerance.19.1 ( T 10 TV 1, V 0.34999999999999998 )
+                0:1:4:9 Datum.19.1.1 ( )
+                0:1:4:10 Datum.19.1.2 ( )
+                0:1:4:11 Datum.19.1.3 ( )
  0:1:1:2:17 Shape.20
-        0:1:4:18 Dimension.20.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
- 0:1:1:2:18 Shape.21
-        0:1:4:18 Dimension.21.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
- 0:1:1:2:19 Shape.22
-        0:1:4:18 Dimension.22.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
- 0:1:1:2:20 Shape.23
-        0:1:4:18 Dimension.23.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.20.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
+        0:1:4:8 GeomTolerance.20.1 ( T 10 TV 1, V 0.34999999999999998 )
+                0:1:4:9 Datum.20.1.1 ( )
+                0:1:4:10 Datum.20.1.2 ( )
+                0:1:4:11 Datum.20.1.3 ( )
  0:1:1:2:21 Shape.24
-        0:1:4:18 Dimension.24.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:12 GeomTolerance.24.1 ( T 12 TV 0, V 2 )
+                0:1:4:13 Datum.24.1.1 ( )
+                0:1:4:14 Datum.24.1.2 ( )
+                0:1:4:15 Datum.24.1.3 ( )
+        0:1:4:16 GeomTolerance.24.2 ( T 12 TV 0, V 0.20000000000000001 )
+                0:1:4:17 Datum.24.2.1 ( )
  0:1:1:2:22 Shape.25
-        0:1:4:18 Dimension.25.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
- 0:1:1:2:23 Shape.26
-        0:1:4:18 Dimension.26.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
- 0:1:1:2:24 Shape.27
-        0:1:4:18 Dimension.27.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:12 GeomTolerance.25.1 ( T 12 TV 0, V 2 )
+                0:1:4:13 Datum.25.1.1 ( )
+                0:1:4:14 Datum.25.1.2 ( )
+                0:1:4:15 Datum.25.1.3 ( )
+        0:1:4:16 GeomTolerance.25.2 ( T 12 TV 0, V 0.20000000000000001 )
+                0:1:4:17 Datum.25.2.1 ( )
  0:1:1:2:25 Shape.28
-        0:1:4:18 Dimension.28.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:18 GeomTolerance.28.1 ( T 12 TV 0, V 0.5 )
+                0:1:4:19 Datum.28.1.1 ( )
+                0:1:4:20 Datum.28.1.2 ( )
+                0:1:4:21 Datum.28.1.3 ( )
  0:1:1:2:26 Shape.29
-        0:1:4:18 Dimension.29.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.29.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
  0:1:1:2:27 Shape.30
-        0:1:4:18 Dimension.30.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.30.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
  0:1:1:2:28 Shape.31
-        0:1:4:18 Dimension.31.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.31.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
  0:1:1:2:29 Shape.32
-        0:1:4:18 Dimension.32.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.32.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
  0:1:1:2:30 Shape.33
-        0:1:4:18 Dimension.33.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.33.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
  0:1:1:2:31 Shape.34
-        0:1:4:18 Dimension.34.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.34.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
  0:1:1:2:32 Shape.35
-        0:1:4:18 Dimension.35.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.35.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
  0:1:1:2:33 Shape.36
-        0:1:4:18 Dimension.36.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.36.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
  0:1:1:2:34 Shape.37
-        0:1:4:18 Dimension.37.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.37.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
  0:1:1:2:35 Shape.38
-        0:1:4:18 Dimension.38.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.38.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
  0:1:1:2:36 Shape.39
-        0:1:4:18 Dimension.39.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.39.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
  0:1:1:2:37 Shape.40
-        0:1:4:18 Dimension.40.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.40.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
  0:1:1:2:38 Shape.41
-        0:1:4:18 Dimension.41.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.41.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
+        0:1:4:25 Dimension.41.2 ( T 2, V 75, P 0 )
  0:1:1:2:39 Shape.42
-        0:1:4:18 Dimension.42.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.42.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
+        0:1:4:25 Dimension.42.2 ( T 2, V 75, P 0 )
  0:1:1:2:40 Shape.43
-        0:1:4:18 Dimension.43.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.43.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
+        0:1:4:25 Dimension.43.2 ( T 2, V 75, P 0 )
  0:1:1:2:41 Shape.44
-        0:1:4:18 Dimension.44.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.44.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
+        0:1:4:25 Dimension.44.2 ( T 2, V 75, P 0 )
  0:1:1:2:42 Shape.45
-        0:1:4:18 Dimension.45.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.45.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
  0:1:1:2:43 Shape.46
-        0:1:4:18 Dimension.46.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.46.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
  0:1:1:2:44 Shape.47
-        0:1:4:18 Dimension.47.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.47.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
  0:1:1:2:45 Shape.48
-        0:1:4:18 Dimension.48.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.48.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
  0:1:1:2:46 Shape.49
-        0:1:4:18 Dimension.49.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.49.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
  0:1:1:2:47 Shape.50
-        0:1:4:18 Dimension.50.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.50.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
  0:1:1:2:48 Shape.51
-        0:1:4:18 Dimension.51.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.51.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
  0:1:1:2:49 Shape.52
-        0:1:4:18 Dimension.52.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.52.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
  0:1:1:2:50 Shape.53
-        0:1:4:18 Dimension.53.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.53.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
  0:1:1:2:51 Shape.54
-        0:1:4:18 Dimension.54.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.54.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
  0:1:1:2:52 Shape.55
-        0:1:4:18 Dimension.55.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.55.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
  0:1:1:2:53 Shape.56
-        0:1:4:18 Dimension.56.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.56.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
  0:1:1:2:54 Shape.57
-        0:1:4:18 Dimension.57.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.57.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
  0:1:1:2:55 Shape.58
-        0:1:4:18 Dimension.58.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.58.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
  0:1:1:2:56 Shape.59
-        0:1:4:18 Dimension.59.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.59.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
  0:1:1:2:57 Shape.60
-        0:1:4:18 Dimension.60.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.60.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
  0:1:1:2:58 Shape.61
-        0:1:4:18 Dimension.61.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.61.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
  0:1:1:2:59 Shape.62
-        0:1:4:18 Dimension.62.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.62.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
  0:1:1:2:60 Shape.63
-        0:1:4:18 Dimension.63.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.63.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
  0:1:1:2:61 Shape.64
-        0:1:4:18 Dimension.64.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.64.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
  0:1:1:2:62 Shape.65
-        0:1:4:18 Dimension.65.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.65.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
  0:1:1:2:63 Shape.66
-        0:1:4:18 Dimension.66.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.66.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
  0:1:1:2:64 Shape.67
-        0:1:4:18 Dimension.67.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.67.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
  0:1:1:2:65 Shape.68
-        0:1:4:18 Dimension.68.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.68.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
  0:1:1:2:66 Shape.69
-        0:1:4:18 Dimension.69.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.69.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
  0:1:1:2:67 Shape.70
-        0:1:4:18 Dimension.70.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.70.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
  0:1:1:2:68 Shape.71
-        0:1:4:18 Dimension.71.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.71.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
  0:1:1:2:69 Shape.72
-        0:1:4:18 Dimension.72.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.72.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
  0:1:1:2:70 Shape.73
-        0:1:4:18 Dimension.73.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.73.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
  0:1:1:2:71 Shape.74
-        0:1:4:18 Dimension.74.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.74.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
  0:1:1:2:72 Shape.75
-        0:1:4:18 Dimension.75.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.75.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
  0:1:1:2:73 Shape.76
-        0:1:4:18 Dimension.76.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.76.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
  0:1:1:2:74 Shape.77
-        0:1:4:18 Dimension.77.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.77.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
  0:1:1:2:75 Shape.78
-        0:1:4:18 Dimension.78.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+        0:1:4:23 Dimension.78.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
  0:1:1:2:76 Shape.79
-        0:1:4:19 Dimension.79.1 ( T 11, V 89.999999999776747, VL 1, VU 1, Q 3, P 0 )
+        0:1:4:23 Dimension.79.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
  0:1:1:2:77 Shape.80
-        0:1:4:19 Dimension.80.1 ( T 11, V 89.999999999776747, VL 1, VU 1, Q 3, P 0 )
- 0:1:1:3:1 Shape.81
-        0:1:4:11 GeomTolerance.81.1 ( T 12 TV 0, V 0.5 )
-                0:1:4:12 Datum.81.1.1 ( )
-                0:1:4:13 Datum.81.1.2 ( )
-                0:1:4:14 Datum.81.1.3 ( )
+        0:1:4:23 Dimension.80.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
+ 0:1:1:2:78 Shape.81
+        0:1:4:23 Dimension.81.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
+ 0:1:1:2:79 Shape.82
+        0:1:4:23 Dimension.82.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
+ 0:1:1:2:80 Shape.83
+        0:1:4:23 Dimension.83.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
+ 0:1:1:2:81 Shape.84
+        0:1:4:23 Dimension.84.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
+ 0:1:1:2:82 Shape.85
+        0:1:4:23 Dimension.85.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
+ 0:1:1:2:83 Shape.86
+        0:1:4:23 Dimension.86.1 ( T 15, V 14, VL 0.10000000000000001, VU 0.10000000000000001, P 0 )
+ 0:1:1:2:84 Shape.87
+        0:1:4:24 Dimension.87.1 ( T 15, V 10, P 0 )
+ 0:1:1:2:85 Shape.88
+        0:1:4:24 Dimension.88.1 ( T 15, V 10, P 0 )
+ 0:1:1:2:86 Shape.89
+        0:1:4:26 Dimension.89.1 ( T 15, V 20, VL 0.20000000000000001, VU 0.20000000000000001, P 0 )
+ 0:1:1:2:87 Shape.90
+        0:1:4:26 Dimension.90.1 ( T 15, V 20, VL 0.20000000000000001, VU 0.20000000000000001, P 0 )
+ 0:1:1:2:88 Shape.91
+        0:1:4:26 Dimension.91.1 ( T 15, V 20, VL 0.20000000000000001, VU 0.20000000000000001, P 0 )
+ 0:1:1:2:89 Shape.92
+        0:1:4:26 Dimension.92.1 ( T 15, V 20, VL 0.20000000000000001, VU 0.20000000000000001, P 0 )
+ 0:1:1:2:90 Shape.93
+        0:1:4:26 Dimension.93.1 ( T 15, V 20, VL 0.20000000000000001, VU 0.20000000000000001, P 0 )
+ 0:1:1:2:91 Shape.94
+        0:1:4:26 Dimension.94.1 ( T 15, V 20, VL 0.20000000000000001, VU 0.20000000000000001, P 0 )
+ 0:1:1:2:92 Shape.95
+        0:1:4:26 Dimension.95.1 ( T 15, V 20, VL 0.20000000000000001, VU 0.20000000000000001, P 0 )
+ 0:1:1:2:93 Shape.96
+        0:1:4:26 Dimension.96.1 ( T 15, V 20, VL 0.20000000000000001, VU 0.20000000000000001, P 0 )
+ 0:1:1:2:94 Shape.97
+        0:1:4:27 Dimension.97.1 ( T 2, V 20, VL 0.20000000000000001, VU 0.20000000000000001, P 0 )
+ 0:1:1:2:95 Shape.98
+        0:1:4:28 Dimension.98.1 ( T 14, V 25, VL 0.25, VU 0.25, P 0 )
+        0:1:4:27 Dimension.98.2 ( T 2, V 20, VL 0.20000000000000001, VU 0.20000000000000001, P 0 )
+ 0:1:1:2:96 Shape.99
+        0:1:4:29 Dimension.99.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:97 Shape.100
+        0:1:4:29 Dimension.100.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:98 Shape.101
+        0:1:4:29 Dimension.101.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:99 Shape.102
+        0:1:4:29 Dimension.102.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:100 Shape.103
+        0:1:4:29 Dimension.103.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:101 Shape.104
+        0:1:4:29 Dimension.104.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:102 Shape.105
+        0:1:4:29 Dimension.105.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:103 Shape.106
+        0:1:4:29 Dimension.106.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:104 Shape.107
+        0:1:4:29 Dimension.107.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:105 Shape.108
+        0:1:4:29 Dimension.108.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:106 Shape.109
+        0:1:4:29 Dimension.109.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:107 Shape.110
+        0:1:4:29 Dimension.110.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:108 Shape.111
+        0:1:4:29 Dimension.111.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:109 Shape.112
+        0:1:4:29 Dimension.112.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:110 Shape.113
+        0:1:4:29 Dimension.113.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:111 Shape.114
+        0:1:4:29 Dimension.114.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:112 Shape.115
+        0:1:4:29 Dimension.115.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:113 Shape.116
+        0:1:4:29 Dimension.116.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:114 Shape.117
+        0:1:4:29 Dimension.117.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:115 Shape.118
+        0:1:4:29 Dimension.118.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:116 Shape.119
+        0:1:4:29 Dimension.119.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:117 Shape.120
+        0:1:4:29 Dimension.120.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:118 Shape.121
+        0:1:4:29 Dimension.121.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:119 Shape.122
+        0:1:4:29 Dimension.122.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:120 Shape.123
+        0:1:4:29 Dimension.123.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:121 Shape.124
+        0:1:4:29 Dimension.124.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:122 Shape.125
+        0:1:4:29 Dimension.125.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:123 Shape.126
+        0:1:4:29 Dimension.126.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:124 Shape.127
+        0:1:4:29 Dimension.127.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:125 Shape.128
+        0:1:4:29 Dimension.128.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:126 Shape.129
+        0:1:4:29 Dimension.129.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:127 Shape.130
+        0:1:4:29 Dimension.130.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:128 Shape.131
+        0:1:4:29 Dimension.131.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:129 Shape.132
+        0:1:4:29 Dimension.132.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:130 Shape.133
+        0:1:4:29 Dimension.133.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:131 Shape.134
+        0:1:4:29 Dimension.134.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:132 Shape.135
+        0:1:4:29 Dimension.135.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:133 Shape.136
+        0:1:4:29 Dimension.136.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:134 Shape.137
+        0:1:4:29 Dimension.137.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:135 Shape.138
+        0:1:4:29 Dimension.138.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:136 Shape.139
+        0:1:4:29 Dimension.139.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:137 Shape.140
+        0:1:4:29 Dimension.140.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:138 Shape.141
+        0:1:4:29 Dimension.141.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:139 Shape.142
+        0:1:4:29 Dimension.142.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:140 Shape.143
+        0:1:4:29 Dimension.143.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:141 Shape.144
+        0:1:4:29 Dimension.144.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:142 Shape.145
+        0:1:4:29 Dimension.145.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:143 Shape.146
+        0:1:4:29 Dimension.146.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:144 Shape.147
+        0:1:4:29 Dimension.147.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:145 Shape.148
+        0:1:4:29 Dimension.148.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:146 Shape.149
+        0:1:4:29 Dimension.149.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:147 Shape.150
+        0:1:4:29 Dimension.150.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:148 Shape.151
+        0:1:4:29 Dimension.151.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:149 Shape.152
+        0:1:4:29 Dimension.152.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:150 Shape.153
+        0:1:4:29 Dimension.153.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:151 Shape.154
+        0:1:4:29 Dimension.154.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:152 Shape.155
+        0:1:4:29 Dimension.155.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:153 Shape.156
+        0:1:4:29 Dimension.156.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:154 Shape.157
+        0:1:4:29 Dimension.157.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:155 Shape.158
+        0:1:4:29 Dimension.158.1 ( T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 )
+ 0:1:1:2:156 Shape.159
+        0:1:4:30 Dimension.159.1 ( T 11, V 89.999999999776747, VL 1, VU 1, Q 3, P 0 )
+ 0:1:1:2:157 Shape.160
+        0:1:4:30 Dimension.160.1 ( T 11, V 89.999999999776747, VL 1, VU 1, Q 3, P 0 )
+ 0:1:1:3:1 Shape.161
+        0:1:4:18 GeomTolerance.161.1 ( T 12 TV 0, V 0.5 )
+                0:1:4:19 Datum.161.1.1 ( )
+                0:1:4:20 Datum.161.1.2 ( )
+                0:1:4:21 Datum.161.1.3 ( )
 }
index e2b7162..a6a2153 100644 (file)
@@ -2,7 +2,7 @@
 set filename bug26689_nist_ctc_04_asme1_ap242.stp
 
 set ref_data {
-Centre of mass: 35.242126579745523 445.83237754232533 -68.402802262745169
-Mass: 9074.4079919607357
+Centre of mass: -30.449180184134651 416.32906679654656 -71.016553810946093
+Mass: 15380.860003478236
 
 }