1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0026827: Position and orientation for GD&T frames

Implementation of graphical annotations of the PMI read from STEP
This commit is contained in:
gka
2016-01-18 19:32:22 +03:00
committed by abv
parent cb72870231
commit 5df609e75d
77 changed files with 4037 additions and 40 deletions

View File

@@ -1,3 +1,9 @@
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
@@ -32,6 +38,8 @@ RWStepVisual_RWCurveStyleFont.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
@@ -116,3 +124,15 @@ RWStepVisual_RWTextStyleWithBoxCharacteristics.cxx
RWStepVisual_RWTextStyleWithBoxCharacteristics.hxx
RWStepVisual_RWViewVolume.cxx
RWStepVisual_RWViewVolume.hxx
RWStepVisual_RWTessellatedItem.hxx
RWStepVisual_RWTessellatedItem.cxx
RWStepVisual_RWTessellatedAnnotationOccurrence.hxx
RWStepVisual_RWTessellatedAnnotationOccurrence.cxx
RWStepVisual_RWTessellatedGeometricSet.hxx
RWStepVisual_RWTessellatedGeometricSet.cxx
RWStepVisual_RWCoordinatesList.hxx
RWStepVisual_RWCoordinatesList.cxx
RWStepVisual_RWTessellatedCurveSet.hxx
RWStepVisual_RWTessellatedCurveSet.cxx

View File

@@ -0,0 +1,108 @@
// 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());
}

View File

@@ -0,0 +1,45 @@
// 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

View File

@@ -0,0 +1,107 @@
// 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());
}

View File

@@ -0,0 +1,45 @@
// 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

View File

@@ -0,0 +1,133 @@
// 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());
}

View File

@@ -0,0 +1,45 @@
// 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

View File

@@ -0,0 +1,115 @@
// 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();
}

View File

@@ -0,0 +1,46 @@
// 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

View File

@@ -0,0 +1,93 @@
// 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());
}

View File

@@ -0,0 +1,45 @@
// 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

View File

@@ -0,0 +1,108 @@
// 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());
}

View File

@@ -0,0 +1,45 @@
// Created on: 2015-10-29
// Created by: Galina Kulikova
// Copyright (c) 2015 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _RWStepVisual_RWTessellatedAnnotationOccurrence_HeaderFile
#define _RWStepVisual_RWTessellatedAnnotationOccurrence_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Integer.hxx>
class StepData_StepReaderData;
class Interface_Check;
class StepVisual_TessellatedAnnotationOccurrence;
class StepData_StepWriter;
class Interface_EntityIterator;
//! Read & Write Module for AnnotationOccurrence
class RWStepVisual_RWTessellatedAnnotationOccurrence
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT RWStepVisual_RWTessellatedAnnotationOccurrence();
Standard_EXPORT void ReadStep (const Handle(StepData_StepReaderData)& data, const Standard_Integer num, Handle(Interface_Check)& ach, const Handle(StepVisual_TessellatedAnnotationOccurrence)& ent) const;
Standard_EXPORT void WriteStep (StepData_StepWriter& SW, const Handle(StepVisual_TessellatedAnnotationOccurrence)& ent) const;
Standard_EXPORT void Share (const Handle(StepVisual_TessellatedAnnotationOccurrence)& ent, Interface_EntityIterator& iter) const;
};
#endif // _RWStepVisual_RWTessellatedAnnotationOccurrence_HeaderFile

View File

@@ -0,0 +1,105 @@
// 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();
}

View File

@@ -0,0 +1,47 @@
// 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

View File

@@ -0,0 +1,96 @@
// 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));
}

View File

@@ -0,0 +1,48 @@
// Created on: 2015-10-29
// Created by: Galina Kulikova
// Copyright (c) 2015 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _RWStepVisual_RWTessellatedGeometricSet_HeaderFile
#define _RWStepVisual_RWTessellatedGeometricSet_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Integer.hxx>
class StepData_StepReaderData;
class Interface_Check;
class StepVisual_TessellatedGeometricSet;
class StepData_StepWriter;
class Interface_EntityIterator;
//! Read & Write Module for AnnotationOccurrence
class RWStepVisual_RWTessellatedGeometricSet
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT RWStepVisual_RWTessellatedGeometricSet();
Standard_EXPORT void ReadStep (const Handle(StepData_StepReaderData)& data,
const Standard_Integer num,
Handle(Interface_Check)& ach,
const Handle(StepVisual_TessellatedGeometricSet)& ent) const;
Standard_EXPORT void WriteStep (StepData_StepWriter& SW, const Handle(StepVisual_TessellatedGeometricSet)& ent) const;
Standard_EXPORT void Share (const Handle(StepVisual_TessellatedGeometricSet)& ent, Interface_EntityIterator& iter) const;
};
#endif // _RWStepVisual_RWTessellatedItem_HeaderFile

View File

@@ -0,0 +1,59 @@
// 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());
}

View File

@@ -0,0 +1,46 @@
// 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