]> OCCT Git - occt-copy.git/commitdiff
Modification to translation graphic PMI defined by tessellation
authorgka <gka@opencascade.com>
Wed, 13 Jan 2016 16:08:55 +0000 (19:08 +0300)
committergka <gka@opencascade.com>
Wed, 13 Jan 2016 16:08:55 +0000 (19:08 +0300)
32 files changed:
src/RWStepAP214/RWStepAP214_GeneralModule.cxx
src/RWStepAP214/RWStepAP214_ReadWriteModule.cxx
src/RWStepVisual/FILES
src/RWStepVisual/RWStepVisual_RWCoordinatesList.cxx [new file with mode: 0644]
src/RWStepVisual/RWStepVisual_RWCoordinatesList.hxx [new file with mode: 0644]
src/RWStepVisual/RWStepVisual_RWTessellatedAnnotationOccurrence.cxx [new file with mode: 0644]
src/RWStepVisual/RWStepVisual_RWTessellatedAnnotationOccurrence.hxx [new file with mode: 0644]
src/RWStepVisual/RWStepVisual_RWTessellatedCurveSet.cxx [new file with mode: 0644]
src/RWStepVisual/RWStepVisual_RWTessellatedCurveSet.hxx [new file with mode: 0644]
src/RWStepVisual/RWStepVisual_RWTessellatedGeometricSet.cxx [new file with mode: 0644]
src/RWStepVisual/RWStepVisual_RWTessellatedGeometricSet.hxx [new file with mode: 0644]
src/RWStepVisual/RWStepVisual_RWTessellatedItem.cxx [new file with mode: 0644]
src/RWStepVisual/RWStepVisual_RWTessellatedItem.hxx [new file with mode: 0644]
src/STEPCAFControl/STEPCAFControl_Reader.cxx
src/StepAP214/StepAP214_Protocol.cxx
src/StepVisual/FILES
src/StepVisual/StepVisual_AnnotationOccurrence.cxx
src/StepVisual/StepVisual_AnnotationOccurrence.hxx
src/StepVisual/StepVisual_CoordinatesList.cxx [new file with mode: 0644]
src/StepVisual/StepVisual_CoordinatesList.hxx [new file with mode: 0644]
src/StepVisual/StepVisual_DraughtingCalloutElement.cxx
src/StepVisual/StepVisual_DraughtingCalloutElement.hxx
src/StepVisual/StepVisual_TessellatedAnnotationOccurrence.cxx [new file with mode: 0644]
src/StepVisual/StepVisual_TessellatedAnnotationOccurrence.hxx [new file with mode: 0644]
src/StepVisual/StepVisual_TessellatedCurveSet.cxx [new file with mode: 0644]
src/StepVisual/StepVisual_TessellatedCurveSet.hxx [new file with mode: 0644]
src/StepVisual/StepVisual_TessellatedGeometricSet.cxx [new file with mode: 0644]
src/StepVisual/StepVisual_TessellatedGeometricSet.hxx [new file with mode: 0644]
src/StepVisual/StepVisual_TessellatedItem.cxx [new file with mode: 0644]
src/StepVisual/StepVisual_TessellatedItem.hxx [new file with mode: 0644]
src/XCAFDimTolObjects/XCAFDimTolObjects_DimensionObject.hxx
src/XCAFDoc/XCAFDoc_Dimension.cxx

index b48148446d717364620cee3cf742e3c963a0c4ef..fc10e64e7ae199071a7ef59d38ab92d3de216399 100644 (file)
 #include <StepVisual_ViewVolume.hxx>
 #include <TCollection_HAsciiString.hxx>
 
+#include <StepVisual_TessellatedAnnotationOccurrence.hxx>
+#include <StepVisual_TessellatedItem.hxx>
+#include <StepVisual_TessellatedGeometricSet.hxx>
+#include <StepVisual_TessellatedCurveSet.hxx>
+#include <StepVisual_CoordinatesList.hxx>
+
+#include <RWStepVisual_RWTessellatedAnnotationOccurrence.hxx>
+#include <RWStepVisual_RWTessellatedItem.hxx>
+#include <RWStepVisual_RWTessellatedGeometricSet.hxx>
+#include <RWStepVisual_RWTessellatedCurveSet.hxx>
+#include <RWStepVisual_RWCoordinatesList.hxx>
+
+
 IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_GeneralModule,StepData_GeneralModule)
 
 //#define DeclareAndCast(atype,result,start) \  NON car Name
@@ -1327,6 +1340,19 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_GeneralModule,StepData_GeneralModule)
 #include <StepVisual_AnnotationPlane.hxx>
 #include <StepVisual_DraughtingCallout.hxx>
 
+#include <StepVisual_TessellatedAnnotationOccurrence.hxx>
+#include <StepVisual_TessellatedItem.hxx>
+#include <StepVisual_TessellatedGeometricSet.hxx>
+#include <StepVisual_TessellatedCurveSet.hxx>
+#include <StepVisual_CoordinatesList.hxx>
+
+#include <RWStepVisual_RWTessellatedAnnotationOccurrence.hxx>
+#include <RWStepVisual_RWTessellatedItem.hxx>
+#include <RWStepVisual_RWTessellatedGeometricSet.hxx>
+#include <RWStepVisual_RWTessellatedCurveSet.hxx>
+#include <RWStepVisual_RWCoordinatesList.hxx>
+
+
 static Standard_Integer catsh,catdr,catstr,catdsc,cataux;
 
 
@@ -5037,6 +5063,44 @@ void RWStepAP214_GeneralModule::FillSharedCase(const Standard_Integer CN,
     }
     break;
 
+    case 707:
+    {
+      DeclareAndCast(StepVisual_TessellatedAnnotationOccurrence,anent,ent);
+      RWStepVisual_RWTessellatedAnnotationOccurrence tool;
+      tool.Share(anent,iter);
+    }
+    break;
+
+     case 708:
+    {
+      DeclareAndCast(StepVisual_TessellatedItem,anent,ent);
+      RWStepVisual_RWTessellatedItem tool;
+      tool.Share(anent,iter);
+    }
+    break;
+
+     case 709:
+    {
+      DeclareAndCast(StepVisual_TessellatedGeometricSet,anent,ent);
+      RWStepVisual_RWTessellatedGeometricSet tool;
+      tool.Share(anent,iter);
+    }
+    break;
+     case 710:
+    {
+      DeclareAndCast(StepVisual_TessellatedCurveSet,anent,ent);
+      RWStepVisual_RWTessellatedCurveSet tool;
+      tool.Share(anent,iter);
+    }
+    break;
+    
+      case 711:
+    {
+      DeclareAndCast(StepVisual_CoordinatesList,anent,ent);
+      RWStepVisual_RWCoordinatesList tool;
+      tool.Share(anent,iter);
+    }
+    break;
     default : break;
     }
 }
@@ -7005,6 +7069,26 @@ Standard_Boolean RWStepAP214_GeneralModule::NewVoid
     ent = new StepDimTol_GeoTolAndGeoTolWthMaxTol;
     break;
 
+   case 707:
+        ent = new StepVisual_TessellatedAnnotationOccurrence;
+     break;
+
+   case 708:
+     ent = new StepVisual_TessellatedItem;     
+    break;
+
+     case 709:
+       ent = new StepVisual_TessellatedGeometricSet;
+     break;
+
+     case 710:
+       ent = new StepVisual_TessellatedCurveSet;
+     break;
+    
+      case 711:
+          ent = new StepVisual_CoordinatesList;
+      break;
+    
   default: 
     return Standard_False;
   }
@@ -7589,7 +7673,13 @@ Standard_Integer  RWStepAP214_GeneralModule::CategoryNumber
   case 703:
   case 704: return catdr;
   case 705:
-  case 706: return cataux;
+  case 706: 
+  case 707:  
+  case 708: 
+  case 709:
+  case 710:
+  case 711: 
+    return cataux;
     
   default : break;
   }
index bc9279ea12f48baaec094784cc4a13e4e84bc06d..718eb4a9a676635f92845d6bf944ac09e109eb2d 100644 (file)
@@ -1376,6 +1376,17 @@ Handle(atype) result = Handle(atype)::DownCast (start)
 #include <StepVisual_AnnotationPlane.hxx>
 #include <StepVisual_DraughtingCallout.hxx>
 
+#include <StepVisual_TessellatedAnnotationOccurrence.hxx>
+#include <StepVisual_TessellatedItem.hxx>
+#include <StepVisual_TessellatedGeometricSet.hxx>
+#include <StepVisual_TessellatedCurveSet.hxx>
+#include <StepVisual_CoordinatesList.hxx>
+
+#include <RWStepVisual_RWTessellatedAnnotationOccurrence.hxx>
+#include <RWStepVisual_RWTessellatedItem.hxx>
+#include <RWStepVisual_RWTessellatedGeometricSet.hxx>
+#include <RWStepVisual_RWTessellatedCurveSet.hxx>
+#include <RWStepVisual_RWCoordinatesList.hxx>
 
 // -- General Declarations (Recognize, StepType) ---
 
