Viewer performance

Hi gentlemen, I was using TopoDS_Compound with OCC 6.3 to manage in one object a set of identical objects at differents locations in space. It was very useful because selection in AIS_viewer was selecting all objets at a time and viewer performances were correct. The kind of object I manage are long in one dimension and small in others, typical values are ~200mm diameter at z=0 and ~60mm diameter at z=15000 mm (kind of conical tube). Since OCC6.5 I got very low performance for these compound objects in viewer redraw, it takes a lot of time to generate tesselation. I played with DeviationCoef and so on but did not find any good solution. I tried also AIS_*Connected* it works fine in performance but selection is not working (maybe I did not understood how it works).
Question 1: Is there another solution ?
Question 2: I also got bad performance in viewer for same kind of shapes but bended (via MakePipe function).
Thanks in advance.
Best regards.

Jerome Robert's picture

Hi Jerome,

You should have a look at this thread:


sergey zaritchny's picture

Hi Jerome,
Is it possible to get the mentioned shapes
to reproduce the specified case of low performance?

Jerome Monaco's picture

Hi Sergey, here are some examples attached.
Best regards.

P G's picture

Hi Jerome

What's the API u have used to create the Pipe surface ?

- PG

Jerome Monaco's picture

Hi PG, I used BRepOffsetAPI_MakePipeShell, because I only need a shell and not a volume. I used it to generated conical shapes. Here is the code (it is certainly not very good code but it works...) :

/// - wbase : Section shape at the base (circle for example)
/// - profile : pipe's profile
/// - k : dimension of the section at the top (0..1)
TopoDS_Shape MyPipe( const TopoDS_Wire &wbase, const TopoDS_Wire &profile, const double k )
ASSERT( ! w.IsNull() && ! wbase.IsNull() );

/// Profile length
GProp_GProps lp;
BRepGProp::LinearProperties( w, lp );
double length( lp.Mass() );

/// Define the base section
BRepOffsetAPI_MakePipeShell ps( w );

/// Linear law for the pipe and for parameter
Handle( Law_Linear ) ll = new Law_Linear;
ll->Set( 0.0, 1.0, length, k );

/// Update parameters and build geometry
ps.SetLaw( wbase, ll, Standard_False, Standard_True );
ps.SetTransitionMode( BRepBuilderAPI_RightCorner );

return( ps.Shape() );

Best regards

sergey zaritchny's picture

Thanks, Jerome.
Unfortunately the low performance problem is not reproducible on my PC: Intel(R) Core(TM)2 Quad CPU Q9300 2.50GHz, 4 GB of RAM, NVIDIA GeForce 8600 GT.
Rotation, zoom & panning (as tessellation itself) show acceptable performance in Viewer 3d.

Jerome Monaco's picture

Hi Sergey, if you open test_view2.brep I sent before, you will see that the tesselation is not correct in the middle of the part (see attached .jpg).
In all cases Rotation, zoom and panning are ok, it is only the time to generate tesselation in test_view1.brep that is longer than occ6.3. (Intel Xeon 3.33Ghz, NVIDIA quadro FX1700).
Best regards.