1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-10 18:51:21 +03:00
kgv 0e5ef9264f 0028060: Samples - Objects in Geometry/Viewer2d have incorrect color
Broken custom presentations Sample2D_Text and ISession_Text
have been replaced by AIS_TextLabel.

ISession2D_Curve::Compute() - fixed defining the group without presentation aspects.
GeomSources - fixed assigning custom attributes.
2016-11-08 18:45:07 +03:00

37 lines
1.0 KiB
C++
Executable File

// ISession_Curve.cpp: implementation of the ISession_Curve class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "..\\GeometryApp.h"
#include "ISession_Curve.h"
#include <StdPrs_PoleCurve.hxx>
IMPLEMENT_STANDARD_RTTIEXT(ISession_Curve,AIS_InteractiveObject)
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#endif
void ISession_Curve::Compute (const Handle(PrsMgr_PresentationManager3d)& ,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode)
{
GeomAdaptor_Curve anAdaptorCurve (myCurve);
switch (theMode)
{
case 1:
{
Handle(Prs3d_Drawer) aPoleDrawer = new Prs3d_Drawer();
aPoleDrawer->SetLineAspect (new Prs3d_LineAspect (Quantity_NOC_RED, Aspect_TOL_SOLID, 1.0));
StdPrs_PoleCurve::Add (thePrs, anAdaptorCurve, aPoleDrawer);
}
case 0:
{
StdPrs_Curve::Add (thePrs, anAdaptorCurve, myDrawer);
break;
}
}
}