@@ -2007,6 +2018,10 @@ static TCollection_AsciiString Reco_FeatureForDatumTargetRelationship("FEATURE_F
 static TCollection_AsciiString Reco_DraughtingModelItemAssociation("DRAUGHTING_MODEL_ITEM_ASSOCIATION");
 static TCollection_AsciiString Reco_AnnotationPlane("ANNOTATION_PLANE");
 
+static TCollection_AsciiString Reco_TessellatedAnnotationOccurrence("TESSELLATED_ANNOTATION_OCCURRENCE");
+static TCollection_AsciiString Reco_TessellatedGeometricSet("TESSELLATED_GEOMETRIC_SET");
+static TCollection_AsciiString Reco_TessellatedCurveSet("TESSELLATED_CURVE_SET");
+static TCollection_AsciiString Reco_CoordinatesList("COORDINATES_LIST");
 // -- Definition of the libraries --
 
 static Handle(Dico_DictionaryOfInteger) typenums;
@@ -2653,6 +2668,13 @@ RWStepAP214_ReadWriteModule::RWStepAP214_ReadWriteModule ()
   typenums->SetItem (Reco_DraughtingModelItemAssociation, 703);
   typenums->SetItem (Reco_AnnotationPlane, 704);
 
+  typenums->SetItem (Reco_TessellatedAnnotationOccurrence,707);
+  typenums->SetItem (Reco_TessellatedGeometricSet, 709);
+
+  typenums->SetItem ( Reco_TessellatedCurveSet, 710);
+  typenums->SetItem ( Reco_CoordinatesList, 711);
+
+  
 //    SHORT NAMES
 //    NB : la liste est celle de AP203
 //    Directement exploite pour les types simples
@@ -4465,6 +4487,12 @@ const TCollection_AsciiString& RWStepAP214_ReadWriteModule::StepType
   case 703: return Reco_DraughtingModelItemAssociation;
   case 704: return Reco_AnnotationPlane;
 
+  case 707 : return Reco_TessellatedAnnotationOccurrence;
+  case 709 : return Reco_TessellatedGeometricSet;
+
+  case 710 : return Reco_TessellatedCurveSet;
+  case 711 : return Reco_CoordinatesList;
+
   default : return PasReco;
   }
 }
@@ -9244,6 +9272,43 @@ void RWStepAP214_ReadWriteModule::ReadStep(const Standard_Integer CN,
       tool.ReadStep (data,num,ach,anent);
     }
     break;
+    case 707:
+    {
+      DeclareAndCast(StepVisual_TessellatedAnnotationOccurrence,anent,ent);
+      RWStepVisual_RWTessellatedAnnotationOccurrence tool;
+      tool.ReadStep (data,num,ach,anent);
+    }
+    break;
+
+     case 708:
+    {
+      DeclareAndCast(StepVisual_TessellatedItem,anent,ent);
+      RWStepVisual_RWTessellatedItem tool;
+      tool.ReadStep (data,num,ach,anent);
+    }
+    break;
+
+     case 709:
+    {
+      DeclareAndCast(StepVisual_TessellatedGeometricSet,anent,ent);
+      RWStepVisual_RWTessellatedGeometricSet tool;
+      tool.ReadStep (data,num,ach,anent);
+    }
+    break;
+     case 710:
+    {
+      DeclareAndCast(StepVisual_TessellatedCurveSet,anent,ent);
+      RWStepVisual_RWTessellatedCurveSet tool;
+      tool.ReadStep (data,num,ach,anent);
+    }
+    break;
+     case 711:
+    {
+      DeclareAndCast(StepVisual_CoordinatesList,anent,ent);
+      RWStepVisual_RWCoordinatesList tool;
+      tool.ReadStep (data,num,ach,anent);
+    }
+    break;
 
   default: 
     ach->AddFail("Type Mismatch when reading - Entity");
@@ -13993,6 +14058,44 @@ void RWStepAP214_ReadWriteModule::WriteStep(const Standard_Integer CN,
       tool.WriteStep (SW,anent);
     }
     break;
+    case 707:
+    {
+      DeclareAndCast(StepVisual_TessellatedAnnotationOccurrence,anent,ent);
+      RWStepVisual_RWTessellatedAnnotationOccurrence tool;
+      tool.WriteStep (SW,anent);
+    }
+    break;
+
+     case 708:
+    {
+      DeclareAndCast(StepVisual_TessellatedItem,anent,ent);
+      RWStepVisual_RWTessellatedItem tool;
+      tool.WriteStep (SW,anent);
+    }
+    break;
+
+     case 709:
+    {
+      DeclareAndCast(StepVisual_TessellatedGeometricSet,anent,ent);
+      RWStepVisual_RWTessellatedGeometricSet tool;
+      tool.WriteStep (SW,anent);
+    }
+    break;
+     case 710:
+    {
+      DeclareAndCast(StepVisual_TessellatedCurveSet,anent,ent);
+      RWStepVisual_RWTessellatedCurveSet tool;
+      tool.WriteStep (SW,anent);
+    }
+    break;
+      case 711:
+    {
+       DeclareAndCast(StepVisual_CoordinatesList,anent,ent);
+      RWStepVisual_RWCoordinatesList tool;
+      tool.WriteStep(SW,anent);
+     
+    }
+    break;
 
   default: 
     return;
index 87883fea738af1fc43eb9d8f53e4ab25c7cc2479..7208bb702345727cb89823569439948f17375836 100644 (file)
@@ -124,3 +124,15 @@ RWStepVisual_RWTextStyleWithBoxCharacteristics.cxx
 RWStepVisual_RWTextStyleWithBoxCharacteristics.hxx
 RWStepVisual_RWViewVolume.cxx
 RWStepVisual_RWViewVolume.hxx
