Nurbs editor

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!
triplus
Posts: 9278
Joined: Mon Dec 12, 2011 4:45 pm

Re: Nurbs editor

Postby triplus » Wed Jul 20, 2016 8:28 pm

Fair enough. I just shared my view and feel free to do it as you see it fit.
User avatar
microelly2
Posts: 4626
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Nurbs editor

Postby microelly2 » Thu Jul 21, 2016 5:42 pm

Basic functions implemented, the solids pass the geometry check and can be used with Part Bool'Ops.
https://youtu.be/xY7o6rBQP1M
I have replaced the pole grid lines by splines and selection goes now over the uv lines.
It's easier to select a point as a common of two curves than to fly into the part if the control point lies in a cavity.
Editing by using the grid of the part is more intuitive but I have still no idea how to implement.

Next steps:
make the gui comfortable
optimize the calculations to get faster output on changes.
create some examples
nurbs theory tutorial
Attachments
bp_074.png
bp_074.png (315.78 KiB) Viewed 2909 times
User avatar
bejant
Posts: 6061
Joined: Thu Jul 11, 2013 3:06 pm

Re: Nurbs editor

Postby bejant » Fri Jul 22, 2016 12:12 am

Wow - very nice microelly2!
User avatar
Pauvres_honteux
Posts: 262
Joined: Sun Feb 16, 2014 12:05 am
Location: Far side of the moon

Re: Nurbs editor

Postby Pauvres_honteux » Fri Jul 22, 2016 8:05 am

:o @microelly2 - you're the unsung hero of FreeCad!

I hereby boldly claim this to be the start of a surface workbench!
This is a huge, no better still, it's a humongous step forward to get a complete CAD program!

I'm crossing everything imaginable, including my tounge, hoping for the best and whish you all of luck in all your efforts!!!

BRAVO!
ezzieyguywuf
Posts: 637
Joined: Tue May 19, 2015 1:11 am

Re: Nurbs editor

Postby ezzieyguywuf » Fri Jul 22, 2016 3:49 pm

microelly wrote:Editing by using the grid of the part is more intuitive but I have still no idea how to implement.
What do you mean by this? Granted, I don't know much about Nurbs, but it looks like you have two grids: a control grid in purple that is what you actually push/pull, then a grid that is generated for the surface that intersects all the points on your control grid.

Are you saying it would be more intuitive to click a point on the purple control grid and then drag it to modify? If so, what issues have you run into implementing this?
mario52
Posts: 2857
Joined: Wed May 16, 2012 2:13 pm

Re: Nurbs editor

Postby mario52 » Fri Jul 22, 2016 6:35 pm

hi
very good work
have you tried with the lines created with my macro Macro_Texture

mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Dialog creation. My macros on Gist.github.
User avatar
microelly2
Posts: 4626
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Nurbs editor

Postby microelly2 » Fri Jul 22, 2016 6:59 pm

mario52 wrote: have you tried with the lines created with my macro Macro_Texture
mario
It's one of the next features, I just look for algorithms to reduce the number of poles to interpolate such structures.
mario52
Posts: 2857
Joined: Wed May 16, 2012 2:13 pm

Re: Nurbs editor

Postby mario52 » Fri Jul 22, 2016 8:10 pm

hi
microelly2 wrote:It's one of the next features, I just look for algorithms to reduce the number of poles to interpolate such structures.
very interesting but for one image reduce the number of points (pole) reduce the quality of the photo , I tried but abandoned.

mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Dialog creation. My macros on Gist.github.
User avatar
microelly2
Posts: 4626
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Nurbs editor

Postby microelly2 » Fri Jul 22, 2016 9:13 pm

A test with 200 x 100 poles and 1000 random modifications
the idea behind: create a tree bark structure as a real model and not only a bump map.

runtime 32 sec.
the runtime to create the grids is minimal but the rendering takes time.
the runtime increases with the square of the polenumber.
bp_076.png
bp_076.png (294.21 KiB) Viewed 2802 times
mario52
Posts: 2857
Joined: Wed May 16, 2012 2:13 pm

Re: Nurbs editor

Postby mario52 » Sat Jul 23, 2016 9:20 am

hi
reliefs walnut bark

Image

mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Dialog creation. My macros on Gist.github.