Open CASCADE, the 3D modelling kernel
3D modeling & numerical simulation

Search the Forums
See All Topics
 

Slow rotation and panning

Slow rotation and panning
Linden 2012/09/12 19:01
Hello,

I'm quite new to OpenCascade and have a problem with rotating and panning my view. My software creates about 750 edges (via BRepBuilderAPI_MakeEdge)and displays them. But when I pan or rotate my view, it begins to stutter. It seems like these events don't get finished fast enough because when I pan or rotate heavily for some time and suddenly stop it, it takes another 3-4 seconds for my view to stop. These lines also flicker while moving them, it looks like Z-buffering is disabled or something like that.

I activated the degenerated mode and just call pan(int x, int y) or rotation(int x, int y) in the MouseMove-Eventhandler.
Did I miss something? Or is it a problem to add that many edges without combining them?

thanks in advance,

Marcel
Linden 2012/09/24 11:04
Hey,

in the meantime I've discovered that opencascade rotates smoothly if I export my lines to IGES and import them afterwards. Could it be a problem with my way of adding lines?

TopoDS_Edge OCCViewer::createLine(Point3D x, Point3D y) {
     gp_Pnt a(x.X, x.Y, x.Z);
     gp_Pnt b(y.X, y.Y, y.Z);

     TopoDS_Edge edge = BRepBuilderAPI_MakeEdge(a, b);
     return edge;
}

void OCCViewer::drawLine(double x1, double y1, double z1, double x2, double y2, double z2) {
     Point3D p1(x1, y1, z1);
     Point3D p2(x2, y2, z2);

     myAISContext->Display(new AIS_Shape(createLine(p1, p2)), 0, 0, Standard_False);
}

Should I combine it somehow in one shape? Can I archive that with still being able to select particular lines?
Pawel 2012/09/25 11:56
Hi Linden,

in the recent past a great improvement regarding the visualization performance was introduced: VBO. But this influences shaded shapes only. Wireframe objects (and texts also) might slow the viewer down.

You might want to try

BRep_Builder

in order to draw all your lines as one. This should improve the visualization performance.

Pawel
Linden 2012/10/01 10:46
Hi,

thanks Pawel - that worked.

 
 
Latest news
  • OCCT Applications
  • Open CASCADE Technology 6.8.0 is available for download!
  • New features to enhance the development process

  • © OPEN CASCADE 2000 - 2014  |  Search  |  Contacts   |  Site map