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

0032731: Data Exchange, Step Import - Incorrect PMI text location

Added new complex Entity for representation of PMI
Added moving the presentation with new entity
This commit is contained in:
dpasukhi
2022-01-31 11:09:20 +03:00
committed by smoskvin
parent 0b6a0adb3a
commit e1f5ac2c9b
15 changed files with 535 additions and 6 deletions

View File

@@ -529,6 +529,8 @@
#include <RWStepVisual_RWPresentationStyleByContext.hxx>
#include <RWStepVisual_RWPresentationView.hxx>
#include <RWStepVisual_RWPresentedItemRepresentation.hxx>
#include <RWStepVisual_RWRepositionedTessellatedGeometricSet.hxx>
#include <RWStepVisual_RWRepositionedTessellatedItem.hxx>
#include <RWStepVisual_RWStyledItem.hxx>
#include <RWStepVisual_RWSurfaceSideStyle.hxx>
#include <RWStepVisual_RWSurfaceStyleBoundary.hxx>
@@ -1088,6 +1090,8 @@
#include <StepVisual_PresentationStyleByContext.hxx>
#include <StepVisual_PresentationView.hxx>
#include <StepVisual_PresentedItemRepresentation.hxx>
#include <StepVisual_RepositionedTessellatedGeometricSet.hxx>
#include <StepVisual_RepositionedTessellatedItem.hxx>
#include <StepVisual_StyledItem.hxx>
#include <StepVisual_SurfaceSideStyle.hxx>
#include <StepVisual_SurfaceStyleBoundary.hxx>
@@ -5890,7 +5894,13 @@ void RWStepAP214_GeneralModule::FillSharedCase(const Standard_Integer CN,
tool.Share(anent, iter);
}
break;
case 802:
{
DeclareAndCast(StepVisual_RepositionedTessellatedGeometricSet, anEnt, ent);
RWStepVisual_RWRepositionedTessellatedGeometricSet aTool;
aTool.Share(anEnt, iter);
break;
}
default : break;
}
}
@@ -8146,6 +8156,12 @@ Standard_Boolean RWStepAP214_GeneralModule::NewVoid
case 801:
ent = new StepKinematics_MechanismStateRepresentation;
break;
case 802:
ent = new StepVisual_RepositionedTessellatedGeometricSet;
break;
case 803:
ent = new StepVisual_RepositionedTessellatedItem;
break;
default:
return Standard_False;
@@ -8826,6 +8842,8 @@ Standard_Integer RWStepAP214_GeneralModule::CategoryNumber
case 798: return cataux;
case 800: return catsh;
case 801: return cataux;
case 802: return cataux;
case 803: return cataux;
default : break;
}
return 0;

View File

