mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0032704: Visualization, Prs3d_Drawer - do not implicitly create aspects within getters
Prs3d_Drawer getters now return NULL instead of implicitly creating "default" aspects. Added missing initialization of default properties in AIS_InteractiveContext. AIS_InteractiveContext::setContextToObject() - added missing propagation of Context to child presentations.
This commit is contained in:
@@ -983,6 +983,7 @@ if(NbResults>0){ \n\
|
||||
|
||||
Handle(ISession_Surface) aSurface = new ISession_Surface(SP);
|
||||
Handle(Prs3d_Drawer) CurDrawer = aSurface->Attributes();
|
||||
CurDrawer->SetOwnLineAspects();
|
||||
CurDrawer->UIsoAspect()->SetNumber(10);
|
||||
CurDrawer->VIsoAspect()->SetNumber(10);
|
||||
aDoc->GetAISContext()->SetLocalAttributes(aSurface, CurDrawer, Standard_False);
|
||||
|
@@ -51,7 +51,7 @@ ISession_Direction::ISession_Direction (const gp_Pnt2d& aPnt2d,
|
||||
myDir (gp_Dir(aDir2d.X(),aDir2d.Y(),0.0)),
|
||||
myLength (aLength)
|
||||
{
|
||||
myArrowLength = myDrawer->ArrowAspect()->Length();
|
||||
myArrowLength = 1.0;
|
||||
}
|
||||
|
||||
ISession_Direction::ISession_Direction (const gp_Pnt2d& aPnt2d,
|
||||
@@ -60,7 +60,7 @@ ISession_Direction::ISession_Direction (const gp_Pnt2d& aPnt2d,
|
||||
myDir (gp_Dir(aVec2d.X(), aVec2d.Y(), 0.0))
|
||||
{
|
||||
myLength = aVec2d.Magnitude();
|
||||
myArrowLength = myDrawer->ArrowAspect()->Length();
|
||||
myArrowLength = 1.0;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -26,6 +26,7 @@ void ISession_Surface::Compute (const Handle(PrsMgr_PresentationManager)& ,
|
||||
Handle(GeomAdaptor_Surface) anAdaptorHSurface = new GeomAdaptor_Surface (mySurface);
|
||||
|
||||
Handle(Prs3d_Drawer) aPoleDrawer = new Prs3d_Drawer();
|
||||
aPoleDrawer->SetOwnLineAspects();
|
||||
aPoleDrawer->SetLineAspect (new Prs3d_LineAspect (Quantity_NOC_YELLOW3, Aspect_TOL_SOLID, 1.0));
|
||||
switch (theMode)
|
||||
{
|
||||
|
Reference in New Issue
Block a user