diff --git a/src/RWStepAP214/RWStepAP214_GeneralModule.cxx b/src/RWStepAP214/RWStepAP214_GeneralModule.cxx index 722c5cb7b0..9881d0aeb3 100644 --- a/src/RWStepAP214/RWStepAP214_GeneralModule.cxx +++ b/src/RWStepAP214/RWStepAP214_GeneralModule.cxx @@ -445,6 +445,7 @@ #include #include #include +#include #include #include #include @@ -910,6 +911,10 @@ #include #include #include +#include +#include +#include +#include #include #include #include @@ -934,6 +939,7 @@ #include #include #include +#include #include #include #include @@ -1148,6 +1154,9 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_GeneralModule,StepData_GeneralModule) #include #include #include +#include +#include +#include #include #include #include @@ -1216,8 +1225,6 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_GeneralModule,StepData_GeneralModule) #include #include #include -#include -#include // Added for kinematics implementation #include @@ -5867,6 +5874,27 @@ void RWStepAP214_GeneralModule::FillSharedCase(const Standard_Integer CN, aTool.Share(anEnt, iter); } break; + case 820: + { + DeclareAndCast(StepVisual_AnnotationLeaderCurveOccurrenceAndGeomReprItem, anEnt, ent); + RWStepVisual_RWAnnotationLeaderCurveOccurrenceAndGeomReprItem aTool; + aTool.Share(anEnt, iter); + } + break; + case 821: + { + DeclareAndCast(StepVisual_AnnotationLeaderTerminatorOccurrenceAndGeomReprItem, anEnt, ent); + RWStepVisual_RWAnnotationLeaderTerminatorOccurrenceAndGeomReprItem aTool; + aTool.Share(anEnt, iter); + } + break; + case 824: + { + DeclareAndCast(StepVisual_LeaderDirectedCallout, anEnt, ent); + RWStepVisual_RWLeaderDirectedCallout aTool; + aTool.Share(anEnt, iter); + } + break; default : break; } } @@ -8173,7 +8201,15 @@ Standard_Boolean RWStepAP214_GeneralModule::NewVoid case 818: ent = new StepVisual_CubicBezierTriangulatedFace; break; - + case 820: + ent = new StepVisual_AnnotationLeaderCurveOccurrenceAndGeomReprItem; + break; + case 821: + ent = new StepVisual_AnnotationLeaderTerminatorOccurrenceAndGeomReprItem; + break; + case 824: + ent = new StepVisual_LeaderDirectedCallout; + break; default: return Standard_False; } @@ -8870,6 +8906,9 @@ Standard_Integer RWStepAP214_GeneralModule::CategoryNumber case 816: return cataux; case 817: return cataux; case 818: return cataux; + case 820: return catdr; + case 821: return catdr; + case 824: return cataux; default : break; } return 0; diff --git a/src/RWStepAP214/RWStepAP214_ReadWriteModule.cxx b/src/RWStepAP214/RWStepAP214_ReadWriteModule.cxx index a12fe181ae..5887732654 100644 --- a/src/RWStepAP214/RWStepAP214_ReadWriteModule.cxx +++ b/src/RWStepAP214/RWStepAP214_ReadWriteModule.cxx @@ -194,6 +194,7 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_ReadWriteModule,StepData_ReadWriteModule) #include #include #include +#include #include #include #include @@ -626,6 +627,7 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_ReadWriteModule,StepData_ReadWriteModule) #include #include #include +#include #include #include #include @@ -1360,6 +1362,9 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_ReadWriteModule,StepData_ReadWriteModule) #include #include #include +#include +#include +#include #include #include #include @@ -1410,6 +1415,9 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_ReadWriteModule,StepData_ReadWriteModule) #include #include #include +#include +#include +#include #include #include @@ -1442,8 +1450,6 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_ReadWriteModule,StepData_ReadWriteModule) #include #include #include -#include -#include #include #include @@ -1766,8 +1772,11 @@ static TCollection_AsciiString Reco_HalfSpaceSolid ("HALF_SPACE_SOLID"); static TCollection_AsciiString Reco_Hyperbola ("HYPERBOLA"); static TCollection_AsciiString Reco_IntersectionCurve ("INTERSECTION_CURVE"); static TCollection_AsciiString Reco_Invisibility ("INVISIBILITY"); +static TCollection_AsciiString Reco_LeaderCurve ("LEADER_CURVE"); +static TCollection_AsciiString Reco_LeaderTerminator ("LEADER_TERMINATOR"); static TCollection_AsciiString Reco_LengthMeasureWithUnit ("LENGTH_MEASURE_WITH_UNIT"); static TCollection_AsciiString Reco_LengthUnit ("LENGTH_UNIT"); +static TCollection_AsciiString Reco_LeaderDirectedCallout ("LEADER_DIRECTED_CALLOUT"); static TCollection_AsciiString Reco_Line ("LINE"); static TCollection_AsciiString Reco_LocalTime ("LOCAL_TIME"); static TCollection_AsciiString Reco_Loop ("LOOP"); @@ -2350,6 +2359,8 @@ static TCollection_AsciiString Reco_ComplexTriangulatedSurfaceSet("COMPLEX_TRIAN static TCollection_AsciiString Reco_CubicBezierTessellatedEdge("CUBIC_BEZIER_TESSELLATED_EDGE"); static TCollection_AsciiString Reco_CubicBezierTriangulatedFace("CUBIC_BEZIER_TRIANGULATED_FACE"); + + // -- Definition of the libraries -- static NCollection_DataMap typenums; @@ -3105,6 +3116,9 @@ RWStepAP214_ReadWriteModule::RWStepAP214_ReadWriteModule () typenums.Bind(Reco_ComplexTriangulatedSurfaceSet, 816); typenums.Bind(Reco_CubicBezierTessellatedEdge, 817); typenums.Bind(Reco_CubicBezierTriangulatedFace, 818); + typenums.Bind(Reco_LeaderCurve, 822); + typenums.Bind(Reco_LeaderTerminator, 823); + typenums.Bind(Reco_LeaderDirectedCallout, 824); // SHORT NAMES @@ -3744,6 +3758,17 @@ Standard_Integer RWStepAP214_ReadWriteModule::CaseStep (types(8).IsEqual(StepType(247)))) { return 800; } + else if ((types(1).IsEqual(StepType(7))) && + (types(2).IsEqual(StepType(10))) && + (types(3).IsEqual(StepType(106))) && + (types(4).IsEqual(StepType(144))) && + (types(5).IsEqual(StepType(823))) && + (types(6).IsEqual(StepType(247))) && + (types(7).IsEqual(StepType(270))) && + (types(8).IsEqual(StepType(294)))) + { + return 821; + } } else if (NbComp == 7) { if ((types(1).IsEqual(StepType(48))) && @@ -3836,6 +3861,16 @@ Standard_Integer RWStepAP214_ReadWriteModule::CaseStep (types(7).IsEqual(StepType(271)))) { return 323; } + else if ((types(1).IsEqual(StepType(4))) && + (types(2).IsEqual(StepType(7))) && + (types(3).IsEqual(StepType(106))) && + (types(4).IsEqual(StepType(144))) && + (types(5).IsEqual(StepType(822))) && + (types(6).IsEqual(StepType(247))) && + (types(7).IsEqual(StepType(270)))) + { + return 820; + } } // Added by FMA else if (NbComp == 6) { @@ -4334,6 +4369,10 @@ Standard_Boolean RWStepAP214_ReadWriteModule::IsComplex return Standard_True; case 719: return Standard_True; + case 820: + return Standard_True; + case 821: + return Standard_True; default: return Standard_False; } @@ -5092,6 +5131,9 @@ const TCollection_AsciiString& RWStepAP214_ReadWriteModule::StepType case 816: return Reco_ComplexTriangulatedSurfaceSet; case 817: return Reco_CubicBezierTessellatedEdge; case 818: return Reco_CubicBezierTriangulatedFace; + case 822: return Reco_LeaderCurve; + case 823: return Reco_LeaderTerminator; + case 824: return Reco_LeaderDirectedCallout; default : return PasReco; } } @@ -5429,7 +5471,24 @@ Standard_Boolean RWStepAP214_ReadWriteModule::ComplexType(const Standard_Integer types.Append(StepType(709)); types.Append(StepType(708)); break; - default: return Standard_False; + case 820: + types.Append(StepType(4)); + types.Append(StepType(7)); + types.Append(StepType(106)); + types.Append(StepType(144)); + types.Append(StepType(822)); + types.Append(StepType(247)); + types.Append(StepType(270)); + break; + case 821: + types.Append(StepType(4)); + types.Append(StepType(10)); + types.Append(StepType(106)); + types.Append(StepType(144)); + types.Append(StepType(823)); + types.Append(StepType(247)); + types.Append(StepType(270)); + break; } return Standard_True; } @@ -10694,7 +10753,28 @@ void RWStepAP214_ReadWriteModule::ReadStep(const Standard_Integer CN, aTool.ReadStep(data, num, ach, anEnt); } break; - default: + case 820: + { + DeclareAndCast(StepVisual_AnnotationLeaderCurveOccurrenceAndGeomReprItem, anEnt, ent); + RWStepVisual_RWAnnotationLeaderCurveOccurrenceAndGeomReprItem aTool; + aTool.ReadStep(data, num, ach, anEnt); + } + break; + case 821: + { + DeclareAndCast(StepVisual_AnnotationLeaderTerminatorOccurrenceAndGeomReprItem, anEnt, ent); + RWStepVisual_RWAnnotationLeaderTerminatorOccurrenceAndGeomReprItem aTool; + aTool.ReadStep(data, num, ach, anEnt); + } + break; + case 824: + { + DeclareAndCast(StepVisual_LeaderDirectedCallout, anEnt, ent); + RWStepVisual_RWLeaderDirectedCallout aTool; + aTool.ReadStep(data, num, ach, anEnt); + } + break; + default: ach->AddFail("Type Mismatch when reading - Entity"); } return; @@ -16238,6 +16318,27 @@ void RWStepAP214_ReadWriteModule::WriteStep(const Standard_Integer CN, aTool.WriteStep(SW, anEnt); } break; + case 820: + { + DeclareAndCast(StepVisual_AnnotationLeaderCurveOccurrenceAndGeomReprItem, anEnt, ent); + RWStepVisual_RWAnnotationLeaderCurveOccurrenceAndGeomReprItem aTool; + aTool.WriteStep(SW, anEnt); + } + break; + case 821: + { + DeclareAndCast(StepVisual_AnnotationLeaderTerminatorOccurrenceAndGeomReprItem, anEnt, ent); + RWStepVisual_RWAnnotationLeaderTerminatorOccurrenceAndGeomReprItem aTool; + aTool.WriteStep(SW, anEnt); + } + break; + case 824: + { + DeclareAndCast(StepVisual_LeaderDirectedCallout, anEnt, ent); + RWStepVisual_RWLeaderDirectedCallout aTool; + aTool.WriteStep(SW, anEnt); + } + break; default: return; } diff --git a/src/RWStepVisual/FILES b/src/RWStepVisual/FILES index c1c2ee0ab6..4861ed5778 100644 --- a/src/RWStepVisual/FILES +++ b/src/RWStepVisual/FILES @@ -6,6 +6,10 @@ RWStepVisual_RWAnnotationFillArea.cxx RWStepVisual_RWAnnotationFillArea.hxx RWStepVisual_RWAnnotationFillAreaOccurrence.cxx RWStepVisual_RWAnnotationFillAreaOccurrence.hxx +RWStepVisual_RWAnnotationLeaderCurveOccurrenceAndGeomReprItem.cxx +RWStepVisual_RWAnnotationLeaderCurveOccurrenceAndGeomReprItem.hxx +RWStepVisual_RWAnnotationLeaderTerminatorOccurrenceAndGeomReprItem.cxx +RWStepVisual_RWAnnotationLeaderTerminatorOccurrenceAndGeomReprItem.hxx RWStepVisual_RWAnnotationOccurrence.cxx RWStepVisual_RWAnnotationOccurrence.hxx RWStepVisual_RWAnnotationPlane.cxx @@ -68,6 +72,8 @@ RWStepVisual_RWFillAreaStyleColour.cxx RWStepVisual_RWFillAreaStyleColour.hxx RWStepVisual_RWInvisibility.cxx RWStepVisual_RWInvisibility.hxx +RWStepVisual_RWLeaderDirectedCallout.cxx +RWStepVisual_RWLeaderDirectedCallout.hxx RWStepVisual_RWMechanicalDesignGeometricPresentationArea.cxx RWStepVisual_RWMechanicalDesignGeometricPresentationArea.hxx RWStepVisual_RWMechanicalDesignGeometricPresentationRepresentation.cxx diff --git a/src/RWStepVisual/RWStepVisual_RWAnnotationLeaderCurveOccurrenceAndGeomReprItem.cxx b/src/RWStepVisual/RWStepVisual_RWAnnotationLeaderCurveOccurrenceAndGeomReprItem.cxx new file mode 100644 index 0000000000..e4122d9b5b --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWAnnotationLeaderCurveOccurrenceAndGeomReprItem.cxx @@ -0,0 +1,110 @@ +// Copyright (c) 2023 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 + +#include +#include +#include +#include +#include + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepVisual_RWAnnotationLeaderCurveOccurrenceAndGeomReprItem::ReadStep( + const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_AnnotationLeaderCurveOccurrenceAndGeomReprItem)& theEntity) const +{ + Standard_Integer aNum = 0; + theData->NamedForComplex("REPRESENTATION_ITEM", "RPRITM", theNum, aNum, theCheck); + // Inherited field : name + Handle(TCollection_HAsciiString) aName; + theData->ReadString(aNum, 1, "name", theCheck, aName); + + theData->NamedForComplex("STYLED_ITEM", "STYITM", theNum, aNum, theCheck); + // Inherited field : styles + Handle(StepVisual_HArray1OfPresentationStyleAssignment) aStyles; + Handle(StepVisual_PresentationStyleAssignment) anEnt; + Standard_Integer aSubNum = 0; + if (theData->ReadSubList(aNum, 1, "styles", theCheck, aSubNum)) + { + Standard_Integer aNbParams = theData->NbParams(aSubNum); + aStyles = new StepVisual_HArray1OfPresentationStyleAssignment(1, aNbParams); + for (Standard_Integer aParamInd = 1; aParamInd <= aNbParams; aParamInd++) + { + if (theData->ReadEntity(aSubNum, aParamInd, "presentation_style_assignment", theCheck, + STANDARD_TYPE(StepVisual_PresentationStyleAssignment), anEnt)) + { + aStyles->SetValue(aParamInd, anEnt); + } + } + } + + // Inherited field : item + Handle(Standard_Transient) aItem; + theData->ReadEntity(aNum, 2, "item", theCheck, STANDARD_TYPE(Standard_Transient), aItem); + + // Initialization of the read entity + theEntity->Init(aName, aStyles, aItem); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepVisual_RWAnnotationLeaderCurveOccurrenceAndGeomReprItem::WriteStep( + StepData_StepWriter& theSW, + const Handle(StepVisual_AnnotationLeaderCurveOccurrenceAndGeomReprItem)& theEntity) const +{ + theSW.StartEntity("ANNOTATION_CURVE_OCCURRENCE"); + theSW.StartEntity("ANNOTATION_OCCURRENCE"); + theSW.StartEntity("DRAUGHTING_ANNOTATION_OCCURRENCE"); + theSW.StartEntity("GEOMETRIC_REPRESENTATION_ITEM"); + theSW.StartEntity("LEADER_CURVE"); + theSW.StartEntity("REPRESENTATION_ITEM"); + //Inherited field : name + theSW.Send(theEntity->Name()); + + theSW.StartEntity("STYLED_ITEM"); + // Inherited field : styles + theSW.OpenSub(); + for (StepVisual_HArray1OfPresentationStyleAssignment::Iterator anIter(theEntity->Styles()->Array1()); + anIter.More(); anIter.Next()) + { + theSW.Send(anIter.Value()); + } + theSW.CloseSub(); + + // Inherited field : item + theSW.Send(theEntity->Item()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepVisual_RWAnnotationLeaderCurveOccurrenceAndGeomReprItem::Share( + const Handle(StepVisual_AnnotationLeaderCurveOccurrenceAndGeomReprItem)& theEntity, + Interface_EntityIterator& theIter) const +{ + for (StepVisual_HArray1OfPresentationStyleAssignment::Iterator anIter(theEntity->Styles()->Array1()); + anIter.More(); anIter.Next()) + { + theIter.GetOneItem(anIter.Value()); + } + theIter.GetOneItem(theEntity->Item()); +} diff --git a/src/RWStepVisual/RWStepVisual_RWAnnotationLeaderCurveOccurrenceAndGeomReprItem.hxx b/src/RWStepVisual/RWStepVisual_RWAnnotationLeaderCurveOccurrenceAndGeomReprItem.hxx new file mode 100644 index 0000000000..ce43263d45 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWAnnotationLeaderCurveOccurrenceAndGeomReprItem.hxx @@ -0,0 +1,46 @@ +// Copyright (c) 2023 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_RWAnnotationLeaderCurveOccurrenceAndGeomReprItem_HeaderFile +#define _RWStepVisual_RWAnnotationLeaderCurveOccurrenceAndGeomReprItem_HeaderFile + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepVisual_AnnotationLeaderCurveOccurrenceAndGeomReprItem; +class StepData_StepWriter; +class Interface_EntityIterator; + +//! Read & Write Module for StepVisual_AnnotationLeaderCurveOccurrenceAndGeomReprItem +class RWStepVisual_RWAnnotationLeaderCurveOccurrenceAndGeomReprItem +{ + DEFINE_STANDARD_ALLOC +public: + + RWStepVisual_RWAnnotationLeaderCurveOccurrenceAndGeomReprItem() {}; + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_AnnotationLeaderCurveOccurrenceAndGeomReprItem)& theEntity) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, + const Handle(StepVisual_AnnotationLeaderCurveOccurrenceAndGeomReprItem)& theEntity) const; + + Standard_EXPORT void Share(const Handle(StepVisual_AnnotationLeaderCurveOccurrenceAndGeomReprItem)& theEntity, + Interface_EntityIterator& theIter) const; +}; +#endif // _RWStepVisual_RWAnnotationLeaderCurveOccurrenceAndGeomReprItem_HeaderFile diff --git a/src/RWStepVisual/RWStepVisual_RWAnnotationLeaderTerminatorOccurrenceAndGeomReprItem.cxx b/src/RWStepVisual/RWStepVisual_RWAnnotationLeaderTerminatorOccurrenceAndGeomReprItem.cxx new file mode 100644 index 0000000000..f7327bf50f --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWAnnotationLeaderTerminatorOccurrenceAndGeomReprItem.cxx @@ -0,0 +1,119 @@ +// Copyright (c) 2023 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 + +#include +#include +#include +#include +#include + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepVisual_RWAnnotationLeaderTerminatorOccurrenceAndGeomReprItem::ReadStep( + const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_AnnotationLeaderTerminatorOccurrenceAndGeomReprItem)& theEntity) const +{ + Standard_Integer aNum = 0; + theData->NamedForComplex("REPRESENTATION_ITEM", "RPRITM", theNum, aNum, theCheck); + // Inherited field : name + Handle(TCollection_HAsciiString) aName; + theData->ReadString(aNum, 1, "name", theCheck, aName); + + theData->NamedForComplex("STYLED_ITEM", "STYITM", theNum, aNum, theCheck); + // Inherited field : styles + Handle(StepVisual_HArray1OfPresentationStyleAssignment) aStyles; + Handle(StepVisual_PresentationStyleAssignment) anEnt; + Standard_Integer aSubNum = 0; + if (theData->ReadSubList(aNum, 1, "styles", theCheck, aSubNum)) + { + Standard_Integer aNbParams = theData->NbParams(aSubNum); + aStyles = new StepVisual_HArray1OfPresentationStyleAssignment(1, aNbParams); + for (Standard_Integer aParamInd = 1; aParamInd <= aNbParams; aParamInd++) + { + if (theData->ReadEntity(aSubNum, aParamInd, "presentation_style_assignment", theCheck, + STANDARD_TYPE(StepVisual_PresentationStyleAssignment), anEnt)) + { + aStyles->SetValue(aParamInd, anEnt); + } + } + } + + // Inherited field : item + Handle(Standard_Transient) aItem; + theData->ReadEntity(aNum, 2, "item", theCheck, STANDARD_TYPE(Standard_Transient), aItem); + + theData->NamedForComplex("TERMINATOR_SYMBOL", "STYITM", theNum, aNum, theCheck); + + Handle(StepVisual_AnnotationCurveOccurrence) aTermonator; + theData->ReadEntity(aNum, 1, "annotated_curve", theCheck, STANDARD_TYPE(StepVisual_AnnotationCurveOccurrence), aTermonator); + + // Initialization of the read entity + theEntity->Init(aName, aStyles, aItem, aTermonator); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepVisual_RWAnnotationLeaderTerminatorOccurrenceAndGeomReprItem::WriteStep( + StepData_StepWriter& theSW, + const Handle(StepVisual_AnnotationLeaderTerminatorOccurrenceAndGeomReprItem)& theEntity) const +{ + theSW.StartEntity("ANNOTATION_CURVE_OCCURRENCE"); + theSW.StartEntity("ANNOTATION_SYMBOL_OCCURRENCE"); + theSW.StartEntity("DRAUGHTING_ANNOTATION_OCCURRENCE"); + theSW.StartEntity("GEOMETRIC_REPRESENTATION_ITEM"); + theSW.StartEntity("LEADER_TERMINATOR"); + theSW.StartEntity("REPRESENTATION_ITEM"); + //Inherited field : name + theSW.Send(theEntity->Name()); + + theSW.StartEntity("STYLED_ITEM"); + // Inherited field : styles + theSW.OpenSub(); + for (StepVisual_HArray1OfPresentationStyleAssignment::Iterator anIter(theEntity->Styles()->Array1()); + anIter.More(); anIter.Next()) + { + theSW.Send(anIter.Value()); + } + theSW.CloseSub(); + + // Inherited field : item + theSW.Send(theEntity->Item()); + + theSW.StartEntity("TERMINATOR_SYMBOL"); + theSW.Send(theEntity->Terminator()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepVisual_RWAnnotationLeaderTerminatorOccurrenceAndGeomReprItem::Share( + const Handle(StepVisual_AnnotationLeaderTerminatorOccurrenceAndGeomReprItem)& theEntity, + Interface_EntityIterator& theIter) const +{ + for (StepVisual_HArray1OfPresentationStyleAssignment::Iterator anIter(theEntity->Styles()->Array1()); + anIter.More(); anIter.Next()) + { + theIter.GetOneItem(anIter.Value()); + } + theIter.GetOneItem(theEntity->Item()); + theIter.GetOneItem(theEntity->Terminator()); +} diff --git a/src/RWStepVisual/RWStepVisual_RWAnnotationLeaderTerminatorOccurrenceAndGeomReprItem.hxx b/src/RWStepVisual/RWStepVisual_RWAnnotationLeaderTerminatorOccurrenceAndGeomReprItem.hxx new file mode 100644 index 0000000000..69d494de87 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWAnnotationLeaderTerminatorOccurrenceAndGeomReprItem.hxx @@ -0,0 +1,46 @@ +// Copyright (c) 2023 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_RWAnnotationLeaderTerminatorOccurrenceAndGeomReprItem_HeaderFile +#define _RWStepVisual_RWAnnotationLeaderTerminatorOccurrenceAndGeomReprItem_HeaderFile + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepVisual_AnnotationLeaderTerminatorOccurrenceAndGeomReprItem; +class StepData_StepWriter; +class Interface_EntityIterator; + +//! Read & Write Module for StepVisual_AnnotationLeaderTerminatorOccurrenceAndGeomReprItem +class RWStepVisual_RWAnnotationLeaderTerminatorOccurrenceAndGeomReprItem +{ + DEFINE_STANDARD_ALLOC +public: + + RWStepVisual_RWAnnotationLeaderTerminatorOccurrenceAndGeomReprItem() {}; + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_AnnotationLeaderTerminatorOccurrenceAndGeomReprItem)& theEntity) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, + const Handle(StepVisual_AnnotationLeaderTerminatorOccurrenceAndGeomReprItem)& theEntity) const; + + Standard_EXPORT void Share(const Handle(StepVisual_AnnotationLeaderTerminatorOccurrenceAndGeomReprItem)& theEntity, + Interface_EntityIterator& theIter) const; +}; +#endif // _RWStepVisual_RWAnnotationLeaderTerminatorOccurrenceAndGeomReprItem_HeaderFile diff --git a/src/RWStepVisual/RWStepVisual_RWLeaderDirectedCallout.cxx b/src/RWStepVisual/RWStepVisual_RWLeaderDirectedCallout.cxx new file mode 100644 index 0000000000..a036bcdae5 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWLeaderDirectedCallout.cxx @@ -0,0 +1,99 @@ +// Copyright (c) 2023 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 + +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepVisual_RWLeaderDirectedCallout +//purpose : +//======================================================================= +RWStepVisual_RWLeaderDirectedCallout::RWStepVisual_RWLeaderDirectedCallout() {} + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepVisual_RWLeaderDirectedCallout::ReadStep(const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_LeaderDirectedCallout)& theEnitity) const +{ + if (!theData->CheckNbParams(theNum, 2, theCheck, "draughting_callout")) + { + return; + } + + // Inherited field : name + Handle(TCollection_HAsciiString) aName; + theData->ReadString(theNum, 1, "name", theCheck, aName); + + // Own field: contents + Handle(StepVisual_HArray1OfDraughtingCalloutElement) aContents; + StepVisual_DraughtingCalloutElement anEnt; + Standard_Integer aNbSub; + if (theData->ReadSubList(theNum, 2, "contents", theCheck, aNbSub)) + { + Standard_Integer aNbElements = theData->NbParams(aNbSub); + aContents = new StepVisual_HArray1OfDraughtingCalloutElement(1, aNbElements); + for (Standard_Integer anInd = 1; anInd <= aNbElements; anInd++) + { + if (theData->ReadEntity(aNbSub, anInd, "content", theCheck, anEnt)) + { + aContents->SetValue(anInd, anEnt); + } + } + } + + // Initialisation of the read entity + theEnitity->Init(aName, aContents); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepVisual_RWLeaderDirectedCallout::WriteStep(StepData_StepWriter& theSW, + const Handle(StepVisual_LeaderDirectedCallout)& theEnitity) const +{ + // Inherited field: name + theSW.Send(theEnitity->Name()); + + // Own field: contents + theSW.OpenSub(); + for (Standard_Integer anInd = 1; anInd <= theEnitity->NbContents(); anInd++) + { + theSW.Send(theEnitity->ContentsValue(anInd).Value()); + } + theSW.CloseSub(); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepVisual_RWLeaderDirectedCallout::Share(const Handle(StepVisual_LeaderDirectedCallout)& theEnitity, + Interface_EntityIterator& theIter) const +{ + // Own field: contents + const Standard_Integer aNb = theEnitity->NbContents(); + for (Standard_Integer anInd = 1; anInd <= aNb; anInd++) + { + theIter.AddItem(theEnitity->ContentsValue(anInd).Value()); + } +} diff --git a/src/RWStepVisual/RWStepVisual_RWLeaderDirectedCallout.hxx b/src/RWStepVisual/RWStepVisual_RWLeaderDirectedCallout.hxx new file mode 100644 index 0000000000..61c42b77dc --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWLeaderDirectedCallout.hxx @@ -0,0 +1,46 @@ +// Copyright (c) 2023 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_RWLeaderDirectedCallout_HeaderFile +#define _RWStepVisual_RWLeaderDirectedCallout_HeaderFile + +#include +#include +#include + +class Interface_EntityIterator; +class StepData_StepReaderData; +class Interface_Check; +class StepVisual_LeaderDirectedCallout; +class StepData_StepWriter; + +//! Read & Write Module for LeaderDirectedCallout +class RWStepVisual_RWLeaderDirectedCallout +{ + DEFINE_STANDARD_ALLOC +public: + + Standard_EXPORT RWStepVisual_RWLeaderDirectedCallout(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_LeaderDirectedCallout)& theEntity) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& SW, + const Handle(StepVisual_LeaderDirectedCallout)& theEntity) const; + + Standard_EXPORT void Share(const Handle(StepVisual_LeaderDirectedCallout)& theEntity, + Interface_EntityIterator& theIter) const; +}; +#endif // _RWStepVisual_RWLeaderDirectedCallout_HeaderFile diff --git a/src/STEPCAFControl/STEPCAFControl_Reader.cxx b/src/STEPCAFControl/STEPCAFControl_Reader.cxx index a211ebbb94..560d50e674 100644 --- a/src/STEPCAFControl/STEPCAFControl_Reader.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Reader.cxx @@ -4692,9 +4692,16 @@ void collectRepresentationItems(const Interface_Graph& theGraph, const Handle(StepShape_ShapeRepresentation)& theRepresentation, NCollection_Sequence& theItems) { - Handle(StepRepr_HArray1OfRepresentationItem) aReprItems = theRepresentation->Items(); - for (Standard_Integer itemIt = aReprItems->Lower(); itemIt <= aReprItems->Upper(); itemIt++) - theItems.Append(aReprItems->Value(itemIt)); + for(StepRepr_HArray1OfRepresentationItem::Iterator anIter(theRepresentation->Items()->Array1()); + anIter.More(); anIter.Next()) + { + const Handle(StepRepr_RepresentationItem)& anReprItem = anIter.Value(); + if (anReprItem.IsNull()) + { + continue; + } + theItems.Append(anReprItem); + } Interface_EntityIterator entIt = theGraph.TypedSharings(theRepresentation, STANDARD_TYPE(StepRepr_RepresentationRelationship)); for (entIt.Start(); entIt.More(); entIt.Next()) diff --git a/src/StepAP214/StepAP214_Protocol.cxx b/src/StepAP214/StepAP214_Protocol.cxx index 827ef454eb..33dd8c86b8 100644 --- a/src/StepAP214/StepAP214_Protocol.cxx +++ b/src/StepAP214/StepAP214_Protocol.cxx @@ -163,6 +163,7 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI #include #include #include +#include #include #include #include @@ -663,6 +664,8 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI #include #include #include +#include +#include #include // Added for kinematics implementation @@ -1558,6 +1561,9 @@ StepAP214_Protocol::StepAP214_Protocol () types.Bind(STANDARD_TYPE(StepVisual_ComplexTriangulatedSurfaceSet), 816); types.Bind(STANDARD_TYPE(StepVisual_CubicBezierTessellatedEdge), 817); types.Bind(STANDARD_TYPE(StepVisual_CubicBezierTriangulatedFace), 818); + types.Bind(STANDARD_TYPE(StepVisual_AnnotationLeaderCurveOccurrenceAndGeomReprItem), 820); + types.Bind(STANDARD_TYPE(StepVisual_AnnotationLeaderTerminatorOccurrenceAndGeomReprItem), 821); + types.Bind(STANDARD_TYPE(StepVisual_LeaderDirectedCallout), 824); } diff --git a/src/StepVisual/FILES b/src/StepVisual/FILES deleted file mode 100644 index ab69d5c5b3..0000000000 --- a/src/StepVisual/FILES +++ /dev/null @@ -1,310 +0,0 @@ -StepVisual_AnnotationCurveOccurrence.cxx -StepVisual_AnnotationCurveOccurrence.hxx -StepVisual_AnnotationCurveOccurrenceAndGeomReprItem.cxx -StepVisual_AnnotationCurveOccurrenceAndGeomReprItem.hxx -StepVisual_AnnotationFillArea.cxx -StepVisual_AnnotationFillArea.hxx -StepVisual_AnnotationFillAreaOccurrence.cxx -StepVisual_AnnotationFillAreaOccurrence.hxx -StepVisual_AnnotationOccurrence.cxx -StepVisual_AnnotationOccurrence.hxx -StepVisual_AnnotationPlane.cxx -StepVisual_AnnotationPlane.hxx -StepVisual_AnnotationPlaneElement.cxx -StepVisual_AnnotationPlaneElement.hxx -StepVisual_AnnotationText.cxx -StepVisual_AnnotationText.hxx -StepVisual_AnnotationTextOccurrence.cxx -StepVisual_AnnotationTextOccurrence.hxx -StepVisual_AreaInSet.cxx -StepVisual_AreaInSet.hxx -StepVisual_AreaOrView.cxx -StepVisual_AreaOrView.hxx -StepVisual_Array1OfAnnotationPlaneElement.hxx -StepVisual_Array1OfBoxCharacteristicSelect.hxx -StepVisual_Array1OfCameraModelD3MultiClippingInterectionSelect.hxx -StepVisual_Array1OfCameraModelD3MultiClippingUnionSelect.hxx -StepVisual_Array1OfCurveStyleFontPattern.hxx -StepVisual_Array1OfDirectionCountSelect.hxx -StepVisual_Array1OfDraughtingCalloutElement.hxx -StepVisual_Array1OfFillStyleSelect.hxx -StepVisual_Array1OfInvisibleItem.hxx -StepVisual_Array1OfLayeredItem.hxx -StepVisual_Array1OfPresentationStyleAssignment.hxx -StepVisual_Array1OfPresentationStyleSelect.hxx -StepVisual_Array1OfRenderingPropertiesSelect.hxx -StepVisual_Array1OfStyleContextSelect.hxx -StepVisual_Array1OfSurfaceStyleElementSelect.hxx -StepVisual_Array1OfTextOrCharacter.hxx -StepVisual_BackgroundColour.cxx -StepVisual_BackgroundColour.hxx -StepVisual_BoxCharacteristicSelect.cxx -StepVisual_BoxCharacteristicSelect.hxx -StepVisual_CameraImage.cxx -StepVisual_CameraImage.hxx -StepVisual_CameraImage2dWithScale.cxx -StepVisual_CameraImage2dWithScale.hxx -StepVisual_CameraImage3dWithScale.cxx -StepVisual_CameraImage3dWithScale.hxx -StepVisual_CameraModel.cxx -StepVisual_CameraModel.hxx -StepVisual_CameraModelD2.cxx -StepVisual_CameraModelD2.hxx -StepVisual_CameraModelD3.cxx -StepVisual_CameraModelD3.hxx -StepVisual_CameraModelD3MultiClipping.cxx -StepVisual_CameraModelD3MultiClipping.hxx -StepVisual_CameraModelD3MultiClippingInterectionSelect.cxx -StepVisual_CameraModelD3MultiClippingInterectionSelect.hxx -StepVisual_CameraModelD3MultiClippingIntersection.cxx -StepVisual_CameraModelD3MultiClippingIntersection.hxx -StepVisual_CameraModelD3MultiClippingUnion.cxx -StepVisual_CameraModelD3MultiClippingUnion.hxx -StepVisual_CameraModelD3MultiClippingUnionSelect.cxx -StepVisual_CameraModelD3MultiClippingUnionSelect.hxx -StepVisual_CameraUsage.cxx -StepVisual_CameraUsage.hxx -StepVisual_CentralOrParallel.hxx -StepVisual_CharacterizedObjAndRepresentationAndDraughtingModel.cxx -StepVisual_CharacterizedObjAndRepresentationAndDraughtingModel.hxx -StepVisual_Colour.cxx -StepVisual_Colour.hxx -StepVisual_ColourRgb.cxx -StepVisual_ColourRgb.hxx -StepVisual_ColourSpecification.cxx -StepVisual_ColourSpecification.hxx -StepVisual_CompositeText.cxx -StepVisual_CompositeText.hxx -StepVisual_CompositeTextWithExtent.cxx -StepVisual_CompositeTextWithExtent.hxx -StepVisual_ContextDependentInvisibility.cxx -StepVisual_ContextDependentInvisibility.hxx -StepVisual_ContextDependentOverRidingStyledItem.cxx -StepVisual_ContextDependentOverRidingStyledItem.hxx -StepVisual_CurveStyle.cxx -StepVisual_CurveStyle.hxx -StepVisual_CurveStyleFont.cxx -StepVisual_CurveStyleFont.hxx -StepVisual_CurveStyleFontPattern.cxx -StepVisual_CurveStyleFontPattern.hxx -StepVisual_CurveStyleFontSelect.cxx -StepVisual_CurveStyleFontSelect.hxx -StepVisual_DirectionCountSelect.cxx -StepVisual_DirectionCountSelect.hxx -StepVisual_DraughtingAnnotationOccurrence.cxx -StepVisual_DraughtingAnnotationOccurrence.hxx -StepVisual_DraughtingCallout.cxx -StepVisual_DraughtingCallout.hxx -StepVisual_DraughtingCalloutElement.cxx -StepVisual_DraughtingCalloutElement.hxx -StepVisual_DraughtingModel.cxx -StepVisual_DraughtingModel.hxx -StepVisual_DraughtingPreDefinedColour.cxx -StepVisual_DraughtingPreDefinedColour.hxx -StepVisual_DraughtingPreDefinedCurveFont.cxx -StepVisual_DraughtingPreDefinedCurveFont.hxx -StepVisual_ExternallyDefinedCurveFont.cxx -StepVisual_ExternallyDefinedCurveFont.hxx -StepVisual_ExternallyDefinedTextFont.cxx -StepVisual_ExternallyDefinedTextFont.hxx -StepVisual_FillAreaStyle.cxx -StepVisual_FillAreaStyle.hxx -StepVisual_FillAreaStyleColour.cxx -StepVisual_FillAreaStyleColour.hxx -StepVisual_FillStyleSelect.cxx -StepVisual_FillStyleSelect.hxx -StepVisual_FontSelect.cxx -StepVisual_FontSelect.hxx -StepVisual_HArray1OfAnnotationPlaneElement.hxx -StepVisual_HArray1OfBoxCharacteristicSelect.hxx -StepVisual_HArray1OfCameraModelD3MultiClippingInterectionSelect.hxx -StepVisual_HArray1OfCameraModelD3MultiClippingUnionSelect.hxx -StepVisual_HArray1OfCurveStyleFontPattern.hxx -StepVisual_HArray1OfDirectionCountSelect.hxx -StepVisual_HArray1OfDraughtingCalloutElement.hxx -StepVisual_HArray1OfFillStyleSelect.hxx -StepVisual_HArray1OfInvisibleItem.hxx -StepVisual_HArray1OfLayeredItem.hxx -StepVisual_HArray1OfPresentationStyleAssignment.hxx -StepVisual_HArray1OfPresentationStyleSelect.hxx -StepVisual_HArray1OfRenderingPropertiesSelect.hxx -StepVisual_HArray1OfStyleContextSelect.hxx -StepVisual_HArray1OfSurfaceStyleElementSelect.hxx -StepVisual_HArray1OfTextOrCharacter.hxx -StepVisual_Invisibility.cxx -StepVisual_Invisibility.hxx -StepVisual_InvisibilityContext.cxx -StepVisual_InvisibilityContext.hxx -StepVisual_InvisibleItem.cxx -StepVisual_InvisibleItem.hxx -StepVisual_LayeredItem.cxx -StepVisual_LayeredItem.hxx -StepVisual_MarkerMember.cxx -StepVisual_MarkerMember.hxx -StepVisual_MarkerSelect.cxx -StepVisual_MarkerSelect.hxx -StepVisual_MarkerType.hxx -StepVisual_MechanicalDesignGeometricPresentationArea.cxx -StepVisual_MechanicalDesignGeometricPresentationArea.hxx -StepVisual_MechanicalDesignGeometricPresentationRepresentation.cxx -StepVisual_MechanicalDesignGeometricPresentationRepresentation.hxx -StepVisual_NullStyle.hxx -StepVisual_NullStyleMember.cxx -StepVisual_NullStyleMember.hxx -StepVisual_OverRidingStyledItem.cxx -StepVisual_OverRidingStyledItem.hxx -StepVisual_PlanarBox.cxx -StepVisual_PlanarBox.hxx -StepVisual_PlanarExtent.cxx -StepVisual_PlanarExtent.hxx -StepVisual_PointStyle.cxx -StepVisual_PointStyle.hxx -StepVisual_PreDefinedColour.cxx -StepVisual_PreDefinedColour.hxx -StepVisual_PreDefinedCurveFont.cxx -StepVisual_PreDefinedCurveFont.hxx -StepVisual_PreDefinedItem.cxx -StepVisual_PreDefinedItem.hxx -StepVisual_PreDefinedTextFont.cxx -StepVisual_PreDefinedTextFont.hxx -StepVisual_PresentationArea.cxx -StepVisual_PresentationArea.hxx -StepVisual_PresentationLayerAssignment.cxx -StepVisual_PresentationLayerAssignment.hxx -StepVisual_PresentationLayerUsage.cxx -StepVisual_PresentationLayerUsage.hxx -StepVisual_PresentationRepresentation.cxx -StepVisual_PresentationRepresentation.hxx -StepVisual_PresentationRepresentationSelect.cxx -StepVisual_PresentationRepresentationSelect.hxx -StepVisual_PresentationSet.cxx -StepVisual_PresentationSet.hxx -StepVisual_PresentationSize.cxx -StepVisual_PresentationSize.hxx -StepVisual_PresentationSizeAssignmentSelect.cxx -StepVisual_PresentationSizeAssignmentSelect.hxx -StepVisual_PresentationStyleAssignment.cxx -StepVisual_PresentationStyleAssignment.hxx -StepVisual_PresentationStyleByContext.cxx -StepVisual_PresentationStyleByContext.hxx -StepVisual_PresentationStyleSelect.cxx -StepVisual_PresentationStyleSelect.hxx -StepVisual_PresentationView.cxx -StepVisual_PresentationView.hxx -StepVisual_PresentedItem.cxx -StepVisual_PresentedItem.hxx -StepVisual_PresentedItemRepresentation.cxx -StepVisual_PresentedItemRepresentation.hxx -StepVisual_RenderingPropertiesSelect.cxx -StepVisual_RenderingPropertiesSelect.hxx -StepVisual_RepositionedTessellatedGeometricSet.hxx -StepVisual_RepositionedTessellatedGeometricSet.cxx -StepVisual_RepositionedTessellatedItem.hxx -StepVisual_RepositionedTessellatedItem.cxx -StepVisual_ShadingSurfaceMethod.hxx -StepVisual_StyleContextSelect.cxx -StepVisual_StyleContextSelect.hxx -StepVisual_StyledItem.cxx -StepVisual_StyledItem.hxx -StepVisual_StyledItemTarget.cxx -StepVisual_StyledItemTarget.hxx -StepVisual_SurfaceSide.hxx -StepVisual_SurfaceSideStyle.cxx -StepVisual_SurfaceSideStyle.hxx -StepVisual_SurfaceStyleBoundary.cxx -StepVisual_SurfaceStyleBoundary.hxx -StepVisual_SurfaceStyleControlGrid.cxx -StepVisual_SurfaceStyleControlGrid.hxx -StepVisual_SurfaceStyleElementSelect.cxx -StepVisual_SurfaceStyleElementSelect.hxx -StepVisual_SurfaceStyleFillArea.cxx -StepVisual_SurfaceStyleFillArea.hxx -StepVisual_SurfaceStyleParameterLine.cxx -StepVisual_SurfaceStyleParameterLine.hxx -StepVisual_SurfaceStyleReflectanceAmbient.cxx -StepVisual_SurfaceStyleReflectanceAmbient.hxx -StepVisual_SurfaceStyleRendering.cxx -StepVisual_SurfaceStyleRendering.hxx -StepVisual_SurfaceStyleRenderingWithProperties.cxx -StepVisual_SurfaceStyleRenderingWithProperties.hxx -StepVisual_SurfaceStyleSegmentationCurve.cxx -StepVisual_SurfaceStyleSegmentationCurve.hxx -StepVisual_SurfaceStyleSilhouette.cxx -StepVisual_SurfaceStyleSilhouette.hxx -StepVisual_SurfaceStyleTransparent.cxx -StepVisual_SurfaceStyleTransparent.hxx -StepVisual_SurfaceStyleUsage.cxx -StepVisual_SurfaceStyleUsage.hxx -StepVisual_Template.cxx -StepVisual_Template.hxx -StepVisual_TemplateInstance.cxx -StepVisual_TemplateInstance.hxx -StepVisual_TextLiteral.cxx -StepVisual_TextLiteral.hxx -StepVisual_TextOrCharacter.cxx -StepVisual_TextOrCharacter.hxx -StepVisual_TextPath.hxx -StepVisual_TextStyle.cxx -StepVisual_TextStyle.hxx -StepVisual_TextStyleForDefinedFont.cxx -StepVisual_TextStyleForDefinedFont.hxx -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 -StepVisual_Array1OfTessellatedEdgeOrVertex.hxx -StepVisual_Array1OfTessellatedStructuredItem.hxx -StepVisual_ComplexTriangulatedFace.cxx -StepVisual_ComplexTriangulatedFace.hxx -StepVisual_ComplexTriangulatedSurfaceSet.cxx -StepVisual_ComplexTriangulatedSurfaceSet.hxx -StepVisual_CubicBezierTessellatedEdge.cxx -StepVisual_CubicBezierTessellatedEdge.hxx -StepVisual_CubicBezierTriangulatedFace.cxx -StepVisual_CubicBezierTriangulatedFace.hxx -StepVisual_EdgeOrCurve.cxx -StepVisual_EdgeOrCurve.hxx -StepVisual_FaceOrSurface.cxx -StepVisual_FaceOrSurface.hxx -StepVisual_HArray1OfTessellatedEdgeOrVertex.hxx -StepVisual_HArray1OfTessellatedStructuredItem.hxx -StepVisual_PathOrCompositeCurve.cxx -StepVisual_PathOrCompositeCurve.hxx -StepVisual_TessellatedConnectingEdge.cxx -StepVisual_TessellatedConnectingEdge.hxx -StepVisual_TessellatedEdge.cxx -StepVisual_TessellatedEdge.hxx -StepVisual_TessellatedEdgeOrVertex.cxx -StepVisual_TessellatedEdgeOrVertex.hxx -StepVisual_TessellatedFace.cxx -StepVisual_TessellatedFace.hxx -StepVisual_TessellatedPointSet.cxx -StepVisual_TessellatedPointSet.hxx -StepVisual_TessellatedShapeRepresentation.cxx -StepVisual_TessellatedShapeRepresentation.hxx -StepVisual_TessellatedShapeRepresentationWithAccuracyParameters.cxx -StepVisual_TessellatedShapeRepresentationWithAccuracyParameters.hxx -StepVisual_TessellatedShell.cxx -StepVisual_TessellatedShell.hxx -StepVisual_TessellatedSolid.cxx -StepVisual_TessellatedSolid.hxx -StepVisual_TessellatedStructuredItem.cxx -StepVisual_TessellatedStructuredItem.hxx -StepVisual_TessellatedSurfaceSet.cxx -StepVisual_TessellatedSurfaceSet.hxx -StepVisual_TessellatedVertex.cxx -StepVisual_TessellatedVertex.hxx -StepVisual_TessellatedWire.cxx -StepVisual_TessellatedWire.hxx -StepVisual_TriangulatedFace.cxx -StepVisual_TriangulatedFace.hxx diff --git a/src/StepVisual/StepVisual_AnnotationLeaderCurveOccurrenceAndGeomReprItem.cxx b/src/StepVisual/StepVisual_AnnotationLeaderCurveOccurrenceAndGeomReprItem.cxx new file mode 100644 index 0000000000..c84de209b2 --- /dev/null +++ b/src/StepVisual/StepVisual_AnnotationLeaderCurveOccurrenceAndGeomReprItem.cxx @@ -0,0 +1,22 @@ +// Copyright (c) 2023 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 + +IMPLEMENT_STANDARD_RTTIEXT(StepVisual_AnnotationLeaderCurveOccurrenceAndGeomReprItem, StepVisual_AnnotationCurveOccurrence) + +//======================================================================= +//function : StepVisual_AnnotationLeaderCurveOccurrenceAndGeomReprItem +//purpose : +//======================================================================= +StepVisual_AnnotationLeaderCurveOccurrenceAndGeomReprItem::StepVisual_AnnotationLeaderCurveOccurrenceAndGeomReprItem() {} diff --git a/src/StepVisual/StepVisual_AnnotationLeaderCurveOccurrenceAndGeomReprItem.hxx b/src/StepVisual/StepVisual_AnnotationLeaderCurveOccurrenceAndGeomReprItem.hxx new file mode 100644 index 0000000000..c0d707ad82 --- /dev/null +++ b/src/StepVisual/StepVisual_AnnotationLeaderCurveOccurrenceAndGeomReprItem.hxx @@ -0,0 +1,34 @@ +// Copyright (c) 2023 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_AnnotationLeaderCurveOccurrenceAndGeomReprItem_HeaderFile +#define _StepVisual_AnnotationLeaderCurveOccurrenceAndGeomReprItem_HeaderFile + +#include + +#include + +//! Added for Dimensional Tolerances +//! Complex STEP entity AnnotationOccurrence & AnnotationOccurrence +//! & DraughtingAnnotationOccurrence & GeometricRepresentationItem +//! & LeaderCurve & RepresentationItem & StyledItem +class StepVisual_AnnotationLeaderCurveOccurrenceAndGeomReprItem : public StepVisual_AnnotationCurveOccurrence +{ +public: + + Standard_EXPORT StepVisual_AnnotationLeaderCurveOccurrenceAndGeomReprItem(); + + DEFINE_STANDARD_RTTIEXT(StepVisual_AnnotationLeaderCurveOccurrenceAndGeomReprItem, StepVisual_AnnotationCurveOccurrence) + +}; +#endif // _StepVisual_AnnotationLeaderCurveOccurrenceAndGeomReprItem_HeaderFile diff --git a/src/StepVisual/StepVisual_AnnotationLeaderTerminatorCurveOccurrenceAndGeomReprItem.cxx b/src/StepVisual/StepVisual_AnnotationLeaderTerminatorCurveOccurrenceAndGeomReprItem.cxx new file mode 100644 index 0000000000..a2dfebc979 --- /dev/null +++ b/src/StepVisual/StepVisual_AnnotationLeaderTerminatorCurveOccurrenceAndGeomReprItem.cxx @@ -0,0 +1,35 @@ +// Copyright (c) 2023 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 + +IMPLEMENT_STANDARD_RTTIEXT(StepVisual_AnnotationLeaderTerminatorOccurrenceAndGeomReprItem, StepVisual_AnnotationCurveOccurrence) + +//======================================================================= +//function : StepVisual_AnnotationLeaderTerminatorOccurrenceAndGeomReprItem +//purpose : +//======================================================================= +StepVisual_AnnotationLeaderTerminatorOccurrenceAndGeomReprItem::StepVisual_AnnotationLeaderTerminatorOccurrenceAndGeomReprItem() {} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepVisual_AnnotationLeaderTerminatorOccurrenceAndGeomReprItem::Init(const Handle(TCollection_HAsciiString)& theName, + const Handle(StepVisual_HArray1OfPresentationStyleAssignment)& theStyles, + const Handle(Standard_Transient)& theItem, + const Handle(StepVisual_AnnotationCurveOccurrence)& theAnnotatedTerminator) +{ + StepVisual_StyledItem::Init(theName, theStyles, theItem); + myAnnotatedTerminator = theAnnotatedTerminator; +} diff --git a/src/StepVisual/StepVisual_AnnotationLeaderTerminatorOccurrenceAndGeomReprItem.cxx b/src/StepVisual/StepVisual_AnnotationLeaderTerminatorOccurrenceAndGeomReprItem.cxx new file mode 100644 index 0000000000..40322a67c5 --- /dev/null +++ b/src/StepVisual/StepVisual_AnnotationLeaderTerminatorOccurrenceAndGeomReprItem.cxx @@ -0,0 +1,35 @@ +// Copyright (c) 2023 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 + +IMPLEMENT_STANDARD_RTTIEXT(StepVisual_AnnotationLeaderTerminatorOccurrenceAndGeomReprItem, StepVisual_AnnotationOccurrence) + +//======================================================================= +//function : StepVisual_AnnotationLeaderTerminatorOccurrenceAndGeomReprItem +//purpose : +//======================================================================= +StepVisual_AnnotationLeaderTerminatorOccurrenceAndGeomReprItem::StepVisual_AnnotationLeaderTerminatorOccurrenceAndGeomReprItem() {} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepVisual_AnnotationLeaderTerminatorOccurrenceAndGeomReprItem::Init(const Handle(TCollection_HAsciiString)& theName, + const Handle(StepVisual_HArray1OfPresentationStyleAssignment)& theStyles, + const Handle(Standard_Transient)& theItem, + const Handle(StepVisual_AnnotationCurveOccurrence)& theAnnotatedTerminator) +{ + StepVisual_StyledItem::Init(theName, theStyles, theItem); + myAnnotatedTerminator = theAnnotatedTerminator; +} diff --git a/src/StepVisual/StepVisual_AnnotationLeaderTerminatorOccurrenceAndGeomReprItem.hxx b/src/StepVisual/StepVisual_AnnotationLeaderTerminatorOccurrenceAndGeomReprItem.hxx new file mode 100644 index 0000000000..e768f78857 --- /dev/null +++ b/src/StepVisual/StepVisual_AnnotationLeaderTerminatorOccurrenceAndGeomReprItem.hxx @@ -0,0 +1,46 @@ +// Copyright (c) 2023 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_AnnotationLeaderTerminatorOccurrenceAndGeomReprItem_HeaderFile +#define _StepVisual_AnnotationLeaderTerminatorOccurrenceAndGeomReprItem_HeaderFile + +#include + +#include + +//! Added for Dimensional Tolerances +//! Complex STEP entity AnnotationOccurrence & AnnotationSymbolOccurrence +//! & DraughtingAnnotationOccurrence & GeometricRepresentationItem +//! & LeaderTerminator & RepresentationItem & StyledItem +class StepVisual_AnnotationLeaderTerminatorOccurrenceAndGeomReprItem : public StepVisual_AnnotationOccurrence +{ +public: + + Standard_EXPORT StepVisual_AnnotationLeaderTerminatorOccurrenceAndGeomReprItem(); + + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theName, + const Handle(StepVisual_HArray1OfPresentationStyleAssignment)& theStyles, + const Handle(Standard_Transient)& theItem, + const Handle(StepVisual_AnnotationCurveOccurrence)& theAnnotatedTerminator); + + const Handle(StepVisual_AnnotationCurveOccurrence)& Terminator() const { return myAnnotatedTerminator; } + + void SetTerminator(const Handle(StepVisual_AnnotationCurveOccurrence)& theAnnotatedTerminator) { myAnnotatedTerminator = theAnnotatedTerminator; } + + DEFINE_STANDARD_RTTIEXT(StepVisual_AnnotationLeaderTerminatorOccurrenceAndGeomReprItem, StepVisual_AnnotationOccurrence) + +private: + + Handle(StepVisual_AnnotationCurveOccurrence) myAnnotatedTerminator; +}; +#endif // _StepVisual_AnnotationLeaderTerminatorOccurrenceAndGeomReprItem_HeaderFile diff --git a/src/StepVisual/StepVisual_DraughtingCalloutElement.cxx b/src/StepVisual/StepVisual_DraughtingCalloutElement.cxx index e7f8c2ca89..324ea21201 100644 --- a/src/StepVisual/StepVisual_DraughtingCalloutElement.cxx +++ b/src/StepVisual/StepVisual_DraughtingCalloutElement.cxx @@ -14,9 +14,11 @@ // commercial license or contractual agreement. #include + #include #include #include +#include #include #include @@ -24,14 +26,12 @@ //function : StepVisual_DraughtingCalloutElement //purpose : //======================================================================= - -StepVisual_DraughtingCalloutElement::StepVisual_DraughtingCalloutElement () { } +StepVisual_DraughtingCalloutElement::StepVisual_DraughtingCalloutElement() {} //======================================================================= //function : CaseNum -//purpose : +//purpose : //======================================================================= - Standard_Integer StepVisual_DraughtingCalloutElement::CaseNum(const Handle(Standard_Transient)& ent) const { if (ent.IsNull()) return 0; @@ -39,17 +39,51 @@ Standard_Integer StepVisual_DraughtingCalloutElement::CaseNum(const Handle(Stand if (ent->IsKind(STANDARD_TYPE(StepVisual_AnnotationTextOccurrence))) return 2; if (ent->IsKind(STANDARD_TYPE(StepVisual_TessellatedAnnotationOccurrence))) return 3; if (ent->IsKind(STANDARD_TYPE(StepVisual_AnnotationFillAreaOccurrence))) return 4; + if (ent->IsKind(STANDARD_TYPE(StepVisual_AnnotationLeaderTerminatorOccurrenceAndGeomReprItem))) return 5; return 0; } +//======================================================================= +//function : AnnotationCurveOccurrence +//purpose : +//======================================================================= Handle(StepVisual_AnnotationCurveOccurrence) StepVisual_DraughtingCalloutElement::AnnotationCurveOccurrence() const -{ return GetCasted(StepVisual_AnnotationCurveOccurrence,Value()); } +{ + return GetCasted(StepVisual_AnnotationCurveOccurrence, Value()); +} +//======================================================================= +//function : TessellatedAnnotationOccurrence +//purpose : +//======================================================================= Handle(StepVisual_TessellatedAnnotationOccurrence) StepVisual_DraughtingCalloutElement::TessellatedAnnotationOccurrence() const -{ return GetCasted(StepVisual_TessellatedAnnotationOccurrence,Value()); } +{ + return GetCasted(StepVisual_TessellatedAnnotationOccurrence, Value()); +} +//======================================================================= +//function : AnnotationTextOccurrence +//purpose : +//======================================================================= Handle(StepVisual_AnnotationTextOccurrence) StepVisual_DraughtingCalloutElement::AnnotationTextOccurrence() const -{ return GetCasted(StepVisual_AnnotationTextOccurrence, Value()); } +{ + return GetCasted(StepVisual_AnnotationTextOccurrence, Value()); +} +//======================================================================= +//function : AnnotationFillAreaOccurrence +//purpose : +//======================================================================= Handle(StepVisual_AnnotationFillAreaOccurrence) StepVisual_DraughtingCalloutElement::AnnotationFillAreaOccurrence() const -{ return GetCasted(StepVisual_AnnotationFillAreaOccurrence, Value()); } +{ + return GetCasted(StepVisual_AnnotationFillAreaOccurrence, Value()); +} + +//======================================================================= +//function : AnnotationLeaderTerminatorOccurrence +//purpose : +//======================================================================= +Handle(StepVisual_AnnotationLeaderTerminatorOccurrenceAndGeomReprItem) StepVisual_DraughtingCalloutElement::AnnotationLeaderTerminatorOccurrence() const +{ + return GetCasted(StepVisual_AnnotationLeaderTerminatorOccurrenceAndGeomReprItem, Value()); +} diff --git a/src/StepVisual/StepVisual_DraughtingCalloutElement.hxx b/src/StepVisual/StepVisual_DraughtingCalloutElement.hxx index 56c9d5799a..c0a939e390 100644 --- a/src/StepVisual/StepVisual_DraughtingCalloutElement.hxx +++ b/src/StepVisual/StepVisual_DraughtingCalloutElement.hxx @@ -25,6 +25,7 @@ class Standard_Transient; class StepVisual_AnnotationCurveOccurrence; class StepVisual_AnnotationFillAreaOccurrence; +class StepVisual_AnnotationLeaderTerminatorOccurrenceAndGeomReprItem; class StepVisual_AnnotationTextOccurrence; class StepVisual_TessellatedAnnotationOccurrence; @@ -42,6 +43,7 @@ public: //! 2 -> AnnotationTextOccurrence //! 3 -> TessellatedAnnotationOccurrence //! 4 -> AnnotationFillAreaOccurrence + //! 5 -> AnnotationLeaderTerminatorOccurrence //! 0 else Standard_EXPORT Standard_Integer CaseNum (const Handle(Standard_Transient)& ent) const; @@ -56,5 +58,9 @@ public: //! returns Value as a AnnotationFillAreaOccurrence Standard_EXPORT Handle(StepVisual_AnnotationFillAreaOccurrence) AnnotationFillAreaOccurrence() const; + + //! returns Value as a AnnotationLeaderTerminatorOccurrence + Standard_EXPORT Handle(StepVisual_AnnotationLeaderTerminatorOccurrenceAndGeomReprItem) AnnotationLeaderTerminatorOccurrence() const; + }; #endif // StepVisual_DraughtingCalloutElement diff --git a/src/StepVisual/StepVisual_LeaderDirectedCallout.cxx b/src/StepVisual/StepVisual_LeaderDirectedCallout.cxx new file mode 100644 index 0000000000..e083a3d447 --- /dev/null +++ b/src/StepVisual/StepVisual_LeaderDirectedCallout.cxx @@ -0,0 +1,22 @@ +// Copyright (c) 2023 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 + +IMPLEMENT_STANDARD_RTTIEXT(StepVisual_LeaderDirectedCallout, StepVisual_DraughtingCallout) + +//======================================================================= +//function : StepVisual_LeaderDirectedCallout +//purpose : +//======================================================================= +StepVisual_LeaderDirectedCallout::StepVisual_LeaderDirectedCallout () {} diff --git a/src/StepVisual/StepVisual_LeaderDirectedCallout.hxx b/src/StepVisual/StepVisual_LeaderDirectedCallout.hxx new file mode 100644 index 0000000000..e721f79c9d --- /dev/null +++ b/src/StepVisual/StepVisual_LeaderDirectedCallout.hxx @@ -0,0 +1,28 @@ +// Copyright (c) 2023 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_LeaderDirectedCallout_HeaderFile +#define _StepVisual_LeaderDirectedCallout_HeaderFile + +#include + +class StepVisual_LeaderDirectedCallout : public StepVisual_DraughtingCallout +{ +public: + + //! Returns a LeaderDirectedCallout + Standard_EXPORT StepVisual_LeaderDirectedCallout(); + + DEFINE_STANDARD_RTTIEXT(StepVisual_LeaderDirectedCallout, StepVisual_DraughtingCallout) +}; +#endif // _StepVisual_LeaderDirectedCallout_HeaderFile diff --git a/tests/bugs/step/bug33331 b/tests/bugs/step/bug33331 new file mode 100644 index 0000000000..06b1362b68 --- /dev/null +++ b/tests/bugs/step/bug33331 @@ -0,0 +1,14 @@ +puts "====================================" +puts "0033331: Data Exchange, Step Import - Unsupported Representation Items" +puts "====================================" +puts "" + +pload DCAF +Close D -silent + +param "read.stepcaf.subshapes.name" 1 + +ReadStep D [locate_data_file bug33331.stp] + +param "read.stepcaf.subshapes.name" 0 +Close D