Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] In search for the limits of CGAL

Subject: CGAL users discussion list

List archive

[cgal-discuss] In search for the limits of CGAL


Chronological Thread 
  • From: <>
  • To: <>
  • Subject: [cgal-discuss] In search for the limits of CGAL
  • Date: Fri, 21 Aug 2020 20:52:48 +0200
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:WS7rNh35eWkSLvPjsmDT+DRfVm0co7zxezQtwd8ZseIfKPad9pjvdHbS+e9qxAeQG9mCtbQd0rCd6vm+EUU7or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6arXK99yMdFQviPgRpOOv1BpTSj8Oq3Oyu5pHfeQpFiCe8bL9oMRm6sBvdusYLjYd/K6s61wfErGZPd+lK321jOEidnwz75se+/Z5j9zpftvc8/MNeUqv0Yro1Q6VAADspL2466svrtQLeTQSU/XsTTn8WkhtTDAfb6hzxQ4r8vTH7tup53ymaINH2QLUpUjms86tnVBnlgzoBOjUk8m/Yl9ZwgbpbrhK6uRJx3oDaboKaO/Viea3dYcgXSnBdUsZeTyFNHJ+wYokJAuEcPehYtY79p14WoBa5HQmjGv/vxSFShnDu2q06yPguHBrJ3Qw7EN8BqnDUrNHvOKcUVeC41a/FxijMYP1Kwzny8pTIcgw/rvGWW7J9acTcxFQzGg7KkFmeqYzrMi2I2ukQr2WX8eptWOavhmAptQ18oTahyMgihITGm48YxEzI+CR9zYs7OdC1R0p2bcKiHZBNuS+aMI52TdkjQ2FuoCs6zaUGtoC9fCgR1Jso3QPQZ+aAc4iS7RLuUvuaLzRghH99Zb6ygxm//VK9xuHgUsS4ykhGoyVfntTCqnwBzxLT5dSbRvRh+0quxSuD2gHS5+xBP085lqjWJIAkz7M0l5ccrErOEyr5lUnqjaKbdEAp9fO15Ov6Zrjro5+ROo5qhQz7MKkjm9GwAeo+PwMTRWaU4/6826fm/UDhQLVFkPk2kq7BvZDePssWqLe1AxRQ0oY/8xazFiup0NAfnXkaMV1IfAiLjofyO1zBOv/4CfO/j06qkDh12/DKJrzhApPTIXjfiLrtYLJw5kFGxAYu0dxS44hYBq8OLf7pVEL9qMTUDhojPAy1x+bnBs991oQbWW+XHK+WLqfSsUST6eIoOOmMfpQYuTnmK/Uq/fHuiXs5lUUbfamtxZcXcmy3Hux6I0WFZnrhmssOEWgQsQo6VeDllVyCUSVPaHavRKI8/So2CJmmDIfGXoCimqaN3Ca9Hp1MZ2BJEEqAEXnyd9bMZ/BZPCmdK8sknj0fXqW6UKcg0wuvvUn00ew0APDT/3hMrZ//2cJC4PbYvQEpqTVwC4Kb1zfeHClPgmoUSmpuj+hEqktnxwLbiPkqs7ljDdVWoshxfEI/PJ/YwfZ9DomrCBLaIt6NTBCgRof/WGxjfpcK29YLJn1FNZCigxTEhXr4B7VO0qeOGIRx+abbwnSgYdZml3/C0O8ngkV0GpITZ13jvbZ28k3oP6CMi1+Qzv/4Zb9A1SrJsmGHnzKD

I recently posted a message in the OpenSCAD forum about slow performance on rendering.

http://forum.openscad.org/Slow-rendering-performance-and-high-memory-consumption-when-exporting-a-3D-STL-td29888.html

 

The problem is this: we use machine generated designs that might have up to 7,000 elements. At any time we want to make intersections of this design, effectively dividing it up into 20 to 100 slices of which we must gather properties like volume, centroid and inertia tensors. We use a post processor to add material properties as CGAL (and all other geometric engines) don’t know any material properties.

 

We thought this could be done by creating meshes (STL) from these intersection/slices in OpenSCAD but found out that OpenSCAD couldn’t do this. It uses memory up to 50+ GB and more and finally the system freezes due to a lack of resources. OpenSCAD community members suggested that this might be caused by the fact that CGAL uses fractional numbers for its (final?) rendering. In the OpenSCAD GUI, it still manages to calculate and render the intersection within a second but fails to do the final rendering prior to exporting the STL. So it seems there are two rendering strategies active at the same time: ‘quick’ and ‘slow but accurate’.

 

I also defined a benchmark in the above post where an intersection is to be calculated between a cuboid and a stacked series of rings that contain spheres. It turned out that OpenSCAD using the CGAL engine managed to do this in 42 minutes using 5GB of memory while two other packages (FreeCAD and AngelCad based on OpenCascade and CARVE respectively) managed to do this in a few seconds or even less. So there is a factor of 100 performance difference between CGAL and the rest which I consider as huge.

 

I therefore want to ask the experts for their opinion and guidance:

  • Is this slow performance  and huge memory consumption for rendering an intersection of a complex design in OpenSCAD actually caused by CGAL because it uses fractional numbers as some community members suggested?
  • Are there any workarounds in CGAL itself (assuming that we would directly communicate with the geometric engine instead of using OpenSCAD) where we would be able to make meshes (STLs) from intersection of complex (3000+ elements) designs?
  • Are there any possibilities in CGAL to directly ask for properties of an intersection like the volume and centroid without creating a mesh?

 

 

Your advice is greatly appreciated,

Pete




Archive powered by MHonArc 2.6.19+.

Top of Page