Freeform surface manipulation through interactive movement of nodes

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!
freecad-heini-1
Posts: 5755
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Freeform surface manipulation through interactive movement of nodes

Postby freecad-heini-1 » Mon Sep 16, 2019 8:45 am

Some time ago microelly2 and looo showed possibilities how to interactively deform and manipulate free-form surfaces using nodes.
Here you can find the original forums posts:
https://forum.freecadweb.org/viewtopic. ... 63#p204863
https://forum.freecadweb.org/viewtopic. ... 73#p204873

The following videos were shown:
phpBB [video]

phpBB [video]


phpBB [video]

phpBB [video]


Who also thinks that we can use such tools?

In which Workbench should such tools be integrated?
Surface-, Curves-, Manipulator?

Best regards
Wilfried
carlopav
Posts: 242
Joined: Mon Dec 31, 2018 1:49 pm

Re: Freeform surface manipulation through interactive movement of nodes

Postby carlopav » Mon Sep 16, 2019 6:19 pm

Really interesting, I did miss one or two of those!
I'm keeping track: maybe something I can integrate in draft edit too...
looo
Posts: 2821
Joined: Mon Nov 11, 2013 5:29 pm

Re: Freeform surface manipulation through interactive movement of nodes

Postby looo » Tue Sep 17, 2019 11:53 am

yes it would be nice to have a good implementation for moveable control-points in FreeCAD. But to achieve something useful it's necessary to spend a lot of time on this topic.

Also it would be nice to know what we really need. Creating some special tools is not that difficult. But creating something as generic as possible usable for multiple workflows is something different. I guess some examples of other cad-systems will help to start a discussion on this topic.
carlopav
Posts: 242
Joined: Mon Dec 31, 2018 1:49 pm

Re: Freeform surface manipulation through interactive movement of nodes

Postby carlopav » Wed Sep 18, 2019 5:57 am

looo wrote:
Tue Sep 17, 2019 11:53 am
yes it would be nice to have a good implementation for moveable control-points in FreeCAD.
That would be a game changer... I was experimenting a bit copy-pasting your pivy graphics into draft edit. It works flawlessly.
Now I am experimenting on keeping it always on when draft wb is active so when just one object is selected control points are displayed... But in this way points editing conflicts a bit with the selection system... I'll be glad to have some opinions/suggestions from you :)
wmayer
Site Admin
Posts: 14782
Joined: Thu Feb 19, 2009 10:32 am

Re: Freeform surface manipulation through interactive movement of nodes

Postby wmayer » Wed Sep 18, 2019 7:57 am

In which Workbench should such tools be integrated?
Surface-, Curves-, Manipulator?
IMO, such a tool should go to the Surface wb. There is a few years old ticket assigned to me that is exactly about this.
looo
Posts: 2821
Joined: Mon Nov 11, 2013 5:29 pm

Re: Freeform surface manipulation through interactive movement of nodes

Postby looo » Fri Sep 20, 2019 7:54 am

To get a useful experience with surface modification I guess we cannot use the bspline tools from opencascade. (as far as I know occ does't allow to recompute the surface by simple doing a sparse matrix multiplication).
So either we use coin for this task (coin provides a implementation of nurbs) or go with something else. If this matrix-multiplication is done with numpy there is not much speed difference between a c++ implementation or the python implementation.

Not sure if it makes sense if the interaction nodes are implemented in c++. Somehow my implementation [1, 2] used for glider-workbench has some problems on osx (slow). but I guess sketcher has similar problems and this might be related to qt or coin. Anyway I think the dragger-functionality should be implemented in c++ and might be some extension to one of the inventor-draggers. The implementation must have callback-lists (on-drag, drag-start, drag-end) which can store python and c++ functions. Allthough done already twice I am not yet sure how to best implement a dragger for FreeCAD. I guess writing a proposal for this would be good first step. Afterwards we can think about the details. (My implementations always extended a coin.SoSeparator and made special coin objects (also separators) underneath it select- and dragable. These objects so far were points, lines and faces.
Also these draggers must work within the freecad-(pre)selection mechanism. Or we simple have to switch beteen different selection-modes.

So lots of stuff to think about. Would be nice to know what others think about it.

[1] https://github.com/FreeCAD/pivy/blob/ma ... __.py#L162
[2] https://github.com/booya-at/OpenGlider/ ... old.py#L99
User avatar
Chris_G
Posts: 1104
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: Freeform surface manipulation through interactive movement of nodes

Postby Chris_G » Tue Sep 24, 2019 8:41 am

Hi,
I also think a toolbox of draggers would be very useful.
I experimented with looo's pivy/graphics.
In the test file below (needs a fresh update of CurvesWB), all the object can be edited by double-clicking them in the TreeView.
- while dragging a point of the SplitCurve, you can cycle through [ param / mm / % ] units with "v" key
- while dragging the base point of the BlendCurve, you can cycle through the continuity values with the "c" key.
The BlendCurve editor was tricky to build, because the base marker is snapped on an edge, it generates a tangent, on which another marker is snapped.
And the continuity text control is also attached to it.
So the base draggers would often need to be aggregated into bigger "compound" draggers.
I would love to see a solid library structure being created.
I am lacking the required skills : if i can build a house, I can build 100 houses, but that doesn't mean I am able to build a 100-floors skyscraper :lol:
Attachments
test_draggers.FCStd
(8.63 KiB) Downloaded 5 times
User avatar
microelly2
Posts: 4361
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Freeform surface manipulation through interactive movement of nodes

Postby microelly2 » Tue Sep 24, 2019 2:27 pm

My idea is to have a sensor for the mouse and combine its values with a network in pyflow
phpBB [video]

here is an application (still not in pyflow) like the blender sculpter tool
https://www.youtube.com/watch?v=V2CSXZ7C7Vo