void DrawShapes_Viewport::DrawLine()
{
    // make geometry data
    gp_Pnt startPt(0, 0, 0);
    gp_Pnt endPt(100, 100, 100);
    Handle(Geom_Line) line = GC_MakeLine(startPt, endPt);

    // make presentable object using geometry data
    Handle(AIS_Line) shape = new AIS_Line(line);

    // display presentable object
    _aisContext()->Display(shape, false);
}

void DrawShapes_Viewport::DrawCyliner()
{
    gp_Ax2 dir = gp::XOY();
    TopoDS_Shape box = BRepPrimAPI_MakeCylinder(dir, 100.0, 200.0);

    Handle(AIS_Shape) shape = new AIS_Shape(box);
    shape->SetDisplayMode(1);

    _aisContext()->Display(shape, false);
}

image

image

댓글남기기