Curves workbench

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
Chris_G
Posts: 991
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: Curves workbench

Postby Chris_G » Fri Jan 04, 2019 5:23 pm

Yes ... of course.
The tool cannot guess what the user is expecting.
It is up to the user to select the points in the right order.
The default selection mechanism of FC doesn't respect the selection order.
So I made a custom one for CruvesWB.
If you select your points in the right order, while CurvesWB is the active WB, the interpolate / approximate tools should respect your input order.
User avatar
GlouGlou
Posts: 1250
Joined: Sun Apr 05, 2015 9:02 am
Location: La Rochelle, France

Re: Curves workbench

Postby GlouGlou » Fri Jan 04, 2019 6:07 pm

ok, with interpolate_curve (blue), but approximate_curve (red) have not the same behavior. :|
Attachments
Capture.PNG
Capture.PNG (5.81 KiB) Viewed 644 times
User avatar
Chris_G
Posts: 991
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: Curves workbench

Postby Chris_G » Fri Jan 04, 2019 6:21 pm

Oups, that's right !
I just pushed a fix.
User avatar
GlouGlou
Posts: 1250
Joined: Sun Apr 05, 2015 9:02 am
Location: La Rochelle, France

Re: Curves workbench

Postby GlouGlou » Fri Jan 04, 2019 6:41 pm

thks a lot. ;)
User avatar
Chris_G
Posts: 991
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: Curves workbench

Postby Chris_G » Fri Jan 18, 2019 6:49 pm

Hi,
I have added a new tool to the Workbench.
It is an interpolation curve with free-hand editing, and snapping ability.
It is at the beginning of the toolbar.

Disclaimer : it needs the latest pivy (0.6.5). Pivy 0.6.4 from PPA has a bug.
The tool works good with FreeCAD Conda Py3 Qt5 Appimage.
Disclaimer : it may crash FreeCAD pretty easily ... Use at your own risk :lol:

Activating the tool with nothing selected in the 3D view creates a default curve in XY plane, and enters edit mode directly.
You can also select some shapes in the 3D View, before activating the tool.
This will create an interpolation curve with points snapped on the shape.

Double-click the curve object to enter/leave edit mode.
To insert a new point, a line must be selected.
Pressing 's' with some points selected AND an external shape, will snap them to the shape (the points need to be grabbed a little for the snap to be effective)
Pressing 's' with some points selected (but NO external shape) will free the points from any snap constraint.
If some points are snapped to faces, the curve will be tangent to faces at these points.
Some manual recomputes are usually needed after editing.
It is pretty useful to build up a Gordon surface.

The control keys are displayed in the Report View :

Code: Select all

    a - Select all / Deselect
    i - Insert point
    g - Grab objects
    s - Snap points on shape / Unsnap
    x,y,z - Axis constraints during grab
    q - Apply changes and quit editing
profile.jpg
profile.jpg (14.91 KiB) Viewed 558 times
User avatar
hammax
Posts: 774
Joined: Thu Jan 19, 2017 5:03 pm
Location: Ammersee

Re: Curves workbench

Postby hammax » Sat Jan 19, 2019 6:32 am

Win10_32
FC.18.15656
… sorry, I have the newest updates (FC and CurvesWB), but I can't find the new tools.
SplineHullFrames_2.PNG
SplineHullFrames_2.PNG (66.76 KiB) Viewed 520 times
User avatar
Chris_G
Posts: 991
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: Curves workbench

Postby Chris_G » Sat Jan 19, 2019 7:03 am

Hi,
The tool icon will only show if you have a compatible Pivy library.
Your current FreeCAD probably uses the incompatible Pivy 0.6.4
It works good with FreeCAD Conda Py3 Qt5 Appimage.
More precisely, the tool only work if this line in the python console succeeds :

Code: Select all

from pivy import graphics
User avatar
GlouGlou
Posts: 1250
Joined: Sun Apr 05, 2015 9:02 am
Location: La Rochelle, France

Re: Curves workbench

Postby GlouGlou » Thu Jan 24, 2019 8:27 pm

Bug with blend_curve. sometimes blend curve make vanished objects:
make a cube, select 2 vertexes, then cube vanished in the tree and there is no blend curve.
triplus
Posts: 8341
Joined: Mon Dec 12, 2011 4:45 pm

Re: Curves workbench

Postby triplus » Fri Jan 25, 2019 8:41 pm

Chris_G wrote:
Fri Jan 18, 2019 6:49 pm
Hi,
I have added a new tool to the Workbench.
It is an interpolation curve with free-hand editing, and snapping ability.
It is at the beginning of the toolbar.
Interactive.png
Interactive.png (3.79 KiB) Viewed 365 times
Nice! Some observations:

It would be great if someday Grab would work directly (point and click with mouse). Shortcuts should likely have corresponding commands, as switching in between workbenches can lead to introducing shortcuts ambiguity easily, and things can stop working. Note that in the future pressing on Q will likely pop-up PieMenu. FreeCAD Daily and local Py2/Qt4 build both crash on my side, when activating the workbench (local Py3/Qt5 build doesn't crash).
User avatar
Chris_G
Posts: 991
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: Curves workbench

Postby Chris_G » Fri Jan 25, 2019 9:05 pm

triplus wrote:
Fri Jan 25, 2019 8:41 pm
It would be great if someday Grab would work directly (point and click with mouse).
I agree. That would be my preferred workflow.
triplus wrote:
Fri Jan 25, 2019 8:41 pm
FreeCAD Daily and local Py2/Qt4 build both crash on my side, when activating the workbench (local Py3/Qt5 build doesn't crash).
Sorry for that. I am currently in a delicate situation where I can't compile FC anymore. So I use a PY3/Qt5 Appimage, but I cannot test other builds. Would you have a console log of the crash please ?