Subdivision To N.U.R.B.S. (IGES) for free

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!
User avatar
pafurijaz
Posts: 8
Joined: Sun Dec 18, 2016 6:04 pm

Subdivision To N.U.R.B.S. (IGES) for free

Postby pafurijaz » Sun Dec 18, 2016 6:26 pm

Hi all, I have a little trick that I discovered just today and wanted to share it with you.
I found an easy way to convert the subdivision surfaces, in to nurbs surfaces.

To do this you need two free programs ' FreeShip_Plus ' and another to convert VRML format ' 1 '
First you need to export your files from Blender, eliminating the subdivision modifier and export to obj with the Z axis at the top, after using the program "meshconv" to convert from obj to wrl.

Open ' FreeShip ' and import the VRML format 1 of your object and go to export in IGES and you're done you'll have the nurbs surfaces generated from the cage of your mesh object.

Then import your IGES file with FreeCad and export it in STEP to others CAD

Object converter
http://www.patrickmin.com/meshconv/

Usage: meshconv -c wrl -vrmlver 1 blender-file.obj

Free!Ship Plus
https://github.com/markmal/freeship-plu ... s/releases

Thread on blenderartist.org (With images)
https://blenderartists.org/forum/showth ... )-for-free

I also think it would be possible to use the Freeship's method of exporting to IGES, to convert the mesh, in to nurbs surfaces, internally to FreeCad. Of course I simplify, because here need someone who programs all that, but you could get ideas!
User avatar
microelly2
Posts: 4354
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Subdivision To N.U.R.B.S. (IGES) for free

Postby microelly2 » Mon Dec 19, 2016 9:00 am

The problem of the mesh formats: They are triangulated and loose the fine power of nurbs representation.
So the output becomes complex and overloaded.
User avatar
pafurijaz
Posts: 8
Joined: Sun Dec 18, 2016 6:04 pm

Re: Subdivision To N.U.R.B.S. (IGES) for free

Postby pafurijaz » Mon Dec 19, 2016 10:27 am

Hi, definitely for complex objects and with too many triangles you cannot expect good results, but for items with a good topology you can get excellent results in a very short time, exported a variety of surfaces short time.

Freeship saves files instantly and I think with an script in freeCad, you may have acceptable results.
Schermata del 2016-12-19 11-13-59.png
Surface from Blender
Schermata del 2016-12-19 11-13-59.png (58.99 KiB) Viewed 3071 times
Schermata del 2016-12-19 11-20-00.png
boat made in Blender
Schermata del 2016-12-19 11-20-00.png (37.1 KiB) Viewed 3071 times
Schermata del 2016-12-19 11-33-43.png
Blender View
Schermata del 2016-12-19 11-33-43.png (87.41 KiB) Viewed 3065 times
Attachments
Sub_surf_j.fcstd
Surface Nurbs
(97.86 KiB) Downloaded 44 times
User avatar
microelly2
Posts: 4354
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Subdivision To N.U.R.B.S. (IGES) for free

Postby microelly2 » Mon Dec 19, 2016 2:31 pm

Okay I see , thank you for the example,
I will have a look at it in detail.
User avatar
regis
Posts: 655
Joined: Sun Jul 12, 2015 8:17 am
Contact:

Re: Subdivision To N.U.R.B.S. (IGES) for free

Postby regis » Tue May 23, 2017 5:28 am

pafurijaz wrote:Hi all, I have a little trick that I discovered just today and wanted to share it with you.
I found an easy way to convert the subdivision surfaces, in to nurbs surfaces.

To do this you need two free programs ' FreeShip_Plus ' and another to convert VRML format ' 1 '
First you need to export your files from Blender, eliminating the subdivision modifier and export to obj with the Z axis at the top, after using the program "meshconv" to convert from obj to wrl.

Open ' FreeShip ' and import the VRML format 1 of your object and go to export in IGES and you're done you'll have the nurbs surfaces generated from the cage of your mesh object.

Then import your IGES file with FreeCad and export it in STEP to others CAD

Object converter
http://www.patrickmin.com/meshconv/

Usage: meshconv -c wrl -vrmlver 1 blender-file.obj

Free!Ship Plus
https://github.com/markmal/freeship-plu ... s/releases

Thread on blenderartist.org (With images)
https://blenderartists.org/forum/showth ... )-for-free

