Flatten a face

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
bennn
Posts: 23
Joined: Thu Jul 21, 2016 7:15 am

Re: Flatten a face

Post by bennn »

my bad about the import, I guess I had a session going on....

Here's an updated version.
Attachments
unfoldSheet.py
(3.46 KiB) Downloaded 159 times
User avatar
Vincent B
Veteran
Posts: 4734
Joined: Sun Apr 05, 2015 9:02 am
Location: La Rochelle, France

Re: Flatten a face

Post by Vincent B »

Your macro seems work pretty well. But how to get the hole?
Attachments
Capture.PNG
Capture.PNG (57.51 KiB) Viewed 2375 times
TestUnfold.FCStd
(525.16 KiB) Downloaded 77 times
UR_
Veteran
Posts: 1355
Joined: Tue Jan 03, 2017 8:42 pm

Re: Flatten a face

Post by UR_ »

No problems while using MeshDesignWB

FreeCAD 0.18-000092.png
FreeCAD 0.18-000092.png (56.47 KiB) Viewed 2353 times
TestUnfold_ur.FCStd
(496.23 KiB) Downloaded 77 times

used version (py3qt5!!):
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15109 (Git)
Build type: Release
Branch: master
Hash: f898eafd64f88902ea1916b01303705b3baa2c46
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)
UR_
Veteran
Posts: 1355
Joined: Tue Jan 03, 2017 8:42 pm

Re: Flatten a face

Post by UR_ »

Even no problem, if you decide to become more wild at heart :)

FreeCAD 0.18-000093.png
FreeCAD 0.18-000093.png (70.55 KiB) Viewed 2345 times
TestUnfold_ur_2.FCStd
(104.1 KiB) Downloaded 80 times
_taras_
Posts: 78
Joined: Mon Jul 13, 2015 8:57 pm

Re: Flatten a face

Post by _taras_ »

To UR_
Please show the macro operation step by step. For example, my file.
Attachments
My_test.fcstd
(27.48 KiB) Downloaded 83 times
UR_
Veteran
Posts: 1355
Joined: Tue Jan 03, 2017 8:42 pm

Re: Flatten a face

Post by UR_ »

_taras_ wrote: Fri Nov 02, 2018 7:44 pm For example, my file.
I'm not sure if i understand correctly, but your part looks like a plain piece of sheetmetal with a thickness of 10 mm :(
Nothing to unwrap.

FreeCAD 0.18-000095.png
FreeCAD 0.18-000095.png (7.43 KiB) Viewed 2312 times

For clarification:
Unwrapping works with faces, not with solids (you meshed a solid instead)
So you have to create a midplane first for unwrapping afterwards
Please ensure, this menu item is available from MeshDesignWB (availability depends on installed build of FreeCAD)

FreeCAD-000096.png
FreeCAD-000096.png (2.89 KiB) Viewed 2312 times
jcoppola
Posts: 13
Joined: Fri Nov 12, 2021 11:07 pm

Re: Flatten a face

Post by jcoppola »

Thanks for sharing this. I need to do this for compound curves. Doing non-conformal mapping preserving local distances instead of angles, i see no reason why this methodology could not flatten a surface on both u and v.
Post Reply