mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0031550: Data Exchange, STEP Import - surface transparency is ignored (SURFACE_STYLE_TRANSPARENT)
Implemented reading and writing transparency to/from step files
This commit is contained in:
committed by
bugmaster
parent
8189cc72d0
commit
691711cd3e
@@ -532,8 +532,12 @@
|
||||
#include <RWStepVisual_RWSurfaceStyleControlGrid.hxx>
|
||||
#include <RWStepVisual_RWSurfaceStyleFillArea.hxx>
|
||||
#include <RWStepVisual_RWSurfaceStyleParameterLine.hxx>
|
||||
#include <RWStepVisual_RWSurfaceStyleReflectanceAmbient.hxx>
|
||||
#include <RWStepVisual_RWSurfaceStyleRendering.hxx>
|
||||
#include <RWStepVisual_RWSurfaceStyleRenderingWithProperties.hxx>
|
||||
#include <RWStepVisual_RWSurfaceStyleSegmentationCurve.hxx>
|
||||
#include <RWStepVisual_RWSurfaceStyleSilhouette.hxx>
|
||||
#include <RWStepVisual_RWSurfaceStyleTransparent.hxx>
|
||||
#include <RWStepVisual_RWSurfaceStyleUsage.hxx>
|
||||
#include <RWStepVisual_RWTemplate.hxx>
|
||||
#include <RWStepVisual_RWTemplateInstance.hxx>
|
||||
@@ -1084,8 +1088,12 @@
|
||||
#include <StepVisual_SurfaceStyleControlGrid.hxx>
|
||||
#include <StepVisual_SurfaceStyleFillArea.hxx>
|
||||
#include <StepVisual_SurfaceStyleParameterLine.hxx>
|
||||
#include <StepVisual_SurfaceStyleReflectanceAmbient.hxx>
|
||||
#include <StepVisual_SurfaceStyleRendering.hxx>
|
||||
#include <StepVisual_SurfaceStyleRenderingWithProperties.hxx>
|
||||
#include <StepVisual_SurfaceStyleSegmentationCurve.hxx>
|
||||
#include <StepVisual_SurfaceStyleSilhouette.hxx>
|
||||
#include <StepVisual_SurfaceStyleTransparent.hxx>
|
||||
#include <StepVisual_SurfaceStyleUsage.hxx>
|
||||
#include <StepVisual_Template.hxx>
|
||||
#include <StepVisual_TemplateInstance.hxx>
|
||||
@@ -5156,6 +5164,34 @@ void RWStepAP214_GeneralModule::FillSharedCase(const Standard_Integer CN,
|
||||
RWStepVisual_RWAnnotationCurveOccurrenceAndAnnotationOccurrenceAndGeomReprItemAndReprItemAndStyledItem tool;
|
||||
tool.Share(anent, iter);
|
||||
}
|
||||
break;
|
||||
case 720:
|
||||
{
|
||||
DeclareAndCast(StepVisual_SurfaceStyleTransparent, anent, ent);
|
||||
RWStepVisual_RWSurfaceStyleTransparent tool;
|
||||
tool.Share(anent, iter);
|
||||
}
|
||||
break;
|
||||
case 721:
|
||||
{
|
||||
DeclareAndCast(StepVisual_SurfaceStyleReflectanceAmbient, anent, ent);
|
||||
RWStepVisual_RWSurfaceStyleReflectanceAmbient tool;
|
||||
tool.Share(anent, iter);
|
||||
}
|
||||
break;
|
||||
case 722:
|
||||
{
|
||||
DeclareAndCast(StepVisual_SurfaceStyleRendering, anent, ent);
|
||||
RWStepVisual_RWSurfaceStyleRendering tool;
|
||||
tool.Share(anent, iter);
|
||||
}
|
||||
break;
|
||||
case 723:
|
||||
{
|
||||
DeclareAndCast(StepVisual_SurfaceStyleRenderingWithProperties, anent, ent);
|
||||
RWStepVisual_RWSurfaceStyleRenderingWithProperties tool;
|
||||
tool.Share(anent, iter);
|
||||
}
|
||||
break;
|
||||
default : break;
|
||||
}
|
||||
@@ -7169,8 +7205,18 @@ Standard_Boolean RWStepAP214_GeneralModule::NewVoid
|
||||
case 719:
|
||||
ent = new StepVisual_AnnotationCurveOccurrenceAndAnnotationOccurrenceAndGeomReprItemAndReprItemAndStyledItem;
|
||||
break;
|
||||
|
||||
|
||||
case 720:
|
||||
ent = new StepVisual_SurfaceStyleTransparent;
|
||||
break;
|
||||
case 721:
|
||||
ent = new StepVisual_SurfaceStyleReflectanceAmbient;
|
||||
break;
|
||||
case 722:
|
||||
ent = new StepVisual_SurfaceStyleRendering;
|
||||
break;
|
||||
case 723:
|
||||
ent = new StepVisual_SurfaceStyleRenderingWithProperties;
|
||||
break;
|
||||
default:
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -7769,7 +7815,11 @@ Standard_Integer RWStepAP214_GeneralModule::CategoryNumber
|
||||
case 717:
|
||||
case 718: return cataux;
|
||||
case 719: return catdr;
|
||||
|
||||
case 720:
|
||||
case 721:
|
||||
case 722:
|
||||
case 723: return catdr;
|
||||
|
||||
default : break;
|
||||
}
|
||||
return 0;
|
||||
|
@@ -433,6 +433,10 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_ReadWriteModule,StepData_ReadWriteModule)
|
||||
|
||||
#include <StepShape_ContextDependentShapeRepresentation.hxx>
|
||||
|
||||
#include <StepVisual_SurfaceStyleTransparent.hxx>
|
||||
#include <StepVisual_SurfaceStyleReflectanceAmbient.hxx>
|
||||
#include <StepVisual_SurfaceStyleRendering.hxx>
|
||||
#include <StepVisual_SurfaceStyleRenderingWithProperties.hxx>
|
||||
|
||||
#include <RWStepBasic_RWAddress.hxx>
|
||||
#include <RWStepShape_RWAdvancedBrepShapeRepresentation.hxx>
|
||||
@@ -1405,6 +1409,10 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_ReadWriteModule,StepData_ReadWriteModule)
|
||||
#include <StepVisual_AnnotationCurveOccurrenceAndAnnotationOccurrenceAndGeomReprItemAndReprItemAndStyledItem.hxx>
|
||||
#include <RWStepVisual_RWAnnotationCurveOccurrenceAndAnnotationOccurrenceAndGeomReprItemAndReprItemAndStyledItem.hxx>
|
||||
|
||||
#include <RWStepVisual_RWSurfaceStyleTransparent.hxx>
|
||||
#include <RWStepVisual_RWSurfaceStyleReflectanceAmbient.hxx>
|
||||
#include <RWStepVisual_RWSurfaceStyleRendering.hxx>
|
||||
#include <RWStepVisual_RWSurfaceStyleRenderingWithProperties.hxx>
|
||||
|
||||
// -- General Declarations (Recognize, StepType) ---
|
||||
|
||||
@@ -2046,6 +2054,12 @@ static TCollection_AsciiString Reco_CharacterizedRepresentation("CHARACTERIZED_R
|
||||
static TCollection_AsciiString Reco_CameraModelD3MultiClipping("CAMERA_MODEL_D3_MULTI_CLIPPING");
|
||||
static TCollection_AsciiString Reco_CameraModelD3MultiClippingIntersection("CAMERA_MODEL_D3_MULTI_CLIPPING_INTERSECTION");
|
||||
static TCollection_AsciiString Reco_CameraModelD3MultiClippingUnion("CAMERA_MODEL_D3_MULTI_CLIPPING_UNION");
|
||||
|
||||
static TCollection_AsciiString Reco_SurfaceStyleTransparent("SURFACE_STYLE_TRANSPARENT");
|
||||
static TCollection_AsciiString Reco_SurfaceStyleReflectanceAmbient("SURFACE_STYLE_REFLECTANCE_AMBIENT");
|
||||
static TCollection_AsciiString Reco_SurfaceStyleRendering("SURFACE_STYLE_RENDERING");
|
||||
static TCollection_AsciiString Reco_SurfaceStyleRenderingWithProperties("SURFACE_STYLE_RENDERING_WITH_PROPERTIES");
|
||||
|
||||
// -- Definition of the libraries --
|
||||
|
||||
static NCollection_DataMap<TCollection_AsciiString, Standard_Integer> typenums;
|
||||
@@ -2703,7 +2717,11 @@ RWStepAP214_ReadWriteModule::RWStepAP214_ReadWriteModule ()
|
||||
typenums.Bind ( Reco_CameraModelD3MultiClippingIntersection, 717);
|
||||
typenums.Bind ( Reco_CameraModelD3MultiClippingUnion, 718);
|
||||
|
||||
|
||||
typenums.Bind (Reco_SurfaceStyleTransparent, 720);
|
||||
typenums.Bind (Reco_SurfaceStyleReflectanceAmbient, 721);
|
||||
typenums.Bind (Reco_SurfaceStyleRendering, 722);
|
||||
typenums.Bind (Reco_SurfaceStyleRenderingWithProperties, 723);
|
||||
|
||||
// SHORT NAMES
|
||||
// NB : la liste est celle de AP203
|
||||
// Directement exploite pour les types simples
|
||||
@@ -4558,6 +4576,11 @@ const TCollection_AsciiString& RWStepAP214_ReadWriteModule::StepType
|
||||
case 717 : return Reco_CameraModelD3MultiClippingIntersection;
|
||||
case 718 : return Reco_CameraModelD3MultiClippingUnion;
|
||||
|
||||
case 720 : return Reco_SurfaceStyleTransparent;
|
||||
case 721 : return Reco_SurfaceStyleReflectanceAmbient;
|
||||
case 722 : return Reco_SurfaceStyleRendering;
|
||||
case 723 : return Reco_SurfaceStyleRenderingWithProperties;
|
||||
|
||||
default : return PasReco;
|
||||
}
|
||||
}
|
||||
@@ -9457,7 +9480,34 @@ void RWStepAP214_ReadWriteModule::ReadStep(const Standard_Integer CN,
|
||||
tool.ReadStep(data, num, ach, anent);
|
||||
}
|
||||
break;
|
||||
|
||||
case 720:
|
||||
{
|
||||
DeclareAndCast(StepVisual_SurfaceStyleTransparent, anent, ent);
|
||||
RWStepVisual_RWSurfaceStyleTransparent tool;
|
||||
tool.ReadStep(data, num, ach, anent);
|
||||
}
|
||||
break;
|
||||
case 721:
|
||||
{
|
||||
DeclareAndCast(StepVisual_SurfaceStyleReflectanceAmbient, anent, ent);
|
||||
RWStepVisual_RWSurfaceStyleReflectanceAmbient tool;
|
||||
tool.ReadStep(data, num, ach, anent);
|
||||
}
|
||||
break;
|
||||
case 722:
|
||||
{
|
||||
DeclareAndCast(StepVisual_SurfaceStyleRendering, anent, ent);
|
||||
RWStepVisual_RWSurfaceStyleRendering tool;
|
||||
tool.ReadStep(data, num, ach, anent);
|
||||
}
|
||||
break;
|
||||
case 723:
|
||||
{
|
||||
DeclareAndCast(StepVisual_SurfaceStyleRenderingWithProperties, anent, ent);
|
||||
RWStepVisual_RWSurfaceStyleRenderingWithProperties tool;
|
||||
tool.ReadStep(data, num, ach, anent);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
ach->AddFail("Type Mismatch when reading - Entity");
|
||||
@@ -14314,7 +14364,34 @@ void RWStepAP214_ReadWriteModule::WriteStep(const Standard_Integer CN,
|
||||
tool.WriteStep(SW, anent);
|
||||
}
|
||||
break;
|
||||
|
||||
case 720:
|
||||
{
|
||||
DeclareAndCast(StepVisual_SurfaceStyleTransparent, anent, ent);
|
||||
RWStepVisual_RWSurfaceStyleTransparent tool;
|
||||
tool.WriteStep(SW, anent);
|
||||
}
|
||||
break;
|
||||
case 721:
|
||||
{
|
||||
DeclareAndCast(StepVisual_SurfaceStyleReflectanceAmbient, anent, ent);
|
||||
RWStepVisual_RWSurfaceStyleReflectanceAmbient tool;
|
||||
tool.WriteStep(SW, anent);
|
||||
}
|
||||
break;
|
||||
case 722:
|
||||
{
|
||||
DeclareAndCast(StepVisual_SurfaceStyleRendering, anent, ent);
|
||||
RWStepVisual_RWSurfaceStyleRendering tool;
|
||||
tool.WriteStep(SW, anent);
|
||||
}
|
||||
break;
|
||||
case 723:
|
||||
{
|
||||
DeclareAndCast(StepVisual_SurfaceStyleRenderingWithProperties, anent, ent);
|
||||
RWStepVisual_RWSurfaceStyleRenderingWithProperties tool;
|
||||
tool.WriteStep(SW, anent);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user