#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
#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;
}
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;
}
}
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;
}
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;
}
#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) ---
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;
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
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;
}
}
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");
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;
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
+
+
--- /dev/null
+// 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());*/
+}
--- /dev/null
+// 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
--- /dev/null
+// 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());
+}
--- /dev/null
+// 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
--- /dev/null
+// 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());*/
+ }
--- /dev/null
+// 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
--- /dev/null
+// 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());*/
+}
--- /dev/null
+// 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
--- /dev/null
+// 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
--- /dev/null
+// 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
#include <StepAP242_DraughtingModelItemAssociation.hxx>
#include <StepAP242_GeometricItemSpecificUsage.hxx>
#include <StepGeom_CartesianPoint.hxx>
-#include <STEPCAFControl_GDTProperty.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>
}
#endif
+static int numsize =0;
//=======================================================================
//function : IsEqual
//purpose : global function to check equality of topological shapes
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 =
// 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) {
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);
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))) {
Handle(XCAFDimTolObjects_GeomToleranceObject)::DownCast(theDimObject);
anObj->SetPoint(aPoint);
}
+
}
//=======================================================================
aDatObj->SetDatumTargetNumber(0);
aDatObj->IsDatumTarget(Standard_True);
XCAFDimTolObjects_DatumTargetType aType;
- if(STEPCAFControl_GDTProperty::GetDatumTargetType(aSA->Description(),aType))
+ if(STEPConstruct_GDTProperty::GetDatumTargetType(aSA->Description(),aType))
{
aDatObj->SetDatumTargetType(aType);
if(aType == XCAFDimTolObjects_DatumTargetType_Area)
if(!aTQ.IsNull())
{
XCAFDimTolObjects_DimensionQualifier aQ;
- if (STEPCAFControl_GDTProperty::GetDimQualifierType(aTQ->Name(), aQ))
+ if (STEPConstruct_GDTProperty::GetDimQualifierType(aTQ->Name(), aQ))
{
aDimObj->SetQualifier(aQ);
}
Standard_Boolean aHolle = Standard_False;
XCAFDimTolObjects_DimensionFormVariance aFV = XCAFDimTolObjects_DimensionFormVariance_None;
XCAFDimTolObjects_DimensionGrade aG = XCAFDimTolObjects_DimensionGrade_IT01;
- STEPCAFControl_GDTProperty::GetDimClassOfTolerance(aLAF, aHolle, aFV, aG);
+ STEPConstruct_GDTProperty::GetDimClassOfTolerance(aLAF, aHolle, aFV, aG);
aDimObj->SetClassOfTolerance(aHolle, aFV, aG);
}
{
//get modifiers
XCAFDimTolObjects_DimensionModifiersSequence aModifiers;
- STEPCAFControl_GDTProperty::GetDimModifiers(aCRI, aModifiers);
+ STEPConstruct_GDTProperty::GetDimModifiers(aCRI, aModifiers);
if(aModifiers.Length() > 0)
aDimObj->SetModifiers(aModifiers);
}
aName = aDimLocation->Name();
}
XCAFDimTolObjects_DimensionType aType = XCAFDimTolObjects_DimensionType_Location_None;
- if (!STEPCAFControl_GDTProperty::GetDimType(aName, aType))
+ if (!STEPConstruct_GDTProperty::GetDimType(aName, aType))
{
if(!aDimSize.IsNull())
{
if (theEnt->IsKind(STANDARD_TYPE(StepDimTol_GeoTolAndGeoTolWthDatRef)))
{
Handle(StepDimTol_GeoTolAndGeoTolWthDatRef) anE = Handle(StepDimTol_GeoTolAndGeoTolWthDatRef)::DownCast(theEnt);
- theType = STEPCAFControl_GDTProperty::GetGeomToleranceType(anE->GetToleranceType());
+ theType = STEPConstruct_GDTProperty::GetGeomToleranceType(anE->GetToleranceType());
}
else if (theEnt->IsKind(STANDARD_TYPE(StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol)))
{
Handle(StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol) anE =
Handle(StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol)::DownCast(theEnt);
- theType = STEPCAFControl_GDTProperty::GetGeomToleranceType(anE->GetToleranceType());
+ theType = STEPConstruct_GDTProperty::GetGeomToleranceType(anE->GetToleranceType());
}
else if (theEnt->IsKind(STANDARD_TYPE(StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMod)))
{
Handle(StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMod) anE =
Handle(StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMod)::DownCast(theEnt);
- theType = STEPCAFControl_GDTProperty::GetGeomToleranceType(anE->GetToleranceType());
+ theType = STEPConstruct_GDTProperty::GetGeomToleranceType(anE->GetToleranceType());
}
else if (theEnt->IsKind(STANDARD_TYPE(StepDimTol_GeoTolAndGeoTolWthMaxTol)))
{
Handle(StepDimTol_GeoTolAndGeoTolWthMaxTol) anE =
Handle(StepDimTol_GeoTolAndGeoTolWthMaxTol)::DownCast(theEnt);
- theType = STEPCAFControl_GDTProperty::GetGeomToleranceType(anE->GetToleranceType());
+ theType = STEPConstruct_GDTProperty::GetGeomToleranceType(anE->GetToleranceType());
}
else if (theEnt->IsKind(STANDARD_TYPE(StepDimTol_GeoTolAndGeoTolWthMod)))
{
Handle(StepDimTol_GeoTolAndGeoTolWthMod) anE =
Handle(StepDimTol_GeoTolAndGeoTolWthMod)::DownCast(theEnt);
- theType = STEPCAFControl_GDTProperty::GetGeomToleranceType(anE->GetToleranceType());
+ theType = STEPConstruct_GDTProperty::GetGeomToleranceType(anE->GetToleranceType());
}
else if (theEnt->IsKind(STANDARD_TYPE(StepDimTol_GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol)))
{
Handle(StepDimTol_GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol) anE =
Handle(StepDimTol_GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol)::DownCast(theEnt);
- theType = STEPCAFControl_GDTProperty::GetGeomToleranceType(anE->GetToleranceType());
+ theType = STEPConstruct_GDTProperty::GetGeomToleranceType(anE->GetToleranceType());
}
else if(theEnt->IsKind(STANDARD_TYPE(StepDimTol_AngularityTolerance)))
{
if(anIter.Value()->IsKind(STANDARD_TYPE(StepDimTol_ToleranceZone))){
Handle(StepDimTol_ToleranceZoneForm) aForm
= Handle(StepDimTol_ToleranceZone)::DownCast(anIter.Value())->Form();
- STEPCAFControl_GDTProperty::GetTolValueType(aForm->Name(), aTypeV);
+ STEPConstruct_GDTProperty::GetTolValueType(aForm->Name(), aTypeV);
Interface_EntityIterator anIt = aGraph.Sharings(anIter.Value());
for(anIt.Start(); anIt.More(); anIt.Next()) {
if(anIt.Value()->IsKind(STANDARD_TYPE(StepDimTol_ProjectedZoneDefinition))){
#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);
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 :
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
StepVisual_AnnotationOccurrence::StepVisual_AnnotationOccurrence () {}
+
+
-
DEFINE_STANDARD_RTTIEXT(StepVisual_AnnotationOccurrence,StepVisual_StyledItem)
protected:
--- /dev/null
+// 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
--- /dev/null
+// 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
#include <Interface_Macros.hxx>
#include <StepVisual_AnnotationCurveOccurrence.hxx>
+#include <StepVisual_TessellatedAnnotationOccurrence.hxx>
+
//=======================================================================
//function : StepVisual_DraughtingCalloutElement
//purpose :
{
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()); }
+
#include <Standard_Integer.hxx>
class Standard_Transient;
class StepVisual_AnnotationCurveOccurrence;
+class StepVisual_TessellatedAnnotationOccurrence;
class StepVisual_DraughtingCalloutElement : public StepData_SelectType
{
//! 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
--- /dev/null
+// 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 () {}
--- /dev/null
+// 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
--- /dev/null
+// 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
--- /dev/null
+// 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
--- /dev/null
+// 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
--- /dev/null
+// 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
--- /dev/null
+// 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
--- /dev/null
+// 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
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; }
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);
}