
Mon, 05/28/2001 - 11:10
Hello, i have a problem with the compute method. It is dealing with WireFrame display. I made a simple object CBloc3D which has to change wire color here is my code:
I create a wireaspect with my constructor with
CBloc3D::CBloc3D() :Cobjet3D() { ... myDrawer->SetWireAspect(new Prs3d_LineAspect(Quantity_NOC_BLACK,Aspect_TOL_SOLID,4)); ... }
And when i display it i use
void CBloc3D::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode ) { switch (aMode) {
case 0: myDrawer->WireAspect()->SetColor (Quantity_NOC_BLACK); myDrawer->WireAspect()->SetWidth(4); StdPrs_WFShape::Add(aPresentation,m_tpdsShape, myDrawer );
break;
} }
MY GREAT PROBLEM IS THAT MY OBJECT IS ALWAYS STILL DISPLAYED IN YELLOW WITH A WIDTH OF 1 :) in the wire mode although i insist on creating the same aspect and computing the same aspect as the creation. I know that i have to load the line presentation before displaying the first time. But why in shading aspect is it working well and not as well in wire aspect? It would be a great help if someone could explain how it is really working in wire mode. Thx anyway.
Tue, 05/29/2001 - 15:52
Hi,
Try to use FreeBoundaryAspect instead of WireAspect.
Best Regards
Sergey
Tue, 05/29/2001 - 16:06
Well , now it 's okay i forgot to set myOwnColor to Standard_True and myOwnWidth too. (By calling AIS_InteractiveObject::SetColor or ::SetWitdh) in my own class. Damn details :).