Macro to find small bodys

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
rathio
Posts: 5
Joined: Wed Mar 14, 2018 9:10 pm

Macro to find small bodys

Post by rathio »

Hello together,

i have a question to my use case.
Is there away to select small bodys and deleted them?

In detail:
I have a big step-file that i only need for a space claim model. In this model are many small parts that i don´t needed.
So i tought i write a marco, too select bodys, small than a diagonal of a boundingbox.

I there a way?

Thanks a lot for your ideas.

René
galou_breizh
Posts: 436
Joined: Wed Sep 15, 2010 9:38 am

Re: Macro to find small bodys

Post by galou_breizh »

My advise is that you record a macro, do the action manually and then modify the macro to run it through all objects.

By the way, you can get the diagonal of bounding boxes with object.Shape.BoundBox.DiagonalLength in millimeters and the list of objects with App.ActiveDocument.Objects.

The rest is let as exercise.

Gaël
Post Reply