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

0032666: Data Exchange - Cannot write STEP file from an XCAF document containing only triangulations in the faces

Added support of reading and writing of the triangulated_surface_set.
Prevented creation of tesselated geometry under the schemas different from AP242DIS.
test step_read corrected, switched parameter write.step.schema to AP242DIS in begin and back to AP214CD at the end
This commit is contained in:
dorlov
2022-11-21 18:13:43 +00:00
committed by ichesnok
parent 38581280d0
commit 58390c4eb1
26 changed files with 1343 additions and 548 deletions

View File

@@ -1372,6 +1372,7 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_GeneralModule,StepData_GeneralModule)
#include <StepVisual_ComplexTriangulatedSurfaceSet.hxx>
#include <StepVisual_CubicBezierTessellatedEdge.hxx>
#include <StepVisual_CubicBezierTriangulatedFace.hxx>
#include <StepVisual_TriangulatedSurfaceSet.hxx>
#include <RWStepVisual_RWTessellatedConnectingEdge.hxx>
#include <RWStepVisual_RWTessellatedEdge.hxx>
@@ -1388,6 +1389,7 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_GeneralModule,StepData_GeneralModule)
#include <RWStepVisual_RWComplexTriangulatedSurfaceSet.hxx>
#include <RWStepVisual_RWCubicBezierTessellatedEdge.hxx>
#include <RWStepVisual_RWCubicBezierTriangulatedFace.hxx>
#include <RWStepVisual_RWTriangulatedSurfaceSet.hxx>
static Standard_Integer catsh,catdr,catstr,catdsc,cataux;
@@ -5867,6 +5869,13 @@ void RWStepAP214_GeneralModule::FillSharedCase(const Standard_Integer CN,
aTool.Share(anEnt, iter);
}
break;
case 819:
{
DeclareAndCast(StepVisual_TriangulatedSurfaceSet, anEnt, ent);
RWStepVisual_RWTriangulatedSurfaceSet aTool;
aTool.Share(anEnt, iter);
}
break;
default : break;
}
}
@@ -8173,6 +8182,9 @@ Standard_Boolean RWStepAP214_GeneralModule::NewVoid
case 818:
ent = new StepVisual_CubicBezierTriangulatedFace;
break;
case 819:
ent = new StepVisual_TriangulatedSurfaceSet;
break;
default:
return Standard_False;

View File

@@ -455,6 +455,7 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_ReadWriteModule,StepData_ReadWriteModule)
#include <StepVisual_ComplexTriangulatedSurfaceSet.hxx>
#include <StepVisual_CubicBezierTessellatedEdge.hxx>
#include <StepVisual_CubicBezierTriangulatedFace.hxx>
#include <StepVisual_TriangulatedSurfaceSet.hxx>
#include <RWStepVisual_RWTessellatedConnectingEdge.hxx>
#include <RWStepVisual_RWTessellatedEdge.hxx>
@@ -471,6 +472,7 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_ReadWriteModule,StepData_ReadWriteModule)
#include <RWStepVisual_RWComplexTriangulatedSurfaceSet.hxx>
#include <RWStepVisual_RWCubicBezierTessellatedEdge.hxx>
#include <RWStepVisual_RWCubicBezierTriangulatedFace.hxx>
#include <RWStepVisual_RWTriangulatedSurfaceSet.hxx>
#include <RWStepBasic_RWAddress.hxx>
#include <RWStepShape_RWAdvancedBrepShapeRepresentation.hxx>
@@ -2349,6 +2351,7 @@ static TCollection_AsciiString Reco_ComplexTriangulatedFace("COMPLEX_TRIANGULATE
static TCollection_AsciiString Reco_ComplexTriangulatedSurfaceSet("COMPLEX_TRIANGULATED_SURFACE_SET");
static TCollection_AsciiString Reco_CubicBezierTessellatedEdge("CUBIC_BEZIER_TESSELLATED_EDGE");
static TCollection_AsciiString Reco_CubicBezierTriangulatedFace("CUBIC_BEZIER_TRIANGULATED_FACE");
static TCollection_AsciiString Reco_TriangulatedSurfaceSet("TRIANGULATED_SURFACE_SET");
// -- Definition of the libraries --
@@ -3105,6 +3108,7 @@ RWStepAP214_ReadWriteModule::RWStepAP214_ReadWriteModule ()
typenums.Bind(Reco_ComplexTriangulatedSurfaceSet, 816);
typenums.Bind(Reco_CubicBezierTessellatedEdge, 817);
typenums.Bind(Reco_CubicBezierTriangulatedFace, 818);
typenums.Bind(Reco_TriangulatedSurfaceSet, 819);
// SHORT NAMES
@@ -5092,6 +5096,7 @@ const TCollection_AsciiString& RWStepAP214_ReadWriteModule::StepType
case 816: return Reco_ComplexTriangulatedSurfaceSet;
case 817: return Reco_CubicBezierTessellatedEdge;
case 818: return Reco_CubicBezierTriangulatedFace;
case 819: return Reco_TriangulatedSurfaceSet;
default : return PasReco;
}
}
@@ -10694,6 +10699,13 @@ void RWStepAP214_ReadWriteModule::ReadStep(const Standard_Integer CN,
aTool.ReadStep(data, num, ach, anEnt);
}
break;
case 819:
{
DeclareAndCast(StepVisual_TriangulatedSurfaceSet, anEnt, ent);
RWStepVisual_RWTriangulatedSurfaceSet aTool;
aTool.ReadStep(data, num, ach, anEnt);
}
break;
default:
ach->AddFail("Type Mismatch when reading - Entity");
}
@@ -16238,6 +16250,13 @@ void RWStepAP214_ReadWriteModule::WriteStep(const Standard_Integer CN,
aTool.WriteStep(SW, anEnt);
}
break;
case 819:
{
DeclareAndCast(StepVisual_TriangulatedSurfaceSet, anEnt, ent);
RWStepVisual_RWTriangulatedSurfaceSet aTool;
aTool.WriteStep(SW, anEnt);
}
break;
default:
return;
}