+RWStepVisual_RWTessellatedItem.hxx
+RWStepVisual_RWTessellatedItem.cxx
+RWStepVisual_RWTessellatedAnnotationOccurrence.hxx
+RWStepVisual_RWTessellatedAnnotationOccurrence.cxx
+RWStepVisual_RWTessellatedGeometricSet.hxx
+RWStepVisual_RWTessellatedGeometricSet.cxx
+RWStepVisual_RWCoordinatesList.hxx
+RWStepVisual_RWCoordinatesList.cxx
+RWStepVisual_RWTessellatedCurveSet.hxx
+RWStepVisual_RWTessellatedCurveSet.cxx
+
+
diff --git a/src/RWStepVisual/RWStepVisual_RWCoordinatesList.cxx b/src/RWStepVisual/RWStepVisual_RWCoordinatesList.cxx
new file mode 100644 (file)
index 0000000..b239357
--- /dev/null
@@ -0,0 +1,125 @@
+// Created on: 2015-10-29
+// Created by: Irina KRYLOVA
+// Copyright (c) 2015 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 <RWStepVisual_RWCoordinatesList.hxx>
+#include <StepData_StepReaderData.hxx>
+#include <StepData_StepWriter.hxx>
+#include <StepRepr_RepresentationItem.hxx>
+#include <StepVisual_HArray1OfPresentationStyleAssignment.hxx>
+#include <StepVisual_PresentationStyleAssignment.hxx>
+#include <StepVisual_CoordinatesList.hxx>
+#include <TColgp_HArray1OfXYZ.hxx>
+#include <gp_XYZ.hxx>
+
+//=======================================================================
+//function : RWStepVisual_RWCoordinatesList
+//purpose  : 
+//=======================================================================
+RWStepVisual_RWCoordinatesList::RWStepVisual_RWCoordinatesList () {}
+
+//=======================================================================
+//function : ReadStep
+//purpose  : 
+//=======================================================================
+void RWStepVisual_RWCoordinatesList::ReadStep
+  (const Handle(StepData_StepReaderData)& data,
+   const Standard_Integer num,
+   Handle(Interface_Check)& ach,
+   const Handle(StepVisual_CoordinatesList)& ent) const
+{
+  // Number of Parameter Control
+  if (!data->CheckNbParams(num, 3, ach, "coordinate list")) return;
+
+  // Inherited field : name
+  Handle(TCollection_HAsciiString) aName;
+  data->ReadString (num, 1, "name", ach, aName);
+  Standard_Integer nbP =0;
+  data->ReadInteger(num, 2, "number_points", ach,nbP);
+  
+  Handle(TColgp_HArray1OfXYZ) aPoints;// = new TColgp_HArray1OfXYZ(1, nbP);
+  Standard_Integer nsub2;
+  if (data->ReadSubList (num,3,"items",ach,nsub2)) 
+  {
+    Standard_Integer nb2 = data->NbParams(nsub2);
+    if( !nb2)
+      return;
+    aPoints = new TColgp_HArray1OfXYZ(1, nb2);
+    for (Standard_Integer i = 1; i <= nb2; i++) 
+    {
+      gp_XYZ aXYZ(0.,0.,0.);
+      Standard_Integer nsub3;
+      if (data->ReadSubList (nsub2,i,"coordinates",ach,nsub3)) {
+        Standard_Integer nb2 = data->NbParams(nsub3);
+        if(nb2 > 3) {
+          ach->AddWarning("More than 3 coordinates, ignored");
+        }
+        Standard_Integer nbcoord = Min (nb2, 3);
+        for (Standard_Integer j = 1; j <= nbcoord; j++) {
+          Standard_Real aVal =0.;
+          if (data->ReadReal (nsub3,j,"coordinates",ach,aVal)) {
+            aXYZ.SetCoord(j, aVal);
+          }
+        }
+        
+      }
+      aPoints->SetValue(i, aXYZ);
+    }
+  }
+          
+
+       //--- Initialisation of the read entity ---
+
+
+       ent->Init(aName, aPoints);
+}
+
+//=======================================================================
+//function : WriteStep
+//purpose  : 
+//=======================================================================
+void RWStepVisual_RWCoordinatesList::WriteStep
+  (StepData_StepWriter& SW, const  Handle(StepVisual_CoordinatesList)& ent) const
+{
+  // Inherited field : name
+  //SW.Send(ent->Name());
+
+  //// Inherited field : styles
+
+  //SW.OpenSub();
+  //for (Standard_Integer i2 = 1;  i2 <= ent->NbStyles();  i2 ++) {
+  //  SW.Send(ent->StylesValue(i2));
+  //}
+  //SW.CloseSub();
+
+  //// Inherited field : item
+
+  //SW.Send(ent->Item());
+}
+
+//=======================================================================
+//function : Share
+//purpose  : 
+//=======================================================================
+void RWStepVisual_RWCoordinatesList::Share(const Handle(StepVisual_CoordinatesList)& ent, Interface_EntityIterator& iter) const
+{
+  /*Standard_Integer nbElem1 = ent->NbStyles();
+  for (Standard_Integer is1=1; is1<=nbElem1; is1 ++) {
+    iter.GetOneItem(ent->StylesValue(is1));
+  }
+  iter.GetOneItem(ent->Item());*/
+}
diff --git a/src/RWStepVisual/RWStepVisual_RWCoordinatesList.hxx b/src/RWStepVisual/RWStepVisual_RWCoordinatesList.hxx
new file mode 100644 (file)
index 0000000..0bcf495
--- /dev/null
@@ -0,0 +1,49 @@
+// Created on: 2015-10-29
+// Created by: Galina Kulikova
+// Copyright (c) 2015 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+#ifndef _RWStepVisual_RWCoordinatesList_HeaderFile
+#define _RWStepVisual_RWCoordinatesList_HeaderFile
+
+#include <Standard.hxx>
+#include <Standard_DefineAlloc.hxx>
+#include <Standard_Handle.hxx>
+
+#include <Standard_Integer.hxx>
+#include <StepData_StepReaderData.hxx>
+class Interface_Check;
+class  StepVisual_CoordinatesList;
+class StepData_StepWriter;
+class Interface_EntityIterator;
+
+//! Read & Write Module for AnnotationOccurrence
+class RWStepVisual_RWCoordinatesList 
+{
+public:
+
+  DEFINE_STANDARD_ALLOC
+  
+  Standard_EXPORT RWStepVisual_RWCoordinatesList();
+  
+  Standard_EXPORT void ReadStep (const Handle(StepData_StepReaderData)& data,
+        const Standard_Integer num,
+        Handle(Interface_Check)& ach,
+        const Handle(StepVisual_CoordinatesList)& ent) const;
+  
+  Standard_EXPORT void WriteStep (StepData_StepWriter& SW, const  Handle(StepVisual_CoordinatesList)& ent) const;
+  
+  Standard_EXPORT void Share (const Handle(StepVisual_CoordinatesList)& ent, Interface_EntityIterator& iter) const;
+
+};
+#endif // _RWStepVisual_RWCoordinatesList_HeaderFile
diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedAnnotationOccurrence.cxx b/src/RWStepVisual/RWStepVisual_RWTessellatedAnnotationOccurrence.cxx
new file mode 100644 (file)
index 0000000..110b635
--- /dev/null
@@ -0,0 +1,92 @@
+// Created on: 2015-10-29
+// Created by: Irina KRYLOVA
+// Copyright (c) 2015 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 <RWStepVisual_RWTessellatedAnnotationOccurrence.hxx>
+#include <StepData_StepReaderData.hxx>
+#include <StepData_StepWriter.hxx>
+#include <StepRepr_RepresentationItem.hxx>
+#include <StepVisual_HArray1OfPresentationStyleAssignment.hxx>
+#include <StepVisual_PresentationStyleAssignment.hxx>
+#include <StepVisual_TessellatedAnnotationOccurrence.hxx>
+
+RWStepVisual_RWTessellatedAnnotationOccurrence::RWStepVisual_RWTessellatedAnnotationOccurrence () {}
+
+void RWStepVisual_RWTessellatedAnnotationOccurrence::ReadStep
+  (const Handle(StepData_StepReaderData)& data,
+   const Standard_Integer num,
+   Handle(Interface_Check)& ach,
+   const Handle(StepVisual_TessellatedAnnotationOccurrence)& ent) const
+{
+
+  // Number of Parameter Control
+  if (!data->CheckNbParams(num, 3, ach, "styled_item")) return;
+
+  // Inherited field : name 
+  Handle(TCollection_HAsciiString) aName;
+  data->ReadString (num, 1, "name", ach, aName);
+
+  // Inherited field : styles
+  Handle(StepVisual_HArray1OfPresentationStyleAssignment) aStyles;
+  Handle(StepVisual_PresentationStyleAssignment) anent2;
+  Standard_Integer nsub2;
+  if (data->ReadSubList (num,2,"styles",ach,nsub2)) {
+    Standard_Integer nb2 = data->NbParams(nsub2);
+    aStyles = new StepVisual_HArray1OfPresentationStyleAssignment (1, nb2);
+    for (Standard_Integer i2 = 1; i2 <= nb2; i2 ++) {
+      if (data->ReadEntity (nsub2, i2,"presentation_style_assignment", ach,
+          STANDARD_TYPE(StepVisual_PresentationStyleAssignment), anent2))
+        aStyles->SetValue(i2, anent2);
+    }
+  }
+
+  // Inherited field : item
+  Handle(StepRepr_RepresentationItem) aItem;
+  data->ReadEntity(num, 3,"item", ach, STANDARD_TYPE(StepRepr_RepresentationItem), aItem);
+
+  // Initialisation of the read entity
+  ent->Init(aName, aStyles, aItem);
+}
+
+void RWStepVisual_RWTessellatedAnnotationOccurrence::WriteStep
+  (StepData_StepWriter& SW,
+   const Handle(StepVisual_TessellatedAnnotationOccurrence)& ent) const
+{
+  //Inherited field : name
+  SW.Send(ent->Name());
+
+  // Inherited field : styles
+  SW.OpenSub();
+  for (Standard_Integer i2 = 1;  i2 <= ent->NbStyles();  i2 ++) {
+    SW.Send(ent->StylesValue(i2));
+  }
+  SW.CloseSub();
+
+  // Inherited field : item
+
+  SW.Send(ent->Item());
+}
+
+void RWStepVisual_RWTessellatedAnnotationOccurrence::Share(const Handle(StepVisual_TessellatedAnnotationOccurrence)& ent, Interface_EntityIterator& iter) const
+{
+
+  Standard_Integer nbElem1 = ent->NbStyles();
+  for (Standard_Integer is1=1; is1<=nbElem1; is1 ++) {
+    iter.GetOneItem(ent->StylesValue(is1));
+  }
+
+  iter.GetOneItem(ent->Item());
+}
diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedAnnotationOccurrence.hxx b/src/RWStepVisual/RWStepVisual_RWTessellatedAnnotationOccurrence.hxx
new file mode 100644 (file)
index 0000000..99006f6
--- /dev/null
@@ -0,0 +1,45 @@
+// Created on: 2015-10-29
+// Created by: Galina Kulikova
+// Copyright (c) 2015 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+#ifndef _RWStepVisual_RWTessellatedAnnotationOccurrence_HeaderFile
+#define _RWStepVisual_RWTessellatedAnnotationOccurrence_HeaderFile
+
+#include <Standard.hxx>
+#include <Standard_DefineAlloc.hxx>
+#include <Standard_Handle.hxx>
+
+#include <Standard_Integer.hxx>
+class StepData_StepReaderData;
+class Interface_Check;
+class StepVisual_TessellatedAnnotationOccurrence;
+class StepData_StepWriter;
+class Interface_EntityIterator;
+
+//! Read & Write Module for AnnotationOccurrence
+class RWStepVisual_RWTessellatedAnnotationOccurrence 
+{
+public:
+
+  DEFINE_STANDARD_ALLOC
+  
+  Standard_EXPORT RWStepVisual_RWTessellatedAnnotationOccurrence();
+  
+  Standard_EXPORT void ReadStep (const Handle(StepData_StepReaderData)& data, const Standard_Integer num, Handle(Interface_Check)& ach, const Handle(StepVisual_TessellatedAnnotationOccurrence)& ent) const;
+  
+  Standard_EXPORT void WriteStep (StepData_StepWriter& SW, const Handle(StepVisual_TessellatedAnnotationOccurrence)& ent) const;
+  
+  Standard_EXPORT void Share (const Handle(StepVisual_TessellatedAnnotationOccurrence)& ent, Interface_EntityIterator& iter) const;
+};
+#endif // _RWStepVisual_RWTessellatedAnnotationOccurrence_HeaderFile
diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedCurveSet.cxx b/src/RWStepVisual/RWStepVisual_RWTessellatedCurveSet.cxx
new file mode 100644 (file)
index 0000000..5405d3a
--- /dev/null
@@ -0,0 +1,116 @@
+// Created on: 2015-10-29
+// Created by: Irina KRYLOVA
+// Copyright (c) 2015 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 <RWStepVisual_RWTessellatedCurveSet.hxx>
+#include <StepData_StepReaderData.hxx>
+#include <StepData_StepWriter.hxx>
+#include <StepRepr_RepresentationItem.hxx>
+#include <StepVisual_CoordinatesList.hxx>
+#include <StepVisual_TessellatedCurveSet.hxx>
+
+//=======================================================================
+//function : RWStepVisual_RWTessellatedCurveSet
+//purpose  : 
+//=======================================================================
+RWStepVisual_RWTessellatedCurveSet::RWStepVisual_RWTessellatedCurveSet () {}
+
+//=======================================================================
+//function : ReadStep
+//purpose  : 
+//=======================================================================
+void RWStepVisual_RWTessellatedCurveSet::ReadStep
+  (const Handle(StepData_StepReaderData)& data,
+  const Standard_Integer num,
+  Handle(Interface_Check)& ach,
+  const Handle(StepVisual_TessellatedCurveSet)& ent) const
+{
+  // Number of Parameter Control
+  if (!data->CheckNbParams(num, 3, ach, "tessellated_curve_set")) return;
+
+  // Inherited field : name
+  Handle(TCollection_HAsciiString) aName;
+  data->ReadString (num, 1, "name", ach, aName);
+
+  Handle(StepVisual_CoordinatesList) aCoordList;
+  data->ReadEntity (num, 2,"coord_list",ach,STANDARD_TYPE(StepVisual_CoordinatesList), aCoordList);
+  //--- Initialisation of the read entity ---
+  Standard_Integer nsub2;
+  NCollection_Handle<StepVisual_VectorOfHSequenceOfInteger> aCurves = new StepVisual_VectorOfHSequenceOfInteger;
+  if (data->ReadSubList (num,3,"curves",ach,nsub2)) 
+  {
+    Standard_Integer nb2 = data->NbParams(nsub2);
+    if( !nb2)
+      return;
+
+    for (Standard_Integer i = 1; i <= nb2; i++) 
+    {
+      Handle(TColStd_HSequenceOfInteger) aCurve = new TColStd_HSequenceOfInteger;
+      Standard_Integer nsub3;
+      if (data->ReadSubList (nsub2,i,"number_coordinates",ach,nsub3)) {
+        Standard_Integer nb2 = data->NbParams(nsub3);
+        for (Standard_Integer j = 1; j <= nb2; j++) {
+          Standard_Integer aVal =0;
+          if (data->ReadInteger (nsub3,j,"coordinates",ach,aVal)) 
+            aCurve->Append(aVal);
+
+        }
+        aCurves->Append(aCurve);
+
+      }
+    }
+  }
+  ent->Init(aName, aCoordList, aCurves);
+  
+}
+
+  //=======================================================================
+  //function : WriteStep
+  //purpose  : 
+  //=======================================================================
+  void RWStepVisual_RWTessellatedCurveSet::WriteStep
+    (StepData_StepWriter& SW,
+    const Handle(StepVisual_TessellatedCurveSet)& ent) const
+  {
+    // Inherited field : name
+    //SW.Send(ent->Name());
+
+    //// Inherited field : styles
+
+    //SW.OpenSub();
+    //for (Standard_Integer i2 = 1;  i2 <= ent->NbStyles();  i2 ++) {
+    //  SW.Send(ent->StylesValue(i2));
+    //}
+    //SW.CloseSub();
+
+    //// Inherited field : item
+
+    //SW.Send(ent->Item());
+  }
+
+  //=======================================================================
+  //function : Share
+  //purpose  : 
+  //=======================================================================
+  void RWStepVisual_RWTessellatedCurveSet::Share(const Handle(StepVisual_TessellatedCurveSet)& ent, Interface_EntityIterator& iter) const
+  {
+    /*Standard_Integer nbElem1 = ent->NbStyles();
+    for (Standard_Integer is1=1; is1<=nbElem1; is1 ++) {
+    iter.GetOneItem(ent->StylesValue(is1));
+    }
+    iter.GetOneItem(ent->Item());*/
+  }
diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedCurveSet.hxx b/src/RWStepVisual/RWStepVisual_RWTessellatedCurveSet.hxx
new file mode 100644 (file)
index 0000000..3075660
--- /dev/null
@@ -0,0 +1,49 @@
+// Created on: 2015-10-29
+// Created by: Galina Kulikova
+// Copyright (c) 2015 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+#ifndef _RWStepVisual_RWTessellatedCurveSet_HeaderFile
+#define _RWStepVisual_RWTessellatedCurveSet_HeaderFile
+
+#include <Standard.hxx>
+#include <Standard_DefineAlloc.hxx>
+#include <Standard_Handle.hxx>
+
+#include <Standard_Integer.hxx>
+#include <StepVisual_TessellatedCurveSet.hxx>
+class StepData_StepReaderData;
+class Interface_Check;
+//class StepVisual_TessellatedCurveSet;
+class StepData_StepWriter;
+class Interface_EntityIterator;
+
+//! Read & Write Module for AnnotationOccurrence
+class RWStepVisual_RWTessellatedCurveSet 
+{
+public:
+
+  DEFINE_STANDARD_ALLOC
+  
+  Standard_EXPORT RWStepVisual_RWTessellatedCurveSet();
+  
+  Standard_EXPORT void ReadStep (const Handle(StepData_StepReaderData)& data,
+        const Standard_Integer num,
+        Handle(Interface_Check)& ach,
+        const Handle(StepVisual_TessellatedCurveSet)& ent) const;
+  
+  Standard_EXPORT void WriteStep (StepData_StepWriter& SW, const  Handle(StepVisual_TessellatedCurveSet)& ent) const;
+  
+  Standard_EXPORT void Share (const  Handle(StepVisual_TessellatedCurveSet)& ent, Interface_EntityIterator& iter) const;
+};
+#endif // _RWStepVisual_RWTessellatedItem_HeaderFile
diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedGeometricSet.cxx b/src/RWStepVisual/RWStepVisual_RWTessellatedGeometricSet.cxx
new file mode 100644 (file)
index 0000000..0463a5e
--- /dev/null
@@ -0,0 +1,104 @@
+// Created on: 2015-10-29
+// Created by: Irina KRYLOVA
+// Copyright (c) 2015 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 <RWStepVisual_RWTessellatedGeometricSet.hxx>
+#include <StepData_StepReaderData.hxx>
+#include <StepData_StepWriter.hxx>
+#include <StepRepr_RepresentationItem.hxx>
+#include <StepVisual_HArray1OfPresentationStyleAssignment.hxx>
+#include <StepVisual_PresentationStyleAssignment.hxx>
+#include <StepVisual_TessellatedGeometricSet.hxx>
+#include <StepVisual_TessellatedItem.hxx>
+
+//=======================================================================
+//function : RWStepVisual_RWTessellatedGeometricSet
+//purpose  : 
+//=======================================================================
+RWStepVisual_RWTessellatedGeometricSet::RWStepVisual_RWTessellatedGeometricSet () {}
+
+//=======================================================================
+//function : ReadStep
+//purpose  : 
+//=======================================================================
+void RWStepVisual_RWTessellatedGeometricSet::ReadStep
+  (const Handle(StepData_StepReaderData)& data,
+   const Standard_Integer num,
+   Handle(Interface_Check)& ach,
+   const Handle(StepVisual_TessellatedGeometricSet)& ent) const
+{
+  // Number of Parameter Control
+  if (!data->CheckNbParams(num, 2, ach, "tessellated_geometric_set")) return;
+
+  // Inherited field : name
+  Handle(TCollection_HAsciiString) aName;
+  data->ReadString (num, 1, "name", ach, aName);
+  
+  NCollection_Handle<StepVisual_Array1OfTessellaltedItem> anItems;
+       Standard_Integer nsub2;
+       if (data->ReadSubList (num,2,"items",ach,nsub2)) {
+         Standard_Integer nb2 = data->NbParams(nsub2);
+         anItems = new StepVisual_Array1OfTessellaltedItem(1, nb2);
+         for (Standard_Integer i2 = 1; i2 <= nb2; i2 ++) {
+           Handle(StepVisual_TessellatedItem) anItem;// = new StepVisual_TesselatedItem;
+           if (data->ReadEntity (nsub2,i2,"item",ach,STANDARD_TYPE(StepVisual_TessellatedItem), anItem))
+             anItems->SetValue(i2,anItem);
+         }
+       }
+
+       //--- Initialisation of the read entity ---
+
+
+       ent->Init(aName, anItems);
+}
+
+//=======================================================================
+//function : WriteStep
+//purpose  : 
+//=======================================================================
+void RWStepVisual_RWTessellatedGeometricSet::WriteStep
+  (StepData_StepWriter& SW,
+   const Handle(StepVisual_TessellatedGeometricSet)& ent) const
+{
+  // Inherited field : name
+  //SW.Send(ent->Name());
+
+  //// Inherited field : styles
+
+  //SW.OpenSub();
+  //for (Standard_Integer i2 = 1;  i2 <= ent->NbStyles();  i2 ++) {
+  //  SW.Send(ent->StylesValue(i2));
+  //}
+  //SW.CloseSub();
+
+  //// Inherited field : item
+
+  //SW.Send(ent->Item());
+}
+
+//=======================================================================
+//function : Share
+//purpose  : 
+//=======================================================================
+void RWStepVisual_RWTessellatedGeometricSet::Share(const Handle(StepVisual_TessellatedGeometricSet)& ent, Interface_EntityIterator& iter) const
+{
+  /*Standard_Integer nbElem1 = ent->NbStyles();
+  for (Standard_Integer is1=1; is1<=nbElem1; is1 ++) {
+    iter.GetOneItem(ent->StylesValue(is1));
+  }
+  iter.GetOneItem(ent->Item());*/
+}
diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedGeometricSet.hxx b/src/RWStepVisual/RWStepVisual_RWTessellatedGeometricSet.hxx
new file mode 100644 (file)
index 0000000..22b0434
--- /dev/null
@@ -0,0 +1,48 @@
+// Created on: 2015-10-29
+// Created by: Galina Kulikova
+// Copyright (c) 2015 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+#ifndef _RWStepVisual_RWTessellatedGeometricSet_HeaderFile
+#define _RWStepVisual_RWTessellatedGeometricSet_HeaderFile
+
+#include <Standard.hxx>
+#include <Standard_DefineAlloc.hxx>
+#include <Standard_Handle.hxx>
+
+#include <Standard_Integer.hxx>
+class StepData_StepReaderData;
+class Interface_Check;
+class  StepVisual_TessellatedGeometricSet;
+class StepData_StepWriter;
+class Interface_EntityIterator;
+
+//! Read & Write Module for AnnotationOccurrence
+class RWStepVisual_RWTessellatedGeometricSet 
+{
+public:
+
+  DEFINE_STANDARD_ALLOC
+  
+  Standard_EXPORT RWStepVisual_RWTessellatedGeometricSet();
+  
+  Standard_EXPORT void ReadStep (const Handle(StepData_StepReaderData)& data,
+        const Standard_Integer num,
+        Handle(Interface_Check)& ach,
+        const Handle(StepVisual_TessellatedGeometricSet)& ent) const;
+  
+  Standard_EXPORT void WriteStep (StepData_StepWriter& SW, const  Handle(StepVisual_TessellatedGeometricSet)& ent) const;
+  
+  Standard_EXPORT void Share (const  Handle(StepVisual_TessellatedGeometricSet)& ent, Interface_EntityIterator& iter) const;
+};
+#endif // _RWStepVisual_RWTessellatedItem_HeaderFile
diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedItem.cxx b/src/RWStepVisual/RWStepVisual_RWTessellatedItem.cxx
new file mode 100644 (file)
index 0000000..3b4e255
--- /dev/null
@@ -0,0 +1,60 @@
+// Copyright (c) 1999-2014 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 <RWStepVisual_RWTessellatedItem.hxx>
+#include <StepData_StepReaderData.hxx>
+#include <StepData_StepWriter.hxx>
+#include <StepVisual_TessellatedItem.hxx>
+
+RWStepVisual_RWTessellatedItem::RWStepVisual_RWTessellatedItem () {}
+
+void RWStepVisual_RWTessellatedItem::ReadStep
+       (const Handle(StepData_StepReaderData)& data,
+        const Standard_Integer num,
+        Handle(Interface_Check)& ach,
+        const Handle(StepVisual_TessellatedItem)& ent) const
+{
+
+
+       // --- Number of Parameter Control ---
+
+       if (!data->CheckNbParams(num,1,ach,"tessellated_item")) return;
+
+       // --- inherited field : name ---
+
+       Handle(TCollection_HAsciiString) aName;
+       //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
+       data->ReadString (num,1,"name",ach,aName);
+
+       //--- Initialisation of the read entity ---
+
+
+       ent->Init(aName);
+}
+
+
+void RWStepVisual_RWTessellatedItem::WriteStep
+       (StepData_StepWriter& SW,
+        const Handle(StepVisual_TessellatedItem)& ent) const
+{
+
+       // --- inherited field name ---
+
+       SW.Send(ent->Name());
+}
+
+void RWStepVisual_RWTessellatedItem::Share (const  Handle(StepVisual_TessellatedItem)& ent, Interface_EntityIterator& iter) const
+{
+}
\ No newline at end of file
diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedItem.hxx b/src/RWStepVisual/RWStepVisual_RWTessellatedItem.hxx
new file mode 100644 (file)
index 0000000..99857d1
--- /dev/null
@@ -0,0 +1,48 @@
+// Created on: 2015-10-29
+// Created by: Galina Kulikova
+// Copyright (c) 2015 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+#ifndef _RWStepVisual_RWTessellatedItem_HeaderFile
+#define _RWStepVisual_RWTessellatedItem_HeaderFile
+
+#include <Standard.hxx>
+#include <Standard_DefineAlloc.hxx>
+#include <Standard_Handle.hxx>
+
+#include <Standard_Integer.hxx>
+class StepData_StepReaderData;
+class Interface_Check;
+class  StepVisual_TessellatedItem;
+class StepData_StepWriter;
+class Interface_EntityIterator;
+
+//! Read & Write Module for AnnotationOccurrence
+class RWStepVisual_RWTessellatedItem 
+{
+public:
+
+  DEFINE_STANDARD_ALLOC
+  
+  Standard_EXPORT RWStepVisual_RWTessellatedItem();
+  
+  Standard_EXPORT void ReadStep (const Handle(StepData_StepReaderData)& data,
+        const Standard_Integer num,
+        Handle(Interface_Check)& ach,
+        const Handle(StepVisual_TessellatedItem)& ent) const;
+  
+  Standard_EXPORT void WriteStep (StepData_StepWriter& SW, const  Handle(StepVisual_TessellatedItem)& ent) const;
+  
+  Standard_EXPORT void Share (const  Handle(StepVisual_TessellatedItem)& ent, Interface_EntityIterator& iter) const;
+};
+#endif // _RWStepVisual_RWTessellatedItem_HeaderFile
index 686998deeec73c39a34a9b166bfd02f859426cba..3e3f83247812dbbb0a71f1089f1f73bee5b4fd4f 100644 (file)
 #include <StepAP242_GeometricItemSpecificUsage.hxx>
 #include <StepGeom_CartesianPoint.hxx>
 #include <STEPConstruct_GDTProperty.hxx>
