Why is it better to run CAM algorithms with triangles than the B-rep representation?

112 views
Skip to first unread message

Harnek Gulati

unread,
Jan 16, 2019, 10:47:55 PM1/16/19
to opencamlib
I was reading anders' blog and he said that freesteel guys recommended using triangles for determining boundaries, although I'm not quite sure why. Isn't it less compute power to use the b-rep or parametric representations to determine everything? What am I missing?

Anders Wallin

unread,
Jan 22, 2019, 11:46:47 AM1/22/19
to opencamlib
Hi Harnek,

In principle calculating offsets from an analytic "mathematical" B-rep surface is possible in most cases, and will give you an analytic solution for the tool-location.
However in practice there are numerical instabilities, not all surfaces are one simple B-rep, and the cutter-shape might not be a simple sphere.
For these reasons I think the pragmatic approach used by most CAM-packages is to triangulate surfaces, and then all algorithms can be written with triangles as input.
Currently opencamlib uses an analytic model for the cutter-shape (cylinder, cone, sphere, and toroid, or combination of those) - but in principle one could triangulate the cutter shape also.
There might be interesting algorithms for collision-detection between two STL surfaces developed for game-engines, possibly with GPU acceleration - this might be one approach for CAM also.

For the commercial algorithms unfortunately not much is published where the paper would actually state what commercial program is using the described algorithm - so it's quite hard to say what type of 3D algorithms are used currently by the popular CAD/CAM packages. Unless ofcouse you hear from someone working professionally with CAD/CAM - like perhaps the freesteel blog 10 years ago or so...

Anders


On Thu, Jan 17, 2019 at 5:47 AM Harnek Gulati <gulati...@gmail.com> wrote:
I was reading anders' blog and he said that freesteel guys recommended using triangles for determining boundaries, although I'm not quite sure why. Isn't it less compute power to use the b-rep or parametric representations to determine everything? What am I missing?

--
You received this message because you are subscribed to the Google Groups "opencamlib" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opencamlib+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Harnek Gulati

unread,
Jan 22, 2019, 12:57:01 PM1/22/19
to openc...@googlegroups.com
Interesting...

I was studying this a lot too. I think they seem to use triangulated surfaces for the actual algorithm and then the B-rep for deciding the surface boundaries. The issue I'm seeing is that if you wanted to add pocketing or certain boundaries on the print, you couldn't do that with just STLs... unless there was a clean way to define boundaries from them

-Harnek
--
Harnek Gulati
Occupation: Founder of MakerFleet
Education: Harvard University Computer Science Graduate


Anders Wallin

unread,
Jan 22, 2019, 1:24:05 PM1/22/19
to opencamlib
That blog post links to a slideset which shows some of the issues if you want to do analytic inverse-tool-offset using B-rep - that's not an easy problem to solve either.

If you want the outline/boundary of an STL surface you could do a waterline with a very long and narrow cylindrical tool?
Reply all
Reply to author
Forward
0 new messages