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

0025540: Visualization - discretization of the circle differs in shaded and wireframe modes.

1. "HilightDrawer" were added to SelectMgr_SelectableObject.
2. Static drawer in StdSelect_Shape was replaced by class member. It's value is taken from special HilightDrawer of Selectable() object.
3. Computed relative deflection is stored as absolute deflection to be used for sub-shapes.
4. The ColoredShape object was updated to use for sub-shapes relative deflection computed for main shape.
5. Test case was added.

Tuning of test-case bug25532
This commit is contained in:
osa
2015-03-05 14:05:11 +03:00
committed by bugmaster
parent 076b125a90
commit 7f91733552
13 changed files with 238 additions and 41 deletions

View File

@@ -36,7 +36,6 @@
#include <StdPrs_ShadedShape.hxx>
#include <StdPrs_ToolShadedShape.hxx>
#include <StdPrs_WFDeflectionShape.hxx>
#include <StdPrs_WFShape.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Compound.hxx>
@@ -321,6 +320,15 @@ void AIS_ColoredShape::Compute (const Handle(PrsMgr_PresentationManager3d)& ,
}
StdPrs_ShadedShape::Tessellate (myshape, myDrawer);
}
// After this call if type of deflection is relative
// computed deflection coefficient is stored as absolute.
StdPrs_ShadedShape::Tessellate (myshape, myDrawer);
}
else // WireFrame mode
{
// After this call if type of deflection is relative
// computed deflection coefficient is stored as absolute.
Prs3d::GetDeflection (myshape, myDrawer);
}
TopoDS_Compound anOpened, aClosed;
@@ -395,6 +403,12 @@ void AIS_ColoredShape::addShapesWithCustomProps (const Handle(Prs3d_Presentation
aDrawer = myDrawer;
}
// It is supposed that absolute deflection contains previously computed relative deflection
// (if deflection type is relative).
// In case of CustomDrawer it is taken from Link().
Aspect_TypeOfDeflection aPrevType = aDrawer->TypeOfDeflection();
aDrawer->SetTypeOfDeflection (Aspect_TOD_ABSOLUTE);
// Draw each kind of subshapes and personal-colored shapes in a separate group
// since it's necessary to set transparency/material for all subshapes
// without affecting their unique colors
@@ -408,6 +422,7 @@ void AIS_ColoredShape::addShapesWithCustomProps (const Handle(Prs3d_Presentation
{
StdPrs_WFDeflectionShape::Add (thePrs, aShapeDraw, aDrawer);
}
aDrawer->SetTypeOfDeflection (aPrevType);
}
}
}