Making a part from a complex mesh made in Blender?

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Post Reply
unfa
Posts: 30
Joined: Mon Jun 15, 2015 6:13 am

Making a part from a complex mesh made in Blender?

Post by unfa »

I have a pretty complex model created in Blender that is meant to be split in half and substracted from stock to create a two-fold mold to manufacture the thing in plastic.

It was a simple model sculpted and smoothed out with Subsurf modifier - finally it has about 35,000 faces.
There's also some extruded text put on top of the surface. Here's how it looks like:
Selection_162.png
Selection_162.png (81.77 KiB) Viewed 2672 times
Selection_163.png
Selection_163.png (48.69 KiB) Viewed 2672 times
Selection_164.png
Selection_164.png (26.4 KiB) Viewed 2672 times
Selection_165.png
Selection_165.png (83.41 KiB) Viewed 2672 times
I can import the mesh from Blender to FreeCAD using the STL format, but I am unable to convert that Mesh object into a Part object.
FreeCAD seems to hang when I do so. After running that process for several hours I've noticed that FreeCAD has 0 CPU usage (in the beginning it was using 1 core about 90% of CPU time) so I killed Freecaf and autosave recovery loaded a project with the mesh converted to Part, but it was so complex, that working with it lags terribly, making it completely impossible to do anything with.

So even if I can convert a mesh to part it's not going to be any useful.

I wonder if I can model this thing from scratch in FreeCAD, helping myself with 2D drawings around the shape, or even the imported STL mesh.

I saw there are some NURBS tools, but I was unable to find a NURBS Workbench in Freecad Daily 0.17.
Maybe I could redo the mesh with NURBS in Blender and import this to FreeCAD?

I also saw there are some freeform geometry modeling tools in FreeCAD, but I have no idea how to use the or if they can do what I need.

Another idea that came to my mind is I could actually render two heightmaps (for each mold) from Blender. Using 16-bit PNG I should be able to get all the detail to reproduce the object accurately - but can I create a part using a heightmap?

I guess similar workflow is used for CNC-milling detailed 3D engravings.

What can I do?

EDIT:

FreeCAD About:

OS: Linux Mint 18 Sarah
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.9666 (Git)
Build type: None
Branch: master
Hash: 987630700d21f71f9c793d106add2106dbb14d84
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
Last edited by unfa on Fri Feb 03, 2017 11:50 am, edited 1 time in total.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Making a part from a complex mesh made in Blender?

Post by Kunda1 »

Please post Help > About FreeCAD > Copy to clipboard
It could also help to post your blender file to facilitate a better answer.
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
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Making a part from a complex mesh made in Blender?

Post by DeepSOIC »

Can't you do it in Blender itself, I wonder...
I suggest you look into making Boolean operations on meshes. I've never done it. AFAIK FreeCAD uses OpenSCAD as the engine for Boolean on meshes, so you will need to install it.
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Making a part from a complex mesh made in Blender?

Post by NormandC »

unfa wrote:I have a pretty complex model created in Blender that is meant to be split in half and substracted from stock to create a two-fold mold to manufacture the thing in plastic.
AFAIK for plastic injection molding in high volume, mold makers will only use 3D models in B-rep format (STEP, IGES or any of the most used CAD kernel formats: Parasolid, ACIS, GSM, etc.)

I think a polygonal mesh format is unsuited for such a purpose. Unless you are planning to machine the mold yourself and don't mind the faceted surface or having to sand/polish a lot? (Just noticed your other topic)
unfa wrote:It was a simple model sculpted and smoothed out with Subsurf modifier - finally it has about 35,000 faces.
Converted to a B-rep solid such a huge count of faces makes the model unmanageable. And even though the model is a B-rep after conversion, it still does not have smooth surfaces.
unfa wrote:I saw there are some NURBS tools, but I was unable to find a NURBS Workbench in Freecad Daily 0.17.
The NURBS tools you saw are python modules and scripts made by members of the forum. Although the underlying OCC kernel supports NURBS, there is as yet no set of tools in FreeCAD for advanced surfacing.
unfa wrote:Maybe I could redo the mesh with NURBS in Blender and import this to FreeCAD?
Unknown, I suggest you try to do a search of the forum. This would require python scripting.
unfa wrote:but can I create a part using a heightmap?
Have a look here: https://forum.freecadweb.org/viewtopic.php?f=8&t=14595
User avatar
microelly2
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Making a part from a complex mesh made in Blender?