@@ -258,6 +258,8 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_ReadWriteModule,StepData_ReadWriteModule)
#include <StepVisual_PresentationStyleAssignment.hxx>
#include <StepVisual_PresentationStyleByContext.hxx>
#include <StepVisual_PresentationView.hxx>
#include <StepVisual_RepositionedTessellatedGeometricSet.hxx>
#include <StepVisual_RepositionedTessellatedItem.hxx>
#include <StepBasic_Product.hxx>
#include <StepBasic_ProductCategory.hxx>
#include <StepBasic_ProductContext.hxx>
@@ -654,6 +656,8 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_ReadWriteModule,StepData_ReadWriteModule)
#include <RWStepVisual_RWPresentationStyleAssignment.hxx>
#include <RWStepVisual_RWPresentationStyleByContext.hxx>
#include <RWStepVisual_RWPresentationView.hxx>
#include <RWStepVisual_RWRepositionedTessellatedGeometricSet.hxx>
#include <RWStepVisual_RWRepositionedTessellatedItem.hxx>
#include <RWStepBasic_RWProduct.hxx>
#include <RWStepBasic_RWProductCategory.hxx>
#include <RWStepBasic_RWProductContext.hxx>
@@ -2205,6 +2209,8 @@ 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_TessellatedItem("TESSELLATED_ITEM");
static TCollection_AsciiString Reco_RepositionedTessellatedItem("REPOSITIONED_TESSELLATED_ITEM");
static TCollection_AsciiString Reco_CoordinatesList("COORDINATES_LIST");
static TCollection_AsciiString Reco_ConstructiveGeometryRepresentation("CONSTRUCTIVE_GEOMETRY_REPRESENTATION");
static TCollection_AsciiString Reco_ConstructiveGeometryRepresentationRelationship("CONSTRUCTIVE_GEOMETRY_REPRESENTATION_RELATIONSHIP");
@@ -3035,6 +3041,7 @@ RWStepAP214_ReadWriteModule::RWStepAP214_ReadWriteModule ()
typenums.Bind(Reco_LinearFlexibleLinkRepresentation, 798);
typenums.Bind(Reco_KinematicPair, 799);
typenums.Bind(Reco_MechanismStateRepresentation, 801);
typenums.Bind(Reco_RepositionedTessellatedItem, 803);
// SHORT NAMES
@@ -3827,13 +3834,22 @@ Standard_Integer RWStepAP214_ReadWriteModule::CaseStep
types(5).IsEqual(StepType(624))))) {
return 705;
}
if ((types(1).IsEqual(StepType(4))) &&
else if ((types(1).IsEqual(StepType(4))) &&
(types(2).IsEqual(StepType(7))) &&
(types(3).IsEqual(StepType(144))) &&
(types(4).IsEqual(StepType(247))) &&
(types(5).IsEqual(StepType(270)))) {
(types(5).IsEqual(StepType(270))))
{
return 719;
}
else if ((types(1).IsEqual(StepType(144))) &&
(types(2).IsEqual(StepType(803))) &&
(types(3).IsEqual(StepType(247))) &&
(types(4).IsEqual(StepType(709))) &&
(types(5).IsEqual(StepType(708))))
{
return 802;
}
}
else if (NbComp == 4) {
if ((types(1).IsEqual(StepType(161))) &&
@@ -4903,6 +4919,7 @@ const TCollection_AsciiString& RWStepAP214_ReadWriteModule::StepType
case 704: return Reco_AnnotationPlane;
case 707 : return Reco_TessellatedAnnotationOccurrence;
case 708 : return Reco_TessellatedItem;
case 709 : return Reco_TessellatedGeometricSet;
case 710 : return Reco_TessellatedCurveSet;
@@ -4996,7 +5013,7 @@ const TCollection_AsciiString& RWStepAP214_ReadWriteModule::StepType
case 798: return Reco_LinearFlexibleLinkRepresentation;
case 799: return Reco_KinematicPair;
case 801: return Reco_MechanismStateRepresentation;
case 803: return Reco_RepositionedTessellatedItem;
default : return PasReco;
}
}
@@ -5327,6 +5344,13 @@ Standard_Boolean RWStepAP214_ReadWriteModule::ComplexType(const Standard_Integer
types.Append(StepType(759));
types.Append(StepType(247));
break;
case 802:
types.Append(StepType(144));
types.Append(StepType(803));
types.Append(StepType(247));
types.Append(StepType(709));
types.Append(StepType(708));
break;
default: return Standard_False;
}
return Standard_True;
@@ -10473,6 +10497,20 @@ void RWStepAP214_ReadWriteModule::ReadStep(const Standard_Integer CN,
tool.ReadStep(data, num, ach, anent);
}
break;
case 802:
{
DeclareAndCast(StepVisual_RepositionedTessellatedGeometricSet, anEnt, ent);
RWStepVisual_RWRepositionedTessellatedGeometricSet aTool;
aTool.ReadStep(data, num, ach, anEnt);
break;
}
case 803:
{
DeclareAndCast(StepVisual_RepositionedTessellatedItem, anEnt, ent);
RWStepVisual_RWRepositionedTessellatedItem aTool;
aTool.ReadStep(data, num, ach, anEnt);
break;
}
default:
ach->AddFail("Type Mismatch when reading - Entity");
@@ -15896,7 +15934,20 @@ void RWStepAP214_ReadWriteModule::WriteStep(const Standard_Integer CN,
tool.WriteStep(SW, anent);
}
break;
case 802:
{
DeclareAndCast(StepVisual_RepositionedTessellatedGeometricSet, anEnt, ent);
RWStepVisual_RWRepositionedTessellatedGeometricSet aTool;
aTool.WriteStep(SW, anEnt);
break;
}
case 803:
{
DeclareAndCast(StepVisual_RepositionedTessellatedItem, anEnt, ent);
RWStepVisual_RWRepositionedTessellatedItem aTool;
aTool.WriteStep(SW, anEnt);
break;
}
default:
return;
}