Curves workbench
Forum rules
and Helpful information
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!
Also, be nice to others! Read the FreeCAD code of conduct!
Curves workbench
Hi,
Kunda1 is kindly taking care of the addon manager, and asked addon developers to document their addons and present them here , on the forum.
So, here is a presentation of my "Curves" workbench :
https://github.com/tomate44/CurvesWB
Important foreword :
- I am a very bad coder, and this workbench is probably very badly coded.
- So please don't use it for any serious work
My main interest is about NURBS curves and surfaces ( and I've learned a lot about them since I've been here. Thanks guys ! ).
The first tool is about creating BSpline curves.
Keyboard commands are displayed in the upper-left corner.
Next is a tool that turns an edge into an editable BSpline Curve.
This is a crappy temporary tool, until I make a real freehand curve editor ...
Curve degree can be increased / decreased.
Poles can be moved with the properties of the "Poles" section.
Double-click the "Spline" object to show / hide the control points.
I use it to check the parametric behaviour of the other tools.
Third tool joins a set of connected edges into a BSpline Curve.
There is an option for breaking the curve on sharp corners.
It can be useful on imported SVG, to get a real single curve from a smooth SVG path.
Fourth tool discretizes an edge ( or the first wire it belongs to ).
This tool offers all the parameters of the Part.Edge.discretize() python API.
Fifth tool is the best friend of "Discretize". It approximates a set of points to a BSpline curve (or surface).
This tool offers all the parameters of the Part.BSplineCurve.approximate() python API.
When using this tool on several objects, each one will get approximated by a curve.
But if several objects ( with same number of points) are put in a Group, and the tool is used on the Group, it will create an approximating surface.
"Discretize" and "Approximate" could be useful for example in some cases where a sweep operation fails because of a bad sweep path.
To be continued ...
Kunda1 is kindly taking care of the addon manager, and asked addon developers to document their addons and present them here , on the forum.
So, here is a presentation of my "Curves" workbench :
https://github.com/tomate44/CurvesWB
Important foreword :
- I am a very bad coder, and this workbench is probably very badly coded.
- So please don't use it for any serious work
My main interest is about NURBS curves and surfaces ( and I've learned a lot about them since I've been here. Thanks guys ! ).
The first tool is about creating BSpline curves.
Keyboard commands are displayed in the upper-left corner.
Next is a tool that turns an edge into an editable BSpline Curve.
This is a crappy temporary tool, until I make a real freehand curve editor ...
Curve degree can be increased / decreased.
Poles can be moved with the properties of the "Poles" section.
Double-click the "Spline" object to show / hide the control points.
I use it to check the parametric behaviour of the other tools.
Third tool joins a set of connected edges into a BSpline Curve.
There is an option for breaking the curve on sharp corners.
It can be useful on imported SVG, to get a real single curve from a smooth SVG path.
Fourth tool discretizes an edge ( or the first wire it belongs to ).
This tool offers all the parameters of the Part.Edge.discretize() python API.
Fifth tool is the best friend of "Discretize". It approximates a set of points to a BSpline curve (or surface).
This tool offers all the parameters of the Part.BSplineCurve.approximate() python API.
When using this tool on several objects, each one will get approximated by a curve.
But if several objects ( with same number of points) are put in a Group, and the tool is used on the Group, it will create an approximating surface.
"Discretize" and "Approximate" could be useful for example in some cases where a sweep operation fails because of a bad sweep path.
To be continued ...
Last edited by Chris_G on Tue Aug 25, 2020 4:31 pm, edited 1 time in total.
Re: Curves workbench
Nice!
- microelly2
- Veteran
- Posts: 4688
- Joined: Tue Nov 12, 2013 4:06 pm
- Contact:
Re: Curves workbench
Good to know there is a GUI for these methods.
Re: Curves workbench
...sweeping with 2 rails:
If I use "birail-sweep" on two logarithmic spirals, the feature uses automatically a (ruled) connecting edge.
Trying to make a sweep out of a circle or an arc, does not deliver a surface.
I see no possibility, to connect the sketch/facebinderobj to the sweep-paths.
(Trying to build a snailshell, for example).
If I use "birail-sweep" on two logarithmic spirals, the feature uses automatically a (ruled) connecting edge.
Trying to make a sweep out of a circle or an arc, does not deliver a surface.
I see no possibility, to connect the sketch/facebinderobj to the sweep-paths.
(Trying to build a snailshell, for example).
Re: Curves workbench
Hi,
The Sweep On 2 Rails requires 3 steps.
Please update the Workbench, since I added a tool yesterday.
Step 1 -> create a Birail object out of 2 edges
Step 2 -> select the Birail and the profiles and create the Sweep on 2 rails
Step 3 -> Approximate the point cloud with a surface
I don't think it will work on closed profiles.
It also requires at least one profile at each end.
This is highly experimental Work In Progress.
Re: Curves workbench
Hello Chris,
...I tried it again with ships construction - Sailboat-halfhull.
It's my longterm goal in FreeCAD.
Using my plane-grid and fife sketches I did my first try with your curves wb.
Only problem is, I can't get the hull's shape and a mirroring.
...I tried it again with ships construction - Sailboat-halfhull.
It's my longterm goal in FreeCAD.
Using my plane-grid and fife sketches I did my first try with your curves wb.
Only problem is, I can't get the hull's shape and a mirroring.
- Attachments
-
- SecRumpf.FCStd
- (62.36 KiB) Downloaded 533 times
Re: Curves workbench
Hi,
You can approximate the Sweep2Rails object with a surface ( 5th tool of my WB ), and you'll be able to mirror this surface :
You can approximate the Sweep2Rails object with a surface ( 5th tool of my WB ), and you'll be able to mirror this surface :
Re: Curves workbench
...Wow, thanks - everything you want to see is on board.
Especially the wireframe .
Will there be a view-control on Wireframe/Points in the future?
I got curious by
https://forum.freecadweb.org/viewtopic. ... 28#p180586
https://github.com/tomate44/CurvesWB
Especially the wireframe .
Will there be a view-control on Wireframe/Points in the future?
I got curious by
https://forum.freecadweb.org/viewtopic. ... 28#p180586
https://github.com/tomate44/CurvesWB
Re: Curves workbench
Hi Chris,
very nice WB!
Do you have a main icon for the WB?
In FC 0.17 windows I cannot see the WB icon in the WB selector...
thanks
Maurice
very nice WB!
Do you have a main icon for the WB?
In FC 0.17 windows I cannot see the WB icon in the WB selector...
thanks
Maurice
Re: Curves workbench
Look at the "DisplayMode" property of the Sweep2Rails object ( as seen in your last screenshot ).hammax wrote: ↑Mon Jul 03, 2017 10:06 am ...Wow, thanks - everything you want to see is on board.
Especially the wireframe .
Will there be a view-control on Wireframe/Points in the future?
I got curious by
https://forum.freecadweb.org/viewtopic. ... 28#p180586
https://github.com/tomate44/CurvesWB
Just to be clear : the output of the Sweep2Rails tool is 2D array of points, with different ways to view it ( the DisplayMode property ). But it is not at all a surface yet. This is why it should then be approximated with a surface, because you'll probably want a real face in the end.
I kept the Sweep2Rails / ApproximateSurface as separate steps, because the approximation tool has a whole set of settings already, and the processing can be long ( or even endless ) on bad point arrays ( that have self-intersection for example ).
This way, I can check that the point cloud is good, keep the "fast to recompute" Sweep2Rails object visible during work, and go for the approximate object later.
Hi,
You're right, no icon, indeed.
I'll look for one. Thanks.