Post by microelly2 »

unfa wrote:
I can import the mesh from Blender to FreeCAD using the STL format, but I am unable to convert that Mesh object into a Part object.
FreeCAD seems to hang when I do so. After running that process for several hours I've noticed that FreeCAD has 0 CPU usage (in the beginning it was using 1 core about 90% of CPU time) so I killed Freecaf and autosave recovery loaded a project with the mesh converted to Part, but it was so complex, that working with it lags terribly, making it completely impossible to do anything with.
These kinds of data are to big for Parts. I go the way to import the points and create subobjects as meshes. But you need special methods to get them. Holding the big data in background it is possible to do some meodification on details and reexport the whole object as obj file for production.


So even if I can convert a mesh to part it's not going to be any useful.

I wonder if I can model this thing from scratch in FreeCAD, helping myself with 2D drawings around the shape, or even the imported STL mesh.

I saw there are some NURBS tools, but I was unable to find a NURBS Workbench in Freecad Daily 0.17.
Maybe I could redo the mesh with NURBS in Blender and import this to FreeCAD?
the nurs workbench is a addon.
you find it here
https://github.com/microelly2/freecad-nurbs

I also saw there are some freeform geometry modeling tools in FreeCAD, but I have no idea how to use the or if they can do what I need.

Another idea that came to my mind is I could actually render two heightmaps (for each mold) from Blender. Using 16-bit PNG I should be able to get all the detail to reproduce the object accurately - but can I create a part using a heightmap?
I have a method in the geodat workbench to get the surface from a heightmap
https://github.com/microelly2/geodata

What can I do?
Can you share your banana model, so I can see what is possible.
Working with large dataset is always an adventure and so every task can have an other solution.
unfa
Posts: 30
Joined: Mon Jun 15, 2015 6:13 am

Re: Making a part from a complex mesh made in Blender?

Post by unfa »

You can download the model in a Blend file that I export it from (cleaned up from other stuff to save on bandwidth). It's only going to be online until 2017-02-09, though: https://we.tl/H3lXCartwT

Maybe there is a way for me to prepare a simple freeform mesh in Blender and then smooth it out inside Freecad? Or model the surfaces from scratch in Freecad? I don't know if there are any "artistic-friendly" modelling tools in Freecad, all I've seen so far are things rather technical. That's totally understandable, but what happens when you need to cooperate with artists while manufacturing stuff?

I guess even if my client manages to chew up that STL file and mill it, we all could learn from this example.
User avatar
microelly2
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Making a part from a complex mesh made in Blender?

Post by microelly2 »

Thank you for the file
I made a obj export and import as point cloud into FreeCAD
Still I have not the methods to generate the shell for the whole object
but for the bottom region here a picture is.
bp_351.png
bp_351.png (80.98 KiB) Viewed 2549 times
I think your banana can be modeled with my needle class.
https://freecadbuch.de/doku.php?id=blog ... gen_teil_2

I have to do some more refinements to imporve usability but I think this is the right way
My banana is parametric with only 19 3D Vectors and 20 extra parameters , so the data model is slim.

The workflow I'm working on:
https://www.youtube.com/watch?v=jxyuS9JiYTQ
https://youtu.be/DpMPDCnm8-I
https://youtu.be/XInDSQjoVmI
unfa
Posts: 30
Joined: Mon Jun 15, 2015 6:13 am

Re: Making a part from a complex mesh made in Blender?

Post by unfa »

Yes, the NURBS / needle (no idea why it's called like this) looks like a good tool for the job.

I also thought about making bezier profiles and then performing a loft (sweep?) to model the shape, but I can't find any bezier tool in the sketcher and I don't know how the loft/sweep works yet, so I'll try learning that.
Post Reply