I also think it would be possible to use the Freeship's method of exporting to IGES, to convert the mesh, in to nurbs surfaces, internally to FreeCad. Of course I simplify, because here need someone who programs all that, but you could get ideas!

Hello, i've been very interested in your process but unable to recreate, It seems meshconv doesn't seem to work on my computer. Can you show a step by step or a short video clip?
User avatar
pafurijaz
Posts: 8
Joined: Sun Dec 18, 2016 6:04 pm

Re: Subdivision To N.U.R.B.S. (IGES) for free

Postby pafurijaz » Sat Aug 12, 2017 10:22 am

I saw just now, I looked for months but nobody seemed interested until I stopped. :shock: :shock:
User avatar
pafurijaz
Posts: 8
Joined: Sun Dec 18, 2016 6:04 pm

Re: Subdivision To N.U.R.B.S. (IGES) for free

Postby pafurijaz » Sat Aug 12, 2017 10:23 am

A quick tutorial about how to convert.

The steps to convert:
1. Export from Blender in OBJ.
2. Convert from OBJ to VRML1, with Meshconv. **
3. Start FreeShip, and import the VRML1.
4. Export the file to IGES (NURBS).
5. Start FreeCad and then open IGES file and export it, to IGES or other formats NURBS, Moi3d does not open the file exported by FreeShip.

** Meshconv usage: meshconv -c wrl -vrmlver 1 blender-file.obj
User avatar
Kunda1
Posts: 5479
Joined: Thu Jan 05, 2017 9:03 pm

Re: Subdivision To N.U.R.B.S. (IGES) for free

Postby Kunda1 » Sat Aug 12, 2017 12:27 pm

pafurijaz wrote:
Sat Aug 12, 2017 10:23 am
A quick tutorial about how to convert.

The steps to convert:
1. Export from Blender in OBJ.
2. Convert from OBJ to VRML1, with Meshconv. **
3. Start FreeShip, and import the VRML1.
4. Export the file to IGES (NURBS).
5. Start FreeCad and then open IGES file and export it, to IGES or other formats NURBS, Moi3d does not open the file exported by FreeShip.

** Meshconv usage: meshconv -c wrl -vrmlver 1 blender-file.obj
This looks useful! Lets document this on the wiki..eh? @pafurijaz would you like to do that ? (I can make you an account if so)
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
wmayer
Site Admin
Posts: 14776
Joined: Thu Feb 19, 2009 10:32 am

Re: Subdivision To N.U.R.B.S. (IGES) for free

Postby wmayer » Sat Aug 12, 2017 3:31 pm

I was playing a bit with FreeShip but none of the IGES files it created I could load into FreeCAD. Could you please upload some test files, e.g. the obj file of the monkey and the IGES file FreeShip creates?

EDIT:
Btw, you can also create VRML1 files with FreeCAD with a manual change afterwards. Therefore save a mesh (in the Mesh workbench) as OpenInventor and the file extension .iv. Then open the .iv file and change the header from

Code: Select all

#Inventor V2.1 ascii
to

Code: Select all

#VRML V1.0 ascii
and change the file extension to wrl or vrml
User avatar
regis
Posts: 655
Joined: Sun Jul 12, 2015 8:17 am
Contact:

Re: Subdivision To N.U.R.B.S. (IGES) for free

Postby regis » Sun Aug 13, 2017 12:36 pm

wmayer wrote:
Sat Aug 12, 2017 3:31 pm
I was playing a bit with FreeShip but none of the IGES files it created I could load into FreeCAD. Could you please upload some test files, e.g. the obj file of the monkey and the IGES file FreeShip creates?

EDIT:
Btw, you can also create VRML1 files with FreeCAD with a manual change afterwards. Therefore save a mesh (in the Mesh workbench) as OpenInventor and the file extension .iv. Then open the .iv file and change the header from

Code: Select all

#Inventor V2.1 ascii
to

Code: Select all

#VRML V1.0 ascii
and change the file extension to wrl or vrml
Is is possible to import a blender subdivision curve surface and/or nurbs into freecad and have bhem appear as nurbs?
I've been trying to recreate the process mentioned above
no luck with using freeship, Ayam, gcad3d and Meshconv

essentially, how can you make sure your blender model gets translated into curve faces?