Can FreeCAD convert adjacent faces to an arc?

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Galane
Posts: 22
Joined: Thu Mar 19, 2015 11:04 am

Can FreeCAD convert adjacent faces to an arc?

Post by Galane »

If I have several small faces side by side roughly describing an arc, is there a way to replace them with an arc plotted through the edges and/or vertexes of those faces?
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Can FreeCAD convert adjacent faces to an arc?

Post by wmayer »

The object you are talking about is it a mesh or a part shape, i.e. a cad model?

In case it's a part shape we have a function accessible via Python to do this but currently there is no way to do it with the GUI.
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Can FreeCAD convert adjacent faces to an arc?

Post by yorik »

The Part function will approximate to a bspline, right? I wonder if there would be a good method to approximate to an arc... Maybe just take 3 points of a wire?
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Can FreeCAD convert adjacent faces to an arc?

Post by wmayer »

The function is called replaceShape and the replacement shape can be everything, not just a b-spline. However, using this function is not easy because it works very low-level which means that depending on the model you have to replace wires, edges or vertexes too.
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Can FreeCAD convert adjacent faces to an arc?

Post by yorik »

One more FreeCAD secret I didn't know!
Galane
Posts: 22
Joined: Thu Mar 19, 2015 11:04 am

Re: Can FreeCAD convert adjacent faces to an arc?

Post by Galane »

Right now it's a simple, flat, profile shape. 1 face each top and bottom - same shape, connected with multiple flat and vertical rectangular faces.

The largest vertical faces need to stay flat. The ones I want to replace with curves, arcs, splines - whatever Heeks can translate to efficient curvy G-code - are the ones that approximate curves.

One characteristic separating the flat VS wannabe curves is the ones to remain flat are wider than they are tall and the others are taller than they are wide.

What could be done with this shape is delete one horizontal face then select the points to be curve-verted :roll: convert them then extrude back to the height of the original 3D model.
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Can FreeCAD convert adjacent faces to an arc?

Post by wmayer »

I think an example would be helpful.
Galane
Posts: 22
Joined: Thu Mar 19, 2015 11:04 am

Re: Can FreeCAD convert adjacent faces to an arc?

Post by Galane »

Here's an example file.
Attachments
striker-test - Copy.rar
(85.05 KiB) Downloaded 34 times
mario52
Veteran
Posts: 4673
Joined: Wed May 16, 2012 2:13 pm

Re: Can FreeCAD convert adjacent faces to an arc?

Post by mario52 »

hi
is what these two macro meet your needs ?
Macro_cutLine
Macro_cutCircle
they are included in the macro Macro_WorkFeatures

the original object is not modified
FacetoArcs00.png
FacetoArcs00.png (23.45 KiB) Viewed 1993 times
mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
Galane
Posts: 22
Joined: Thu Mar 19, 2015 11:04 am

Re: Can FreeCAD convert adjacent faces to an arc?

Post by Galane »

How about some exact instructions on how to install your Work Feature addon? I found the macro folder and unzipped it to there. Now how do I make it actually work?
Post Reply