#include <BinMXCAFDoc_ColorDriver.hxx>
#include <BinMXCAFDoc_ColorToolDriver.hxx>
#include <BinMXCAFDoc_DatumDriver.hxx>
+#include <BinMXCAFDoc_GeomToleranceDriver.hxx>
+#include <BinMXCAFDoc_DimensionDriver.hxx>
#include <BinMXCAFDoc_DimTolDriver.hxx>
#include <BinMXCAFDoc_DimTolToolDriver.hxx>
#include <BinMXCAFDoc_DocumentToolDriver.hxx>
theDriverTable->AddDriver( aLocationDriver);
theDriverTable->AddDriver( new BinMXCAFDoc_VolumeDriver (theMsgDrv));
theDriverTable->AddDriver( new BinMXCAFDoc_DatumDriver (theMsgDrv));
+ theDriverTable->AddDriver( new BinMXCAFDoc_GeomToleranceDriver (theMsgDrv));
+ theDriverTable->AddDriver( new BinMXCAFDoc_DimensionDriver (theMsgDrv));
theDriverTable->AddDriver( new BinMXCAFDoc_DimTolDriver (theMsgDrv));
theDriverTable->AddDriver( new BinMXCAFDoc_MaterialDriver (theMsgDrv));
class BinMXCAFDoc_LocationDriver;
class BinMXCAFDoc_VolumeDriver;
class BinMXCAFDoc_DatumDriver;
+class BinMXCAFDoc_GeomToleranceDriver;
+class BinMXCAFDoc_DimensionDriver;
class BinMXCAFDoc_DimTolDriver;
class BinMXCAFDoc_MaterialDriver;
class BinMXCAFDoc_ColorToolDriver;
friend class BinMXCAFDoc_LocationDriver;
friend class BinMXCAFDoc_VolumeDriver;
friend class BinMXCAFDoc_DatumDriver;
+friend class BinMXCAFDoc_GeomToleranceDriver;
+friend class BinMXCAFDoc_DimensionDriver;
friend class BinMXCAFDoc_DimTolDriver;
friend class BinMXCAFDoc_MaterialDriver;
friend class BinMXCAFDoc_ColorToolDriver;
--- /dev/null
+// Created on:
+// Created by:
+// 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 <BinMXCAFDoc_DimensionDriver.hxx>
+#include <BinObjMgt_Persistent.hxx>
+#include <CDM_MessageDriver.hxx>
+#include <Standard_Type.hxx>
+#include <TCollection_HAsciiString.hxx>
+#include <TColStd_Array1OfReal.hxx>
+#include <TColStd_HArray1OfReal.hxx>
+#include <TDF_Attribute.hxx>
+#include <XCAFDoc_Dimension.hxx>
+
+IMPLEMENT_STANDARD_RTTIEXT(BinMXCAFDoc_DimensionDriver,BinMDF_ADriver)
+
+//=======================================================================
+//function : Constructor
+//purpose :
+//=======================================================================
+BinMXCAFDoc_DimensionDriver::BinMXCAFDoc_DimensionDriver (const Handle(CDM_MessageDriver)& theMsgDriver)
+: BinMDF_ADriver(theMsgDriver, STANDARD_TYPE(XCAFDoc_Dimension)->Name())
+{
+}
+
+//=======================================================================
+//function : NewEmpty
+//purpose :
+//=======================================================================
+Handle(TDF_Attribute) BinMXCAFDoc_DimensionDriver::NewEmpty() const
+{
+ return new XCAFDoc_Dimension();
+}
+
+//=======================================================================
+//function : Paste
+//purpose :
+//=======================================================================
+Standard_Boolean BinMXCAFDoc_DimensionDriver::Paste (const BinObjMgt_Persistent& /*theSource*/,
+ const Handle(TDF_Attribute)& /*theTarget*/,
+ BinObjMgt_RRelocationTable& /*theRelocTable*/) const
+{
+ //Handle(XCAFDoc_Dimension) anAtt = Handle(XCAFDoc_Dimension)::DownCast(theTarget);
+ return Standard_True;
+}
+
+//=======================================================================
+//function : Paste
+//purpose :
+//=======================================================================
+void BinMXCAFDoc_DimensionDriver::Paste (const Handle(TDF_Attribute)& /*theSource*/,
+ BinObjMgt_Persistent& /*theTarget*/,
+ BinObjMgt_SRelocationTable& /*theRelocTable*/) const
+{
+ //Handle(XCAFDoc_Dimension) anAtt = Handle(XCAFDoc_Dimension)::DownCast(theSource);
+}
--- /dev/null
+// Created on:
+// Created by:
+// Copyright (c) 20015 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 _BinMXCAFDoc_DimensionDriver_HeaderFile
+#define _BinMXCAFDoc_DimensionDriver_HeaderFile
+
+#include <Standard.hxx>
+#include <Standard_Type.hxx>
+
+#include <BinMDF_ADriver.hxx>
+#include <Standard_Boolean.hxx>
+#include <BinObjMgt_RRelocationTable.hxx>
+#include <BinObjMgt_SRelocationTable.hxx>
+
+class CDM_MessageDriver;
+class TDF_Attribute;
+class BinObjMgt_Persistent;
+
+class BinMXCAFDoc_DimensionDriver;
+DEFINE_STANDARD_HANDLE(BinMXCAFDoc_DimensionDriver, BinMDF_ADriver)
+
+class BinMXCAFDoc_DimensionDriver : public BinMDF_ADriver
+{
+
+public:
+
+
+ Standard_EXPORT BinMXCAFDoc_DimensionDriver (const Handle(CDM_MessageDriver)& theMsgDriver);
+
+ Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
+
+ Standard_EXPORT virtual Standard_Boolean Paste (const BinObjMgt_Persistent& theSource,
+ const Handle(TDF_Attribute)& theTarget,
+ BinObjMgt_RRelocationTable& theRelocTable) const Standard_OVERRIDE;
+
+ Standard_EXPORT virtual void Paste (const Handle(TDF_Attribute)& theSource,
+ BinObjMgt_Persistent& theTarget,
+ BinObjMgt_SRelocationTable& theRelocTable) const Standard_OVERRIDE;
+
+ DEFINE_STANDARD_RTTIEXT(BinMXCAFDoc_DimensionDriver,BinMDF_ADriver)
+
+};
+
+#endif // _BinMXCAFDoc_DimensionDriver_HeaderFile
--- /dev/null
+// Created on:
+// Created by:
+// 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 <BinMXCAFDoc_GeomToleranceDriver.hxx>
+#include <BinObjMgt_Persistent.hxx>
+#include <CDM_MessageDriver.hxx>
+#include <Standard_Type.hxx>
+#include <TCollection_HAsciiString.hxx>
+#include <TColStd_Array1OfReal.hxx>
+#include <TColStd_HArray1OfReal.hxx>
+#include <TDF_Attribute.hxx>
+#include <XCAFDoc_GeomTolerance.hxx>
+
+IMPLEMENT_STANDARD_RTTIEXT(BinMXCAFDoc_GeomToleranceDriver,BinMDF_ADriver)
+
+//=======================================================================
+//function : Constructor
+//purpose :
+//=======================================================================
+BinMXCAFDoc_GeomToleranceDriver::BinMXCAFDoc_GeomToleranceDriver (const Handle(CDM_MessageDriver)& theMsgDriver)
+: BinMDF_ADriver(theMsgDriver, STANDARD_TYPE(XCAFDoc_GeomTolerance)->Name())
+{
+}
+
+//=======================================================================
+//function : NewEmpty
+//purpose :
+//=======================================================================
+Handle(TDF_Attribute) BinMXCAFDoc_GeomToleranceDriver::NewEmpty() const
+{
+ return new XCAFDoc_GeomTolerance();
+}
+
+//=======================================================================
+//function : Paste
+//purpose :
+//=======================================================================
+Standard_Boolean BinMXCAFDoc_GeomToleranceDriver::Paste (const BinObjMgt_Persistent& /*theSource*/,
+ const Handle(TDF_Attribute)& /*theTarget*/,
+ BinObjMgt_RRelocationTable& /*theRelocTable*/) const
+{
+ //Handle(XCAFDoc_GeomTolerance) anAtt = Handle(XCAFDoc_GeomTolerance)::DownCast(theTarget);
+ return Standard_True;
+}
+
+//=======================================================================
+//function : Paste
+//purpose :
+//=======================================================================
+void BinMXCAFDoc_GeomToleranceDriver::Paste (const Handle(TDF_Attribute)& /*theSource*/,
+ BinObjMgt_Persistent& /*theTarget*/,
+ BinObjMgt_SRelocationTable& /*theRelocTable*/) const
+{
+ //Handle(XCAFDoc_GeomTolerance) anAtt = Handle(XCAFDoc_GeomTolerance)::DownCast(theSource);
+}
--- /dev/null
+// Created on:
+// Created by:
+// Copyright (c) 20015 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 _BinMXCAFDoc_GeomToleranceDriver_HeaderFile
+#define _BinMXCAFDoc_GeomToleranceDriver_HeaderFile
+
+#include <Standard.hxx>
+#include <Standard_Type.hxx>
+
+#include <BinMDF_ADriver.hxx>
+#include <Standard_Boolean.hxx>
+#include <BinObjMgt_RRelocationTable.hxx>
+#include <BinObjMgt_SRelocationTable.hxx>
+
+class CDM_MessageDriver;
+class TDF_Attribute;
+class BinObjMgt_Persistent;
+
+class BinMXCAFDoc_GeomToleranceDriver;
+DEFINE_STANDARD_HANDLE(BinMXCAFDoc_GeomToleranceDriver, BinMDF_ADriver)
+
+class BinMXCAFDoc_GeomToleranceDriver : public BinMDF_ADriver
+{
+
+public:
+
+
+ Standard_EXPORT BinMXCAFDoc_GeomToleranceDriver (const Handle(CDM_MessageDriver)& theMsgDriver);
+
+ Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
+
+ Standard_EXPORT virtual Standard_Boolean Paste (const BinObjMgt_Persistent& theSource,
+ const Handle(TDF_Attribute)& theTarget,
+ BinObjMgt_RRelocationTable& theRelocTable) const Standard_OVERRIDE;
+
+ Standard_EXPORT virtual void Paste (const Handle(TDF_Attribute)& theSource,
+ BinObjMgt_Persistent& theTarget,
+ BinObjMgt_SRelocationTable& theRelocTable) const Standard_OVERRIDE;
+
+ DEFINE_STANDARD_RTTIEXT(BinMXCAFDoc_GeomToleranceDriver,BinMDF_ADriver)
+
+};
+
+#endif // _BinMXCAFDoc_GeomToleranceDriver_HeaderFile
BinMXCAFDoc_ColorToolDriver.hxx
BinMXCAFDoc_DatumDriver.cxx
BinMXCAFDoc_DatumDriver.hxx
+BinMXCAFDoc_DimensionDriver.cxx
+BinMXCAFDoc_DimensionDriver.hxx
BinMXCAFDoc_DimTolDriver.cxx
BinMXCAFDoc_DimTolDriver.hxx
BinMXCAFDoc_DimTolToolDriver.cxx
BinMXCAFDoc_DimTolToolDriver.hxx
BinMXCAFDoc_DocumentToolDriver.cxx
BinMXCAFDoc_DocumentToolDriver.hxx
+BinMXCAFDoc_GeomToleranceDriver.cxx
+BinMXCAFDoc_GeomToleranceDriver.hxx
BinMXCAFDoc_GraphNodeDriver.cxx
BinMXCAFDoc_GraphNodeDriver.hxx
BinMXCAFDoc_LayerToolDriver.cxx
#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 <RWStepRepr_RWCompShAspAndDatumFeatAndShAsp.hxx>
#include <RWStepRepr_RWIntegerRepresentationItem.hxx>
#include <RWStepRepr_RWValueRepresentationItem.hxx>
+#include <RWStepAP242_RWDraughtingModelItemAssociation.hxx>
#include <RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.hxx>
#include <RWStepDimTol_RWGeoTolAndGeoTolWthMaxTol.hxx>
+#include <RWStepVisual_RWAnnotationCurveOccurrence.hxx>
+#include <RWStepVisual_RWAnnotationOccurrence.hxx>
+#include <RWStepVisual_RWAnnotationPlane.hxx>
+#include <RWStepVisual_RWDraughtingCallout.hxx>
#include <StepRepr_Apex.hxx>
#include <StepRepr_CentreOfSymmetry.hxx>
#include <StepRepr_CompShAspAndDatumFeatAndShAsp.hxx>
#include <StepRepr_IntegerRepresentationItem.hxx>
#include <StepRepr_ValueRepresentationItem.hxx>
+#include <StepAP242_DraughtingModelItemAssociation.hxx>
#include <StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.hxx>
#include <StepDimTol_GeoTolAndGeoTolWthMaxTol.hxx>
+#include <StepVisual_AnnotationCurveOccurrence.hxx>
+#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;
tool.Share(anent,iter);
}
break;
+ case 4:
+ {
+ DeclareAndCast(StepVisual_AnnotationCurveOccurrence,anent,ent);
+ RWStepVisual_RWAnnotationCurveOccurrence tool;
+ tool.Share(anent,iter);
+ }
+ break;
case 7:
{
- DeclareAndCast(StepVisual_StyledItem,anent,ent);
- RWStepVisual_RWStyledItem tool;
+ DeclareAndCast(StepVisual_AnnotationOccurrence,anent,ent);
+ RWStepVisual_RWAnnotationOccurrence tool;
tool.Share(anent,iter);
}
break;
tool.Share(anent,iter);
}
break;
+ case 107:
+ {
+ DeclareAndCast(StepVisual_DraughtingCallout,anent,ent);
+ RWStepVisual_RWDraughtingCallout tool;
+ tool.Share(anent,iter);
+ }
+ break;
case 116:
{
DeclareAndCast(StepShape_EdgeCurve,anent,ent);
tool.Share(anent,iter);
}
break;
+ case 703:
+ {
+ DeclareAndCast(StepAP242_DraughtingModelItemAssociation,anent,ent);
+ RWStepAP242_RWDraughtingModelItemAssociation tool;
+ tool.Share(anent,iter);
+ }
+ break;
+ case 704:
+ {
+ DeclareAndCast(StepVisual_AnnotationPlane,anent,ent);
+ RWStepVisual_RWAnnotationPlane tool;
+ tool.Share(anent,iter);
+ }
+ break;
case 705:
{
DeclareAndCast(StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol,anent,ent);
tool.Share(anent,iter);
}
break;
-
+ case 707:
+ {
+ DeclareAndCast(StepVisual_TessellatedAnnotationOccurrence,anent,ent);
+ RWStepVisual_RWTessellatedAnnotationOccurrence tool;
+ tool.Share(anent,iter);
+ }
+ break;
+ case 709:
+ {
+ DeclareAndCast(StepVisual_TessellatedGeometricSet,anent,ent);
+ RWStepVisual_RWTessellatedGeometricSet tool;
+ tool.Share(anent,iter);
+ }
+ break;
default : break;
}
}
case 3 :
ent = new StepShape_AdvancedFace;
break;
+ case 4 :
+ ent = new StepVisual_AnnotationCurveOccurrence;
+ break;
case 7 :
ent = new StepVisual_AnnotationOccurrence;
break;
case 106 :
ent = new StepVisual_AnnotationOccurrence;
break;
+ case 107 :
+ ent = new StepVisual_DraughtingCallout;
+ break;
case 108 :
ent = new StepVisual_DraughtingPreDefinedColour;
break;
case 702:
ent = new StepRepr_FeatureForDatumTargetRelationship;
break;
- case 705 :
+ case 703:
+ ent = new StepAP242_DraughtingModelItemAssociation;
+ break;
+ case 704:
+ ent = new StepVisual_AnnotationPlane;
+ break;
+ case 705:
ent = new StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol;
break;
- case 706 :
+ case 706:
ent = new StepDimTol_GeoTolAndGeoTolWthMaxTol;
break;
+ case 707:
+ ent = new StepVisual_TessellatedAnnotationOccurrence;
+ break;
+
+ case 708:
+ ent = new StepVisual_TessellatedItem;
+ break;
+
+ case 709:
+ ent = new StepVisual_TessellatedGeometricSet;
+ break;
+
+ case 710:
+ ent = new StepVisual_TessellatedCurveSet;
+ break;
+
+ case 711:
+ ent = new StepVisual_CoordinatesList;
+ break;
+
default:
return Standard_False;
}
case 699:
case 700:
case 701:
- case 702: return catdr;
+ case 702:
+ 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 <RWStepRepr_RWCompShAspAndDatumFeatAndShAsp.hxx>
#include <RWStepRepr_RWIntegerRepresentationItem.hxx>
#include <RWStepRepr_RWValueRepresentationItem.hxx>
+#include <RWStepRepr_RWValueRepresentationItem.hxx>
+#include <RWStepAP242_RWDraughtingModelItemAssociation.hxx>
#include <RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.hxx>
#include <RWStepDimTol_RWGeoTolAndGeoTolWthMaxTol.hxx>
+#include <RWStepVisual_RWAnnotationCurveOccurrence.hxx>
+#include <RWStepVisual_RWAnnotationOccurrence.hxx>
+#include <RWStepVisual_RWAnnotationPlane.hxx>
+#include <RWStepVisual_RWDraughtingCallout.hxx>
#include <StepRepr_Apex.hxx>
#include <StepRepr_CentreOfSymmetry.hxx>
#include <StepRepr_CompShAspAndDatumFeatAndShAsp.hxx>
#include <StepRepr_IntegerRepresentationItem.hxx>
#include <StepRepr_ValueRepresentationItem.hxx>
+#include <StepAP242_DraughtingModelItemAssociation.hxx>
#include <StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.hxx>
#include <StepDimTol_GeoTolAndGeoTolWthMaxTol.hxx>
-
+#include <StepVisual_AnnotationCurveOccurrence.hxx>
+#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_IntegerRepresentationItem("INTEGER_REPRESENTATION_ITEM");
static TCollection_AsciiString Reco_ValueRepresentationItem("VALUE_REPRESENTATION_ITEM");
static TCollection_AsciiString Reco_FeatureForDatumTargetRelationship("FEATURE_FOR_DATUM_TARGET_RELATIONSHIP");
+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_IntegerRepresentationItem, 700);
typenums->SetItem (Reco_ValueRepresentationItem, 701);
typenums->SetItem (Reco_FeatureForDatumTargetRelationship, 702);
+ 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
typeshor->SetItem ("TLZNFR",684);
typeshor->SetItem ("INRPIT",700);
typeshor->SetItem ("VLRPIT",701);
+ typeshor->SetItem ("DMIA", 703);
+ typeshor->SetItem ("ANNPLN", 704);
}
case 700: return Reco_IntegerRepresentationItem;
case 701: return Reco_ValueRepresentationItem;
case 702: return Reco_FeatureForDatumTargetRelationship;
+ 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 4 :
+ {
+ DeclareAndCast(StepVisual_AnnotationCurveOccurrence, anent, ent);
+ RWStepVisual_RWAnnotationCurveOccurrence tool;
+ tool.ReadStep (data,num,ach,anent);
+ }
+ break;
case 7 :
{
- DeclareAndCast(StepVisual_StyledItem, anent, ent);
- RWStepVisual_RWStyledItem tool;
+ DeclareAndCast(StepVisual_AnnotationOccurrence, anent, ent);
+ RWStepVisual_RWAnnotationOccurrence tool;
tool.ReadStep (data,num,ach,anent);
}
tool.ReadStep (data,num,ach,anent);
}
+ break;
+ case 107 :
+ {
+ DeclareAndCast(StepVisual_DraughtingCallout, anent, ent);
+ RWStepVisual_RWDraughtingCallout tool;
+ tool.ReadStep (data,num,ach,anent);
+ }
break;
case 108 :
{
tool.ReadStep (data,num,ach,anent);
}
break;
+ case 703:
+ {
+ DeclareAndCast(StepAP242_DraughtingModelItemAssociation,anent,ent);
+ RWStepAP242_RWDraughtingModelItemAssociation tool;
+ tool.ReadStep (data,num,ach,anent);
+ }
+ break;
+ case 704:
+ {
+ DeclareAndCast(StepVisual_AnnotationPlane,anent,ent);
+ RWStepVisual_RWAnnotationPlane tool;
+ tool.ReadStep (data,num,ach,anent);
+ }
+ break;
case 705:
{
DeclareAndCast(StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol,anent,ent);
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 4 :
+ {
+ DeclareAndCast(StepVisual_AnnotationCurveOccurrence, anent, ent);
+ RWStepVisual_RWAnnotationCurveOccurrence tool;
+ tool.WriteStep (SW,anent);
+ }
break;
case 7 :
{
- DeclareAndCast(StepVisual_StyledItem, anent, ent);
- RWStepVisual_RWStyledItem tool;
-// if (anent.IsNull()) return;
+ DeclareAndCast(StepVisual_AnnotationOccurrence, anent, ent);
+ RWStepVisual_RWAnnotationOccurrence tool;
tool.WriteStep (SW,anent);
}
tool.WriteStep (SW,anent);
}
+ break;
+ case 107 :
+ {
+ DeclareAndCast(StepVisual_DraughtingCallout, anent, ent);
+ RWStepVisual_RWDraughtingCallout tool;
+ tool.WriteStep (SW,anent);
+ }
break;
case 108 :
{
tool.WriteStep (SW,anent);
}
break;
+ case 703:
+ {
+ DeclareAndCast(StepAP242_DraughtingModelItemAssociation,anent,ent);
+ RWStepAP242_RWDraughtingModelItemAssociation tool;
+ tool.WriteStep (SW,anent);
+ }
+ break;
+ case 704:
+ {
+ DeclareAndCast(StepVisual_AnnotationPlane,anent,ent);
+ RWStepVisual_RWAnnotationPlane tool;
+ tool.WriteStep (SW,anent);
+ }
+ break;
case 705:
{
DeclareAndCast(StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol,anent,ent);
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;
+RWStepAP242_RWDraughtingModelItemAssociation.cxx
+RWStepAP242_RWDraughtingModelItemAssociation.hxx
RWStepAP242_RWGeometricItemSpecificUsage.cxx
RWStepAP242_RWGeometricItemSpecificUsage.hxx
RWStepAP242_RWIdAttribute.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 <RWStepAP242_RWDraughtingModelItemAssociation.hxx>
+#include <Interface_EntityIterator.hxx>
+#include <StepData_StepReaderData.hxx>
+#include <StepData_StepWriter.hxx>
+#include <StepAP242_DraughtingModelItemAssociation.hxx>
+#include <StepRepr_HArray1OfRepresentationItem.hxx>
+#include <StepRepr_Representation.hxx>
+
+//=======================================================================
+//function : RWStepAP242_RWDraughtingModelItemAssociation
+//purpose :
+//=======================================================================
+RWStepAP242_RWDraughtingModelItemAssociation::RWStepAP242_RWDraughtingModelItemAssociation () {}
+
+//=======================================================================
+//function : ReadStep
+//purpose :
+//=======================================================================
+void RWStepAP242_RWDraughtingModelItemAssociation::ReadStep
+ (const Handle(StepData_StepReaderData)& data,
+ const Standard_Integer num,
+ Handle(Interface_Check)& ach,
+ const Handle(StepAP242_DraughtingModelItemAssociation)& ent) const
+{
+ // Number of Parameter Control
+ if (!data->CheckNbParams(num,5,ach,"geometric_item_specific_usage")) return;
+
+ // Inherited fields of ItemIdentifiedRepresentationUsage
+ Handle(TCollection_HAsciiString) aName;
+ data->ReadString (num,1,"item_identified_representation_usage.name",ach,aName);
+
+ Handle(TCollection_HAsciiString) aDescription;
+ if (data->IsParamDefined (num,2)) {
+ data->ReadString (num,2,"item_identified_representation_usage.description",ach,aDescription);
+ }
+
+ StepAP242_ItemIdentifiedRepresentationUsageDefinition aDefinition;
+ data->ReadEntity(num,3,"item_identified_representation_usage.definition",ach,aDefinition);
+
+ Handle(StepRepr_Representation) aRepresentation;
+ data->ReadEntity (num,4,"item_identified_representation_usage.used_representation",ach,STANDARD_TYPE(StepRepr_Representation), aRepresentation);
+
+ Handle(StepRepr_HArray1OfRepresentationItem) anItems;
+ Handle(StepRepr_RepresentationItem) anEnt;
+ Standard_Integer nbSub;
+ Interface_ParamType aType = data->ParamType(num, 5);
+ if (aType == Interface_ParamIdent) {
+ data->ReadEntity(num, 5,"item_identified_representation_usage.identified_item", ach, STANDARD_TYPE(StepRepr_RepresentationItem), anEnt);
+ anItems = new StepRepr_HArray1OfRepresentationItem (1, 1);
+ anItems->SetValue(1, anEnt);
+ }
+ else if (data->ReadSubList (num,5,"item_identified_representation_usage.identified_item",ach,nbSub)) {
+ Standard_Integer nbElements = data->NbParams(nbSub);
+ anItems = new StepRepr_HArray1OfRepresentationItem (1, nbElements);
+ for (Standard_Integer i = 1; i <= nbElements; i++) {
+ if (data->ReadEntity(nbSub, i,"representation_item", ach,
+ STANDARD_TYPE(StepRepr_RepresentationItem), anEnt))
+ anItems->SetValue(i, anEnt);
+ }
+ }
+
+ // Initialisation of the read entity
+ ent->Init(aName, aDescription, aDefinition, aRepresentation, anItems);
+}
+
+//=======================================================================
+//function : WriteStep
+//purpose :
+//=======================================================================
+void RWStepAP242_RWDraughtingModelItemAssociation::WriteStep
+ (StepData_StepWriter& SW,
+ const Handle(StepAP242_DraughtingModelItemAssociation)& ent) const
+{
+ // Inherited fields of ItemIdentifiedRepresentationUsage
+ SW.Send(ent->Name());
+
+ SW.Send(ent->Description());
+
+ SW.Send(ent->Definition().Value());
+
+ SW.Send(ent->UsedRepresentation());
+
+ if (ent->NbIdentifiedItem() == 1)
+ SW.Send(ent->IdentifiedItemValue(1));
+ else {
+ SW.OpenSub();
+ for (Standard_Integer i = 1; i <= ent->NbIdentifiedItem(); i++) {
+ SW.Send(ent->IdentifiedItemValue(i));
+ }
+ SW.CloseSub();
+ }
+}
+
+//=======================================================================
+//function : Share
+//purpose :
+//=======================================================================
+void RWStepAP242_RWDraughtingModelItemAssociation::Share(
+ const Handle(StepAP242_DraughtingModelItemAssociation)& ent,
+ Interface_EntityIterator& iter) const
+{
+ // Inherited fields of ItemIdentifiedRepresentationUsage
+
+ iter.AddItem(ent->Definition().Value());
+ Standard_Integer i, nb = ent->NbIdentifiedItem();
+ for (i = 1; i <= nb; i++)
+ iter.AddItem (ent->IdentifiedItemValue(i));
+}
+
--- /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.
+
+#ifndef _RWStepAP242_RWDraughtingModelItemAssociation_HeaderFile
+#define _RWStepAP242_RWDraughtingModelItemAssociation_HeaderFile
+
+#include <Standard.hxx>
+#include <Standard_DefineAlloc.hxx>
+#include <Standard_Handle.hxx>
+
+#include <Standard_Integer.hxx>
+
+class StepData_StepReaderData;
+class Interface_Check;
+class StepAP242_DraughtingModelItemAssociation;
+class StepData_StepWriter;
+class Interface_EntityIterator;
+
+//! Read & Write Module for DraughtingModelItemAssociation
+class RWStepAP242_RWDraughtingModelItemAssociation
+{
+public:
+
+ DEFINE_STANDARD_ALLOC
+
+ Standard_EXPORT RWStepAP242_RWDraughtingModelItemAssociation();
+
+ Standard_EXPORT void ReadStep (const Handle(StepData_StepReaderData)& data, const Standard_Integer num, Handle(Interface_Check)& ach, const Handle(StepAP242_DraughtingModelItemAssociation)& ent) const;
+
+ Standard_EXPORT void WriteStep (StepData_StepWriter& SW, const Handle(StepAP242_DraughtingModelItemAssociation)& ent) const;
+
+ Standard_EXPORT void Share (const Handle(StepAP242_DraughtingModelItemAssociation)& ent, Interface_EntityIterator& iter) const;
+};
+#endif // _RWStepAP242_RWDraughtingModelItemAssociation_HeaderFile
+RWStepVisual_RWAnnotationCurveOccurrence.cxx
+RWStepVisual_RWAnnotationCurveOccurrence.hxx
+RWStepVisual_RWAnnotationOccurrence.cxx
+RWStepVisual_RWAnnotationOccurrence.hxx
+RWStepVisual_RWAnnotationPlane.cxx
+RWStepVisual_RWAnnotationPlane.hxx
RWStepVisual_RWAreaInSet.cxx
RWStepVisual_RWAreaInSet.hxx
RWStepVisual_RWBackgroundColour.cxx
RWStepVisual_RWCurveStyleFont.hxx
RWStepVisual_RWCurveStyleFontPattern.cxx
RWStepVisual_RWCurveStyleFontPattern.hxx
+RWStepVisual_RWDraughtingCallout.cxx
+RWStepVisual_RWDraughtingCallout.hxx
RWStepVisual_RWDraughtingModel.cxx
RWStepVisual_RWDraughtingModel.hxx
RWStepVisual_RWDraughtingPreDefinedColour.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
+
+
--- /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_RWAnnotationCurveOccurrence.hxx>
+#include <StepData_StepReaderData.hxx>
+#include <StepData_StepWriter.hxx>
+#include <StepRepr_RepresentationItem.hxx>
+#include <StepVisual_HArray1OfPresentationStyleAssignment.hxx>
+#include <StepVisual_PresentationStyleAssignment.hxx>
+#include <StepVisual_AnnotationCurveOccurrence.hxx>
+
+//=======================================================================
+//function : RWStepVisual_RWAnnotationCurveOccurrence
+//purpose :
+//=======================================================================
+RWStepVisual_RWAnnotationCurveOccurrence::RWStepVisual_RWAnnotationCurveOccurrence () {}
+
+//=======================================================================
+//function : ReadStep
+//purpose :
+//=======================================================================
+void RWStepVisual_RWAnnotationCurveOccurrence::ReadStep
+ (const Handle(StepData_StepReaderData)& data,
+ const Standard_Integer num,
+ Handle(Interface_Check)& ach,
+ const Handle(StepVisual_AnnotationCurveOccurrence)& 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);
+}
+
+//=======================================================================
+//function : WriteStep
+//purpose :
+//=======================================================================
+void RWStepVisual_RWAnnotationCurveOccurrence::WriteStep
+ (StepData_StepWriter& SW,
+ const Handle(StepVisual_AnnotationCurveOccurrence)& 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_RWAnnotationCurveOccurrence::Share(const Handle(StepVisual_AnnotationCurveOccurrence)& 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: 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.
+
+#ifndef _RWStepVisual_RWAnnotationCurveOccurrence_HeaderFile
+#define _RWStepVisual_RWAnnotationCurveOccurrence_HeaderFile
+
+#include <Standard.hxx>
+#include <Standard_DefineAlloc.hxx>
+#include <Standard_Handle.hxx>
+
+#include <Standard_Integer.hxx>
+class StepData_StepReaderData;
+class Interface_Check;
+class StepVisual_AnnotationCurveOccurrence;
+class StepData_StepWriter;
+class Interface_EntityIterator;
+
+//! Read & Write Module for AnnotationCurveOccurrence
+class RWStepVisual_RWAnnotationCurveOccurrence
+{
+public:
+
+ DEFINE_STANDARD_ALLOC
+
+ Standard_EXPORT RWStepVisual_RWAnnotationCurveOccurrence();
+
+ Standard_EXPORT void ReadStep (const Handle(StepData_StepReaderData)& data, const Standard_Integer num, Handle(Interface_Check)& ach, const Handle(StepVisual_AnnotationCurveOccurrence)& ent) const;
+
+ Standard_EXPORT void WriteStep (StepData_StepWriter& SW, const Handle(StepVisual_AnnotationCurveOccurrence)& ent) const;
+
+ Standard_EXPORT void Share (const Handle(StepVisual_AnnotationCurveOccurrence)& ent, Interface_EntityIterator& iter) const;
+};
+#endif // _RWStepVisual_RWAnnotationCurveOccurrence_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_RWAnnotationOccurrence.hxx>
+#include <StepData_StepReaderData.hxx>
+#include <StepData_StepWriter.hxx>
+#include <StepRepr_RepresentationItem.hxx>
+#include <StepVisual_HArray1OfPresentationStyleAssignment.hxx>
+#include <StepVisual_PresentationStyleAssignment.hxx>
+#include <StepVisual_AnnotationOccurrence.hxx>
+
+//=======================================================================
+//function : RWStepVisual_RWAnnotationOccurrence
+//purpose :
+//=======================================================================
+RWStepVisual_RWAnnotationOccurrence::RWStepVisual_RWAnnotationOccurrence () {}
+
+//=======================================================================
+//function : ReadStep
+//purpose :
+//=======================================================================
+void RWStepVisual_RWAnnotationOccurrence::ReadStep
+ (const Handle(StepData_StepReaderData)& data,
+ const Standard_Integer num,
+ Handle(Interface_Check)& ach,
+ const Handle(StepVisual_AnnotationOccurrence)& ent) const
+{
+ // Number of Parameter Control
+ if (!data->CheckNbParams(num, 3, ach, "annotation_occurrence")) 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);
+}
+
+//=======================================================================
+//function : WriteStep
+//purpose :
+//=======================================================================
+void RWStepVisual_RWAnnotationOccurrence::WriteStep
+ (StepData_StepWriter& SW,
+ const Handle(StepVisual_AnnotationOccurrence)& 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_RWAnnotationOccurrence::Share(const Handle(StepVisual_AnnotationOccurrence)& 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: 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.
+
+#ifndef _RWStepVisual_RWAnnotationOccurrence_HeaderFile
+#define _RWStepVisual_RWAnnotationOccurrence_HeaderFile
+
+#include <Standard.hxx>
+#include <Standard_DefineAlloc.hxx>
+#include <Standard_Handle.hxx>
+
+#include <Standard_Integer.hxx>
+class StepData_StepReaderData;
+class Interface_Check;
+class StepVisual_AnnotationOccurrence;
+class StepData_StepWriter;
+class Interface_EntityIterator;
+
+//! Read & Write Module for AnnotationOccurrence
+class RWStepVisual_RWAnnotationOccurrence
+{
+public:
+
+ DEFINE_STANDARD_ALLOC
+
+ Standard_EXPORT RWStepVisual_RWAnnotationOccurrence();
+
+ Standard_EXPORT void ReadStep (const Handle(StepData_StepReaderData)& data, const Standard_Integer num, Handle(Interface_Check)& ach, const Handle(StepVisual_AnnotationOccurrence)& ent) const;
+
+ Standard_EXPORT void WriteStep (StepData_StepWriter& SW, const Handle(StepVisual_AnnotationOccurrence)& ent) const;
+
+ Standard_EXPORT void Share (const Handle(StepVisual_AnnotationOccurrence)& ent, Interface_EntityIterator& iter) const;
+};
+#endif // _RWStepVisual_RWAnnotationOccurrence_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_RWAnnotationPlane.hxx>
+#include <StepData_StepReaderData.hxx>
+#include <StepData_StepWriter.hxx>
+#include <StepRepr_RepresentationItem.hxx>
+#include <StepVisual_HArray1OfPresentationStyleAssignment.hxx>
+#include <StepVisual_PresentationStyleAssignment.hxx>
+#include <StepVisual_AnnotationPlane.hxx>
+
+//=======================================================================
+//function : RWStepVisual_RWAnnotationPlane
+//purpose :
+//=======================================================================
+RWStepVisual_RWAnnotationPlane::RWStepVisual_RWAnnotationPlane () {}
+
+//=======================================================================
+//function : ReadStep
+//purpose :
+//=======================================================================
+void RWStepVisual_RWAnnotationPlane::ReadStep
+ (const Handle(StepData_StepReaderData)& data,
+ const Standard_Integer num,
+ Handle(Interface_Check)& ach,
+ const Handle(StepVisual_AnnotationPlane)& ent) const
+{
+ // Number of Parameter Control
+ if (!data->CheckNbParams(num, 4, ach, "annotation_plane")) 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);
+
+ // Own field: elements
+ Handle(StepVisual_HArray1OfAnnotationPlaneElement) anElements;
+ StepVisual_AnnotationPlaneElement anEnt;
+ Standard_Integer nbSub;
+ if (data->ReadSubList (num, 4, "elements", ach, nbSub)) {
+ Standard_Integer nbElements = data->NbParams(nbSub);
+ anElements = new StepVisual_HArray1OfAnnotationPlaneElement (1, nbElements);
+ for (Standard_Integer i = 1; i <= nbElements; i++) {
+ if (data->ReadEntity(nbSub, i,"content", ach, anEnt))
+ anElements->SetValue(i, anEnt);
+ }
+ }
+
+ // Initialisation of the read entity
+ ent->Init(aName, aStyles, aItem, anElements);
+}
+
+//=======================================================================
+//function : WriteStep
+//purpose :
+//=======================================================================
+void RWStepVisual_RWAnnotationPlane::WriteStep
+ (StepData_StepWriter& SW,
+ const Handle(StepVisual_AnnotationPlane)& 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());
+
+ // Own field: elements
+ SW.OpenSub();
+ for (Standard_Integer i = 1; i <= ent->NbElements(); i++) {
+ SW.Send(ent->ElementsValue(i).Value());
+ }
+ SW.CloseSub();
+}
+
+//=======================================================================
+//function : Share
+//purpose :
+//=======================================================================
+void RWStepVisual_RWAnnotationPlane::Share(const Handle(StepVisual_AnnotationPlane)& 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());
+
+ // Own field: contents
+ Standard_Integer i, nb = ent->NbElements();
+ for (i = 1; i <= nb; i++)
+ iter.AddItem (ent->ElementsValue(i).Value());
+}
+
--- /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.
+
+#ifndef _RWStepVisual_RWAnnotationPlane_HeaderFile
+#define _RWStepVisual_RWAnnotationPlane_HeaderFile
+
+#include <Standard.hxx>
+#include <Standard_DefineAlloc.hxx>
+#include <Standard_Handle.hxx>
+
+#include <Standard_Integer.hxx>
+class StepData_StepReaderData;
+class Interface_Check;
+class StepVisual_AnnotationPlane;
+class StepData_StepWriter;
+class Interface_EntityIterator;
+
+//! Read & Write Module for AnnotationPlane
+class RWStepVisual_RWAnnotationPlane
+{
+public:
+
+ DEFINE_STANDARD_ALLOC
+
+ Standard_EXPORT RWStepVisual_RWAnnotationPlane();
+
+ Standard_EXPORT void ReadStep (const Handle(StepData_StepReaderData)& data, const Standard_Integer num, Handle(Interface_Check)& ach, const Handle(StepVisual_AnnotationPlane)& ent) const;
+
+ Standard_EXPORT void WriteStep (StepData_StepWriter& SW, const Handle(StepVisual_AnnotationPlane)& ent) const;
+
+ Standard_EXPORT void Share (const Handle(StepVisual_AnnotationPlane)& ent, Interface_EntityIterator& iter) const;
+};
+#endif // _RWStepVisual_RWAnnotationPlane_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_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 nb3 = data->NbParams(nsub3);
+ if(nb3 > 3) {
+ ach->AddWarning("More than 3 coordinates, ignored");
+ }
+ Standard_Integer nbcoord = Min (nb3, 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());
+
+ // Own field : npoints
+ SW.Send(ent->Points()->Length());
+
+ // Own field : position_coords
+ SW.OpenSub();
+ for (Standard_Integer i = 1; i <= ent->Points()->Length(); i++) {
+ SW.OpenSub();
+ gp_XYZ aPoint = ent->Points()->Value(i);
+ SW.Send(aPoint.X());
+ SW.Send(aPoint.Y());
+ SW.Send(aPoint.Z());
+ SW.CloseSub();
+ }
+ SW.CloseSub();
+}
--- /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;
+};
+#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_RWDraughtingCallout.hxx>
+#include <StepData_StepReaderData.hxx>
+#include <StepData_StepWriter.hxx>
+#include <StepVisual_DraughtingCallout.hxx>
+
+//=======================================================================
+//function : RWStepVisual_RWDraughtingCallout
+//purpose :
+//=======================================================================
+RWStepVisual_RWDraughtingCallout::RWStepVisual_RWDraughtingCallout () {}
+
+//=======================================================================
+//function : ReadStep
+//purpose :
+//=======================================================================
+void RWStepVisual_RWDraughtingCallout::ReadStep(const Handle(StepData_StepReaderData)& data,
+ const Standard_Integer num,
+ Handle(Interface_Check)& ach,
+ const Handle(StepVisual_DraughtingCallout)& ent) const
+{
+ if (!data->CheckNbParams(num, 2, ach, "draughting_callout")) return;
+
+ // Inherited field : name
+ Handle(TCollection_HAsciiString) aName;
+ data->ReadString (num, 1, "name" ,ach, aName);
+
+ // Own field: contents
+ Handle(StepVisual_HArray1OfDraughtingCalloutElement) aContents;
+ StepVisual_DraughtingCalloutElement anEnt;
+ Standard_Integer nbSub;
+ if (data->ReadSubList (num, 2, "contents", ach, nbSub)) {
+ Standard_Integer nbElements = data->NbParams(nbSub);
+ aContents = new StepVisual_HArray1OfDraughtingCalloutElement (1, nbElements);
+ for (Standard_Integer i = 1; i <= nbElements; i++) {
+ if (data->ReadEntity(nbSub, i,"content", ach, anEnt))
+ aContents->SetValue(i, anEnt);
+ }
+ }
+
+ // Initialisation of the read entity
+ ent->Init(aName, aContents);
+}
+
+//=======================================================================
+//function : WriteStep
+//purpose :
+//=======================================================================
+void RWStepVisual_RWDraughtingCallout::WriteStep
+ (StepData_StepWriter& SW,
+ const Handle(StepVisual_DraughtingCallout)& ent) const
+{
+ // Inherited field: name
+ SW.Send(ent->Name());
+
+ // Own field: contents
+ SW.OpenSub();
+ for (Standard_Integer i = 1; i <= ent->NbContents(); i++) {
+ SW.Send(ent->ContentsValue(i).Value());
+ }
+ SW.CloseSub();
+}
+
+//=======================================================================
+//function : Share
+//purpose :
+//=======================================================================
+
+void RWStepVisual_RWDraughtingCallout::Share (const Handle(StepVisual_DraughtingCallout) &ent,
+ Interface_EntityIterator& iter) const
+{
+ // Own field: contents
+ Standard_Integer i, nb = ent->NbContents();
+ for (i = 1; i <= nb; i++)
+ iter.AddItem (ent->ContentsValue(i).Value());
+}
+
--- /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.
+
+#ifndef _RWStepVisual_RWDraughtingCallout_HeaderFile
+#define _RWStepVisual_RWDraughtingCallout_HeaderFile
+
+#include <Standard.hxx>
+#include <Standard_DefineAlloc.hxx>
+#include <Standard_Handle.hxx>
+
+#include <Standard_Integer.hxx>
+class Interface_EntityIterator;
+class StepData_StepReaderData;
+class Interface_Check;
+class StepVisual_DraughtingCallout;
+class StepData_StepWriter;
+
+//! Read & Write Module for DraughtingCallout
+class RWStepVisual_RWDraughtingCallout
+{
+public:
+
+ DEFINE_STANDARD_ALLOC
+
+ Standard_EXPORT RWStepVisual_RWDraughtingCallout();
+
+ Standard_EXPORT void ReadStep (const Handle(StepData_StepReaderData)& data, const Standard_Integer num, Handle(Interface_Check)& ach, const Handle(StepVisual_DraughtingCallout)& ent) const;
+
+ Standard_EXPORT void WriteStep (StepData_StepWriter& SW, const Handle(StepVisual_DraughtingCallout)& ent) const;
+
+ Standard_EXPORT void Share (const Handle(StepVisual_DraughtingCallout)& ent, Interface_EntityIterator& iter) const;
+};
+#endif // _RWStepVisual_RWDraughtingCallout_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>
+
+//=======================================================================
+//function : RWStepVisual_RWTessellatedAnnotationOccurrence
+//purpose :
+//=======================================================================
+RWStepVisual_RWTessellatedAnnotationOccurrence::RWStepVisual_RWTessellatedAnnotationOccurrence () {}
+
+//=======================================================================
+//function : ReadStep
+//purpose :
+//=======================================================================
+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);
+}
+
+//=======================================================================
+//function : WriteStep
+//purpose :
+//=======================================================================
+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());
+}
+
+//=======================================================================
+//function : Share
+//purpose :
+//=======================================================================
+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 nb3 = data->NbParams(nsub3);
+ for (Standard_Integer j = 1; j <= nb3; 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());
+
+ // Own filed : coordinates
+ SW.Send(ent->CoordList());
+
+ // Own field : line_strips
+ SW.OpenSub();
+ for (Standard_Integer curveIt = 0; curveIt < ent->Curves()->Length(); curveIt++) {
+ Handle(TColStd_HSequenceOfInteger) aCurve = ent->Curves()->Value(curveIt);
+ SW.OpenSub();
+ for (Standard_Integer i = 1; i <= aCurve->Length(); i++)
+ SW.Send(aCurve->Value(i));
+ SW.CloseSub();
+ }
+ SW.CloseSub();
+}
--- /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;
+};
+#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());
+
+ // Own field : children
+ SW.OpenSub();
+ for (Standard_Integer i = 1; i <= ent->Items()->Length(); i++)
+ SW.Send(ent->Items()->Value(i));
+ SW.CloseSub();
+}
+
+//=======================================================================
+//function : Share
+//purpose :
+//=======================================================================
+void RWStepVisual_RWTessellatedGeometricSet::Share(const Handle(StepVisual_TessellatedGeometricSet)& ent, Interface_EntityIterator& iter) const
+{
+ // Own field : children
+ for (Standard_Integer i = 1; i <= ent->Items()->Length(); i++)
+ iter.AddItem(ent->Items()->Value(i));
+}
--- /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>
+
+//=======================================================================
+//function : RWStepVisual_RWTessellatedItem
+//purpose :
+//=======================================================================
+RWStepVisual_RWTessellatedItem::RWStepVisual_RWTessellatedItem () {}
+
+//=======================================================================
+//function : ReadStep
+//purpose :
+//=======================================================================
+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;
+ data->ReadString (num,1,"name",ach,aName);
+
+ //--- Initialisation of the read entity ---
+ ent->Init(aName);
+}
+
+//=======================================================================
+//function : WriteStep
+//purpose :
+//=======================================================================
+void RWStepVisual_RWTessellatedItem::WriteStep
+ (StepData_StepWriter& SW,
+ const Handle(StepVisual_TessellatedItem)& ent) const
+{
+ // --- inherited field name ---
+ SW.Send(ent->Name());
+}
--- /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;
+};
+#endif // _RWStepVisual_RWTessellatedItem_HeaderFile
#include <StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMod.hxx>
#include <StepDimTol_GeoTolAndGeoTolWthMod.hxx>
#include <StepDimTol_GeometricToleranceWithMaximumTolerance.hxx>
+#include <StepGeom_Axis2Placement3d.hxx>
+#include <StepGeom_Plane.hxx>
+#include <StepGeom_Polyline.hxx>
#include <StepDimTol_PlacedDatumTargetFeature.hxx>
#include <StepRepr_AssemblyComponentUsage.hxx>
#include <StepRepr_CharacterizedDefinition.hxx>
#include <StepShape_DimensionalLocation.hxx>
#include <StepShape_EdgeCurve.hxx>
#include <StepShape_EdgeLoop.hxx>
+#include <StepShape_GeometricCurveSet.hxx>
#include <StepShape_GeometricSet.hxx>
#include <StepShape_HArray1OfFace.hxx>
#include <StepShape_HArray1OfFaceBound.hxx>
#include <StepShape_ToleranceValue.hxx>
#include <StepShape_ValueFormatTypeQualifier.hxx>
#include <StepShape_Vertex.hxx>
+#include <StepVisual_AnnotationCurveOccurrence.hxx>
+#include <StepVisual_AnnotationPlane.hxx>
+#include <StepVisual_DraughtingCallout.hxx>
+#include <StepVisual_DraughtingCalloutElement.hxx>
#include <StepVisual_Invisibility.hxx>
#include <StepVisual_LayeredItem.hxx>
+#include <StepVisual_PlanarBox.hxx>
#include <StepVisual_PresentationLayerAssignment.hxx>
#include <StepVisual_PresentationStyleByContext.hxx>
#include <StepVisual_StyleContextSelect.hxx>
#include <TDF_Tool.hxx>
#include <TDocStd_Document.hxx>
#include <TNaming_NamedShape.hxx>
+#include <TopExp_Explorer.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Compound.hxx>
#include <TopoDS_Iterator.hxx>
#include <XCAFDimTolObjects_DatumObject.hxx>
#include <XSControl_TransferReader.hxx>
#include <XSControl_WorkSession.hxx>
+#include <StepAP242_DraughtingModelItemAssociation.hxx>
#include <StepAP242_GeometricItemSpecificUsage.hxx>
#include <StepGeom_CartesianPoint.hxx>
#include <STEPCAFControl_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>
+#include <Transfer_ActorOfTransientProcess.hxx>
+#include <Bnd_Box.hxx>
+#include <BRepBndLib.hxx>
+
// skl 21.08.2003 for reading G&DT
//#include <StepRepr_CompoundItemDefinition.hxx>
//#include <StepRepr_CompoundItemDefinitionMember.hxx>
return Standard_True;
}
+//=======================================================================
+//function : readAnnotation
+//purpose : return annotation plane and position for given GDT
+// (Dimension, Geometric_Tolerance, Datum_Feature or Placed_Datum_Target_Feature)
+//=======================================================================
+void readAnnotation(const Handle(XSControl_TransferReader)& theTR,
+ const Handle(Standard_Transient) theGDT,
+ const Handle(Standard_Transient)& theDimObject)
+{
+ Handle(TCollection_HAsciiString) aPresentName;
+ TopoDS_Compound aResAnnotation;
+ Handle(Transfer_TransientProcess) aTP = theTR->TransientProcess();
+ const Interface_Graph& aGraph = aTP->Graph();
+ // find the proper DraughtingModelItemAssociation
+ Interface_EntityIterator subs = aGraph.Sharings(theGDT);
+ Handle(StepAP242_DraughtingModelItemAssociation) aDMIA;
+ for (subs.Start(); subs.More() && aDMIA.IsNull(); subs.Next()) {
+ if (!subs.Value()->IsKind(STANDARD_TYPE(StepAP242_DraughtingModelItemAssociation)))
+ continue;
+ aDMIA = Handle(StepAP242_DraughtingModelItemAssociation)::DownCast(subs.Value());
+ Handle(TCollection_HAsciiString) aName = aDMIA->Name();
+ aName->LowerCase();
+ if (!aName->Search(new TCollection_HAsciiString("pmi representation to presentation link"))) {
+ aDMIA = NULL;
+ }
+ }
+ if (aDMIA.IsNull() || aDMIA->NbIdentifiedItem() == 0)
+ return;
+
+ // retrieve AnnotationPlane
+ Standard_Boolean isHasPlane = Standard_False;
+ gp_Ax2 aPlaneAxes;
+ Handle(StepRepr_RepresentationItem) aDMIAE = aDMIA->IdentifiedItemValue(1);
+ if (aDMIAE.IsNull())
+ return;
+ subs = aGraph.Sharings(aDMIAE);
+ Handle(StepVisual_AnnotationPlane) anAnPlane;
+ for (subs.Start(); subs.More() && anAnPlane.IsNull(); subs.Next()) {
+ anAnPlane = Handle(StepVisual_AnnotationPlane)::DownCast(subs.Value());
+ }
+ if (!anAnPlane.IsNull()) {
+ Handle(StepRepr_RepresentationItem) aPlaneItem = anAnPlane->Item();
+ Handle(StepGeom_Axis2Placement3d) aA2P3D;
+ //retrieve axes from AnnotationPlane
+ if (aPlaneItem->IsKind(STANDARD_TYPE(StepGeom_Plane))) {
+ Handle(StepGeom_Plane) aPlane = Handle(StepGeom_Plane)::DownCast(aPlaneItem);
+ aA2P3D = aPlane->Position();
+ }
+ else if (aPlaneItem->IsKind(STANDARD_TYPE(StepVisual_PlanarBox))) {
+ Handle(StepVisual_PlanarBox) aBox = Handle(StepVisual_PlanarBox)::DownCast(aPlaneItem);
+ aA2P3D = aBox->Placement().Axis2Placement3d();
+ }
+ // build gp_Ax2 from axes
+ if (!aA2P3D.IsNull())
+ {
+ Handle(StepGeom_Direction) anAxis = aA2P3D->Axis(),
+ aRefDir = aA2P3D->RefDirection();
+ if (!anAxis.IsNull() && !aRefDir.IsNull()) {
+ Handle(TColStd_HArray1OfReal) aCoords;
+ aCoords = anAxis->DirectionRatios();
+ gp_Dir aXDir(aCoords->Value(1), aCoords->Value(2), aCoords->Value(3));
+ aCoords = aRefDir->DirectionRatios();
+ 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(TColgp_HArray1OfPnt) aPnts = new TColgp_HArray1OfPnt(1, 1);
+ anObj->SetPlane(aPlaneAxes);
+
+
+ }
+ else if (theDimObject->IsKind(STANDARD_TYPE(XCAFDimTolObjects_DatumObject))) {
+ Handle(XCAFDimTolObjects_DatumObject) anObj =
+ Handle(XCAFDimTolObjects_DatumObject)::DownCast(theDimObject);
+ anObj->SetPlane(aPlaneAxes);
+
+ }
+ else if (theDimObject->IsKind(STANDARD_TYPE(XCAFDimTolObjects_GeomToleranceObject))) {
+ Handle(XCAFDimTolObjects_GeomToleranceObject) anObj =
+ Handle(XCAFDimTolObjects_GeomToleranceObject)::DownCast(theDimObject);
+ anObj->SetPlane(aPlaneAxes);
+
+ }
+ }
+
+
+ // Retrieve presentation
+ Handle(StepVisual_AnnotationCurveOccurrence) anACO;
+ NCollection_Vector<Handle(StepVisual_TessellatedAnnotationOccurrence)> aTesselations;
+ NCollection_Vector<Handle(StepVisual_StyledItem)> anAnnotations;
+ if (aDMIAE->IsKind(STANDARD_TYPE(StepVisual_AnnotationCurveOccurrence)))
+ {
+ anACO = Handle(StepVisual_AnnotationCurveOccurrence)::DownCast(aDMIAE);
+ if( !anACO.IsNull())
+ anAnnotations.Append(anACO);
+ }
+
+ 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())
+ {
+ anAnnotations.Append(anACO);
+ continue;
+ }
+ Handle(StepVisual_TessellatedAnnotationOccurrence) aTesselation =
+ aDCallout->ContentsValue(i).TessellatedAnnotationOccurrence();
+ if( !aTesselation.IsNull())
+ anAnnotations.Append(aTesselation);
+ }
+ }
+
+ if (!anAnnotations.Length())
+ return;
+
+
+ BRep_Builder aB;
+ aB.MakeCompound(aResAnnotation);
+
+ Standard_Integer i =0;
+ Bnd_Box aBox;
+ Standard_Integer nbShapes =0;
+ for( ; i < anAnnotations.Length(); i++)
+ {
+ Handle(StepVisual_StyledItem) anItem = anAnnotations(i);
+
+ aPresentName = anItem->Name();
+
+ anACO = Handle(StepVisual_AnnotationCurveOccurrence)::DownCast(anItem);
+ TopoDS_Shape anAnnotationShape;
+ if(!anACO.IsNull())
+ {
+ Handle(StepRepr_RepresentationItem) aCurveItem = anACO->Item();
+ anAnnotationShape = STEPConstruct::FindShape (aTP,aCurveItem);
+ if( anAnnotationShape.IsNull())
+ {
+ Handle(Transfer_Binder) binder = theTR->Actor()->Transfer(aCurveItem, aTP);
+ if ( ! binder.IsNull() && binder->HasResult() ) {
+ anAnnotationShape = TransferBRep::ShapeResult ( aTP, binder );
+ }
+ }
+ }
+ //case of tesselated entities
+ else
+ {
+ Handle(StepRepr_RepresentationItem) aTessItem = anItem->Item();
+ if(aTessItem.IsNull())
+ continue;
+ Handle(StepVisual_TessellatedGeometricSet) aTessSet = Handle(StepVisual_TessellatedGeometricSet)::DownCast(aTessItem);
+ if( aTessSet.IsNull())
+ continue;
+ NCollection_Handle<StepVisual_Array1OfTessellaltedItem> aListItems = aTessSet->Items();
+ Standard_Integer nb = aListItems.IsNull() ? 0 : aListItems->Length();
+ Handle(StepVisual_TessellatedCurveSet) aTessCurve;
+ for (Standard_Integer n = 1; n <= nb && aTessCurve.IsNull(); n++)
+ {
+ aTessCurve = Handle(StepVisual_TessellatedCurveSet)::DownCast(aListItems->Value(n));
+ }
+ if( aTessCurve.IsNull())
+ continue;
+ Handle(StepVisual_CoordinatesList) aCoordList = aTessCurve->CoordList();
+ if( aCoordList.IsNull())
+ continue;
+ Handle(TColgp_HArray1OfXYZ) aPoints = aCoordList->Points();
+
+ if (aPoints.IsNull() || aPoints->Length() == 0)
+ continue;
+ NCollection_Handle<StepVisual_VectorOfHSequenceOfInteger> aCurves = aTessCurve->Curves();
+ Standard_Integer aNbC = (aCurves.IsNull() ? 0 : aCurves->Length());
+ TopoDS_Compound aComp;
+ aB.MakeCompound(aComp);
+
+ Standard_Integer k = 0;
+ for( ; k < aNbC; k++)
+ {
+ Handle(TColStd_HSequenceOfInteger) anIndexes = aCurves->Value(k);
+ TopoDS_Wire aCurW;
+ aB.MakeWire(aCurW);
+
+ for(Standard_Integer n = 1; n < anIndexes->Length(); n++)
+ {
+ Standard_Integer ind = anIndexes->Value(n);
+ Standard_Integer indnext = anIndexes->Value(n + 1);
+ if( ind > aPoints->Length() || indnext > aPoints->Length())
+ continue;
+ gp_Pnt aP1(aPoints->Value(ind));
+ gp_Pnt aP2(aPoints->Value(indnext));
+ BRepBuilderAPI_MakeEdge aMaker(aP1, aP2);
+ if( aMaker.IsDone())
+ {
+ TopoDS_Edge aCurE = aMaker.Edge();
+ aB.Add(aCurW, aCurE);
+ }
+ }
+ aB.Add(aComp, aCurW);
+ }
+ anAnnotationShape = aComp;
+ }
+ if(!anAnnotationShape.IsNull())
+ {
+ nbShapes++;
+ aB.Add(aResAnnotation, anAnnotationShape);
+ if( i == anAnnotations.Length() - 1)
+ BRepBndLib::AddClose(anAnnotationShape, aBox);
+ }
+ }
+
+ if(!nbShapes)
+ return;
+ gp_Pnt aPtext(0., 0., 0.);
+ if(!aBox.IsVoid())
+ {
+ Standard_Real aXmin, aYmin, aZmin,aXmax, aYmax, aZmax;
+ aBox.Get(aXmin, aYmin, aZmin,aXmax, aYmax, aZmax);
+ aPtext = gp_Pnt((aXmin + aXmax) * 0.5, (aYmin + aYmax) * 0.5, (aZmin + aZmax) * 0.5);
+ }
+
+ // set point to XCAF
+ if (theDimObject->IsKind(STANDARD_TYPE(XCAFDimTolObjects_DimensionObject))) {
+ Handle(XCAFDimTolObjects_DimensionObject) anObj =
+ Handle(XCAFDimTolObjects_DimensionObject)::DownCast(theDimObject);
+ anObj->SetPointTextAttach(aPtext);
+ anObj->SetPresentation(aResAnnotation, aPresentName);
+ }
+ else if (theDimObject->IsKind(STANDARD_TYPE(XCAFDimTolObjects_DatumObject))) {
+ Handle(XCAFDimTolObjects_DatumObject) anObj =
+ Handle(XCAFDimTolObjects_DatumObject)::DownCast(theDimObject);
+ anObj->SetPointTextAttach(aPtext);
+ anObj->SetPresentation(aResAnnotation, aPresentName);
+ }
+ else if (theDimObject->IsKind(STANDARD_TYPE(XCAFDimTolObjects_GeomToleranceObject))) {
+ Handle(XCAFDimTolObjects_GeomToleranceObject) anObj =
+ Handle(XCAFDimTolObjects_GeomToleranceObject)::DownCast(theDimObject);
+ anObj->SetPointTextAttach(aPtext);
+ anObj->SetPresentation(aResAnnotation, aPresentName);
+ }
+ return;
+}
//=======================================================================
//function : ReadDatums
static Standard_Boolean ReadDatums(const Handle(XCAFDoc_ShapeTool) &STool,
const Handle(XCAFDoc_DimTolTool) &DGTTool,
const Interface_Graph &graph,
- Handle(Transfer_TransientProcess) &TP,
+ const Handle(Transfer_TransientProcess) &TP,
const TDF_Label TolerL,
const Handle(StepDimTol_GeometricToleranceWithDatumReference) GTWDR)
{
aDatObj->SetModifierWithValue(aXCAFModifWithVal, aModifValue);
aDGTTool->SetDatumToGeomTol(aDatL, theGDTL);
}
- if(!aDatObj.IsNull())
+ if(!aDatObj.IsNull()) {
+ readAnnotation(aTR, aSAR->RelatingShapeAspect(), aDatObj);
aDat->SetObject(aDatObj);
+ }
}
return !aDat.IsNull();
}
}
aDimObj->SetType(aType);
+
if(!aDimObj.IsNull())
{
+
Handle(XCAFDoc_Dimension) aDim;
+
if(aDimL.FindAttribute(XCAFDoc_Dimension::GetID(),aDim))
{
+ readAnnotation(aTR, theEnt, aDimObj);
aDim->SetObject(aDimObj);
}
}
if(GetAngleConversionFactor(NU,aFact)) aVal=aVal*aFact;
aTolObj->SetMaxValueModifier(aVal);
}
-
+
+ readAnnotation(aTR, theEnt, aTolObj);
aGTol->SetObject(aTolObj);
}
#include <StepRepr_CompShAspAndDatumFeatAndShAsp.hxx>
#include <StepRepr_IntegerRepresentationItem.hxx>
#include <StepRepr_ValueRepresentationItem.hxx>
+#include <StepAP242_DraughtingModelItemAssociation.hxx>
#include <StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.hxx>
#include <StepDimTol_GeoTolAndGeoTolWthMaxTol.hxx>
+#include <StepVisual_AnnotationCurveOccurrence.hxx>
+#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>
+
static int init = 0;
static Interface_DataMapOfTransientInteger types(800);
types.Bind (STANDARD_TYPE(StepBasic_Address), 1);
types.Bind (STANDARD_TYPE(StepShape_AdvancedBrepShapeRepresentation), 2);
types.Bind (STANDARD_TYPE(StepShape_AdvancedFace), 3);
-// types.Bind (STANDARD_TYPE(StepVisual_AnnotationCurveOccurrence), 4);
+ types.Bind (STANDARD_TYPE(StepVisual_AnnotationCurveOccurrence), 4);
// types.Bind (STANDARD_TYPE(StepVisual_AnnotationFillArea), 5);
// types.Bind (STANDARD_TYPE(StepVisual_AnnotationFillAreaOccurrence), 6);
types.Bind (STANDARD_TYPE(StepVisual_AnnotationOccurrence), 7);
types.Bind (STANDARD_TYPE(StepBasic_DimensionalExponents), 104);
types.Bind (STANDARD_TYPE(StepGeom_Direction), 105);
types.Bind (STANDARD_TYPE(StepVisual_DraughtingAnnotationOccurrence), 106);
-// types.Bind (STANDARD_TYPE(StepVisual_DraughtingCallout), 107);
+ types.Bind (STANDARD_TYPE(StepVisual_DraughtingCallout), 107);
types.Bind (STANDARD_TYPE(StepVisual_DraughtingPreDefinedColour), 108);
types.Bind (STANDARD_TYPE(StepVisual_DraughtingPreDefinedCurveFont), 109);
// types.Bind (STANDARD_TYPE(StepVisual_DraughtingSubfigureRepresentation), 110);
types.Bind (STANDARD_TYPE(StepRepr_IntegerRepresentationItem), 700);
types.Bind (STANDARD_TYPE(StepRepr_ValueRepresentationItem), 701);
types.Bind (STANDARD_TYPE(StepRepr_FeatureForDatumTargetRelationship), 702);
+ types.Bind (STANDARD_TYPE(StepAP242_DraughtingModelItemAssociation), 703);
+ 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 :
+StepAP242_DraughtingModelItemAssociation.cxx
+StepAP242_DraughtingModelItemAssociation.hxx
StepAP242_GeometricItemSpecificUsage.cxx
StepAP242_GeometricItemSpecificUsage.hxx
StepAP242_IdAttribute.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 <StepAP242_DraughtingModelItemAssociation.hxx>
+
+IMPLEMENT_STANDARD_RTTIEXT(StepAP242_DraughtingModelItemAssociation,StepAP242_ItemIdentifiedRepresentationUsage)
+
+StepAP242_DraughtingModelItemAssociation::StepAP242_DraughtingModelItemAssociation () { }
--- /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.
+
+#ifndef _StepAP242_DraughtingModelItemAssociation_HeaderFile
+#define _StepAP242_DraughtingModelItemAssociation_HeaderFile
+
+#include <Standard.hxx>
+#include <Standard_Type.hxx>
+
+#include <StepAP242_ItemIdentifiedRepresentationUsage.hxx>
+
+class StepAP242_DraughtingModelItemAssociation;
+DEFINE_STANDARD_HANDLE(StepAP242_DraughtingModelItemAssociation, StepAP242_ItemIdentifiedRepresentationUsage)
+//! Added for Dimensional Tolerances
+class StepAP242_DraughtingModelItemAssociation : public StepAP242_ItemIdentifiedRepresentationUsage
+{
+
+public:
+
+ Standard_EXPORT StepAP242_DraughtingModelItemAssociation();
+
+ DEFINE_STANDARD_RTTIEXT(StepAP242_DraughtingModelItemAssociation, StepAP242_ItemIdentifiedRepresentationUsage)
+
+};
+#endif // _StepAP242_DraughtingModelItemAssociation_HeaderFile
}
//! Set field DefiningTolerance
- inline void SetModifiers (const Handle(StepDimTol_HArray1OfToleranceZoneTarget) &theDefiningTolerance)
+ inline void SetDefiningTolerance (const Handle(StepDimTol_HArray1OfToleranceZoneTarget) &theDefiningTolerance)
{
myDefiningTolerance = theDefiningTolerance;
}
+StepVisual_AnnotationCurveOccurrence.cxx
+StepVisual_AnnotationCurveOccurrence.hxx
StepVisual_AnnotationOccurrence.cxx
StepVisual_AnnotationOccurrence.hxx
+StepVisual_AnnotationPlane.cxx
+StepVisual_AnnotationPlane.hxx
+StepVisual_AnnotationPlaneElement.cxx
+StepVisual_AnnotationPlaneElement.hxx
StepVisual_AnnotationText.cxx
StepVisual_AnnotationText.hxx
StepVisual_AnnotationTextOccurrence.cxx
StepVisual_AreaInSet.hxx
StepVisual_AreaOrView.cxx
StepVisual_AreaOrView.hxx
+StepVisual_Array1OfAnnotationPlaneElement.hxx
StepVisual_Array1OfBoxCharacteristicSelect.hxx
StepVisual_Array1OfCurveStyleFontPattern.hxx
StepVisual_Array1OfDirectionCountSelect.hxx
+StepVisual_Array1OfDraughtingCalloutElement.hxx
StepVisual_Array1OfFillStyleSelect.hxx
StepVisual_Array1OfInvisibleItem.hxx
StepVisual_Array1OfLayeredItem.hxx
StepVisual_DirectionCountSelect.hxx
StepVisual_DraughtingAnnotationOccurrence.cxx
StepVisual_DraughtingAnnotationOccurrence.hxx
+StepVisual_DraughtingCallout.cxx
+StepVisual_DraughtingCallout.hxx
+StepVisual_DraughtingCalloutElement.cxx
+StepVisual_DraughtingCalloutElement.hxx
StepVisual_DraughtingModel.cxx
StepVisual_DraughtingModel.hxx
StepVisual_DraughtingPreDefinedColour.cxx
StepVisual_FillStyleSelect.hxx
StepVisual_FontSelect.cxx
StepVisual_FontSelect.hxx
+StepVisual_HArray1OfAnnotationPlaneElement.hxx
StepVisual_HArray1OfBoxCharacteristicSelect.hxx
StepVisual_HArray1OfCurveStyleFontPattern.hxx
StepVisual_HArray1OfDirectionCountSelect.hxx
+StepVisual_HArray1OfDraughtingCalloutElement.hxx
StepVisual_HArray1OfFillStyleSelect.hxx
StepVisual_HArray1OfInvisibleItem.hxx
StepVisual_HArray1OfLayeredItem.hxx
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
--- /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_AnnotationCurveOccurrence.hxx>
+
+IMPLEMENT_STANDARD_RTTIEXT(StepVisual_AnnotationCurveOccurrence,StepVisual_StyledItem)
+
+StepVisual_AnnotationCurveOccurrence::StepVisual_AnnotationCurveOccurrence () {}
--- /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.
+
+#ifndef _StepVisual_AnnotationCurveOccurrence_HeaderFile
+#define _StepVisual_AnnotationCurveOccurrence_HeaderFile
+
+#include <Standard.hxx>
+#include <Standard_Type.hxx>
+
+#include <StepVisual_StyledItem.hxx>
+
+class StepVisual_AnnotationCurveOccurrence;
+DEFINE_STANDARD_HANDLE(StepVisual_AnnotationCurveOccurrence, StepVisual_StyledItem)
+
+class StepVisual_AnnotationCurveOccurrence : public StepVisual_StyledItem
+{
+public:
+
+ //! Returns a AnnotationCurveOccurrence
+ Standard_EXPORT StepVisual_AnnotationCurveOccurrence();
+
+ DEFINE_STANDARD_RTTIEXT(StepVisual_AnnotationCurveOccurrence,StepVisual_StyledItem)
+};
+#endif // _StepVisual_AnnotationCurveOccurrence_HeaderFile
StepVisual_AnnotationOccurrence::StepVisual_AnnotationOccurrence () {}
+
+
-
DEFINE_STANDARD_RTTIEXT(StepVisual_AnnotationOccurrence,StepVisual_StyledItem)
protected:
--- /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_AnnotationPlane.hxx>
+
+IMPLEMENT_STANDARD_RTTIEXT(StepVisual_AnnotationPlane,StepVisual_AnnotationOccurrence)
+
+//=======================================================================
+//function : StepVisual_AnnotationPlane
+//purpose :
+//=======================================================================
+StepVisual_AnnotationPlane::StepVisual_AnnotationPlane () {}
+
+//=======================================================================
+//function : Init
+//purpose :
+//=======================================================================
+void StepVisual_AnnotationPlane::Init (const Handle(TCollection_HAsciiString)& theName,
+ const Handle(StepVisual_HArray1OfPresentationStyleAssignment)& theStyles,
+ const Handle(StepRepr_RepresentationItem)& theItem,
+ const Handle(StepVisual_HArray1OfAnnotationPlaneElement)& theElements)
+{
+ StepVisual_AnnotationOccurrence::Init(theName, theStyles, theItem);
+ myElements = theElements;
+}
--- /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.
+
+#ifndef _StepVisual_AnnotationPlane_HeaderFile
+#define _StepVisual_AnnotationPlane_HeaderFile
+
+#include <Standard.hxx>
+#include <Standard_Type.hxx>
+
+#include <StepVisual_AnnotationOccurrence.hxx>
+#include <StepVisual_HArray1OfAnnotationPlaneElement.hxx>
+
+class StepVisual_AnnotationPlane;
+DEFINE_STANDARD_HANDLE(StepVisual_AnnotationPlane, StepVisual_AnnotationOccurrence)
+
+class StepVisual_AnnotationPlane : public StepVisual_AnnotationOccurrence
+{
+public:
+
+ //! Returns a AnnotationPlane
+ Standard_EXPORT StepVisual_AnnotationPlane();
+
+ Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& theName,
+ const Handle(StepVisual_HArray1OfPresentationStyleAssignment)& theStyles,
+ const Handle(StepRepr_RepresentationItem)& theItem,
+ const Handle(StepVisual_HArray1OfAnnotationPlaneElement)& theElements);
+
+ //! Returns field Elements
+ inline Handle(StepVisual_HArray1OfAnnotationPlaneElement) Elements () const
+ {
+ return myElements;
+ }
+
+ //! Set field Elements
+ inline void SetElements (const Handle(StepVisual_HArray1OfAnnotationPlaneElement) &theElements)
+ {
+ myElements = theElements;
+ }
+
+ //! Returns number of Elements
+ inline Standard_Integer NbElements () const
+ {
+ return (myElements.IsNull() ? 0 : myElements->Length());
+ }
+
+ //! Returns Elements with the given number
+ inline StepVisual_AnnotationPlaneElement ElementsValue(const Standard_Integer theNum) const
+ {
+ return myElements->Value(theNum);
+ }
+
+ //! Sets Elements with given number
+ inline void SetElementsValue(const Standard_Integer theNum, const StepVisual_AnnotationPlaneElement& theItem)
+ {
+ myElements->SetValue (theNum, theItem);
+ }
+
+ DEFINE_STANDARD_RTTIEXT(StepVisual_AnnotationPlane,StepVisual_AnnotationOccurrence)
+
+private:
+
+ Handle(StepVisual_HArray1OfAnnotationPlaneElement) myElements;
+};
+#endif // _StepVisual_AnnotationPlane_HeaderFile
--- /dev/null
+// Created on: 2015-07-10
+// 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 <StepVisual_AnnotationPlaneElement.hxx>
+#include <Interface_Macros.hxx>
+#include <StepVisual_DraughtingCallout.hxx>
+#include <StepVisual_StyledItem.hxx>
+
+//=======================================================================
+//function : StepVisual_AnnotationPlaneElement
+//purpose :
+//=======================================================================
+
+StepVisual_AnnotationPlaneElement::StepVisual_AnnotationPlaneElement () { }
+
+//=======================================================================
+//function : CaseNum
+//purpose :
+//=======================================================================
+
+Standard_Integer StepVisual_AnnotationPlaneElement::CaseNum(const Handle(Standard_Transient)& ent) const
+{
+ if (ent.IsNull()) return 0;
+ if (ent->IsKind(STANDARD_TYPE(StepVisual_DraughtingCallout))) return 1;
+ if (ent->IsKind(STANDARD_TYPE(StepVisual_StyledItem))) return 2;
+ return 0;
+}
+
+Handle(StepVisual_DraughtingCallout) StepVisual_AnnotationPlaneElement::DraughtingCallout() const
+{ return GetCasted(StepVisual_DraughtingCallout,Value()); }
+
+Handle(StepVisual_StyledItem) StepVisual_AnnotationPlaneElement::StyledItem() const
+{ return GetCasted(StepVisual_StyledItem,Value()); }
--- /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.
+
+#ifndef _StepVisual_AnnotationPlaneElement_HeaderFile
+#define _StepVisual_AnnotationPlaneElement_HeaderFile
+
+#include <Standard.hxx>
+#include <Standard_DefineAlloc.hxx>
+#include <Standard_Handle.hxx>
+
+#include <StepData_SelectType.hxx>
+#include <Standard_Integer.hxx>
+class Standard_Transient;
+class StepVisual_DraughtingCallout;
+class StepVisual_StyledItem;
+
+class StepVisual_AnnotationPlaneElement : public StepData_SelectType
+{
+public:
+
+ DEFINE_STANDARD_ALLOC
+
+ //! Returns a AnnotationPlaneElement select type
+ Standard_EXPORT StepVisual_AnnotationPlaneElement();
+
+ //! Recognizes a IdAttributeSelect Kind Entity that is :
+ //! 1 -> DraughtingCallout
+ //! 2 -> StyledItem
+ //! 0 else
+ Standard_EXPORT Standard_Integer CaseNum (const Handle(Standard_Transient)& ent) const;
+
+ //! returns Value as a DraughtingCallout (Null if another type)
+ Standard_EXPORT Handle(StepVisual_DraughtingCallout) DraughtingCallout() const;
+
+ //! returns Value as a StyledItem (Null if another type)
+ Standard_EXPORT Handle(StepVisual_StyledItem) StyledItem() const;
+};
+#endif // StepVisual_AnnotationPlaneElement
--- /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.
+
+#ifndef _StepVisual_Array1OfAnnotationPlaneElement_HeaderFile
+#define _StepVisual_Array1OfAnnotationPlaneElement_HeaderFile
+
+#include <StepVisual_AnnotationPlaneElement.hxx>
+#include <NCollection_Array1.hxx>
+
+typedef NCollection_Array1<StepVisual_AnnotationPlaneElement> StepVisual_Array1OfAnnotationPlaneElement;
+#endif // _StepVisual_Array1OfAnnotationPlaneElement_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.
+
+#ifndef _StepVisual_Array1OfDraughtingCalloutElement_HeaderFile
+#define _StepVisual_Array1OfDraughtingCalloutElement_HeaderFile
+
+#include <StepVisual_DraughtingCalloutElement.hxx>
+#include <NCollection_Array1.hxx>
+
+typedef NCollection_Array1<StepVisual_DraughtingCalloutElement> StepVisual_Array1OfDraughtingCalloutElement;
+#endif // _StepVisual_Array1OfDraughtingCalloutElement_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_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;
+}
--- /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
--- /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_DraughtingCallout.hxx>
+
+IMPLEMENT_STANDARD_RTTIEXT(StepVisual_DraughtingCallout,StepGeom_GeometricRepresentationItem)
+
+//=======================================================================
+//function : StepVisual_DraughtingCallout
+//purpose :
+//=======================================================================
+StepVisual_DraughtingCallout::StepVisual_DraughtingCallout () {}
+
+//=======================================================================
+//function : Init
+//purpose :
+//=======================================================================
+void StepVisual_DraughtingCallout::Init (const Handle(TCollection_HAsciiString)& theName,
+ const Handle(StepVisual_HArray1OfDraughtingCalloutElement)& theContents)
+{
+ StepGeom_GeometricRepresentationItem::Init(theName);
+ myContents = theContents;
+}
--- /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.
+
+#ifndef _StepVisual_DraughtingCallout_HeaderFile
+#define _StepVisual_DraughtingCallout_HeaderFile
+
+#include <Standard.hxx>
+#include <Standard_Type.hxx>
+
+#include <StepGeom_GeometricRepresentationItem.hxx>
+#include <StepVisual_HArray1OfDraughtingCalloutElement.hxx>
+
+
+class StepVisual_DraughtingCallout;
+DEFINE_STANDARD_HANDLE(StepVisual_DraughtingCallout, StepGeom_GeometricRepresentationItem)
+
+
+class StepVisual_DraughtingCallout : public StepGeom_GeometricRepresentationItem
+{
+public:
+
+ //! Returns a DraughtingCallout
+ Standard_EXPORT StepVisual_DraughtingCallout();
+
+ //! Init
+ Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& theName,
+ const Handle(StepVisual_HArray1OfDraughtingCalloutElement)& theContents);
+
+ //! Returns field Contents
+ inline Handle(StepVisual_HArray1OfDraughtingCalloutElement) Contents () const
+ {
+ return myContents;
+ }
+
+ //! Set field Contents
+ inline void SetContents (const Handle(StepVisual_HArray1OfDraughtingCalloutElement) &theContents)
+ {
+ myContents = theContents;
+ }
+
+ //! Returns number of Contents
+ inline Standard_Integer NbContents () const
+ {
+ return (myContents.IsNull() ? 0 : myContents->Length());
+ }
+
+ //! Returns Contents with the given number
+ inline StepVisual_DraughtingCalloutElement ContentsValue(const Standard_Integer theNum) const
+ {
+ return myContents->Value(theNum);
+ }
+
+ //! Sets Contents with given number
+ inline void SetContentsValue(const Standard_Integer theNum, const StepVisual_DraughtingCalloutElement& theItem)
+ {
+ myContents->SetValue (theNum, theItem);
+ }
+
+
+ DEFINE_STANDARD_RTTIEXT(StepVisual_DraughtingCallout,StepGeom_GeometricRepresentationItem)
+
+private:
+ Handle(StepVisual_HArray1OfDraughtingCalloutElement) myContents;
+};
+#endif // _StepVisual_DraughtingCallout_HeaderFile
--- /dev/null
+// Created on: 2015-07-10
+// 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 <StepVisual_DraughtingCalloutElement.hxx>
+#include <Interface_Macros.hxx>
+#include <StepVisual_AnnotationCurveOccurrence.hxx>
+
+#include <StepVisual_TessellatedAnnotationOccurrence.hxx>
+
+//=======================================================================
+//function : StepVisual_DraughtingCalloutElement
+//purpose :
+//=======================================================================
+
+StepVisual_DraughtingCalloutElement::StepVisual_DraughtingCalloutElement () { }
+
+//=======================================================================
+//function : CaseNum
+//purpose :
+//=======================================================================
+
+Standard_Integer StepVisual_DraughtingCalloutElement::CaseNum(const Handle(Standard_Transient)& ent) const
+{
+ 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()); }
+
--- /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.
+
+#ifndef _StepVisual_DraughtingCalloutElement_HeaderFile
+#define _StepVisual_DraughtingCalloutElement_HeaderFile
+
+#include <Standard.hxx>
+#include <Standard_DefineAlloc.hxx>
+#include <Standard_Handle.hxx>
+
+#include <StepData_SelectType.hxx>
+#include <Standard_Integer.hxx>
+class Standard_Transient;
+class StepVisual_AnnotationCurveOccurrence;
+class StepVisual_TessellatedAnnotationOccurrence;
+
+class StepVisual_DraughtingCalloutElement : public StepData_SelectType
+{
+public:
+
+ DEFINE_STANDARD_ALLOC
+
+ //! Returns a DraughtingCalloutElement select type
+ Standard_EXPORT StepVisual_DraughtingCalloutElement();
+
+ //! Recognizes a IdAttributeSelect Kind Entity that is :
+ //! 1 -> AnnotationCurveOccurrence
+ //! 0 else
+ Standard_EXPORT Standard_Integer CaseNum (const Handle(Standard_Transient)& ent) const;
+
+ //! returns Value as a AnnotationCurveOccurrence (Null if another type)
+ Standard_EXPORT Handle(StepVisual_AnnotationCurveOccurrence) AnnotationCurveOccurrence() const;
+
+ //! returns Value as a AnnotationOccurrence for Tesselated Anotation Occurence
+ 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.
+
+#ifndef _StepVisual_HArray1OfAnnotationPlaneElement_HeaderFile
+#define _StepVisual_HArray1OfAnnotationPlaneElement_HeaderFile
+
+#include <StepVisual_AnnotationPlaneElement.hxx>
+#include <StepVisual_Array1OfAnnotationPlaneElement.hxx>
+#include <NCollection_DefineHArray1.hxx>
+
+DEFINE_HARRAY1(StepVisual_HArray1OfAnnotationPlaneElement, StepVisual_Array1OfAnnotationPlaneElement)
+#endif // _StepVisual_HArray1OfAnnotationPlaneElement_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.
+
+#ifndef _StepVisual_HArray1OfDraughtingCalloutElement_HeaderFile
+#define _StepVisual_HArray1OfDraughtingCalloutElement_HeaderFile
+
+#include <StepVisual_DraughtingCalloutElement.hxx>
+#include <StepVisual_Array1OfDraughtingCalloutElement.hxx>
+#include <NCollection_DefineHArray1.hxx>
+
+DEFINE_HARRAY1(StepVisual_HArray1OfDraughtingCalloutElement, StepVisual_Array1OfDraughtingCalloutElement)
+#endif // _StepVisual_HArray1OfDraughtingCalloutElement_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 <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;
+}
--- /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;
+}
--- /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 () {}
--- /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
TKernel
TKMath
TKXSBase
+TKTopAlgo
TKG2d
TKCAF
TKSTEPBase
XCAFDimTolObjects_DatumObject::XCAFDimTolObjects_DatumObject()
{
myIsDTarget = Standard_False;
+ myHasPlane = Standard_False;
+ myHasPnt = Standard_False;
+ myHasPntText = Standard_False;
}
//=======================================================================
myIsDTarget = theObj->myIsDTarget;
myAxis = theObj->myAxis;
myDTargetType = theObj->myDTargetType;
+ myPlane = theObj->myPlane;
+ myPnt= theObj->myPnt;
+ myPntText= theObj->myPntText;
+ myHasPlane = theObj->myHasPlane;
+ myHasPnt = theObj->myHasPnt;
+ myHasPntText = theObj->myHasPntText;
}
//=======================================================================
Standard_EXPORT void SetDatumTargetNumber (const Standard_Integer theNumber);
+ Standard_EXPORT void SetPlane (const gp_Ax2& thePlane)
+ {
+ myPlane = thePlane;
+ myHasPlane = Standard_True;
+ }
+
+ Standard_EXPORT const gp_Ax2& GetPlane() const { return myPlane; }
+
+ Standard_EXPORT void SetPoint (const gp_Pnt& thePnt)
+ {
+ myPnt = thePnt;
+ myHasPnt = Standard_True;
+ }
+
+ Standard_EXPORT const gp_Pnt& GetPoint() const
+ {
+ return myPnt;
+ }
+
+
+ Standard_EXPORT void SetPointTextAttach (const gp_Pnt& thePntText)
+ {
+ myPntText = thePntText;
+ myHasPntText = Standard_True;
+ }
+
+ Standard_EXPORT const gp_Pnt& GetPointTextAttach() const
+ {
+ return myPntText;
+ }
+
+ Standard_Boolean HasPlane() const { return myHasPlane; }
+
+ Standard_Boolean HasPoint() const { return myHasPnt; }
+
+ Standard_EXPORT Standard_Boolean HasPointText() const
+ {
+ return myHasPntText;
+ }
+
+ //! Set graphical presentation for object
+ Standard_EXPORT void SetPresentation(const TopoDS_Shape& thePresentation,
+ const Handle(TCollection_HAsciiString)& thePresentationName)
+ {
+ myPresentation = thePresentation;
+ myPresentationName = thePresentationName;
+ }
+
+ //! Returns graphical presentation of the object
+ Standard_EXPORT TopoDS_Shape GetPresentation() const
+ {
+ return myPresentation;
+ }
+
+ //! Returns graphical presentation of the object
+ Standard_EXPORT Handle(TCollection_HAsciiString) GetPresentationName() const
+ {
+ return myPresentationName;
+ }
+
+
DEFINE_STANDARD_RTTIEXT(XCAFDimTolObjects_DatumObject,Standard_Transient)
Standard_Real myLength;
Standard_Real myWidth;
Standard_Integer myDatumTargetNumber;
-
+ gp_Ax2 myPlane;
+ gp_Pnt myPnt;
+ gp_Pnt myPntText;
+ Standard_Boolean myHasPlane;
+ Standard_Boolean myHasPnt;
+ Standard_Boolean myHasPntText;
+ TopoDS_Shape myPresentation;
+ Handle(TCollection_HAsciiString) myPresentationName;
};
#endif // _XCAFDimTolObjects_DatumObject_HeaderFile
XCAFDimTolObjects_DimensionObject::XCAFDimTolObjects_DimensionObject()
{
+ myHasPlane = Standard_False;
+ myHasPntText = Standard_False;
}
//=======================================================================
myPath = theObj->myPath;
myDir = theObj->myDir;
myPnts = theObj->myPnts;
+ myPntText= theObj->myPntText;
+ myHasPlane = theObj->myHasPlane;
+ myPlane = theObj->myPlane;
+ myHasPntText = theObj->myHasPntText;
}
//=======================================================================
#include <XCAFDimTolObjects_DimensionModifiersSequence.hxx>
#include <TopoDS_Edge.hxx>
#include <gp_Dir.hxx>
+#include <gp_Ax2.hxx>
#include <TColgp_HArray1OfPnt.hxx>
#include <Standard_Transient.hxx>
#include <Standard_Real.hxx>
#include <XCAFDimTolObjects_DimensionModif.hxx>
+#include <TCollection_HAsciiString.hxx>
class XCAFDimTolObjects_DimensionObject;
DEFINE_STANDARD_HANDLE(XCAFDimTolObjects_DimensionObject, Standard_Transient)
Standard_EXPORT void SetPoints (const Handle(TColgp_HArray1OfPnt)& thePnts);
+ Standard_EXPORT void SetPointTextAttach (const gp_Pnt& thePntText)
+ {
+ myPntText = thePntText;
+ myHasPntText = Standard_True;
+ }
+
+ Standard_EXPORT const gp_Pnt& GetPointTextAttach() const { return myPntText; }
+
+ Standard_EXPORT Standard_Boolean HasTextPoint() const
+ {
+ return myHasPntText;
+ }
+
+ Standard_EXPORT void SetPlane (const gp_Ax2& thePlane)
+ {
+ myPlane = thePlane;
+ myHasPlane = Standard_True;
+ }
+
+ Standard_EXPORT const gp_Ax2& GetPlane() const { return myPlane; }
+
+ Standard_EXPORT Standard_Boolean HasPlane() const { return myHasPlane; }
+
+ Standard_EXPORT Standard_Boolean HasPoints() const { return (!myPnts.IsNull() && myPnts->Length() > 0); }
+
+
+
+ //! Set graphical presentation for object
+ Standard_EXPORT void SetPresentation(const TopoDS_Shape& thePresentation,
+ const Handle(TCollection_HAsciiString)& thePresentationName)
+ {
+ myPresentation = thePresentation;
+ myPresentationName = thePresentationName;
+ }
+
+ //! Returns graphical presentation of the object
+ Standard_EXPORT TopoDS_Shape GetPresentation() const
+ {
+ return myPresentation;
+ }
+
+ //! Returns graphical presentation of the object
+ Standard_EXPORT Handle(TCollection_HAsciiString) GetPresentationName() const
+ {
+ return myPresentationName;
+ }
DEFINE_STANDARD_RTTIEXT(XCAFDimTolObjects_DimensionObject,Standard_Transient)
TopoDS_Edge myPath;
gp_Dir myDir;
Handle(TColgp_HArray1OfPnt) myPnts;
+ gp_Ax2 myPlane;
+ Standard_Boolean myHasPlane;
+ Standard_Boolean myHasPntText;
+ gp_Pnt myPntText;
+ TopoDS_Shape myPresentation;
+ Handle(TCollection_HAsciiString) myPresentationName;
};
XCAFDimTolObjects_GeomToleranceObject::XCAFDimTolObjects_GeomToleranceObject()
{
myHasAxis = Standard_False;
+ myHasPlane = Standard_False;
+ myHasPnt = Standard_False;
+ myHasPntText = Standard_False;
}
//=======================================================================
myValueOfZoneModif = theObj->myValueOfZoneModif;
myModifiers = theObj->myModifiers;
myMaxValueModif = theObj->myMaxValueModif;
- myAxis = theObj->GetAxis();
- myHasAxis = Standard_False;
+ myAxis = theObj->myAxis;
+ myHasAxis = theObj->myHasAxis;
+ myPlane = theObj->myPlane;
+ myPnt= theObj->myPnt;
+ myPntText= theObj->myPntText;
+ myHasPlane = theObj->myHasPlane;
+ myHasPnt = theObj->myHasPnt;
+ myHasPntText = theObj->myHasPntText;
}
//=======================================================================
Standard_Boolean XCAFDimTolObjects_GeomToleranceObject::HasAxis () const
{
return myHasAxis;
-}
\ No newline at end of file
+}
#include <Standard_Transient.hxx>
#include <XCAFDimTolObjects_GeomToleranceModif.hxx>
#include <gp_Ax2.hxx>
+#include <TopoDS_Shape.hxx>
+#include <TCollection_HAsciiString.hxx>
class XCAFDimTolObjects_GeomToleranceObject;
DEFINE_STANDARD_HANDLE(XCAFDimTolObjects_GeomToleranceObject, Standard_Transient)
Standard_EXPORT Standard_Boolean HasAxis () const;
+ void SetPlane (const gp_Ax2& thePlane)
+ {
+ myPlane = thePlane;
+ myHasPlane = Standard_True;
+ }
+
+ const gp_Ax2& GetPlane() const { return myPlane; }
+
+ void SetPoint (const gp_Pnt& thePnt)
+ {
+ myPnt = thePnt;
+ myHasPnt = Standard_True;
+ }
+
+ const gp_Pnt& GetPoint() const { return myPnt; }
+
+ void SetPointTextAttach (const gp_Pnt& thePntText)
+ {
+ myPntText = thePntText;
+ myHasPntText = Standard_True;
+ }
+
+ const gp_Pnt& GetPointTextAttach() const
+ {
+ return myPntText;
+ }
+ Standard_Boolean HasPlane() const { return myHasPlane; }
+
+ Standard_Boolean HasPoint() const { return myHasPnt; }
+
+ Standard_Boolean HasPointText() const
+ {
+ return myHasPntText;
+ }
+
+
+ //! Set graphical presentation for object
+ Standard_EXPORT void SetPresentation(const TopoDS_Shape& thePresentation,
+ const Handle(TCollection_HAsciiString)& thePresentationName)
+ {
+ myPresentation = thePresentation;
+ myPresentationName = thePresentationName;
+ }
+
+ //! Returns graphical presentation of the object
+ Standard_EXPORT TopoDS_Shape GetPresentation() const
+ {
+ return myPresentation;
+ }
+
+ //! Returns graphical presentation of the object
+ Standard_EXPORT Handle(TCollection_HAsciiString) GetPresentationName() const
+ {
+ return myPresentationName;
+ }
+
DEFINE_STANDARD_RTTIEXT(XCAFDimTolObjects_GeomToleranceObject,Standard_Transient)
private:
Standard_Real myMaxValueModif;
gp_Ax2 myAxis;
Standard_Boolean myHasAxis;
+ gp_Ax2 myPlane;
+ gp_Pnt myPnt;
+ gp_Pnt myPntText;;
+ Standard_Boolean myHasPlane;
+ Standard_Boolean myHasPnt;
+ Standard_Boolean myHasPntText;
+ TopoDS_Shape myPresentation;
+ Handle(TCollection_HAsciiString) myPresentationName;
+
};
#include <TDataStd_Real.hxx>
#include <TNaming_NamedShape.hxx>
#include <TNaming_Builder.hxx>
-
+#include <TNaming_Tool.hxx>
+#include <TDataStd_Name.hxx>
#include <XCAFDimTolObjects_DatumObject.hxx>
ChildLab_DTargetWidth,
ChildLab_DTargetNumber,
ChildLab_DatumTarget,
+ ChildLab_PlaneLoc,
+ ChildLab_PlaneN,
+ ChildLab_PlaneRef,
+ ChildLab_Pnt,
+ ChildLab_PntText,
+ ChildLab_Presentation
};
//=======================================================================
aNum->Set(theObject->GetDatumTargetNumber());
Label().FindChild(ChildLab_DTargetNumber).AddAttribute(aNum);
}
+
+ if (theObject->HasPlane())
+ {
+ Handle(TDataStd_RealArray) aLoc = new TDataStd_RealArray();
+ Handle(TDataStd_RealArray) aN = new TDataStd_RealArray();
+ Handle(TDataStd_RealArray) aR = new TDataStd_RealArray();
+ gp_Ax2 anAx = theObject->GetPlane();
+
+ Handle(TColStd_HArray1OfReal) aLocArr = new TColStd_HArray1OfReal(1, 3);
+ for (Standard_Integer i = 1; i <= 3; i++)
+ aLocArr->SetValue(i, anAx.Location().Coord(i));
+ aLoc->ChangeArray(aLocArr);
+
+ Handle(TColStd_HArray1OfReal) aNArr = new TColStd_HArray1OfReal(1, 3);
+ for (Standard_Integer i = 1; i <= 3; i++)
+ aNArr->SetValue(i, anAx.Direction().Coord(i));
+ aN->ChangeArray(aNArr);
+
+ Handle(TColStd_HArray1OfReal) aRArr = new TColStd_HArray1OfReal(1, 3);
+ for (Standard_Integer i = 1; i <= 3; i++)
+ aRArr->SetValue(i, anAx.XDirection().Coord(i));
+ aR->ChangeArray(aRArr);
+
+ Label().FindChild(ChildLab_PlaneLoc).AddAttribute(aLoc);
+ Label().FindChild(ChildLab_PlaneN).AddAttribute(aN);
+ Label().FindChild(ChildLab_PlaneRef).AddAttribute(aR);
+ }
+
+ if (theObject->HasPoint())
+ {
+ Handle(TDataStd_RealArray) aLoc = new TDataStd_RealArray();
+ gp_Pnt aPnt = theObject->GetPoint();
+
+ Handle(TColStd_HArray1OfReal) aLocArr = new TColStd_HArray1OfReal(1, 3);
+ for (Standard_Integer i = 1; i <= 3; i++)
+ aLocArr->SetValue(i, aPnt.Coord(i));
+ aLoc->ChangeArray(aLocArr);
+
+ Label().FindChild(ChildLab_Pnt).AddAttribute(aLoc);
+ }
+
+ if (theObject->HasPointText())
+ {
+ Handle(TDataStd_RealArray) aLoc = new TDataStd_RealArray();
+ gp_Pnt aPntText = theObject->GetPointTextAttach();
+
+ Handle(TColStd_HArray1OfReal) aLocArr = new TColStd_HArray1OfReal(1, 3);
+ for (Standard_Integer i = 1; i <= 3; i++)
+ aLocArr->SetValue(i, aPntText.Coord(i));
+ aLoc->ChangeArray(aLocArr);
+
+ Label().FindChild(ChildLab_PntText).AddAttribute(aLoc);
+ }
+ TopoDS_Shape aPresentation = theObject->GetPresentation();
+ if( !aPresentation.IsNull())
+ {
+ TDF_Label aLPres = Label().FindChild( ChildLab_Presentation);
+ TNaming_Builder tnBuild(aLPres);
+ tnBuild.Generated(aPresentation);
+ Handle(TCollection_HAsciiString) aName = theObject->GetPresentationName();
+ if( !aName.IsNull() )
+ {
+ TCollection_ExtendedString str ( aName->String() );
+ TDataStd_Name::Set ( aLPres, str );
+ }
+ }
+
}
//=======================================================================
anObj->SetPosition(aPosition->Get());
}
+ Handle(TDataStd_RealArray) aLoc, aN, aR;
+ if(Label().FindChild(ChildLab_PlaneLoc).FindAttribute(TDataStd_RealArray::GetID(), aLoc) && aLoc->Length() == 3 &&
+ Label().FindChild(ChildLab_PlaneN).FindAttribute(TDataStd_RealArray::GetID(), aN) && aN->Length() == 3 &&
+ Label().FindChild(ChildLab_PlaneRef).FindAttribute(TDataStd_RealArray::GetID(), aR) && aR->Length() == 3 )
+ {
+ gp_Pnt aL(aLoc->Value(aLoc->Lower()), aLoc->Value(aLoc->Lower()+1), aLoc->Value(aLoc->Lower()+2));
+ gp_Dir aD(aN->Value(aN->Lower()), aN->Value(aN->Lower()+1), aN->Value(aN->Lower()+2));
+ gp_Dir aDR(aR->Value(aR->Lower()), aR->Value(aR->Lower()+1), aR->Value(aR->Lower()+2));
+ gp_Ax2 anAx(aL, aD, aDR);
+ anObj->SetPlane(anAx);
+ }
+
+ Handle(TDataStd_RealArray) aPnt;
+ if(Label().FindChild(ChildLab_Pnt).FindAttribute(TDataStd_RealArray::GetID(), aPnt) && aPnt->Length() == 3 )
+ {
+ gp_Pnt aP(aLoc->Value(aPnt->Lower()), aPnt->Value(aPnt->Lower()+1), aPnt->Value(aPnt->Lower()+2));
+ anObj->SetPoint(aP);
+ }
+
+ Handle(TDataStd_RealArray) aPntText;
+ if(Label().FindChild(ChildLab_PntText).FindAttribute(TDataStd_RealArray::GetID(), aPntText) && aPntText->Length() == 3 )
+ {
+ gp_Pnt aP (aPntText->Value(aPntText->Lower()), aPntText->Value(aPntText->Lower()+1), aPntText->Value(aPntText->Lower()+2));
+ anObj->SetPointTextAttach(aP);
+ }
+
Handle(TDataStd_Integer) aIsDTarget;
if(Label().FindChild(ChildLab_IsDTarget).FindAttribute(TDataStd_Integer::GetID(), aIsDTarget))
{
}
else
{
- Handle(TDataStd_RealArray) aLoc;
- Handle(TDataStd_RealArray) aN;
- Handle(TDataStd_RealArray) aR;
if(Label().FindChild(ChildLab_AxisLoc).FindAttribute(TDataStd_RealArray::GetID(), aLoc) && aLoc->Length() == 3 &&
Label().FindChild(ChildLab_AxisN).FindAttribute(TDataStd_RealArray::GetID(), aN) && aN->Length() == 3 &&
Label().FindChild(ChildLab_AxisRef).FindAttribute(TDataStd_RealArray::GetID(), aR) && aR->Length() == 3 )
}
}
+ Handle(TNaming_NamedShape) aNS;
+ TDF_Label aLPres = Label().FindChild( ChildLab_Presentation);
+ if ( aLPres.FindAttribute(TNaming_NamedShape::GetID(), aNS) )
+ {
+
+ TopoDS_Shape aPresentation = TNaming_Tool::GetShape(aNS);
+ if( !aPresentation.IsNull())
+ {
+ Handle(TDataStd_Name) aNameAtrr;
+ Handle(TCollection_HAsciiString) aPresentName;
+ if (aLPres.FindAttribute(TDataStd_Name::GetID(),aNameAtrr))
+ {
+ const TCollection_ExtendedString& aName = aNameAtrr->Get();
+
+ if( !aName.IsEmpty())
+ aPresentName = new TCollection_HAsciiString(aName);
+ }
+
+ anObj->SetPresentation(aPresentation, aPresentName);
+ }
+ }
return anObj;
}
Handle(TCollection_HAsciiString) myIdentification;
+
};
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-
+#include <XCAFDoc_DimTolTool.hxx>
#include <Precision.hxx>
#include <Standard_GUID.hxx>
#include <Standard_Type.hxx>
#include <XCAFDoc_GraphNode.hxx>
#include <XCAFDoc_ShapeTool.hxx>
+
IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_DimTolTool,TDF_Attribute)
//=======================================================================
}
+
//=======================================================================
//function : ID
//purpose :
#include <TDF_LabelSequence.hxx>
#include <Standard_Integer.hxx>
#include <TColStd_HArray1OfReal.hxx>
+#include <TopoDS_Shape.hxx>
+
class XCAFDoc_ShapeTool;
class TDF_Label;
class Standard_GUID;
//! Returns Datum label defined for label ShapeL
Standard_EXPORT Standard_Boolean GetRefDatumLabel (const TDF_Label& theShapeL, TDF_LabelSequence& theDatum) const;
-
+
Standard_EXPORT const Standard_GUID& ID() const Standard_OVERRIDE;
Standard_EXPORT void Restore (const Handle(TDF_Attribute)& with) Standard_OVERRIDE;
#include <TColStd_HArray1OfReal.hxx>
#include <TopoDS.hxx>
#include <XCAFDimTolObjects_DimensionObject.hxx>
+#include <TNaming_Tool.hxx>
+#include <TDataStd_Name.hxx>
IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_Dimension,TDF_Attribute)
ChildLab_Modifiers,
ChildLab_Path,
ChildLab_Dir,
- ChildLab_Pnts
+ ChildLab_Pnts,
+ ChildLab_PlaneLoc,
+ ChildLab_PlaneN,
+ ChildLab_PlaneRef,
+ ChildLab_PntText,
+ ChildLab_Presentation
+
};
//=======================================================================
Handle(TColgp_HArray1OfPnt) aP = theObject->GetPoints();
if(!aP.IsNull() && aP->Length() > 0)
{
- anArrR = new TColStd_HArray1OfReal(1,6);
+ anArrR = new TColStd_HArray1OfReal(1,aP->Length() * 3);
Handle(TDataStd_RealArray) aPnts;
anArrR->SetValue(1,aP->Value(1).X());
anArrR->SetValue(2,aP->Value(1).Y());
anArrR->SetValue(3,aP->Value(1).Z());
- anArrR->SetValue(4,aP->Value(2).X());
- anArrR->SetValue(5,aP->Value(2).Y());
- anArrR->SetValue(6,aP->Value(2).Z());
+ if (aP->Length() == 2) {
+ anArrR->SetValue(4,aP->Value(2).X());
+ anArrR->SetValue(5,aP->Value(2).Y());
+ anArrR->SetValue(6,aP->Value(2).Z());
+ }
aPnts = new TDataStd_RealArray();
Label().FindChild(ChildLab_Pnts).AddAttribute(aPnts);
aPnts->ChangeArray(anArrR);
}
+
+ if (theObject->HasPlane())
+ {
+ Handle(TDataStd_RealArray) aLoc = new TDataStd_RealArray();
+ Handle(TDataStd_RealArray) aN = new TDataStd_RealArray();
+ Handle(TDataStd_RealArray) aRAtt = new TDataStd_RealArray();
+ gp_Ax2 anAx = theObject->GetPlane();
+
+ Handle(TColStd_HArray1OfReal) aLocArr = new TColStd_HArray1OfReal(1, 3);
+ for (Standard_Integer i = 1; i <= 3; i++)
+ aLocArr->SetValue(i, anAx.Location().Coord(i));
+ aLoc->ChangeArray(aLocArr);
+
+ Handle(TColStd_HArray1OfReal) aNArr = new TColStd_HArray1OfReal(1, 3);
+ for (Standard_Integer i = 1; i <= 3; i++)
+ aNArr->SetValue(i, anAx.Direction().Coord(i));
+ aN->ChangeArray(aNArr);
+
+ Handle(TColStd_HArray1OfReal) aRArr = new TColStd_HArray1OfReal(1, 3);
+ for (Standard_Integer i = 1; i <= 3; i++)
+ aRArr->SetValue(i, anAx.XDirection().Coord(i));
+ aRAtt->ChangeArray(aRArr);
+
+ Label().FindChild(ChildLab_PlaneLoc).AddAttribute(aLoc);
+ Label().FindChild(ChildLab_PlaneN).AddAttribute(aN);
+ Label().FindChild(ChildLab_PlaneRef).AddAttribute(aRAtt);
+ }
+
+ if (theObject->HasTextPoint())
+ {
+ Handle(TDataStd_RealArray) aLoc = new TDataStd_RealArray();
+ gp_Pnt aPntText = theObject->GetPointTextAttach();
+
+ Handle(TColStd_HArray1OfReal) aLocArr = new TColStd_HArray1OfReal(1, 3);
+ for (Standard_Integer i = 1; i <= 3; i++)
+ aLocArr->SetValue(i, aPntText.Coord(i));
+ aLoc->ChangeArray(aLocArr);
+
+ Label().FindChild(ChildLab_PntText).AddAttribute(aLoc);
+ }
+
+ TopoDS_Shape aPresentation = theObject->GetPresentation();
+ if( !aPresentation.IsNull())
+ {
+ TDF_Label aLPres = Label().FindChild( ChildLab_Presentation);
+ TNaming_Builder tnBuild(aLPres);
+ tnBuild.Generated(aPresentation);
+ Handle(TCollection_HAsciiString) aName = theObject->GetPresentationName();
+ if( !aName.IsNull() )
+ {
+ TCollection_ExtendedString str ( aName->String() );
+ TDataStd_Name::Set ( aLPres, str );
+ }
+ }
+
}
//=======================================================================
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,2);
- aP->SetValue(1, gp_Pnt(aPnts->Array()->Value(1), aPnts->Array()->Value(2), aPnts->Array()->Value(3)));
- aP->SetValue(2, gp_Pnt(aPnts->Array()->Value(4), aPnts->Array()->Value(5), aPnts->Array()->Value(6)));
+ Handle(TColgp_HArray1OfPnt) aP = new TColgp_HArray1OfPnt(1,aPnts->Array()->Length()/3);
+ gp_Pnt aP1(aPnts->Array()->Value(1), aPnts->Array()->Value(2), aPnts->Array()->Value(3));
+ aP->SetValue(1, aP1);
+ if (aPnts->Array()->Length() == 6)
+ {
+ gp_Pnt aP2(aPnts->Array()->Value(4), aPnts->Array()->Value(5), aPnts->Array()->Value(6));
+ aP->SetValue(2, aP2);
+ }
anObj->SetPoints(aP);
}
+ Handle(TDataStd_RealArray) aLoc, aN, aR;
+ if(Label().FindChild(ChildLab_PlaneLoc).FindAttribute(TDataStd_RealArray::GetID(), aLoc) && aLoc->Length() == 3 &&
+ Label().FindChild(ChildLab_PlaneN).FindAttribute(TDataStd_RealArray::GetID(), aN) && aN->Length() == 3 &&
+ Label().FindChild(ChildLab_PlaneRef).FindAttribute(TDataStd_RealArray::GetID(), aR) && aR->Length() == 3 )
+ {
+ gp_Pnt aL(aLoc->Value(aLoc->Lower()), aLoc->Value(aLoc->Lower()+1), aLoc->Value(aLoc->Lower()+2));
+ gp_Dir aD(aN->Value(aN->Lower()), aN->Value(aN->Lower()+1), aN->Value(aN->Lower()+2));
+ gp_Dir aDR(aR->Value(aR->Lower()), aR->Value(aR->Lower()+1), aR->Value(aR->Lower()+2));
+ gp_Ax2 anAx(aL, aD, aDR);
+ anObj->SetPlane(anAx);
+ }
+
+ Handle(TDataStd_RealArray) aPntText;
+ if(Label().FindChild(ChildLab_PntText).FindAttribute(TDataStd_RealArray::GetID(), aPntText) && aPntText->Length() == 3 )
+ {
+ gp_Pnt aP(aPntText->Value(aPntText->Lower()), aPntText->Value(aPntText->Lower()+1), aPntText->Value(aPntText->Lower()+2));
+ anObj->SetPointTextAttach(aP);
+ }
+
+ Handle(TNaming_NamedShape) aNS;
+ TDF_Label aLPres = Label().FindChild( ChildLab_Presentation);
+ if ( aLPres.FindAttribute(TNaming_NamedShape::GetID(), aNS) )
+ {
+
+ TopoDS_Shape aPresentation = TNaming_Tool::GetShape(aNS);
+ if( !aPresentation.IsNull())
+ {
+
+ Handle(TDataStd_Name) aNameAtrr;
+ Handle(TCollection_HAsciiString) aPresentName;
+ if (aLPres.FindAttribute(TDataStd_Name::GetID(),aNameAtrr))
+ {
+ const TCollection_ExtendedString& aName = aNameAtrr->Get();
+
+ if( !aName.IsEmpty())
+ aPresentName = new TCollection_HAsciiString(aName);
+ }
+
+ anObj->SetPresentation(aPresentation, aPresentName);
+ }
+ }
return anObj;
}
#include <TDataStd_RealArray.hxx>
#include <TDataStd_Real.hxx>
#include <XCAFDimTolObjects_GeomToleranceObject.hxx>
+#include <TNaming_Tool.hxx>
+#include <TNaming_Builder.hxx>
+#include <TCollection_ExtendedString.hxx>
+#include <TDataStd_Name.hxx>
IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_GeomTolerance,TDF_Attribute)
ChildLab_aMaxValueModif,
ChildLab_AxisLoc,
ChildLab_AxisN,
- ChildLab_AxisRef
+ ChildLab_AxisRef,
+ ChildLab_PlaneLoc,
+ ChildLab_PlaneN,
+ ChildLab_PlaneRef,
+ ChildLab_Pnt,
+ ChildLab_PntText,
+ ChildLab_Presentation
};
//=======================================================================
Label().FindChild(ChildLab_AxisN).AddAttribute(aN);
Label().FindChild(ChildLab_AxisRef).AddAttribute(aR);
}
+
+ if (theObject->HasPlane())
+ {
+ Handle(TDataStd_RealArray) aLoc = new TDataStd_RealArray();
+ Handle(TDataStd_RealArray) aN = new TDataStd_RealArray();
+ Handle(TDataStd_RealArray) aR = new TDataStd_RealArray();
+ gp_Ax2 anAx = theObject->GetPlane();
+
+ Handle(TColStd_HArray1OfReal) aLocArr = new TColStd_HArray1OfReal(1, 3);
+ for (Standard_Integer i = 1; i <= 3; i++)
+ aLocArr->SetValue(i, anAx.Location().Coord(i));
+ aLoc->ChangeArray(aLocArr);
+
+ Handle(TColStd_HArray1OfReal) aNArr = new TColStd_HArray1OfReal(1, 3);
+ for (Standard_Integer i = 1; i <= 3; i++)
+ aNArr->SetValue(i, anAx.Direction().Coord(i));
+ aN->ChangeArray(aNArr);
+
+ Handle(TColStd_HArray1OfReal) aRArr = new TColStd_HArray1OfReal(1, 3);
+ for (Standard_Integer i = 1; i <= 3; i++)
+ aRArr->SetValue(i, anAx.XDirection().Coord(i));
+ aR->ChangeArray(aRArr);
+
+ Label().FindChild(ChildLab_PlaneLoc).AddAttribute(aLoc);
+ Label().FindChild(ChildLab_PlaneN).AddAttribute(aN);
+ Label().FindChild(ChildLab_PlaneRef).AddAttribute(aR);
+ }
+
+ if (theObject->HasPoint())
+ {
+ Handle(TDataStd_RealArray) aLoc = new TDataStd_RealArray();
+ gp_Pnt aPnt = theObject->GetPoint();
+
+ Handle(TColStd_HArray1OfReal) aLocArr = new TColStd_HArray1OfReal(1, 3);
+ for (Standard_Integer i = 1; i <= 3; i++)
+ aLocArr->SetValue(i, aPnt.Coord(i));
+ aLoc->ChangeArray(aLocArr);
+
+ Label().FindChild(ChildLab_Pnt).AddAttribute(aLoc);
+ }
+
+ if (theObject->HasPointText())
+ {
+ Handle(TDataStd_RealArray) aLoc = new TDataStd_RealArray();
+ gp_Pnt aPntText = theObject->GetPointTextAttach();
+
+ Handle(TColStd_HArray1OfReal) aLocArr = new TColStd_HArray1OfReal(1, 3);
+ for (Standard_Integer i = 1; i <= 3; i++)
+ aLocArr->SetValue(i, aPntText.Coord(i));
+ aLoc->ChangeArray(aLocArr);
+
+ Label().FindChild(ChildLab_PntText).AddAttribute(aLoc);
+ }
+
+ TopoDS_Shape aPresentation = theObject->GetPresentation();
+ if( !aPresentation.IsNull())
+ {
+ TDF_Label aLPres = Label().FindChild( ChildLab_Presentation);
+ TNaming_Builder tnBuild(aLPres);
+ tnBuild.Generated(aPresentation);
+ Handle(TCollection_HAsciiString) aName = theObject->GetPresentationName();
+ if( !aName.IsNull() )
+ {
+ TCollection_ExtendedString str ( aName->String() );
+ TDataStd_Name::Set ( aLPres, str );
+ }
+ }
+
}
//=======================================================================
gp_Ax2 anAx(aL, aD, aDR);
anObj->SetAxis(anAx);
}
+
+ if(Label().FindChild(ChildLab_PlaneLoc).FindAttribute(TDataStd_RealArray::GetID(), aLoc) && aLoc->Length() == 3 &&
+ Label().FindChild(ChildLab_PlaneN).FindAttribute(TDataStd_RealArray::GetID(), aN) && aN->Length() == 3 &&
+ Label().FindChild(ChildLab_PlaneRef).FindAttribute(TDataStd_RealArray::GetID(), aR) && aR->Length() == 3 )
+ {
+ gp_Pnt aL(aLoc->Value(aLoc->Lower()), aLoc->Value(aLoc->Lower()+1), aLoc->Value(aLoc->Lower()+2));
+ gp_Dir aD(aN->Value(aN->Lower()), aN->Value(aN->Lower()+1), aN->Value(aN->Lower()+2));
+ gp_Dir aDR(aR->Value(aR->Lower()), aR->Value(aR->Lower()+1), aR->Value(aR->Lower()+2));
+ gp_Ax2 anAx(aL, aD, aDR);
+ anObj->SetPlane(anAx);
+ }
+
+ Handle(TDataStd_RealArray) aPnt;
+ if(Label().FindChild(ChildLab_PlaneLoc).FindAttribute(TDataStd_RealArray::GetID(), aPnt) && aPnt->Length() == 3 )
+ {
+ gp_Pnt aP(aLoc->Value(aPnt->Lower()), aPnt->Value(aPnt->Lower()+1), aPnt->Value(aPnt->Lower()+2));
+ anObj->SetPoint(aP);
+ }
+
+ Handle(TDataStd_RealArray) aPntText;
+ if(Label().FindChild(ChildLab_PntText).FindAttribute(TDataStd_RealArray::GetID(), aPntText) && aPntText->Length() == 3 )
+ {
+ gp_Pnt aP(aPntText->Value(aPntText->Lower()), aPntText->Value(aPntText->Lower()+1), aPntText->Value(aPntText->Lower()+2));
+ anObj->SetPointTextAttach(aP);
+ }
+
+ Handle(TNaming_NamedShape) aNS;
+ TDF_Label aLPres = Label().FindChild( ChildLab_Presentation);
+ if ( aLPres.FindAttribute(TNaming_NamedShape::GetID(), aNS) )
+ {
+
+ TopoDS_Shape aPresentation = TNaming_Tool::GetShape(aNS);
+ if( !aPresentation.IsNull())
+ {
+ Handle(TDataStd_Name) aNameAtrr;
+ Handle(TCollection_HAsciiString) aPresentName;
+ if (aLPres.FindAttribute(TDataStd_Name::GetID(),aNameAtrr))
+ {
+ const TCollection_ExtendedString& aName = aNameAtrr->Get();
+
+ if( !aName.IsEmpty())
+ aPresentName = new TCollection_HAsciiString(aName);
+ }
+
+ anObj->SetPresentation(aPresentation, aPresentName);
+ }
+ }
+
return anObj;
}