Curves workbench

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

Re: Curves workbench

Post by Chris_G »

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
Vincent B
Veteran
Posts: 4713
Joined: Sun Apr 05, 2015 9:02 am
Location: La Rochelle, France

Re: Curves workbench

Post by Vincent B »

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

Re: Curves workbench

Post by Chris_G »

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

Re: Curves workbench

Post by Vincent B »

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

Re: Curves workbench

Post by Chris_G »

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 2617 times
User avatar
hammax
Veteran
Posts: 1985
Joined: Thu Jan 19, 2017 5:03 pm
Location: Ammersee DE

Re: Curves workbench

Post by hammax »

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 2579 times
User avatar
Chris_G
Veteran
Posts: 2578
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: Curves workbench

Post by Chris_G »

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
Vincent B
Veteran
Posts: 4713
Joined: Sun Apr 05, 2015 9:02 am
Location: La Rochelle, France

Re: Curves workbench

Post by Vincent B »

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
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Curves workbench

Post by triplus »

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

Re: Curves workbench

Post by Chris_G »

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 ?
Post Reply