+#include <StepVisual_TessellatedAnnotationOccurrence.hxx>
+#include <StepVisual_TessellatedAnnotationOccurrence.hxx>
+#include <StepVisual_TessellatedItem.hxx>
+#include <StepVisual_TessellatedGeometricSet.hxx>
+#include <StepVisual_TessellatedCurveSet.hxx>
+#include <StepVisual_CoordinatesList.hxx>
+#include <NCollection_Vector.hxx>
+
+#include <TColgp_HArray1OfXYZ.hxx>
+#include <BRepBuilderAPI_MakeEdge.hxx>
+#include <BRepTools.hxx>
+
 // skl 21.08.2003 for reading G&DT
 //#include <StepRepr_CompoundItemDefinition.hxx>
 //#include <StepRepr_CompoundItemDefinitionMember.hxx>
@@ -264,6 +276,7 @@ TCollection_AsciiString AddrToString(const TopoDS_Shape& theShape)
 }
 #endif
 
+static int numsize =0;
 //=======================================================================
 //function : IsEqual
 //purpose  : global function to check equality of topological shapes
@@ -1764,51 +1777,80 @@ static void ReadGDTPosition(const Interface_Graph &theGraph,
         gp_Dir aYDir(aCoords->Value(1), aCoords->Value(2), aCoords->Value(3));
         aPlaneAxes.SetDirection(aXDir.Crossed(aYDir));
         aPlaneAxes.SetYDirection(aYDir);
+        //set location of the annotation plane
+        Handle(TColStd_HArray1OfReal) aLocCoords;
+        Handle(StepGeom_CartesianPoint) aLoc = aA2P3D->Location();
+        gp_Pnt aLocPos( aLoc->CoordinatesValue (1), aLoc->CoordinatesValue (2), aLoc->CoordinatesValue (3));
+        aPlaneAxes.SetLocation(aLocPos);
         isHasPlane = Standard_True;
       }
     }
   }
 
   // set plane axes to XCAF
   if (isHasPlane) {
     if (theDimObject->IsKind(STANDARD_TYPE(XCAFDimTolObjects_DimensionObject))) {
-      Handle(XCAFDimTolObjects_DimensionObject) anObj =
-        Handle(XCAFDimTolObjects_DimensionObject)::DownCast(theDimObject);
+        Handle(XCAFDimTolObjects_DimensionObject) anObj = 
+      Handle(XCAFDimTolObjects_DimensionObject)::DownCast(theDimObject);
+
+      Handle(TColgp_HArray1OfPnt) aPnts = new TColgp_HArray1OfPnt(1, 1);
       anObj->SetPlane(aPlaneAxes);
+      //aPnts->SetValue(1, aPlaneAxes.Location());
+      //anObj->SetPoints(aPnts);
+
     }
     else if (theDimObject->IsKind(STANDARD_TYPE(XCAFDimTolObjects_DatumObject))) {
       Handle(XCAFDimTolObjects_DatumObject) anObj =
         Handle(XCAFDimTolObjects_DatumObject)::DownCast(theDimObject);
       anObj->SetPlane(aPlaneAxes);
+      //anObj->SetPoint(aPlaneAxes.Location());
     }
     else if (theDimObject->IsKind(STANDARD_TYPE(XCAFDimTolObjects_GeomToleranceObject))) {
       Handle(XCAFDimTolObjects_GeomToleranceObject) anObj =
         Handle(XCAFDimTolObjects_GeomToleranceObject)::DownCast(theDimObject);
       anObj->SetPlane(aPlaneAxes);
+      //anObj->SetPoint(aPlaneAxes.Location());
     }
   }
