#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>
#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>
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;
}
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;
}
case 717:
case 718: return cataux;
case 719: return catdr;
-
+ case 720:
+ case 721:
+ case 722:
+ case 723: return catdr;
+
default : break;
}
return 0;
#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>
#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) ---
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;
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
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;
}
}
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");
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;
}
RWStepVisual_RWSurfaceStyleFillArea.hxx
RWStepVisual_RWSurfaceStyleParameterLine.cxx
RWStepVisual_RWSurfaceStyleParameterLine.hxx
+RWStepVisual_RWSurfaceStyleReflectanceAmbient.cxx
+RWStepVisual_RWSurfaceStyleReflectanceAmbient.hxx
+RWStepVisual_RWSurfaceStyleRendering.cxx
+RWStepVisual_RWSurfaceStyleRendering.hxx
+RWStepVisual_RWSurfaceStyleRenderingWithProperties.cxx
+RWStepVisual_RWSurfaceStyleRenderingWithProperties.hxx
RWStepVisual_RWSurfaceStyleSegmentationCurve.cxx
RWStepVisual_RWSurfaceStyleSegmentationCurve.hxx
RWStepVisual_RWSurfaceStyleSilhouette.cxx
RWStepVisual_RWSurfaceStyleSilhouette.hxx
+RWStepVisual_RWSurfaceStyleTransparent.cxx
+RWStepVisual_RWSurfaceStyleTransparent.hxx
RWStepVisual_RWSurfaceStyleUsage.cxx
RWStepVisual_RWSurfaceStyleUsage.hxx
RWStepVisual_RWTemplate.cxx
--- /dev/null
+// Created on : Thu May 14 15:13:19 2020
+// Created by: Igor KHOZHANOV
+// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
+// Copyright (c) Open CASCADE 2020
+//
+// 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 <RWStepVisual_RWSurfaceStyleReflectanceAmbient.hxx>
+#include <Interface_EntityIterator.hxx>
+#include <StepData_StepReaderData.hxx>
+#include <StepData_StepWriter.hxx>
+#include <StepVisual_SurfaceStyleReflectanceAmbient.hxx>
+#include <Standard_Real.hxx>
+
+//=======================================================================
+//function : RWStepVisual_RWSurfaceStyleReflectanceAmbient
+//purpose :
+//=======================================================================
+
+RWStepVisual_RWSurfaceStyleReflectanceAmbient::RWStepVisual_RWSurfaceStyleReflectanceAmbient() {}
+
+
+//=======================================================================
+//function : ReadStep
+//purpose :
+//=======================================================================
+
+void RWStepVisual_RWSurfaceStyleReflectanceAmbient::ReadStep (const Handle(StepData_StepReaderData)& data,
+ const Standard_Integer num,
+ Handle(Interface_Check)& ach,
+ const Handle(StepVisual_SurfaceStyleReflectanceAmbient)& ent) const
+{
+ // Check number of parameters
+ if ( ! data->CheckNbParams(num,1,ach,"surface_style_reflectance_ambient") ) return;
+
+ // Own fields of SurfaceStyleReflectanceAmbient
+
+ Standard_Real aAmbientReflectance;
+ data->ReadReal (num, 1, "ambient_reflectance", ach, aAmbientReflectance);
+
+ // Initialize entity
+ ent->Init(aAmbientReflectance);
+}
+
+//=======================================================================
+//function : WriteStep
+//purpose :
+//=======================================================================
+
+void RWStepVisual_RWSurfaceStyleReflectanceAmbient::WriteStep (StepData_StepWriter& SW,
+ const Handle(StepVisual_SurfaceStyleReflectanceAmbient)& ent) const
+{
+
+ // Own fields of SurfaceStyleReflectanceAmbient
+
+ SW.Send (ent->AmbientReflectance());
+}
+
+//=======================================================================
+//function : Share
+//purpose :
+//=======================================================================
+
+void RWStepVisual_RWSurfaceStyleReflectanceAmbient::Share (const Handle(StepVisual_SurfaceStyleReflectanceAmbient)& ,
+ Interface_EntityIterator& ) const
+{
+
+ // Own fields of SurfaceStyleReflectanceAmbient
+}
--- /dev/null
+// Created on : Thu May 14 15:13:19 2020
+// Created by: Igor KHOZHANOV
+// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
+// Copyright (c) Open CASCADE 2020
+//
+// 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_RWSurfaceStyleReflectanceAmbient_HeaderFile_
+#define _RWStepVisual_RWSurfaceStyleReflectanceAmbient_HeaderFile_
+
+#include <Standard.hxx>
+#include <Standard_DefineAlloc.hxx>
+#include <Standard_Handle.hxx>
+
+class StepData_StepReaderData;
+class Interface_Check;
+class StepData_StepWriter;
+class Interface_EntityIterator;
+class StepVisual_SurfaceStyleReflectanceAmbient;
+
+//! Read & Write tool for SurfaceStyleReflectanceAmbient
+class RWStepVisual_RWSurfaceStyleReflectanceAmbient
+{
+public:
+
+ DEFINE_STANDARD_ALLOC
+
+ Standard_EXPORT RWStepVisual_RWSurfaceStyleReflectanceAmbient();
+
+ Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& data, const Standard_Integer num, Handle(Interface_Check)& ach, const Handle(StepVisual_SurfaceStyleReflectanceAmbient)& ent) const;
+
+ Standard_EXPORT void WriteStep(StepData_StepWriter& SW, const Handle(StepVisual_SurfaceStyleReflectanceAmbient)& ent) const;
+
+ Standard_EXPORT void Share(const Handle(StepVisual_SurfaceStyleReflectanceAmbient)& ent, Interface_EntityIterator& iter) const;
+
+};
+#endif // _RWStepVisual_RWSurfaceStyleReflectanceAmbient_HeaderFile_
--- /dev/null
+// Created on : Thu May 14 15:13:19 2020
+// Created by: Igor KHOZHANOV
+// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
+// Copyright (c) Open CASCADE 2020
+//
+// 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 <RWStepVisual_RWSurfaceStyleRendering.hxx>
+#include <Interface_EntityIterator.hxx>
+#include <StepData_StepReaderData.hxx>
+#include <StepData_StepWriter.hxx>
+#include <StepVisual_SurfaceStyleRendering.hxx>
+#include <StepVisual_ShadingSurfaceMethod.hxx>
+#include <StepVisual_Colour.hxx>
+
+//=======================================================================
+//function : RWStepVisual_RWSurfaceStyleRendering
+//purpose :
+//=======================================================================
+
+RWStepVisual_RWSurfaceStyleRendering::RWStepVisual_RWSurfaceStyleRendering() {}
+
+
+//=======================================================================
+//function : ReadStep
+//purpose :
+//=======================================================================
+
+void RWStepVisual_RWSurfaceStyleRendering::ReadStep (const Handle(StepData_StepReaderData)& data,
+ const Standard_Integer num,
+ Handle(Interface_Check)& ach,
+ const Handle(StepVisual_SurfaceStyleRendering)& ent) const
+{
+ // Check number of parameters
+ if ( ! data->CheckNbParams(num,2,ach,"surface_style_rendering") ) return;
+
+ // Own fields of SurfaceStyleRendering
+
+ StepVisual_ShadingSurfaceMethod aRenderingMethod = StepVisual_ssmNormalShading;
+ if (data->ParamType (num, 1) == Interface_ParamEnum) {
+ Standard_CString text = data->ParamCValue(num, 1);
+ if (strcmp(text, ".CONSTANT_SHADING.")) aRenderingMethod = StepVisual_ssmConstantShading;
+ else if (strcmp(text, ".COLOUR_SHADING.")) aRenderingMethod = StepVisual_ssmColourShading;
+ else if (strcmp(text, ".DOT_SHADING.")) aRenderingMethod = StepVisual_ssmDotShading;
+ else if (strcmp(text, ".NORMAL_SHADING.")) aRenderingMethod = StepVisual_ssmNormalShading;
+ else ach->AddFail("Parameter #1 (rendering_method) has not allowed value");
+ }
+ else ach->AddFail("Parameter #1 (rendering_method) is not enumeration");
+
+ Handle(StepVisual_Colour) aSurfaceColour;
+ data->ReadEntity (num, 2, "surface_colour", ach, STANDARD_TYPE(StepVisual_Colour), aSurfaceColour);
+
+ // Initialize entity
+ ent->Init(aRenderingMethod,
+ aSurfaceColour);
+}
+
+//=======================================================================
+//function : WriteStep
+//purpose :
+//=======================================================================
+
+void RWStepVisual_RWSurfaceStyleRendering::WriteStep (StepData_StepWriter& SW,
+ const Handle(StepVisual_SurfaceStyleRendering)& ent) const
+{
+
+ // Own fields of SurfaceStyleRendering
+
+ switch (ent->RenderingMethod()) {
+ case StepVisual_ssmConstantShading: SW.SendEnum (".CONSTANT_SHADING."); break;
+ case StepVisual_ssmColourShading: SW.SendEnum (".COLOUR_SHADING."); break;
+ case StepVisual_ssmDotShading: SW.SendEnum (".DOT_SHADING."); break;
+ case StepVisual_ssmNormalShading: SW.SendEnum (".NORMAL_SHADING."); break;
+ }
+
+ SW.Send (ent->SurfaceColour());
+}
+
+//=======================================================================
+//function : Share
+//purpose :
+//=======================================================================
+
+void RWStepVisual_RWSurfaceStyleRendering::Share (const Handle(StepVisual_SurfaceStyleRendering)& ent,
+ Interface_EntityIterator& iter) const
+{
+
+ // Own fields of SurfaceStyleRendering
+
+ iter.AddItem (ent->SurfaceColour());
+}
--- /dev/null
+// Created on : Thu May 14 15:13:19 2020
+// Created by: Igor KHOZHANOV
+// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
+// Copyright (c) Open CASCADE 2020
+//
+// 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_RWSurfaceStyleRendering_HeaderFile_
+#define _RWStepVisual_RWSurfaceStyleRendering_HeaderFile_
+
+#include <Standard.hxx>
+#include <Standard_DefineAlloc.hxx>
+#include <Standard_Handle.hxx>
+
+class StepData_StepReaderData;
+class Interface_Check;
+class StepData_StepWriter;
+class Interface_EntityIterator;
+class StepVisual_SurfaceStyleRendering;
+
+//! Read & Write tool for SurfaceStyleRendering
+class RWStepVisual_RWSurfaceStyleRendering
+{
+public:
+
+ DEFINE_STANDARD_ALLOC
+
+ Standard_EXPORT RWStepVisual_RWSurfaceStyleRendering();
+
+ Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& data, const Standard_Integer num, Handle(Interface_Check)& ach, const Handle(StepVisual_SurfaceStyleRendering)& ent) const;
+
+ Standard_EXPORT void WriteStep(StepData_StepWriter& SW, const Handle(StepVisual_SurfaceStyleRendering)& ent) const;
+
+ Standard_EXPORT void Share(const Handle(StepVisual_SurfaceStyleRendering)& ent, Interface_EntityIterator& iter) const;
+
+};
+#endif // _RWStepVisual_RWSurfaceStyleRendering_HeaderFile_
--- /dev/null
+// Created on : Thu May 14 15:13:19 2020
+// Created by: Igor KHOZHANOV
+// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
+// Copyright (c) Open CASCADE 2020
+//
+// 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 <RWStepVisual_RWSurfaceStyleRenderingWithProperties.hxx>
+#include <Interface_EntityIterator.hxx>
+#include <StepData_StepReaderData.hxx>
+#include <StepData_StepWriter.hxx>
+#include <StepVisual_SurfaceStyleRenderingWithProperties.hxx>
+#include <StepVisual_ShadingSurfaceMethod.hxx>
+#include <StepVisual_Colour.hxx>
+#include <StepVisual_HArray1OfRenderingPropertiesSelect.hxx>
+#include <StepVisual_RenderingPropertiesSelect.hxx>
+
+//=======================================================================
+//function : RWStepVisual_RWSurfaceStyleRenderingWithProperties
+//purpose :
+//=======================================================================
+
+RWStepVisual_RWSurfaceStyleRenderingWithProperties::RWStepVisual_RWSurfaceStyleRenderingWithProperties() {}
+
+
+//=======================================================================
+//function : ReadStep
+//purpose :
+//=======================================================================
+
+void RWStepVisual_RWSurfaceStyleRenderingWithProperties::ReadStep (const Handle(StepData_StepReaderData)& data,
+ const Standard_Integer num,
+ Handle(Interface_Check)& ach,
+ const Handle(StepVisual_SurfaceStyleRenderingWithProperties)& ent) const
+{
+ // Check number of parameters
+ if ( ! data->CheckNbParams(num,3,ach,"surface_style_rendering_with_properties") ) return;
+
+ // Inherited fields of SurfaceStyleRendering
+
+ StepVisual_ShadingSurfaceMethod aSurfaceStyleRendering_RenderingMethod = StepVisual_ssmNormalShading;
+ if (data->ParamType (num, 1) == Interface_ParamEnum) {
+ Standard_CString text = data->ParamCValue(num, 1);
+ if (strcmp(text, ".CONSTANT_SHADING.")) aSurfaceStyleRendering_RenderingMethod = StepVisual_ssmConstantShading;
+ else if (strcmp(text, ".COLOUR_SHADING.")) aSurfaceStyleRendering_RenderingMethod = StepVisual_ssmColourShading;
+ else if (strcmp(text, ".DOT_SHADING.")) aSurfaceStyleRendering_RenderingMethod = StepVisual_ssmDotShading;
+ else if (strcmp(text, ".NORMAL_SHADING.")) aSurfaceStyleRendering_RenderingMethod = StepVisual_ssmNormalShading;
+ else ach->AddFail("Parameter #1 (surface_style_rendering.rendering_method) has not allowed value");
+ }
+ else ach->AddFail("Parameter #1 (surface_style_rendering.rendering_method) is not enumeration");
+
+ Handle(StepVisual_Colour) aSurfaceStyleRendering_SurfaceColour;
+ data->ReadEntity (num, 2, "surface_style_rendering.surface_colour", ach, STANDARD_TYPE(StepVisual_Colour), aSurfaceStyleRendering_SurfaceColour);
+
+ // Own fields of SurfaceStyleRenderingWithProperties
+
+ Handle(StepVisual_HArray1OfRenderingPropertiesSelect) aProperties;
+ Standard_Integer sub3 = 0;
+ if ( data->ReadSubList (num, 3, "properties", ach, sub3) ) {
+ Standard_Integer nb0 = data->NbParams(sub3);
+ aProperties = new StepVisual_HArray1OfRenderingPropertiesSelect (1, nb0);
+ Standard_Integer num2 = sub3;
+ for ( Standard_Integer i0=1; i0 <= nb0; i0++ ) {
+ StepVisual_RenderingPropertiesSelect anIt0;
+ data->ReadEntity (num2, i0, "rendering_properties_select", ach, anIt0);
+ aProperties->SetValue(i0, anIt0);
+ }
+ }
+
+ // Initialize entity
+ ent->Init(aSurfaceStyleRendering_RenderingMethod,
+ aSurfaceStyleRendering_SurfaceColour,
+ aProperties);
+}
+
+//=======================================================================
+//function : WriteStep
+//purpose :
+//=======================================================================
+
+void RWStepVisual_RWSurfaceStyleRenderingWithProperties::WriteStep (StepData_StepWriter& SW,
+ const Handle(StepVisual_SurfaceStyleRenderingWithProperties)& ent) const
+{
+
+ // Own fields of SurfaceStyleRendering
+
+ switch (ent->RenderingMethod()) {
+ case StepVisual_ssmConstantShading: SW.SendEnum (".CONSTANT_SHADING."); break;
+ case StepVisual_ssmColourShading: SW.SendEnum (".COLOUR_SHADING."); break;
+ case StepVisual_ssmDotShading: SW.SendEnum (".DOT_SHADING."); break;
+ case StepVisual_ssmNormalShading: SW.SendEnum (".NORMAL_SHADING."); break;
+ }
+
+ SW.Send (ent->SurfaceColour());
+
+ // Own fields of SurfaceStyleRenderingWithProperties
+
+ SW.OpenSub();
+ for (Standard_Integer i2=1; i2 <= ent->Properties()->Length(); i2++ ) {
+ StepVisual_RenderingPropertiesSelect Var0 = ent->Properties()->Value(i2);
+ SW.Send (Var0.Value());
+ }
+ SW.CloseSub();
+}
+
+//=======================================================================
+//function : Share
+//purpose :
+//=======================================================================
+
+void RWStepVisual_RWSurfaceStyleRenderingWithProperties::Share (const Handle(StepVisual_SurfaceStyleRenderingWithProperties)& ent,
+ Interface_EntityIterator& iter) const
+{
+
+ // Inherited fields of SurfaceStyleRendering
+
+ iter.AddItem (ent->StepVisual_SurfaceStyleRendering::SurfaceColour());
+
+ // Own fields of SurfaceStyleRenderingWithProperties
+
+ for (Standard_Integer i2=1; i2 <= ent->Properties()->Length(); i2++ ) {
+ StepVisual_RenderingPropertiesSelect Var0 = ent->Properties()->Value(i2);
+ iter.AddItem (Var0.Value());
+ }
+}
--- /dev/null
+// Created on : Thu May 14 15:13:19 2020
+// Created by: Igor KHOZHANOV
+// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
+// Copyright (c) Open CASCADE 2020
+//
+// 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_RWSurfaceStyleRenderingWithProperties_HeaderFile_
+#define _RWStepVisual_RWSurfaceStyleRenderingWithProperties_HeaderFile_
+
+#include <Standard.hxx>
+#include <Standard_DefineAlloc.hxx>
+#include <Standard_Handle.hxx>
+
+class StepData_StepReaderData;
+class Interface_Check;
+class StepData_StepWriter;
+class Interface_EntityIterator;
+class StepVisual_SurfaceStyleRenderingWithProperties;
+
+//! Read & Write tool for SurfaceStyleRenderingWithProperties
+class RWStepVisual_RWSurfaceStyleRenderingWithProperties
+{
+public:
+
+ DEFINE_STANDARD_ALLOC
+
+ Standard_EXPORT RWStepVisual_RWSurfaceStyleRenderingWithProperties();
+
+ Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& data, const Standard_Integer num, Handle(Interface_Check)& ach, const Handle(StepVisual_SurfaceStyleRenderingWithProperties)& ent) const;
+
+ Standard_EXPORT void WriteStep(StepData_StepWriter& SW, const Handle(StepVisual_SurfaceStyleRenderingWithProperties)& ent) const;
+
+ Standard_EXPORT void Share(const Handle(StepVisual_SurfaceStyleRenderingWithProperties)& ent, Interface_EntityIterator& iter) const;
+
+};
+#endif // _RWStepVisual_RWSurfaceStyleRenderingWithProperties_HeaderFile_
--- /dev/null
+// Created on : Tue May 12 14:11:46 2020
+// Created by: Igor KHOZHANOV
+// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
+// Copyright (c) Open CASCADE 2020
+//
+// 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 <RWStepVisual_RWSurfaceStyleTransparent.hxx>
+#include <Interface_Check.hxx>
+#include <Interface_EntityIterator.hxx>
+#include <StepData_StepReaderData.hxx>
+#include <StepData_StepWriter.hxx>
+#include <StepVisual_SurfaceStyleTransparent.hxx>
+#include <Standard_Real.hxx>
+
+//=======================================================================
+//function : RWStepVisual_RWSurfaceStyleTransparent
+//purpose :
+//=======================================================================
+
+RWStepVisual_RWSurfaceStyleTransparent::RWStepVisual_RWSurfaceStyleTransparent() {}
+
+
+//=======================================================================
+//function : ReadStep
+//purpose :
+//=======================================================================
+#include <iostream>
+
+void RWStepVisual_RWSurfaceStyleTransparent::ReadStep (const Handle(StepData_StepReaderData)& data,
+ const Standard_Integer num,
+ Handle(Interface_Check)& ach,
+ const Handle(StepVisual_SurfaceStyleTransparent)& ent) const
+{
+ // Check number of parameters
+ if ( ! data->CheckNbParams(num,1,ach,"surface_style_transparent") ) return;
+
+ // Own fields of SurfaceStyleTransparent
+
+ Standard_Real aTransparency;
+ data->ReadReal (num, 1, "transparency", ach, aTransparency);
+
+ // Initialize entity
+ ent->Init(aTransparency);
+}
+
+//=======================================================================
+//function : WriteStep
+//purpose :
+//=======================================================================
+
+void RWStepVisual_RWSurfaceStyleTransparent::WriteStep (StepData_StepWriter& SW,
+ const Handle(StepVisual_SurfaceStyleTransparent)& ent) const
+{
+
+ // Own fields of SurfaceStyleTransparent
+
+ SW.Send (ent->Transparency());
+}
+
+//=======================================================================
+//function : Share
+//purpose :
+//=======================================================================
+
+void RWStepVisual_RWSurfaceStyleTransparent::Share (const Handle(StepVisual_SurfaceStyleTransparent)& ,
+ Interface_EntityIterator& ) const
+{
+
+}
--- /dev/null
+// Created on : Tue May 12 14:11:46 2020
+// Created by: Igor KHOZHANOV
+// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
+// Copyright (c) Open CASCADE 2020
+//
+// 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_RWSurfaceStyleTransparent_HeaderFile_
+#define _RWStepVisual_RWSurfaceStyleTransparent_HeaderFile_
+
+#include <Standard.hxx>
+#include <Standard_DefineAlloc.hxx>
+#include <Standard_Handle.hxx>
+#include <Standard_Integer.hxx>
+
+class StepData_StepReaderData;
+class Interface_Check;
+class StepData_StepWriter;
+class Interface_EntityIterator;
+class StepVisual_SurfaceStyleTransparent;
+class Interface_EntityIterator;
+
+//! Read & Write tool for SurfaceStyleTransparent
+class RWStepVisual_RWSurfaceStyleTransparent
+{
+public:
+
+ DEFINE_STANDARD_ALLOC
+
+ Standard_EXPORT RWStepVisual_RWSurfaceStyleTransparent();
+
+ Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& data, const Standard_Integer num, Handle(Interface_Check)& ach, const Handle(StepVisual_SurfaceStyleTransparent)& ent) const;
+
+ Standard_EXPORT void WriteStep(StepData_StepWriter& SW, const Handle(StepVisual_SurfaceStyleTransparent)& ent) const;
+
+ Standard_EXPORT void Share(const Handle(StepVisual_SurfaceStyleTransparent)& ent, Interface_EntityIterator& iter) const;
+
+};
+#endif // _RWStepVisual_RWSurfaceStyleTransparent_HeaderFile_
break;
}
- Handle(StepVisual_Colour) SurfCol, BoundCol, CurveCol;
+ Handle(StepVisual_Colour) SurfCol, BoundCol, CurveCol, RenderCol;
+ Standard_Real RenderTransp;
// check if it is component style
Standard_Boolean IsComponent = Standard_False;
- if (!Styles.GetColors(style, SurfCol, BoundCol, CurveCol, IsComponent) && IsVisible)
+ if (!Styles.GetColors(style, SurfCol, BoundCol, CurveCol, RenderCol, RenderTransp, IsComponent) && IsVisible)
continue;
// collect styled items
if (S.IsNull())
continue;
- if (!SurfCol.IsNull() || !BoundCol.IsNull() || !CurveCol.IsNull() || !IsVisible)
+ if (!SurfCol.IsNull() || !BoundCol.IsNull() || !CurveCol.IsNull() || !RenderCol.IsNull() || !IsVisible)
{
TDF_Label aL;
Standard_Boolean isFound = STool->SearchUsingMap(S, aL, Standard_False, Standard_True);
- if (!SurfCol.IsNull() || !BoundCol.IsNull() || !CurveCol.IsNull())
+ if (!SurfCol.IsNull() || !BoundCol.IsNull() || !CurveCol.IsNull() || !RenderCol.IsNull())
{
- Quantity_Color aSCol, aBCol, aCCol;
- if (!SurfCol.IsNull())
+ Quantity_Color aSCol, aBCol, aCCol, aRCol;
+ Quantity_ColorRGBA aFullSCol;
+ if (!SurfCol.IsNull()) {
Styles.DecodeColor(SurfCol, aSCol);
+ aFullSCol = Quantity_ColorRGBA(aSCol);
+ }
if (!BoundCol.IsNull())
Styles.DecodeColor(BoundCol, aBCol);
if (!CurveCol.IsNull())
Styles.DecodeColor(CurveCol, aCCol);
+ if (!RenderCol.IsNull()) {
+ Styles.DecodeColor(RenderCol, aRCol);
+ aFullSCol = Quantity_ColorRGBA(aRCol, static_cast<float>(1.0f - RenderTransp));
+ }
if (isFound)
{
- if (!SurfCol.IsNull())
- CTool->SetColor(aL, aSCol, XCAFDoc_ColorSurf);
+ if (!SurfCol.IsNull() || !RenderCol.IsNull())
+ CTool->SetColor(aL, aFullSCol, XCAFDoc_ColorSurf);
if (!BoundCol.IsNull())
CTool->SetColor(aL, aBCol, XCAFDoc_ColorCurv);
if (!CurveCol.IsNull())
TDF_Label aL1;
if (STool->SearchUsingMap(it.Value(), aL1, Standard_False, Standard_True))
{
- if (!SurfCol.IsNull())
- CTool->SetColor(aL1, aSCol, XCAFDoc_ColorSurf);
+ if (!SurfCol.IsNull() || !RenderCol.IsNull())
+ CTool->SetColor(aL1, aFullSCol, XCAFDoc_ColorSurf);
if (!BoundCol.IsNull())
CTool->SetColor(aL1, aBCol, XCAFDoc_ColorCurv);
if (!CurveCol.IsNull())
break;
}
- Handle(StepVisual_Colour) SurfCol, BoundCol, CurveCol;
+ Handle(StepVisual_Colour) SurfCol, BoundCol, CurveCol, RenderCol;
+ Standard_Real RenderTransp;
// check if it is component style
Standard_Boolean IsComponent = Standard_False;
- if (!Styles.GetColors(style, SurfCol, BoundCol, CurveCol, IsComponent) && IsVisible)
+ if (!Styles.GetColors(style, SurfCol, BoundCol, CurveCol, RenderCol, RenderTransp, IsComponent) && IsVisible)
continue;
if (!IsComponent)
continue;
continue;
}
// now set the style to the SHUO main label.
- if (!SurfCol.IsNull()) {
+ if (!SurfCol.IsNull() || !RenderCol.IsNull()) {
Quantity_Color col;
- Styles.DecodeColor(SurfCol, col);
- CTool->SetColor(aLabelForStyle, col, XCAFDoc_ColorSurf);
+ Quantity_ColorRGBA colRGBA;
+ if (!SurfCol.IsNull()) {
+ Styles.DecodeColor(SurfCol, col);
+ colRGBA = Quantity_ColorRGBA(col);
+ }
+ if (!RenderCol.IsNull()) {
+ Styles.DecodeColor(RenderCol, col);
+ colRGBA = Quantity_ColorRGBA(col, static_cast<float>(1.0 - RenderTransp));
+ }
+ CTool->SetColor(aLabelForStyle, colRGBA, XCAFDoc_ColorSurf);
}
if (!BoundCol.IsNull()) {
Quantity_Color col;
XCAFPrs_Style own = settings.FindFromKey(S);
if ( !own.IsVisible() ) style.SetVisibility ( Standard_False );
if ( own.IsSetColorCurv() ) style.SetColorCurv ( own.GetColorCurv() );
- if ( own.IsSetColorSurf() ) style.SetColorSurf ( own.GetColorSurf() );
+ if ( own.IsSetColorSurf() ) style.SetColorSurf ( own.GetColorSurfRGBA() );
}
// translate colors to STEP
Handle(StepVisual_Colour) surfColor, curvColor;
- if ( style.IsSetColorSurf() )
- surfColor = Styles.EncodeColor(style.GetColorSurf(),DPDCs,ColRGBs);
+ Standard_Real RenderTransp = 0.0;
+ if ( style.IsSetColorSurf() ) {
+ Quantity_ColorRGBA sCol = style.GetColorSurfRGBA();
+ RenderTransp = 1.0 - sCol.Alpha();
+ surfColor = Styles.EncodeColor(sCol.GetRGB(),DPDCs,ColRGBs);
+ }
if ( style.IsSetColorCurv() )
curvColor = Styles.EncodeColor(style.GetColorCurv(),DPDCs,ColRGBs);
Handle(StepRepr_RepresentationItem)::DownCast(seqRI(i));
Handle(StepVisual_PresentationStyleAssignment) PSA;
if ( style.IsVisible() || !surfColor.IsNull() || !curvColor.IsNull() ) {
- PSA = Styles.MakeColorPSA ( item, surfColor, curvColor, isComponent );
+ PSA = Styles.MakeColorPSA ( item, surfColor, curvColor, surfColor, RenderTransp, isComponent );
}
else {
// default white color
surfColor = Styles.EncodeColor(Quantity_Color(Quantity_NOC_WHITE),DPDCs,ColRGBs);
- PSA = Styles.MakeColorPSA ( item, surfColor, curvColor, isComponent );
+ PSA = Styles.MakeColorPSA ( item, surfColor, curvColor, surfColor, 0.0, isComponent );
if ( isComponent )
setDefaultInstanceColor( override, PSA);
for ( Standard_Integer j = 1; j <= seq.Length(); j++ ) {
TDF_Label lab = seq.Value(j);
XCAFPrs_Style style;
- Quantity_Color C;
+ Quantity_ColorRGBA C;
if ( lab == L ) {
// check for invisible status of object on label
if ( !CTool->IsVisible( lab ) ) {
}
}
if ( CTool->GetColor ( lab, XCAFDoc_ColorGen, C ) ) {
- style.SetColorCurv ( C );
+ style.SetColorCurv ( C.GetRGB() );
style.SetColorSurf ( C );
}
if ( CTool->GetColor ( lab, XCAFDoc_ColorSurf, C ) )
style.SetColorSurf ( C );
if ( CTool->GetColor ( lab, XCAFDoc_ColorCurv, C ) )
- style.SetColorCurv ( C );
+ style.SetColorCurv ( C.GetRGB() );
if (!style.IsSetColorSurf())
{
Handle(XCAFDoc_VisMaterial) aVisMat = aMatTool->GetShapeMaterial (lab);
STEPConstruct_Styles Styles( WS );
// translate colors to STEP
Handle(StepVisual_Colour) surfColor, curvColor;
- if ( style.IsSetColorSurf() )
- surfColor = Styles.EncodeColor ( style.GetColorSurf() );
+ Standard_Real RenderTransp = 0.0;
+ if ( style.IsSetColorSurf() ) {
+ Quantity_ColorRGBA sCol = style.GetColorSurfRGBA();
+ RenderTransp = 1.0 - sCol.Alpha();
+ surfColor = Styles.EncodeColor ( sCol.GetRGB() );
+ }
if ( style.IsSetColorCurv() )
curvColor = Styles.EncodeColor ( style.GetColorCurv() );
Standard_Boolean isComponent = Standard_True;// cause need to get PSBC
isSetDefaultColor = Standard_True;
}
Handle(StepVisual_PresentationStyleAssignment) PSA =
- Styles.MakeColorPSA ( item, surfColor, curvColor, isComponent );
+ Styles.MakeColorPSA ( item, surfColor, curvColor, surfColor, RenderTransp, isComponent );
Handle(StepVisual_StyledItem) override; //null styled item
// find the repr item of the shape
STEPConstruct_Styles aStyles (WS);
Handle(StepVisual_Colour) aCurvColor = aStyles.EncodeColor(Quantity_NOC_WHITE);
Handle(StepRepr_RepresentationItem) anItem = NULL;
- myGDTPrsCurveStyle->SetValue(1, aStyles.MakeColorPSA(anItem, aCurvColor, aCurvColor));
+ myGDTPrsCurveStyle->SetValue(1, aStyles.MakeColorPSA(anItem, aCurvColor, aCurvColor, aCurvColor, 0.0));
Interface_EntityIterator aModelIter = aModel->Entities();
for (; aModelIter.More() && myGDTCommonPDS.IsNull(); aModelIter.Next())
myGDTCommonPDS = Handle(StepRepr_ProductDefinitionShape)::DownCast(aModelIter.Value());
#include <StepVisual_SurfaceStyleBoundary.hxx>
#include <StepVisual_SurfaceStyleElementSelect.hxx>
#include <StepVisual_SurfaceStyleFillArea.hxx>
+#include <StepVisual_SurfaceStyleRendering.hxx>
+#include <StepVisual_SurfaceStyleRenderingWithProperties.hxx>
+#include <StepVisual_RenderingPropertiesSelect.hxx>
+#include <StepVisual_SurfaceStyleTransparent.hxx>
#include <StepVisual_SurfaceStyleUsage.hxx>
#include <TCollection_HAsciiString.hxx>
#include <TColStd_HSequenceOfTransient.hxx>
Handle(StepVisual_PresentationStyleAssignment) STEPConstruct_Styles::MakeColorPSA (const Handle(StepRepr_RepresentationItem) &/*item*/,
const Handle(StepVisual_Colour) &SurfCol,
const Handle(StepVisual_Colour) &CurveCol,
+ const Handle(StepVisual_Colour) &RenderCol,
+ const Standard_Real RenderTransp,
const Standard_Boolean isForNAUO) const
{
Handle(StepVisual_PresentationStyleAssignment) PSA;
StepVisual_SurfaceStyleElementSelect SES;
SES.SetValue ( SSFA );
- Handle(StepVisual_HArray1OfSurfaceStyleElementSelect) SSESs =
- new StepVisual_HArray1OfSurfaceStyleElementSelect ( 1, 1 );
+ Handle(StepVisual_HArray1OfSurfaceStyleElementSelect) SSESs;
+ if (RenderTransp == 0.0) {
+ SSESs = new StepVisual_HArray1OfSurfaceStyleElementSelect ( 1, 1 );
+ } else {
+ Handle(StepVisual_SurfaceStyleTransparent) SST = new StepVisual_SurfaceStyleTransparent;
+ SST->Init(RenderTransp);
+ StepVisual_RenderingPropertiesSelect RPS;
+ RPS.SetValue(SST);
+ Handle(StepVisual_HArray1OfRenderingPropertiesSelect) HARP = new
+ StepVisual_HArray1OfRenderingPropertiesSelect (1, 1);
+ HARP->SetValue(1, RPS);
+ Handle(StepVisual_SurfaceStyleRenderingWithProperties) SSRWP = new StepVisual_SurfaceStyleRenderingWithProperties;
+
+ SSRWP->Init(StepVisual_ssmNormalShading, RenderCol, HARP);
+
+ StepVisual_SurfaceStyleElementSelect SESR;
+ SESR.SetValue (SSRWP);
+
+ SSESs = new StepVisual_HArray1OfSurfaceStyleElementSelect ( 1, 2 );
+ SSESs->SetValue ( 2, SESR );
+ }
SSESs->SetValue ( 1, SES );
-
+
Handle(TCollection_HAsciiString) SSSName = new TCollection_HAsciiString ( "" );
Handle(StepVisual_SurfaceSideStyle) SSS = new StepVisual_SurfaceSideStyle;
SSS->Init ( SSSName, SSESs );
DownCast(myMapOfStyles.FindFromKey(Col));
}
else {
- PSA = MakeColorPSA ( item, Col, Col );
+ PSA = MakeColorPSA ( item, Col, Col, Col, 0.0 );
myMapOfStyles.Add(Col,PSA);
}
return PSA;
Handle(StepVisual_Colour) &SurfCol,
Handle(StepVisual_Colour) &BoundCol,
Handle(StepVisual_Colour) &CurveCol,
+ Handle(StepVisual_Colour) &RenderCol,
+ Standard_Real& RenderTransp,
Standard_Boolean& IsComponent) const
{
SurfCol.Nullify();
BoundCol.Nullify();
CurveCol.Nullify();
+ RenderCol.Nullify();
// parse on styles
for(Standard_Integer j=1; j<=style->NbStyles(); j++ ) {
if ( ! CS.IsNull() ) BoundCol = CS->CurveColour();
continue;
}
+ // try rendering color and transparency
+ Handle(StepVisual_SurfaceStyleRendering) SSR = SSES.SurfaceStyleRendering();
+ if (!SSR.IsNull()) {
+ RenderCol = SSR->SurfaceColour();
+ RenderTransp = 0.0;
+ Handle(StepVisual_SurfaceStyleRenderingWithProperties) SSRWP =
+ Handle(StepVisual_SurfaceStyleRenderingWithProperties)::DownCast(SSR);
+ if (!SSRWP.IsNull()) {
+ Handle(StepVisual_HArray1OfRenderingPropertiesSelect) HARP = SSRWP->Properties();
+ if (!HARP.IsNull())
+ {
+ for (Standard_Integer aPropIndex = 1; aPropIndex <= HARP->Length(); ++aPropIndex) {
+ Handle(StepVisual_SurfaceStyleTransparent) SST = HARP->Value(aPropIndex).SurfaceStyleTransparent();
+ if (!SST.IsNull()) {
+ RenderTransp = SST->Transparency();
+ }
+ }
+ }
+ }
+ }
+
}
continue;
}
if ( ! CS.IsNull() ) CurveCol = CS->CurveColour();
}
}
- return ! SurfCol.IsNull() || ! BoundCol.IsNull() || ! CurveCol.IsNull();
+ return ! SurfCol.IsNull() || ! BoundCol.IsNull() || ! CurveCol.IsNull() || ! RenderCol.IsNull();
}
//! Create a PresentationStyleAssignment entity which defines
//! two colors (for filling surfaces and curves)
//! if isForNAUO true then returns PresentationStyleByContext
- Standard_EXPORT Handle(StepVisual_PresentationStyleAssignment) MakeColorPSA (const Handle(StepRepr_RepresentationItem)& item, const Handle(StepVisual_Colour)& SurfCol, const Handle(StepVisual_Colour)& CurveCol, const Standard_Boolean isForNAUO = Standard_False) const;
+ Standard_EXPORT Handle(StepVisual_PresentationStyleAssignment) MakeColorPSA (const Handle(StepRepr_RepresentationItem)& item, const Handle(StepVisual_Colour)& SurfCol, const Handle(StepVisual_Colour)& CurveCol, const Handle(StepVisual_Colour) &RenderCol, const Standard_Real RenderTransp, const Standard_Boolean isForNAUO = Standard_False) const;
//! Returns a PresentationStyleAssignment entity which defines
//! surface and curve colors as Col. This PSA is either created
//! For each type of color supported, result can be either
//! NULL if it is not defined by that style, or last
//! definition (if they are 1 or more)
- Standard_EXPORT Standard_Boolean GetColors (const Handle(StepVisual_StyledItem)& style, Handle(StepVisual_Colour)& SurfCol, Handle(StepVisual_Colour)& BoundCol, Handle(StepVisual_Colour)& CurveCol, Standard_Boolean& IsComponent) const;
+ Standard_EXPORT Standard_Boolean GetColors (const Handle(StepVisual_StyledItem)& style, Handle(StepVisual_Colour)& SurfCol, Handle(StepVisual_Colour)& BoundCol, Handle(StepVisual_Colour)& CurveCol, Handle(StepVisual_Colour)& RenderCol, Standard_Real& RenderTransp, Standard_Boolean& IsComponent) const;
//! Create STEP color entity by given Quantity_Color
//! The analysis is performed for whether the color corresponds to
#include <StepVisual_CameraModelD3MultiClippingUnion.hxx>
#include <StepVisual_AnnotationCurveOccurrenceAndAnnotationOccurrenceAndGeomReprItemAndReprItemAndStyledItem.hxx>
+#include <StepVisual_SurfaceStyleTransparent.hxx>
+#include <StepVisual_SurfaceStyleReflectanceAmbient.hxx>
+#include <StepVisual_SurfaceStyleRendering.hxx>
+#include <StepVisual_SurfaceStyleRenderingWithProperties.hxx>
+
static int THE_StepAP214_Protocol_init = 0;
static Interface_DataMapOfTransientInteger types(800);
types.Bind (STANDARD_TYPE(StepVisual_CameraModelD3MultiClippingIntersection), 717);
types.Bind (STANDARD_TYPE(StepVisual_CameraModelD3MultiClippingUnion), 718);
types.Bind (STANDARD_TYPE(StepVisual_AnnotationCurveOccurrenceAndAnnotationOccurrenceAndGeomReprItemAndReprItemAndStyledItem), 719);
+ types.Bind (STANDARD_TYPE(StepVisual_SurfaceStyleTransparent), 720);
+ types.Bind (STANDARD_TYPE(StepVisual_SurfaceStyleReflectanceAmbient), 721);
+ types.Bind (STANDARD_TYPE(StepVisual_SurfaceStyleRendering), 722);
+ types.Bind (STANDARD_TYPE(StepVisual_SurfaceStyleRenderingWithProperties), 723);
}
StepVisual_Array1OfLayeredItem.hxx
StepVisual_Array1OfPresentationStyleAssignment.hxx
StepVisual_Array1OfPresentationStyleSelect.hxx
+StepVisual_Array1OfRenderingPropertiesSelect.hxx
StepVisual_Array1OfStyleContextSelect.hxx
StepVisual_Array1OfSurfaceStyleElementSelect.hxx
StepVisual_Array1OfTextOrCharacter.hxx
StepVisual_HArray1OfLayeredItem.hxx
StepVisual_HArray1OfPresentationStyleAssignment.hxx
StepVisual_HArray1OfPresentationStyleSelect.hxx
+StepVisual_HArray1OfRenderingPropertiesSelect.hxx
StepVisual_HArray1OfStyleContextSelect.hxx
StepVisual_HArray1OfSurfaceStyleElementSelect.hxx
StepVisual_HArray1OfTextOrCharacter.hxx
StepVisual_PresentedItem.hxx
StepVisual_PresentedItemRepresentation.cxx
StepVisual_PresentedItemRepresentation.hxx
+StepVisual_RenderingPropertiesSelect.cxx
+StepVisual_RenderingPropertiesSelect.hxx
+StepVisual_ShadingSurfaceMethod.hxx
StepVisual_StyleContextSelect.cxx
StepVisual_StyleContextSelect.hxx
StepVisual_StyledItem.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
--- /dev/null
+// Created on : Thu May 14 15:13:19 2020
+// Created by: Igor KHOZHANOV
+// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
+// Copyright (c) Open CASCADE 2020
+//
+// 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_Array1OfRenderingPropertiesSelect_HeaderFile
+#define StepVisual_Array1OfRenderingPropertiesSelect_HeaderFile
+
+#include <StepVisual_RenderingPropertiesSelect.hxx>
+#include <NCollection_Array1.hxx>
+
+typedef NCollection_Array1<StepVisual_RenderingPropertiesSelect> StepVisual_Array1OfRenderingPropertiesSelect;
+
+
+#endif
--- /dev/null
+// Created on : Thu May 14 15:13:19 2020
+// Created by: Igor KHOZHANOV
+// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
+// Copyright (c) Open CASCADE 2020
+//
+// 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_HArray1OfRenderingPropertiesSelect_HeaderFile
+#define StepVisual_HArray1OfRenderingPropertiesSelect_HeaderFile
+
+#include <StepVisual_RenderingPropertiesSelect.hxx>
+#include <StepVisual_Array1OfRenderingPropertiesSelect.hxx>
+#include <NCollection_DefineHArray1.hxx>
+
+DEFINE_HARRAY1(StepVisual_HArray1OfRenderingPropertiesSelect, StepVisual_Array1OfRenderingPropertiesSelect)
+
+
+#endif
--- /dev/null
+// Created on : Thu May 14 15:13:19 2020
+// Created by: Igor KHOZHANOV
+// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
+// Copyright (c) Open CASCADE 2020
+//
+// 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 <StepVisual_RenderingPropertiesSelect.hxx>
+#include <StepVisual_SurfaceStyleReflectanceAmbient.hxx>
+#include <StepVisual_SurfaceStyleTransparent.hxx>
+
+//=======================================================================
+//function : StepVisual_RenderingPropertiesSelect
+//purpose :
+//=======================================================================
+
+StepVisual_RenderingPropertiesSelect::StepVisual_RenderingPropertiesSelect ()
+{
+}
+
+//=======================================================================
+//function : CaseNum
+//purpose :
+//=======================================================================
+
+Standard_Integer StepVisual_RenderingPropertiesSelect::CaseNum (const Handle(Standard_Transient)& ent) const
+{
+ if (ent.IsNull()) return 0;
+ if (ent->IsKind(STANDARD_TYPE(StepVisual_SurfaceStyleReflectanceAmbient))) return 1;
+ if (ent->IsKind(STANDARD_TYPE(StepVisual_SurfaceStyleTransparent))) return 2;
+ return 0;
+}
+
+//=======================================================================
+//function : SurfaceStyleReflectanceAmbient
+//purpose :
+//=======================================================================
+
+Handle(StepVisual_SurfaceStyleReflectanceAmbient) StepVisual_RenderingPropertiesSelect::SurfaceStyleReflectanceAmbient () const
+{
+ return Handle(StepVisual_SurfaceStyleReflectanceAmbient)::DownCast(Value());
+}
+
+//=======================================================================
+//function : SurfaceStyleTransparent
+//purpose :
+//=======================================================================
+
+Handle(StepVisual_SurfaceStyleTransparent) StepVisual_RenderingPropertiesSelect::SurfaceStyleTransparent () const
+{
+ return Handle(StepVisual_SurfaceStyleTransparent)::DownCast(Value());
+}
--- /dev/null
+// Created on : Thu May 14 15:13:19 2020
+// Created by: Igor KHOZHANOV
+// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
+// Copyright (c) Open CASCADE 2020
+//
+// 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_RenderingPropertiesSelect_HeaderFile
+#define _StepVisual_RenderingPropertiesSelect_HeaderFile
+
+#include <Standard.hxx>
+#include <Standard_DefineAlloc.hxx>
+#include <Standard_Handle.hxx>
+#include <StepData_SelectType.hxx>
+#include <Standard_Integer.hxx>
+
+class Standard_Transient;
+class StepVisual_SurfaceStyleReflectanceAmbient;
+class StepVisual_SurfaceStyleTransparent;
+
+//! Representation of STEP SELECT type RenderingPropertiesSelect
+class StepVisual_RenderingPropertiesSelect : public StepData_SelectType
+{
+
+public:
+
+ DEFINE_STANDARD_ALLOC
+
+ //! Empty constructor
+ Standard_EXPORT StepVisual_RenderingPropertiesSelect();
+
+ //! Recognizes a kind of RenderingPropertiesSelect select type
+ //! -- 1 -> SurfaceStyleReflectanceAmbient
+ //! -- 2 -> SurfaceStyleTransparent
+ Standard_EXPORT Standard_Integer CaseNum (const Handle(Standard_Transient)& ent) const Standard_OVERRIDE;
+
+ //! Returns Value as SurfaceStyleReflectanceAmbient (or Null if another type)
+ Standard_EXPORT Handle(StepVisual_SurfaceStyleReflectanceAmbient) SurfaceStyleReflectanceAmbient() const;
+
+ //! Returns Value as SurfaceStyleTransparent (or Null if another type)
+ Standard_EXPORT Handle(StepVisual_SurfaceStyleTransparent) SurfaceStyleTransparent() const;
+
+};
+#endif // _StepVisual_RenderingPropertiesSelect_HeaderFile
--- /dev/null
+// Created on : Thu May 14 15:13:19 2020
+// Created by: Igor KHOZHANOV
+// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
+// Copyright (c) Open CASCADE 2020
+//
+// 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_ShadingSurfaceMethod_HeaderFile
+#define _StepVisual_ShadingSurfaceMethod_HeaderFile
+
+enum StepVisual_ShadingSurfaceMethod
+{
+ StepVisual_ssmConstantShading,
+ StepVisual_ssmColourShading,
+ StepVisual_ssmDotShading,
+ StepVisual_ssmNormalShading
+};
+#endif // _StepVisual_ShadingSurfaceMethod_HeaderFile
#include <StepVisual_SurfaceStyleParameterLine.hxx>
#include <StepVisual_SurfaceStyleSegmentationCurve.hxx>
#include <StepVisual_SurfaceStyleSilhouette.hxx>
+#include <StepVisual_SurfaceStyleRendering.hxx>
StepVisual_SurfaceStyleElementSelect::StepVisual_SurfaceStyleElementSelect () { }
// if (ent->IsKind(STANDARD_TYPE(StepVisual_SurfaceStyleSilhouette))) return 4;
// if (ent->IsKind(STANDARD_TYPE(StepVisual_SurfaceStyleSegmentationCurve))) return 5;
// if (ent->IsKind(STANDARD_TYPE(StepVisual_SurfaceStyleControlGrid))) return 6;
+ if (ent->IsKind(STANDARD_TYPE(StepVisual_SurfaceStyleRendering))) return 7;
return 0;
}
{
return GetCasted(StepVisual_SurfaceStyleParameterLine,Value());
}
+
+Handle(StepVisual_SurfaceStyleRendering) StepVisual_SurfaceStyleElementSelect::SurfaceStyleRendering () const
+{
+ return GetCasted(StepVisual_SurfaceStyleRendering,Value());
+}
class StepVisual_SurfaceStyleFillArea;
class StepVisual_SurfaceStyleBoundary;
class StepVisual_SurfaceStyleParameterLine;
-
+class StepVisual_SurfaceStyleRendering;
class StepVisual_SurfaceStyleElementSelect : public StepData_SelectType
//! 4 -> SurfaceStyleSilhouette
//! 5 -> SurfaceStyleSegmentationCurve
//! 6 -> SurfaceStyleControlGrid
+ //! 7 -> SurfaceStyleRendering
//! 0 else
Standard_EXPORT Standard_Integer CaseNum (const Handle(Standard_Transient)& ent) const;
//! returns Value as a SurfaceStyleParameterLine (Null if another type)
Standard_EXPORT Handle(StepVisual_SurfaceStyleParameterLine) SurfaceStyleParameterLine() const;
+ //! returns Value as a SurfaceStyleRendering (Null if another type)
+ Standard_EXPORT Handle(StepVisual_SurfaceStyleRendering) SurfaceStyleRendering() const;
--- /dev/null
+// Created on : Thu May 14 15:13:19 2020
+// Created by: Igor KHOZHANOV
+// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
+// Copyright (c) Open CASCADE 2020
+//
+// 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 <StepVisual_SurfaceStyleReflectanceAmbient.hxx>
+
+IMPLEMENT_STANDARD_RTTIEXT(StepVisual_SurfaceStyleReflectanceAmbient, Standard_Transient)
+
+//=======================================================================
+//function : StepVisual_SurfaceStyleReflectanceAmbient
+//purpose :
+//=======================================================================
+
+StepVisual_SurfaceStyleReflectanceAmbient::StepVisual_SurfaceStyleReflectanceAmbient ()
+{
+}
+
+//=======================================================================
+//function : Init
+//purpose :
+//=======================================================================
+
+void StepVisual_SurfaceStyleReflectanceAmbient::Init (const Standard_Real theAmbientReflectance)
+{
+
+ myAmbientReflectance = theAmbientReflectance;
+}
+
+//=======================================================================
+//function : AmbientReflectance
+//purpose :
+//=======================================================================
+
+Standard_Real StepVisual_SurfaceStyleReflectanceAmbient::AmbientReflectance () const
+{
+ return myAmbientReflectance;
+}
+
+//=======================================================================
+//function : SetAmbientReflectance
+//purpose :
+//=======================================================================
+
+void StepVisual_SurfaceStyleReflectanceAmbient::SetAmbientReflectance (const Standard_Real theAmbientReflectance)
+{
+ myAmbientReflectance = theAmbientReflectance;
+}
--- /dev/null
+// Created on : Thu May 14 15:13:19 2020
+// Created by: Igor KHOZHANOV
+// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
+// Copyright (c) Open CASCADE 2020
+//
+// 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_SurfaceStyleReflectanceAmbient_HeaderFile_
+#define _StepVisual_SurfaceStyleReflectanceAmbient_HeaderFile_
+
+#include <Standard.hxx>
+#include <Standard_Type.hxx>
+#include <Standard_Transient.hxx>
+
+class StepVisual_SurfaceStyleReflectanceAmbient;
+DEFINE_STANDARD_HANDLE(StepVisual_SurfaceStyleReflectanceAmbient, Standard_Transient)
+
+//! Representation of STEP entity SurfaceStyleReflectanceAmbient
+class StepVisual_SurfaceStyleReflectanceAmbient : public Standard_Transient
+{
+public :
+
+ //! default constructor
+ Standard_EXPORT StepVisual_SurfaceStyleReflectanceAmbient();
+
+ //! Initialize all fields (own and inherited)
+ Standard_EXPORT void Init(const Standard_Real theAmbientReflectance);
+
+ //! Returns field AmbientReflectance
+ Standard_EXPORT Standard_Real AmbientReflectance() const;
+ //! Sets field AmbientReflectance
+ Standard_EXPORT void SetAmbientReflectance (const Standard_Real theAmbientReflectance);
+
+DEFINE_STANDARD_RTTIEXT(StepVisual_SurfaceStyleReflectanceAmbient, Standard_Transient)
+
+private:
+ Standard_Real myAmbientReflectance;
+
+};
+#endif // _StepVisual_SurfaceStyleReflectanceAmbient_HeaderFile_
--- /dev/null
+// Created on : Thu May 14 15:13:19 2020
+// Created by: Igor KHOZHANOV
+// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
+// Copyright (c) Open CASCADE 2020
+//
+// 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 <StepVisual_SurfaceStyleRendering.hxx>
+
+IMPLEMENT_STANDARD_RTTIEXT(StepVisual_SurfaceStyleRendering, Standard_Transient)
+
+//=======================================================================
+//function : StepVisual_SurfaceStyleRendering
+//purpose :
+//=======================================================================
+
+StepVisual_SurfaceStyleRendering::StepVisual_SurfaceStyleRendering ()
+{
+}
+
+//=======================================================================
+//function : Init
+//purpose :
+//=======================================================================
+
+void StepVisual_SurfaceStyleRendering::Init (const StepVisual_ShadingSurfaceMethod theRenderingMethod,
+ const Handle(StepVisual_Colour)& theSurfaceColour)
+{
+
+ myRenderingMethod = theRenderingMethod;
+
+ mySurfaceColour = theSurfaceColour;
+}
+
+//=======================================================================
+//function : RenderingMethod
+//purpose :
+//=======================================================================
+
+StepVisual_ShadingSurfaceMethod StepVisual_SurfaceStyleRendering::RenderingMethod () const
+{
+ return myRenderingMethod;
+}
+
+//=======================================================================
+//function : SetRenderingMethod
+//purpose :
+//=======================================================================
+
+void StepVisual_SurfaceStyleRendering::SetRenderingMethod (const StepVisual_ShadingSurfaceMethod theRenderingMethod)
+{
+ myRenderingMethod = theRenderingMethod;
+}
+
+//=======================================================================
+//function : SurfaceColour
+//purpose :
+//=======================================================================
+
+Handle(StepVisual_Colour) StepVisual_SurfaceStyleRendering::SurfaceColour () const
+{
+ return mySurfaceColour;
+}
+
+//=======================================================================
+//function : SetSurfaceColour
+//purpose :
+//=======================================================================
+
+void StepVisual_SurfaceStyleRendering::SetSurfaceColour (const Handle(StepVisual_Colour)& theSurfaceColour)
+{
+ mySurfaceColour = theSurfaceColour;
+}
--- /dev/null
+// Created on : Thu May 14 15:13:19 2020
+// Created by: Igor KHOZHANOV
+// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
+// Copyright (c) Open CASCADE 2020
+//
+// 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_SurfaceStyleRendering_HeaderFile_
+#define _StepVisual_SurfaceStyleRendering_HeaderFile_
+
+#include <Standard.hxx>
+#include <Standard_Type.hxx>
+#include <Standard_Transient.hxx>
+
+#include <StepVisual_ShadingSurfaceMethod.hxx>
+#include <StepVisual_Colour.hxx>
+
+class StepVisual_SurfaceStyleRendering;
+DEFINE_STANDARD_HANDLE(StepVisual_SurfaceStyleRendering, Standard_Transient)
+
+//! Representation of STEP entity SurfaceStyleRendering
+class StepVisual_SurfaceStyleRendering : public Standard_Transient
+{
+public :
+
+ //! default constructor
+ Standard_EXPORT StepVisual_SurfaceStyleRendering();
+
+ //! Initialize all fields (own and inherited)
+ Standard_EXPORT void Init(const StepVisual_ShadingSurfaceMethod theRenderingMethod,
+ const Handle(StepVisual_Colour)& theSurfaceColour);
+
+ //! Returns field RenderingMethod
+ Standard_EXPORT StepVisual_ShadingSurfaceMethod RenderingMethod() const;
+ //! Sets field RenderingMethod
+ Standard_EXPORT void SetRenderingMethod (const StepVisual_ShadingSurfaceMethod theRenderingMethod);
+
+ //! Returns field SurfaceColour
+ Standard_EXPORT Handle(StepVisual_Colour) SurfaceColour() const;
+ //! Sets field SurfaceColour
+ Standard_EXPORT void SetSurfaceColour (const Handle(StepVisual_Colour)& theSurfaceColour);
+
+DEFINE_STANDARD_RTTIEXT(StepVisual_SurfaceStyleRendering, Standard_Transient)
+
+private:
+ StepVisual_ShadingSurfaceMethod myRenderingMethod;
+ Handle(StepVisual_Colour) mySurfaceColour;
+
+};
+#endif // _StepVisual_SurfaceStyleRendering_HeaderFile_
--- /dev/null
+// Created on : Thu May 14 15:13:19 2020
+// Created by: Igor KHOZHANOV
+// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
+// Copyright (c) Open CASCADE 2020
+//
+// 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 <StepVisual_SurfaceStyleRenderingWithProperties.hxx>
+
+IMPLEMENT_STANDARD_RTTIEXT(StepVisual_SurfaceStyleRenderingWithProperties, StepVisual_SurfaceStyleRendering)
+
+//=======================================================================
+//function : StepVisual_SurfaceStyleRenderingWithProperties
+//purpose :
+//=======================================================================
+
+StepVisual_SurfaceStyleRenderingWithProperties::StepVisual_SurfaceStyleRenderingWithProperties ()
+{
+}
+
+//=======================================================================
+//function : Init
+//purpose :
+//=======================================================================
+
+void StepVisual_SurfaceStyleRenderingWithProperties::Init (const StepVisual_ShadingSurfaceMethod theSurfaceStyleRendering_RenderingMethod,
+ const Handle(StepVisual_Colour)& theSurfaceStyleRendering_SurfaceColour,
+ const Handle(StepVisual_HArray1OfRenderingPropertiesSelect)& theProperties)
+{
+ StepVisual_SurfaceStyleRendering::Init(theSurfaceStyleRendering_RenderingMethod,
+ theSurfaceStyleRendering_SurfaceColour);
+
+ myProperties = theProperties;
+}
+
+//=======================================================================
+//function : Properties
+//purpose :
+//=======================================================================
+
+Handle(StepVisual_HArray1OfRenderingPropertiesSelect) StepVisual_SurfaceStyleRenderingWithProperties::Properties () const
+{
+ return myProperties;
+}
+
+//=======================================================================
+//function : SetProperties
+//purpose :
+//=======================================================================
+
+void StepVisual_SurfaceStyleRenderingWithProperties::SetProperties (const Handle(StepVisual_HArray1OfRenderingPropertiesSelect)& theProperties)
+{
+ myProperties = theProperties;
+}
--- /dev/null
+// Created on : Thu May 14 15:13:19 2020
+// Created by: Igor KHOZHANOV
+// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
+// Copyright (c) Open CASCADE 2020
+//
+// 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_SurfaceStyleRenderingWithProperties_HeaderFile_
+#define _StepVisual_SurfaceStyleRenderingWithProperties_HeaderFile_
+
+#include <Standard.hxx>
+#include <Standard_Type.hxx>
+#include <StepVisual_SurfaceStyleRendering.hxx>
+
+#include <StepVisual_ShadingSurfaceMethod.hxx>
+#include <StepVisual_Colour.hxx>
+#include <StepVisual_HArray1OfRenderingPropertiesSelect.hxx>
+
+class StepVisual_SurfaceStyleRenderingWithProperties;
+DEFINE_STANDARD_HANDLE(StepVisual_SurfaceStyleRenderingWithProperties, StepVisual_SurfaceStyleRendering)
+
+//! Representation of STEP entity SurfaceStyleRenderingWithProperties
+class StepVisual_SurfaceStyleRenderingWithProperties : public StepVisual_SurfaceStyleRendering
+{
+public :
+
+ //! default constructor
+ Standard_EXPORT StepVisual_SurfaceStyleRenderingWithProperties();
+
+ //! Initialize all fields (own and inherited)
+ Standard_EXPORT void Init(const StepVisual_ShadingSurfaceMethod theSurfaceStyleRendering_RenderingMethod,
+ const Handle(StepVisual_Colour)& theSurfaceStyleRendering_SurfaceColour,
+ const Handle(StepVisual_HArray1OfRenderingPropertiesSelect)& theProperties);
+
+ //! Returns field Properties
+ Standard_EXPORT Handle(StepVisual_HArray1OfRenderingPropertiesSelect) Properties() const;
+ //! Sets field Properties
+ Standard_EXPORT void SetProperties (const Handle(StepVisual_HArray1OfRenderingPropertiesSelect)& theProperties);
+
+DEFINE_STANDARD_RTTIEXT(StepVisual_SurfaceStyleRenderingWithProperties, StepVisual_SurfaceStyleRendering)
+
+private:
+ Handle(StepVisual_HArray1OfRenderingPropertiesSelect) myProperties;
+
+};
+#endif // _StepVisual_SurfaceStyleRenderingWithProperties_HeaderFile_
--- /dev/null
+// Created on : Tue May 12 14:11:46 2020
+// Created by: Igor KHOZHANOV
+// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
+// Copyright (c) Open CASCADE 2020
+//
+// 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 <StepVisual_SurfaceStyleTransparent.hxx>
+
+IMPLEMENT_STANDARD_RTTIEXT(StepVisual_SurfaceStyleTransparent, Standard_Transient)
+
+//=======================================================================
+//function : StepVisual_SurfaceStyleTransparent
+//purpose :
+//=======================================================================
+
+StepVisual_SurfaceStyleTransparent::StepVisual_SurfaceStyleTransparent ()
+{
+}
+
+//=======================================================================
+//function : Init
+//purpose :
+//=======================================================================
+
+void StepVisual_SurfaceStyleTransparent::Init (const Standard_Real theTransparency)
+{
+
+ myTransparency = theTransparency;
+}
+
+//=======================================================================
+//function : Transparency
+//purpose :
+//=======================================================================
+
+Standard_Real StepVisual_SurfaceStyleTransparent::Transparency () const
+{
+ return myTransparency;
+}
+
+//=======================================================================
+//function : SetTransparency
+//purpose :
+//=======================================================================
+
+void StepVisual_SurfaceStyleTransparent::SetTransparency (const Standard_Real theTransparency)
+{
+ myTransparency = theTransparency;
+}
--- /dev/null
+// Created on : Tue May 12 14:11:46 2020
+// Created by: Igor KHOZHANOV
+// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
+// Copyright (c) Open CASCADE 2020
+//
+// 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_SurfaceStyleTransparent_HeaderFile_
+#define _StepVisual_SurfaceStyleTransparent_HeaderFile_
+
+#include <Standard.hxx>
+#include <Standard_Type.hxx>
+#include <Standard_Transient.hxx>
+
+class StepVisual_SurfaceStyleTransparent;
+DEFINE_STANDARD_HANDLE(StepVisual_SurfaceStyleTransparent, Standard_Transient)
+
+//! Representation of STEP entity SurfaceStyleTransparent
+class StepVisual_SurfaceStyleTransparent : public Standard_Transient
+{
+public :
+
+ //! default constructor
+ Standard_EXPORT StepVisual_SurfaceStyleTransparent();
+
+ //! Initialize all fields (own and inherited)
+ Standard_EXPORT void Init(const Standard_Real theTransparency);
+
+ //! Returns field Transparency
+ Standard_EXPORT Standard_Real Transparency() const;
+ //! Sets field Transparency
+ Standard_EXPORT void SetTransparency (const Standard_Real theTransparency);
+
+DEFINE_STANDARD_RTTIEXT(StepVisual_SurfaceStyleTransparent, Standard_Transient)
+
+private:
+ Standard_Real myTransparency;
+
+};
+#endif // _StepVisual_SurfaceStyleTransparent_HeaderFile_
--- /dev/null
+puts "===================================="
+puts "OCC31550: Surface transparency is ignored"
+puts "===================================="
+
+# Step file
+set filename [locate_data_file bug29525_rev_part_neu_01.prt_converted_from_datakit.stp]
+
+# Read file
+if { [catch { ReadStep D ${filename} } result] } {
+ puts "ERROR: Couldn't read ${filename} file"
+}
+
+# Static data
+set Transparency 0.5
+set TempFilename ${imagedir}/bug31550_temp.stp
+
+# Get colors
+set Colors [XGetAllColors D]
+if { [string first ${Transparency} ${Colors}] == -1 } {
+ puts "ERROR: OCC31550 is reproduced while STEP import."
+}
+
+# Write file
+if { [catch { WriteStep D ${TempFilename} } result] } {
+ puts "ERROR: Couldn't write ${TempFilename} file"
+}
+
+# Read temporary file
+if { [catch { ReadStep D1 ${TempFilename} } result] } {
+ puts "ERROR: Couldn't read ${TempFilename} file"
+}
+
+# Get colors
+set Colors [XGetAllColors D1]
+if { [string first ${Transparency} ${Colors}] == -1 } {
+ puts "ERROR: OCC31550 is reproduced while STEP export."
+}
\ No newline at end of file