mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-04 18:06:22 +03:00
0031573: Visualization - Do not show seam edge for shading presentation with boundary edges in VTK
This commit is contained in:
parent
e4e3254a35
commit
2ba1172b73
@ -86,7 +86,8 @@ typedef enum
|
|||||||
MT_BoundaryEdge = 4, //!< Boundary edge (related to a single face)
|
MT_BoundaryEdge = 4, //!< Boundary edge (related to a single face)
|
||||||
MT_SharedEdge = 5, //!< Shared edge (related to several faces)
|
MT_SharedEdge = 5, //!< Shared edge (related to several faces)
|
||||||
MT_WireFrameFace = 6, //!< Wireframe face
|
MT_WireFrameFace = 6, //!< Wireframe face
|
||||||
MT_ShadedFace = 7 //!< Shaded face
|
MT_ShadedFace = 7, //!< Shaded face
|
||||||
|
MT_SeamEdge = 8 //!< Seam edge between faces
|
||||||
} IVtk_MeshType;
|
} IVtk_MeshType;
|
||||||
|
|
||||||
//! @enum IVtk_DisplayMode Display modes for 3D shapes
|
//! @enum IVtk_DisplayMode Display modes for 3D shapes
|
||||||
|
@ -180,16 +180,16 @@ void IVtkOCC_ShapeMesher::addEdges()
|
|||||||
TopAbs_EDGE,
|
TopAbs_EDGE,
|
||||||
TopAbs_FACE,
|
TopAbs_FACE,
|
||||||
anEdgesMap);
|
anEdgesMap);
|
||||||
|
|
||||||
int aNbFaces;
|
int aNbFaces;
|
||||||
IVtk_MeshType aType;
|
IVtk_MeshType aType;
|
||||||
myEdgesTypes.Clear();
|
myEdgesTypes.Clear();
|
||||||
|
|
||||||
TopExp_Explorer anEdgeIter (GetShapeObj()->GetShape(), TopAbs_EDGE);
|
TopTools_IndexedDataMapOfShapeListOfShape::Iterator aEdgeIt(anEdgesMap);
|
||||||
for (; anEdgeIter.More(); anEdgeIter.Next())
|
for (; aEdgeIt.More(); aEdgeIt.Next())
|
||||||
{
|
{
|
||||||
const TopoDS_Edge& anOcctEdge = TopoDS::Edge (anEdgeIter.Current());
|
const TopoDS_Edge& anOcctEdge = TopoDS::Edge (aEdgeIt.Key());
|
||||||
aNbFaces = anEdgesMap.FindFromKey (anOcctEdge).Extent();
|
const TopTools_ListOfShape& aFaceList = aEdgeIt.Value();
|
||||||
|
aNbFaces = aFaceList.Extent();
|
||||||
if (aNbFaces == 0)
|
if (aNbFaces == 0)
|
||||||
{
|
{
|
||||||
aType = MT_FreeEdge;
|
aType = MT_FreeEdge;
|
||||||
@ -200,7 +200,8 @@ void IVtkOCC_ShapeMesher::addEdges()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
aType = MT_SharedEdge;
|
aType = (aNbFaces >= 2) && (BRep_Tool::MaxContinuity(anOcctEdge) > GeomAbs_G2) ?
|
||||||
|
MT_SeamEdge : MT_SharedEdge;
|
||||||
}
|
}
|
||||||
addEdge (anOcctEdge, GetShapeObj()->GetSubShapeId (anOcctEdge), aType);
|
addEdge (anOcctEdge, GetShapeObj()->GetSubShapeId (anOcctEdge), aType);
|
||||||
myEdgesTypes.Bind (anOcctEdge, aType);
|
myEdgesTypes.Bind (anOcctEdge, aType);
|
||||||
|
@ -48,6 +48,7 @@ IVtkTools_DisplayModeFilter::IVtkTools_DisplayModeFilter()
|
|||||||
aTypes.Add (MT_FreeEdge);
|
aTypes.Add (MT_FreeEdge);
|
||||||
aTypes.Add (MT_BoundaryEdge);
|
aTypes.Add (MT_BoundaryEdge);
|
||||||
aTypes.Add (MT_SharedEdge);
|
aTypes.Add (MT_SharedEdge);
|
||||||
|
aTypes.Add (MT_SeamEdge);
|
||||||
aTypes.Add (MT_WireFrameFace);
|
aTypes.Add (MT_WireFrameFace);
|
||||||
|
|
||||||
myModesDefinition[DM_Wireframe] = aTypes;
|
myModesDefinition[DM_Wireframe] = aTypes;
|
||||||
|
17
tests/v3d/ivtk/seam_edges
Normal file
17
tests/v3d/ivtk/seam_edges
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
puts "=========="
|
||||||
|
puts "seam_edges"
|
||||||
|
puts "=========="
|
||||||
|
puts ""
|
||||||
|
#################################################################
|
||||||
|
# Tests boundary edges draw without seam edges in the IVtk view
|
||||||
|
#################################################################
|
||||||
|
|
||||||
|
set anImage $imagedir/${casename}.png
|
||||||
|
|
||||||
|
ivtkinit
|
||||||
|
psphere s 10 15 80
|
||||||
|
ivtkdisplay s
|
||||||
|
ivtksetdispmode 1
|
||||||
|
ivtksetboundingdraw 1
|
||||||
|
|
||||||
|
ivtkdump $anImage
|
Loading…
x
Reference in New Issue
Block a user