mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-03 14:10:33 +03:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
11fb8e63f6 | ||
|
b63fe6e31f | ||
|
f286953d85 | ||
|
20955d88da |
@@ -1653,6 +1653,13 @@ For each Saved View OCCT STEP Reader will retrieve the following attributes:
|
||||
- clipping planes (single plane of combination of planes);
|
||||
- front and back plane clipping.
|
||||
|
||||
### User defined attributes
|
||||
Attributes are implemented in accordance with <a href="https://www.mbx-if.org/documents/rec_prac_user_def_attributes_v18.pdf">Recommended practices for User Defined Attributes</a> section 4, 5, 6.1-6.3 and 7.
|
||||
Attributes can be read for shapes at levels:
|
||||
- Part/Product Level;
|
||||
- Component Instances in an Assembly;
|
||||
- Geometry Level.
|
||||
|
||||
@subsection occt_step_7_3 Writing to STEP
|
||||
|
||||
The translation from XDE to STEP can be initialized as follows:
|
||||
@@ -1730,5 +1737,8 @@ Interface_Static::SetIVal("write.step.schema", 5));
|
||||
### Saved views
|
||||
Saved Views are not exported by OCCT.
|
||||
|
||||
### User defined attributes
|
||||
Attributes can be imported from STEP.
|
||||
|
||||
|
||||
|
||||
|
@@ -636,12 +636,22 @@ void AIS_ColoredShape::addShapesWithCustomProps (const Handle(Prs3d_Presentation
|
||||
{
|
||||
if (Handle(Graphic3d_ArrayOfSegments) aBndSegments = StdPrs_ShadedShape::FillFaceBoundaries (aShapeDraw, aDrawer->FaceBoundaryUpperContinuity()))
|
||||
{
|
||||
if (anEdgesGroup.IsNull())
|
||||
Handle(Graphic3d_AspectLine3d) aLineAspect = Handle(Graphic3d_AspectLine3d)(aDrawer->FaceBoundaryAspect()->Aspect());
|
||||
if (aDrawer->FaceBoundaryShadingOverride())
|
||||
{
|
||||
Quantity_Color aColor = aDrawer->Color();
|
||||
if (aDrawer->HasOwnShadingAspect())
|
||||
{
|
||||
aColor = aDrawer->ShadingAspect()->Color();
|
||||
}
|
||||
aLineAspect->SetColor (aColor);
|
||||
anEdgesGroup = thePrs->NewGroup();
|
||||
}
|
||||
else if (anEdgesGroup.IsNull())
|
||||
{
|
||||
anEdgesGroup = thePrs->NewGroup();
|
||||
}
|
||||
|
||||
anEdgesGroup->SetPrimitivesAspect (aDrawer->FaceBoundaryAspect()->Aspect());
|
||||
anEdgesGroup->SetGroupPrimitivesAspect (aLineAspect);
|
||||
anEdgesGroup->AddPrimitiveArray (aBndSegments);
|
||||
}
|
||||
}
|
||||
|
@@ -54,11 +54,16 @@ public:
|
||||
//! @param theMaxVertexs defines the maximum allowed vertex number in the array
|
||||
//! @param theMaxEdges defines the maximum allowed edge number in the array
|
||||
//! @param theHasVColors when TRUE, AddVertex(Point,Color) should be used for specifying vertex color
|
||||
//! @param theHasVNormals when TRUE, AddVertex(Point,Normal) or AddVertex(Point,Normal,Color) should be used to specify vertex normal;
|
||||
//! vertex normals should be specified coherent to the edge's neighbour triangle face's orientation
|
||||
//! (defined by order of vertexes within triangle) for proper rendering
|
||||
Graphic3d_ArrayOfSegments (Standard_Integer theMaxVertexs,
|
||||
Standard_Integer theMaxEdges = 0,
|
||||
Standard_Boolean theHasVColors = Standard_False)
|
||||
: Graphic3d_ArrayOfPrimitives (Graphic3d_TOPA_SEGMENTS, theMaxVertexs, 0, theMaxEdges, theHasVColors ? Graphic3d_ArrayFlags_VertexColor : Graphic3d_ArrayFlags_None) {}
|
||||
|
||||
Standard_Integer theMaxEdges = 0,
|
||||
Standard_Boolean theHasVColors = Standard_False,
|
||||
Standard_Boolean theHasVNormals = Standard_False)
|
||||
: Graphic3d_ArrayOfPrimitives (Graphic3d_TOPA_SEGMENTS, theMaxVertexs, 0, theMaxEdges,
|
||||
(theHasVNormals ? Graphic3d_ArrayFlags_VertexNormal : Graphic3d_ArrayFlags_None)
|
||||
| (theHasVColors ? Graphic3d_ArrayFlags_VertexColor : Graphic3d_ArrayFlags_None)) {}
|
||||
|
||||
};
|
||||
|
||||
|
@@ -150,8 +150,7 @@ void Graphic3d_CLight::SetEnabled (Standard_Boolean theIsOn)
|
||||
void Graphic3d_CLight::SetCastShadows (Standard_Boolean theToCast)
|
||||
{
|
||||
if (myType != Graphic3d_TypeOfLightSource_Directional
|
||||
&& myType != Graphic3d_TypeOfLightSource_Spot
|
||||
&& myType != Graphic3d_TypeOfLightSource_Positional)
|
||||
&& myType != Graphic3d_TypeOfLightSource_Spot)
|
||||
{
|
||||
throw Standard_NotImplemented ("Graphic3d_CLight::SetCastShadows() is not implemented for this light type");
|
||||
}
|
||||
|
@@ -200,24 +200,6 @@ void Graphic3d_Camera::Copy (const Handle(Graphic3d_Camera)& theOther)
|
||||
CopyOrientationData (theOther);
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : GetDefaultZNear
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
Standard_Real Graphic3d_Camera::GetDefaultZNear()
|
||||
{
|
||||
return DEFAULT_ZNEAR;
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : GetDefaultZFar
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
Standard_Real Graphic3d_Camera::GetDefaultZFar()
|
||||
{
|
||||
return DEFAULT_ZFAR;
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : SetIdentityOrientation
|
||||
// purpose :
|
||||
|
@@ -202,12 +202,6 @@ public:
|
||||
//! @name Public camera properties
|
||||
public:
|
||||
|
||||
//! return default valut for znear.
|
||||
Standard_EXPORT static Standard_Real GetDefaultZNear();
|
||||
|
||||
//! return default valut for zfar.
|
||||
Standard_EXPORT static Standard_Real GetDefaultZFar();
|
||||
|
||||
//! Get camera look direction.
|
||||
//! @return camera look direction.
|
||||
const gp_Dir& Direction() const { return myDirection; }
|
||||
|
@@ -52,29 +52,3 @@ Graphic3d_CubeMap::~Graphic3d_CubeMap()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : GetCubeDirection
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
gp_Dir Graphic3d_CubeMap::GetCubeDirection (Graphic3d_CubeMapSide theFace)
|
||||
{
|
||||
const Standard_Integer aDiv2 = theFace / 2;
|
||||
const Standard_Integer aMod2 = theFace % 2;
|
||||
return gp_Dir (aDiv2 == 0 ? aMod2 == 0 ? 1.0 : -1.0 : 0.0,
|
||||
aDiv2 == 1 ? aMod2 == 0 ? 1.0 : -1.0 : 0.0,
|
||||
aDiv2 == 2 ? aMod2 == 0 ? 1.0 : -1.0 : 0.0);
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : GetCubeUp
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
gp_Dir Graphic3d_CubeMap::GetCubeUp (Graphic3d_CubeMapSide theFace)
|
||||
{
|
||||
const Standard_Integer aDiv2 = theFace / 2;
|
||||
const Standard_Integer aMod2 = theFace % 2;
|
||||
return gp_Dir (0.0,
|
||||
aDiv2 == 0 ? 1.0 : aDiv2 == 2 ? -1.0 : 0.0,
|
||||
aDiv2 == 1 ? aMod2 == 0 ? 1.0 : -1.0 : 0.0);
|
||||
}
|
||||
|
@@ -15,7 +15,6 @@
|
||||
#ifndef _Graphic3d_CubeMap_HeaderFile
|
||||
#define _Graphic3d_CubeMap_HeaderFile
|
||||
|
||||
#include <gp_Dir.hxx>
|
||||
#include <Graphic3d_CubeMapOrder.hxx>
|
||||
#include <Graphic3d_TextureMap.hxx>
|
||||
|
||||
@@ -91,12 +90,6 @@ public:
|
||||
//! Empty destructor.
|
||||
Standard_EXPORT virtual ~Graphic3d_CubeMap();
|
||||
|
||||
//! Returns direction vector for cubemap's @theFace
|
||||
Standard_EXPORT gp_Dir static GetCubeDirection (Graphic3d_CubeMapSide theFace);
|
||||
|
||||
//! Returns up vector for cubemap's @theFace
|
||||
Standard_EXPORT gp_Dir static GetCubeUp (Graphic3d_CubeMapSide theFace);
|
||||
|
||||
protected:
|
||||
|
||||
Graphic3d_CubeMapSide myCurrentSide; //!< Iterator state
|
||||
|
@@ -86,31 +86,6 @@ Standard_Boolean Graphic3d_LightSet::Remove (const Handle(Graphic3d_CLight)& the
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : CalculateNbShadows
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void Graphic3d_LightSet::CalculateNbShadows (Standard_Integer& theNb2DShadows, Standard_Integer& theNbPointShadows)
|
||||
{
|
||||
theNb2DShadows = 0;
|
||||
theNbPointShadows = 0;
|
||||
for (NCollection_IndexedDataMap<Handle(Graphic3d_CLight), Standard_Size>::Iterator aLightIter(myLights); aLightIter.More(); aLightIter.Next())
|
||||
{
|
||||
const Handle(Graphic3d_CLight)& aLight = aLightIter.Key();
|
||||
if (aLight->ToCastShadows())
|
||||
{
|
||||
if (aLight->Type() == Graphic3d_TypeOfLightSource_Positional)
|
||||
{
|
||||
++theNbPointShadows;
|
||||
}
|
||||
else
|
||||
{
|
||||
++theNb2DShadows;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : UpdateRevision
|
||||
// purpose :
|
||||
|
@@ -143,9 +143,6 @@ public:
|
||||
//! Returns total amount of lights of specified type.
|
||||
Standard_Integer NbLightsOfType (Graphic3d_TypeOfLightSource theType) const { return myLightTypes[theType]; }
|
||||
|
||||
//! Calculates total amount of enabled lights castings shadows (point lights and others).
|
||||
Standard_EXPORT void CalculateNbShadows (Standard_Integer& theNb2DShadows, Standard_Integer& theNbPointShadows);
|
||||
|
||||
//! @name cached state of lights set updated by UpdateRevision()
|
||||
public:
|
||||
|
||||
|
@@ -19,7 +19,6 @@
|
||||
#include <Message.hxx>
|
||||
|
||||
#include "../Shaders/Shaders_LightShadow_glsl.pxx"
|
||||
#include "../Shaders/Shaders_LightPointShadow_glsl.pxx"
|
||||
#include "../Shaders/Shaders_PBRDistribution_glsl.pxx"
|
||||
#include "../Shaders/Shaders_PBRDirectionalLight_glsl.pxx"
|
||||
#include "../Shaders/Shaders_PBRGeometry_glsl.pxx"
|
||||
@@ -517,7 +516,6 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramFont() con
|
||||
aProgramSrc->SetDefaultSampler (false);
|
||||
aProgramSrc->SetNbLightsMax (0);
|
||||
aProgramSrc->SetNbShadowMaps (0);
|
||||
aProgramSrc->SetNbShadowCubeMaps (0);
|
||||
aProgramSrc->SetNbClipPlanesMax (0);
|
||||
aProgramSrc->AttachShader (Graphic3d_ShaderObject::CreateFromSource (aSrcVert, Graphic3d_TOS_VERTEX, aUniforms, aStageInOuts));
|
||||
aProgramSrc->AttachShader (Graphic3d_ShaderObject::CreateFromSource (aSrcFrag, Graphic3d_TOS_FRAGMENT, aUniforms, aStageInOuts));
|
||||
@@ -647,7 +645,6 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramFboBlit (S
|
||||
aProgramSrc->SetDefaultSampler (false);
|
||||
aProgramSrc->SetNbLightsMax (0);
|
||||
aProgramSrc->SetNbShadowMaps (0);
|
||||
aProgramSrc->SetNbShadowCubeMaps (0);
|
||||
aProgramSrc->SetNbClipPlanesMax (0);
|
||||
aProgramSrc->AttachShader (Graphic3d_ShaderObject::CreateFromSource (aSrcVert, Graphic3d_TOS_VERTEX, aUniforms, aStageInOuts));
|
||||
aProgramSrc->AttachShader (Graphic3d_ShaderObject::CreateFromSource (aSrcFrag, Graphic3d_TOS_FRAGMENT, aUniforms, aStageInOuts));
|
||||
@@ -703,7 +700,6 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramOitComposi
|
||||
aProgramSrc->SetDefaultSampler (false);
|
||||
aProgramSrc->SetNbLightsMax (0);
|
||||
aProgramSrc->SetNbShadowMaps (0);
|
||||
aProgramSrc->SetNbShadowCubeMaps (0);
|
||||
aProgramSrc->SetNbClipPlanesMax (0);
|
||||
aProgramSrc->AttachShader (Graphic3d_ShaderObject::CreateFromSource (aSrcVert, Graphic3d_TOS_VERTEX, aUniforms, aStageInOuts));
|
||||
aProgramSrc->AttachShader (Graphic3d_ShaderObject::CreateFromSource (aSrcFrag, Graphic3d_TOS_FRAGMENT, aUniforms, aStageInOuts));
|
||||
@@ -1141,7 +1137,6 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramUnlit (Sta
|
||||
aProgramSrc->SetDefaultSampler (false);
|
||||
aProgramSrc->SetNbLightsMax (0);
|
||||
aProgramSrc->SetNbShadowMaps (0);
|
||||
aProgramSrc->SetNbShadowCubeMaps (0);
|
||||
aProgramSrc->SetNbClipPlanesMax (aNbClipPlanes);
|
||||
aProgramSrc->SetAlphaTest ((theBits & Graphic3d_ShaderFlags_AlphaTest) != 0);
|
||||
const Standard_Integer aNbGeomInputVerts = !aSrcGeom.IsEmpty() ? 3 : 0;
|
||||
@@ -1157,11 +1152,10 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramUnlit (Sta
|
||||
// =======================================================================
|
||||
TCollection_AsciiString Graphic3d_ShaderManager::stdComputeLighting (Standard_Integer& theNbLights,
|
||||
const Handle(Graphic3d_LightSet)& theLights,
|
||||
Standard_Boolean theHasVertColor,
|
||||
Standard_Boolean theIsPBR,
|
||||
Standard_Boolean theHasTexColor,
|
||||
Standard_Integer theNbShadowMaps,
|
||||
Standard_Integer theNbShadowCubeMaps) const
|
||||
Standard_Boolean theHasVertColor,
|
||||
Standard_Boolean theIsPBR,
|
||||
Standard_Boolean theHasTexColor,
|
||||
Standard_Integer theNbShadowMaps) const
|
||||
{
|
||||
TCollection_AsciiString aLightsFunc, aLightsLoop;
|
||||
theNbLights = 0;
|
||||
@@ -1171,8 +1165,6 @@ TCollection_AsciiString Graphic3d_ShaderManager::stdComputeLighting (Standard_In
|
||||
if (theNbLights <= THE_NB_UNROLLED_LIGHTS_MAX)
|
||||
{
|
||||
Standard_Integer anIndex = 0;
|
||||
Standard_Integer a2DSamplerIndex = 0;
|
||||
Standard_Integer aCubeSamplerIndex = 0;
|
||||
for (Graphic3d_LightSet::Iterator aLightIter (theLights, Graphic3d_LightSet::IterationFilter_ExcludeDisabledAndAmbient);
|
||||
aLightIter.More(); aLightIter.Next())
|
||||
{
|
||||
@@ -1189,7 +1181,7 @@ TCollection_AsciiString Graphic3d_ShaderManager::stdComputeLighting (Standard_In
|
||||
{
|
||||
aLightsLoop = aLightsLoop +
|
||||
EOL" occDirectionalLight (" + anIndex + ", theNormal, theView, theIsFront,"
|
||||
EOL" occLightShadow (occShadowMapSamplers[" + a2DSamplerIndex++ + "], " + anIndex + ", theNormal));";
|
||||
EOL" occLightShadow (occShadowMapSamplers[" + anIndex + "], " + anIndex + ", theNormal));";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1200,18 +1192,7 @@ TCollection_AsciiString Graphic3d_ShaderManager::stdComputeLighting (Standard_In
|
||||
}
|
||||
case Graphic3d_TypeOfLightSource_Positional:
|
||||
{
|
||||
if (theNbShadowCubeMaps > 0
|
||||
&& aLightIter.Value()->ToCastShadows())
|
||||
{
|
||||
aLightsLoop = aLightsLoop +
|
||||
EOL" occPointLight (" + anIndex + ", theNormal, theView, aPoint, theIsFront,"
|
||||
EOL" occLightPointShadow (occShadowCubeMapSamplers[" + aCubeSamplerIndex++ + "],"
|
||||
EOL" " + anIndex + ", aPoint, theNormal)); ";
|
||||
}
|
||||
else
|
||||
{
|
||||
aLightsLoop = aLightsLoop + EOL" occPointLight (" + anIndex + ", theNormal, theView, aPoint, theIsFront, 1.0);";
|
||||
}
|
||||
aLightsLoop = aLightsLoop + EOL" occPointLight (" + anIndex + ", theNormal, theView, aPoint, theIsFront);";
|
||||
++anIndex;
|
||||
break;
|
||||
}
|
||||
@@ -1222,7 +1203,7 @@ TCollection_AsciiString Graphic3d_ShaderManager::stdComputeLighting (Standard_In
|
||||
{
|
||||
aLightsLoop = aLightsLoop +
|
||||
EOL" occSpotLight (" + anIndex + ", theNormal, theView, aPoint, theIsFront,"
|
||||
EOL" occLightShadow (occShadowMapSamplers[" + a2DSamplerIndex++ + "], " + anIndex + ", theNormal));";
|
||||
EOL" occLightShadow (occShadowMapSamplers[" + anIndex + "], " + anIndex + ", theNormal));";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1261,7 +1242,7 @@ TCollection_AsciiString Graphic3d_ShaderManager::stdComputeLighting (Standard_In
|
||||
aLightsLoop +=
|
||||
EOL" if (aType == OccLightType_Point)"
|
||||
EOL" {"
|
||||
EOL" occPointLight (anIndex, theNormal, theView, aPoint, theIsFront, 1.0);"
|
||||
EOL" occPointLight (anIndex, theNormal, theView, aPoint, theIsFront);"
|
||||
EOL" }";
|
||||
}
|
||||
if (theLights->NbEnabledLightsOfType (Graphic3d_TypeOfLightSource_Spot) > 0)
|
||||
@@ -1290,7 +1271,6 @@ TCollection_AsciiString Graphic3d_ShaderManager::stdComputeLighting (Standard_In
|
||||
}
|
||||
|
||||
bool isShadowShaderAdded = false;
|
||||
bool isShadowCubeShaderAdded = false;
|
||||
if (theLights->NbEnabledLightsOfType (Graphic3d_TypeOfLightSource_Directional) == 1
|
||||
&& theNbLights == 1
|
||||
&& !theIsPBR
|
||||
@@ -1311,11 +1291,6 @@ TCollection_AsciiString Graphic3d_ShaderManager::stdComputeLighting (Standard_In
|
||||
}
|
||||
if (theLights->NbEnabledLightsOfType (Graphic3d_TypeOfLightSource_Positional) > 0)
|
||||
{
|
||||
if (theNbShadowCubeMaps > 0 && !isShadowCubeShaderAdded)
|
||||
{
|
||||
aLightsFunc += Shaders_LightPointShadow_glsl;
|
||||
isShadowCubeShaderAdded = true;
|
||||
}
|
||||
aLightsFunc += theIsPBR ? Shaders_PBRPointLight_glsl : Shaders_PhongPointLight_glsl;
|
||||
}
|
||||
if (theLights->NbEnabledLightsOfType (Graphic3d_TypeOfLightSource_Spot) > 0)
|
||||
@@ -1500,7 +1475,7 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramGouraud (c
|
||||
aStageInOuts.Append (Graphic3d_ShaderObject::ShaderVariable ("vec4 BackColor", Graphic3d_TOS_VERTEX | Graphic3d_TOS_FRAGMENT));
|
||||
|
||||
Standard_Integer aNbLights = 0;
|
||||
const TCollection_AsciiString aLights = stdComputeLighting (aNbLights, theLights, !aSrcVertColor.IsEmpty(), false, toUseTexColor, 0, 0);
|
||||
const TCollection_AsciiString aLights = stdComputeLighting (aNbLights, theLights, !aSrcVertColor.IsEmpty(), false, toUseTexColor, 0);
|
||||
aSrcVert = TCollection_AsciiString()
|
||||
+ THE_FUNC_transformNormal_world
|
||||
+ EOL
|
||||
@@ -1545,7 +1520,6 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramGouraud (c
|
||||
aProgramSrc->SetDefaultSampler (false);
|
||||
aProgramSrc->SetNbLightsMax (aNbLights);
|
||||
aProgramSrc->SetNbShadowMaps (0);
|
||||
aProgramSrc->SetNbShadowCubeMaps (0);
|
||||
aProgramSrc->SetNbClipPlanesMax (aNbClipPlanes);
|
||||
aProgramSrc->SetAlphaTest ((theBits & Graphic3d_ShaderFlags_AlphaTest) != 0);
|
||||
const Standard_Integer aNbGeomInputVerts = !aSrcGeom.IsEmpty() ? 3 : 0;
|
||||
@@ -1563,8 +1537,7 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramPhong (con
|
||||
const Standard_Integer theBits,
|
||||
const Standard_Boolean theIsFlatNormal,
|
||||
const Standard_Boolean theIsPBR,
|
||||
const Standard_Integer theNbShadowMaps,
|
||||
const Standard_Integer theNbShadowCubeMaps) const
|
||||
const Standard_Integer theNbShadowMaps) const
|
||||
{
|
||||
TCollection_AsciiString aPhongCompLight = TCollection_AsciiString() +
|
||||
"computeLighting (normalize (Normal), normalize (View), PositionWorld, gl_FrontFacing)";
|
||||
@@ -1717,19 +1690,12 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramPhong (con
|
||||
|
||||
aStageInOuts.Append (Graphic3d_ShaderObject::ShaderVariable ("vec4 PositionWorld", Graphic3d_TOS_VERTEX | Graphic3d_TOS_FRAGMENT));
|
||||
aStageInOuts.Append (Graphic3d_ShaderObject::ShaderVariable ("vec3 View", Graphic3d_TOS_VERTEX | Graphic3d_TOS_FRAGMENT));
|
||||
if (theNbShadowMaps + theNbShadowCubeMaps > 0)
|
||||
if (theNbShadowMaps > 0)
|
||||
{
|
||||
aUniforms.Append (Graphic3d_ShaderObject::ShaderVariable ("mat4 occShadowMapMatrices[THE_NB_SHADOWMAPS]", Graphic3d_TOS_VERTEX));
|
||||
aUniforms.Append (Graphic3d_ShaderObject::ShaderVariable ("vec2 occShadowMapRangeParams[THE_NB_SHADOWMAPS]", Graphic3d_TOS_FRAGMENT));
|
||||
aUniforms.Append (Graphic3d_ShaderObject::ShaderVariable ("vec2 occShadowMapSizeBias", Graphic3d_TOS_FRAGMENT));
|
||||
if (theNbShadowMaps > 0)
|
||||
{
|
||||
aUniforms.Append (Graphic3d_ShaderObject::ShaderVariable ("sampler2D occShadowMapSamplers[THE_NB_SHADOWMAPS2D]", Graphic3d_TOS_FRAGMENT));
|
||||
}
|
||||
if (theNbShadowCubeMaps > 0)
|
||||
{
|
||||
aUniforms.Append (Graphic3d_ShaderObject::ShaderVariable ("samplerCube occShadowCubeMapSamplers[THE_NB_SHADOWMAPSCUBE]", Graphic3d_TOS_FRAGMENT));
|
||||
}
|
||||
aUniforms.Append (Graphic3d_ShaderObject::ShaderVariable ("mat4 occShadowMapMatrices[THE_NB_SHADOWMAPS]", Graphic3d_TOS_VERTEX));
|
||||
aUniforms.Append (Graphic3d_ShaderObject::ShaderVariable ("sampler2D occShadowMapSamplers[THE_NB_SHADOWMAPS]", Graphic3d_TOS_FRAGMENT));
|
||||
aUniforms.Append (Graphic3d_ShaderObject::ShaderVariable ("vec2 occShadowMapSizeBias", Graphic3d_TOS_FRAGMENT));
|
||||
|
||||
aStageInOuts.Append (Graphic3d_ShaderObject::ShaderVariable ("vec4 PosLightSpace[THE_NB_SHADOWMAPS]", Graphic3d_TOS_VERTEX | Graphic3d_TOS_FRAGMENT));
|
||||
aSrcVertExtraMain +=
|
||||
EOL" for (int aShadowIter = 0; aShadowIter < THE_NB_SHADOWMAPS; ++aShadowIter)"
|
||||
@@ -1763,7 +1729,7 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramPhong (con
|
||||
|
||||
Standard_Integer aNbLights = 0;
|
||||
const TCollection_AsciiString aLights = stdComputeLighting (aNbLights, theLights, !aSrcFragGetVertColor.IsEmpty(),
|
||||
theIsPBR, toUseTexColor, theNbShadowMaps, theNbShadowCubeMaps);
|
||||
theIsPBR, toUseTexColor, theNbShadowMaps);
|
||||
aSrcFrag += TCollection_AsciiString()
|
||||
+ EOL
|
||||
+ aSrcFragGetVertColor
|
||||
@@ -1779,12 +1745,11 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramPhong (con
|
||||
+ EOL"}";
|
||||
|
||||
const TCollection_AsciiString aProgId = TCollection_AsciiString (theIsFlatNormal ? "flat-" : "phong-") + (theIsPBR ? "pbr-" : "")
|
||||
+ genLightKey (theLights, (theNbShadowMaps + theNbShadowCubeMaps) > 0) + "-";
|
||||
+ genLightKey (theLights, theNbShadowMaps > 0) + "-";
|
||||
defaultGlslVersion (aProgramSrc, aProgId, theBits, isFlatNormal);
|
||||
aProgramSrc->SetDefaultSampler (false);
|
||||
aProgramSrc->SetNbLightsMax (aNbLights);
|
||||
aProgramSrc->SetNbShadowMaps (theNbShadowMaps);
|
||||
aProgramSrc->SetNbShadowCubeMaps (theNbShadowCubeMaps);
|
||||
aProgramSrc->SetNbClipPlanesMax (aNbClipPlanes);
|
||||
aProgramSrc->SetAlphaTest ((theBits & Graphic3d_ShaderFlags_AlphaTest) != 0);
|
||||
|
||||
@@ -1979,7 +1944,6 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramStereo (Gr
|
||||
aProgramSrc->SetDefaultSampler (false);
|
||||
aProgramSrc->SetNbLightsMax (0);
|
||||
aProgramSrc->SetNbShadowMaps (0);
|
||||
aProgramSrc->SetNbShadowCubeMaps (0);
|
||||
aProgramSrc->SetNbClipPlanesMax (0);
|
||||
aProgramSrc->AttachShader (Graphic3d_ShaderObject::CreateFromSource (aSrcVert, Graphic3d_TOS_VERTEX, aUniforms, aStageInOuts));
|
||||
aProgramSrc->AttachShader (Graphic3d_ShaderObject::CreateFromSource (aSrcFrag, Graphic3d_TOS_FRAGMENT, aUniforms, aStageInOuts));
|
||||
@@ -2016,7 +1980,6 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramBoundBox()
|
||||
aProgramSrc->SetDefaultSampler (false);
|
||||
aProgramSrc->SetNbLightsMax (0);
|
||||
aProgramSrc->SetNbShadowMaps (0);
|
||||
aProgramSrc->SetNbShadowCubeMaps (0);
|
||||
aProgramSrc->SetNbClipPlanesMax (0);
|
||||
aProgramSrc->AttachShader (Graphic3d_ShaderObject::CreateFromSource (aSrcVert, Graphic3d_TOS_VERTEX, aUniforms, aStageInOuts));
|
||||
aProgramSrc->AttachShader (Graphic3d_ShaderObject::CreateFromSource (aSrcFrag, Graphic3d_TOS_FRAGMENT, aUniforms, aStageInOuts));
|
||||
@@ -2078,7 +2041,6 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getPBREnvBakingProgram
|
||||
aProgramSrc->SetDefaultSampler (false);
|
||||
aProgramSrc->SetNbLightsMax (0);
|
||||
aProgramSrc->SetNbShadowMaps (0);
|
||||
aProgramSrc->SetNbShadowCubeMaps (0);
|
||||
aProgramSrc->SetNbClipPlanesMax (0);
|
||||
aProgramSrc->AttachShader (Graphic3d_ShaderObject::CreateFromSource (aSrcVert, Graphic3d_TOS_VERTEX, aUniforms, aStageInOuts));
|
||||
aProgramSrc->AttachShader (Graphic3d_ShaderObject::CreateFromSource (aSrcFrag, Graphic3d_TOS_FRAGMENT, aUniforms, aStageInOuts));
|
||||
@@ -2145,7 +2107,6 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getBgCubeMapProgram() c
|
||||
aProgSrc->SetDefaultSampler (false);
|
||||
aProgSrc->SetNbLightsMax (0);
|
||||
aProgSrc->SetNbShadowMaps (0);
|
||||
aProgSrc->SetNbShadowCubeMaps (0);
|
||||
aProgSrc->SetNbClipPlanesMax (0);
|
||||
aProgSrc->AttachShader (Graphic3d_ShaderObject::CreateFromSource (aSrcVert, Graphic3d_TOS_VERTEX, aUniforms, aStageInOuts));
|
||||
aProgSrc->AttachShader (Graphic3d_ShaderObject::CreateFromSource (aSrcFrag, Graphic3d_TOS_FRAGMENT, aUniforms, aStageInOuts));
|
||||
|
@@ -134,8 +134,7 @@ protected:
|
||||
const Standard_Integer theBits,
|
||||
const Standard_Boolean theIsFlatNormal,
|
||||
const Standard_Boolean theIsPBR,
|
||||
const Standard_Integer theNbShadowMaps,
|
||||
const Standard_Integer theNbShadowCubeMaps) const;
|
||||
const Standard_Integer theNbShadowMaps) const;
|
||||
|
||||
//! Prepare standard GLSL program for bounding box.
|
||||
Standard_EXPORT Handle(Graphic3d_ShaderProgram) getStdProgramBoundBox() const;
|
||||
@@ -208,11 +207,10 @@ protected:
|
||||
//! @param theNbShadowMaps [in] flag to include shadow map
|
||||
Standard_EXPORT TCollection_AsciiString stdComputeLighting (Standard_Integer& theNbLights,
|
||||
const Handle(Graphic3d_LightSet)& theLights,
|
||||
Standard_Boolean theHasVertColor,
|
||||
Standard_Boolean theIsPBR,
|
||||
Standard_Boolean theHasTexColor,
|
||||
Standard_Integer theNbShadowMaps,
|
||||
Standard_Integer theNbShadowCubeMaps) const;
|
||||
Standard_Boolean theHasVertColor,
|
||||
Standard_Boolean theIsPBR,
|
||||
Standard_Boolean theHasTexColor,
|
||||
Standard_Integer theNbShadowMaps) const;
|
||||
|
||||
protected:
|
||||
|
||||
|
@@ -80,7 +80,6 @@ const TCollection_AsciiString& Graphic3d_ShaderProgram::ShadersFolder()
|
||||
Graphic3d_ShaderProgram::Graphic3d_ShaderProgram()
|
||||
: myNbLightsMax (THE_MAX_LIGHTS_DEFAULT),
|
||||
myNbShadowMaps (0),
|
||||
myNbShadowCubeMaps (0),
|
||||
myNbClipPlanesMax (THE_MAX_CLIP_PLANES_DEFAULT),
|
||||
myNbFragOutputs (THE_NB_FRAG_OUTPUTS),
|
||||
myTextureSetBits (Graphic3d_TextureSetBits_NONE),
|
||||
|
@@ -96,18 +96,12 @@ public:
|
||||
//! Specify the length of array of light sources (THE_MAX_LIGHTS).
|
||||
void SetNbLightsMax (Standard_Integer theNbLights) { myNbLightsMax = theNbLights; }
|
||||
|
||||
//! Return the length of array of 2D shadow maps (THE_NB_SHADOWMAP2D); 0 by default.
|
||||
//! Return the length of array of shadow maps (THE_NB_SHADOWMAPS); 0 by default.
|
||||
Standard_Integer NbShadowMaps() const { return myNbShadowMaps; }
|
||||
|
||||
//! Specify the length of array of 2D shadow maps (THE_NB_SHADOWMAP2D).
|
||||
//! Specify the length of array of shadow maps (THE_NB_SHADOWMAPS).
|
||||
void SetNbShadowMaps (Standard_Integer theNbMaps) { myNbShadowMaps = theNbMaps; }
|
||||
|
||||
//! Return the length of array of shadow cube maps (THE_NB_SHADOWMAPCUBE); 0 by default.
|
||||
Standard_Integer NbShadowCubeMaps() const { return myNbShadowCubeMaps; }
|
||||
|
||||
//! Specify the length of array of shadow cube maps (THE_NB_SHADOWMAPCUBE).
|
||||
void SetNbShadowCubeMaps (Standard_Integer theNbMaps) { myNbShadowCubeMaps = theNbMaps; }
|
||||
|
||||
//! Return the length of array of clipping planes (THE_MAX_CLIP_PLANES),
|
||||
//! to be used for initialization occClipPlaneEquations.
|
||||
//! Default value is THE_MAX_CLIP_PLANES_DEFAULT.
|
||||
@@ -220,21 +214,20 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
TCollection_AsciiString myID; //!< the unique identifier of program object
|
||||
Graphic3d_ShaderObjectList myShaderObjects; //!< the list of attached shader objects
|
||||
Graphic3d_ShaderVariableList myVariables; //!< the list of custom uniform variables
|
||||
Graphic3d_ShaderAttributeList myAttributes; //!< the list of custom vertex attributes
|
||||
TCollection_AsciiString myHeader; //!< GLSL header with version code and used extensions
|
||||
Standard_Integer myNbLightsMax; //!< length of array of light sources (THE_MAX_LIGHTS)
|
||||
Standard_Integer myNbShadowMaps; //!< length of array of shadow maps (THE_NB_SHADOWMAP2D)
|
||||
Standard_Integer myNbShadowCubeMaps; //!< length of array of shadow maps (THE_NB_SHADOWMAPCUBE)
|
||||
Standard_Integer myNbClipPlanesMax; //!< length of array of clipping planes (THE_MAX_CLIP_PLANES)
|
||||
Standard_Integer myNbFragOutputs; //!< length of array of Fragment Shader outputs (THE_NB_FRAG_OUTPUTS)
|
||||
Standard_Integer myTextureSetBits; //!< texture units declared within the program, @sa Graphic3d_TextureSetBits
|
||||
Graphic3d_RenderTransparentMethod myOitOutput; //!< flag indicating that Fragment Shader includes OIT outputs
|
||||
Standard_Boolean myHasDefSampler; //!< flag indicating that program defines default texture sampler occSampler0
|
||||
Standard_Boolean myHasAlphaTest; //!< flag indicating that Fragment Shader performs alpha test
|
||||
Standard_Boolean myIsPBR; //!< flag indicating that program defines functions and variables used in PBR pipeline
|
||||
TCollection_AsciiString myID; //!< the unique identifier of program object
|
||||
Graphic3d_ShaderObjectList myShaderObjects; //!< the list of attached shader objects
|
||||
Graphic3d_ShaderVariableList myVariables; //!< the list of custom uniform variables
|
||||
Graphic3d_ShaderAttributeList myAttributes; //!< the list of custom vertex attributes
|
||||
TCollection_AsciiString myHeader; //!< GLSL header with version code and used extensions
|
||||
Standard_Integer myNbLightsMax; //!< length of array of light sources (THE_MAX_LIGHTS)
|
||||
Standard_Integer myNbShadowMaps; //!< length of array of shadow maps (THE_NB_SHADOWMAPS)
|
||||
Standard_Integer myNbClipPlanesMax; //!< length of array of clipping planes (THE_MAX_CLIP_PLANES)
|
||||
Standard_Integer myNbFragOutputs; //!< length of array of Fragment Shader outputs (THE_NB_FRAG_OUTPUTS)
|
||||
Standard_Integer myTextureSetBits;//!< texture units declared within the program, @sa Graphic3d_TextureSetBits
|
||||
Graphic3d_RenderTransparentMethod myOitOutput; //!< flag indicating that Fragment Shader includes OIT outputs
|
||||
Standard_Boolean myHasDefSampler; //!< flag indicating that program defines default texture sampler occSampler0
|
||||
Standard_Boolean myHasAlphaTest; //!< flag indicating that Fragment Shader performs alpha test
|
||||
Standard_Boolean myIsPBR; //!< flag indicating that program defines functions and variables used in PBR pipeline
|
||||
|
||||
};
|
||||
|
||||
|
@@ -67,10 +67,6 @@ enum Graphic3d_TextureUnit
|
||||
//! Note that it can be overridden to Graphic3d_TextureUnit_0 for FFP fallback on hardware without multi-texturing.
|
||||
Graphic3d_TextureUnit_PointSprite = Graphic3d_TextureUnit_1,
|
||||
|
||||
//! samplerCube occShadowCubeMapSampler.
|
||||
//! Point light source shadowmap texture.
|
||||
Graphic3d_TextureUnit_ShadowCubeMap = -7,
|
||||
|
||||
//! sampler2D occDepthPeelingDepth.
|
||||
//! 1st texture unit for Depth Peeling lookups.
|
||||
Graphic3d_TextureUnit_DepthPeelingDepth = -6,
|
||||
|
@@ -227,7 +227,6 @@ OpenGl_Context::OpenGl_Context (const Handle(OpenGl_Caps)& theCaps)
|
||||
myPBRDiffIBLMapSHTexUnit (Graphic3d_TextureUnit_PbrIblDiffuseSH),
|
||||
myPBRSpecIBLMapTexUnit (Graphic3d_TextureUnit_PbrIblSpecular),
|
||||
myShadowMapTexUnit (Graphic3d_TextureUnit_ShadowMap),
|
||||
myShadowCubeMapTexUnit (Graphic3d_TextureUnit_ShadowCubeMap),
|
||||
myDepthPeelingDepthTexUnit (Graphic3d_TextureUnit_DepthPeelingDepth),
|
||||
myDepthPeelingFrontColorTexUnit (Graphic3d_TextureUnit_DepthPeelingFrontColor),
|
||||
myFrameStats (new OpenGl_FrameStats()),
|
||||
@@ -1654,7 +1653,6 @@ void OpenGl_Context::init (const Standard_Boolean theIsCoreProfile)
|
||||
}
|
||||
}
|
||||
|
||||
myShadowCubeMapTexUnit = static_cast<Graphic3d_TextureUnit>(myMaxTexCombined + Graphic3d_TextureUnit_ShadowCubeMap); // -7
|
||||
myDepthPeelingDepthTexUnit = static_cast<Graphic3d_TextureUnit>(myMaxTexCombined + Graphic3d_TextureUnit_DepthPeelingDepth); // -6
|
||||
myDepthPeelingFrontColorTexUnit = static_cast<Graphic3d_TextureUnit>(myMaxTexCombined + Graphic3d_TextureUnit_DepthPeelingFrontColor); // -5
|
||||
myShadowMapTexUnit = static_cast<Graphic3d_TextureUnit>(myMaxTexCombined + Graphic3d_TextureUnit_ShadowMap); // -4
|
||||
@@ -1663,7 +1661,6 @@ void OpenGl_Context::init (const Standard_Boolean theIsCoreProfile)
|
||||
myPBRSpecIBLMapTexUnit = static_cast<Graphic3d_TextureUnit>(myMaxTexCombined + Graphic3d_TextureUnit_PbrIblSpecular); // -1
|
||||
if (!myHasPBR)
|
||||
{
|
||||
myShadowCubeMapTexUnit = static_cast<Graphic3d_TextureUnit>(myShadowCubeMapTexUnit + 3);
|
||||
myDepthPeelingDepthTexUnit = static_cast<Graphic3d_TextureUnit>(myDepthPeelingDepthTexUnit + 3);
|
||||
myDepthPeelingFrontColorTexUnit = static_cast<Graphic3d_TextureUnit>(myDepthPeelingFrontColorTexUnit + 3);
|
||||
myShadowMapTexUnit = static_cast<Graphic3d_TextureUnit>(myShadowMapTexUnit + 3);
|
||||
|
@@ -605,9 +605,6 @@ public:
|
||||
//! Returns texture unit where shadow map is expected to be bound, or 0 if unavailable.
|
||||
Graphic3d_TextureUnit ShadowMapTexUnit() const { return myShadowMapTexUnit; }
|
||||
|
||||
//! Returns texture unit where shadow map is expected to be bound, or 0 if unavailable.
|
||||
Graphic3d_TextureUnit ShadowCubeMapTexUnit() const { return myShadowCubeMapTexUnit; }
|
||||
|
||||
//! Returns texture unit for occDepthPeelingDepth within enabled Depth Peeling.
|
||||
Graphic3d_TextureUnit DepthPeelingDepthTexUnit() const { return myDepthPeelingDepthTexUnit; }
|
||||
|
||||
@@ -1140,7 +1137,6 @@ private: // context info
|
||||
//! (0 if PBR is not supported)
|
||||
Graphic3d_TextureUnit myPBRSpecIBLMapTexUnit; //!< samplerCube occSpecIBLMap, texture unit where specular IBL map is expected to be binded (0 if PBR is not supported)
|
||||
Graphic3d_TextureUnit myShadowMapTexUnit; //!< sampler2D occShadowMapSampler
|
||||
Graphic3d_TextureUnit myShadowCubeMapTexUnit; //!< samplerCube occShadowCubeMapSampler
|
||||
|
||||
Graphic3d_TextureUnit myDepthPeelingDepthTexUnit; //!< sampler2D occDepthPeelingDepth, texture unit for Depth Peeling lookups
|
||||
Graphic3d_TextureUnit myDepthPeelingFrontColorTexUnit; //!< sampler2D occDepthPeelingFrontColor, texture unit for Depth Peeling lookups
|
||||
|
@@ -330,8 +330,7 @@ Standard_Boolean OpenGl_FrameBuffer::Init (const Handle(OpenGl_Context)& theGlCo
|
||||
const Graphic3d_Vec2i& theSize,
|
||||
const OpenGl_ColorFormats& theColorFormats,
|
||||
const Standard_Integer theDepthFormat,
|
||||
const Standard_Integer theNbSamples,
|
||||
const Standard_Boolean theIsCubeMap)
|
||||
const Standard_Integer theNbSamples)
|
||||
{
|
||||
myColorFormats = theColorFormats;
|
||||
|
||||
@@ -424,10 +423,9 @@ Standard_Boolean OpenGl_FrameBuffer::Init (const Handle(OpenGl_Context)& theGlCo
|
||||
|
||||
// extensions (GL_OES_packed_depth_stencil, GL_OES_depth_texture) + GL version might be used to determine supported formats
|
||||
// instead of just trying to create such texture
|
||||
Graphic3d_TypeOfTexture aTypeOfTexture = theIsCubeMap ? Graphic3d_TypeOfTexture_CUBEMAP : Graphic3d_TypeOfTexture_2D;
|
||||
const OpenGl_TextureFormat aDepthFormat = OpenGl_TextureFormat::FindSizedFormat (theGlContext, myDepthFormat);
|
||||
if (aDepthFormat.IsValid()
|
||||
&& !myDepthStencilTexture->Init (theGlContext, aDepthFormat, Graphic3d_Vec2i (aSizeX, aSizeY), aTypeOfTexture))
|
||||
&& !myDepthStencilTexture->Init (theGlContext, aDepthFormat, Graphic3d_Vec2i (aSizeX, aSizeY), Graphic3d_TypeOfTexture_2D))
|
||||
{
|
||||
theGlContext->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_PORTABILITY, 0, GL_DEBUG_SEVERITY_HIGH,
|
||||
"Warning! Depth textures are not supported by hardware!");
|
||||
@@ -472,36 +470,15 @@ Standard_Boolean OpenGl_FrameBuffer::Init (const Handle(OpenGl_Context)& theGlCo
|
||||
{
|
||||
if (hasDepthStencilAttach (theGlContext))
|
||||
{
|
||||
if (theIsCubeMap)
|
||||
{
|
||||
theGlContext->arbFBO->glFramebufferTexture2D (GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT,
|
||||
GLenum(GL_TEXTURE_CUBE_MAP_POSITIVE_X),
|
||||
myDepthStencilTexture->TextureId(), 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
theGlContext->arbFBO->glFramebufferTexture2D (GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT,
|
||||
myDepthStencilTexture->GetTarget(), myDepthStencilTexture->TextureId(), 0);
|
||||
}
|
||||
theGlContext->arbFBO->glFramebufferTexture2D (GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT,
|
||||
myDepthStencilTexture->GetTarget(), myDepthStencilTexture->TextureId(), 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (theIsCubeMap)
|
||||
{
|
||||
theGlContext->arbFBO->glFramebufferTexture2D (GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT,
|
||||
GLenum(GL_TEXTURE_CUBE_MAP_POSITIVE_X),
|
||||
myDepthStencilTexture->TextureId(), 0);
|
||||
theGlContext->arbFBO->glFramebufferTexture2D (GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT,
|
||||
GLenum(GL_TEXTURE_CUBE_MAP_POSITIVE_X),
|
||||
myDepthStencilTexture->TextureId(), 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
theGlContext->arbFBO->glFramebufferTexture2D (GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT,
|
||||
myDepthStencilTexture->GetTarget(), myDepthStencilTexture->TextureId(), 0);
|
||||
theGlContext->arbFBO->glFramebufferTexture2D (GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT,
|
||||
myDepthStencilTexture->GetTarget(), myDepthStencilTexture->TextureId(), 0);
|
||||
}
|
||||
theGlContext->arbFBO->glFramebufferTexture2D (GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT,
|
||||
myDepthStencilTexture->GetTarget(), myDepthStencilTexture->TextureId(), 0);
|
||||
theGlContext->arbFBO->glFramebufferTexture2D (GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT,
|
||||
myDepthStencilTexture->GetTarget(), myDepthStencilTexture->TextureId(), 0);
|
||||
}
|
||||
}
|
||||
else if (myGlDepthRBufferId != NO_RENDERBUFFER)
|
||||
@@ -522,17 +499,8 @@ Standard_Boolean OpenGl_FrameBuffer::Init (const Handle(OpenGl_Context)& theGlCo
|
||||
}
|
||||
}
|
||||
}
|
||||
const GLenum aRendImgErr = theGlContext->core11fwd->glGetError();
|
||||
if (aRendImgErr != GL_NO_ERROR)
|
||||
{
|
||||
theGlContext->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH,
|
||||
TCollection_AsciiString("Error: in setup of glFramebufferTexture2D: ") + OpenGl_Context::FormatGlError(aRendImgErr) + ".");
|
||||
Release (theGlContext.get());
|
||||
return Standard_False;
|
||||
}
|
||||
if (theGlContext->arbFBO->glCheckFramebufferStatus (GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE)
|
||||
{
|
||||
std::cout << "\n\nIncomplete framebuffer: " << theGlContext->arbFBO->glCheckFramebufferStatus (GL_FRAMEBUFFER) << "\n\n";
|
||||
Release (theGlContext.operator->());
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -939,30 +907,6 @@ void OpenGl_FrameBuffer::BindReadBuffer (const Handle(OpenGl_Context)& theGlCtx)
|
||||
theGlCtx->arbFBO->glBindFramebuffer (GL_READ_FRAMEBUFFER, myGlFBufferId);
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : BindBufferCube
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void OpenGl_FrameBuffer::BindBufferCube (const Handle(OpenGl_Context)& theGlCtx, const Standard_Integer theFace)
|
||||
{
|
||||
theGlCtx->arbFBO->glBindFramebuffer (GL_DRAW_FRAMEBUFFER, myGlFBufferId);
|
||||
if (hasDepthStencilAttach (theGlCtx))
|
||||
{
|
||||
theGlCtx->arbFBO->glFramebufferTexture2D (GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT,
|
||||
GLenum(GL_TEXTURE_CUBE_MAP_POSITIVE_X + theFace),
|
||||
myDepthStencilTexture->TextureId(), 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
theGlCtx->arbFBO->glFramebufferTexture2D (GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT,
|
||||
GLenum(GL_TEXTURE_CUBE_MAP_POSITIVE_X + theFace),
|
||||
myDepthStencilTexture->TextureId(), 0);
|
||||
theGlCtx->arbFBO->glFramebufferTexture2D (GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT,
|
||||
GLenum(GL_TEXTURE_CUBE_MAP_POSITIVE_X + theFace),
|
||||
myDepthStencilTexture->TextureId(), 0);
|
||||
}
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : UnbindBuffer
|
||||
// purpose :
|
||||
@@ -1013,8 +957,7 @@ inline void convertRowFromRgba (T* theRgbRow,
|
||||
Standard_Boolean OpenGl_FrameBuffer::BufferDump (const Handle(OpenGl_Context)& theGlCtx,
|
||||
const Handle(OpenGl_FrameBuffer)& theFbo,
|
||||
Image_PixMap& theImage,
|
||||
Graphic3d_BufferType theBufferType,
|
||||
const Standard_Integer theCubeFace)
|
||||
Graphic3d_BufferType theBufferType)
|
||||
{
|
||||
if (theGlCtx.IsNull()
|
||||
|| theImage.IsEmpty())
|
||||
@@ -1176,38 +1119,6 @@ Standard_Boolean OpenGl_FrameBuffer::BufferDump (const Handle(OpenGl_Context)& t
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
if (theCubeFace >= 0)
|
||||
{
|
||||
theGlCtx->core11fwd->glBindTexture (GL_TEXTURE_CUBE_MAP, theFbo->DepthStencilTexture()->TextureId());
|
||||
theFbo->BindBufferCube (theGlCtx, theCubeFace);
|
||||
const GLint anAligment = Min(GLint(theImage.MaxRowAligmentBytes()), 8); // limit to 8 bytes for OpenGL
|
||||
theGlCtx->core11fwd->glPixelStorei (GL_PACK_ALIGNMENT, anAligment);
|
||||
if (theGlCtx->hasPackRowLength)
|
||||
{
|
||||
theGlCtx->core11fwd->glPixelStorei (GL_PACK_ROW_LENGTH, 0);
|
||||
}
|
||||
theGlCtx->core11fwd->glGetTexImage (GLenum(GL_TEXTURE_CUBE_MAP_POSITIVE_X + theCubeFace),
|
||||
0, aFormat, aType, theImage.ChangeData());
|
||||
const bool hasErrors = theGlCtx->ResetErrors (true);
|
||||
if (hasErrors)
|
||||
{
|
||||
std::cout << "\nError saving cubemap face texture to image.\n";
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
theGlCtx->core11fwd->glPixelStorei (GL_PACK_ALIGNMENT, 1);
|
||||
|
||||
if (!theFbo.IsNull() && theFbo->IsValid())
|
||||
{
|
||||
theFbo->UnbindBuffer(theGlCtx);
|
||||
}
|
||||
else if (theGlCtx->GraphicsLibrary() != Aspect_GraphicsLibrary_OpenGLES)
|
||||
{
|
||||
theGlCtx->core11fwd->glReadBuffer(aReadBufferPrev);
|
||||
}
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
// bind FBO if used
|
||||
if (!theFbo.IsNull() && theFbo->IsValid())
|
||||
{
|
||||
|
@@ -48,13 +48,11 @@ public:
|
||||
//! @param theFbo FBO to dump (or window buffer, if NULL)
|
||||
//! @param theImage target image
|
||||
//! @param theBufferType buffer type (attachment) to dump
|
||||
//! @param theCubeFace id of the cubemap face (only used for fbo's rendering to cubemaps)
|
||||
//! @return TRUE on success
|
||||
Standard_EXPORT static Standard_Boolean BufferDump (const Handle(OpenGl_Context)& theGlCtx,
|
||||
const Handle(OpenGl_FrameBuffer)& theFbo,
|
||||
Image_PixMap& theImage,
|
||||
Graphic3d_BufferType theBufferType,
|
||||
const Standard_Integer theCubeFace = -1);
|
||||
Graphic3d_BufferType theBufferType);
|
||||
|
||||
public:
|
||||
|
||||
@@ -144,14 +142,12 @@ public:
|
||||
//! @param theColorFormats list of color texture sized format (0 means no color attachment), e.g. GL_RGBA8
|
||||
//! @param theDepthFormat depth-stencil texture sized format (0 means no depth attachment), e.g. GL_DEPTH24_STENCIL8
|
||||
//! @param theNbSamples MSAA number of samples (0 means normal texture)
|
||||
//! @param theIsCubeMap flag to setup texture target to cubemap (FALSE by default)
|
||||
//! @return true on success
|
||||
Standard_EXPORT Standard_Boolean Init (const Handle(OpenGl_Context)& theGlCtx,
|
||||
const Graphic3d_Vec2i& theSize,
|
||||
const OpenGl_ColorFormats& theColorFormats,
|
||||
const Standard_Integer theDepthFormat,
|
||||
const Standard_Integer theNbSamples = 0,
|
||||
const Standard_Boolean theIsCubeMap = Standard_False);
|
||||
const Standard_Integer theNbSamples = 0);
|
||||
|
||||
//! (Re-)initialize FBO with specified dimensions.
|
||||
Standard_EXPORT Standard_Boolean InitLazy (const Handle(OpenGl_Context)& theGlCtx,
|
||||
@@ -229,9 +225,6 @@ public:
|
||||
//! Bind frame buffer for reading GL_READ_FRAMEBUFFER
|
||||
Standard_EXPORT virtual void BindReadBuffer (const Handle(OpenGl_Context)& theGlCtx);
|
||||
|
||||
//! Bind frame buffer for reading cubemap with the target @theFace.
|
||||
Standard_EXPORT virtual void BindBufferCube (const Handle(OpenGl_Context)& theGlCtx, const Standard_Integer theFace);
|
||||
|
||||
//! Unbind frame buffer.
|
||||
Standard_EXPORT virtual void UnbindBuffer (const Handle(OpenGl_Context)& theGlCtx);
|
||||
|
||||
|
@@ -15,7 +15,6 @@
|
||||
|
||||
#include <OpenGl_ShaderManager.hxx>
|
||||
|
||||
#include <Graphic3d_Camera.hxx>
|
||||
#include <Graphic3d_CubeMapPacked.hxx>
|
||||
#include <Graphic3d_TextureParams.hxx>
|
||||
#include <OpenGl_Aspects.hxx>
|
||||
@@ -555,10 +554,9 @@ void OpenGl_ShaderManager::pushLightSourceState (const Handle(OpenGl_ShaderProgr
|
||||
// update shadow map variables
|
||||
if (const OpenGl_ShaderUniformLocation aShadowMatLoc = theProgram->GetStateLocation (OpenGl_OCC_LIGHT_SHADOWMAP_MATRICES))
|
||||
{
|
||||
Standard_Integer aNbShadowMaps = theProgram->NbShadowMaps() + theProgram->NbShadowCubeMaps();
|
||||
if (myShadowMatArray.Size() < aNbShadowMaps)
|
||||
if (myShadowMatArray.Size() < theProgram->NbShadowMaps())
|
||||
{
|
||||
myShadowMatArray.Resize (0, aNbShadowMaps - 1, false);
|
||||
myShadowMatArray.Resize (0, theProgram->NbShadowMaps() - 1, false);
|
||||
}
|
||||
|
||||
Graphic3d_Vec2 aSizeBias;
|
||||
@@ -566,7 +564,7 @@ void OpenGl_ShaderManager::pushLightSourceState (const Handle(OpenGl_ShaderProgr
|
||||
{
|
||||
aSizeBias.SetValues (1.0f / (float )myLightSourceState.ShadowMaps()->First()->Texture()->SizeX(),
|
||||
myLightSourceState.ShadowMaps()->First()->ShadowMapBias());
|
||||
const Standard_Integer aNbShadows = Min (aNbShadowMaps, myLightSourceState.ShadowMaps()->Size());
|
||||
const Standard_Integer aNbShadows = Min (theProgram->NbShadowMaps(), myLightSourceState.ShadowMaps()->Size());
|
||||
for (Standard_Integer aShadowIter = 0; aShadowIter < aNbShadows; ++aShadowIter)
|
||||
{
|
||||
const Handle(OpenGl_ShadowMap)& aShadow = myLightSourceState.ShadowMaps()->Value (aShadowIter);
|
||||
@@ -574,28 +572,9 @@ void OpenGl_ShaderManager::pushLightSourceState (const Handle(OpenGl_ShaderProgr
|
||||
}
|
||||
}
|
||||
|
||||
theProgram->SetUniform (myContext, aShadowMatLoc, aNbShadowMaps, &myShadowMatArray.First());
|
||||
theProgram->SetUniform (myContext, aShadowMatLoc, theProgram->NbShadowMaps(), &myShadowMatArray.First());
|
||||
theProgram->SetUniform (myContext, theProgram->GetStateLocation (OpenGl_OCC_LIGHT_SHADOWMAP_SIZE_BIAS), aSizeBias);
|
||||
}
|
||||
if (const OpenGl_ShaderUniformLocation aShadowRangeLoc = theProgram->GetStateLocation (OpenGl_OCC_LIGHT_SHADOWMAP_RANGEPARAMS))
|
||||
{
|
||||
Standard_Integer aNbShadowMaps = theProgram->NbShadowMaps() + theProgram->NbShadowCubeMaps();
|
||||
if (myShadowRangeArray.Size() < aNbShadowMaps)
|
||||
{
|
||||
myShadowRangeArray.Resize (0, aNbShadowMaps - 1, false);
|
||||
}
|
||||
|
||||
if (myLightSourceState.HasShadowMaps())
|
||||
{
|
||||
const Standard_Integer aNbShadows = Min (aNbShadowMaps, myLightSourceState.ShadowMaps()->Size());
|
||||
for (Standard_Integer aShadowIter = 0; aShadowIter < aNbShadows; ++aShadowIter)
|
||||
{
|
||||
const Handle(OpenGl_ShadowMap)& aShadow = myLightSourceState.ShadowMaps()->Value (aShadowIter);
|
||||
myShadowRangeArray[aShadowIter] = Graphic3d_Vec2 (aShadow->Camera()->ZNear(), aShadow->Camera()->ZFar());
|
||||
}
|
||||
}
|
||||
theProgram->SetUniform (myContext, aShadowRangeLoc, aNbShadowMaps, &myShadowRangeArray.First());
|
||||
}
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
@@ -1250,16 +1229,10 @@ Standard_Boolean OpenGl_ShaderManager::prepareStdProgramPhong (Handle(OpenGl_Sha
|
||||
const Standard_Boolean theIsFlatNormal,
|
||||
const Standard_Boolean theIsPBR)
|
||||
{
|
||||
Standard_Integer aNbShadowMaps, aNbShadowCubeMaps;
|
||||
myLightSourceState.LightSources()->CalculateNbShadows (aNbShadowMaps, aNbShadowCubeMaps);
|
||||
// point light shadows are not currently supported on opengles 2.0.
|
||||
if (myContext->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES
|
||||
&& myContext->VersionMajor() <= 2)
|
||||
{
|
||||
aNbShadowCubeMaps = 0;
|
||||
}
|
||||
Handle(Graphic3d_ShaderProgram) aProgramSrc = getStdProgramPhong (myLightSourceState.LightSources(), theBits, theIsFlatNormal,
|
||||
theIsPBR, aNbShadowMaps, aNbShadowCubeMaps);
|
||||
Standard_Integer aNbShadowMaps = myLightSourceState.HasShadowMaps()
|
||||
? myLightSourceState.LightSources()->NbCastShadows()
|
||||
: 0;
|
||||
Handle(Graphic3d_ShaderProgram) aProgramSrc = getStdProgramPhong (myLightSourceState.LightSources(), theBits, theIsFlatNormal, theIsPBR, aNbShadowMaps);
|
||||
TCollection_AsciiString aKey;
|
||||
if (!Create (aProgramSrc, aKey, theProgram))
|
||||
{
|
||||
|
@@ -801,7 +801,6 @@ protected:
|
||||
mutable NCollection_Array1<Standard_Integer> myLightTypeArray;
|
||||
mutable NCollection_Array1<OpenGl_ShaderLightParameters> myLightParamsArray;
|
||||
mutable NCollection_Array1<Graphic3d_Mat4> myShadowMatArray;
|
||||
mutable NCollection_Array1<Graphic3d_Vec2> myShadowRangeArray;
|
||||
mutable NCollection_Array1<OpenGl_Vec4> myClipPlaneArray;
|
||||
mutable NCollection_Array1<OpenGl_Vec4d> myClipPlaneArrayFfp;
|
||||
mutable NCollection_Array1<Standard_Integer> myClipChainArray;
|
||||
|
@@ -50,45 +50,43 @@ Standard_CString OpenGl_ShaderProgram::PredefinedKeywords[] =
|
||||
"occWorldViewMatrixInverseTranspose", // OpenGl_OCC_WORLD_VIEW_MATRIX_INVERSE_TRANSPOSE
|
||||
"occProjectionMatrixInverseTranspose", // OpenGl_OCC_PROJECTION_MATRIX_INVERSE_TRANSPOSE
|
||||
|
||||
"occClipPlaneEquations", // OpenGl_OCC_CLIP_PLANE_EQUATIONS
|
||||
"occClipPlaneChains", // OpenGl_OCC_CLIP_PLANE_CHAINS
|
||||
"occClipPlaneCount", // OpenGl_OCC_CLIP_PLANE_COUNT
|
||||
"occClipPlaneEquations", // OpenGl_OCC_CLIP_PLANE_EQUATIONS
|
||||
"occClipPlaneChains", // OpenGl_OCC_CLIP_PLANE_CHAINS
|
||||
"occClipPlaneCount", // OpenGl_OCC_CLIP_PLANE_COUNT
|
||||
|
||||
"occLightSourcesCount", // OpenGl_OCC_LIGHT_SOURCE_COUNT
|
||||
"occLightSourcesTypes", // OpenGl_OCC_LIGHT_SOURCE_TYPES
|
||||
"occLightSources", // OpenGl_OCC_LIGHT_SOURCE_PARAMS
|
||||
"occLightAmbient", // OpenGl_OCC_LIGHT_AMBIENT
|
||||
"occShadowMapSizeBias", // OpenGl_OCC_LIGHT_SHADOWMAP_SIZE_BIAS
|
||||
"occShadowMapSamplers", // OpenGl_OCC_LIGHT_SHADOWMAP_SAMPLERS,
|
||||
"occShadowCubeMapSamplers", // OpenGl_OCC_LIGHT_SHADOWCUBEMAP_SAMPLERS,
|
||||
"occShadowMapMatrices", // OpenGl_OCC_LIGHT_SHADOWMAP_MATRICES,
|
||||
"occShadowMapRangeParams", // OpenGl_OCC_LIGHT_SHADOWMAP_RANGEPARAMS,
|
||||
"occLightSourcesCount", // OpenGl_OCC_LIGHT_SOURCE_COUNT
|
||||
"occLightSourcesTypes", // OpenGl_OCC_LIGHT_SOURCE_TYPES
|
||||
"occLightSources", // OpenGl_OCC_LIGHT_SOURCE_PARAMS
|
||||
"occLightAmbient", // OpenGl_OCC_LIGHT_AMBIENT
|
||||
"occShadowMapSizeBias", // OpenGl_OCC_LIGHT_SHADOWMAP_SIZE_BIAS
|
||||
"occShadowMapSamplers", // OpenGl_OCC_LIGHT_SHADOWMAP_SAMPLERS,
|
||||
"occShadowMapMatrices", // OpenGl_OCC_LIGHT_SHADOWMAP_MATRICES,
|
||||
|
||||
"occTextureEnable", // OpenGl_OCCT_TEXTURE_ENABLE
|
||||
"occDistinguishingMode", // OpenGl_OCCT_DISTINGUISH_MODE
|
||||
"occPbrMaterial", // OpenGl_OCCT_PBR_MATERIAL
|
||||
"occCommonMaterial", // OpenGl_OCCT_COMMON_MATERIAL
|
||||
"occAlphaCutoff", // OpenGl_OCCT_ALPHA_CUTOFF
|
||||
"occColor", // OpenGl_OCCT_COLOR
|
||||
"occTextureEnable", // OpenGl_OCCT_TEXTURE_ENABLE
|
||||
"occDistinguishingMode", // OpenGl_OCCT_DISTINGUISH_MODE
|
||||
"occPbrMaterial", // OpenGl_OCCT_PBR_MATERIAL
|
||||
"occCommonMaterial", // OpenGl_OCCT_COMMON_MATERIAL
|
||||
"occAlphaCutoff", // OpenGl_OCCT_ALPHA_CUTOFF
|
||||
"occColor", // OpenGl_OCCT_COLOR
|
||||
|
||||
"occOitOutput", // OpenGl_OCCT_OIT_OUTPUT
|
||||
"occOitDepthFactor", // OpenGl_OCCT_OIT_DEPTH_FACTOR
|
||||
"occOitOutput", // OpenGl_OCCT_OIT_OUTPUT
|
||||
"occOitDepthFactor", // OpenGl_OCCT_OIT_DEPTH_FACTOR
|
||||
|
||||
"occTexTrsf2d", // OpenGl_OCCT_TEXTURE_TRSF2D
|
||||
"occPointSize", // OpenGl_OCCT_POINT_SIZE
|
||||
"occTexTrsf2d", // OpenGl_OCCT_TEXTURE_TRSF2D
|
||||
"occPointSize", // OpenGl_OCCT_POINT_SIZE
|
||||
|
||||
"occViewport", // OpenGl_OCCT_VIEWPORT
|
||||
"occLineWidth", // OpenGl_OCCT_LINE_WIDTH
|
||||
"occLineFeather", // OpenGl_OCCT_LINE_FEATHER
|
||||
"occStipplePattern", // OpenGl_OCCT_LINE_STIPPLE_PATTERN
|
||||
"occStippleFactor", // OpenGl_OCCT_LINE_STIPPLE_FACTOR
|
||||
"occWireframeColor", // OpenGl_OCCT_WIREFRAME_COLOR
|
||||
"occIsQuadMode", // OpenGl_OCCT_QUAD_MODE_STATE
|
||||
"occViewport", // OpenGl_OCCT_VIEWPORT
|
||||
"occLineWidth", // OpenGl_OCCT_LINE_WIDTH
|
||||
"occLineFeather", // OpenGl_OCCT_LINE_FEATHER
|
||||
"occStipplePattern", // OpenGl_OCCT_LINE_STIPPLE_PATTERN
|
||||
"occStippleFactor", // OpenGl_OCCT_LINE_STIPPLE_FACTOR
|
||||
"occWireframeColor", // OpenGl_OCCT_WIREFRAME_COLOR
|
||||
"occIsQuadMode", // OpenGl_OCCT_QUAD_MODE_STATE
|
||||
|
||||
"occOrthoScale", // OpenGl_OCCT_ORTHO_SCALE
|
||||
"occSilhouetteThickness", // OpenGl_OCCT_SILHOUETTE_THICKNESS
|
||||
"occOrthoScale", // OpenGl_OCCT_ORTHO_SCALE
|
||||
"occSilhouetteThickness", // OpenGl_OCCT_SILHOUETTE_THICKNESS
|
||||
|
||||
"occNbSpecIBLLevels" // OpenGl_OCCT_NB_SPEC_IBL_LEVELS
|
||||
"occNbSpecIBLLevels" // OpenGl_OCCT_NB_SPEC_IBL_LEVELS
|
||||
};
|
||||
|
||||
namespace
|
||||
@@ -167,7 +165,6 @@ OpenGl_ShaderProgram::OpenGl_ShaderProgram (const Handle(Graphic3d_ShaderProgram
|
||||
myShareCount(1),
|
||||
myNbLightsMax (0),
|
||||
myNbShadowMaps (0),
|
||||
myNbShadowCubeMaps (0),
|
||||
myNbClipPlanesMax (0),
|
||||
myNbFragOutputs (1),
|
||||
myTextureSetBits (Graphic3d_TextureSetBits_NONE),
|
||||
@@ -422,24 +419,15 @@ Standard_Boolean OpenGl_ShaderProgram::Initialize (const Handle(OpenGl_Context)&
|
||||
}
|
||||
|
||||
TCollection_AsciiString aHeaderConstants;
|
||||
myNbLightsMax = !myProxy.IsNull() ? myProxy->NbLightsMax() : 0;
|
||||
myNbShadowMaps = !myProxy.IsNull() ? myProxy->NbShadowMaps() : 0;
|
||||
myNbShadowCubeMaps = !myProxy.IsNull() ? myProxy->NbShadowCubeMaps() : 0;
|
||||
myNbClipPlanesMax = !myProxy.IsNull() ? myProxy->NbClipPlanesMax() : 0;
|
||||
myNbLightsMax = !myProxy.IsNull() ? myProxy->NbLightsMax() : 0;
|
||||
myNbShadowMaps = !myProxy.IsNull() ? myProxy->NbShadowMaps() : 0;
|
||||
myNbClipPlanesMax = !myProxy.IsNull() ? myProxy->NbClipPlanesMax() : 0;
|
||||
aHeaderConstants += TCollection_AsciiString("#define THE_MAX_LIGHTS ") + myNbLightsMax + "\n";
|
||||
aHeaderConstants += TCollection_AsciiString("#define THE_MAX_CLIP_PLANES ") + myNbClipPlanesMax + "\n";
|
||||
aHeaderConstants += TCollection_AsciiString("#define THE_NB_FRAG_OUTPUTS ") + myNbFragOutputs + "\n";
|
||||
if (myNbShadowMaps + myNbShadowCubeMaps > 0)
|
||||
{
|
||||
aHeaderConstants += TCollection_AsciiString("#define THE_NB_SHADOWMAPS ") + (myNbShadowMaps + myNbShadowCubeMaps) + "\n";
|
||||
}
|
||||
if (myNbShadowMaps > 0)
|
||||
{
|
||||
aHeaderConstants += TCollection_AsciiString("#define THE_NB_SHADOWMAPS2D ") + myNbShadowMaps + "\n";
|
||||
}
|
||||
if (myNbShadowCubeMaps > 0)
|
||||
{
|
||||
aHeaderConstants += TCollection_AsciiString("#define THE_NB_SHADOWMAPSCUBE ") + myNbShadowCubeMaps + "\n";
|
||||
aHeaderConstants += TCollection_AsciiString("#define THE_NB_SHADOWMAPS ") + myNbShadowMaps + "\n";
|
||||
}
|
||||
if (theCtx->caps->useZeroToOneDepth
|
||||
&& theCtx->arbClipControl)
|
||||
@@ -602,16 +590,7 @@ Standard_Boolean OpenGl_ShaderProgram::Initialize (const Handle(OpenGl_Context)&
|
||||
}
|
||||
SetUniform (theCtx, aLocSampler, myNbShadowMaps, &aShadowSamplers.front());
|
||||
}
|
||||
if (const OpenGl_ShaderUniformLocation aLocSampler = GetUniformLocation (theCtx, "occShadowCubeMapSamplers"))
|
||||
{
|
||||
std::vector<GLint> aShadowSamplers (myNbShadowCubeMaps);
|
||||
const GLint aSamplFrom = GLint(theCtx->ShadowCubeMapTexUnit()) - myNbShadowCubeMaps + 1;
|
||||
for (Standard_Integer aSamplerIter = 0; aSamplerIter < myNbShadowCubeMaps; ++aSamplerIter)
|
||||
{
|
||||
aShadowSamplers[aSamplerIter] = aSamplFrom + aSamplerIter;
|
||||
}
|
||||
SetUniform (theCtx, aLocSampler, myNbShadowCubeMaps, &aShadowSamplers.front());
|
||||
}
|
||||
|
||||
if (const OpenGl_ShaderUniformLocation aLocSampler = GetUniformLocation (theCtx, "occDepthPeelingDepth"))
|
||||
{
|
||||
SetUniform (theCtx, aLocSampler, GLint(theCtx->DepthPeelingDepthTexUnit()));
|
||||
|
@@ -57,11 +57,9 @@ enum OpenGl_StateVariable
|
||||
OpenGl_OCC_LIGHT_SOURCE_TYPES,
|
||||
OpenGl_OCC_LIGHT_SOURCE_PARAMS,
|
||||
OpenGl_OCC_LIGHT_AMBIENT,
|
||||
OpenGl_OCC_LIGHT_SHADOWMAP_SIZE_BIAS, // occShadowMapSizeBias
|
||||
OpenGl_OCC_LIGHT_SHADOWMAP_SAMPLERS, // occShadowMapSamplers
|
||||
OpenGl_OCC_LIGHT_SHADOWCUBEMAP_SAMPLERS, // occShadowCubeMapSamplers
|
||||
OpenGl_OCC_LIGHT_SHADOWMAP_MATRICES, // occShadowMapMatrices
|
||||
OpenGl_OCC_LIGHT_SHADOWMAP_RANGEPARAMS, // occShadowMapRangeParams
|
||||
OpenGl_OCC_LIGHT_SHADOWMAP_SIZE_BIAS,// occShadowMapSizeBias
|
||||
OpenGl_OCC_LIGHT_SHADOWMAP_SAMPLERS, // occShadowMapSamplers
|
||||
OpenGl_OCC_LIGHT_SHADOWMAP_MATRICES, // occShadowMapMatrices
|
||||
|
||||
// Material state
|
||||
OpenGl_OCCT_TEXTURE_ENABLE,
|
||||
@@ -285,12 +283,9 @@ public:
|
||||
//! to be used for initialization occLightSources (OpenGl_OCC_LIGHT_SOURCE_PARAMS).
|
||||
Standard_Integer NbLightsMax() const { return myNbLightsMax; }
|
||||
|
||||
//! Return the length of array of 2D shadow maps (THE_NB_SHADOWMAP2D); 0 by default.
|
||||
//! Return the length of array of shadow maps (THE_NB_SHADOWMAPS); 0 by default.
|
||||
Standard_Integer NbShadowMaps() const { return myNbShadowMaps; }
|
||||
|
||||
//! Return the length of array of shadow cube maps (THE_NB_SHADOWMAPCUBE); 0 by default.
|
||||
Standard_Integer NbShadowCubeMaps() const { return myNbShadowCubeMaps; }
|
||||
|
||||
//! Return the length of array of clipping planes (THE_MAX_CLIP_PLANES),
|
||||
//! to be used for initialization occClipPlaneEquations (OpenGl_OCC_CLIP_PLANE_EQUATIONS) and occClipPlaneChains (OpenGl_OCC_CLIP_PLANE_CHAINS).
|
||||
Standard_Integer NbClipPlanesMax() const { return myNbClipPlanesMax; }
|
||||
@@ -648,19 +643,18 @@ protected:
|
||||
|
||||
protected:
|
||||
|
||||
GLuint myProgramID; //!< Handle of OpenGL shader program
|
||||
OpenGl_ShaderList myShaderObjects; //!< List of attached shader objects
|
||||
Handle(Graphic3d_ShaderProgram) myProxy; //!< Proxy shader program (from application layer)
|
||||
Standard_Integer myShareCount; //!< program users count, initialized with 1 (already shared by one user)
|
||||
Standard_Integer myNbLightsMax; //!< length of array of light sources (THE_MAX_LIGHTS)
|
||||
Standard_Integer myNbShadowMaps; //!< length of array of shadow maps (THE_NB_SHADOWMAP2D)
|
||||
Standard_Integer myNbShadowCubeMaps; //!< length of array of shadow maps (THE_NB_SHADOWMAPCUBE)
|
||||
Standard_Integer myNbClipPlanesMax; //!< length of array of clipping planes (THE_MAX_CLIP_PLANES)
|
||||
Standard_Integer myNbFragOutputs; //!< length of array of Fragment Shader outputs (THE_NB_FRAG_OUTPUTS)
|
||||
Standard_Integer myTextureSetBits; //!< texture units declared within the program, @sa Graphic3d_TextureSetBits
|
||||
Graphic3d_RenderTransparentMethod myOitOutput; //!< flag indicating that Fragment Shader includes OIT outputs
|
||||
Standard_Boolean myHasAlphaTest; //!< flag indicating that Fragment Shader should perform alpha-test
|
||||
Standard_Boolean myHasTessShader; //!< flag indicating that program defines tessellation stage
|
||||
GLuint myProgramID; //!< Handle of OpenGL shader program
|
||||
OpenGl_ShaderList myShaderObjects; //!< List of attached shader objects
|
||||
Handle(Graphic3d_ShaderProgram) myProxy; //!< Proxy shader program (from application layer)
|
||||
Standard_Integer myShareCount; //!< program users count, initialized with 1 (already shared by one user)
|
||||
Standard_Integer myNbLightsMax; //!< length of array of light sources (THE_MAX_LIGHTS)
|
||||
Standard_Integer myNbShadowMaps; //!< length of array of shadow maps (THE_NB_SHADOWMAPS)
|
||||
Standard_Integer myNbClipPlanesMax; //!< length of array of clipping planes (THE_MAX_CLIP_PLANES)
|
||||
Standard_Integer myNbFragOutputs; //!< length of array of Fragment Shader outputs (THE_NB_FRAG_OUTPUTS)
|
||||
Standard_Integer myTextureSetBits;//!< texture units declared within the program, @sa Graphic3d_TextureSetBits
|
||||
Graphic3d_RenderTransparentMethod myOitOutput; //!< flag indicating that Fragment Shader includes OIT outputs
|
||||
Standard_Boolean myHasAlphaTest; //!< flag indicating that Fragment Shader should perform alpha-test
|
||||
Standard_Boolean myHasTessShader; //!< flag indicating that program defines tessellation stage
|
||||
|
||||
protected:
|
||||
|
||||
|
@@ -83,8 +83,7 @@ const Handle(OpenGl_Texture)& OpenGl_ShadowMap::Texture() const
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
bool OpenGl_ShadowMap::UpdateCamera (const Graphic3d_CView& theView,
|
||||
const gp_XYZ* theOrigin,
|
||||
const Standard_Integer theFace)
|
||||
const gp_XYZ* theOrigin)
|
||||
{
|
||||
const Bnd_Box aMinMaxBox = theOrigin == NULL ? theView.MinMaxValues (false) : Bnd_Box(); // applicative min max boundaries
|
||||
const Bnd_Box aGraphicBox = aMinMaxBox;
|
||||
@@ -135,18 +134,7 @@ bool OpenGl_ShadowMap::UpdateCamera (const Graphic3d_CView& theView,
|
||||
case Graphic3d_TypeOfLightSource_Positional:
|
||||
{
|
||||
// render into cubemap shadowmap texture
|
||||
myShadowCamera->SetZeroToOneDepth (theView.Camera()->IsZeroToOneDepth());
|
||||
myShadowCamera->SetProjectionType (Graphic3d_Camera::Projection_Perspective);
|
||||
myShadowCamera->SetFOVy (90.0);
|
||||
myShadowCamera->MoveEyeTo (myShadowLight->Position());
|
||||
// calculate direction and up vector for the given cubemap face
|
||||
myShadowCamera->SetDirectionFromEye (Graphic3d_CubeMap::GetCubeDirection ((Graphic3d_CubeMapSide)theFace));
|
||||
myShadowCamera->SetUp (Graphic3d_CubeMap::GetCubeUp ((Graphic3d_CubeMapSide)theFace));
|
||||
// setup znear and zfar (default value)
|
||||
myShadowCamera->SetZRange (1.0, myShadowLight->Range() <= 1.0 ? Graphic3d_Camera::GetDefaultZFar() : myShadowLight->Range());
|
||||
myLightMatrix = myShadowCamera->ProjectionMatrixF() * myShadowCamera->OrientationMatrixF();
|
||||
|
||||
return true;
|
||||
return false; // not implemented
|
||||
}
|
||||
case Graphic3d_TypeOfLightSource_Spot:
|
||||
{
|
||||
|
@@ -76,10 +76,8 @@ public:
|
||||
//! Compute camera.
|
||||
//! @param theView [in] active view
|
||||
//! @param theOrigin [in] when not-NULL - displace shadow map camera to specified Z-Layer origin
|
||||
//! @param theFace [in] if light is point light calculate for given cubemap face index
|
||||
Standard_EXPORT bool UpdateCamera (const Graphic3d_CView& theView,
|
||||
const gp_XYZ* theOrigin = NULL,
|
||||
const Standard_Integer theFace = -1);
|
||||
const gp_XYZ* theOrigin = NULL);
|
||||
|
||||
private:
|
||||
|
||||
|
@@ -443,6 +443,7 @@ bool OpenGl_Texture::Init (const Handle(OpenGl_Context)& theCtx,
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
theCtx->core11fwd->glTexImage2D (GL_TEXTURE_2D, 0, anIntFormat,
|
||||
theSizeXYZ.x(), theSizeXYZ.y(), 0,
|
||||
theFormat.PixelFormat(), theFormat.DataType(), aDataPtr);
|
||||
@@ -519,48 +520,9 @@ bool OpenGl_Texture::Init (const Handle(OpenGl_Context)& theCtx,
|
||||
}
|
||||
case Graphic3d_TypeOfTexture_CUBEMAP:
|
||||
{
|
||||
Bind (theCtx);
|
||||
applyDefaultSamplerParams (theCtx);
|
||||
if (theCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGL)
|
||||
{
|
||||
// use proxy to check texture could be created or not
|
||||
theCtx->core11fwd->glTexImage2D (GL_PROXY_TEXTURE_CUBE_MAP, 0, anIntFormat,
|
||||
theSizeXYZ.x(), theSizeXYZ.y(), 0,
|
||||
theFormat.PixelFormat(), theFormat.DataType(), NULL);
|
||||
theCtx->core11fwd->glGetTexLevelParameteriv (GL_PROXY_TEXTURE_CUBE_MAP, 0, GL_TEXTURE_WIDTH, &aTestWidth);
|
||||
theCtx->core11fwd->glGetTexLevelParameteriv (GL_PROXY_TEXTURE_CUBE_MAP, 0, GL_TEXTURE_HEIGHT, &aTestHeight);
|
||||
theCtx->core11fwd->glGetTexLevelParameteriv (GL_PROXY_TEXTURE_CUBE_MAP, 0, GL_TEXTURE_INTERNAL_FORMAT, &mySizedFormat);
|
||||
if (aTestWidth == 0 || aTestHeight == 0)
|
||||
{
|
||||
// no memory or broken input parameters
|
||||
Unbind(theCtx);
|
||||
Release(theCtx.get());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
for (Standard_Integer aCubeIndex = 0; aCubeIndex < 6; ++aCubeIndex)
|
||||
{
|
||||
theCtx->core11fwd->glTexImage2D (GLenum(GL_TEXTURE_CUBE_MAP_POSITIVE_X + aCubeIndex), 0, anIntFormat,
|
||||
theSizeXYZ.x(), theSizeXYZ.y(), 0,
|
||||
theFormat.PixelFormat(), theFormat.DataType(), aDataPtr);
|
||||
GLenum anErr = theCtx->core11fwd->glGetError();
|
||||
if (anErr != GL_NO_ERROR)
|
||||
{
|
||||
theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH,
|
||||
TCollection_AsciiString ("Error: Cubemap texture ") + theSizeXYZ.x() + "x" + theSizeXYZ.y()
|
||||
+ " IF: " + OpenGl_TextureFormat::FormatFormat (anIntFormat)
|
||||
+ " PF: " + OpenGl_TextureFormat::FormatFormat (theFormat.PixelFormat())
|
||||
+ " DT: " + OpenGl_TextureFormat::FormatDataType (theFormat.DataType())
|
||||
+ " can not be created with error " + OpenGl_Context::FormatGlError (anErr)
|
||||
+ " [" + myResourceId + "]");
|
||||
Unbind (theCtx);
|
||||
Release (theCtx.get());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
mySize.SetValues (theSizeXYZ.xy(), 1);
|
||||
break;
|
||||
Unbind (theCtx);
|
||||
Release (theCtx.get());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1583,73 +1583,31 @@ bool OpenGl_View::prepareFrameBuffers (Graphic3d_Camera::Projection& theProj)
|
||||
&& myRenderParams.Method != Graphic3d_RM_RAYTRACING;
|
||||
if (toUseShadowMap)
|
||||
{
|
||||
Standard_Integer aNbShadows = 0;
|
||||
Standard_Integer aNbPointShadows = 0;
|
||||
Standard_Boolean aToReviewLights = Standard_False;
|
||||
for (Graphic3d_LightSet::Iterator aLightIter(myLights); aLightIter.More(); aLightIter.Next())
|
||||
{
|
||||
Handle(Graphic3d_CLight) aLight = aLightIter.Value();
|
||||
if (aLight->Type() == Graphic3d_TypeOfLightSource_Positional)
|
||||
{
|
||||
// point lights shadows are not currently supported on opengles 2.0
|
||||
if (aCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES
|
||||
&& aCtx->VersionMajor() <= 2)
|
||||
{
|
||||
aLight->SetCastShadows (Standard_False);
|
||||
aToReviewLights = Standard_True;
|
||||
}
|
||||
else if (aLight->ToCastShadows())
|
||||
{
|
||||
++aNbPointShadows;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (aLight->ToCastShadows())
|
||||
{
|
||||
++aNbShadows;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (aToReviewLights)
|
||||
{
|
||||
myLights->UpdateRevision();
|
||||
}
|
||||
if (myShadowMaps->Size() != myLights->NbCastShadows())
|
||||
{
|
||||
myShadowMaps->Release (aCtx.get());
|
||||
myShadowMaps->Resize (0, myLights->NbCastShadows() - 1, true);
|
||||
}
|
||||
const GLint aSampleFrom = GLint(aCtx->ShadowMapTexUnit()) - myLights->NbCastShadows() + aNbPointShadows + 1;
|
||||
const GLint aSampleCubeFrom = GLint(aCtx->ShadowCubeMapTexUnit()) - aNbPointShadows + 1;
|
||||
Standard_Integer aLightIndex = 0;
|
||||
Standard_Integer a2DShadowIndex = 0;
|
||||
Standard_Integer aCubeShadowIndex = 0;
|
||||
for (Graphic3d_LightSet::Iterator aLightIter(myLights); aLightIter.More(); aLightIter.Next())
|
||||
|
||||
const GLint aSamplFrom = GLint(aCtx->ShadowMapTexUnit()) - myLights->NbCastShadows() + 1;
|
||||
for (Standard_Integer aShadowIter = 0; aShadowIter < myShadowMaps->Size(); ++aShadowIter)
|
||||
{
|
||||
Handle(Graphic3d_CLight) aLight = aLightIter.Value();
|
||||
if (aLight->ToCastShadows())
|
||||
Handle(OpenGl_ShadowMap)& aShadow = myShadowMaps->ChangeValue (aShadowIter);
|
||||
if (aShadow.IsNull())
|
||||
{
|
||||
Handle(OpenGl_ShadowMap)& aShadow = myShadowMaps->ChangeValue (aLightIndex++);
|
||||
if (aShadow.IsNull())
|
||||
aShadow = new OpenGl_ShadowMap();
|
||||
}
|
||||
aShadow->SetShadowMapBias (myRenderParams.ShadowMapBias);
|
||||
aShadow->Texture()->Sampler()->Parameters()->SetTextureUnit ((Graphic3d_TextureUnit )(aSamplFrom + aShadowIter));
|
||||
|
||||
const Handle(OpenGl_FrameBuffer)& aShadowFbo = aShadow->FrameBuffer();
|
||||
if (aShadowFbo->GetVPSizeX() != myRenderParams.ShadowMapResolution
|
||||
&& toUseShadowMap)
|
||||
{
|
||||
OpenGl_ColorFormats aDummy;
|
||||
if (!aShadowFbo->Init (aCtx, Graphic3d_Vec2i (myRenderParams.ShadowMapResolution), aDummy, myFboDepthFormat, 0))
|
||||
{
|
||||
aShadow = new OpenGl_ShadowMap();
|
||||
}
|
||||
aShadow->SetShadowMapBias (myRenderParams.ShadowMapBias);
|
||||
Standard_Integer aTexUnit = aLight->Type() == Graphic3d_TypeOfLightSource_Positional
|
||||
? aSampleCubeFrom + aCubeShadowIndex++
|
||||
: aSampleFrom + a2DShadowIndex++;
|
||||
aShadow->Texture()->Sampler()->Parameters()->SetTextureUnit ((Graphic3d_TextureUnit)(aTexUnit));
|
||||
const Handle(OpenGl_FrameBuffer)& aShadowFbo = aShadow->FrameBuffer();
|
||||
if (aShadowFbo->GetVPSizeX() != myRenderParams.ShadowMapResolution
|
||||
&& toUseShadowMap)
|
||||
{
|
||||
OpenGl_ColorFormats aDummy;
|
||||
if (!aShadowFbo->Init (aCtx, Graphic3d_Vec2i(myRenderParams.ShadowMapResolution), aDummy, myFboDepthFormat, 0,
|
||||
aLight->Type() == Graphic3d_TypeOfLightSource_Positional))
|
||||
{
|
||||
toUseShadowMap = false;
|
||||
}
|
||||
toUseShadowMap = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1730,22 +1688,7 @@ void OpenGl_View::Redraw()
|
||||
{
|
||||
const Handle(OpenGl_ShadowMap)& aShadowMap = myShadowMaps->ChangeValue (aShadowIndex);
|
||||
aShadowMap->SetLightSource (aLight);
|
||||
if (aLight->Type() == Graphic3d_TypeOfLightSource_Positional)
|
||||
{
|
||||
// cube shadow maps are not currently working on opengles 2.0.
|
||||
if (aCtx->GraphicsLibrary() != Aspect_GraphicsLibrary_OpenGLES
|
||||
|| aCtx->VersionMajor() >= 3)
|
||||
{
|
||||
for (Standard_Integer aCubeFace = 0; aCubeFace < 6; ++aCubeFace)
|
||||
{
|
||||
renderShadowMap (aShadowMap, aCubeFace);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
renderShadowMap (aShadowMap, -1);
|
||||
}
|
||||
renderShadowMap (aShadowMap);
|
||||
++aShadowIndex;
|
||||
}
|
||||
}
|
||||
@@ -2354,11 +2297,10 @@ bool OpenGl_View::blitSubviews (const Graphic3d_Camera::Projection ,
|
||||
//function : renderShadowMap
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void OpenGl_View::renderShadowMap (const Handle(OpenGl_ShadowMap)& theShadowMap,
|
||||
const Standard_Integer theFace)
|
||||
void OpenGl_View::renderShadowMap (const Handle(OpenGl_ShadowMap)& theShadowMap)
|
||||
{
|
||||
const Handle(OpenGl_Context)& aCtx = myWorkspace->GetGlContext();
|
||||
if (!theShadowMap->UpdateCamera (*this, NULL, theFace))
|
||||
if (!theShadowMap->UpdateCamera (*this))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -2377,14 +2319,7 @@ void OpenGl_View::renderShadowMap (const Handle(OpenGl_ShadowMap)& theShadowMap,
|
||||
aCtx->ShaderManager()->SetShadingModel (Graphic3d_TypeOfShadingModel_Unlit);
|
||||
|
||||
const Handle(OpenGl_FrameBuffer)& aShadowBuffer = theShadowMap->FrameBuffer();
|
||||
if (theFace < 0)
|
||||
{
|
||||
aShadowBuffer->BindBuffer (aCtx);
|
||||
}
|
||||
else
|
||||
{
|
||||
aShadowBuffer->BindBufferCube (aCtx, theFace);
|
||||
}
|
||||
aShadowBuffer->BindBuffer (aCtx);
|
||||
aShadowBuffer->SetupViewport (aCtx);
|
||||
|
||||
aCtx->SetColorMask (false);
|
||||
@@ -2394,9 +2329,9 @@ void OpenGl_View::renderShadowMap (const Handle(OpenGl_ShadowMap)& theShadowMap,
|
||||
myWorkspace->UseZBuffer() = true;
|
||||
myWorkspace->UseDepthWrite() = true;
|
||||
aCtx->core11fwd->glDepthFunc (GL_LEQUAL);
|
||||
aCtx->core11fwd->glDepthMask (GL_TRUE);
|
||||
aCtx->core11fwd->glEnable (GL_DEPTH_TEST);
|
||||
aCtx->core11fwd->glClearDepth (1.0);
|
||||
aCtx->core11fwd->glDepthMask (GL_TRUE);
|
||||
aCtx->core11fwd->glClear (GL_DEPTH_BUFFER_BIT);
|
||||
|
||||
Graphic3d_Camera::Projection aProjection = theShadowMap->LightSource()->Type() == Graphic3d_TypeOfLightSource_Directional
|
||||
@@ -2410,9 +2345,10 @@ void OpenGl_View::renderShadowMap (const Handle(OpenGl_ShadowMap)& theShadowMap,
|
||||
myWorkspace->ResetAppliedAspect();
|
||||
aCtx->BindProgram (Handle(OpenGl_ShaderProgram)());
|
||||
|
||||
//Image_AlienPixMap anImage; anImage.InitZero (Image_Format_GrayF, aShadowBuffer->GetVPSizeX(), aShadowBuffer->GetVPSizeY());
|
||||
//OpenGl_FrameBuffer::BufferDump (aCtx, aShadowBuffer, anImage, Graphic3d_BT_Depth);
|
||||
//anImage.Save (TCollection_AsciiString("shadow") + theShadowMap->Texture()->Sampler()->Parameters()->TextureUnit() + ".png");
|
||||
//Image_AlienPixMap anImage; anImage.InitZero (Image_Format_Gray, aShadowBuffer->GetVPSizeX(), aShadowBuffer->GetVPSizeY());
|
||||
//OpenGl_FrameBuffer::BufferDump (aCtx, aShadowBuffer, anImage, Graphic3d_BT_Depth);
|
||||
//anImage.Save (TCollection_AsciiString ("shadow") + theShadowMap->Texture()->Sampler()->Parameters()->TextureUnit() + ".png");
|
||||
|
||||
bindDefaultFbo();
|
||||
}
|
||||
|
||||
|
@@ -354,9 +354,7 @@ protected: //! @name Rendering of GL graphics (with prepared drawing buffer).
|
||||
|
||||
//! Renders the graphical contents of the view into the preprepared shadowmap framebuffer.
|
||||
//! @param theShadowMap [in] the framebuffer for rendering shadowmap.
|
||||
//! @param theFace [in] value for cubemap face.
|
||||
Standard_EXPORT virtual void renderShadowMap (const Handle(OpenGl_ShadowMap)& theShadowMap,
|
||||
const Standard_Integer theFace);
|
||||
Standard_EXPORT virtual void renderShadowMap (const Handle(OpenGl_ShadowMap)& theShadowMap);
|
||||
|
||||
//! Renders the graphical contents of the view into the preprepared window or framebuffer.
|
||||
//! @param theProjection [in] the projection that should be used for rendering.
|
||||
|
@@ -772,6 +772,17 @@ public:
|
||||
myFaceBoundaryDraw = false;
|
||||
}
|
||||
|
||||
//! Return flag value for boundary shading edge color override
|
||||
Standard_Boolean FaceBoundaryShadingOverride() const
|
||||
{
|
||||
return myHasOwnFaceBoundaryDraw || myLink.IsNull()
|
||||
? myFaceBoundaryShadingOverride
|
||||
: myLink->FaceBoundaryShadingOverride();
|
||||
}
|
||||
|
||||
//! Return flag value for boundary shading edge color override
|
||||
void SetFaceBoundaryShadingOverride (Standard_Boolean theFlag) { myFaceBoundaryShadingOverride = theFlag; }
|
||||
|
||||
//! Returns true if the drawer has its own attribute for face boundaries upper edge continuity class that overrides the one in the link.
|
||||
Standard_Boolean HasOwnFaceBoundaryUpperContinuity() const { return myFaceBoundaryUpperContinuity != -1; }
|
||||
|
||||
@@ -1008,6 +1019,7 @@ protected:
|
||||
Standard_Integer myFaceBoundaryUpperContinuity; //!< the most edge continuity class (GeomAbs_Shape) to be included to face boundaries presentation, or -1 if undefined
|
||||
Standard_Boolean myFaceBoundaryDraw;
|
||||
Standard_Boolean myHasOwnFaceBoundaryDraw;
|
||||
Standard_Boolean myFaceBoundaryShadingOverride;
|
||||
|
||||
Handle(Prs3d_DimensionAspect) myDimensionAspect;
|
||||
Prs3d_DimensionUnits myDimensionModelUnits;
|
||||
|
@@ -98,6 +98,8 @@
|
||||
#include <RWStepBasic_RWExternalIdentificationAssignment.hxx>
|
||||
#include <RWStepBasic_RWExternallyDefinedItem.hxx>
|
||||
#include <RWStepBasic_RWGeneralProperty.hxx>
|
||||
#include <RWStepBasic_RWGeneralPropertyAssociation.hxx>
|
||||
#include <RWStepBasic_RWGeneralPropertyRelationship.hxx>
|
||||
#include <RWStepBasic_RWGroupRelationship.hxx>
|
||||
#include <RWStepBasic_RWIdentificationAssignment.hxx>
|
||||
#include <RWStepBasic_RWIdentificationRole.hxx>
|
||||
@@ -570,6 +572,8 @@
|
||||
#include <StepBasic_ExternalIdentificationAssignment.hxx>
|
||||
#include <StepBasic_ExternalSource.hxx>
|
||||
#include <StepBasic_GeneralProperty.hxx>
|
||||
#include <StepBasic_GeneralPropertyAssociation.hxx>
|
||||
#include <StepBasic_GeneralPropertyRelationship.hxx>
|
||||
#include <StepBasic_Group.hxx>
|
||||
#include <StepBasic_GroupRelationship.hxx>
|
||||
#include <StepBasic_IdentificationAssignment.hxx>
|
||||
@@ -1188,7 +1192,9 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_GeneralModule,StepData_GeneralModule)
|
||||
#include <StepDimTol_GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol.hxx>
|
||||
#include <StepRepr_CompGroupShAspAndCompShAspAndDatumFeatAndShAsp.hxx>
|
||||
#include <StepRepr_CompShAspAndDatumFeatAndShAsp.hxx>
|
||||
#include <StepRepr_BooleanRepresentationItem.hxx>
|
||||
#include <StepRepr_IntegerRepresentationItem.hxx>
|
||||
#include <StepRepr_RealRepresentationItem.hxx>
|
||||
#include <StepRepr_ValueRepresentationItem.hxx>
|
||||
#include <StepAP242_DraughtingModelItemAssociation.hxx>
|
||||
#include <StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.hxx>
|
||||
@@ -5876,6 +5882,20 @@ void RWStepAP214_GeneralModule::FillSharedCase(const Standard_Integer CN,
|
||||
aTool.Share(anEnt, iter);
|
||||
}
|
||||
break;
|
||||
case 820:
|
||||
{
|
||||
DeclareAndCast(StepBasic_GeneralPropertyAssociation, anEnt, ent);
|
||||
RWStepBasic_RWGeneralPropertyAssociation aTool;
|
||||
aTool.Share(anEnt, iter);
|
||||
}
|
||||
break;
|
||||
case 821:
|
||||
{
|
||||
DeclareAndCast(StepBasic_GeneralPropertyRelationship, anEnt, ent);
|
||||
RWStepBasic_RWGeneralPropertyRelationship aTool;
|
||||
aTool.Share(anEnt, iter);
|
||||
}
|
||||
break;
|
||||
default : break;
|
||||
}
|
||||
}
|
||||
@@ -8185,6 +8205,18 @@ Standard_Boolean RWStepAP214_GeneralModule::NewVoid
|
||||
case 819:
|
||||
ent = new StepVisual_TriangulatedSurfaceSet;
|
||||
break;
|
||||
case 820:
|
||||
ent = new StepBasic_GeneralPropertyAssociation;
|
||||
break;
|
||||
case 821:
|
||||
ent = new StepBasic_GeneralPropertyRelationship;
|
||||
break;
|
||||
case 822:
|
||||
ent = new StepRepr_BooleanRepresentationItem;
|
||||
break;
|
||||
case 823:
|
||||
ent = new StepRepr_RealRepresentationItem;
|
||||
break;
|
||||
|
||||
default:
|
||||
return Standard_False;
|
||||
|
@@ -188,6 +188,8 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_ReadWriteModule,StepData_ReadWriteModule)
|
||||
#include <StepShape_GeometricallyBoundedWireframeShapeRepresentation.hxx>
|
||||
#include <StepRepr_GlobalUncertaintyAssignedContext.hxx>
|
||||
#include <StepRepr_GlobalUnitAssignedContext.hxx>
|
||||
#include <StepBasic_GeneralPropertyAssociation.hxx>
|
||||
#include <StepBasic_GeneralPropertyRelationship.hxx>
|
||||
#include <StepBasic_Group.hxx>
|
||||
#include <StepBasic_GroupRelationship.hxx>
|
||||
#include <StepShape_HalfSpaceSolid.hxx>
|
||||
@@ -622,6 +624,8 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_ReadWriteModule,StepData_ReadWriteModule)
|
||||
#include <RWStepShape_RWGeometricallyBoundedWireframeShapeRepresentation.hxx>
|
||||
#include <RWStepRepr_RWGlobalUncertaintyAssignedContext.hxx>
|
||||
#include <RWStepRepr_RWGlobalUnitAssignedContext.hxx>
|
||||
#include <RWStepBasic_RWGeneralPropertyAssociation.hxx>
|
||||
#include <RWStepBasic_RWGeneralPropertyRelationship.hxx>
|
||||
#include <RWStepBasic_RWGroup.hxx>
|
||||
#include <RWStepBasic_RWGroupRelationship.hxx>
|
||||
#include <RWStepShape_RWHalfSpaceSolid.hxx>
|
||||
@@ -1355,7 +1359,9 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_ReadWriteModule,StepData_ReadWriteModule)
|
||||
#include <RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndUneqDisGeoTol.hxx>
|
||||
#include <RWStepRepr_RWCompGroupShAspAndCompShAspAndDatumFeatAndShAsp.hxx>
|
||||
#include <RWStepRepr_RWCompShAspAndDatumFeatAndShAsp.hxx>
|
||||
#include <RWStepRepr_RWBooleanRepresentationItem.hxx>
|
||||
#include <RWStepRepr_RWIntegerRepresentationItem.hxx>
|
||||
#include <RWStepRepr_RWRealRepresentationItem.hxx>
|
||||
#include <RWStepRepr_RWValueRepresentationItem.hxx>
|
||||
#include <RWStepRepr_RWValueRepresentationItem.hxx>
|
||||
#include <RWStepAP242_RWDraughtingModelItemAssociation.hxx>
|
||||
@@ -1406,7 +1412,9 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_ReadWriteModule,StepData_ReadWriteModule)
|
||||
#include <StepDimTol_GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol.hxx>
|
||||
#include <StepRepr_CompGroupShAspAndCompShAspAndDatumFeatAndShAsp.hxx>
|
||||
#include <StepRepr_CompShAspAndDatumFeatAndShAsp.hxx>
|
||||
#include <StepRepr_BooleanRepresentationItem.hxx>
|
||||
#include <StepRepr_IntegerRepresentationItem.hxx>
|
||||
#include <StepRepr_RealRepresentationItem.hxx>
|
||||
#include <StepRepr_ValueRepresentationItem.hxx>
|
||||
#include <StepAP242_DraughtingModelItemAssociation.hxx>
|
||||
#include <StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.hxx>
|
||||
@@ -2352,6 +2360,10 @@ static TCollection_AsciiString Reco_ComplexTriangulatedSurfaceSet("COMPLEX_TRIAN
|
||||
static TCollection_AsciiString Reco_CubicBezierTessellatedEdge("CUBIC_BEZIER_TESSELLATED_EDGE");
|
||||
static TCollection_AsciiString Reco_CubicBezierTriangulatedFace("CUBIC_BEZIER_TRIANGULATED_FACE");
|
||||
static TCollection_AsciiString Reco_TriangulatedSurfaceSet("TRIANGULATED_SURFACE_SET");
|
||||
static TCollection_AsciiString Reco_GeneralPropertyAssociation("GENERAL_PROPERTY_ASSOCIATION");
|
||||
static TCollection_AsciiString Reco_GeneralPropertyRelationship("GENERAL_PROPERTY_RELATIONSHIP");
|
||||
static TCollection_AsciiString Reco_BooleanRepresentationItem("BOOLEAN_REPRESENTATION_ITEM");
|
||||
static TCollection_AsciiString Reco_RealRepresentationItem("REAL_REPRESENTATION_ITEM");
|
||||
|
||||
// -- Definition of the libraries --
|
||||
|
||||
@@ -3109,6 +3121,10 @@ RWStepAP214_ReadWriteModule::RWStepAP214_ReadWriteModule ()
|
||||
typenums.Bind(Reco_CubicBezierTessellatedEdge, 817);
|
||||
typenums.Bind(Reco_CubicBezierTriangulatedFace, 818);
|
||||
typenums.Bind(Reco_TriangulatedSurfaceSet, 819);
|
||||
typenums.Bind(Reco_GeneralPropertyAssociation, 820);
|
||||
typenums.Bind(Reco_GeneralPropertyRelationship, 821);
|
||||
typenums.Bind(Reco_BooleanRepresentationItem, 822);
|
||||
typenums.Bind(Reco_RealRepresentationItem, 823);
|
||||
|
||||
|
||||
// SHORT NAMES
|
||||
@@ -5097,6 +5113,10 @@ const TCollection_AsciiString& RWStepAP214_ReadWriteModule::StepType
|
||||
case 817: return Reco_CubicBezierTessellatedEdge;
|
||||
case 818: return Reco_CubicBezierTriangulatedFace;
|
||||
case 819: return Reco_TriangulatedSurfaceSet;
|
||||
case 820: return Reco_GeneralPropertyAssociation;
|
||||
case 821: return Reco_GeneralPropertyRelationship;
|
||||
case 822: return Reco_BooleanRepresentationItem;
|
||||
case 823: return Reco_RealRepresentationItem;
|
||||
default : return PasReco;
|
||||
}
|
||||
}
|
||||
@@ -10706,6 +10726,34 @@ void RWStepAP214_ReadWriteModule::ReadStep(const Standard_Integer CN,
|
||||
aTool.ReadStep(data, num, ach, anEnt);
|
||||
}
|
||||
break;
|
||||
case 820:
|
||||
{
|
||||
DeclareAndCast(StepBasic_GeneralPropertyAssociation, anEnt, ent);
|
||||
RWStepBasic_RWGeneralPropertyAssociation aTool;
|
||||
aTool.ReadStep(data, num, ach, anEnt);
|
||||
}
|
||||
break;
|
||||
case 821:
|
||||
{
|
||||
DeclareAndCast(StepBasic_GeneralPropertyRelationship, anEnt, ent);
|
||||
RWStepBasic_RWGeneralPropertyRelationship aTool;
|
||||
aTool.ReadStep(data, num, ach, anEnt);
|
||||
}
|
||||
break;
|
||||
case 822:
|
||||
{
|
||||
DeclareAndCast(StepRepr_BooleanRepresentationItem, anent, ent);
|
||||
RWStepRepr_RWBooleanRepresentationItem aTool;
|
||||
aTool.ReadStep(data, num, ach, anent);
|
||||
}
|
||||
break;
|
||||
case 823:
|
||||
{
|
||||
DeclareAndCast(StepRepr_RealRepresentationItem, anent, ent);
|
||||
RWStepRepr_RWRealRepresentationItem aTool;
|
||||
aTool.ReadStep(data, num, ach, anent);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
ach->AddFail("Type Mismatch when reading - Entity");
|
||||
}
|
||||
@@ -16257,6 +16305,34 @@ void RWStepAP214_ReadWriteModule::WriteStep(const Standard_Integer CN,
|
||||
aTool.WriteStep(SW, anEnt);
|
||||
}
|
||||
break;
|
||||
case 820:
|
||||
{
|
||||
DeclareAndCast(StepBasic_GeneralPropertyAssociation, anEnt, ent);
|
||||
RWStepBasic_RWGeneralPropertyAssociation aTool;
|
||||
aTool.WriteStep(SW, anEnt);
|
||||
}
|
||||
break;
|
||||
case 821:
|
||||
{
|
||||
DeclareAndCast(StepBasic_GeneralPropertyRelationship, anEnt, ent);
|
||||
RWStepBasic_RWGeneralPropertyRelationship aTool;
|
||||
aTool.WriteStep(SW, anEnt);
|
||||
}
|
||||
break;
|
||||
case 822:
|
||||
{
|
||||
DeclareAndCast(StepRepr_BooleanRepresentationItem, anent, ent);
|
||||
RWStepRepr_RWBooleanRepresentationItem aTool;
|
||||
aTool.WriteStep(SW, anent);
|
||||
}
|
||||
break;
|
||||
case 823:
|
||||
{
|
||||
DeclareAndCast(StepRepr_RealRepresentationItem, anent, ent);
|
||||
RWStepRepr_RWRealRepresentationItem aTool;
|
||||
aTool.WriteStep(SW, anent);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
@@ -108,6 +108,10 @@ RWStepBasic_RWExternalSource.cxx
|
||||
RWStepBasic_RWExternalSource.hxx
|
||||
RWStepBasic_RWGeneralProperty.cxx
|
||||
RWStepBasic_RWGeneralProperty.hxx
|
||||
RWStepBasic_RWGeneralPropertyAssociation.cxx
|
||||
RWStepBasic_RWGeneralPropertyAssociation.hxx
|
||||
RWStepBasic_RWGeneralPropertyRelationship.cxx
|
||||
RWStepBasic_RWGeneralPropertyRelationship.hxx
|
||||
RWStepBasic_RWGroup.cxx
|
||||
RWStepBasic_RWGroup.hxx
|
||||
RWStepBasic_RWGroupAssignment.cxx
|
||||
|
87
src/RWStepBasic/RWStepBasic_RWGeneralPropertyAssociation.cxx
Normal file
87
src/RWStepBasic/RWStepBasic_RWGeneralPropertyAssociation.cxx
Normal file
@@ -0,0 +1,87 @@
|
||||
// Copyright (c) 2024 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
#include <RWStepBasic_RWGeneralPropertyAssociation.hxx>
|
||||
#include <StepBasic_GeneralProperty.hxx>
|
||||
#include <StepBasic_GeneralPropertyAssociation.hxx>
|
||||
#include <StepData_StepReaderData.hxx>
|
||||
#include <StepData_StepWriter.hxx>
|
||||
#include <StepRepr_PropertyDefinition.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : RWStepBasic_RWGeneralPropertyAssociation
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
RWStepBasic_RWGeneralPropertyAssociation::RWStepBasic_RWGeneralPropertyAssociation()
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ReadStep
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void RWStepBasic_RWGeneralPropertyAssociation::ReadStep(const Handle(StepData_StepReaderData)& theData,
|
||||
const Standard_Integer theNum,
|
||||
Handle(Interface_Check)& theAch,
|
||||
const Handle(StepBasic_GeneralPropertyAssociation)& theEnt) const
|
||||
{
|
||||
// Check number of parameters
|
||||
if (!theData->CheckNbParams(theNum, 4, theAch, "general_property_association")) return;
|
||||
|
||||
Handle(TCollection_HAsciiString) aName;
|
||||
theData->ReadString(theNum, 1, "name", theAch, aName);
|
||||
|
||||
Handle(TCollection_HAsciiString) aDescription;
|
||||
theData->ReadString(theNum, 2, "description", theAch, aDescription);
|
||||
|
||||
Handle(StepBasic_GeneralProperty) aGeneralProperty;
|
||||
theData->ReadEntity(theNum, 3, "base_definition", theAch, STANDARD_TYPE(StepBasic_GeneralProperty), aGeneralProperty);
|
||||
|
||||
Handle(StepRepr_PropertyDefinition) aPropertyDefinition;
|
||||
theData->ReadEntity(theNum, 4, "derived_definition", theAch, STANDARD_TYPE(StepRepr_PropertyDefinition), aPropertyDefinition);
|
||||
|
||||
// Initialize entity
|
||||
theEnt->Init(aName,
|
||||
aDescription,
|
||||
aGeneralProperty,
|
||||
aPropertyDefinition);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : WriteStep
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void RWStepBasic_RWGeneralPropertyAssociation::WriteStep (StepData_StepWriter& theSW,
|
||||
const Handle(StepBasic_GeneralPropertyAssociation) &theEnt) const
|
||||
{
|
||||
theSW.Send(theEnt->Name());
|
||||
|
||||
theSW.Send(theEnt->Description());
|
||||
|
||||
theSW.Send(theEnt->GeneralProperty());
|
||||
|
||||
theSW.Send(theEnt->PropertyDefinition());
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Share
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void RWStepBasic_RWGeneralPropertyAssociation::Share(const Handle(StepBasic_GeneralPropertyAssociation)& theEnt,
|
||||
Interface_EntityIterator& theIter) const
|
||||
{
|
||||
theIter.AddItem(theEnt->GeneralProperty());
|
||||
|
||||
theIter.AddItem(theEnt->PropertyDefinition());
|
||||
}
|
60
src/RWStepBasic/RWStepBasic_RWGeneralPropertyAssociation.hxx
Normal file
60
src/RWStepBasic/RWStepBasic_RWGeneralPropertyAssociation.hxx
Normal file
@@ -0,0 +1,60 @@
|
||||
// Copyright (c) 2024 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _RWStepBasic_RWGeneralPropertyAssociation_HeaderFile
|
||||
#define _RWStepBasic_RWGeneralPropertyAssociation_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Integer.hxx>
|
||||
class StepData_StepReaderData;
|
||||
class Interface_Check;
|
||||
class StepBasic_GeneralProperty;
|
||||
class StepData_StepWriter;
|
||||
class Interface_EntityIterator;
|
||||
|
||||
class StepBasic_GeneralPropertyAssociation;
|
||||
|
||||
//! Read & Write tool for GeneralPropertyAssociation
|
||||
class RWStepBasic_RWGeneralPropertyAssociation
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
//! Empty constructor
|
||||
Standard_EXPORT RWStepBasic_RWGeneralPropertyAssociation();
|
||||
|
||||
//! Reads GeneralPropertyAssociation
|
||||
Standard_EXPORT void ReadStep (const Handle(StepData_StepReaderData)& theData,
|
||||
const Standard_Integer theNum,
|
||||
Handle(Interface_Check)& theAch,
|
||||
const Handle(StepBasic_GeneralPropertyAssociation)& theEnt) const;
|
||||
|
||||
//! Writes GeneralPropertyAssociation
|
||||
Standard_EXPORT void WriteStep (StepData_StepWriter& theSW,
|
||||
const Handle(StepBasic_GeneralPropertyAssociation)& theEnt) const;
|
||||
|
||||
//! Fills data for graph (shared items)
|
||||
Standard_EXPORT void Share (const Handle(StepBasic_GeneralPropertyAssociation)& theEnt,
|
||||
Interface_EntityIterator& theIter) const;
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
#endif // _RWStepBasic_RWGeneralPropertyAssociation_HeaderFile
|
103
src/RWStepBasic/RWStepBasic_RWGeneralPropertyRelationship.cxx
Normal file
103
src/RWStepBasic/RWStepBasic_RWGeneralPropertyRelationship.cxx
Normal file
@@ -0,0 +1,103 @@
|
||||
// Copyright (c) 2024 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
#include <RWStepBasic_RWGeneralPropertyRelationship.hxx>
|
||||
#include <StepBasic_GeneralProperty.hxx>
|
||||
#include <StepBasic_GeneralPropertyRelationship.hxx>
|
||||
#include <StepData_StepReaderData.hxx>
|
||||
#include <StepData_StepWriter.hxx>
|
||||
#include <StepRepr_PropertyDefinition.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : RWStepBasic_RWGeneralPropertyRelationship
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
RWStepBasic_RWGeneralPropertyRelationship::RWStepBasic_RWGeneralPropertyRelationship()
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ReadStep
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void RWStepBasic_RWGeneralPropertyRelationship::ReadStep(const Handle(StepData_StepReaderData)& theData,
|
||||
const Standard_Integer theNum,
|
||||
Handle(Interface_Check)& theAch,
|
||||
const Handle(StepBasic_GeneralPropertyRelationship)& theEnt) const
|
||||
{
|
||||
// Check number of parameters
|
||||
if (!theData->CheckNbParams(theNum, 4, theAch, "general_property_association")) return;
|
||||
|
||||
Handle(TCollection_HAsciiString) aName;
|
||||
theData->ReadString(theNum, 1, "name", theAch, aName);
|
||||
|
||||
Handle(TCollection_HAsciiString) aDescription;
|
||||
Standard_Boolean hasDescription = Standard_True;
|
||||
if (theData->IsParamDefined(theNum, 2))
|
||||
{
|
||||
theData->ReadString(theNum, 2, "description", theAch, aDescription);
|
||||
}
|
||||
else
|
||||
{
|
||||
hasDescription = Standard_False;
|
||||
}
|
||||
|
||||
Handle(StepBasic_GeneralProperty) aRelatingGeneralProperty;
|
||||
theData->ReadEntity(theNum, 3, "relating_property", theAch, STANDARD_TYPE(StepBasic_GeneralProperty), aRelatingGeneralProperty);
|
||||
|
||||
Handle(StepBasic_GeneralProperty) aRelatedGeneralProperty;
|
||||
theData->ReadEntity(theNum, 4, "related_property", theAch, STANDARD_TYPE(StepBasic_GeneralProperty), aRelatedGeneralProperty);
|
||||
|
||||
// Initialize entity
|
||||
theEnt->Init(aName,
|
||||
hasDescription,
|
||||
aDescription,
|
||||
aRelatingGeneralProperty,
|
||||
aRelatedGeneralProperty);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : WriteStep
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void RWStepBasic_RWGeneralPropertyRelationship::WriteStep(StepData_StepWriter& theSW,
|
||||
const Handle(StepBasic_GeneralPropertyRelationship)& theEnt) const
|
||||
{
|
||||
theSW.Send(theEnt->Name());
|
||||
|
||||
if (theEnt->HasDescription())
|
||||
{
|
||||
theSW.Send(theEnt->Description());
|
||||
}
|
||||
else
|
||||
{
|
||||
theSW.SendUndef();
|
||||
}
|
||||
|
||||
theSW.Send(theEnt->RelatingGeneralProperty());
|
||||
|
||||
theSW.Send(theEnt->RelatedGeneralProperty());
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Share
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void RWStepBasic_RWGeneralPropertyRelationship::Share(const Handle(StepBasic_GeneralPropertyRelationship)& theEnt,
|
||||
Interface_EntityIterator& theIter) const
|
||||
{
|
||||
theIter.AddItem(theEnt->RelatingGeneralProperty());
|
||||
|
||||
theIter.AddItem(theEnt->RelatedGeneralProperty());
|
||||
}
|
@@ -0,0 +1,60 @@
|
||||
// Copyright (c) 2024 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _RWStepBasic_RWGeneralPropertyRelationship_HeaderFile
|
||||
#define _RWStepBasic_RWGeneralPropertyAssociation_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Integer.hxx>
|
||||
class StepData_StepReaderData;
|
||||
class Interface_Check;
|
||||
class StepBasic_GeneralProperty;
|
||||
class StepData_StepWriter;
|
||||
class Interface_EntityIterator;
|
||||
|
||||
class StepBasic_GeneralPropertyRelationship;
|
||||
|
||||
//! Read & Write tool for GeneralPropertyRelationship
|
||||
class RWStepBasic_RWGeneralPropertyRelationship
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
//! Empty constructor
|
||||
Standard_EXPORT RWStepBasic_RWGeneralPropertyRelationship();
|
||||
|
||||
//! Reads GeneralPropertyAssociation
|
||||
Standard_EXPORT void ReadStep (const Handle(StepData_StepReaderData)& theData,
|
||||
const Standard_Integer theNum,
|
||||
Handle(Interface_Check)& theAch,
|
||||
const Handle(StepBasic_GeneralPropertyRelationship)& theEnt) const;
|
||||
|
||||
//! Writes GeneralPropertyAssociation
|
||||
Standard_EXPORT void WriteStep (StepData_StepWriter& theSW,
|
||||
const Handle(StepBasic_GeneralPropertyRelationship)& theEnt) const;
|
||||
|
||||
//! Fills data for graph (shared items)
|
||||
Standard_EXPORT void Share (const Handle(StepBasic_GeneralPropertyRelationship)& theEnt,
|
||||
Interface_EntityIterator& theIter) const;
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
#endif // _RWStepBasic_RWGeneralPropertyRelationship_HeaderFile
|
@@ -8,6 +8,8 @@ RWStepRepr_RWAssemblyComponentUsageSubstitute.cxx
|
||||
RWStepRepr_RWAssemblyComponentUsageSubstitute.hxx
|
||||
RWStepRepr_RWBetweenShapeAspect.cxx
|
||||
RWStepRepr_RWBetweenShapeAspect.hxx
|
||||
RWStepRepr_RWBooleanRepresentationItem.cxx
|
||||
RWStepRepr_RWBooleanRepresentationItem.hxx
|
||||
RWStepRepr_RWCentreOfSymmetry.cxx
|
||||
RWStepRepr_RWCentreOfSymmetry.hxx
|
||||
RWStepRepr_RWCharacterizedRepresentation.cxx
|
||||
@@ -88,6 +90,8 @@ RWStepRepr_RWPropertyDefinitionRepresentation.cxx
|
||||
RWStepRepr_RWPropertyDefinitionRepresentation.hxx
|
||||
RWStepRepr_RWQuantifiedAssemblyComponentUsage.cxx
|
||||
RWStepRepr_RWQuantifiedAssemblyComponentUsage.hxx
|
||||
RWStepRepr_RWRealRepresentationItem.cxx
|
||||
RWStepRepr_RWRealRepresentationItem.hxx
|
||||
RWStepRepr_RWRepresentation.cxx
|
||||
RWStepRepr_RWRepresentation.hxx
|
||||
RWStepRepr_RWRepresentationContext.cxx
|
||||
|
50
src/RWStepRepr/RWStepRepr_RWBooleanRepresentationItem.cxx
Normal file
50
src/RWStepRepr/RWStepRepr_RWBooleanRepresentationItem.cxx
Normal file
@@ -0,0 +1,50 @@
|
||||
// Copyright (c) 2024 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
|
||||
#include <RWStepRepr_RWBooleanRepresentationItem.hxx>
|
||||
#include <StepData_StepReaderData.hxx>
|
||||
#include <StepData_StepWriter.hxx>
|
||||
#include <StepRepr_BooleanRepresentationItem.hxx>
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
|
||||
RWStepRepr_RWBooleanRepresentationItem::RWStepRepr_RWBooleanRepresentationItem()
|
||||
{
|
||||
}
|
||||
|
||||
void RWStepRepr_RWBooleanRepresentationItem::ReadStep(const Handle(StepData_StepReaderData)& theData,
|
||||
const Standard_Integer theNum,
|
||||
Handle(Interface_Check)& theAch,
|
||||
const Handle(StepRepr_BooleanRepresentationItem)& theEnt) const
|
||||
{
|
||||
// Check number of parameters
|
||||
if (!theData->CheckNbParams(theNum, 2, theAch, "boolean_representation_item") ) return;
|
||||
|
||||
// --- inherited field : name ---
|
||||
Handle(TCollection_HAsciiString) aName;
|
||||
theData->ReadString (theNum, 1, "name", theAch, aName);
|
||||
|
||||
// --- own field : value ---
|
||||
Standard_Boolean aValue;
|
||||
theData->ReadBoolean (theNum, 2, "value", theAch, aValue);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
theEnt->Init(aName, aValue);
|
||||
}
|
||||
|
||||
void RWStepRepr_RWBooleanRepresentationItem::WriteStep(StepData_StepWriter& theSW,
|
||||
const Handle(StepRepr_BooleanRepresentationItem)& theEnt) const
|
||||
{
|
||||
theSW.Send(theEnt->Name());
|
||||
theSW.Send(theEnt->Value());
|
||||
}
|
45
src/RWStepRepr/RWStepRepr_RWBooleanRepresentationItem.hxx
Normal file
45
src/RWStepRepr/RWStepRepr_RWBooleanRepresentationItem.hxx
Normal file
@@ -0,0 +1,45 @@
|
||||
// Copyright (c) 2024 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _RWStepRepr_RWBooleanRepresentationItem_HeaderFile
|
||||
#define _RWStepRepr_RWBooleanRepresentationItem_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Boolean.hxx>
|
||||
class StepData_StepReaderData;
|
||||
class Interface_Check;
|
||||
class StepRepr_BooleanRepresentationItem;
|
||||
class StepData_StepWriter;
|
||||
|
||||
|
||||
//! Read & Write Module for BooleanRepresentationItem
|
||||
class RWStepRepr_RWBooleanRepresentationItem
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
Standard_EXPORT RWStepRepr_RWBooleanRepresentationItem();
|
||||
|
||||
Standard_EXPORT void ReadStep (const Handle(StepData_StepReaderData)& theData,
|
||||
const Standard_Integer theNum,
|
||||
Handle(Interface_Check)& theAch,
|
||||
const Handle(StepRepr_BooleanRepresentationItem)& theEnt) const;
|
||||
|
||||
Standard_EXPORT void WriteStep (StepData_StepWriter& theSW,
|
||||
const Handle(StepRepr_BooleanRepresentationItem)& theEnt) const;
|
||||
};
|
||||
#endif // _RWStepRepr_RWBooleanRepresentationItem_HeaderFile
|
50
src/RWStepRepr/RWStepRepr_RWRealRepresentationItem.cxx
Normal file
50
src/RWStepRepr/RWStepRepr_RWRealRepresentationItem.cxx
Normal file
@@ -0,0 +1,50 @@
|
||||
// Copyright (c) 2024 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
|
||||
#include <RWStepRepr_RWRealRepresentationItem.hxx>
|
||||
#include <StepData_StepReaderData.hxx>
|
||||
#include <StepData_StepWriter.hxx>
|
||||
#include <StepRepr_RealRepresentationItem.hxx>
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
|
||||
RWStepRepr_RWRealRepresentationItem::RWStepRepr_RWRealRepresentationItem()
|
||||
{
|
||||
}
|
||||
|
||||
void RWStepRepr_RWRealRepresentationItem::ReadStep(const Handle(StepData_StepReaderData)& theData,
|
||||
const Standard_Integer theNum,
|
||||
Handle(Interface_Check)& theAch,
|
||||
const Handle(StepRepr_RealRepresentationItem)& theEnt) const
|
||||
{
|
||||
// Check number of parameters
|
||||
if (!theData->CheckNbParams (theNum, 2, theAch, "real_representation_item")) return;
|
||||
|
||||
// --- inherited field : name ---
|
||||
Handle(TCollection_HAsciiString) aName;
|
||||
theData->ReadString (theNum, 1, "name", theAch, aName);
|
||||
|
||||
// --- own field : value ---
|
||||
Standard_Real aValue;
|
||||
theData->ReadReal (theNum, 2, "value", theAch, aValue);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
theEnt->Init(aName, aValue);
|
||||
}
|
||||
|
||||
void RWStepRepr_RWRealRepresentationItem::WriteStep(StepData_StepWriter& theSW,
|
||||
const Handle(StepRepr_RealRepresentationItem)& theEnt) const
|
||||
{
|
||||
theSW.Send(theEnt->Name());
|
||||
theSW.Send(theEnt->Value());
|
||||
}
|
46
src/RWStepRepr/RWStepRepr_RWRealRepresentationItem.hxx
Normal file
46
src/RWStepRepr/RWStepRepr_RWRealRepresentationItem.hxx
Normal file
@@ -0,0 +1,46 @@
|
||||
// Copyright (c) 2024 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _RWStepRepr_RWRealRepresentationItem_HeaderFile
|
||||
#define _RWStepRepr_RWRealRepresentationItem_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Real.hxx>
|
||||
class StepData_StepReaderData;
|
||||
class Interface_Check;
|
||||
class StepRepr_RealRepresentationItem;
|
||||
class StepData_StepWriter;
|
||||
|
||||
|
||||
//! Read & Write Module for RealRepresentationItem
|
||||
class RWStepRepr_RWRealRepresentationItem
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT RWStepRepr_RWRealRepresentationItem();
|
||||
|
||||
Standard_EXPORT void ReadStep (const Handle(StepData_StepReaderData)& theData,
|
||||
const Standard_Integer theNum,
|
||||
Handle(Interface_Check)& theAch,
|
||||
const Handle(StepRepr_RealRepresentationItem)& theEnt) const;
|
||||
|
||||
Standard_EXPORT void WriteStep (StepData_StepWriter& theSW,
|
||||
const Handle(StepRepr_RealRepresentationItem)& theEnt) const;
|
||||
};
|
||||
#endif // _RWStepRepr_RWRealRepresentationItem_HeaderFile
|
@@ -116,6 +116,8 @@ bool STEPCAFControl_ConfigurationNode::Load(const Handle(DE_ConfigurationContext
|
||||
theResource->BooleanVal("read.layer", InternalParameters.ReadLayer, aScope);
|
||||
InternalParameters.ReadProps =
|
||||
theResource->BooleanVal("read.props", InternalParameters.ReadProps, aScope);
|
||||
InternalParameters.ReadMetadata =
|
||||
theResource->BooleanVal("read.metadata", InternalParameters.ReadMetadata, aScope);
|
||||
|
||||
InternalParameters.WritePrecisionMode = (StepData_ConfParameters::WriteMode_PrecisionMode)
|
||||
theResource->IntegerVal("write.precision.mode", InternalParameters.WritePrecisionMode, aScope);
|
||||
@@ -370,6 +372,12 @@ TCollection_AsciiString STEPCAFControl_ConfigurationNode::Save() const
|
||||
aResult += aScope + "read.props :\t " + InternalParameters.ReadProps + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Setting up the read.metadata parameter which is used to indicate read Metadata or not\n";
|
||||
aResult += "!Default value: 0(\"OFF\"). Available values: 0(\"OFF\"), 1(\"ON\")\n";
|
||||
aResult += aScope + "read.metadata :\t " + InternalParameters.ReadMetadata + "\n";
|
||||
aResult += "!\n";
|
||||
|
||||
aResult += "!\n";
|
||||
aResult += "!Write Parameters:\n";
|
||||
aResult += "!\n";
|
||||
|
@@ -73,6 +73,8 @@ bool STEPCAFControl_Provider::Read(const TCollection_AsciiString& thePath,
|
||||
aReader.SetNameMode(aNode->InternalParameters.ReadName);
|
||||
aReader.SetLayerMode(aNode->InternalParameters.ReadLayer);
|
||||
aReader.SetPropsMode(aNode->InternalParameters.ReadProps);
|
||||
aReader.SetMetaMode(aNode->InternalParameters.ReadMetadata);
|
||||
|
||||
IFSelect_ReturnStatus aReadStat = IFSelect_RetVoid;
|
||||
StepData_ConfParameters aParams;
|
||||
aReadStat = aReader.ReadFile(thePath.ToCString(), aParams);
|
||||
|
@@ -30,9 +30,12 @@
|
||||
#include <StepBasic_ConversionBasedUnitAndLengthUnit.hxx>
|
||||
#include <StepBasic_ConversionBasedUnitAndPlaneAngleUnit.hxx>
|
||||
#include <StepBasic_ConversionBasedUnitAndMassUnit.hxx>
|
||||
#include <StepBasic_ConversionBasedUnitAndTimeUnit.hxx>
|
||||
#include <StepBasic_DerivedUnit.hxx>
|
||||
#include <StepBasic_DerivedUnitElement.hxx>
|
||||
#include <StepBasic_DocumentFile.hxx>
|
||||
#include <StepBasic_GeneralProperty.hxx>
|
||||
#include <StepBasic_GeneralPropertyAssociation.hxx>
|
||||
#include <StepBasic_MeasureValueMember.hxx>
|
||||
#include <StepBasic_NamedUnit.hxx>
|
||||
#include <StepBasic_Product.hxx>
|
||||
@@ -40,6 +43,9 @@
|
||||
#include <StepBasic_ProductDefinitionFormation.hxx>
|
||||
#include <StepBasic_ProductDefinitionWithAssociatedDocuments.hxx>
|
||||
#include <StepBasic_SiUnitAndLengthUnit.hxx>
|
||||
#include <StepBasic_SiUnitAndMassUnit.hxx>
|
||||
#include <StepBasic_SiUnitAndThermodynamicTemperatureUnit.hxx>
|
||||
#include <StepBasic_SiUnitAndTimeUnit.hxx>
|
||||
#include <STEPCAFControl_Controller.hxx>
|
||||
#include <STEPCAFControl_DataMapOfPDExternFile.hxx>
|
||||
#include <STEPCAFControl_DataMapOfShapePD.hxx>
|
||||
@@ -129,6 +135,7 @@
|
||||
#include <StepShape_DimensionalLocation.hxx>
|
||||
#include <StepShape_EdgeCurve.hxx>
|
||||
#include <StepShape_EdgeLoop.hxx>
|
||||
#include <StepShape_GeometricCurveSet.hxx>
|
||||
#include <StepShape_GeometricSet.hxx>
|
||||
#include <StepShape_HArray1OfFace.hxx>
|
||||
#include <StepShape_HArray1OfFaceBound.hxx>
|
||||
@@ -214,6 +221,7 @@
|
||||
#include <XSControl_WorkSession.hxx>
|
||||
#include <StepAP242_DraughtingModelItemAssociation.hxx>
|
||||
#include <StepAP242_GeometricItemSpecificUsage.hxx>
|
||||
#include <StepAP242_IdAttribute.hxx>
|
||||
#include <StepGeom_CartesianPoint.hxx>
|
||||
#include <STEPCAFControl_GDTProperty.hxx>
|
||||
#include <StepVisual_TessellatedAnnotationOccurrence.hxx>
|
||||
@@ -225,7 +233,15 @@
|
||||
#include <StepVisual_OverRidingStyledItem.hxx>
|
||||
#include <StepVisual_ContextDependentOverRidingStyledItem.hxx>
|
||||
#include <StepRepr_ShapeRepresentationRelationshipWithTransformation.hxx>
|
||||
#include <StepRepr_BooleanRepresentationItem.hxx>
|
||||
#include <StepRepr_IntegerRepresentationItem.hxx>
|
||||
#include <StepRepr_ItemDefinedTransformation.hxx>
|
||||
#include <StepRepr_PropertyDefinitionRelationship.hxx>
|
||||
#include <StepRepr_RealRepresentationItem.hxx>
|
||||
#include <StepRepr_ValueRepresentationItem.hxx>
|
||||
|
||||
#include <StepRepr_ShapeAspectRelationship.hxx>
|
||||
|
||||
|
||||
#include <TColgp_HArray1OfXYZ.hxx>
|
||||
#include <BRepBuilderAPI_MakeEdge.hxx>
|
||||
@@ -275,6 +291,7 @@ STEPCAFControl_Reader::STEPCAFControl_Reader()
|
||||
myNameMode(Standard_True),
|
||||
myLayerMode(Standard_True),
|
||||
myPropsMode(Standard_True),
|
||||
myMetaMode(Standard_False),
|
||||
mySHUOMode(Standard_False),
|
||||
myGDTMode(Standard_True),
|
||||
myMatMode(Standard_True),
|
||||
@@ -299,6 +316,7 @@ STEPCAFControl_Reader::STEPCAFControl_Reader(const Handle(XSControl_WorkSession)
|
||||
myNameMode(Standard_True),
|
||||
myLayerMode(Standard_True),
|
||||
myPropsMode(Standard_True),
|
||||
myMetaMode(Standard_False),
|
||||
mySHUOMode(Standard_False),
|
||||
myGDTMode(Standard_True),
|
||||
myMatMode(Standard_True),
|
||||
@@ -770,6 +788,10 @@ Standard_Boolean STEPCAFControl_Reader::Transfer (STEPControl_Reader &reader,
|
||||
if (GetViewMode())
|
||||
ReadViews(reader.WS(), doc, aLocalFactors);
|
||||
|
||||
// read metadata
|
||||
if (GetMetaMode())
|
||||
ReadMetadata(reader.WS(), doc, aLocalFactors);
|
||||
|
||||
// Expand resulting CAF structure for sub-shapes (optionally with their
|
||||
// names) if requested
|
||||
ExpandSubShapes(STool, ShapePDMap);
|
||||
@@ -1957,7 +1979,7 @@ Standard_Boolean STEPCAFControl_Reader::ReadSHUOs(const Handle(XSControl_WorkSes
|
||||
//function : GetMassConversionFactor
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
static Standard_Boolean GetMassConversionFactor(Handle(StepBasic_NamedUnit)& NU,
|
||||
static Standard_Boolean GetMassConversionFactor(const Handle(StepBasic_NamedUnit)& NU,
|
||||
Standard_Real& afact)
|
||||
{
|
||||
afact = 1.;
|
||||
@@ -5243,6 +5265,26 @@ Standard_Boolean STEPCAFControl_Reader::GetPropsMode() const
|
||||
return myPropsMode;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetMetaMode
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void STEPCAFControl_Reader::SetMetaMode(const Standard_Boolean theMetaMode)
|
||||
{
|
||||
myMetaMode = theMetaMode;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GetMetaMode
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Standard_Boolean STEPCAFControl_Reader::GetMetaMode() const
|
||||
{
|
||||
return myMetaMode;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetSHUOMode
|
||||
//purpose :
|
||||
@@ -5323,3 +5365,427 @@ Standard_Boolean STEPCAFControl_Reader::GetViewMode() const
|
||||
{
|
||||
return myViewMode;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ReadMetadata
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Boolean STEPCAFControl_Reader::ReadMetadata(const Handle(XSControl_WorkSession)& theWS,
|
||||
const Handle(TDocStd_Document)& theDoc,
|
||||
const StepData_Factors& theLocalFactors) const
|
||||
{
|
||||
const Handle(Interface_InterfaceModel)& aModel = theWS->Model();
|
||||
const Handle(XSControl_TransferReader)& aTR = theWS->TransferReader();
|
||||
const Handle(Transfer_TransientProcess)& aTP = aTR->TransientProcess();
|
||||
Handle(XCAFDoc_ShapeTool) aSTool = XCAFDoc_DocumentTool::ShapeTool(theDoc->Main());
|
||||
if (aSTool.IsNull())
|
||||
{
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
Standard_Integer aNb = aModel->NbEntities();
|
||||
STEPConstruct_Tool aTool(theWS);
|
||||
|
||||
for (Standard_Integer anEntityInd = 1; anEntityInd <= aNb; ++anEntityInd)
|
||||
{
|
||||
Handle(Standard_Transient) anEntity = aModel->Value(anEntityInd);
|
||||
Handle(StepBasic_GeneralProperty) aGeneralProp = Handle(StepBasic_GeneralProperty)::DownCast(anEntity);
|
||||
if (aGeneralProp.IsNull())
|
||||
continue;
|
||||
|
||||
Handle(StepBasic_GeneralPropertyAssociation) aPropAssociation;
|
||||
NCollection_List< Handle(StepRepr_PropertyDefinition)> aPropDefinitionList;
|
||||
Interface_EntityIterator aSharingListOfGP = theWS->Graph().Sharings(aGeneralProp);
|
||||
for (aSharingListOfGP.Start(); aSharingListOfGP.More(); aSharingListOfGP.Next())
|
||||
{
|
||||
aPropAssociation = Handle(StepBasic_GeneralPropertyAssociation)::DownCast(aSharingListOfGP.Value());
|
||||
if (aPropAssociation.IsNull())
|
||||
continue;
|
||||
|
||||
aPropDefinitionList.Append(aPropAssociation->PropertyDefinition());
|
||||
}
|
||||
|
||||
if (aPropDefinitionList.IsEmpty())
|
||||
continue;
|
||||
|
||||
NCollection_List< Handle(StepRepr_PropertyDefinition)>::Iterator aPropDefIter(aPropDefinitionList);
|
||||
for ( ; aPropDefIter.More(); aPropDefIter.Next())
|
||||
{
|
||||
Handle(StepRepr_PropertyDefinition) aPropDefinition = aPropDefIter.Value();
|
||||
|
||||
// check group of PropertyDefinition
|
||||
NCollection_List<Handle(StepRepr_PropertyDefinition)> aGroupedProperties;
|
||||
Interface_EntityIterator aSharingsListOfPD = theWS->Graph().Sharings(aPropDefinition);
|
||||
for (aSharingsListOfPD.Start(); aSharingsListOfPD.More(); aSharingsListOfPD.Next())
|
||||
{
|
||||
Handle(StepRepr_PropertyDefinitionRelationship) aRel =
|
||||
Handle(StepRepr_PropertyDefinitionRelationship)::DownCast(aSharingsListOfPD.Value());
|
||||
if (aRel.IsNull())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
Handle(StepRepr_PropertyDefinition) aGroupedProp = aRel->RelatedPropertyDefinition();
|
||||
if (!aGroupedProp.IsNull())
|
||||
{
|
||||
aGroupedProperties.Append(aGroupedProp);
|
||||
}
|
||||
}
|
||||
|
||||
NCollection_List<Handle(Transfer_Binder)> aBinders;
|
||||
Interface_EntityIterator aSharedListOfPD = theWS->Graph().Shareds(aPropDefinition);
|
||||
for (aSharedListOfPD.Start(); aSharedListOfPD.More(); aSharedListOfPD.Next())
|
||||
{
|
||||
Handle(Transfer_Binder) aBinder;
|
||||
Handle(StepBasic_ProductDefinition) aProductDefinition =
|
||||
Handle(StepBasic_ProductDefinition)::DownCast(aSharedListOfPD.Value());
|
||||
if (!aProductDefinition.IsNull())
|
||||
{
|
||||
aBinder = aTP->Find(aProductDefinition);
|
||||
if (!aBinder.IsNull())
|
||||
{
|
||||
aBinders.Append(aBinder);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
Handle(StepRepr_ProductDefinitionShape) aProductDefinitionShape =
|
||||
Handle(StepRepr_ProductDefinitionShape)::DownCast(aSharedListOfPD.Value());
|
||||
if (!aProductDefinitionShape.IsNull())
|
||||
{
|
||||
Handle(StepBasic_ProductDefinition) aProductDef =
|
||||
aProductDefinitionShape->Definition().ProductDefinition();
|
||||
aBinder = aTP->Find(aProductDef);
|
||||
if (!aBinder.IsNull())
|
||||
{
|
||||
aBinders.Append(aBinder);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
Handle(StepRepr_NextAssemblyUsageOccurrence) aNextAssembUsOcc =
|
||||
Handle(StepRepr_NextAssemblyUsageOccurrence)::DownCast(aSharedListOfPD.Value());
|
||||
if (!aNextAssembUsOcc.IsNull())
|
||||
{
|
||||
aBinder = aTP->Find(aNextAssembUsOcc);
|
||||
if (!aBinder.IsNull())
|
||||
{
|
||||
aBinders.Append(aBinder);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
Handle(StepRepr_ShapeAspect) aShapeAspect =
|
||||
Handle(StepRepr_ShapeAspect)::DownCast(aSharedListOfPD.Value());
|
||||
if (!aShapeAspect.IsNull())
|
||||
{
|
||||
TDF_Label aLabel;
|
||||
if (!aBinder.IsNull())
|
||||
{
|
||||
TopoDS_Shape aShape = TransferBRep::ShapeResult(aTP, aBinder);
|
||||
if (aShape.IsNull())
|
||||
continue;
|
||||
|
||||
if (myMap.IsBound(aShape))
|
||||
{
|
||||
aLabel = myMap.Find(aShape);
|
||||
}
|
||||
}
|
||||
Interface_EntityIterator aSharedListOfSA = theWS->Graph().Sharings(aShapeAspect);
|
||||
for (aSharedListOfSA.Start(); aSharedListOfSA.More(); aSharedListOfSA.Next())
|
||||
{
|
||||
Handle(StepAP242_DraughtingModelItemAssociation) aDMIA =
|
||||
Handle(StepAP242_DraughtingModelItemAssociation)::DownCast(aSharedListOfSA.Value());
|
||||
if (!aDMIA.IsNull())
|
||||
break;
|
||||
|
||||
Handle(StepAP242_ItemIdentifiedRepresentationUsage) anItemIdentUsage =
|
||||
Handle(StepAP242_ItemIdentifiedRepresentationUsage)::DownCast(aSharedListOfSA.Value());
|
||||
if (!anItemIdentUsage.IsNull())
|
||||
{
|
||||
for (Standard_Integer anIndex = 1; anIndex <= anItemIdentUsage->NbIdentifiedItem(); ++anIndex)
|
||||
{
|
||||
Handle(StepRepr_RepresentationItem) aReprItem = anItemIdentUsage->IdentifiedItemValue(anIndex);
|
||||
if (aReprItem.IsNull())
|
||||
continue;
|
||||
aBinder = aTP->Find(aReprItem);
|
||||
if (!aBinder.IsNull())
|
||||
{
|
||||
aBinders.Append(aBinder);
|
||||
}
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
Handle(StepRepr_PropertyDefinition) aPropDef =
|
||||
Handle(StepRepr_PropertyDefinition)::DownCast(aSharedListOfSA.Value());
|
||||
if (!aPropDef.IsNull() && aPropDef != aPropDefinition)
|
||||
{
|
||||
Interface_EntityIterator aSharingListOfPD = theWS->Graph().Sharings(aPropDef);
|
||||
for (aSharingListOfPD.Start(); aSharingListOfPD.More(); aSharingListOfPD.Next())
|
||||
{
|
||||
Handle(StepShape_ShapeDefinitionRepresentation) aShDef =
|
||||
Handle(StepShape_ShapeDefinitionRepresentation)::DownCast(aSharingListOfPD.Value());
|
||||
if (aShDef.IsNull())
|
||||
continue;
|
||||
|
||||
findReprItems(theWS, aShDef, aBinders);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
Handle(StepShape_ShapeDefinitionRepresentation) aShapeDefRepr =
|
||||
Handle(StepShape_ShapeDefinitionRepresentation)::DownCast(aSharedListOfSA.Value());
|
||||
if (!aShapeDefRepr.IsNull())
|
||||
{
|
||||
findReprItems(theWS, aShapeDefRepr, aBinders);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (aBinders.IsEmpty())
|
||||
continue;
|
||||
|
||||
TDF_LabelSequence aLabelSeq;
|
||||
NCollection_List<Handle(Transfer_Binder)>::Iterator aBindIt(aBinders);
|
||||
for (; aBindIt.More(); aBindIt.Next())
|
||||
{
|
||||
TopoDS_Shape aShape = TransferBRep::ShapeResult(aTP, aBindIt.Value());
|
||||
if (aShape.IsNull())
|
||||
continue;
|
||||
|
||||
TDF_Label aShapeLabel;
|
||||
if (myMap.IsBound(aShape))
|
||||
{
|
||||
aShapeLabel = myMap.Find(aShape);
|
||||
}
|
||||
if (!aShapeLabel.IsNull())
|
||||
{
|
||||
aLabelSeq.Append(aShapeLabel);
|
||||
}
|
||||
}
|
||||
|
||||
//create metadata
|
||||
for (TDF_LabelSequence::Iterator aLabelIt(aLabelSeq); aLabelIt.More(); aLabelIt.Next())
|
||||
{
|
||||
TDF_Label aLabel = aLabelIt.Value();
|
||||
Handle(TDataStd_NamedData) anAttr;
|
||||
if (!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAttr))
|
||||
{
|
||||
anAttr = new TDataStd_NamedData;
|
||||
aLabel.AddAttribute(anAttr);
|
||||
}
|
||||
|
||||
fillAttributes(theWS, aPropDefinition, theLocalFactors, anAttr);
|
||||
if (!aGroupedProperties.IsEmpty())
|
||||
{
|
||||
NCollection_List<Handle(StepRepr_PropertyDefinition)>::Iterator aPropIt(aGroupedProperties);
|
||||
for ( ; aPropIt.More(); aPropIt.Next())
|
||||
{
|
||||
fillAttributes(theWS, aPropIt.Value(), theLocalFactors, anAttr);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : findReprItems
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Boolean STEPCAFControl_Reader::findReprItems(const Handle(XSControl_WorkSession)& theWS,
|
||||
const Handle(StepShape_ShapeDefinitionRepresentation)& theShDefRepr,
|
||||
NCollection_List<Handle(Transfer_Binder)>& theBinders) const
|
||||
{
|
||||
Handle(StepRepr_Representation) aRepr = theShDefRepr->UsedRepresentation();
|
||||
if (aRepr.IsNull())
|
||||
{
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
Handle(Transfer_Binder) aBinder;
|
||||
const Handle(Transfer_TransientProcess)& aTP = theWS->TransferReader()->TransientProcess();
|
||||
Handle(StepRepr_HArray1OfRepresentationItem) aReprItems = aRepr->Items();
|
||||
if (!aReprItems->IsEmpty())
|
||||
{
|
||||
for (Standard_Integer anInd = aReprItems->Lower(); anInd <= aReprItems->Upper(); anInd++)
|
||||
{
|
||||
Handle(StepRepr_RepresentationItem) aReprItem = aReprItems->Value(anInd);
|
||||
aBinder = aTP->Find(aReprItem);
|
||||
if (!aBinder.IsNull())
|
||||
{
|
||||
theBinders.Append(aBinder);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : fillAttributes
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Boolean STEPCAFControl_Reader::fillAttributes(const Handle(XSControl_WorkSession)& theWS,
|
||||
const Handle(StepRepr_PropertyDefinition)& thePropDef,
|
||||
const StepData_Factors& theLocalFactors,
|
||||
Handle(TDataStd_NamedData)& theAttr) const
|
||||
{
|
||||
// skip if key is null
|
||||
if (thePropDef->Name().IsNull())
|
||||
{
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
Handle(StepRepr_PropertyDefinitionRepresentation) aPropDefRepr;
|
||||
Interface_EntityIterator aSharingListOfPD = theWS->Graph().Sharings(thePropDef);
|
||||
for (aSharingListOfPD.Start(); aSharingListOfPD.More(); aSharingListOfPD.Next())
|
||||
{
|
||||
aPropDefRepr = Handle(StepRepr_PropertyDefinitionRepresentation)::DownCast(aSharingListOfPD.Value());
|
||||
if (aPropDefRepr.IsNull())
|
||||
continue;
|
||||
|
||||
Handle(StepRepr_Representation) aUsedRepr = aPropDefRepr->UsedRepresentation();
|
||||
if (aUsedRepr.IsNull())
|
||||
continue;
|
||||
|
||||
Handle(StepRepr_HArray1OfRepresentationItem) aReprItems = aUsedRepr->Items();
|
||||
if (!aReprItems.IsNull())
|
||||
{
|
||||
for (Standard_Integer anIndex = aReprItems->Lower(); anIndex <= aReprItems->Upper(); anIndex++)
|
||||
{
|
||||
Handle(StepRepr_RepresentationItem) anItem = aReprItems->Value(anIndex);
|
||||
if (anItem.IsNull())
|
||||
continue;
|
||||
|
||||
if (anItem->IsKind(STANDARD_TYPE(StepRepr_DescriptiveRepresentationItem)))
|
||||
{
|
||||
Handle(StepRepr_DescriptiveRepresentationItem) aDescrItem = Handle(StepRepr_DescriptiveRepresentationItem)::DownCast(anItem);
|
||||
Handle(TCollection_HAsciiString) aDescription = aDescrItem->Description();
|
||||
theAttr->SetString(thePropDef->Name()->ToCString(), aDescription->ToCString());
|
||||
}
|
||||
else if (anItem->IsKind(STANDARD_TYPE(StepRepr_MeasureRepresentationItem)))
|
||||
{
|
||||
Handle(StepRepr_MeasureRepresentationItem) aMeasureItem = Handle(StepRepr_MeasureRepresentationItem)::DownCast(anItem);
|
||||
Standard_Real aValue = aMeasureItem->Measure()->ValueComponent();
|
||||
TCollection_AsciiString aValType = aMeasureItem->Measure()->ValueComponentMember()->Name();
|
||||
StepBasic_Unit anUnit = aMeasureItem->Measure()->UnitComponent();
|
||||
if (!anUnit.IsNull())
|
||||
{
|
||||
Standard_Real aParam = 1.;
|
||||
if (anUnit.Type() == STANDARD_TYPE(StepBasic_DerivedUnit))
|
||||
{
|
||||
Handle(StepBasic_DerivedUnit) aDUnit = anUnit.DerivedUnit();
|
||||
for (Standard_Integer anInd = 1; anInd <= aDUnit->NbElements(); ++anInd)
|
||||
{
|
||||
Handle(StepBasic_DerivedUnitElement) aDUElem = aDUnit->ElementsValue(anInd);
|
||||
Standard_Real anExp = aDUElem->Exponent();
|
||||
Handle(StepBasic_NamedUnit) aNUnit = aDUElem->Unit();
|
||||
if (!aNUnit.IsNull())
|
||||
{
|
||||
if (aNUnit->IsKind(STANDARD_TYPE(StepBasic_ConversionBasedUnitAndLengthUnit)) ||
|
||||
aNUnit->IsKind(STANDARD_TYPE(StepBasic_SiUnitAndLengthUnit)))
|
||||
{
|
||||
STEPConstruct_UnitContext anUnitCtx;
|
||||
anUnitCtx.ComputeFactors(aNUnit, theLocalFactors);
|
||||
if (aValType == "VOLUME_MEASURE")
|
||||
{
|
||||
aParam = pow(theLocalFactors.LengthFactor(), anExp);
|
||||
}
|
||||
else
|
||||
{
|
||||
aParam = aParam / pow(theLocalFactors.LengthFactor(), anExp);
|
||||
}
|
||||
}
|
||||
else if (aNUnit->IsKind(STANDARD_TYPE(StepBasic_ConversionBasedUnitAndMassUnit))) {
|
||||
Standard_Real aFact = 1.;
|
||||
if (GetMassConversionFactor(aNUnit, aFact))
|
||||
{
|
||||
aParam = aParam * aFact;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
STEPConstruct_UnitContext anUnitCtx;
|
||||
anUnitCtx.ComputeFactors(aNUnit, theLocalFactors);
|
||||
if (anUnitCtx.AreaDone())
|
||||
aParam = anUnitCtx.AreaFactor();
|
||||
if (anUnitCtx.LengthDone())
|
||||
{
|
||||
Standard_Real aLengthFactor = anUnitCtx.LengthFactor();
|
||||
aParam *= pow(aLengthFactor, anExp);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
aValue = aValue * aParam;
|
||||
}
|
||||
else
|
||||
{
|
||||
Handle(StepBasic_NamedUnit) aNUnit = anUnit.NamedUnit();
|
||||
if (!aNUnit.IsNull())
|
||||
{
|
||||
if (aNUnit->IsKind(STANDARD_TYPE(StepBasic_ConversionBasedUnitAndMassUnit)))
|
||||
{
|
||||
Standard_Real aFact = 1.;
|
||||
if (GetMassConversionFactor(aNUnit, aFact))
|
||||
{
|
||||
aValue *= aFact;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
STEPConstruct_UnitContext anUnitCtx;
|
||||
anUnitCtx.ComputeFactors(aNUnit, theLocalFactors);
|
||||
if (anUnitCtx.AreaDone())
|
||||
aParam = anUnitCtx.AreaFactor();
|
||||
if (anUnitCtx.VolumeDone())
|
||||
aParam = anUnitCtx.VolumeFactor();
|
||||
if (anUnitCtx.LengthDone())
|
||||
aParam = anUnitCtx.LengthFactor();
|
||||
|
||||
aValue *= aParam;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
theAttr->SetReal(thePropDef->Name()->ToCString(), aValue);
|
||||
}
|
||||
else if (anItem->IsKind(STANDARD_TYPE(StepRepr_ValueRepresentationItem)))
|
||||
{
|
||||
Handle(StepRepr_ValueRepresentationItem) aValueItem = Handle(StepRepr_ValueRepresentationItem)::DownCast(anItem);
|
||||
Handle(StepBasic_MeasureValueMember) aMeasureValueMem = aValueItem->ValueComponentMember();
|
||||
Interface_ParamType aParamType = aMeasureValueMem->ParamType();
|
||||
if (aParamType == Interface_ParamInteger)
|
||||
{
|
||||
theAttr->SetInteger(thePropDef->Name()->ToCString(), aMeasureValueMem->Integer());
|
||||
}
|
||||
else if (aParamType == Interface_ParamReal)
|
||||
{
|
||||
theAttr->SetReal(thePropDef->Name()->ToCString(), aMeasureValueMem->Real());
|
||||
}
|
||||
}
|
||||
else if (anItem->IsKind(STANDARD_TYPE(StepRepr_IntegerRepresentationItem)))
|
||||
{
|
||||
Handle(StepRepr_IntegerRepresentationItem) anIntegerItem = Handle(StepRepr_IntegerRepresentationItem)::DownCast(anItem);
|
||||
theAttr->SetInteger(thePropDef->Name()->ToCString(), anIntegerItem->Value());
|
||||
}
|
||||
else if (anItem->IsKind(STANDARD_TYPE(StepRepr_RealRepresentationItem)))
|
||||
{
|
||||
Handle(StepRepr_RealRepresentationItem) aRealItem = Handle(StepRepr_RealRepresentationItem)::DownCast(anItem);
|
||||
theAttr->SetReal(thePropDef->Name()->ToCString(), aRealItem->Value());
|
||||
}
|
||||
else if (anItem->IsKind(STANDARD_TYPE(StepRepr_BooleanRepresentationItem)))
|
||||
{
|
||||
Handle(StepRepr_BooleanRepresentationItem) aBoolItem = Handle(StepRepr_BooleanRepresentationItem)::DownCast(anItem);
|
||||
theAttr->SetInteger(thePropDef->Name()->ToCString(), aBoolItem->Value());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return Standard_True;
|
||||
}
|
||||
|
@@ -29,16 +29,21 @@
|
||||
#include <XCAFDimTolObjects_DatumModifWithValue.hxx>
|
||||
|
||||
class XSControl_WorkSession;
|
||||
class TDataStd_NamedData;
|
||||
class TDocStd_Document;
|
||||
class STEPCAFControl_ExternFile;
|
||||
class TopoDS_Shape;
|
||||
class XCAFDoc_ShapeTool;
|
||||
class StepRepr_RepresentationItem;
|
||||
class Transfer_TransientProcess;
|
||||
class StepBasic_NamedUnit;
|
||||
class StepShape_ConnectedFaceSet;
|
||||
class StepShape_ShapeDefinitionRepresentation;
|
||||
class StepRepr_NextAssemblyUsageOccurrence;
|
||||
class StepRepr_PropertyDefinition;
|
||||
class STEPConstruct_Tool;
|
||||
class StepDimTol_Datum;
|
||||
class Transfer_Binder;
|
||||
|
||||
//! Provides a tool to read STEP file and put it into
|
||||
//! DECAF document. Besides transfer of shapes (including
|
||||
@@ -175,6 +180,11 @@ public:
|
||||
Standard_EXPORT void SetPropsMode (const Standard_Boolean propsmode);
|
||||
|
||||
Standard_EXPORT Standard_Boolean GetPropsMode() const;
|
||||
|
||||
//! MetaMode for indicate read Metadata or not.
|
||||
Standard_EXPORT void SetMetaMode(const Standard_Boolean theMetaMode);
|
||||
|
||||
Standard_EXPORT Standard_Boolean GetMetaMode() const;
|
||||
|
||||
//! Set SHUO mode for indicate write SHUO or not.
|
||||
Standard_EXPORT void SetSHUOMode (const Standard_Boolean shuomode);
|
||||
@@ -246,6 +256,12 @@ protected:
|
||||
const Handle(TDocStd_Document)& doc,
|
||||
const STEPCAFControl_DataMapOfPDExternFile& PDFileMap,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors()) const;
|
||||
|
||||
//! Reads metadata assigned to shapes in the STEP model and
|
||||
//! assigns them to corresponding labels in the DECAF document
|
||||
Standard_EXPORT Standard_Boolean ReadMetadata(const Handle(XSControl_WorkSession)& theWS,
|
||||
const Handle(TDocStd_Document)& theDoc,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors()) const;
|
||||
|
||||
//! Reads layers of parts defined in the STEP model and
|
||||
//! set reference between shape and layers in the DECAF document
|
||||
@@ -333,6 +349,17 @@ private:
|
||||
const Handle(TDocStd_Document)& theDoc,
|
||||
StepData_Factors& theLocalFactors) const;
|
||||
|
||||
//! Find RepresentationItems
|
||||
Standard_Boolean findReprItems(const Handle(XSControl_WorkSession) & theWS,
|
||||
const Handle(StepShape_ShapeDefinitionRepresentation) & theShDefRepr,
|
||||
NCollection_List<Handle(Transfer_Binder)>& theBinders) const;
|
||||
|
||||
//! Fill metadata
|
||||
Standard_Boolean fillAttributes(const Handle(XSControl_WorkSession)& theWS,
|
||||
const Handle(StepRepr_PropertyDefinition)& thePropDef,
|
||||
const StepData_Factors& theLocalFactors,
|
||||
Handle(TDataStd_NamedData)& theAttr) const;
|
||||
|
||||
private:
|
||||
|
||||
STEPControl_Reader myReader;
|
||||
@@ -342,6 +369,7 @@ private:
|
||||
Standard_Boolean myNameMode;
|
||||
Standard_Boolean myLayerMode;
|
||||
Standard_Boolean myPropsMode;
|
||||
Standard_Boolean myMetaMode;
|
||||
Standard_Boolean mySHUOMode;
|
||||
Standard_Boolean myGDTMode;
|
||||
Standard_Boolean myMatMode;
|
||||
|
@@ -580,7 +580,7 @@ static void getSDR(const Handle(StepRepr_ProductDefinitionShape)& PDS,
|
||||
|
||||
// common progress indicator for translation of own shapes and sub-assemblies
|
||||
Message_ProgressScope PS(theProgress, "Part", nbEnt);
|
||||
Standard_Integer nbComponents=0, nbShapes=0;
|
||||
Standard_Integer nbComponents=0;
|
||||
|
||||
// translate sub-assemblies
|
||||
for ( Standard_Integer nbNauo =1; nbNauo <= listNAUO->Length() && PS.More(); nbNauo++) {
|
||||
@@ -662,7 +662,6 @@ static void getSDR(const Handle(StepRepr_ProductDefinitionShape)& PDS,
|
||||
else
|
||||
B.Add(Cund, theResult);
|
||||
// [END] ssv: OCCT#22436: extra compound in NMSSR case
|
||||
nbShapes++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -670,50 +669,20 @@ static void getSDR(const Handle(StepRepr_ProductDefinitionShape)& PDS,
|
||||
// way of writing hybrid models in AP203 since 1998, and AP209
|
||||
// Note that both AP203 and AP209 allow main representation to be non-empty
|
||||
if ( readSRR && /*theResult.IsNull() &&*/ i <= nbNotAspect) {
|
||||
Interface_EntityIterator subs1 = graph.Sharings(rep);
|
||||
Handle(Standard_Type) tSRR = STANDARD_TYPE(StepRepr_ShapeRepresentationRelationship);
|
||||
for (subs1.Start(); subs1.More(); subs1.Next()) {
|
||||
const Handle(Standard_Transient)& anitem = subs1.Value();
|
||||
if( !anitem->IsKind(STANDARD_TYPE(StepRepr_RepresentationRelationship)))
|
||||
continue;
|
||||
if (anitem->DynamicType() == tSRR)
|
||||
{
|
||||
Handle(StepRepr_ShapeRepresentationRelationship) SRR =
|
||||
Handle(StepRepr_ShapeRepresentationRelationship)::DownCast(anitem);
|
||||
Standard_Integer nbrep = (rep == SRR->Rep1() ? 2 : 1);
|
||||
// SKL for bug 29068: parameter useTrsf is used because if root entity has connection with other
|
||||
// by ShapeRepresentationRelationship then result after such transferring need to transform also.
|
||||
// This case is from test "bugs modalg_7 bug30196"
|
||||
binder = TransferEntity(SRR, TP, theLocalFactors, nbrep, useTrsf, aPS1.Next());
|
||||
if (! binder.IsNull()) {
|
||||
theResult = TransferBRep::ShapeResult (binder);
|
||||
Result1 = theResult;
|
||||
B.Add(Cund, theResult);
|
||||
nbShapes++;
|
||||
}
|
||||
}
|
||||
else if(readConstructiveGeomRR && anitem->IsKind(STANDARD_TYPE(StepRepr_ConstructiveGeometryRepresentationRelationship)))
|
||||
{
|
||||
Handle(StepRepr_ConstructiveGeometryRepresentationRelationship) aCSRR =
|
||||
Handle(StepRepr_ConstructiveGeometryRepresentationRelationship)::DownCast(anitem);
|
||||
binder = TransferEntity(aCSRR, TP, theLocalFactors);
|
||||
if (! binder.IsNull())
|
||||
{
|
||||
Result1 = TransferBRep::ShapeResult (binder);
|
||||
B.Add(Cund, Result1);
|
||||
nbShapes++;
|
||||
}
|
||||
}
|
||||
TopoDS_Shape aNewResult = TransferRelatedSRR(TP, rep, useTrsf, readConstructiveGeomRR, theLocalFactors, Cund, aPS1);
|
||||
if (!aNewResult.IsNull())
|
||||
{
|
||||
Result1 = aNewResult;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// make a warning if both own shape and sub-assemblies are present
|
||||
if ( nbShapes >0 && nbComponents > 0 )
|
||||
if ( (Cund.NbChildren() - nbComponents) > 0 && nbComponents > 0 )
|
||||
TP->AddWarning ( PD, "Product has both sub-assemblies and directly assigned shape" );
|
||||
|
||||
// if only single shape is read, add it as it is; otherwise add compound
|
||||
if( nbShapes == 1 && nbComponents == 0 )
|
||||
if( (Cund.NbChildren() - nbComponents) == 1 && nbComponents == 0 )
|
||||
shbinder = new TransferBRep_ShapeBinder (Result1);
|
||||
else
|
||||
shbinder = new TransferBRep_ShapeBinder (Cund);
|
||||
@@ -1555,8 +1524,8 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity
|
||||
const Message_ProgressRange& theProgress)
|
||||
{
|
||||
Handle(TransferBRep_ShapeBinder) shbinder;
|
||||
|
||||
// --------------------------------------------------------------
|
||||
|
||||
// --------------------------------------------------------------
|
||||
// On se trouve ici dans un contexte " d'assemblage geometrique "
|
||||
// - MappedItem
|
||||
// --------------------------------------------------------------
|
||||
@@ -1567,7 +1536,8 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity
|
||||
// La Shape, et la mise en position
|
||||
Handle(StepShape_ShapeRepresentation) maprep = Handle(StepShape_ShapeRepresentation)::
|
||||
DownCast(mapit->MappingSource()->MappedRepresentation());
|
||||
Standard_Boolean isBound = Standard_False;
|
||||
Standard_Boolean isBound = Standard_False;
|
||||
Message_ProgressScope aPSRoot(theProgress, NULL, 2);
|
||||
Handle(Transfer_Binder) binder = TP->Find(maprep);
|
||||
if (binder.IsNull()) binder = TransferEntity(maprep, TP, theLocalFactors, isBound, Standard_False, theProgress);
|
||||
shbinder = Handle(TransferBRep_ShapeBinder)::DownCast(binder);
|
||||
@@ -1575,7 +1545,6 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity
|
||||
else {
|
||||
TopoDS_Shape mappedShape = shbinder->Result();
|
||||
if ( ! mappedShape.IsNull() ) {
|
||||
|
||||
// Positionnement : 2 formules
|
||||
// 1/ Ax2 dans Source et comme Target : passage de Source a Target
|
||||
// 2/ CartesianOperator3d comme Target : on applique
|
||||
@@ -1607,6 +1576,39 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity
|
||||
shbinder = new TransferBRep_ShapeBinder (mappedShape);
|
||||
}
|
||||
}
|
||||
TopoDS_Compound aCund;
|
||||
TopoDS_Shape aResult;
|
||||
BRep_Builder aBuilder;
|
||||
aBuilder.MakeCompound(aCund);
|
||||
if (!shbinder.IsNull())
|
||||
{
|
||||
aResult = TransferBRep::ShapeResult(shbinder);
|
||||
aBuilder.Add(aCund, aResult);
|
||||
}
|
||||
// translate possible shapes related by SRRs, which corresponds to
|
||||
// way of writing hybrid models in AP203 since 1998, and AP209
|
||||
Standard_Integer aReadSRR = Interface_Static::IVal("read.step.shape.relationship");
|
||||
Standard_Integer aReadConstructiveGeomRR = Interface_Static::IVal("read.step.constructivegeom.relationship");
|
||||
if (aReadSRR)
|
||||
{
|
||||
const Interface_Graph& aGraph = TP->Graph();
|
||||
Standard_Integer aSRRnum = 0;
|
||||
for (Interface_EntityIterator aSubsIt(aGraph.Sharings(maprep)); aSubsIt.More(); aSubsIt.Next())
|
||||
++aSRRnum;
|
||||
Message_ProgressScope aPS(aPSRoot.Next(), "Part", aSRRnum);
|
||||
TopoDS_Shape aNewResult = TransferRelatedSRR(TP, maprep, Standard_False, aReadConstructiveGeomRR, theLocalFactors, aCund, aPS);
|
||||
if (!aNewResult.IsNull())
|
||||
{
|
||||
aResult = aNewResult;
|
||||
}
|
||||
// if only single shape is read, add it as it is; otherwise add compound
|
||||
if (aCund.NbChildren() == 1)
|
||||
shbinder = new TransferBRep_ShapeBinder(aResult);
|
||||
else if (aCund.NbChildren() > 1)
|
||||
{
|
||||
shbinder = new TransferBRep_ShapeBinder(aCund);
|
||||
}
|
||||
}
|
||||
TP->Bind(mapit, shbinder);
|
||||
return shbinder;
|
||||
}
|
||||
@@ -2091,3 +2093,47 @@ void STEPControl_ActorRead::SetModel(const Handle(Interface_InterfaceModel)& the
|
||||
{
|
||||
myModel = theModel;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// Method : TransferRelatedSRR
|
||||
// Purpose : Helper method to transfer SRR related to the representation
|
||||
//=======================================================================
|
||||
TopoDS_Shape STEPControl_ActorRead::TransferRelatedSRR(const Handle(Transfer_TransientProcess)& theTP,
|
||||
const Handle(StepShape_ShapeRepresentation)& theRep,
|
||||
const Standard_Boolean theUseTrsf,
|
||||
const Standard_Integer theReadConstructiveGeomRR,
|
||||
const StepData_Factors& theLocalFactors,
|
||||
TopoDS_Compound& theCund,
|
||||
Message_ProgressScope& thePS)
|
||||
{
|
||||
BRep_Builder aBuilder;
|
||||
TopoDS_Shape aResult;
|
||||
const Interface_Graph& aGraph = theTP->Graph();
|
||||
for (Interface_EntityIterator aSubsIt(aGraph.Sharings(theRep)); aSubsIt.More() && thePS.More(); aSubsIt.Next())
|
||||
{
|
||||
Handle(Standard_Transient) anItem = aSubsIt.Value();
|
||||
if (!anItem->IsKind(STANDARD_TYPE(StepRepr_RepresentationRelationship)))
|
||||
continue;
|
||||
Handle(Transfer_Binder) aBinder;
|
||||
if (anItem->DynamicType() == STANDARD_TYPE(StepRepr_ShapeRepresentationRelationship))
|
||||
{
|
||||
Handle(StepRepr_ShapeRepresentationRelationship) aSRR =
|
||||
Handle(StepRepr_ShapeRepresentationRelationship)::DownCast(anItem);
|
||||
Standard_Integer aNbRep = (theRep == aSRR->Rep1() ? 2 : 1);
|
||||
aBinder = TransferEntity(aSRR, theTP, theLocalFactors, aNbRep, theUseTrsf, thePS.Next());
|
||||
}
|
||||
else if (theReadConstructiveGeomRR &&
|
||||
anItem->DynamicType() == STANDARD_TYPE(StepRepr_ConstructiveGeometryRepresentationRelationship))
|
||||
{
|
||||
Handle(StepRepr_ConstructiveGeometryRepresentationRelationship) aCGRR =
|
||||
Handle(StepRepr_ConstructiveGeometryRepresentationRelationship)::DownCast(anItem);
|
||||
aBinder = TransferEntity(aCGRR, theTP, theLocalFactors);
|
||||
}
|
||||
if (!aBinder.IsNull())
|
||||
{
|
||||
aResult = TransferBRep::ShapeResult(aBinder);
|
||||
aBuilder.Add(theCund, aResult);
|
||||
}
|
||||
}
|
||||
return aResult;
|
||||
}
|
||||
|
@@ -206,6 +206,14 @@ private:
|
||||
|
||||
Standard_EXPORT void computeIDEASClosings (const TopoDS_Compound& comp, TopTools_IndexedDataMapOfShapeListOfShape& shellClosingMap);
|
||||
|
||||
Standard_EXPORT TopoDS_Shape TransferRelatedSRR(const Handle(Transfer_TransientProcess)& theTP,
|
||||
const Handle(StepShape_ShapeRepresentation)& theRep,
|
||||
const Standard_Boolean theUseTrsf,
|
||||
const Standard_Integer theReadConstructiveGeomRR,
|
||||
const StepData_Factors& theLocalFactors,
|
||||
TopoDS_Compound& theCund,
|
||||
Message_ProgressScope& thePS);
|
||||
|
||||
StepToTopoDS_NMTool myNMTool;
|
||||
Standard_Real myPrecision;
|
||||
Standard_Real myMaxTol;
|
||||
|
@@ -113,10 +113,6 @@
|
||||
#define INV_PI 0.318309886
|
||||
#define INV_PI_2 0.159154943
|
||||
|
||||
// Point light depth range values
|
||||
#define POINTLIGHT_ZNEAR 1.0
|
||||
#define POINTLIGHT_ZFAR 3000.0
|
||||
|
||||
// Matrix state
|
||||
uniform mat4 occWorldViewMatrix; //!< World-view matrix
|
||||
uniform mat4 occProjectionMatrix; //!< Projection matrix
|
||||
|
@@ -1,7 +1,6 @@
|
||||
srcinc:::Declarations.glsl
|
||||
srcinc:::DeclarationsImpl.glsl
|
||||
srcinc:::LightShadow.glsl
|
||||
srcinc:::LightPointShadow.glsl
|
||||
srcinc:::PBRCookTorrance.glsl
|
||||
srcinc:::PBRDirectionalLight.glsl
|
||||
srcinc:::PBRDistribution.glsl
|
||||
@@ -29,7 +28,6 @@ srcinc:::SkydomBackground.fs
|
||||
Shaders_Declarations_glsl.pxx
|
||||
Shaders_DeclarationsImpl_glsl.pxx
|
||||
Shaders_LightShadow_glsl.pxx
|
||||
Shaders_LightPointShadow_glsl.pxx
|
||||
Shaders_Display_fs.pxx
|
||||
Shaders_PBRCookTorrance_glsl.pxx
|
||||
Shaders_PBRDirectionalLight_glsl.pxx
|
||||
|
@@ -1,24 +0,0 @@
|
||||
//! Function computes point light shadow attenuation (1.0 means no shadow).
|
||||
float occLightPointShadow (in samplerCube theShadow,
|
||||
in int theId,
|
||||
in vec3 thePoint,
|
||||
in vec3 theNormal)
|
||||
{
|
||||
vec4 aPosLightSpace = PosLightSpace[occLight_Index(theId)];
|
||||
vec3 aLightDir = thePoint - occLight_Position (theId);
|
||||
// convert light-to-fragment vector to a depth value.
|
||||
vec3 anAbsVec = abs (aLightDir);
|
||||
float aLocalZcomp = max (anAbsVec.x, max (anAbsVec.y, anAbsVec.z));
|
||||
// set znear and zfar
|
||||
float aRange = occShadowMapRangeParams[theId].y;
|
||||
float aNear = occShadowMapRangeParams[theId].x;
|
||||
float aFar = aRange <= aNear ? POINTLIGHT_ZFAR : aRange;
|
||||
float aNormZComp = (aFar + aNear) / (aFar - aNear) - (2.0 * aFar * aNear) / (aFar - aNear) / aLocalZcomp;
|
||||
float aDist = (aNormZComp + 1.0) * 0.5;
|
||||
// calculate bias and test depth.
|
||||
aLightDir = normalize (aLightDir);
|
||||
float aBias = min (occShadowMapSizeBias.y * (1.0 - dot (theNormal, aLightDir)), occShadowMapSizeBias.y * 0.1);
|
||||
float aClosestDepth = occTextureCube (theShadow, aLightDir).r;
|
||||
float aShadow = (aDist - aBias) > aClosestDepth ? 1.0 : 0.0;
|
||||
return 1.0 - aShadow;
|
||||
}
|
@@ -9,8 +9,7 @@ void occPointLight (in int theId,
|
||||
in vec3 theNormal,
|
||||
in vec3 theView,
|
||||
in vec3 thePoint,
|
||||
in bool theIsFront,
|
||||
in float theShadow)
|
||||
in bool theIsFront)
|
||||
{
|
||||
vec3 aLight = occLight_Position (theId) - thePoint;
|
||||
|
||||
@@ -24,5 +23,5 @@ void occPointLight (in int theId,
|
||||
DirectLighting += occPBRIllumination (theView, aLight, theNormal,
|
||||
BaseColor, Metallic, Roughness, IOR,
|
||||
occLight_Specular (theId),
|
||||
occLight_Intensity(theId) * anAtten) * theShadow;
|
||||
occLight_Intensity(theId) * anAtten);
|
||||
}
|
||||
|
@@ -9,8 +9,7 @@ void occPointLight (in int theId,
|
||||
in vec3 theNormal,
|
||||
in vec3 theView,
|
||||
in vec3 thePoint,
|
||||
in bool theIsFront,
|
||||
in float theShadow)
|
||||
in bool theIsFront)
|
||||
{
|
||||
vec3 aLight = occLight_Position (theId) - thePoint;
|
||||
|
||||
@@ -32,6 +31,6 @@ void occPointLight (in int theId,
|
||||
aSpecl = pow (aNdotH, occMaterial_Shininess (theIsFront));
|
||||
}
|
||||
|
||||
Diffuse += occLight_Diffuse (theId) * aNdotL * anAtten * theShadow;
|
||||
Specular += occLight_Specular(theId) * aSpecl * anAtten * theShadow;
|
||||
Diffuse += occLight_Diffuse (theId) * aNdotL * anAtten;
|
||||
Specular += occLight_Specular(theId) * aSpecl * anAtten;
|
||||
}
|
||||
|
@@ -116,10 +116,6 @@ static const char Shaders_Declarations_glsl[] =
|
||||
"#define INV_PI 0.318309886\n"
|
||||
"#define INV_PI_2 0.159154943\n"
|
||||
"\n"
|
||||
"// Point light depth range values\n"
|
||||
"#define POINTLIGHT_ZNEAR 1.0\n"
|
||||
"#define POINTLIGHT_ZFAR 3000.0\n"
|
||||
"\n"
|
||||
"// Matrix state\n"
|
||||
"uniform mat4 occWorldViewMatrix; //!< World-view matrix\n"
|
||||
"uniform mat4 occProjectionMatrix; //!< Projection matrix\n"
|
||||
|
@@ -1,28 +0,0 @@
|
||||
// This file has been automatically generated from resource file src/Shaders/LightShadow.glsl
|
||||
|
||||
static const char Shaders_LightPointShadow_glsl[] =
|
||||
"//! Function computes point light shadow attenuation (1.0 means no shadow).\n"
|
||||
"float occLightPointShadow (in samplerCube theShadow,\n"
|
||||
" //in vec2 theDepthRange,\n"
|
||||
" in int theId,\n"
|
||||
" in vec3 thePoint,\n"
|
||||
" in vec3 theNormal)\n"
|
||||
"{\n"
|
||||
" vec4 aPosLightSpace = PosLightSpace[occLight_Index(theId)];\n"
|
||||
" vec3 aLightDir = thePoint - occLight_Position (theId);\n"
|
||||
" // convert light-to-fragment vector to a depth value.\n"
|
||||
" vec3 anAbsVec = abs (aLightDir);\n"
|
||||
" float aLocalZcomp = max (anAbsVec.x, max (anAbsVec.y, anAbsVec.z));\n"
|
||||
" // set znear and zfar\n"
|
||||
" float aRange = occShadowMapRangeParams[theId].y;\n"
|
||||
" float aNear = occShadowMapRangeParams[theId].x;\n"
|
||||
" float aFar = aRange <= aNear ? POINTLIGHT_ZFAR : aRange;\n"
|
||||
" float aNormZComp = (aFar + aNear) / (aFar-aNear) - (2.0 * aFar * aNear) / (aFar - aNear) / aLocalZcomp;\n"
|
||||
" float aDist = (aNormZComp + 1.0) * 0.5;\n"
|
||||
" // calculate bias and test depth.\n"
|
||||
" aLightDir = normalize (aLightDir);\n"
|
||||
" float aBias = min (occShadowMapSizeBias.y * (1.0 - dot (theNormal, aLightDir)), occShadowMapSizeBias.y * 0.1);\n"
|
||||
" float aClosestDepth = occTextureCube (theShadow, aLightDir).r;\n"
|
||||
" float aShadow = (aDist - aBias) > aClosestDepth ? 1.0 : 0.0;\n"
|
||||
" return 1.0 - aShadow;\n"
|
||||
"}\n";
|
@@ -12,8 +12,7 @@ static const char Shaders_PBRPointLight_glsl[] =
|
||||
" in vec3 theNormal,\n"
|
||||
" in vec3 theView,\n"
|
||||
" in vec3 thePoint,\n"
|
||||
" in bool theIsFront,\n"
|
||||
" in float theShadow)\n"
|
||||
" in bool theIsFront)\n"
|
||||
"{\n"
|
||||
" vec3 aLight = occLight_Position (theId) - thePoint;\n"
|
||||
"\n"
|
||||
@@ -27,5 +26,5 @@ static const char Shaders_PBRPointLight_glsl[] =
|
||||
" DirectLighting += occPBRIllumination (theView, aLight, theNormal,\n"
|
||||
" BaseColor, Metallic, Roughness, IOR,\n"
|
||||
" occLight_Specular (theId),\n"
|
||||
" occLight_Intensity(theId) * anAtten) * theShadow;\n"
|
||||
" occLight_Intensity(theId) * anAtten);\n"
|
||||
"}\n";
|
||||
|
@@ -12,8 +12,7 @@ static const char Shaders_PhongPointLight_glsl[] =
|
||||
" in vec3 theNormal,\n"
|
||||
" in vec3 theView,\n"
|
||||
" in vec3 thePoint,\n"
|
||||
" in bool theIsFront,\n"
|
||||
" in float theShadow)\n"
|
||||
" in bool theIsFront)\n"
|
||||
"{\n"
|
||||
" vec3 aLight = occLight_Position (theId) - thePoint;\n"
|
||||
"\n"
|
||||
@@ -35,6 +34,6 @@ static const char Shaders_PhongPointLight_glsl[] =
|
||||
" aSpecl = pow (aNdotH, occMaterial_Shininess (theIsFront));\n"
|
||||
" }\n"
|
||||
"\n"
|
||||
" Diffuse += occLight_Diffuse (theId) * aNdotL * anAtten * theShadow;\n"
|
||||
" Specular += occLight_Specular(theId) * aSpecl * anAtten * theShadow;\n"
|
||||
" Diffuse += occLight_Diffuse (theId) * aNdotL * anAtten;\n"
|
||||
" Specular += occLight_Specular(theId) * aSpecl * anAtten;\n"
|
||||
"}\n";
|
||||
|
@@ -299,9 +299,7 @@ namespace
|
||||
// for computing boundaries presentation
|
||||
Standard_Integer aNodeNumber = 0;
|
||||
Standard_Integer aNbPolylines = 0;
|
||||
|
||||
TopLoc_Location aTrsf;
|
||||
|
||||
TopLoc_Location aLoc;
|
||||
Handle(NCollection_Shared<TColgp_SequenceOfPnt>) aSeqPntsExtra;
|
||||
for (TopExp_Explorer aFaceIter (theShape, TopAbs_FACE); aFaceIter.More(); aFaceIter.Next())
|
||||
{
|
||||
@@ -331,7 +329,7 @@ namespace
|
||||
|
||||
// take one of the shared edges and get edge triangulation
|
||||
const TopoDS_Face& aFace = TopoDS::Face (anEdgeIter.Value().First());
|
||||
Handle(Poly_Triangulation) aTriangulation = BRep_Tool::Triangulation (aFace, aTrsf);
|
||||
Handle(Poly_Triangulation) aTriangulation = BRep_Tool::Triangulation (aFace, aLoc);
|
||||
if (aTriangulation.IsNull())
|
||||
{
|
||||
continue;
|
||||
@@ -345,7 +343,7 @@ namespace
|
||||
continue;
|
||||
}
|
||||
|
||||
Handle(Poly_PolygonOnTriangulation) anEdgePoly = BRep_Tool::PolygonOnTriangulation (anEdge, aTriangulation, aTrsf);
|
||||
Handle(Poly_PolygonOnTriangulation) anEdgePoly = BRep_Tool::PolygonOnTriangulation (anEdge, aTriangulation, aLoc);
|
||||
if (!anEdgePoly.IsNull()
|
||||
&& anEdgePoly->Nodes().Length() >= 2)
|
||||
{
|
||||
@@ -371,7 +369,8 @@ namespace
|
||||
|
||||
// create indexed segments array to pack polylines from different edges into single array
|
||||
const Standard_Integer aSegmentEdgeNb = (aNodeNumber - aNbPolylines) * 2;
|
||||
Handle(Graphic3d_ArrayOfSegments) aSegments = new Graphic3d_ArrayOfSegments (aNodeNumber + aNbExtra, aSegmentEdgeNb + aNbExtra);
|
||||
Handle(Graphic3d_ArrayOfSegments) aSegments = new Graphic3d_ArrayOfSegments (aNodeNumber + aNbExtra, aSegmentEdgeNb + aNbExtra,
|
||||
Standard_False, Standard_True);
|
||||
for (TopTools_IndexedDataMapOfShapeListOfShape::Iterator anEdgeIter (anEdgesMap); anEdgeIter.More(); anEdgeIter.Next())
|
||||
{
|
||||
if (anEdgeIter.Value().Extent() == 0)
|
||||
@@ -379,50 +378,77 @@ namespace
|
||||
continue;
|
||||
}
|
||||
|
||||
const TopoDS_Face& aFace = TopoDS::Face (anEdgeIter.Value().First());
|
||||
Handle(Poly_Triangulation) aTriangulation = BRep_Tool::Triangulation (aFace, aTrsf);
|
||||
if (aTriangulation.IsNull())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
const TopoDS_Edge& anEdge = TopoDS::Edge (anEdgeIter.Key());
|
||||
if (theUpperContinuity < GeomAbs_CN
|
||||
&& anEdgeIter.Value().Extent() >= 2
|
||||
&& BRep_Tool::MaxContinuity (anEdge) > theUpperContinuity)
|
||||
&& anEdgeIter.Value().Extent() >= 2
|
||||
&& BRep_Tool::MaxContinuity (anEdge) > theUpperContinuity)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
Handle(Poly_PolygonOnTriangulation) anEdgePoly = BRep_Tool::PolygonOnTriangulation (anEdge, aTriangulation, aTrsf);
|
||||
if (anEdgePoly.IsNull()
|
||||
|| anEdgePoly->Nodes().Length () < 2)
|
||||
Standard_Integer aFaceIndex = 0;
|
||||
const Standard_Integer aFirstNodeInFace = aSegments->VertexNumber() + 1;
|
||||
for (TopTools_ListOfShape::Iterator aFaceIter (anEdgeIter.Value()); aFaceIter.More(); aFaceIter.Next())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// get edge nodes indexes from face triangulation
|
||||
const TColStd_Array1OfInteger& anEdgeNodes = anEdgePoly->Nodes();
|
||||
|
||||
// collect the edge nodes
|
||||
Standard_Integer aSegmentEdge = aSegments->VertexNumber() + 1;
|
||||
for (Standard_Integer aNodeIdx = anEdgeNodes.Lower(); aNodeIdx <= anEdgeNodes.Upper(); ++aNodeIdx)
|
||||
{
|
||||
// node index in face triangulation
|
||||
// get node and apply location transformation to the node
|
||||
const Standard_Integer aTriIndex = anEdgeNodes.Value (aNodeIdx);
|
||||
gp_Pnt aTriNode = aTriangulation->Node (aTriIndex);
|
||||
if (!aTrsf.IsIdentity())
|
||||
const TopoDS_Face& aFace = TopoDS::Face (aFaceIter.Value());
|
||||
Handle(Poly_Triangulation) aTriangulation = BRep_Tool::Triangulation (aFace, aLoc);
|
||||
if (aTriangulation.IsNull())
|
||||
{
|
||||
aTriNode.Transform (aTrsf);
|
||||
continue;
|
||||
}
|
||||
|
||||
aSegments->AddVertex (aTriNode);
|
||||
if (aNodeIdx != anEdgeNodes.Lower())
|
||||
Standard_Boolean aHasNormals = aTriangulation->HasNormals();
|
||||
Handle(Poly_PolygonOnTriangulation) anEdgePoly = BRep_Tool::PolygonOnTriangulation (anEdge, aTriangulation, aLoc);
|
||||
if (anEdgePoly.IsNull()
|
||||
|| anEdgePoly->Nodes().Length () < 2)
|
||||
{
|
||||
aSegments->AddEdge ( aSegmentEdge);
|
||||
aSegments->AddEdge (++aSegmentEdge);
|
||||
continue;
|
||||
}
|
||||
|
||||
// get edge nodes indexes from face triangulation
|
||||
const TColStd_Array1OfInteger& anEdgeNodes = anEdgePoly->Nodes();
|
||||
const gp_Trsf& aTrsf = aLoc.Transformation();
|
||||
|
||||
// collect the edge nodes
|
||||
Standard_Integer aSegmentEdge = aFirstNodeInFace;
|
||||
for (Standard_Integer aNodeIdx = anEdgeNodes.Lower(); aNodeIdx <= anEdgeNodes.Upper(); ++aNodeIdx)
|
||||
{
|
||||
// node index in face triangulation
|
||||
// get node and apply location transformation to the node
|
||||
const Standard_Integer aTriIndex = anEdgeNodes.Value (aNodeIdx);
|
||||
|
||||
gp_Pnt aTriNode = aTriangulation->Node (aTriIndex);
|
||||
gp_Dir aNorm = aHasNormals ? aTriangulation->Normal (aTriIndex) : gp_Dir();
|
||||
if (aFace.Orientation() == TopAbs_REVERSED)
|
||||
{
|
||||
aNorm.Reverse();
|
||||
}
|
||||
if (!aLoc.IsIdentity())
|
||||
{
|
||||
aTriNode.Transform (aTrsf);
|
||||
aNorm.Transform (aTrsf);
|
||||
}
|
||||
|
||||
if (aFaceIndex == 0)
|
||||
{
|
||||
aSegments->AddVertex (aTriNode, aNorm);
|
||||
if (aNodeIdx != anEdgeNodes.Lower())
|
||||
{
|
||||
aSegments->AddEdge (aSegmentEdge);
|
||||
aSegments->AddEdge (++aSegmentEdge);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
gp_XYZ aNormSum;
|
||||
aSegments->VertexNormal (aSegmentEdge, aNormSum.ChangeCoord (1), aNormSum.ChangeCoord (2), aNormSum.ChangeCoord (3));
|
||||
aNormSum += aNorm.XYZ();
|
||||
aNormSum.Normalize();
|
||||
aSegments->SetVertexNormal (aSegmentEdge, aNormSum.ChangeCoord (1), aNormSum.ChangeCoord (2), aNormSum.ChangeCoord (3));
|
||||
++aSegmentEdge;
|
||||
}
|
||||
}
|
||||
++aFaceIndex;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -588,7 +614,13 @@ void StdPrs_ShadedShape::Add (const Handle (Prs3d_Presentation)& thePrs,
|
||||
if (Handle(Graphic3d_ArrayOfSegments) aBndSegments = fillFaceBoundaries (theShape, theDrawer->FaceBoundaryUpperContinuity()))
|
||||
{
|
||||
Handle(Graphic3d_Group) aPrsGrp = !theGroup.IsNull() ? theGroup : thePrs->NewGroup();
|
||||
aPrsGrp->SetGroupPrimitivesAspect (theDrawer->FaceBoundaryAspect()->Aspect());
|
||||
Handle(Graphic3d_AspectLine3d) aLineAspect = Handle(Graphic3d_AspectLine3d)(theDrawer->FaceBoundaryAspect()->Aspect());
|
||||
if (theDrawer->FaceBoundaryShadingOverride())
|
||||
{
|
||||
Quantity_Color aColor = theDrawer->ShadingAspect()->Color();
|
||||
aLineAspect->SetColor (aColor);
|
||||
}
|
||||
aPrsGrp->SetGroupPrimitivesAspect (aLineAspect);
|
||||
aPrsGrp->AddPrimitiveArray (aBndSegments);
|
||||
}
|
||||
}
|
||||
|
@@ -158,6 +158,8 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI
|
||||
#include <StepShape_GeometricallyBoundedWireframeShapeRepresentation.hxx>
|
||||
#include <StepRepr_GlobalUncertaintyAssignedContext.hxx>
|
||||
#include <StepRepr_GlobalUnitAssignedContext.hxx>
|
||||
#include <StepBasic_GeneralPropertyAssociation.hxx>
|
||||
#include <StepBasic_GeneralPropertyRelationship.hxx>
|
||||
#include <StepBasic_GroupRelationship.hxx>
|
||||
#include <StepShape_HalfSpaceSolid.hxx>
|
||||
#include <StepGeom_Hyperbola.hxx>
|
||||
@@ -639,7 +641,9 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI
|
||||
#include <StepDimTol_GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol.hxx>
|
||||
#include <StepRepr_CompGroupShAspAndCompShAspAndDatumFeatAndShAsp.hxx>
|
||||
#include <StepRepr_CompShAspAndDatumFeatAndShAsp.hxx>
|
||||
#include <StepRepr_BooleanRepresentationItem.hxx>
|
||||
#include <StepRepr_IntegerRepresentationItem.hxx>
|
||||
#include <StepRepr_RealRepresentationItem.hxx>
|
||||
#include <StepRepr_ValueRepresentationItem.hxx>
|
||||
#include <StepAP242_DraughtingModelItemAssociation.hxx>
|
||||
#include <StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.hxx>
|
||||
@@ -1560,6 +1564,10 @@ StepAP214_Protocol::StepAP214_Protocol ()
|
||||
types.Bind(STANDARD_TYPE(StepVisual_CubicBezierTessellatedEdge), 817);
|
||||
types.Bind(STANDARD_TYPE(StepVisual_CubicBezierTriangulatedFace), 818);
|
||||
types.Bind(STANDARD_TYPE(StepVisual_TriangulatedSurfaceSet), 819);
|
||||
types.Bind(STANDARD_TYPE(StepBasic_GeneralPropertyAssociation), 820);
|
||||
types.Bind(STANDARD_TYPE(StepBasic_GeneralPropertyRelationship), 821);
|
||||
types.Bind(STANDARD_TYPE(StepRepr_BooleanRepresentationItem), 822);
|
||||
types.Bind(STANDARD_TYPE(StepRepr_RealRepresentationItem), 823);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -135,6 +135,10 @@ StepBasic_ExternalSource.cxx
|
||||
StepBasic_ExternalSource.hxx
|
||||
StepBasic_GeneralProperty.cxx
|
||||
StepBasic_GeneralProperty.hxx
|
||||
StepBasic_GeneralPropertyAssociation.cxx
|
||||
StepBasic_GeneralPropertyAssociation.hxx
|
||||
StepBasic_GeneralPropertyRelationship.cxx
|
||||
StepBasic_GeneralPropertyRelationship.hxx
|
||||
StepBasic_Group.cxx
|
||||
StepBasic_Group.hxx
|
||||
StepBasic_GroupAssignment.cxx
|
||||
|
117
src/StepBasic/StepBasic_GeneralPropertyAssociation.cxx
Normal file
117
src/StepBasic/StepBasic_GeneralPropertyAssociation.cxx
Normal file
@@ -0,0 +1,117 @@
|
||||
// Copyright (c) 2024 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
|
||||
#include <StepBasic_GeneralPropertyAssociation.hxx>
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(StepBasic_GeneralPropertyAssociation, Standard_Transient)
|
||||
|
||||
//=======================================================================
|
||||
//function : StepBasic_GeneralPropertyAssociation
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
StepBasic_GeneralPropertyAssociation::StepBasic_GeneralPropertyAssociation ()
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Init
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void StepBasic_GeneralPropertyAssociation::Init (const Handle(TCollection_HAsciiString)& aName,
|
||||
const Handle(TCollection_HAsciiString)& aDescription,
|
||||
const Handle(StepBasic_GeneralProperty)& aGeneralProperty,
|
||||
const Handle(StepRepr_PropertyDefinition)& aPropertyDefinition)
|
||||
{
|
||||
theName = aName;
|
||||
|
||||
theDescription = aDescription;
|
||||
|
||||
theGeneralProperty = aGeneralProperty;
|
||||
|
||||
thePropertyDefinition = aPropertyDefinition;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Name
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Handle(TCollection_HAsciiString) StepBasic_GeneralPropertyAssociation::Name() const
|
||||
{
|
||||
return theName;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetName
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void StepBasic_GeneralPropertyAssociation::SetName(const Handle(TCollection_HAsciiString)& aName)
|
||||
{
|
||||
theName = aName;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Description
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Handle(TCollection_HAsciiString) StepBasic_GeneralPropertyAssociation::Description() const
|
||||
{
|
||||
return theDescription;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetDescription
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void StepBasic_GeneralPropertyAssociation::SetDescription (const Handle(TCollection_HAsciiString)& aDescription)
|
||||
{
|
||||
theDescription = aDescription;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GeneralProperty
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Handle(StepBasic_GeneralProperty) StepBasic_GeneralPropertyAssociation::GeneralProperty() const
|
||||
{
|
||||
return theGeneralProperty;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetGeneralProperty
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void StepBasic_GeneralPropertyAssociation::SetGeneralProperty(const Handle(StepBasic_GeneralProperty)& aGeneralProperty)
|
||||
{
|
||||
theGeneralProperty = aGeneralProperty;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : PropertyDefinition
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Handle(StepRepr_PropertyDefinition) StepBasic_GeneralPropertyAssociation::PropertyDefinition() const
|
||||
{
|
||||
return thePropertyDefinition;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetPropertyDefinition
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void StepBasic_GeneralPropertyAssociation::SetPropertyDefinition(const Handle(StepRepr_PropertyDefinition)& aPropertyDefinition)
|
||||
{
|
||||
thePropertyDefinition = aPropertyDefinition;
|
||||
}
|
84
src/StepBasic/StepBasic_GeneralPropertyAssociation.hxx
Normal file
84
src/StepBasic/StepBasic_GeneralPropertyAssociation.hxx
Normal file
@@ -0,0 +1,84 @@
|
||||
// Copyright (c) 2024 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _StepBasic_GeneralPropertyAssociation_HeaderFile
|
||||
#define _StepBasic_GeneralPropertyAssociation_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Standard_Transient.hxx>
|
||||
|
||||
class TCollection_HAsciiString;
|
||||
class StepBasic_GeneralProperty;
|
||||
class StepRepr_PropertyDefinition;
|
||||
|
||||
DEFINE_STANDARD_HANDLE(StepBasic_GeneralPropertyAssociation, Standard_Transient)
|
||||
|
||||
//! Representation of STEP entity GeneralPropertyAssociation
|
||||
class StepBasic_GeneralPropertyAssociation : public Standard_Transient
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Empty constructor
|
||||
Standard_EXPORT StepBasic_GeneralPropertyAssociation();
|
||||
|
||||
//! Initialize all fields (own and inherited)
|
||||
Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& aName,
|
||||
const Handle(TCollection_HAsciiString)& aDescription,
|
||||
const Handle(StepBasic_GeneralProperty)& aGeneralProperty,
|
||||
const Handle(StepRepr_PropertyDefinition)& aPropertyDefinition);
|
||||
|
||||
//! Returns field Name
|
||||
Standard_EXPORT Handle(TCollection_HAsciiString) Name() const;
|
||||
|
||||
//! Set field Name
|
||||
Standard_EXPORT void SetName(const Handle(TCollection_HAsciiString)& Name);
|
||||
|
||||
//! Returns field Description
|
||||
Standard_EXPORT Handle(TCollection_HAsciiString) Description() const;
|
||||
|
||||
//! Set field Description
|
||||
Standard_EXPORT void SetDescription(const Handle(TCollection_HAsciiString)& Description);
|
||||
|
||||
//! Returns field GeneralProperty
|
||||
Standard_EXPORT Handle(StepBasic_GeneralProperty) GeneralProperty() const;
|
||||
|
||||
//! Set field GeneralProperty
|
||||
Standard_EXPORT void SetGeneralProperty(const Handle(StepBasic_GeneralProperty)& GeneralProperty);
|
||||
|
||||
//! Returns field PropertyDefinition
|
||||
Standard_EXPORT Handle(StepRepr_PropertyDefinition) PropertyDefinition() const;
|
||||
|
||||
//! Set field PropertyDefinition
|
||||
Standard_EXPORT void SetPropertyDefinition(const Handle(StepRepr_PropertyDefinition)& PropertyDefinition);
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(StepBasic_GeneralPropertyAssociation, Standard_Transient)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
Handle(TCollection_HAsciiString) theName;
|
||||
Handle(TCollection_HAsciiString) theDescription;
|
||||
Handle(StepBasic_GeneralProperty) theGeneralProperty;
|
||||
Handle(StepRepr_PropertyDefinition) thePropertyDefinition;
|
||||
|
||||
};
|
||||
|
||||
#endif // _StepBasic_GeneralPropertyAssociation_HeaderFile
|
137
src/StepBasic/StepBasic_GeneralPropertyRelationship.cxx
Normal file
137
src/StepBasic/StepBasic_GeneralPropertyRelationship.cxx
Normal file
@@ -0,0 +1,137 @@
|
||||
// Copyright (c) 2024 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
|
||||
#include <StepBasic_GeneralProperty.hxx>
|
||||
#include <StepBasic_GeneralPropertyRelationship.hxx>
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(StepBasic_GeneralPropertyRelationship, Standard_Transient)
|
||||
|
||||
//=======================================================================
|
||||
//function : StepBasic_GeneralPropertyRelationship
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
StepBasic_GeneralPropertyRelationship::StepBasic_GeneralPropertyRelationship ()
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Init
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void StepBasic_GeneralPropertyRelationship::Init(const Handle(TCollection_HAsciiString)& aName,
|
||||
const Standard_Boolean hasDescription,
|
||||
const Handle(TCollection_HAsciiString)& aDescription,
|
||||
const Handle(StepBasic_GeneralProperty)& aRelatingGeneralProperty,
|
||||
const Handle(StepBasic_GeneralProperty)& aRelatedGeneralProperty)
|
||||
{
|
||||
theName = aName;
|
||||
|
||||
defDescription = hasDescription;
|
||||
if (defDescription) {
|
||||
theDescription = aDescription;
|
||||
}
|
||||
else theDescription.Nullify();
|
||||
|
||||
theRelatingGeneralProperty = aRelatingGeneralProperty;
|
||||
|
||||
theRelatedGeneralProperty = aRelatedGeneralProperty;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Name
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Handle(TCollection_HAsciiString) StepBasic_GeneralPropertyRelationship::Name() const
|
||||
{
|
||||
return theName;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetName
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void StepBasic_GeneralPropertyRelationship::SetName(const Handle(TCollection_HAsciiString)& aName)
|
||||
{
|
||||
theName = aName;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : HasDescription
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Boolean StepBasic_GeneralPropertyRelationship::HasDescription() const
|
||||
{
|
||||
return defDescription;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Description
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Handle(TCollection_HAsciiString) StepBasic_GeneralPropertyRelationship::Description() const
|
||||
{
|
||||
return theDescription;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetDescription
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void StepBasic_GeneralPropertyRelationship::SetDescription (const Handle(TCollection_HAsciiString)& aDescription)
|
||||
{
|
||||
defDescription = true;
|
||||
if (aDescription.IsNull())
|
||||
{
|
||||
defDescription = false;
|
||||
}
|
||||
theDescription = aDescription;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : RelatingGeneralProperty
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Handle(StepBasic_GeneralProperty) StepBasic_GeneralPropertyRelationship::RelatingGeneralProperty() const
|
||||
{
|
||||
return theRelatingGeneralProperty;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetRelatingGeneralProperty
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void StepBasic_GeneralPropertyRelationship::SetRelatingGeneralProperty(const Handle(StepBasic_GeneralProperty)& aRelatingGeneralProperty)
|
||||
{
|
||||
theRelatingGeneralProperty = aRelatingGeneralProperty;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : RelatedGeneralProperty
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Handle(StepBasic_GeneralProperty) StepBasic_GeneralPropertyRelationship::RelatedGeneralProperty() const
|
||||
{
|
||||
return theRelatedGeneralProperty;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetRelatedGeneralProperty
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void StepBasic_GeneralPropertyRelationship::SetRelatedGeneralProperty(const Handle(StepBasic_GeneralProperty)& aRelatedGeneralProperty)
|
||||
{
|
||||
theRelatedGeneralProperty = aRelatedGeneralProperty;
|
||||
}
|
88
src/StepBasic/StepBasic_GeneralPropertyRelationship.hxx
Normal file
88
src/StepBasic/StepBasic_GeneralPropertyRelationship.hxx
Normal file
@@ -0,0 +1,88 @@
|
||||
// Copyright (c) 2024 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _StepBasic_GeneralPropertyRelationship_HeaderFile
|
||||
#define _StepBasic_GeneralPropertyRelationship_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Standard_Transient.hxx>
|
||||
|
||||
class TCollection_HAsciiString;
|
||||
class StepBasic_GeneralProperty;
|
||||
|
||||
DEFINE_STANDARD_HANDLE(StepBasic_GeneralPropertyRelationship, Standard_Transient)
|
||||
|
||||
//! Representation of STEP entity GeneralPropertyRelationship
|
||||
class StepBasic_GeneralPropertyRelationship : public Standard_Transient
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Empty constructor
|
||||
Standard_EXPORT StepBasic_GeneralPropertyRelationship();
|
||||
|
||||
//! Initialize all fields (own and inherited)
|
||||
Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& aName,
|
||||
const Standard_Boolean hasDescription,
|
||||
const Handle(TCollection_HAsciiString)& aDescription,
|
||||
const Handle(StepBasic_GeneralProperty)& aRelatingGeneralProperty,
|
||||
const Handle(StepBasic_GeneralProperty)& aRelatedGeneralProperty);
|
||||
|
||||
//! Returns field Name
|
||||
Standard_EXPORT Handle(TCollection_HAsciiString) Name() const;
|
||||
|
||||
//! Set field Name
|
||||
Standard_EXPORT void SetName(const Handle(TCollection_HAsciiString)& Name);
|
||||
|
||||
//! Returns True if optional field Description is defined
|
||||
Standard_EXPORT Standard_Boolean HasDescription() const;
|
||||
|
||||
//! Returns field Description
|
||||
Standard_EXPORT Handle(TCollection_HAsciiString) Description() const;
|
||||
|
||||
//! Set field Description
|
||||
Standard_EXPORT void SetDescription(const Handle(TCollection_HAsciiString)& Description);
|
||||
|
||||
//! Returns field RelatingGeneralProperty
|
||||
Standard_EXPORT Handle(StepBasic_GeneralProperty) RelatingGeneralProperty() const;
|
||||
|
||||
//! Set field RelatingGeneralProperty
|
||||
Standard_EXPORT void SetRelatingGeneralProperty(const Handle(StepBasic_GeneralProperty)& RelatingGeneralProperty);
|
||||
|
||||
//! Returns field RelatedGeneralProperty
|
||||
Standard_EXPORT Handle(StepBasic_GeneralProperty) RelatedGeneralProperty() const;
|
||||
|
||||
//! Set field RelatedGeneralProperty
|
||||
Standard_EXPORT void SetRelatedGeneralProperty(const Handle(StepBasic_GeneralProperty)& RelatedGeneralProperty);
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(StepBasic_GeneralPropertyRelationship, Standard_Transient)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
Standard_Boolean defDescription;
|
||||
Handle(TCollection_HAsciiString) theName;
|
||||
Handle(TCollection_HAsciiString) theDescription;
|
||||
Handle(StepBasic_GeneralProperty) theRelatingGeneralProperty;
|
||||
Handle(StepBasic_GeneralProperty) theRelatedGeneralProperty;
|
||||
|
||||
};
|
||||
|
||||
#endif // _StepBasic_GeneralPropertyRelationship_HeaderFile
|
@@ -62,6 +62,7 @@ Standard_CString StepBasic_MeasureValueMember::Name () const
|
||||
case 13 : return "MASS_MEASURE";
|
||||
case 14 : return "THERMODYNAMIC_TEMPERATURE_MEASURE";
|
||||
case 15 : return "COUNT_MEASURE";
|
||||
case 16 : return "NUMERIC_MEASURE";
|
||||
default : break;
|
||||
}
|
||||
return "";
|
||||
@@ -92,6 +93,7 @@ Standard_Boolean StepBasic_MeasureValueMember::SetName (const Standard_CString
|
||||
else if (name[0] == 'M' && !strcmp (name,"MASS_MEASURE")) thecase = 13;
|
||||
else if (name[1] == 'H' && !strcmp (name,"THERMODYNAMIC_TEMPERATURE_MEASURE")) thecase = 14;
|
||||
else if (name[2] == 'U' && !strcmp (name,"COUNT_MEASURE")) thecase = 15;
|
||||
else if (name[0] == 'N' && !strcmp (name,"NUMERIC_MEASURE")) thecase = 16;
|
||||
else return Standard_False;
|
||||
|
||||
return Standard_True;
|
||||
|
@@ -58,6 +58,7 @@ void StepData_ConfParameters::InitFromStatic()
|
||||
ReadName = Interface_Static::IVal("read.name") == 1;
|
||||
ReadLayer = Interface_Static::IVal("read.layer") == 1;
|
||||
ReadProps = Interface_Static::IVal("read.props") == 1;
|
||||
ReadMetadata = Interface_Static::IVal("read.metadata") == 1;
|
||||
|
||||
WritePrecisionMode = (StepData_ConfParameters::WriteMode_PrecisionMode)Interface_Static::IVal("write.precision.mode");
|
||||
WritePrecisionVal = Interface_Static::RVal("write.precision.val");
|
||||
|
@@ -166,6 +166,7 @@ public:
|
||||
bool ReadName = true; //<! NameMode is used to indicate read Name or not
|
||||
bool ReadLayer = true; //<! LayerMode is used to indicate read Layers or not
|
||||
bool ReadProps = true; //<! PropsMode is used to indicate read Validation properties or not
|
||||
bool ReadMetadata = false; //! Parameter for metadata reading
|
||||
|
||||
// Write
|
||||
WriteMode_PrecisionMode WritePrecisionMode = WriteMode_PrecisionMode_Average; //<! Specifies the mode of writing the resolution value into the STEP file
|
||||
|
@@ -1000,7 +1000,7 @@ Standard_Boolean StepData_StepReaderData::ReadAny(const Standard_Integer num,
|
||||
case Interface_ParamInteger: {
|
||||
if (!val.IsNull()) {
|
||||
DeclareAndCast(StepData_SelectMember, sm, val);
|
||||
sm->SetInteger(atoi(str));
|
||||
sm->SetReal(Interface_FileReaderData::Fastof(str));
|
||||
return Standard_True;
|
||||
}
|
||||
Handle(StepData_SelectInt) sin = new StepData_SelectInt;
|
||||
@@ -1358,16 +1358,27 @@ Standard_Boolean StepData_StepReaderData::ReadInteger(const Standard_Integer num
|
||||
Standard_Integer& val) const
|
||||
{
|
||||
Handle(String) errmess; // Null si pas d erreur
|
||||
Standard_Boolean warn = Standard_False;
|
||||
if (nump > 0 && nump <= NbParams(num)) {
|
||||
const Interface_FileParameter& FP = Param(num, nump);
|
||||
if (FP.ParamType() == Interface_ParamInteger) val = atoi(FP.CValue());
|
||||
else errmess = new String("Parameter n0.%d (%s) not an Integer");
|
||||
if (FP.ParamType() == Interface_ParamInteger)
|
||||
val = atoi(FP.CValue());
|
||||
else if (FP.ParamType() == Interface_ParamReal)
|
||||
{
|
||||
val = static_cast<Standard_Integer>(std::round(Interface_FileReaderData::Fastof(FP.CValue())));
|
||||
if (acceptvoid) warn = Standard_True;
|
||||
errmess = new String("Parameter n0.%d (%s) was rounded");
|
||||
}
|
||||
if (FP.ParamType() != Interface_ParamInteger &&
|
||||
FP.ParamType() != Interface_ParamReal)
|
||||
errmess = new String("Parameter n0.%d (%s) not an Integer");
|
||||
}
|
||||
else errmess = new String("Parameter n0.%d (%s) absent");
|
||||
|
||||
if (errmess.IsNull()) return Standard_True;
|
||||
sprintf(txtmes, errmess->ToCString(), nump, mess);
|
||||
ach->AddFail(txtmes, errmess->ToCString());
|
||||
if (warn) ach->AddWarning(txtmes, errmess->ToCString());
|
||||
else ach->AddFail(txtmes, errmess->ToCString());
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
|
@@ -12,6 +12,8 @@ StepRepr_AssemblyComponentUsageSubstitute.cxx
|
||||
StepRepr_AssemblyComponentUsageSubstitute.hxx
|
||||
StepRepr_BetweenShapeAspect.cxx
|
||||
StepRepr_BetweenShapeAspect.hxx
|
||||
StepRepr_BooleanRepresentationItem.cxx
|
||||
StepRepr_BooleanRepresentationItem.hxx
|
||||
StepRepr_CentreOfSymmetry.cxx
|
||||
StepRepr_CentreOfSymmetry.hxx
|
||||
StepRepr_CharacterizedDefinition.cxx
|
||||
@@ -110,6 +112,8 @@ StepRepr_PropertyDefinitionRepresentation.cxx
|
||||
StepRepr_PropertyDefinitionRepresentation.hxx
|
||||
StepRepr_QuantifiedAssemblyComponentUsage.cxx
|
||||
StepRepr_QuantifiedAssemblyComponentUsage.hxx
|
||||
StepRepr_RealRepresentationItem.cxx
|
||||
StepRepr_RealRepresentationItem.hxx
|
||||
StepRepr_Representation.cxx
|
||||
StepRepr_Representation.hxx
|
||||
StepRepr_RepresentationContext.cxx
|
||||
|
28
src/StepRepr/StepRepr_BooleanRepresentationItem.cxx
Normal file
28
src/StepRepr/StepRepr_BooleanRepresentationItem.cxx
Normal file
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) 2024 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <StepRepr_BooleanRepresentationItem.hxx>
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(StepRepr_BooleanRepresentationItem, StepRepr_RepresentationItem)
|
||||
|
||||
StepRepr_BooleanRepresentationItem::StepRepr_BooleanRepresentationItem()
|
||||
{
|
||||
}
|
||||
|
||||
void StepRepr_BooleanRepresentationItem::Init(const Handle(TCollection_HAsciiString)& theName,
|
||||
const Standard_Boolean theValue)
|
||||
{
|
||||
value = theValue;
|
||||
StepRepr_RepresentationItem::Init(theName);
|
||||
}
|
52
src/StepRepr/StepRepr_BooleanRepresentationItem.hxx
Normal file
52
src/StepRepr/StepRepr_BooleanRepresentationItem.hxx
Normal file
@@ -0,0 +1,52 @@
|
||||
// Copyright (c) 2024 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _StepRepr_BooleanRepresentationItem_HeaderFile
|
||||
#define _StepRepr_BooleanRepresentationItem_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <StepRepr_RepresentationItem.hxx>
|
||||
class TCollection_HAsciiString;
|
||||
|
||||
class StepRepr_BooleanRepresentationItem;
|
||||
DEFINE_STANDARD_HANDLE(StepRepr_BooleanRepresentationItem, StepRepr_RepresentationItem)
|
||||
|
||||
class StepRepr_BooleanRepresentationItem : public StepRepr_RepresentationItem
|
||||
{
|
||||
public:
|
||||
|
||||
//! Returns a BooleanRepresentationItem
|
||||
Standard_EXPORT StepRepr_BooleanRepresentationItem();
|
||||
|
||||
Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& theName, const Standard_Boolean theValue);
|
||||
|
||||
inline void SetValue(const Standard_Boolean theValue)
|
||||
{
|
||||
value = theValue;
|
||||
}
|
||||
|
||||
inline Standard_Boolean Value() const
|
||||
{
|
||||
return value;
|
||||
}
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(StepRepr_BooleanRepresentationItem, StepRepr_RepresentationItem)
|
||||
|
||||
private:
|
||||
|
||||
Standard_Boolean value;
|
||||
};
|
||||
|
||||
#endif // _StepRepr_BooleanRepresentationItem_HeaderFile
|
28
src/StepRepr/StepRepr_RealRepresentationItem.cxx
Normal file
28
src/StepRepr/StepRepr_RealRepresentationItem.cxx
Normal file
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) 2024 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <StepRepr_RealRepresentationItem.hxx>
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(StepRepr_RealRepresentationItem, StepRepr_RepresentationItem)
|
||||
|
||||
StepRepr_RealRepresentationItem::StepRepr_RealRepresentationItem()
|
||||
{
|
||||
}
|
||||
|
||||
void StepRepr_RealRepresentationItem::Init(const Handle(TCollection_HAsciiString)& theName,
|
||||
const Standard_Real theValue)
|
||||
{
|
||||
value = theValue;
|
||||
StepRepr_RepresentationItem::Init(theName);
|
||||
}
|
53
src/StepRepr/StepRepr_RealRepresentationItem.hxx
Normal file
53
src/StepRepr/StepRepr_RealRepresentationItem.hxx
Normal file
@@ -0,0 +1,53 @@
|
||||
// Copyright (c) 2024 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _StepRepr_RealRepresentationItem_HeaderFile
|
||||
#define _StepRepr_RealRepresentationItem_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <StepRepr_RepresentationItem.hxx>
|
||||
class TCollection_HAsciiString;
|
||||
|
||||
class StepRepr_RealRepresentationItem;
|
||||
DEFINE_STANDARD_HANDLE(StepRepr_RealRepresentationItem, StepRepr_RepresentationItem)
|
||||
|
||||
class StepRepr_RealRepresentationItem : public StepRepr_RepresentationItem
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//! Returns a RealRepresentationItem
|
||||
Standard_EXPORT StepRepr_RealRepresentationItem();
|
||||
|
||||
Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& theName, const Standard_Real theValue);
|
||||
|
||||
inline void SetValue(const Standard_Real theValue)
|
||||
{
|
||||
value = theValue;
|
||||
}
|
||||
|
||||
inline Standard_Real Value() const
|
||||
{
|
||||
return value;
|
||||
}
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(StepRepr_RealRepresentationItem, StepRepr_RepresentationItem)
|
||||
|
||||
private:
|
||||
|
||||
Standard_Real value;
|
||||
};
|
||||
|
||||
#endif // _StepRepr_RealRepresentationItem_HeaderFile
|
@@ -1713,6 +1713,11 @@ struct ViewerTest_AspectsChangeSet
|
||||
Standard_Integer ToSetTypeOfFaceBoundaryLine;
|
||||
Aspect_TypeOfLine TypeOfFaceBoundaryLine;
|
||||
|
||||
Standard_Integer ToSetFaceBoundaryShading;
|
||||
Standard_Integer ToFaceBoundaryEdgeColorOverride;
|
||||
Graphic3d_TypeOfShadingModel FaceBoundaryShading;
|
||||
TCollection_AsciiString FaceBoundaryShadingModelName;
|
||||
|
||||
Standard_Integer ToSetMaxParamValue;
|
||||
Standard_Real MaxParamValue;
|
||||
|
||||
@@ -1787,6 +1792,9 @@ struct ViewerTest_AspectsChangeSet
|
||||
FaceBoundaryWidth (1.0f),
|
||||
ToSetTypeOfFaceBoundaryLine(0),
|
||||
TypeOfFaceBoundaryLine (Aspect_TOL_SOLID),
|
||||
ToSetFaceBoundaryShading (0),
|
||||
ToFaceBoundaryEdgeColorOverride (0),
|
||||
FaceBoundaryShading (Graphic3d_TypeOfShadingModel_DEFAULT),
|
||||
//
|
||||
ToSetMaxParamValue (0),
|
||||
MaxParamValue (500000),
|
||||
@@ -1828,6 +1836,7 @@ struct ViewerTest_AspectsChangeSet
|
||||
&& ToSetFaceBoundaryUpperContinuity == 0
|
||||
&& ToSetFaceBoundaryColor == 0
|
||||
&& ToSetFaceBoundaryWidth == 0
|
||||
&& ToSetFaceBoundaryShading == 0
|
||||
&& ToSetTypeOfFaceBoundaryLine == 0
|
||||
&& ToSetMaxParamValue == 0
|
||||
&& ToSetSensitivity == 0
|
||||
@@ -1875,6 +1884,12 @@ struct ViewerTest_AspectsChangeSet
|
||||
Message::SendFail() << "Error: the free boundary width should be within [1; 10] range (specified " << FreeBoundaryWidth << ")";
|
||||
isOk = Standard_False;
|
||||
}
|
||||
if (ToSetFaceBoundaryShading == 1
|
||||
&& (FaceBoundaryShading < Graphic3d_TypeOfShadingModel_DEFAULT || FaceBoundaryShading > Graphic3d_TypeOfShadingModel_PbrFacet))
|
||||
{
|
||||
Message::SendFail() << "Error: unknown face boundary shading model " << FaceBoundaryShadingModelName << ".";
|
||||
isOk = Standard_False;
|
||||
}
|
||||
if (MaxParamValue < 0.0)
|
||||
{
|
||||
Message::SendFail() << "Error: the max parameter value should be greater than zero (specified " << MaxParamValue << ")";
|
||||
@@ -2034,6 +2049,16 @@ struct ViewerTest_AspectsChangeSet
|
||||
theDrawer->FaceBoundaryAspect()->SetWidth (FaceBoundaryWidth);
|
||||
}
|
||||
}
|
||||
if (ToSetFaceBoundaryShading != 0)
|
||||
{
|
||||
if (ToSetFaceBoundaryShading != -1
|
||||
|| theDrawer->HasOwnFaceBoundaryAspect())
|
||||
{
|
||||
toRecompute = theDrawer->SetupOwnFaceBoundaryAspect (aDefDrawer) || toRecompute;
|
||||
theDrawer->FaceBoundaryAspect()->Aspect()->SetShadingModel (FaceBoundaryShading);
|
||||
theDrawer->SetFaceBoundaryShadingOverride (ToFaceBoundaryEdgeColorOverride);
|
||||
}
|
||||
}
|
||||
if (ToSetTypeOfFaceBoundaryLine != 0)
|
||||
{
|
||||
if (ToSetTypeOfFaceBoundaryLine != -1
|
||||
@@ -2389,6 +2414,17 @@ static Standard_Integer VAspects (Draw_Interpretor& theDI,
|
||||
if (aNames.Size() >= 2
|
||||
&& aNames.Value (2).IsIntegerValue())
|
||||
{
|
||||
if (aNames.Size() == 9 && aNames.Value (9).IsIntegerValue())
|
||||
{
|
||||
if (ViewerTest::ParseShadingModel (aNames.Value (8).ToCString(), aChangeSet->FaceBoundaryShading)
|
||||
&& (aNames.Value (9).IsIntegerValue() == 0 || aNames.Value (9).IsIntegerValue() == 1))
|
||||
{
|
||||
aChangeSet->ToSetFaceBoundaryShading = 1;
|
||||
aChangeSet->ToFaceBoundaryEdgeColorOverride = aNames.Value (9).IsIntegerValue();
|
||||
aNames.Remove (9);
|
||||
aNames.Remove (8);
|
||||
}
|
||||
}
|
||||
if (aNames.Size() == 7)
|
||||
{
|
||||
if (ViewerTest::ParseLineType (aNames.Value (7).ToCString(), aChangeSet->TypeOfFaceBoundaryLine))
|
||||
@@ -3148,6 +3184,29 @@ static Standard_Integer VAspects (Draw_Interpretor& theDI,
|
||||
aChangeSet->ToSetShadingModel = -1;
|
||||
aChangeSet->ShadingModel = Graphic3d_TypeOfShadingModel_DEFAULT;
|
||||
}
|
||||
else if (anArg == "-setboundaryshading")
|
||||
{
|
||||
aChangeSet->ToSetFaceBoundaryShading = 1;
|
||||
aChangeSet->FaceBoundaryShadingModelName = theArgVec[++anArgIter];
|
||||
if (!ViewerTest::ParseShadingModel (theArgVec[anArgIter], aChangeSet->FaceBoundaryShading))
|
||||
{
|
||||
Message::SendFail() << "Error: wrong syntax at " << anArg;
|
||||
return 1;
|
||||
}
|
||||
Standard_Integer anOverrideFlag = Draw::Atoi (theArgVec[++anArgIter]);
|
||||
if (!(anOverrideFlag == 0 || anOverrideFlag == 1))
|
||||
{
|
||||
Message::SendFail() << "Error: wrong syntax at " << anArg;
|
||||
return 1;
|
||||
}
|
||||
aChangeSet->ToFaceBoundaryEdgeColorOverride = anOverrideFlag;
|
||||
}
|
||||
else if (anArg == "-unsetboundaryshading")
|
||||
{
|
||||
aChangeSet->ToSetFaceBoundaryShading = -1;
|
||||
aChangeSet->ToFaceBoundaryEdgeColorOverride = 0;
|
||||
aChangeSet->FaceBoundaryShading = Graphic3d_TypeOfShadingModel_Unlit;
|
||||
}
|
||||
else if (anArg == "-setinterior"
|
||||
|| anArg == "-setinteriorstyle"
|
||||
|| anArg == "-interior"
|
||||
@@ -3272,6 +3331,8 @@ static Standard_Integer VAspects (Draw_Interpretor& theDI,
|
||||
aChangeSet->FaceBoundaryWidth = 1.0f;
|
||||
aChangeSet->ToSetTypeOfFaceBoundaryLine = -1;
|
||||
aChangeSet->TypeOfFaceBoundaryLine = Aspect_TOL_SOLID;
|
||||
aChangeSet->ToSetFaceBoundaryShading = -1;
|
||||
aChangeSet->FaceBoundaryShading = Graphic3d_TypeOfShadingModel_DEFAULT;
|
||||
//
|
||||
aChangeSet->ToSetHatch = -1;
|
||||
aChangeSet->StdHatchStyle = -1;
|
||||
@@ -6804,6 +6865,8 @@ vaspects [-noupdate|-update] [name1 [name2 [...]] | -defaults] [-subshapes subna
|
||||
[-sensitivity {selection_mode} {value}]
|
||||
[-shadingModel {unlit|flat|gouraud|phong|pbr|pbr_facet}]
|
||||
[-unsetShadingModel]
|
||||
[-setboundaryshading {unlit|flat|gouraud|phong|pbr|pbr_facet}]
|
||||
[-unsetboundaryshading]
|
||||
[-interior {solid|hatch|hidenline|point}] [-setHatch HatchStyle]
|
||||
[-unsetInterior]
|
||||
[-faceBoundaryDraw {0|1}] [-mostContinuity {c0|g1|c1|g2|c2|c3|cn}]
|
||||
|
@@ -1197,10 +1197,10 @@ static Standard_Integer XShowFaceBoundary (Draw_Interpretor& di,
|
||||
Standard_Integer argc,
|
||||
const char ** argv)
|
||||
{
|
||||
if (( argc != 4 && argc < 7 ) || argc > 9)
|
||||
if (( argc != 4 && argc < 7 ) || argc > 11)
|
||||
{
|
||||
di << "Usage :\n " << argv[0]
|
||||
<< " Doc Label IsOn [R G B [LineWidth [LineStyle]]]\n"
|
||||
<< " Doc Label IsOn [R G B [LineWidth [LineStyle]]] Model Shading\n"
|
||||
<< " Doc - is the document name. \n"
|
||||
<< " Label - is the shape label. \n"
|
||||
<< " IsOn - flag indicating whether the boundaries\n"
|
||||
@@ -1216,7 +1216,12 @@ static Standard_Integer XShowFaceBoundary (Draw_Interpretor& di,
|
||||
<< " 1 - dashed \n"
|
||||
<< " 2 - dot \n"
|
||||
<< " 3 - dashdot\n"
|
||||
<< " (default is solid)";
|
||||
<< " (default is solid)\n"
|
||||
<< " Model - shading model [unlit|phong|pbr|gouraud]\n"
|
||||
<< " Shading - flag indicating if the boundaries\n"
|
||||
<< " should be shaded:"
|
||||
<< " 0 - no override edge color"
|
||||
<< " 1 - override edge color";
|
||||
|
||||
return 1;
|
||||
}
|
||||
@@ -1310,6 +1315,17 @@ static Standard_Integer XShowFaceBoundary (Draw_Interpretor& di,
|
||||
|
||||
aDrawer->SetFaceBoundaryAspect (aBoundaryAspect);
|
||||
|
||||
// set shading properties for face boundaries
|
||||
if (argc == 11)
|
||||
{
|
||||
Graphic3d_TypeOfShadingModel aShadingModel;
|
||||
if (ViewerTest::ParseShadingModel (argv[9], aShadingModel))
|
||||
{
|
||||
aDrawer->FaceBoundaryAspect()->Aspect()->SetShadingModel (aShadingModel);
|
||||
aDrawer->SetFaceBoundaryShadingOverride (Draw::Atoi (argv[10]) == 1 ? Standard_True : Standard_False);
|
||||
}
|
||||
}
|
||||
|
||||
aContext->Redisplay (anInteractive, Standard_True);
|
||||
|
||||
return 0;
|
||||
|
@@ -693,12 +693,11 @@ static Standard_Integer ReadStep(Draw_Interpretor& theDI,
|
||||
}
|
||||
|
||||
STEPCAFControl_Reader aReader(XSDRAW::Session(), isFileMode);
|
||||
|
||||
if (!aModeStr.IsEmpty())
|
||||
{
|
||||
Standard_Boolean aMode = Standard_True;
|
||||
|
||||
for (Standard_Integer i = 1; aModeStr.Value(i); ++i)
|
||||
for (Standard_Integer i = 1; i <= aModeStr.Length(); ++i)
|
||||
{
|
||||
switch (aModeStr.Value(i))
|
||||
{
|
||||
@@ -720,6 +719,9 @@ static Standard_Integer ReadStep(Draw_Interpretor& theDI,
|
||||
case 'v':
|
||||
aReader.SetPropsMode(aMode);
|
||||
break;
|
||||
case 'm':
|
||||
aReader.SetMetaMode(aMode);
|
||||
break;
|
||||
default:
|
||||
Message::SendFail() << "Syntax error at '" << aModeStr << "'\n";
|
||||
return 1;
|
||||
|
17
tests/bugs/step/bug33261
Normal file
17
tests/bugs/step/bug33261
Normal file
@@ -0,0 +1,17 @@
|
||||
puts "======="
|
||||
puts "0033261: Data Exchange, Step Import - Empty shape after reading process"
|
||||
puts "======="
|
||||
|
||||
pload OCAF MODELING
|
||||
|
||||
# Read file
|
||||
ReadStep D [locate_data_file bug33261.stp]
|
||||
|
||||
# get document model as a single shape
|
||||
XGetOneShape S1 D
|
||||
|
||||
# check number of subshapes in the shape restored from STEP
|
||||
checknbshapes S1 -face 2025 -solid 24 -compound 100
|
||||
|
||||
Close D -silent
|
||||
unset S1
|
@@ -44,6 +44,7 @@ provider.STEP.OCC.read.color : 1
|
||||
provider.STEP.OCC.read.name : 1
|
||||
provider.STEP.OCC.read.layer : 1
|
||||
provider.STEP.OCC.read.props : 1
|
||||
provider.STEP.OCC.read.metadata : 0
|
||||
provider.STEP.OCC.write.precision.mode : 0
|
||||
provider.STEP.OCC.write.precision.val : 0.0001
|
||||
provider.STEP.OCC.write.assembly : 0
|
||||
|
@@ -44,6 +44,7 @@ provider.STEP.OCC.read.color : 1
|
||||
provider.STEP.OCC.read.name : 1
|
||||
provider.STEP.OCC.read.layer : 1
|
||||
provider.STEP.OCC.read.props : 1
|
||||
provider.STEP.OCC.read.metadata : 0
|
||||
provider.STEP.OCC.write.precision.mode : 0
|
||||
provider.STEP.OCC.write.precision.val : 0.0001
|
||||
provider.STEP.OCC.write.assembly : 0
|
||||
|
5
tests/metadata/begin
Normal file
5
tests/metadata/begin
Normal file
@@ -0,0 +1,5 @@
|
||||
pload DCAF
|
||||
pload XDE
|
||||
|
||||
cpulimit 1000
|
||||
|
98
tests/metadata/end
Normal file
98
tests/metadata/end
Normal file
@@ -0,0 +1,98 @@
|
||||
# Set flag dump_file to 1 in order to regenerate script files with actual data
|
||||
# used as reference. In this mode all tests intentionally report failure.
|
||||
set dump_file 0
|
||||
########################################################################
|
||||
set mist 0;
|
||||
set todo_msg ""
|
||||
set todo_mask "puts \"TODO CR00000 ALL: "
|
||||
set end_line "\" \n"
|
||||
##################################################################
|
||||
|
||||
# Read original file
|
||||
if { [string length $filename] > 1} {
|
||||
set path_file [locate_data_file $filename]
|
||||
if { [catch { ReadFile D $path_file -conf $conf} catch_result] } {
|
||||
set err_msg "Error: file was not read - exception "
|
||||
puts $err_msg
|
||||
append todo_msg $todo_mask $err_msg $end_line
|
||||
set mist 1
|
||||
}
|
||||
} else {
|
||||
set mist 1
|
||||
}
|
||||
|
||||
# Get information about translation
|
||||
if { $mist < 1} {
|
||||
puts ""
|
||||
set prop [ XGetProperties D ]
|
||||
|
||||
if { [llength $prop] < 0 } {
|
||||
puts " Metadata was NOT provided"
|
||||
}
|
||||
}
|
||||
if { $mist < 1} {
|
||||
# Close the document
|
||||
if { [catch { Close D } catch_result] } {
|
||||
set err_msg "Error : cannot close a document D - exception"
|
||||
puts $err_msg
|
||||
append todo_msg $todo_mask $err_msg $end_line
|
||||
}
|
||||
}
|
||||
|
||||
if { $mist != 1 } {
|
||||
puts ""
|
||||
set result ""
|
||||
append result [format $prop]
|
||||
}
|
||||
|
||||
set ref_Compare 0
|
||||
# Put reference data to the test script file if option "dump" is set
|
||||
if { $dump_file == 1 } {
|
||||
set fd_stream [open $dirname/$groupname/$gridname/$casename w]
|
||||
fconfigure $fd_stream -encoding utf-8
|
||||
puts $fd_stream "# !!!! This file is generated automatically, do not edit manually! See end script"
|
||||
puts $fd_stream "set filename $filename"
|
||||
if { $mist != 1 } {
|
||||
puts $fd_stream ""
|
||||
puts $fd_stream "set ref_data \{"
|
||||
puts $fd_stream $result
|
||||
puts $fd_stream "\}"
|
||||
}
|
||||
close $fd_stream
|
||||
} elseif { $mist != 1 } {
|
||||
puts "========================== Comparison with reference data ========"
|
||||
|
||||
# Comparison of reference data with obtained result
|
||||
set ref_list [split $ref_data \n]
|
||||
set cur_list [split $result \n]
|
||||
set nb_ref [llength $ref_list]
|
||||
for { set i 0 } { $i < $nb_ref } { incr i } {
|
||||
set j [expr $i + 1]
|
||||
set refstr [lindex $ref_list $j]
|
||||
set curstr [lindex $cur_list $i]
|
||||
set isOK 1;
|
||||
|
||||
if {[string equal $refstr $curstr] == 0} {
|
||||
incr ref_Compare
|
||||
puts "Reference data - $refstr\n"
|
||||
puts "Current data - $curstr\n"
|
||||
puts "----------------------------------------------\n"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if { $dump_file != 0 } {
|
||||
puts "Error : Running in regeneration mode, comparison was not performed!"
|
||||
if { $mist != 1 } {
|
||||
puts "Generation of test file $groupname/$gridname/$casename successful"
|
||||
} else {
|
||||
puts "Generation of reference data failed"
|
||||
}
|
||||
} else {
|
||||
if { $ref_Compare >= 1} {
|
||||
puts "Error : differences with reference data found : $ref_Compare"
|
||||
} else {
|
||||
puts "Comparison of current result with reference data - OK\n"
|
||||
}
|
||||
}
|
||||
puts "TEST COMPLETED"
|
1
tests/metadata/grids.list
Normal file
1
tests/metadata/grids.list
Normal file
@@ -0,0 +1 @@
|
||||
001 step
|
11
tests/metadata/parse.rules
Normal file
11
tests/metadata/parse.rules
Normal file
@@ -0,0 +1,11 @@
|
||||
FAILED /\bFaulty\b/ error
|
||||
IGNORE /Software error/ message in tpstat
|
||||
IGNORE /Syntax error/ message in data c
|
||||
IGNORE /Transfer error/ message in tpstat
|
||||
IGNORE /Operator FixShape failed with exception/ message during reading
|
||||
IGNORE /Error on writing file/ message during writing file
|
||||
IGNORE /StepFile Error/ message during loading step file
|
||||
IGNORE /StepToTopoDS, GeometricSet/exception
|
||||
IGNORE /OSD_Exception_ACCESS_VIOLATION/ exception during reading step
|
||||
IGNORE /Exception Raised while reading Step File/ exception during reading step file
|
||||
IGNORE /Warning: ShapeFix_.* Exception/ internal exceptions caught by FixShape
|
30
tests/metadata/step/A1
Normal file
30
tests/metadata/step/A1
Normal file
@@ -0,0 +1,30 @@
|
||||
# !!!! This file is generated automatically, do not edit manually! See end script
|
||||
set filename bug28345_30338.stp
|
||||
|
||||
set ref_data {
|
||||
Property for [0:1:1:1]:
|
||||
H_CIP : 55.545955351400004
|
||||
Property for [0:1:1:2]:
|
||||
H : 45
|
||||
E : 55
|
||||
B : 16
|
||||
I : 15
|
||||
A : 3
|
||||
D : 3
|
||||
C : 140
|
||||
F : 0.29999999999999999
|
||||
DESCRIPTION :
|
||||
MODELED_BY :
|
||||
Property for [0:1:1:3]:
|
||||
H : 45
|
||||
E : 55
|
||||
B : 16
|
||||
I : 15
|
||||
A : 3
|
||||
D : 3
|
||||
C : 140
|
||||
F : 0.29999999999999999
|
||||
DESCRIPTION :
|
||||
MODELED_BY :
|
||||
|
||||
}
|
27
tests/metadata/step/A2
Normal file
27
tests/metadata/step/A2
Normal file
@@ -0,0 +1,27 @@
|
||||
# !!!! This file is generated automatically, do not edit manually! See end script
|
||||
set filename bug28389_CONFIDENTIAL_SHEET_METAL_F3D.stp
|
||||
|
||||
set ref_data {
|
||||
Property for [0:1:1:1]:
|
||||
yCenterOfGravity : 0.1148447698
|
||||
Ixz : 9.3210000000000004e-07
|
||||
Izx : 9.3210000000000004e-07
|
||||
OriginY : 0
|
||||
Surface : 0.34595390710000001
|
||||
Volume : 0.0001375456
|
||||
Iyz : -1.2030000000000001e-07
|
||||
zCenterOfGravity : -0.056064514900000001
|
||||
Iyy : 3.6385e-06
|
||||
Ixy : 2.044e-07
|
||||
xCenterOfGravity : -0.12673526900000001
|
||||
Izz : 3.3558999999999999e-06
|
||||
Density : 1000
|
||||
Ixx : 1.7740000000000001e-06
|
||||
Izy : -1.2030000000000001e-07
|
||||
Mass : 0.13754561600000001
|
||||
Iyx : 2.044e-07
|
||||
OriginX : 0
|
||||
OriginZ : 0
|
||||
JoggleFormula :
|
||||
|
||||
}
|
24
tests/metadata/step/A3
Normal file
24
tests/metadata/step/A3
Normal file
@@ -0,0 +1,24 @@
|
||||
# !!!! This file is generated automatically, do not edit manually! See end script
|
||||
set filename bug28444_nist_ftc_06_asme1_ct5240_rd.stp
|
||||
|
||||
set ref_data {
|
||||
Property for [0:1:1:1]:
|
||||
yCenterOfGravity : 0.0289950044
|
||||
Ixz : 0
|
||||
Izx : 0
|
||||
Surface : 0.28317040780000002
|
||||
Volume : 0.0033238733999999999
|
||||
Iyz : -1.3068999999999999e-06
|
||||
zCenterOfGravity : -0.10963042420000001
|
||||
Iyy : 4.46342e-05
|
||||
Ixy : 0
|
||||
xCenterOfGravity : -0
|
||||
Izz : 2.63853e-05
|
||||
Density : 1000
|
||||
Length : 0
|
||||
Ixx : 2.16819e-05
|
||||
Izy : -1.3068999999999999e-06
|
||||
Mass : 3.3238733752999998
|
||||
Iyx : 0
|
||||
|
||||
}
|
617
tests/metadata/step/A4
Normal file
617
tests/metadata/step/A4
Normal file
@@ -0,0 +1,617 @@
|
||||
# !!!! This file is generated automatically, do not edit manually! See end script
|
||||
set filename bug29525_rev_part_neu_01.prt_converted_from_datakit.stp
|
||||
|
||||
set ref_data {
|
||||
Property for [0:1:1:1]:
|
||||
PRO_MP_ALT_COGX : ->
|
||||
D_BASE_UNIT SOURCE : User-Defined
|
||||
PRO_MP_TRF_21 DESCRIPTION : NULL
|
||||
PRO_MP_IXY DESCRIPTION : NULL
|
||||
PRO_MP_VOLUME ACCESS : Locked
|
||||
XSEC_NAME DESCRIPTION : NULL
|
||||
MC_ERRORS DESCRIPTION : NULL
|
||||
I_CUSTOMER_PROJ ACCESS : Full
|
||||
PRO_MP_TRF_23 DESIGNATED : NO
|
||||
PRO_MP_COGY DESIGNATED : NO
|
||||
PRO_MP_COGY ACCESS : Locked
|
||||
GEWINDE_TIEFE : 16.320000
|
||||
PRO_MP_ALT_IYY ACCESS : Full
|
||||
PRO_MP_ALT_MASS SOURCE : Alternate Mass Prop
|
||||
PRO_MP_ALT_COGY DESCRIPTION : NULL
|
||||
D_DOC_CLASS DESCRIPTION : NULL
|
||||
MBD SOURCE : User-Defined
|
||||
PRO_MP_ALT_INERTIA_ORIGIN DESIGNATED : NO
|
||||
I_ECM DESCRIPTION : NULL
|
||||
D_DEPARTMENT DESIGNATED : YES
|
||||
I_3D_RELEASE DESCRIPTION : NULL
|
||||
I_APP_VERSION DESCRIPTION : NULL
|
||||
PRO_MP_ALT_INERTIA_ORIGIN : PRO_MP_ALT_CSYS
|
||||
PRO_MP_TRF_31 DESCRIPTION : NULL
|
||||
PRO_MP_AREA SOURCE : Mass Properties
|
||||
GEWINDE_DURCHM : 8.000000
|
||||
PDMREV DESIGNATED : NO
|
||||
D_LOGIN ACCESS : Full
|
||||
PRO_MP_ALT_IXY DESIGNATED : NO
|
||||
D_LOCATION SOURCE : User-Defined
|
||||
PRO_MP_ALT_VOLUME DESCRIPTION : NULL
|
||||
PDMREV DESCRIPTION : NULL
|
||||
MC_ERRORS : 0
|
||||
PRO_MP_TRF_13 DESCRIPTION : NULL
|
||||
PTC_WM_LIFECYCLE : CONTI_CAD_Lifecycle
|
||||
D_DOC_PART DESIGNATED : YES
|
||||
PRO_MP_MASS DESIGNATED : NO
|
||||
PRO_MP_COGY : ->
|
||||
PRO_MP_AREA DESCRIPTION : NULL
|
||||
PROI_REVISION ACCESS : Limited
|
||||
PRO_MP_DENSITY DESIGNATED : NO
|
||||
I_CUSTOMER_PROJ DESIGNATED : YES
|
||||
PTC_MODIFIED DESCRIPTION : NULL
|
||||
D_ECM_DESCRIPTION : -
|
||||
D_FORMAT : -
|
||||
PRO_MP_ALT_IZZ ACCESS : Full
|
||||
PRO_MP_IXX DESCRIPTION : NULL
|
||||
PROI_RELEASE ACCESS : Limited
|
||||
BOHR_DURCHM ACCESS : Locked
|
||||
PRO_MP_TRF_32 DESIGNATED : NO
|
||||
PTC_WM_MODIFIED_ON : 04-Oct-16 09:42:00 AM
|
||||
PTC_WM_VERSION ACCESS : Limited
|
||||
PRO_MP_IYZ DESIGNATED : NO
|
||||
PRO_MP_COGY SOURCE : Mass Properties
|
||||
PTC_WM_LOCATION ACCESS : Limited
|
||||
I_ADD_INFO ACCESS : Full
|
||||
PTC_WM_MODIFIED_BY : von Bernuth Constantin (uidu3660) (uidu3660: Engineering)
|
||||
PRO_MP_IZZ DESIGNATED : NO
|
||||
SCHRAUBEN_GROESSE DESIGNATED : NO
|
||||
D_WEIGHT_WEIGHED DESCRIPTION : NULL
|
||||
D_MATERIAL ACCESS : Full
|
||||
PRO_MP_TRF_42 SOURCE : Mass Properties
|
||||
PRO_MP_ALT_AREA DESIGNATED : NO
|
||||
D_DEPARTMENT DESCRIPTION : NULL
|
||||
PRO_MP_TRF_12 DESIGNATED : NO
|
||||
PTC_WM_CREATED_BY DESCRIPTION : NULL
|
||||
GEWINDEGÃNGE_PRO_INCH : 20.320000
|
||||
PRO_MP_ALT_INERTIA_ORIGIN DESCRIPTION : NULL
|
||||
PRO_MP_ALT_AREA SOURCE : Alternate Mass Prop
|
||||
D_WEIGHT_WEIGHED : -
|
||||
PROI_RELEASE DESCRIPTION : NULL
|
||||
PRO_MP_CSYS DESCRIPTION : NULL
|
||||
I_3D_RELEASE : -
|
||||
I_CUSTOMER_PROJ SOURCE : User-Defined
|
||||
PRO_MP_TRF_12 SOURCE : Mass Properties
|
||||
I_NAME_OLD : -
|
||||
MC_MODE SOURCE : User-Defined
|
||||
PRO_MP_TRF_31 DESIGNATED : NO
|
||||
METRISCH ACCESS : Locked
|
||||
PRO_MP_IYZ : ->
|
||||
I_RANGE SOURCE : User-Defined
|
||||
PRO_MP_TRF_33 : ->
|
||||
PRO_MP_ALT_COGY ACCESS : Full
|
||||
GDTA_EINHEITEN_HINWEISE : 12
|
||||
PRO_MP_ALT_COGZ : ->
|
||||
PROI_VERSION SOURCE : Alternate Mass Prop
|
||||
I_CUSTOMER_PROJ DESCRIPTION : NULL
|
||||
I_ADD_INFO DESIGNATED : YES
|
||||
D_WEIGHT_WEIGHED SOURCE : User-Defined
|
||||
PRO_MP_TRF_41 ACCESS : Locked
|
||||
KLASSE DESIGNATED : NO
|
||||
D_LAST_MODIFIED DESIGNATED : YES
|
||||
PRO_MP_TRF_23 DESCRIPTION : NULL
|
||||
PTC_WM_LOCATION DESIGNATED : NO
|
||||
D_SURFACE SOURCE : User-Defined
|
||||
PRO_MP_ALT_COGZ DESIGNATED : NO
|
||||
PROI_LOCATION SOURCE : Alternate Mass Prop
|
||||
GEWINDEGÃNGE_PRO_INCH ACCESS : Locked
|
||||
GEWINDE_DURCHM DESCRIPTION : NULL
|
||||
D_DOCNR ACCESS : Full
|
||||
D_DOC_TYPE SOURCE : User-Defined
|
||||
PRO_MP_TRF_33 ACCESS : Locked
|
||||
CONTI_CLASS ACCESS : Full
|
||||
PRO_MP_MASS DESCRIPTION : NULL
|
||||
MBD DESIGNATED : NO
|
||||
PROI_CREATED_BY DESCRIPTION : NULL
|
||||
PRO_MP_ALT_IZZ : ->
|
||||
PRO_MP_TRF_32 : ->
|
||||
PROI_BRANCH DESIGNATED : NO
|
||||
D_LOCATION DESIGNATED : YES
|
||||
D_DESCRIPTION1 SOURCE : User-Defined
|
||||
PRO_MP_TRF_22 SOURCE : Mass Properties
|
||||
GEWINDE_DURCHM SOURCE : Mass Properties
|
||||
D_WEIGHT_CALC : -
|
||||
MC_MODE DESIGNATED : YES
|
||||
D_ADD_INFORMATION SOURCE : User-Defined
|
||||
PRO_MP_ALT_INERTIA_ORIGIN ACCESS : Full
|
||||
PRO_MP_ALT_VOLUME : ->
|
||||
I_CUSTOMER_PROJ : -
|
||||
I_NAME_OLD ACCESS : Full
|
||||
PRO_MP_TRF_41 SOURCE : Mass Properties
|
||||
PTC_WM_ITERATION DESIGNATED : NO
|
||||
PROI_VERSION DESCRIPTION : NULL
|
||||
PRO_MP_ALT_CSYS : DEFAULT
|
||||
MP_DENSITY : ->
|
||||
PRO_MP_IZZ SOURCE : Mass Properties
|
||||
PTC_MODIFIED ACCESS : Limited
|
||||
PRO_MP_IYY DESCRIPTION : NULL
|
||||
D_SURFACE ACCESS : Full
|
||||
WT_EPMDOC_NUMBER ACCESS : Limited
|
||||
PRO_MP_MASS SOURCE : Mass Properties
|
||||
PDMRL DESCRIPTION : NULL
|
||||
XSEC_NAME ACCESS : Full
|
||||
PRO_MP_ALT_MASS : ->
|
||||
D_DOC_PART SOURCE : User-Defined
|
||||
PRO_MP_ALT_VOLUME SOURCE : Alternate Mass Prop
|
||||
PRO_MP_ALT_IYY DESCRIPTION : NULL
|
||||
PTC_MODIFIED SOURCE : Alternate Mass Prop
|
||||
D_DOC_TYPE ACCESS : Full
|
||||
PRO_MP_TRF_23 SOURCE : Mass Properties
|
||||
CUSTOMER DESCRIPTION : NULL
|
||||
PRO_MP_ALT_IYZ : ->
|
||||
D_WEIGHT_CALC ACCESS : Full
|
||||
D_BASE_UNIT : -
|
||||
PRO_MP_MASS : ->
|
||||
PTC_WM_MODIFIED_ON DESCRIPTION : NULL
|
||||
PRO_MP_DENSITY ACCESS : Locked
|
||||
PRO_MP_DENSITY SOURCE : Mass Properties
|
||||
GEWINDE_LÃNGE SOURCE : Mass Properties
|
||||
PTC_WM_MODIFIED_BY DESIGNATED : NO
|
||||
I_3D_RELEASE ACCESS : Full
|
||||
PRO_MP_ALT_COGZ DESCRIPTION : NULL
|
||||
PTC_WM_TEAM DESCRIPTION : NULL
|
||||
PROI_CREATED_ON DESCRIPTION : NULL
|
||||
BOHRER_SPITZENWINKEL DESCRIPTION : NULL
|
||||
PROI_RELEASE SOURCE : Alternate Mass Prop
|
||||
D_DESCRIPTION0 SOURCE : User-Defined
|
||||
PRO_MP_ALT_IXZ : ->
|
||||
D_LAST_MODIFIED DESCRIPTION : NULL
|
||||
PRO_MP_ALT_IZZ DESCRIPTION : NULL
|
||||
WT_EPMDOC_NUMBER : REV_PART_NEU_01.PRT
|
||||
PTC_WM_MODIFIED_ON DESIGNATED : NO
|
||||
D_MATERIAL SOURCE : User-Defined
|
||||
PRO_MP_ALT_IYY SOURCE : Alternate Mass Prop
|
||||
PTC_WM_CREATED_ON : 04-Oct-16 09:41:59 AM
|
||||
PRO_MP_IYZ ACCESS : Locked
|
||||
MC_CONFIG DESIGNATED : YES
|
||||
BOHR_DURCHM SOURCE : Mass Properties
|
||||
PRO_MP_ALT_IXZ DESIGNATED : NO
|
||||
GEWINDE_LÃNGE : 16.320000
|
||||
PTC_WM_MODIFIED_ON ACCESS : Limited
|
||||
PRO_MP_TRF_13 ACCESS : Locked
|
||||
PRO_MP_IXY ACCESS : Locked
|
||||
D_DEPARTMENT ACCESS : Full
|
||||
PRO_MP_DENSITY DESCRIPTION : NULL
|
||||
PRO_MP_AREA ACCESS : Locked
|
||||
PTC_WM_REVISION ACCESS : Limited
|
||||
PRO_MP_TRF_31 : ->
|
||||
PRO_MP_IYZ DESCRIPTION : NULL
|
||||
PTC_WM_TEAM SOURCE : Mass Properties
|
||||
D_MATNR ACCESS : Full
|
||||
I_ADD_INFO SOURCE : User-Defined
|
||||
KLASSE : H
|
||||
PRO_MP_IYY SOURCE : Mass Properties
|
||||
CONTI_CLASS DESCRIPTION : -
|
||||
PTC_WM_VERSION : AA.0
|
||||
D_LOGIN DESCRIPTION : NULL
|
||||
PRO_MP_COGX ACCESS : Locked
|
||||
D_ECM_DESCRIPTION SOURCE : User-Defined
|
||||
PDMDB ACCESS : Limited
|
||||
D_WEIGHT_WEIGHED ACCESS : Full
|
||||
MBD ACCESS : Full
|
||||
PRO_MP_COGZ : ->
|
||||
D_MATNR DESIGNATED : YES
|
||||
D_LOGIN SOURCE : User-Defined
|
||||
PRO_MP_IYY DESIGNATED : NO
|
||||
GDTA_STANDARD_REF_HINWEISE : 18
|
||||
PRO_MP_TRF_33 DESCRIPTION : NULL
|
||||
BOHR_TIEFE DESIGNATED : NO
|
||||
PRO_MP_ALT_IZZ SOURCE : Alternate Mass Prop
|
||||
CUSTOMER_PROJ0 : -
|
||||
GEWINDE_TIEFE SOURCE : Mass Properties
|
||||
PRO_MP_IXX : ->
|
||||
CUSTOMER_PROJ0 ACCESS : Full
|
||||
PDMRL : Planned
|
||||
D_DEPARTMENT : -
|
||||
PRO_MP_TRF_11 ACCESS : Locked
|
||||
WT_EPMDOC_NUMBER DESCRIPTION : NULL
|
||||
PRO_MP_TRF_11 DESIGNATED : NO
|
||||
PRO_MP_CSYS SOURCE : Mass Properties
|
||||
PRO_MP_ALT_COGY SOURCE : Alternate Mass Prop
|
||||
PDMREV : AA.0+
|
||||
PRO_MP_INERTIA_ORIGIN ACCESS : Locked
|
||||
PTC_WM_CREATED_BY SOURCE : Mass Properties
|
||||
D_DOC_SUBTYPE : -
|
||||
D_SURFACE_TEXT ACCESS : Full
|
||||
PTC_WM_LIFECYCLE SOURCE : Mass Properties
|
||||
PRO_MP_TRF_21 : ->
|
||||
I_USE_STATUS DESCRIPTION : NULL
|
||||
D_DOC_PART ACCESS : Full
|
||||
I_CUSTOMER_RELATION ACCESS : Full
|
||||
STEIGUNG DESIGNATED : NO
|
||||
PTC_ORGANIZATION_ID DESIGNATED : NO
|
||||
I_APP_VERSION DESIGNATED : YES
|
||||
MP_DENSITY SOURCE : Alternate Mass Prop
|
||||
PRO_MP_ALT_IYZ ACCESS : Full
|
||||
D_WEIGHT_WEIGHED DESIGNATED : YES
|
||||
PROI_BRANCH :
|
||||
PROI_RELEASE DESIGNATED : NO
|
||||
XSEC_SRF DESCRIPTION : NULL
|
||||
GDTA_STANDARD_REF_HINWEISE SOURCE : User-Defined
|
||||
PRO_MP_COGX DESIGNATED : NO
|
||||
PROI_RELEASE : Planned
|
||||
PRO_MP_TRF_41 : ->
|
||||
PTC_WM_LIFECYCLE_STATE ACCESS : Limited
|
||||
PTC_ORGANIZATION_ID DESCRIPTION : NULL
|
||||
D_SURFACE_TEXT : -
|
||||
PRO_MP_TRF_11 SOURCE : Mass Properties
|
||||
PTC_WM_LOCATION SOURCE : Mass Properties
|
||||
PTC_WM_CREATED_ON DESIGNATED : NO
|
||||
PRO_MP_TRF_32 DESCRIPTION : NULL
|
||||
BOHRER_SPITZENWINKEL DESIGNATED : NO
|
||||
SCHRAUBEN_GROESSE : M8x1.25
|
||||
METRISCH SOURCE : Mass Properties
|
||||
D_DESCRIPTION0 : -
|
||||
PRO_MP_ALT_IXX DESCRIPTION : NULL
|
||||
PRO_MP_IXX SOURCE : Mass Properties
|
||||
PRO_MP_ALT_CSYS DESCRIPTION : NULL
|
||||
PRO_MP_TRF_13 : ->
|
||||
PTC_WM_ITERATION DESCRIPTION : NULL
|
||||
KLASSE ACCESS : Locked
|
||||
SCHRAUBEN_GROESSE SOURCE : Mass Properties
|
||||
I_RANGE ACCESS : Full
|
||||
PRO_MP_TRF_21 SOURCE : Mass Properties
|
||||
PRO_MP_IYY : ->
|
||||
PDMRL SOURCE : Alternate Mass Prop
|
||||
PRO_MP_SOURCE DESCRIPTION : NULL
|
||||
D_DOC_SUBTYPE SOURCE : User-Defined
|
||||
GEWINDE_DURCHM DESIGNATED : NO
|
||||
CONTI_CLASS DESIGNATED : YES
|
||||
PRO_MP_TRF_32 SOURCE : Mass Properties
|
||||
D_DESCRIPTION1 : -
|
||||
PRO_MP_IZZ ACCESS : Locked
|
||||
PRO_MP_TRF_42 DESCRIPTION : NULL
|
||||
D_WEIGHT_CALC SOURCE : User-Defined
|
||||
PROI_REVISION : AA
|
||||
PRO_MP_ALT_COGX DESIGNATED : NO
|
||||
PTC_WM_CREATED_ON SOURCE : Mass Properties
|
||||
PRO_MP_TRF_13 SOURCE : Mass Properties
|
||||
D_DOC_SUBTYPE ACCESS : Full
|
||||
PRO_MP_ALT_IXX ACCESS : Full
|
||||
D_DESCRIPTION1 ACCESS : Full
|
||||
PRO_MP_ALT_AREA : ->
|
||||
I_ADD_INFO DESCRIPTION : NULL
|
||||
D_DOCNR SOURCE : User-Defined
|
||||
PRO_MP_ALT_COGX SOURCE : Alternate Mass Prop
|
||||
PROI_VERSION DESIGNATED : NO
|
||||
GDTA_EINHEITEN_HINWEISE DESCRIPTION : NULL
|
||||
PROI_CREATED_BY ACCESS : Limited
|
||||
PTC_MODIFIED DESIGNATED : NO
|
||||
I_RANGE DESCRIPTION : NULL
|
||||
D_FORMAT SOURCE : User-Defined
|
||||
PRO_MP_AREA DESIGNATED : NO
|
||||
PTC_WM_MODIFIED_BY SOURCE : Mass Properties
|
||||
D_ADD_INFORMATION DESIGNATED : YES
|
||||
CUSTOMER_PROJ0 DESCRIPTION : NULL
|
||||
PRO_MP_IXY SOURCE : Mass Properties
|
||||
D_DESCRIPTION0 ACCESS : Full
|
||||
PRO_MP_SOURCE DESIGNATED : NO
|
||||
PROI_BRANCH SOURCE : Alternate Mass Prop
|
||||
PTC_WM_LIFECYCLE_STATE : Planned
|
||||
D_SURFACE : -
|
||||
PRO_MP_TRF_22 ACCESS : Locked
|
||||
XSEC_NAME : C
|
||||
D_MATERIAL DESIGNATED : YES
|
||||
PRO_MP_VOLUME SOURCE : Mass Properties
|
||||
PRO_MP_IZZ DESCRIPTION : NULL
|
||||
MP_DENSITY DESIGNATED : NO
|
||||
PTC_WM_TEAM DESIGNATED : NO
|
||||
D_WEIGHT_CALC DESIGNATED : YES
|
||||
GEWINDEGÃNGE_PRO_INCH SOURCE : Mass Properties
|
||||
PRO_MP_IXX ACCESS : Locked
|
||||
GDTA_STANDARD_REF_HINWEISE DESCRIPTION : NULL
|
||||
SCHRAUBEN_GROESSE ACCESS : Locked
|
||||
D_LOCATION DESCRIPTION : NULL
|
||||
PRO_MP_TRF_31 ACCESS : Locked
|
||||
PRO_MP_AREA : ->
|
||||
MC_ERRORS SOURCE : User-Defined
|
||||
PTC_ORGANIZATION_ID SOURCE : Mass Properties
|
||||
PRO_MP_CSYS : ->
|
||||
D_SURFACE_TEXT DESCRIPTION : NULL
|
||||
XSEC_NAME DESIGNATED : NO
|
||||
PTC_WM_VERSION DESIGNATED : NO
|
||||
PRO_MP_ALT_IYZ DESIGNATED : NO
|
||||
PRO_MP_ALT_COGX ACCESS : Full
|
||||
PRO_MP_TRF_42 DESIGNATED : NO
|
||||
METRISCH DESIGNATED : NO
|
||||
PRO_MP_ALT_COGY : ->
|
||||
PTC_MODIFIED : 1
|
||||
BOHR_TIEFE ACCESS : Locked
|
||||
STEIGUNG DESCRIPTION : NULL
|
||||
PTC_WM_MODIFIED_ON SOURCE : Mass Properties
|
||||
D_LOCATION ACCESS : Full
|
||||
D_LAST_MODIFIED : jjjj-mm-dd
|
||||
PRO_MP_IXZ DESIGNATED : NO
|
||||
PROI_LOCATION DESIGNATED : NO
|
||||
GDTA_EINHEITEN_HINWEISE ACCESS : Full
|
||||
D_LOCATION : -
|
||||
D_DOC_CLASS DESIGNATED : YES
|
||||
I_CUSTOMER_RELATION : -
|
||||
PRO_MP_CSYS DESIGNATED : NO
|
||||
D_FORMAT ACCESS : Full
|
||||
MC_CONFIG ACCESS : Full
|
||||
METRISCH DESCRIPTION : NULL
|
||||
GDTA_STANDARD_REF_HINWEISE DESIGNATED : NO
|
||||
BOHR_TIEFE SOURCE : Mass Properties
|
||||
PRO_MP_IZZ : ->
|
||||
PROI_BRANCH ACCESS : Limited
|
||||
PROI_LOCATION :
|
||||
PROI_CREATED_ON : 10/28/08 14:24:55
|
||||
D_WEIGHT_CALC DESCRIPTION : NULL
|
||||
XSEC_NAME SOURCE : User-Defined
|
||||
PTC_WM_TEAM ACCESS : Limited
|
||||
I_CUSTOMER_RELATION DESIGNATED : YES
|
||||
D_DESCRIPTION1 DESCRIPTION : NULL
|
||||
PRO_MP_TRF_12 DESCRIPTION : NULL
|
||||
GEWINDE_LÃNGE ACCESS : Locked
|
||||
PRO_MP_ALT_IXZ ACCESS : Full
|
||||
I_RANGE DESIGNATED : YES
|
||||
D_DOC_PART DESCRIPTION : NULL
|
||||
D_ADD_INFORMATION DESCRIPTION : NULL
|
||||
PRO_MP_INERTIA_ORIGIN : ->
|
||||
BOHR_TIEFE DESCRIPTION : NULL
|
||||
PRO_MP_IXY DESIGNATED : NO
|
||||
PRO_MP_TRF_33 DESIGNATED : NO
|
||||
D_DOCNR DESIGNATED : YES
|
||||
PRO_MP_ALT_COGY DESIGNATED : NO
|
||||
PRO_MP_ALT_AREA DESCRIPTION : NULL
|
||||
MC_MODE DESCRIPTION : NULL
|
||||
PRO_MP_IXZ DESCRIPTION : NULL
|
||||
D_BASE_UNIT ACCESS : Full
|
||||
CUSTOMER : -
|
||||
PTC_WM_LIFECYCLE_STATE SOURCE : Mass Properties
|
||||
PDMREV ACCESS : Limited
|
||||
PRO_MP_INERTIA_ORIGIN DESCRIPTION : NULL
|
||||
PROI_VERSION ACCESS : Limited
|
||||
I_LABOR DESCRIPTION : NULL
|
||||
D_SURFACE_TEXT DESIGNATED : YES
|
||||
D_DOC_CLASS ACCESS : Full
|
||||
PTC_WM_ITERATION : 0
|
||||
D_DOC_PART : 000
|
||||
PRO_MP_ALT_IYY DESIGNATED : NO
|
||||
MC_ERRORS DESIGNATED : YES
|
||||
PRO_MP_IYY ACCESS : Locked
|
||||
PRO_MP_COGZ ACCESS : Locked
|
||||
BOHRER_SPITZENWINKEL SOURCE : Mass Properties
|
||||
METRISCH : JA
|
||||
PDMRL DESIGNATED : NO
|
||||
PRO_MP_SOURCE : GEOMETRY
|
||||
XSEC_SRF ACCESS : Full
|
||||
D_ECM_DESCRIPTION DESCRIPTION : NULL
|
||||
PRO_MP_COGX DESCRIPTION : NULL
|
||||
BOHR_TIEFE : 17.000000
|
||||
MBD : 1
|
||||
PRO_MP_ALT_IYZ DESCRIPTION : NULL
|
||||
D_LAST_MODIFIED SOURCE : User-Defined
|
||||
I_3D_RELEASE SOURCE : User-Defined
|
||||
MODEL_CHECK : -
|
||||
PTC_WM_LOCATION DESCRIPTION : NULL
|
||||
CUSTOMER ACCESS : Full
|
||||
PRO_MP_IXZ SOURCE : Mass Properties
|
||||
D_DOCNR : -
|
||||
KLASSE DESCRIPTION : NULL
|
||||
SCHRAUBEN_GROESSE DESCRIPTION : NULL
|
||||
D_DESCRIPTION0 DESCRIPTION : NULL
|
||||
D_DOC_CLASS SOURCE : User-Defined
|
||||
PRO_MP_TRF_23 ACCESS : Locked
|
||||
PTC_WM_MODIFIED_BY DESCRIPTION : NULL
|
||||
I_LABOR ACCESS : Full
|
||||
PRO_MP_ALT_IXY : ->
|
||||
D_FORMAT DESIGNATED : YES
|
||||
I_NAME_OLD DESIGNATED : YES
|
||||
PRO_MP_ALT_IYZ SOURCE : Alternate Mass Prop
|
||||
PDMDB SOURCE : Alternate Mass Prop
|
||||
I_USE_STATUS : -
|
||||
I_NAME_OLD DESCRIPTION : NULL
|
||||
XSEC_SRF SOURCE : User-Defined
|
||||
PRO_MP_ALT_INERTIA_ORIGIN SOURCE : Alternate Mass Prop
|
||||
PRO_MP_TRF_42 ACCESS : Locked
|
||||
D_LOGIN DESIGNATED : YES
|
||||
MODEL_CHECK DESCRIPTION : NULL
|
||||
MBD DESCRIPTION : NULL
|
||||
PRO_MP_ALT_IXY ACCESS : Full
|
||||
XSEC_SRF DESIGNATED : NO
|
||||
CUSTOMER_PROJ0 SOURCE : User-Defined
|
||||
GEWINDEGÃNGE_PRO_INCH DESCRIPTION : NULL
|
||||
PTC_WM_CREATED_BY ACCESS : Limited
|
||||
MC_MODE ACCESS : Full
|
||||
GDTA_EINHEITEN_HINWEISE SOURCE : User-Defined
|
||||
PTC_WM_VERSION DESCRIPTION : NULL
|
||||
D_LAST_MODIFIED ACCESS : Full
|
||||
PTC_WM_LIFECYCLE DESCRIPTION : NULL
|
||||
PRO_MP_TRF_22 DESCRIPTION : NULL
|
||||
BOHR_DURCHM DESCRIPTION : NULL
|
||||
PTC_ORGANIZATION_ID ACCESS : Limited
|
||||
PROI_CREATED_BY SOURCE : Alternate Mass Prop
|
||||
I_USE_STATUS ACCESS : Full
|
||||
PROI_CREATED_ON SOURCE : Alternate Mass Prop
|
||||
PRO_MP_TRF_12 ACCESS : Locked
|
||||
PROI_REVISION SOURCE : Alternate Mass Prop
|
||||
PRO_MP_SOURCE ACCESS : Full
|
||||
PDMDB DESIGNATED : NO
|
||||
D_DESCRIPTION0 DESIGNATED : YES
|
||||
GDTA_STANDARD_REF_HINWEISE ACCESS : Full
|
||||
PRO_MP_TRF_43 DESCRIPTION : NULL
|
||||
PRO_MP_IXZ ACCESS : Locked
|
||||
PRO_MP_COGY DESCRIPTION : NULL
|
||||
PDMDB :
|
||||
CONTI_CLASS : RD_AUXPART
|
||||
PRO_MP_INERTIA_ORIGIN DESIGNATED : NO
|
||||
PROI_CREATED_ON DESIGNATED : NO
|
||||
PRO_MP_TRF_12 : ->
|
||||
I_APP_VERSION : CREO2 M210
|
||||
PTC_WM_ITERATION ACCESS : Limited
|
||||
I_USE_STATUS DESIGNATED : YES
|
||||
D_BASE_UNIT DESIGNATED : YES
|
||||
PTC_WM_MODIFIED_BY ACCESS : Limited
|
||||
PTC_WM_VERSION SOURCE : Mass Properties
|
||||
I_CUSTOMER_RELATION SOURCE : User-Defined
|
||||
D_FORMAT DESCRIPTION : NULL
|
||||
PRO_MP_ALT_IXY SOURCE : Alternate Mass Prop
|
||||
PRO_MP_TRF_11 DESCRIPTION : NULL
|
||||
PTC_WM_ITERATION SOURCE : Mass Properties
|
||||
PRO_MP_TRF_11 : ->
|
||||
PRO_MP_ALT_MASS DESIGNATED : NO
|
||||
PRO_MP_TRF_43 SOURCE : Mass Properties
|
||||
PRO_MP_VOLUME DESCRIPTION : NULL
|
||||
STEIGUNG ACCESS : Locked
|
||||
MC_MODE : -
|
||||
PROI_REVISION DESIGNATED : NO
|
||||
I_APP_VERSION SOURCE : User-Defined
|
||||
GEWINDESERIE : ISO
|
||||
PTC_WM_LIFECYCLE_STATE DESIGNATED : NO
|
||||
D_SURFACE_TEXT SOURCE : User-Defined
|
||||
PRO_MP_COGZ DESCRIPTION : NULL
|
||||
PRO_MP_ALT_IXY DESCRIPTION : NULL
|
||||
PDMDB DESCRIPTION : NULL
|
||||
GEWINDESERIE DESCRIPTION : NULL
|
||||
GDTA_EINHEITEN_HINWEISE DESIGNATED : NO
|
||||
PRO_MP_COGX : ->
|
||||
I_ECM SOURCE : User-Defined
|
||||
PRO_MP_SOURCE SOURCE : Alternate Mass Prop
|
||||
PDMREV SOURCE : Alternate Mass Prop
|
||||
WT_EPMDOC_NUMBER SOURCE : Mass Properties
|
||||
PRO_MP_TRF_22 DESIGNATED : NO
|
||||
PRO_MP_ALT_IXX : ->
|
||||
D_ADD_INFORMATION : -
|
||||
PRO_MP_TRF_42 : ->
|
||||
D_DESCRIPTION1 DESIGNATED : YES
|
||||
PRO_MP_INERTIA_ORIGIN SOURCE : Mass Properties
|
||||
PRO_MP_COGZ DESIGNATED : NO
|
||||
D_LOGIN : -
|
||||
MC_CONFIG SOURCE : User-Defined
|
||||
D_ADD_INFORMATION ACCESS : Full
|
||||
I_LABOR DESIGNATED : YES
|
||||
PRO_MP_TRF_31 SOURCE : Mass Properties
|
||||
BOHR_DURCHM : 6.800000
|
||||
CUSTOMER_PROJ0 DESIGNATED : YES
|
||||
PTC_WM_LIFECYCLE ACCESS : Limited
|
||||
I_USE_STATUS SOURCE : User-Defined
|
||||
PRO_MP_COGX SOURCE : Mass Properties
|
||||
PTC_WM_TEAM :
|
||||
PDMRL ACCESS : Limited
|
||||
PRO_MP_TRF_23 : ->
|
||||
MC_ERRORS ACCESS : Full
|
||||
PRO_MP_IXX DESIGNATED : NO
|
||||
GEWINDEGÃNGE_PRO_INCH DESIGNATED : NO
|
||||
PRO_MP_ALT_CSYS ACCESS : Full
|
||||
PTC_ORGANIZATION_ID : Engineering
|
||||
PRO_MP_CSYS ACCESS : Locked
|
||||
BOHRER_SPITZENWINKEL : 118.000000
|
||||
GEWINDESERIE ACCESS : Locked
|
||||
D_BASE_UNIT DESCRIPTION : NULL
|
||||
PTC_WM_REVISION DESCRIPTION : NULL
|
||||
PROI_BRANCH DESCRIPTION : NULL
|
||||
MC_CONFIG : -
|
||||
D_MATNR DESCRIPTION : NULL
|
||||
PRO_MP_TRF_22 : ->
|
||||
PRO_MP_TRF_33 SOURCE : Mass Properties
|
||||
PRO_MP_COGZ SOURCE : Mass Properties
|
||||
PRO_MP_VOLUME DESIGNATED : NO
|
||||
I_LABOR : -
|
||||
PRO_MP_ALT_IXZ DESCRIPTION : NULL
|
||||
I_APP_VERSION ACCESS : Full
|
||||
D_SURFACE DESIGNATED : YES
|
||||
BOHR_DURCHM DESIGNATED : NO
|
||||
GEWINDE_TIEFE DESIGNATED : NO
|
||||
PTC_WM_CREATED_BY : von Bernuth Constantin (uidu3660) (uidu3660: Engineering)
|
||||
PRO_MP_TRF_32 ACCESS : Locked
|
||||
MODEL_CHECK SOURCE : User-Defined
|
||||
PTC_WM_LIFECYCLE DESIGNATED : NO
|
||||
D_MATNR : -
|
||||
BOHRER_SPITZENWINKEL ACCESS : Locked
|
||||
MODEL_CHECK ACCESS : Full
|
||||
KLASSE SOURCE : Mass Properties
|
||||
D_ECM_DESCRIPTION ACCESS : Full
|
||||
D_DOC_CLASS : -
|
||||
PRO_MP_IYZ SOURCE : Mass Properties
|
||||
MC_CONFIG DESCRIPTION : NULL
|
||||
PROI_LOCATION DESCRIPTION : NULL
|
||||
GEWINDE_TIEFE ACCESS : Locked
|
||||
PTC_WM_REVISION SOURCE : Mass Properties
|
||||
PRO_MP_TRF_43 DESIGNATED : NO
|
||||
PROI_LOCATION ACCESS : Limited
|
||||
PRO_MP_ALT_VOLUME ACCESS : Full
|
||||
PRO_MP_ALT_COGZ SOURCE : Alternate Mass Prop
|
||||
PRO_MP_TRF_21 DESIGNATED : NO
|
||||
MP_DENSITY DESCRIPTION : NULL
|
||||
GEWINDE_DURCHM ACCESS : Locked
|
||||
D_MATERIAL DESCRIPTION : NULL
|
||||
PTC_WM_CREATED_ON DESCRIPTION : NULL
|
||||
D_DEPARTMENT SOURCE : User-Defined
|
||||
I_3D_RELEASE DESIGNATED : YES
|
||||
PRO_MP_TRF_41 DESIGNATED : NO
|
||||
I_ADD_INFO : -
|
||||
GEWINDE_LÃNGE DESCRIPTION : NULL
|
||||
PRO_MP_ALT_IZZ DESIGNATED : NO
|
||||
PRO_MP_ALT_COGX DESCRIPTION : NULL
|
||||
MODEL_CHECK DESIGNATED : YES
|
||||
PRO_MP_DENSITY : 0.000000
|
||||
PROI_CREATED_ON ACCESS : Limited
|
||||
D_SURFACE DESCRIPTION : NULL
|
||||
I_RANGE : 40
|
||||
I_ECM ACCESS : Full
|
||||
D_DOC_SUBTYPE DESCRIPTION : NULL
|
||||
PRO_MP_IXY : ->
|
||||
CUSTOMER SOURCE : User-Defined
|
||||
STEIGUNG : 1.250000
|
||||
D_DOC_SUBTYPE DESIGNATED : YES
|
||||
PRO_MP_ALT_MASS ACCESS : Full
|
||||
I_CUSTOMER_RELATION DESCRIPTION : NULL
|
||||
PRO_MP_ALT_CSYS DESIGNATED : NO
|
||||
STEIGUNG SOURCE : Mass Properties
|
||||
PRO_MP_TRF_43 : ->
|
||||
CONTI_CLASS SOURCE : User-Defined
|
||||
D_ECM_DESCRIPTION DESIGNATED : YES
|
||||
PRO_MP_ALT_IXZ SOURCE : Alternate Mass Prop
|
||||
GEWINDE_LÃNGE DESIGNATED : NO
|
||||
PTC_WM_CREATED_BY DESIGNATED : NO
|
||||
D_DOC_TYPE DESCRIPTION : NULL
|
||||
PRO_MP_IXZ : ->
|
||||
I_NAME_OLD SOURCE : User-Defined
|
||||
PRO_MP_MASS ACCESS : Locked
|
||||
PRO_MP_ALT_COGZ ACCESS : Full
|
||||
PRO_MP_ALT_IXX SOURCE : Alternate Mass Prop
|
||||
GEWINDESERIE SOURCE : Mass Properties
|
||||
PTC_WM_LOCATION :
|
||||
D_DOC_TYPE DESIGNATED : YES
|
||||
PRO_MP_VOLUME : ->
|
||||
I_ECM DESIGNATED : YES
|
||||
I_ECM : -
|
||||
PRO_MP_ALT_IXX DESIGNATED : NO
|
||||
PTC_WM_REVISION : AA
|
||||
GEWINDE_TIEFE DESCRIPTION : NULL
|
||||
D_DOC_TYPE : -
|
||||
MP_DENSITY ACCESS : Full
|
||||
GEWINDESERIE DESIGNATED : NO
|
||||
D_DOCNR DESCRIPTION : NULL
|
||||
D_MATERIAL : -
|
||||
PROI_CREATED_BY :
|
||||
PRO_MP_TRF_21 ACCESS : Locked
|
||||
PRO_MP_ALT_IYY : ->
|
||||
PRO_MP_TRF_41 DESCRIPTION : NULL
|
||||
PTC_WM_REVISION DESIGNATED : NO
|
||||
PROI_CREATED_BY DESIGNATED : NO
|
||||
D_MATNR SOURCE : User-Defined
|
||||
PRO_MP_ALT_MASS DESCRIPTION : NULL
|
||||
PRO_MP_TRF_13 DESIGNATED : NO
|
||||
PRO_MP_ALT_CSYS SOURCE : Alternate Mass Prop
|
||||
PTC_WM_CREATED_ON ACCESS : Limited
|
||||
PRO_MP_ALT_VOLUME DESIGNATED : NO
|
||||
I_LABOR SOURCE : User-Defined
|
||||
WT_EPMDOC_NUMBER DESIGNATED : NO
|
||||
PROI_REVISION DESCRIPTION : NULL
|
||||
PRO_MP_TRF_43 ACCESS : Locked
|
||||
XSEC_SRF : XSEC_SRF
|
||||
PTC_WM_LIFECYCLE_STATE DESCRIPTION : NULL
|
||||
PROI_VERSION : 0+
|
||||
PRO_MP_ALT_AREA ACCESS : Full
|
||||
CUSTOMER DESIGNATED : YES
|
||||
|
||||
}
|
19
tests/metadata/step/A5
Normal file
19
tests/metadata/step/A5
Normal file
@@ -0,0 +1,19 @@
|
||||
# !!!! This file is generated automatically, do not edit manually! See end script
|
||||
set filename bug29633_nist_ctc_05_asme1_ap242-1.stp
|
||||
|
||||
set ref_data {
|
||||
Property for [0:1:1:1]:
|
||||
FILESIZE : 1495040
|
||||
GDT_STANDARD : 5302
|
||||
MaterialMultipleAssigned : FALSE
|
||||
ATTR_VERSION : 18.3.001
|
||||
Part Number : NIST PMI CTC 05 ASME1
|
||||
FILESAVETIME : Tue Dec 09 03:47:24 2014
|
||||
Revision : D
|
||||
CAD_SOURCE : ug
|
||||
MTIME : 1418096844
|
||||
MaterialMissingAssignments : TRUE
|
||||
FILENAME : nist_ctc_05_asme1.prt
|
||||
Description : NIST PMI test model downloaded from http://go.usa.gov/mGVm
|
||||
|
||||
}
|
42
tests/metadata/step/A6
Normal file
42
tests/metadata/step/A6
Normal file
@@ -0,0 +1,42 @@
|
||||
# !!!! This file is generated automatically, do not edit manually! See end script
|
||||
set filename bug29803.stp
|
||||
|
||||
set ref_data {
|
||||
Property for [0:1:1:1]:
|
||||
OUT_MASS : 50.813477444850157
|
||||
RELIEF_DIA : 21.005799999999997
|
||||
HELIX_LENGTH : 0
|
||||
OUT_OAL : 78.049999999992593
|
||||
HELIX_START : 0
|
||||
OUT_SHANK_LEN : 27.2499999999926
|
||||
RCA_SIZE : 0
|
||||
SHANK_UNDER : 0
|
||||
OUT_REF_LEN : 50.799999999999997
|
||||
BODY_LENGTH : 48.513999999999996
|
||||
THEO_BLADE_DIA : 11.074399999999999
|
||||
DRILL_DEPTH : 47.625
|
||||
BODY_DIA : 0
|
||||
SHANK_SIZE : 16
|
||||
OUT_SHANK_DIA : 15.999999999999499
|
||||
FLUTE_LENGTH : 42.468799999999995
|
||||
PRIORITY : 0
|
||||
OUT_DRILL_DEPTH : 44.754799999999996
|
||||
SCREW_HOLE_SKEW : 1.1000000000000001
|
||||
SHANK_DIAMETER : 15.999999999999499
|
||||
SS_FLANGE : NO
|
||||
DESCRIPTION : T-A HOLDER
|
||||
MODELED_BY : LSD
|
||||
STANDARD_BODY_DIA : Y
|
||||
DEEP_HOLE_WEBSITE :
|
||||
ITEM_NUM : HOLDER
|
||||
LENGTH : STUB
|
||||
FINISH : BLACK OXIDE
|
||||
NOTES :
|
||||
SHANK_IM : M
|
||||
FLUTE : STRAIGHT
|
||||
SHANK : ER
|
||||
MATERIAL : STEEL
|
||||
SERIES : Y
|
||||
DEEP_HOLE_NOTES :
|
||||
|
||||
}
|
237
tests/metadata/step/A7
Normal file
237
tests/metadata/step/A7
Normal file
@@ -0,0 +1,237 @@
|
||||
# !!!! This file is generated automatically, do not edit manually! See end script
|
||||
set filename sp7_04-do-242.stp
|
||||
|
||||
set ref_data {
|
||||
Property for [0:1:1:1]:
|
||||
PRO_MP_ALT_COGX : - >
|
||||
DESCRIPTION ACCESS : Full
|
||||
PRO_MP_TRF_21 DESCRIPTION : NULL
|
||||
PRO_MP_IXY DESCRIPTION : NULL
|
||||
PRO_MP_VOLUME ACCESS : Locked
|
||||
PRO_MP_TRF_23 DESIGNATED : NO
|
||||
PRO_MP_COGY DESIGNATED : NO
|
||||
PRO_MP_COGY ACCESS : Locked
|
||||
PRO_MP_ALT_IYY ACCESS : Full
|
||||
PRO_MP_ALT_MASS SOURCE : Alternate Mass Prop
|
||||
PRO_MP_ALT_COGY DESCRIPTION : NULL
|
||||
PRO_MP_ALT_INERTIA_ORIGIN DESIGNATED : NO
|
||||
PRO_MP_ALT_INERTIA_ORIGIN : PRO_MP_ALT_CSYS
|
||||
PRO_MP_TRF_31 DESCRIPTION : NULL
|
||||
PRO_MP_AREA SOURCE : Mass Properties
|
||||
DESCRIPTION DESCRIPTION : NULL
|
||||
PRO_MP_ALT_IXY DESIGNATED : NO
|
||||
PRO_MP_ALT_VOLUME DESCRIPTION : NULL
|
||||
PRO_MP_TRF_13 DESCRIPTION : NULL
|
||||
PRO_MP_MASS DESIGNATED : NO
|
||||
PRO_MP_COGY : - >
|
||||
PRO_MP_AREA DESCRIPTION : NULL
|
||||
PRO_MP_DENSITY DESIGNATED : NO
|
||||
PRO_MP_ALT_IZZ ACCESS : Full
|
||||
PRO_MP_IXX DESCRIPTION : NULL
|
||||
PRO_MP_TRF_32 DESIGNATED : NO
|
||||
PRO_MP_IYZ DESIGNATED : NO
|
||||
PRO_MP_COGY SOURCE : Mass Properties
|
||||
PRO_MP_IZZ DESIGNATED : NO
|
||||
PRO_MP_TRF_42 SOURCE : Mass Properties
|
||||
PRO_MP_ALT_AREA DESIGNATED : NO
|
||||
PRO_MP_TRF_12 DESIGNATED : NO
|
||||
PRO_MP_ALT_INERTIA_ORIGIN DESCRIPTION : NULL
|
||||
PRO_MP_ALT_AREA SOURCE : Alternate Mass Prop
|
||||
PRO_MP_CSYS DESCRIPTION : NULL
|
||||
PRO_MP_TRF_12 SOURCE : Mass Properties
|
||||
PRO_MP_TRF_31 DESIGNATED : NO
|
||||
PRO_MP_IYZ : - >
|
||||
PRO_MP_TRF_33 : - >
|
||||
PRO_MP_ALT_COGY ACCESS : Full
|
||||
REVISION SOURCE : User-Defined
|
||||
PRO_MP_ALT_COGZ : - >
|
||||
PRO_MP_TRF_41 ACCESS : Locked
|
||||
PRO_MP_TRF_23 DESCRIPTION : NULL
|
||||
PRO_MP_ALT_COGZ DESIGNATED : NO
|
||||
PRO_MP_TRF_33 ACCESS : Locked
|
||||
PRO_MP_MASS DESCRIPTION : NULL
|
||||
PRO_MP_ALT_IZZ : - >
|
||||
PRO_MP_TRF_32 : - >
|
||||
DESCRIPTION : NIST PMI test model downloaded from http://go.usa.gov/mGVm
|
||||
PRO_MP_TRF_22 SOURCE : Mass Properties
|
||||
PRO_MP_ALT_INERTIA_ORIGIN ACCESS : Full
|
||||
PRO_MP_ALT_VOLUME : - >
|
||||
PRO_MP_TRF_41 SOURCE : Mass Properties
|
||||
PRO_MP_ALT_CSYS : DEFAULT
|
||||
MP_DENSITY : - >
|
||||
PRO_MP_IZZ SOURCE : Mass Properties
|
||||
PRO_MP_IYY DESCRIPTION : NULL
|
||||
PRO_MP_MASS SOURCE : Mass Properties
|
||||
PRO_MP_ALT_MASS : - >
|
||||
PRO_MP_ALT_VOLUME SOURCE : Alternate Mass Prop
|
||||
PRO_MP_ALT_IYY DESCRIPTION : NULL
|
||||
DESCRIPTION SOURCE : User-Defined
|
||||
PRO_MP_TRF_23 SOURCE : Mass Properties
|
||||
PRO_MP_ALT_IYZ : - >
|
||||
PRO_MP_MASS : - >
|
||||
PRO_MP_DENSITY ACCESS : Locked
|
||||
PRO_MP_DENSITY SOURCE : Mass Properties
|
||||
PRO_MP_ALT_COGZ DESCRIPTION : NULL
|
||||
PRO_MP_ALT_IXZ : - >
|
||||
PRO_MP_ALT_IZZ DESCRIPTION : NULL
|
||||
PRO_MP_ALT_IYY SOURCE : Alternate Mass Prop
|
||||
PRO_MP_IYZ ACCESS : Locked
|
||||
PRO_MP_ALT_IXZ DESIGNATED : NO
|
||||
PRO_MP_TRF_13 ACCESS : Locked
|
||||
PRO_MP_IXY ACCESS : Locked
|
||||
PRO_MP_DENSITY DESCRIPTION : NULL
|
||||
PRO_MP_AREA ACCESS : Locked
|
||||
PRO_MP_TRF_31 : - >
|
||||
PRO_MP_IYZ DESCRIPTION : NULL
|
||||
PRO_MP_IYY SOURCE : Mass Properties
|
||||
PRO_MP_COGX ACCESS : Locked
|
||||
PRO_MP_COGZ : - >
|
||||
PRO_MP_IYY DESIGNATED : NO
|
||||
PRO_MP_TRF_33 DESCRIPTION : NULL
|
||||
PRO_MP_ALT_IZZ SOURCE : Alternate Mass Prop
|
||||
PRO_MP_IXX : - >
|
||||
PRO_MP_TRF_11 ACCESS : Locked
|
||||
PRO_MP_TRF_11 DESIGNATED : NO
|
||||
PRO_MP_CSYS SOURCE : Mass Properties
|
||||
PRO_MP_ALT_COGY SOURCE : Alternate Mass Prop
|
||||
PRO_MP_INERTIA_ORIGIN ACCESS : Locked
|
||||
PRO_MP_TRF_21 : - >
|
||||
PART_NUMBER DESCRIPTION : NULL
|
||||
MP_DENSITY SOURCE : Alternate Mass Prop
|
||||
PRO_MP_ALT_IYZ ACCESS : Full
|
||||
PRO_MP_COGX DESIGNATED : NO
|
||||
PRO_MP_TRF_41 : - >
|
||||
PRO_MP_TRF_11 SOURCE : Mass Properties
|
||||
PRO_MP_TRF_32 DESCRIPTION : NULL
|
||||
PRO_MP_ALT_IXX DESCRIPTION : NULL
|
||||
PRO_MP_IXX SOURCE : Mass Properties
|
||||
PRO_MP_ALT_CSYS DESCRIPTION : NULL
|
||||
PRO_MP_TRF_13 : - >
|
||||
PRO_MP_TRF_21 SOURCE : Mass Properties
|
||||
PRO_MP_IYY : - >
|
||||
PRO_MP_SOURCE DESCRIPTION : NULL
|
||||
PRO_MP_TRF_32 SOURCE : Mass Properties
|
||||
PRO_MP_IZZ ACCESS : Locked
|
||||
PRO_MP_TRF_42 DESCRIPTION : NULL
|
||||
PRO_MP_ALT_COGX DESIGNATED : NO
|
||||
PRO_MP_TRF_13 SOURCE : Mass Properties
|
||||
PRO_MP_ALT_IXX ACCESS : Full
|
||||
PRO_MP_ALT_AREA : - >
|
||||
PRO_MP_ALT_COGX SOURCE : Alternate Mass Prop
|
||||
PRO_MP_AREA DESIGNATED : NO
|
||||
PRO_MP_IXY SOURCE : Mass Properties
|
||||
PRO_MP_SOURCE DESIGNATED : NO
|
||||
PRO_MP_TRF_22 ACCESS : Locked
|
||||
PRO_MP_VOLUME SOURCE : Mass Properties
|
||||
PRO_MP_IZZ DESCRIPTION : NULL
|
||||
MP_DENSITY DESIGNATED : NO
|
||||
PRO_MP_IXX ACCESS : Locked
|
||||
PRO_MP_TRF_31 ACCESS : Locked
|
||||
PRO_MP_AREA : - >
|
||||
PRO_MP_CSYS : - >
|
||||
PRO_MP_ALT_IYZ DESIGNATED : NO
|
||||
PRO_MP_ALT_COGX ACCESS : Full
|
||||
PRO_MP_TRF_42 DESIGNATED : NO
|
||||
PRO_MP_ALT_COGY : - >
|
||||
PRO_MP_IXZ DESIGNATED : NO
|
||||
PRO_MP_CSYS DESIGNATED : NO
|
||||
PRO_MP_IZZ : - >
|
||||
PRO_MP_TRF_12 DESCRIPTION : NULL
|
||||
PRO_MP_ALT_IXZ ACCESS : Full
|
||||
PRO_MP_INERTIA_ORIGIN : - >
|
||||
PRO_MP_IXY DESIGNATED : NO
|
||||
PRO_MP_TRF_33 DESIGNATED : NO
|
||||
PRO_MP_ALT_COGY DESIGNATED : NO
|
||||
PRO_MP_ALT_AREA DESCRIPTION : NULL
|
||||
PRO_MP_IXZ DESCRIPTION : NULL
|
||||
PRO_MP_INERTIA_ORIGIN DESCRIPTION : NULL
|
||||
PRO_MP_ALT_IYY DESIGNATED : NO
|
||||
PRO_MP_IYY ACCESS : Locked
|
||||
PRO_MP_COGZ ACCESS : Locked
|
||||
PRO_MP_SOURCE : GEOMETRY
|
||||
PRO_MP_COGX DESCRIPTION : NULL
|
||||
PRO_MP_ALT_IYZ DESCRIPTION : NULL
|
||||
PRO_MP_IXZ SOURCE : Mass Properties
|
||||
PRO_MP_TRF_23 ACCESS : Locked
|
||||
PRO_MP_ALT_IXY : - >
|
||||
PRO_MP_ALT_IYZ SOURCE : Alternate Mass Prop
|
||||
PRO_MP_ALT_INERTIA_ORIGIN SOURCE : Alternate Mass Prop
|
||||
PRO_MP_TRF_42 ACCESS : Locked
|
||||
REVISION : D
|
||||
PRO_MP_ALT_IXY ACCESS : Full
|
||||
DESCRIPTION DESIGNATED : YES
|
||||
PRO_MP_TRF_22 DESCRIPTION : NULL
|
||||
PRO_MP_TRF_12 ACCESS : Locked
|
||||
PRO_MP_SOURCE ACCESS : Full
|
||||
REVISION DESIGNATED : YES
|
||||
PRO_MP_TRF_43 DESCRIPTION : NULL
|
||||
PRO_MP_IXZ ACCESS : Locked
|
||||
PRO_MP_COGY DESCRIPTION : NULL
|
||||
PRO_MP_INERTIA_ORIGIN DESIGNATED : NO
|
||||
PRO_MP_TRF_12 : - >
|
||||
REVISION DESCRIPTION : NULL
|
||||
PRO_MP_ALT_IXY SOURCE : Alternate Mass Prop
|
||||
PRO_MP_TRF_11 DESCRIPTION : NULL
|
||||
PRO_MP_TRF_11 : - >
|
||||
PRO_MP_ALT_MASS DESIGNATED : NO
|
||||
PRO_MP_TRF_43 SOURCE : Mass Properties
|
||||
PART_NUMBER ACCESS : Full
|
||||
PRO_MP_VOLUME DESCRIPTION : NULL
|
||||
PRO_MP_COGZ DESCRIPTION : NULL
|
||||
PRO_MP_ALT_IXY DESCRIPTION : NULL
|
||||
PRO_MP_COGX : - >
|
||||
PRO_MP_SOURCE SOURCE : Alternate Mass Prop
|
||||
PRO_MP_TRF_22 DESIGNATED : NO
|
||||
PRO_MP_ALT_IXX : - >
|
||||
PRO_MP_TRF_42 : - >
|
||||
PRO_MP_INERTIA_ORIGIN SOURCE : Mass Properties
|
||||
PRO_MP_COGZ DESIGNATED : NO
|
||||
PRO_MP_TRF_31 SOURCE : Mass Properties
|
||||
PART_NUMBER DESIGNATED : YES
|
||||
PRO_MP_COGX SOURCE : Mass Properties
|
||||
PRO_MP_TRF_23 : - >
|
||||
PRO_MP_IXX DESIGNATED : NO
|
||||
PRO_MP_ALT_CSYS ACCESS : Full
|
||||
PRO_MP_CSYS ACCESS : Locked
|
||||
PRO_MP_TRF_22 : - >
|
||||
PRO_MP_TRF_33 SOURCE : Mass Properties
|
||||
PRO_MP_COGZ SOURCE : Mass Properties
|
||||
PRO_MP_VOLUME DESIGNATED : NO
|
||||
PRO_MP_ALT_IXZ DESCRIPTION : NULL
|
||||
PART_NUMBER SOURCE : User-Defined
|
||||
PRO_MP_TRF_32 ACCESS : Locked
|
||||
PRO_MP_IYZ SOURCE : Mass Properties
|
||||
PRO_MP_TRF_43 DESIGNATED : NO
|
||||
PRO_MP_ALT_VOLUME ACCESS : Full
|
||||
PRO_MP_ALT_COGZ SOURCE : Alternate Mass Prop
|
||||
PRO_MP_TRF_21 DESIGNATED : NO
|
||||
MP_DENSITY DESCRIPTION : NULL
|
||||
PRO_MP_TRF_41 DESIGNATED : NO
|
||||
REVISION ACCESS : Full
|
||||
PRO_MP_ALT_IZZ DESIGNATED : NO
|
||||
PRO_MP_ALT_COGX DESCRIPTION : NULL
|
||||
PRO_MP_DENSITY : 0.000000
|
||||
PRO_MP_IXY : - >
|
||||
PRO_MP_ALT_MASS ACCESS : Full
|
||||
PRO_MP_ALT_CSYS DESIGNATED : NO
|
||||
PRO_MP_TRF_43 : - >
|
||||
PRO_MP_ALT_IXZ SOURCE : Alternate Mass Prop
|
||||
PRO_MP_IXZ : - >
|
||||
PRO_MP_MASS ACCESS : Locked
|
||||
PRO_MP_ALT_COGZ ACCESS : Full
|
||||
PRO_MP_ALT_IXX SOURCE : Alternate Mass Prop
|
||||
PRO_MP_VOLUME : - >
|
||||
PRO_MP_ALT_IXX DESIGNATED : NO
|
||||
MP_DENSITY ACCESS : Full
|
||||
PRO_MP_TRF_21 ACCESS : Locked
|
||||
PRO_MP_ALT_IYY : - >
|
||||
PRO_MP_TRF_41 DESCRIPTION : NULL
|
||||
PRO_MP_ALT_MASS DESCRIPTION : NULL
|
||||
PRO_MP_TRF_13 DESIGNATED : NO
|
||||
PRO_MP_ALT_CSYS SOURCE : Alternate Mass Prop
|
||||
PRO_MP_ALT_VOLUME DESIGNATED : NO
|
||||
PART_NUMBER : NIST PMI CTC 04 ASME1
|
||||
PRO_MP_TRF_43 ACCESS : Locked
|
||||
PRO_MP_ALT_AREA ACCESS : Full
|
||||
|
||||
}
|
69
tests/metadata/step/A8
Normal file
69
tests/metadata/step/A8
Normal file
@@ -0,0 +1,69 @@
|
||||
# !!!! This file is generated automatically, do not edit manually! See end script
|
||||
set filename bug32087_part.stp
|
||||
|
||||
set ref_data {
|
||||
Property for [0:1:1:1]:
|
||||
SETUP_PART : 0
|
||||
MODEL_3D_REVISION : 1
|
||||
MATERIAL_DENSITY : 7850
|
||||
WEIGHT_PROTOTYPE : 0
|
||||
WEIGHT_FINAL : 0
|
||||
WEIGHT_CALCULATED : 0.0070751592515700002
|
||||
SUPPLIER_NAME :
|
||||
SEMI_FINISHED_PRODUCT :
|
||||
REFERENCE :
|
||||
MODEL_3D_CAD_SYSTEM :
|
||||
MODEL_3D_APPROVED_BY :
|
||||
REFERENCE_DESIGNATION++ :
|
||||
PART_NAME :
|
||||
MODEL_3D_CHECKED_BY :
|
||||
OWNER :
|
||||
COPYRIGHT :
|
||||
WORK_ORDER_NUMBER :
|
||||
PART_NUMBER :
|
||||
ID_NUMBER_MATERIAL :
|
||||
SPARE_WEARING_PART :
|
||||
TREATMENT :
|
||||
GENERAL_TOLERANCES_DRILL_HOLE :
|
||||
MODEL_3D_CREATED_BY :
|
||||
UNIT_SYSTEM :
|
||||
MODEL_3D_DATE_OF_ISSUE :
|
||||
WELD_TOLERANCES :
|
||||
PROJECT :
|
||||
MODEL_3D_RELEASED_STATUS :
|
||||
MODEL_3D_CREATED_BY_DEPARTMENT :
|
||||
LANGUAGE :
|
||||
TECHNICAL_SPECIFICATION :
|
||||
SUPPLIER_NUMBER :
|
||||
SURFACE_PROTECTION :
|
||||
EDGE_CONDITION :
|
||||
GENERAL_TOLERANCES :
|
||||
EDGE_CONDITION_INNER_EDGE :
|
||||
ORDER_NUMBER :
|
||||
GENERAL_TOLERANCES_FIT_DRILL_HOLE :
|
||||
REFERENCE_DESIGNATION= :
|
||||
SURFACE_ROUGHNESS :
|
||||
TECHNICAL_DIRECTIVE :
|
||||
TOLERANCING_PRINCIPLE :
|
||||
REFERENCE_DESIGNATION- :
|
||||
STOCK_NUMBER :
|
||||
MODEL_3D_APPROVED_BY_DEPARTMENT :
|
||||
PART_REVISION_LEVEL :
|
||||
ARTICLE_NUMBER :
|
||||
EDGE_CONDITION_OUTER_EDGE :
|
||||
MATERIAL :
|
||||
SIMPLIFIED_DRAWING_REVISION :
|
||||
REFERENCE_DESIGNATION== :
|
||||
MODEL_3D_REVISION_LEVEL :
|
||||
MODEL_3D_RELEASED_BY :
|
||||
MODEL_3D_REPLACED_BY :
|
||||
MODEL_3D_ID_NUMBER :
|
||||
REFERENCE_DESIGNATION+ :
|
||||
PART_NOTE :
|
||||
WELD_PREPARATION :
|
||||
MODEL_3D_RELEASED_DATE :
|
||||
MODEL_3D_REPLACES :
|
||||
PAINT_SURFACE :
|
||||
PART_SOURCE :
|
||||
|
||||
}
|
10
tests/metadata/step/A9
Normal file
10
tests/metadata/step/A9
Normal file
@@ -0,0 +1,10 @@
|
||||
# !!!! This file is generated automatically, do not edit manually! See end script
|
||||
set filename nist_ftc_08_asme1_ap242-2.stp
|
||||
|
||||
set ref_data {
|
||||
Property for [0:1:1:1]:
|
||||
Revision : C
|
||||
PartNumber : NIST PMI FTC 08 ASME1
|
||||
DescriptionRef : NIST PMI test model downloaded from http://go.usa.gov/mGVm
|
||||
|
||||
}
|
2
tests/metadata/step/begin
Normal file
2
tests/metadata/step/begin
Normal file
@@ -0,0 +1,2 @@
|
||||
set conf "provider.STEP.OCC.read.metadata : 1"
|
||||
|
@@ -1,58 +0,0 @@
|
||||
puts "========"
|
||||
puts "0032173: Visualization, TKOpenGl - implement simple shadow mapping for a point light source"
|
||||
puts "Test shadow map from a point light source on multiple boxes."
|
||||
puts "========"
|
||||
|
||||
pload MODELING VISUALIZATION
|
||||
if { $::tcl_platform(os) == "Darwin" } { vcaps -core }
|
||||
vclear
|
||||
vinit View1
|
||||
vrenderparams -shadingModel phong
|
||||
# add geometry
|
||||
box b1 20 0 0 10 10 10
|
||||
box b2 -20 0 0 10 10 10
|
||||
box b3 -50 -20 -25 100 5 50
|
||||
box b4 0 10 0 5 5 5
|
||||
box b5 0 0 5 3 3 3
|
||||
box b6 0 0 -5 7 7 7
|
||||
box b7 0 -5 -10 3 3 3
|
||||
vdisplay -dispmode 1 b1 b2 b3 b4 b5 b6 b7
|
||||
vfit
|
||||
# add colors
|
||||
vsetcolor b1 RED3
|
||||
vsetcolor b2 GREEN3
|
||||
vsetcolor b3 BLUE3
|
||||
vsetcolor b4 ORANGE3
|
||||
vsetcolor b5 YELLOW3
|
||||
vsetcolor b6 SALMON3
|
||||
vsetcolor b7 PURPLE3
|
||||
# add light
|
||||
vlight -clear
|
||||
vlight pntlight1 -type POSITIONAL -pos 0 100 0 -intensity 1000 -castShadows 1 -range 1000
|
||||
|
||||
#dump single light phong
|
||||
vviewparams -scale 8.0 -proj 0.0 1.0 0.0 -up 0.0 0.0 1.0 -at 0.0 0.0 0.0
|
||||
vdump $imagedir/${casename}_single_pointlight_phong1.png
|
||||
vviewparams -scale 8.0 -proj 0.5 1.0 0.0 -up 0.0 0.0 1.0 -at 0.0 0.0 0.0
|
||||
vdump $imagedir/${casename}_single_pointlight_phong2.png
|
||||
#dump single light pbr
|
||||
vrenderparams -shadingModel pbr
|
||||
vviewparams -scale 10.0 -proj 0.0 1.0 0.0 -up 0.0 0.0 1.0 -at 0.0 0.0 0.0
|
||||
vdump $imagedir/${casename}_single_pointlight_pbr1.png
|
||||
vviewparams -scale 10.0 -proj 0.2 1.0 0.0 -up 0.0 0.0 1.0 -at 0.0 0.0 0.0
|
||||
vdump $imagedir/${casename}_single_pointlight_pbr2.png
|
||||
|
||||
#add second light
|
||||
vlight pntlight2 -type POSITIONAL -pos 40 100 0 -intensity 1000 -castShadows 1
|
||||
#dump double light phong
|
||||
vrenderparams -shadingModel phong
|
||||
vviewparams -scale 8.0 -proj 0.0 1.0 0.0 -up 0.0 0.0 1.0 -at 0.0 0.0 0.0
|
||||
vdump $imagedir/${casename}_double_pointlight_phong1.png
|
||||
vviewparams -scale 8.0 -proj 0.5 1.0 0.0 -up 0.0 0.0 1.0 -at 0.0 0.0 0.0
|
||||
vdump $imagedir/${casename}_double_pointlight_phong2.png
|
||||
#dump double light pbr
|
||||
vrenderparams -shadingModel pbr
|
||||
vviewparams -scale 10.0 -proj 0.0 1.0 0.0 -up 0.0 0.0 1.0 -at 0.0 0.0 0.0
|
||||
vdump $imagedir/${casename}_double_pointlight_pbr1.png
|
||||
vviewparams -scale 10.0 -proj -0.2 1.0 0.0 -up 0.0 0.0 1.0 -at 0.0 0.0 0.0
|
||||
vdump $imagedir/${casename}_double_pointlight_pbr2.png
|
40
tests/v3d/bugs/bug26072
Normal file
40
tests/v3d/bugs/bug26072
Normal file
@@ -0,0 +1,40 @@
|
||||
puts "========"
|
||||
puts "0026072: Visualization - more realistic display of face edges"
|
||||
puts "========"
|
||||
|
||||
pload MODELING VISUALIZATION XDE
|
||||
testreadstep [locate_data_file as1-oc-214-mat.stp] s
|
||||
vclear
|
||||
vinit
|
||||
vdisplay s -dispmode 1
|
||||
vfit
|
||||
vshowfaceboundary s -setboundaryshading phong 1 -boundarycolor 50 250 50
|
||||
vviewparams -scale 4.0 -proj 1.0 1.0 1.0 -up -1.0 -1.0 0.0 -at 20.0 0.0 -20.0
|
||||
vdump $::imagedir/${::casename}_shading_1.png
|
||||
vviewparams -scale 4.0 -proj 2.0 -1.5 3.0 -up 0.0 1.0 1.0 -at 20.0 130.0 -50.0
|
||||
vdump $::imagedir/${::casename}_shading_2.png
|
||||
|
||||
vshowfaceboundary s -setboundaryshading phong 0 -boundarycolor 50 250 50
|
||||
vviewparams -scale 4.0 -proj 1.0 1.0 1.0 -up -1.0 -1.0 0.0 -at 20.0 0.0 -20.0
|
||||
vdump $::imagedir/${::casename}_noshading_1.png
|
||||
vviewparams -scale 4.0 -proj 2.0 -1.5 3.0 -up 0.0 1.0 1.0 -at 20.0 130.0 -50.0
|
||||
vdump $::imagedir/${::casename}_noshading_2.png
|
||||
|
||||
vclear
|
||||
vclose
|
||||
ReadStep D [locate_data_file as1-oc-214-mat.stp]
|
||||
XShow D
|
||||
vfit
|
||||
vsetdispmode 1
|
||||
|
||||
XShowFaceBoundary D 0:1:1:1 1 156 156 156 1 0 phong 1
|
||||
vviewparams -scale 4.0 -proj 1.0 1.0 1.0 -up -1.0 -1.0 0.0 -at 20.0 0.0 -20.0
|
||||
vdump $::imagedir/${::casename}_xview_shading_1.png
|
||||
vviewparams -scale 4.0 -proj 2.0 -1.5 3.0 -up 0.0 1.0 1.0 -at 20.0 130.0 -50.0
|
||||
vdump $::imagedir/${::casename}_xview_shading_2.png
|
||||
|
||||
XShowFaceBoundary D 0:1:1:1 1 156 156 156 1 0 phong 0
|
||||
vviewparams -scale 4.0 -proj 1.0 1.0 1.0 -up -1.0 -1.0 0.0 -at 20.0 0.0 -20.0
|
||||
vdump $::imagedir/${::casename}_xview_noshading_1.png
|
||||
vviewparams -scale 4.0 -proj 2.0 -1.5 3.0 -up 0.0 1.0 1.0 -at 20.0 130.0 -50.0
|
||||
vdump $::imagedir/${::casename}_xview_noshading_2.png
|
Reference in New Issue
Block a user