Skip to Content.
Sympa Menu

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

Subject: CGAL users discussion list

List archive

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


Chronological Thread 
  • From: <>
  • To: <>
  • Subject: RE: [cgal-discuss] In search for the limits of CGAL
  • Date: Mon, 24 Aug 2020 12:41:49 +0200
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:+VhmGBBC3KkEyM7P2C/oUyQJP3N1i/DPJgcQr6AfoPdwSP37oMSwAkXT6L1XgUPTWs2DsrQY0rSQ6vmwEjRQqb+681k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i764jEdAAjwOhRoLerpBIHSk9631+ev8JHPfglEnjWwba5zIRmssAndq8objYR+Jqsy1xDEvmZGd+NKyG1yOFmdhQz85sC+/J5i9yRfpfcs/NNeXKv5Yqo1U6VWACwpPG4p6sLrswLDTRaU6XsHTmoWiBtIDBPb4xz8Q5z8rzH1tut52CmdIM32UbU5Uims4qt3VBPljjoMOjgk+2/Vl8NwlrpWrhK6pxJhzY7bYpybOvR9cKzSYdwUQnZBU91LWCBdDYOxd5UDA/YDMOtesoLzp0EOrRy7BQS0A+7v0iFHhmPo0q0gy+shFhrG0xA7EtMBq3TZo8/6NKMWUeyvyqnIySzOYvVL0jjy9IbGaAouoe2QXb1ua8rRz1EiGh/KgFuft4DoMDGY2+YMvmWV4edsSPyjh3A7pwxtvzSixtshhIfVi4wb113I6SF0zZs2KNClVUJ3f96pHZtMuyycKoB4TMQiQ2RytyY7zL0LoZm7fDAUx5Qh3B7Qd+aIfJWS7hLkTuaRLi90hHNjeLKlhha961KsyuPmVsSyzV1ErTJFn8HRun0J2BHf8NWLRud580u7xzqC2Brf5v9HLEwsm6rUN4ItzaI1m5UPrEjOHy77lUDog6KVdEgr5O2l5uDmb7r7qJKRMoB5hh3/P6ksn8GwGvk3PRUKUmWe+emx1aPs8Ej7TbhLk/I2nK/Uu43AK8sBvK62GQpV354j6xmhCzem18wVnX0cI15bYR6HlI3pO03WIPzhEfi/h1OskCp2yP3EJLHgDY7NI3fZn7flebZx8UhcxxQvzdxH5pJUDK8OIO7rV0PssNHVAQU1PxGoz+vjEtlxyIwTVXiRDqKaKK/StEWH5uMrI+mCfo8VvzP9JuA75/HwiX85gkQSfa6y3ZsNc325Ee9mLkqDbnrohtcNC2EKvg4mQOzwlFKCSSJTZ2q1X68k+j47B5ipDYPaSo+wgbyBxzu0HoBNZmBdEV2MCnfpd4CcW/gWci6SI8lhkiYFVbe7UYMh2wuu50fHzaF6JL/U5jEArsCkk8Nk4vXa0xA07z19ScqHlHqcSnl92WIOSThx1692pQlxy0yIzLNj0MFeDsFZx+9MVlI6KYLE1L49TMvjXxrIONaPUlevBNu8RiogS8o4hN4IbUE6ENqrilXP3jGhHqQOxIGNH4E+zq/Mwy3xO9pl0CSBk7IwikEvBMpJL2yvwKBlsBPCApbA1ESfmaHtfqsV2GvB9XyI0HGV731fBVp7XqzBGHwefUDLts/R50XYTrboB65xYSVbzsvXfrNHdtDzulJdT9/zI4jXZ2b3nWPmVkXA/a+FcIe/IzZV5y7aEkVRy1lCr0bDDhA3A2Kam0ybCTVvEVz1ZEa1qLtusy+ySktyyQXYNhQ9hYrwwQYcgLmnc91WxqgN4X5zuy4oFVK5mdTSWYLZ+lhROZ5EaNZ4229pkGLUswsnbs6kJfonnVsCa0F8u0Tz20oxGp4cmMwu6nUn0FgqJA==

Hi Andreas,

 

The link I added in my description contains a benchmark example.

 

The design itself consists of (intersections of) mainly cylinders, cones and spheres.

 

With "intersection of complex (3000+ elements) designs" I mean that I must make cuboid intersections of the design, effectively dividing it into slices. For every slice I must calculate some fundamental properties like mass, volume, area, centroid and inertia tensors.

 

Pete.

 

From: <> On Behalf Of Andreas Fabri
Sent: Sunday, August 23, 2020 18:02
To:
Subject: Re: [cgal-discuss] In search for the limits of CGAL

 

Hello,

We have no idea how OpenSCAD uses CGAL.

What do you mean with " intersection of complex (3000+ elements) designs:"?

Maybe you can give us some example data sets and we can tell you how to do
Boolean operations.  Note that CGAL Boolean operations work for volumes
given as triangle meshes, so in case you have spheres they have to be
discretized by you.

Best regards,

Andreas

On 8/21/2020 8:52 PM, wrote:

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


--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss

-- 
Andreas Fabri, PhD
Chief Officer, GeometryFactory
Editor, The CGAL Project
 
phone: +33.492.954.912    skype: andreas.fabri


--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss




Archive powered by MHonArc 2.6.19+.

Top of Page