-
+  
+  
   // Retrieve connecton point
   // Take AnnotationCurveOccurence (other types are not processed now)
   Handle(StepVisual_AnnotationCurveOccurrence) anACO;
+  NCollection_Vector<Handle(StepVisual_TessellatedAnnotationOccurrence)> aTesselations;
   if (aDMIAE->IsKind(STANDARD_TYPE(StepVisual_AnnotationCurveOccurrence))) {
     anACO = Handle(StepVisual_AnnotationCurveOccurrence)::DownCast(aDMIAE);
+    
   }
   else if (aDMIAE->IsKind(STANDARD_TYPE(StepVisual_DraughtingCallout))) {
     Handle(StepVisual_DraughtingCallout) aDCallout =
       Handle(StepVisual_DraughtingCallout)::DownCast(aDMIAE);
     for (Standard_Integer i = 1; i <= aDCallout->NbContents() && anACO.IsNull(); i++) {
       anACO = aDCallout->ContentsValue(i).AnnotationCurveOccurrence();
+      if(anACO.IsNull())
+      {
+        Handle(StepVisual_TessellatedAnnotationOccurrence) aTesselation = 
+          aDCallout->ContentsValue(i).TessellatedAnnotationOccurrence();
+        if( !aTesselation.IsNull())
+          aTesselations.Append(aTesselation);
+      }
     }
   }
