Optimization of the script for performing multiple Boolean operations

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
Klikest
Posts: 7
Joined: Fri May 27, 2022 7:07 pm

Optimization of the script for performing multiple Boolean operations

Post by Klikest »

Hello everyone

I am a student and am engaged in a project to develop an application for a CNC machine. One of the tasks of the program is to simulate surface treatment during machine operation with animation of the cutting or grinding process. I wrote 2 trial macros in Freecad using different types of geometry, but faced the problem of poor performance (with each iteration, the execution time of the Boolean operation increases. After several dozen iterations, the Boolean operation begins to take about a second, which is unacceptably long).
Is it possible to increase the speed of these macros?
As far as I understand, there is already something similar in the Path workbench, but I do not know how to get it out of there.
Now I am studying the possibility of writing such a program on my own in C++. From the functionality of the program, I only need to create 3d primitives, move them and be able to perform Boolean operations on them.
I would be extremely grateful for any help and advice on how to approach my task.
Thanks!
Attachments
Mesh_Macro.FCMacro
(1.3 KiB) Downloaded 9 times
Shape_test.FCMacro
(987 Bytes) Downloaded 10 times
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Optimization of the script for performing multiple Boolean operations

Post by Kunda1 »

CC @sliptonic @mlampert
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Post Reply