Trying to unwrap a surface

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!
erich
Posts: 8
Joined: Mon Nov 18, 2019 8:50 pm

Trying to unwrap a surface

Post by erich »

Hi,
I'm trying to unwrap two cylinders with the ends cutout to make paper templates so I can cut out the tubes for a suspension a-arm.
Searching online gives a macro to install, "Unroll Ruled Surface" I've installed it (and it's full of mixed tabs/spaces which I fixed locally), it doesn't work for my simple model.

I've attached the file hoping someone can educate me on what I'm doing wrong.

Thanks,
Eric

I'm running the daily builds:
OS: Ubuntu 16.04.6 LTS (XFCE/xubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Python version: 3.5.2
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Canada (en_CA)
Attachments
SolidSockets.FCStd
(108.1 KiB) Downloaded 64 times
erich
Posts: 8
Joined: Mon Nov 18, 2019 8:50 pm

Re: Trying to unwrap a surface

Post by erich »

OK, I'm trying a different plan of attack but hit another weird problem.
I managed to get what the model view says is two wires, but one of them is in two parts and I cannot get any tool or combination of tools to join it into a functional single wire.
If I select the two wires in the model view and "Create a ruled surface" from them, only half of one is used. I've tried upgrading, join, downgrading into pieces and re-upgrading. Pretty much every combination I could think of to try and get the two halves of the wire joined into a single wire.

What simple thing am I missing?
The object "Wire" is the one I can't get to join.

Thanks,
Eric
Attachments
RuledSurface4.FCStd
(349.11 KiB) Downloaded 53 times
ulrich1a
Veteran
Posts: 1957
Joined: Sun Jul 07, 2013 12:08 pm

Re: Trying to unwrap a surface

Post by ulrich1a »

I think the macro "Unroll Ruled Surface" has issues and does not work as expected. A year ago, I started to write my version of it. It was written with python 2. I will check tomorrow, if it can be used under actual FreeCAD.

Ulrich
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: Trying to unwrap a surface

Post by looo »

If you can create a mesh, it's possible to use the unwrap mesh command from mesh-part workbench.
erich
Posts: 8
Joined: Mon Nov 18, 2019 8:50 pm

Re: Trying to unwrap a surface

Post by erich »

looo wrote: Thu Nov 21, 2019 5:25 am If you can create a mesh, it's possible to use the unwrap mesh command from mesh-part workbench.
I don't think that workbench exists today. At least I can't find any recent reference to it.
UR_
Veteran
Posts: 1354
Joined: Tue Jan 03, 2017 8:42 pm

Re: Trying to unwrap a surface

Post by UR_ »

A little example, how to unwrap a tube.

remarks:
- Cylinder-connector has an angle less than 360°, because mesh needs a cut. In this example 355° for better visibility only.
- Cylinder's face is extracted by Lattice2 workbench (please see adddon manager), but only to preserve parametrics.
- Face is meshed by "Mesh Design" workbench (netgen, very fine)
- Unwrapped by "Mesh Design" "Unwrap Mesh"

Screenshot 002.png
Screenshot 002.png (50.21 KiB) Viewed 3844 times
TubeConnector.FCStd
(140.85 KiB) Downloaded 67 times

version:
OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18760 (Git)
Build type: Release
Branch: master
Hash: ef73ab5f3a330d3c44138f23290f8c9f7a334caf
Python version: 3.7.3
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)
erich
Posts: 8
Joined: Mon Nov 18, 2019 8:50 pm

Re: Trying to unwrap a surface

Post by erich »

UR_ wrote: Thu Nov 21, 2019 9:24 am A little example, how to unwrap a tube.
remarks:
- Cylinder-connector has an angle less than 360°, because mesh needs a cut. In this example 355° for better visibility only.
- Cylinder's face is extracted by Lattice2 workbench (please see adddon manager), but only to preserve parametrics.
- Face is meshed by "Mesh Design" workbench (netgen, very fine)
- Unwrapped by "Mesh Design" "Unwrap Mesh"
Thanks for the help, except the "Mesh Design" workbench doesn't have "Unwrap Mesh" anywhere that I can find.
Is my two week old daily build too old?

Thanks,
Eric
UR_
Veteran
Posts: 1354
Joined: Tue Jan 03, 2017 8:42 pm

Re: Trying to unwrap a surface

Post by UR_ »

erich wrote: Thu Nov 21, 2019 6:39 pm Is my two week old daily build too old?

Don't think so.
I'm a windows user (conda build), and here it is available for longer time.

Screenshot 003.png
Screenshot 003.png (28.05 KiB) Viewed 3723 times

Perhaps we have to ask a packager

sgrogan wrote: :bell: Has Linux conda appimage 0.19 "unwrap mesh" support :?
erich
Posts: 8
Joined: Mon Nov 18, 2019 8:50 pm

Re: Trying to unwrap a surface

Post by erich »

This is what I get:
meshes.png
meshes.png (26.37 KiB) Viewed 3716 times
I guess it's not in the daily builds?
ulrich1a
Veteran
Posts: 1957
Joined: Sun Jul 07, 2013 12:08 pm

Re: Trying to unwrap a surface

Post by ulrich1a »

Here is my macro as work in progress. It is not perfect. Some faces do overlap in difficult cases. It should unwrap shapes with flat and cylindrical and conical surfaces. But there are more cases than I can ever test.

Ulrich
Attachments
unroll7p3.py.zip
Macro to unwrap, work in slow progress
(8.48 KiB) Downloaded 228 times
Post Reply