DiscussionsIssue archiveOCCT:Visualization

Archived issue #0032665

Delay in displaying multiple objects.

CommunityOCCT:Visualizationnew4 public notes

Search issues

Description

# Handle(Geom_TrimmedCurve) aSegment1 = GC_MakeSegment(Pt1, Pt2);
    # TopoDS_Edge aEdge1 = BRepBuilderAPI_MakeEdge(aSegment1);
    # Handle(AIS_Shape) shape1 = new AIS_Shape(aEdge20);
    # shape1->Attributes()->SetLineAspect(MyAspect);
    # myAISContext->Display(shape1, Standard_False);
    # .
    # .
    # .
    # .
    # .
    # .
    <Edge-210>
    # Handle(Geom_TrimmedCurve) aSegment210 = GC_MakeSegment(Pt10, Pt20);
    # TopoDS_Edge aEdge210 = BRepBuilderAPI_MakeEdge(aSegment210);
    # Handle(AIS_Shape) shape210 = new AIS_Shape(aEdge210);
    # shape210->Attributes()->SetLineAspect(MyAspect);
    # myAISContext->Display(shape210, Standard_False);

    # myAISContext->UpdateCurrentViewer();

Is there another way to speedup the displaying process.

Thanks.

Public activity

4 archived notes

Participants are labeled by their role within this record.

01Author
Hello kgv,

I have created more than 200 vertices and edges.
 
While displaying them on the viewer, all the vertices and edges doesn't appears at the same time.

The process of displaying the objects take more time. I have followed the following steps,
    <Edge-1>
    # Handle(Geom_TrimmedCurve) aSegment1 = GC_MakeSegment(Pt1, Pt2);
    # TopoDS_Edge aEdge1 = BRepBuilderAPI_MakeEdge(aSegment1);
    # Handle(AIS_Shape) shape1 = new AIS_Shape(aEdge20);
    # shape1->Attributes()->SetLineAspect(MyAspect);
    # myAISContext->Display(shape1, Standard_False);
    # .
    # .
    # .
    # .
    # .
    # .
    <Edge-210>
    # Handle(Geom_TrimmedCurve) aSegment210 = GC_MakeSegment(Pt10, Pt20);
    # TopoDS_Edge aEdge210 = BRepBuilderAPI_MakeEdge(aSegment210);
    # Handle(AIS_Shape) shape210 = new AIS_Shape(aEdge210);
    # shape210->Attributes()->SetLineAspect(MyAspect);
    # myAISContext->Display(shape210, Standard_False);

    # myAISContext->UpdateCurrentViewer();

Is there another way to fasten the displaying process.

Thanks.
02Commenter 1
> vertices and edges doesn't appears at the same time.
Do you call `myAISContext->UpdateCurrentViewer()` for each object or at the end of the loop?
03Author
> Do you call `myAISContext->UpdateCurrentViewer()` for each object or at the end
  of the loop?

I called it at the end of the loop.
04Commenter 1
> I called it at the end of the loop.
Then it looks unexpected - viewer should be redrawn only once with all objects appearing together.