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!
User avatar
microelly2
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Nurbs editor

Post by microelly2 »

Maitregoupil wrote: Or maybe the problem is I use FreeCAD version 0.16 running under windows 7 ?
Yes, there is a lot of new functionality in 0.17,
so try the 017_pre
https://github.com/FreeCAD/FreeCAD/releases
Attachments
bp_479.png
bp_479.png (34.97 KiB) Viewed 2535 times
Maitregoupil
Posts: 5
Joined: Fri Apr 21, 2017 11:18 am
Location: France

Re: Nurbs editor

Post by Maitregoupil »

Ok I got it, now I can create all the basic random figures !

From a "surface" point of view the plane figure is not so far away from what I wanna do.
microelly2 wrote: My idea is to have a collection of BSpline curves and connect them to a surface.
If you want a planar surface with some hights, this is a "special case" of the shoe.
I will prepare an example for you.
At this time I can't really say that I see the link between the shoe and my wood panel :?

The idea would be to get a regular rectangular 3D panel with one face like the plane with randoms and to learn how to define the panel size, how to define the control points grid (size, position and number of points) and how to modify the control points to design original surfaces and maybe how to introduce randomness.

I guess all these operations must be done by writting some Python code that will generate the desired figure when executed ?

Thank you very much for your help !
User avatar
microelly2
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Nurbs editor

Post by microelly2 »

Maitregoupil wrote:
The idea would be to get a regular rectangular 3D panel with one face like the plane with randoms and to learn how to define the panel size, how to define the control points grid (size, position and number of points) and how to modify the control points to design original surfaces and maybe how to introduce randomness.

I guess all these operations must be done by writting some Python code that will generate the desired figure when executed ?
yes, the idea here is to read the data from a 2D matrix like a tiff image.

there are many ways to get a planar like structure,
for geodata terrains I use the same methods
starting point is a dataset and the scripts are ready to use

starting from here
https://forum.freecadweb.org/viewtopic. ... 00#p129973
may be a good to get more ideas.

in your case you define a elevation map (a matrix with heights over a grid)
then its a simple way to create the surface.
up to 10000 control points is not a problem, for larger set you have to accept more computing time.
look into the geodat workbench https://github.com/microelly2/geodata/
User avatar
microelly2
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Nurbs editor

Post by microelly2 »

some first results:
length preserving maps - map the surface to a plane which preserves the length on the main curves (uIso and vIso)
bp_592.png
bp_592.png (338.63 KiB) Viewed 2258 times
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Nurbs editor

Post by triplus »

Nice to see you are working on this again.
User avatar
microelly2
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Nurbs editor

Post by microelly2 »

triplus wrote: Mon Oct 23, 2017 8:09 am Nice to see you are working on this again.
I worked most time on this, but it is better to have a vision and this vision is to create a real shoe design.
User avatar
microelly2
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Nurbs editor

Post by microelly2 »

The workflow

create/get a BSplineSurface
create a map object
draw 3D onto the surface
map the drawing down to 2D
Edit the 2D curve
map the 2D curve back to the 3D surface

phpBB [video]
thschrader
Veteran
Posts: 3157
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Nurbs editor

Post by thschrader »

Hello microelly,
I wanted to do your tutorial above. After generating the random surface and pressing
the "draw on face" button I get the error message.
regards Thomas
system:
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.12431 (Git)
Build type: Release
Branch: master
Hash: c397aee9ed3efcb2e33fa719313c98cc4867cf32
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: German/Germany (de_DE)
noScipyModule.JPG
noScipyModule.JPG (90.25 KiB) Viewed 2126 times
User avatar
microelly2
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Nurbs editor

Post by microelly2 »

You have to install scipy
see here:
https://forum.freecadweb.org/viewtopic. ... 20#p173403
https://forum.freecadweb.org/viewtopic. ... 7&start=20

another discussion is here:
https://forum.freecadweb.org/viewtopic.php?t=20674

I prefer the winpython way because with winpython I get a large number of python libs in one step.
thschrader
Veteran
Posts: 3157
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Nurbs editor

Post by thschrader »

microelly2 wrote: Wed Oct 25, 2017 6:22 am You have to install scipy
see here:
https://forum.freecadweb.org/viewtopic. ... 20#p173403
https://forum.freecadweb.org/viewtopic. ... 7&start=20

another discussion is here:
https://forum.freecadweb.org/viewtopic.php?t=20674

I prefer the winpython way because with winpython I get a large number of python libs in one step.
Gulp...hard stuff for a guy like me who did his last coding with Fortran 77 in the
last century ;)
Post Reply