How AIS_Shape display grid border

Hey everyone
The wire displaymode in AIS_Shape is brep's boundary, how to display meshes as triangular patches? Thanks!

gkv311 n's picture

You may use display mesh edges, something like this:

Handle(AIS_InteractiveContext) theCtx = ...;

Handle(AIS_Shape) aShapePrs = new ...;
aShapePrs->Attributes()->SetupOwnShadingAspect(theCtx->DefaultDrawer());
aShapePrs->Attributes()->ShadingAspect()->Aspect()->SetDrawEdges (true);
//aShapePrs->Attributes()->ShadingAspect()->Aspect()->SetEdgeWidth (2.0f);
//aShapePrs->Attributes()->ShadingAspect()->Aspect()->SetEdgeColor (Quantity_NOC_BLACK);

theCtx->Display (aShapePrs, AIS_Shaded, 0, true);

Or in Draw Harness:

pload MODELING VISUALIZATION
psphere s 100
vinit View1
vdisplay s -dispMode 1
vfit
vaspects s -drawEdges 1 -edgeColor BLACK