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