-  if (anACO.IsNull())
+  if (anACO.IsNull() && !aTesselations.Length())
     return;
 
-  // Take the first polyline (it is not a rule, but temporary solution)
-  Handle(StepRepr_RepresentationItem) aCurveItem = anACO->Item();
-  Handle(StepGeom_Polyline) aCurve;
   // for Dimensional_Location (and its subtypes)
   Standard_Boolean isDimLoc = theGDT->IsKind(STANDARD_TYPE(StepShape_DimensionalLocation));
+  gp_Pnt aPoint(0.,0.,0.);
+  gp_Pnt aPoint2(0.,0.,0.);
+
+  if(!anACO.IsNull())
+  {
+   // Take the first polyline (it is not a rule, but temporary solution)
+  Handle(StepRepr_RepresentationItem) aCurveItem = anACO->Item();
+  Handle(StepGeom_Polyline) aCurve;
   Handle(StepGeom_Polyline) aCurve2;
   if (aCurveItem->IsKind(STANDARD_TYPE(StepShape_GeometricCurveSet))) {
     Handle(StepShape_GeometricCurveSet) aCurveSet =
@@ -1834,7 +1876,7 @@ static void ReadGDTPosition(const Interface_Graph &theGraph,
   // Take the first point of polyline (it is not a rule, but temporary solution)
   Handle(StepGeom_CartesianPoint) aPnt = aCurve->PointsValue(1);
   Handle(TColStd_HArray1OfReal) aCoords = aPnt->Coordinates();
-  gp_Pnt aPoint(aCoords->Value(1), aCoords->Value(2), aCoords->Value(3));
+  aPoint.SetCoord(aCoords->Value(1), aCoords->Value(2), aCoords->Value(3));
 
   gp_Pnt aPoint2;
   if (isDimLoc) {
@@ -1842,11 +1884,91 @@ static void ReadGDTPosition(const Interface_Graph &theGraph,
     Handle(TColStd_HArray1OfReal) aCoords = aPnt->Coordinates();
     aPoint2.SetCoord(aCoords->Value(1), aCoords->Value(2), aCoords->Value(3));
   }
+  }
+  //case of tesselated entities
+  else
+  {
+    gp_XYZ aXYZ1(0.,0.,0.),aXYZ2(0.,0.,0.) ;
+   
+    Standard_Integer nb = aTesselations.Length(), j =0, nbP =0;
+    for( ;j < nb; j++)
+    {
+      if( aTesselations(j).IsNull())
+        continue;
+      Handle(TCollection_HAsciiString) aName = aTesselations(j)->Name();
+      TCollection_AsciiString aCurName = aName.IsNull() ? 
+        (TCollection_AsciiString("Size") + TCollection_AsciiString(numsize++)) : aName->String();
+      aCurName += "_";
+      aCurName += TCollection_AsciiString(j);
+      aCurName += ".brep";
+      Handle(StepRepr_RepresentationItem) aTessItem = aTesselations(j)->Item();
+      if(aTessItem.IsNull())
+        return;
+    Handle(StepVisual_TessellatedGeometricSet) aTessSet = Handle(StepVisual_TessellatedGeometricSet)::DownCast(aTessItem);
+    if( aTessSet.IsNull())
+      return;
+    NCollection_Handle<StepVisual_Array1OfTessellaltedItem> aListItems = aTessSet->Items();
+    Standard_Integer n = 1, nb = aListItems.IsNull() ? 0 : aListItems->Length();
+    Handle(StepVisual_TessellatedCurveSet) aTessCurve;
+    for( ; n <= nb && aTessCurve.IsNull(); n++)
+    {
+      aTessCurve = Handle(StepVisual_TessellatedCurveSet)::DownCast(aListItems->Value(n));
+
+    }
+    if( aTessCurve.IsNull())
+      return;
+     Handle(StepVisual_CoordinatesList) aCoordList = aTessCurve->CoordList();
+     if( aCoordList.IsNull())
+       return;
+     Handle(TColgp_HArray1OfXYZ)  aPoints = aCoordList->Points();
+     
+     isDimLoc = !aPoints.IsNull() && aPoints->Length() > 0;
+     if( isDimLoc)
+     {
+        //debug
+      NCollection_Handle<StepVisual_VectorOfHSequenceOfInteger> aCurves = aTessCurve->Curves();
+      Standard_Integer aNbC = (aCurves.IsNull() ? 0 : aCurves->Length());
+      BRep_Builder aB;
+      TopoDS_Wire aCurW;
+      aB.MakeWire(aCurW);
+      Standard_Integer k = 1; 
+
+
+     /* for( ; k < aPoints->Length(); k++)
+      {
+        gp_Pnt aP1(aPoints->Value(k));
+         gp_Pnt aP2(aPoints->Value(k+1));
+        BRepBuilderAPI_MakeEdge aMaker(aP1, aP2);
+        if( aMaker.IsDone())
+        {
+          TopoDS_Edge aCurE = aMaker.Edge();
+          aB.Add(aCurW, aCurE);
+        }
+      }
+
+      BRepTools::Write(aCurW, aCurName.ToCString());*/
+       //
+       aXYZ1 += aPoints->Value(1);
+       aXYZ2 += aPoints->Value(aPoints->Length());
+       nbP++;
+      
+
+      /* aPoint = gp_Pnt(aPoints->Value(1));
+       aPoint2 = gp_Pnt(aPoints->Value(aPoints->Length()));*/
+     }
+    }
+    if(nbP)
+    {
+      aPoint = gp_Pnt(aXYZ1/ nbP);
+      aPoint2 = gp_Pnt(aXYZ2/ nbP);
+    }
+  }
 
   // set point to XCAF
   if (theDimObject->IsKind(STANDARD_TYPE(XCAFDimTolObjects_DimensionObject))) {
     Handle(XCAFDimTolObjects_DimensionObject) anObj = 
       Handle(XCAFDimTolObjects_DimensionObject)::DownCast(theDimObject);
+    
     Handle(TColgp_HArray1OfPnt) aPnts;
     if (isDimLoc)
       aPnts = new TColgp_HArray1OfPnt(1, 2);
@@ -1854,7 +1976,11 @@ static void ReadGDTPosition(const Interface_Graph &theGraph,
       aPnts = new TColgp_HArray1OfPnt(1, 1);
     aPnts->SetValue(1, aPoint);
     if (isDimLoc)
+    {
+      aPnts->SetValue(1, aPoint);
       aPnts->SetValue(2, aPoint2);
+    }
+   
     anObj->SetPoints(aPnts);
   }
   else if (theDimObject->IsKind(STANDARD_TYPE(XCAFDimTolObjects_DatumObject))) {
@@ -1867,6 +1993,7 @@ static void ReadGDTPosition(const Interface_Graph &theGraph,
       Handle(XCAFDimTolObjects_GeomToleranceObject)::DownCast(theDimObject);
     anObj->SetPoint(aPoint);
   }
+  
 }
 
 //=======================================================================
index 21ccf97423fd88a63e63d17206482bfc199fd313..fc9830cfb5a189021dc23f63c62e35e6353c8c34 100644 (file)
@@ -733,6 +733,12 @@ static Standard_CString schemaAP203    = "CONFIG_CONTROL_DESIGN";
 #include <StepVisual_DraughtingCallout.hxx>
 
 
+#include <StepVisual_TessellatedAnnotationOccurrence.hxx>
+#include <StepVisual_TessellatedItem.hxx>
+#include <StepVisual_TessellatedGeometricSet.hxx>
+#include <StepVisual_TessellatedCurveSet.hxx>
+#include <StepVisual_CoordinatesList.hxx>
+
 static int init = 0;
 static Interface_DataMapOfTransientInteger types(800);
 
@@ -1425,8 +1431,17 @@ StepAP214_Protocol::StepAP214_Protocol ()
   types.Bind (STANDARD_TYPE(StepVisual_AnnotationPlane), 704);
   types.Bind (STANDARD_TYPE(StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol), 705);
   types.Bind (STANDARD_TYPE(StepDimTol_GeoTolAndGeoTolWthMaxTol), 706);
+  //AP242 tesselated
+  types.Bind (STANDARD_TYPE(StepVisual_TessellatedAnnotationOccurrence), 707);
+  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);
 }
 
+
+
 //=======================================================================
 //function : TypeNumber
 //purpose  : 
index 510c28da5644ecc5dc03acf0bb7bf2bc27475ac5..7368423c57c03f4b18b48b056ca1b59fb26b292a 100644 (file)
@@ -208,3 +208,13 @@ StepVisual_TextStyleWithBoxCharacteristics.cxx
 StepVisual_TextStyleWithBoxCharacteristics.hxx
 StepVisual_ViewVolume.cxx
 StepVisual_ViewVolume.hxx
+StepVisual_TessellatedAnnotationOccurrence.hxx
+StepVisual_TessellatedAnnotationOccurrence.cxx
+StepVisual_TessellatedItem.hxx
+StepVisual_TessellatedItem.cxx
+StepVisual_TessellatedGeometricSet.hxx
+StepVisual_TessellatedGeometricSet.cxx
+StepVisual_TessellatedCurveSet.hxx
+StepVisual_TessellatedCurveSet.cxx
+StepVisual_CoordinatesList.hxx
+StepVisual_CoordinatesList.cxx
index 6ac10ae41773063c57f06fe3a08513f6967a1429..449feb997b8d83de612b1959c777565a34c0e274 100644 (file)
@@ -19,3 +19,5 @@ IMPLEMENT_STANDARD_RTTIEXT(StepVisual_AnnotationOccurrence,StepVisual_StyledItem
 
 StepVisual_AnnotationOccurrence::StepVisual_AnnotationOccurrence ()  {}
 
+
+
index ce1b8a693b70809dfebe6f290b0f08416d2ce987..6565d1818dec2fc0956491a0441c731e5c56ad05 100644 (file)
@@ -38,7 +38,6 @@ public:
 
 
 
-
   DEFINE_STANDARD_RTTIEXT(StepVisual_AnnotationOccurrence,StepVisual_StyledItem)
 
 protected:
diff --git a/src/StepVisual/StepVisual_CoordinatesList.cxx b/src/StepVisual/StepVisual_CoordinatesList.cxx
new file mode 100644 (file)
index 0000000..954810e
--- /dev/null
@@ -0,0 +1,31 @@
+// Copyright (c) 1999-2014 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 <StepVisual_CoordinatesList.hxx>
+#include <StepVisual_TessellatedItem.hxx>
+IMPLEMENT_STANDARD_RTTIEXT(StepVisual_CoordinatesList,StepGeom_TessellatedItem)
+
+StepVisual_CoordinatesList::StepVisual_CoordinatesList ()  {}
+
+void StepVisual_CoordinatesList::Init(const Handle(TCollection_HAsciiString)& theName,const Handle(TColgp_HArray1OfXYZ)& thePoints)
+{
+  StepRepr_RepresentationItem::Init(theName);
+  myPoints = thePoints;
+}
+
+Handle(TColgp_HArray1OfXYZ) StepVisual_CoordinatesList::Points() const
+{
+  return myPoints;
+}
\ No newline at end of file
diff --git a/src/StepVisual/StepVisual_CoordinatesList.hxx b/src/StepVisual/StepVisual_CoordinatesList.hxx
new file mode 100644 (file)
index 0000000..386eb13
--- /dev/null
@@ -0,0 +1,45 @@
+// Created on: 2015-10-29
+// Created by: Galina Kulikova
+// Copyright (c) 2015 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+#ifndef _StepVisual_CoordinatesList_HeaderFile
+#define _StepVisual_CoordinatesList_HeaderFile
+#include <Standard.hxx>
+#include <Standard_DefineAlloc.hxx>
+#include <Standard_Handle.hxx>
+#include <TColgp_HArray1OfXYZ.hxx>
+#include <StepVisual_TessellatedItem.hxx>
+class Standard_Transient;
+
+DEFINE_STANDARD_HANDLE(StepVisual_CoordinatesList,StepVisual_TessellatedItem)
+class StepVisual_CoordinatesList  : public StepVisual_TessellatedItem
+{
+public:
+
+  DEFINE_STANDARD_ALLOC
+  
+  //! Returns a coordinate list
+  Standard_EXPORT StepVisual_CoordinatesList();
+
+  Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theName, const Handle(TColgp_HArray1OfXYZ)& thePoints);
+
+  Standard_EXPORT Handle(TColgp_HArray1OfXYZ) Points() const;
+  
+  DEFINE_STANDARD_RTTIEXT(StepVisual_CoordinatesList,StepVisual_TessellatedItem);
+
+private:
+
+  Handle(TColgp_HArray1OfXYZ) myPoints;
+};
+#endif // StepVisual_CoordinatesList
index c4da0009330de2719948a6cfcfe5f94d4a7ade4c..829b514e1f9547cfef925492683ae955c3965f04 100644 (file)
@@ -17,6 +17,8 @@
 #include <Interface_Macros.hxx>
 #include <StepVisual_AnnotationCurveOccurrence.hxx>
 
+#include <StepVisual_TessellatedAnnotationOccurrence.hxx>
+
 //=======================================================================
 //function : StepVisual_DraughtingCalloutElement
 //purpose  : 
@@ -33,8 +35,15 @@ Standard_Integer StepVisual_DraughtingCalloutElement::CaseNum(const Handle(Stand
 {
   if (ent.IsNull()) return 0;
   if (ent->IsKind(STANDARD_TYPE(StepVisual_AnnotationCurveOccurrence))) return 1;
+  else if (ent->IsKind(STANDARD_TYPE(StepVisual_TessellatedAnnotationOccurrence))) return 2;
   return 0;
 }
 
 Handle(StepVisual_AnnotationCurveOccurrence) StepVisual_DraughtingCalloutElement::AnnotationCurveOccurrence() const
 {  return GetCasted(StepVisual_AnnotationCurveOccurrence,Value());  }
+
+
+Handle(StepVisual_TessellatedAnnotationOccurrence) StepVisual_DraughtingCalloutElement::TessellatedAnnotationOccurrence()  const
+{  return GetCasted(StepVisual_TessellatedAnnotationOccurrence,Value()); } 
+
index 90fac0c4f019194bca246e3574355ca92af46c53..772c9ad050e02247d99fd0d857447803fda1f837 100644 (file)
@@ -24,6 +24,7 @@
 #include <Standard_Integer.hxx>
 class Standard_Transient;
 class StepVisual_AnnotationCurveOccurrence;
+class StepVisual_TessellatedAnnotationOccurrence;
 
 class StepVisual_DraughtingCalloutElement  : public StepData_SelectType
 {
@@ -41,5 +42,8 @@ public:
   
   //! returns Value as a AnnotationCurveOccurrence (Null if another type)
   Standard_EXPORT Handle(StepVisual_AnnotationCurveOccurrence) AnnotationCurveOccurrence()  const;
+
+    //! returns Value as a AnnotationOccurrence for Tesselated Anotation Occurence
+  Standard_EXPORT Handle(StepVisual_TessellatedAnnotationOccurrence) TessellatedAnnotationOccurrence()  const;
 };
 #endif // StepVisual_DraughtingCalloutElement
diff --git a/src/StepVisual/StepVisual_TessellatedAnnotationOccurrence.cxx b/src/StepVisual/StepVisual_TessellatedAnnotationOccurrence.cxx
new file mode 100644 (file)
index 0000000..0435ec6
--- /dev/null
@@ -0,0 +1,21 @@
+// Created on: 2015-10-29
+// Created by: Irina KRYLOVA
+// Copyright (c) 2015 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 <StepVisual_TessellatedAnnotationOccurrence.hxx>
+
+IMPLEMENT_STANDARD_RTTIEXT(StepVisual_TessellatedAnnotationOccurrence,StepVisual_StyledItem);
+
+StepVisual_TessellatedAnnotationOccurrence::StepVisual_TessellatedAnnotationOccurrence ()  {}
diff --git a/src/StepVisual/StepVisual_TessellatedAnnotationOccurrence.hxx b/src/StepVisual/StepVisual_TessellatedAnnotationOccurrence.hxx
new file mode 100644 (file)
index 0000000..1656db6
--- /dev/null
@@ -0,0 +1,36 @@
+// Created on: 2015-10-29
+// Created by: Galina Kulikova
+// Copyright (c) 2015 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+#ifndef _StepVisual_TessellatedAnnotationOccurrence_HeaderFile
+#define _StepVisual_TessellatedAnnotationOccurrence_HeaderFile
+
+#include <Standard.hxx>
+#include <Standard_Type.hxx>
+
+#include <StepVisual_StyledItem.hxx>
+
+class StepVisual_TessellatedAnnotationOccurrence;
+DEFINE_STANDARD_HANDLE(StepVisual_TessellatedAnnotationOccurrence, StepVisual_StyledItem)
+
+class StepVisual_TessellatedAnnotationOccurrence : public StepVisual_StyledItem
+{
+public:
+
+  //! Returns a TesselatedAnnotationOccurence
+  Standard_EXPORT StepVisual_TessellatedAnnotationOccurrence();
+
+  DEFINE_STANDARD_RTTIEXT(StepVisual_TessellatedAnnotationOccurrence,StepVisual_StyledItem)
+};
+#endif // _StepVisual_TesselatedAnnotationOccurrence_HeaderFile
diff --git a/src/StepVisual/StepVisual_TessellatedCurveSet.cxx b/src/StepVisual/StepVisual_TessellatedCurveSet.cxx
new file mode 100644 (file)
index 0000000..174b20a
--- /dev/null
@@ -0,0 +1,42 @@
+// Copyright (c) 1999-2014 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 <StepVisual_TessellatedCurveSet.hxx>
+#include <StepVisual_TessellatedItem.hxx>
+
+
+IMPLEMENT_STANDARD_RTTIEXT(StepVisual_TessellatedCurveSet,StepVisual_TessellatedItem)
+
+StepVisual_TessellatedCurveSet::StepVisual_TessellatedCurveSet ()  {}
+
+void StepVisual_TessellatedCurveSet::Init(const Handle(TCollection_HAsciiString)& theName,
+  const Handle(StepVisual_CoordinatesList)& theCoordList,
+  const NCollection_Handle<StepVisual_VectorOfHSequenceOfInteger>& theCurves)
+{
+  StepRepr_RepresentationItem::Init(theName);
+  myCoordList = theCoordList;
+  myCurves = theCurves;
+}
+
+
+NCollection_Handle<StepVisual_VectorOfHSequenceOfInteger> StepVisual_TessellatedCurveSet::Curves() const
+{
+  return myCurves;
+}
+
+Handle(StepVisual_CoordinatesList) StepVisual_TessellatedCurveSet::CoordList() const
+{
+  return myCoordList;
+}
\ No newline at end of file
diff --git a/src/StepVisual/StepVisual_TessellatedCurveSet.hxx b/src/StepVisual/StepVisual_TessellatedCurveSet.hxx
new file mode 100644 (file)
index 0000000..a9b28b0
--- /dev/null
@@ -0,0 +1,60 @@
+// Created on: 2015-10-29
+// Created by: Galina Kulikova
+// Copyright (c) 2015 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+#ifndef _StepVisual_TessellatedCurveSet_HeaderFile
+#define _StepVisual_TessellatedCurveSet_HeaderFile
+#include <Standard.hxx>
+#include <Standard_DefineAlloc.hxx>
+#include <Standard_Handle.hxx>
+#include <StepVisual_CoordinatesList.hxx>
+#include <StepVisual_TessellatedItem.hxx>
+
+#include <NCollection_Vector.hxx>
+#include <NCollection_Handle.hxx>
+#include <StepVisual_CoordinatesList.hxx>
+#include <TColStd_HSequenceOfInteger.hxx>
+class Standard_Transient;
+
+
+typedef NCollection_Vector<Handle(TColStd_HSequenceOfInteger)> StepVisual_VectorOfHSequenceOfInteger;
+
+DEFINE_STANDARD_HANDLE(StepVisual_TessellatedCurveSet, StepVisual_TessellatedItem);
+
+
+class StepVisual_TessellatedCurveSet  : public StepVisual_TessellatedItem
+{
+public:
+
+  DEFINE_STANDARD_ALLOC
+  
+  //! Returns a DraughtingCalloutElement select type
+  Standard_EXPORT StepVisual_TessellatedCurveSet();
+
+  Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theName, const Handle(StepVisual_CoordinatesList)& theCoordList,
+    const NCollection_Handle<StepVisual_VectorOfHSequenceOfInteger>& theCurves);
+
+  Standard_EXPORT Handle(StepVisual_CoordinatesList) CoordList() const;
+  Standard_EXPORT NCollection_Handle<StepVisual_VectorOfHSequenceOfInteger> Curves() const;
+    
+
+private:
+
+  Handle(StepVisual_CoordinatesList) myCoordList;
+  NCollection_Handle<StepVisual_VectorOfHSequenceOfInteger> myCurves;
+
+public :
+  DEFINE_STANDARD_RTTIEXT(StepVisual_TessellatedCurveSet,StepVisual_TessellatedItem);
+};
+#endif // StepVisual_TessellatedCurveSet
diff --git a/src/StepVisual/StepVisual_TessellatedGeometricSet.cxx b/src/StepVisual/StepVisual_TessellatedGeometricSet.cxx
new file mode 100644 (file)
index 0000000..68c86ec
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright (c) 1999-2014 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 <StepVisual_TessellatedGeometricSet.hxx>
+
+
+IMPLEMENT_STANDARD_RTTIEXT(StepVisual_TessellatedGeometricSet,StepGeom_TessellatedItem)
+
+
+StepVisual_TessellatedGeometricSet::StepVisual_TessellatedGeometricSet ()  {}
+
+void StepVisual_TessellatedGeometricSet::Init(const Handle(TCollection_HAsciiString)& theName, const NCollection_Handle<StepVisual_Array1OfTessellaltedItem>& theItems)
+{
+  StepRepr_RepresentationItem::Init(theName);
+  myItems = theItems;
+}
+
+NCollection_Handle<StepVisual_Array1OfTessellaltedItem> StepVisual_TessellatedGeometricSet::Items() const
+{
+  return myItems;
+}
\ No newline at end of file
diff --git a/src/StepVisual/StepVisual_TessellatedGeometricSet.hxx b/src/StepVisual/StepVisual_TessellatedGeometricSet.hxx
new file mode 100644 (file)
index 0000000..e7b98f6
--- /dev/null
@@ -0,0 +1,54 @@
+// Created on: 2015-10-29
+// Created by: Galina Kulikova
+// Copyright (c) 2015 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+#ifndef _StepVisual_TessellatedGeometricSet_HeaderFile
+#define  _StepVisual_TessellatedGeometricSet_HeaderFile
+#include <Standard.hxx>
+#include <Standard_DefineAlloc.hxx>
+#include <Standard_Handle.hxx>
+
+#include <StepVisual_TessellatedItem.hxx>
+#include <NCollection_Array1.hxx>
+//#include <NCollection_DefineHArray1.hxx>
+#include <NCollection_Handle.hxx>
+
+class Standard_Transient;
+
+typedef NCollection_Array1<Handle(StepVisual_TessellatedItem)> StepVisual_Array1OfTessellaltedItem;
+//typedef NCollection_Handle<StepVisual_Array1OfTessellaltedItem> Handle(StepVisual_Array1OfTessellaltedItem);
+
+//DEFINE_HARRAY1(StepVisual_HArray1OfTessellaltedItem, StepVisual_Array1OfTessellaltedItem)
+DEFINE_STANDARD_HANDLE(StepVisual_TessellatedGeometricSet, StepVisual_TessellatedItem)
+class StepVisual_TessellatedGeometricSet  : public StepVisual_TessellatedItem
+{
+public:
+
+  DEFINE_STANDARD_ALLOC
+  
+  //! Returns a DraughtingCalloutElement select type
+  Standard_EXPORT StepVisual_TessellatedGeometricSet();
+
+   Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theName, const NCollection_Handle<StepVisual_Array1OfTessellaltedItem>& theItems);
+  
+   Standard_EXPORT NCollection_Handle<StepVisual_Array1OfTessellaltedItem> Items() const;
+
+private:
+  NCollection_Handle<StepVisual_Array1OfTessellaltedItem> myItems;
+
+public:
+
+  DEFINE_STANDARD_RTTIEXT(StepVisual_TessellatedGeometricSet,StepVisual_TessellatedItem)
+};
+#endif // StepVisual_TessellatedGeometricSet
diff --git a/src/StepVisual/StepVisual_TessellatedItem.cxx b/src/StepVisual/StepVisual_TessellatedItem.cxx
new file mode 100644 (file)
index 0000000..51fd44b
--- /dev/null
@@ -0,0 +1,20 @@
+// Copyright (c) 1999-2014 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 <StepVisual_TessellatedItem.hxx>
+
+IMPLEMENT_STANDARD_RTTIEXT(StepVisual_TessellatedItem,StepGeom_GeometricRepresentationItem)
+
+StepVisual_TessellatedItem::StepVisual_TessellatedItem ()  {}
\ No newline at end of file
diff --git a/src/StepVisual/StepVisual_TessellatedItem.hxx b/src/StepVisual/StepVisual_TessellatedItem.hxx
new file mode 100644 (file)
index 0000000..81fe88d
--- /dev/null
@@ -0,0 +1,37 @@
+// Created on: 2015-10-29
+// Created by: Galina Kulikova
+// Copyright (c) 2015 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+#ifndef _StepVisual_TessellatedItem_HeaderFile
+#define _StepVisual_TessellatedItem_HeaderFile
+#include <Standard.hxx>
+#include <Standard_DefineAlloc.hxx>
+#include <Standard_Handle.hxx>
+
+#include <StepGeom_GeometricRepresentationItem.hxx>
+class Standard_Transient;
+
+DEFINE_STANDARD_HANDLE(StepVisual_TessellatedItem, StepGeom_GeometricRepresentationItem)
+class StepVisual_TessellatedItem  : public StepGeom_GeometricRepresentationItem
+{
+public:
+
+  DEFINE_STANDARD_ALLOC
+  
+  //! Returns a DraughtingCalloutElement select type
+  Standard_EXPORT StepVisual_TessellatedItem();
+  
+  DEFINE_STANDARD_RTTIEXT(StepVisual_TessellatedItem,StepGeom_GeometricRepresentationItem);
+};
+#endif // StepVisual_TessellatedItem
index e65fee84a25b28209d43dbc531b98942f2dc6aa0..3549cfbf4ee63416c24a6a93ea0ced1e2eb9d5b8 100644 (file)
@@ -135,7 +135,7 @@ public:
 
   Standard_Boolean HasPlane() const { return myHasPlane; }
 
-  Standard_Boolean HasPoints() const { !myPnts.IsNull() && myPnts->Length() > 0; }
+  Standard_Boolean HasPoints() const { return (!myPnts.IsNull() && myPnts->Length() > 0); }
 
   Standard_Boolean HasPoint2() const { return myHasPnt2; }
 
index 2c52517ff4e545c19ff7d2a9341c5ae23cdda9bd..70224613c4bd28a001c34afc32aca0855602d91f 100644 (file)
@@ -300,13 +300,15 @@ Handle(XCAFDimTolObjects_DimensionObject) XCAFDoc_Dimension::GetObject()  const
 
   Handle(TDataStd_RealArray) aPnts;
   if(Label().FindChild(ChildLab_Pnts).FindAttribute(TDataStd_RealArray::GetID(), aPnts) 
-     && !aPnts->Array().IsNull() && aPnts->Array()->Length() > 0)
+     && !aPnts->Array().IsNull() && aPnts->Array()->Length() > 2)
   {
-    Handle(TColgp_HArray1OfPnt) aP = new TColgp_HArray1OfPnt(1,aPnts->Array()->Length());
-    aP->SetValue(1, gp_Pnt(aPnts->Array()->Value(1), aPnts->Array()->Value(2), aPnts->Array()->Value(3)));
-    if (aPnts->Array()->Length() == 2)
+    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)
     {
-      aP->SetValue(2, gp_Pnt(aPnts->Array()->Value(4), aPnts->Array()->Value(5), aPnts->Array()->Value(6)));
+      gp_Pnt aP2(aPnts->Array()->Value(4), aPnts->Array()->Value(5), aPnts->Array()->Value(6)); 
+      aP->SetValue(2, aP2);
     }
     anObj->SetPoints(aP);
   }