Sketcher: Bezier curves

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
abdullah
Posts: 3858
Joined: Sun May 04, 2014 3:16 pm

Re: Sketcher: Bezier curves

Postby abdullah » Mon Apr 10, 2017 8:13 pm

wmayer wrote:All good now. Thanks for your quick fixes and awesome contributions!
You are welcome. It is a privilege to work with you.
wmayer
Site Admin
Posts: 16849
Joined: Thu Feb 19, 2009 10:32 am

Re: Sketcher: Bezier curves

Postby wmayer » Tue Apr 11, 2017 12:40 pm

A new coverity scan found this issue in int Sketch::addConstraint(const Constraint *constraint):

Code: Select all

case BSplineControlPoint:
    rtn = addInternalAlignmentBSplineControlPoint(constraint->First,constraint->Second, constraint->InternalAlignmentIndex);
case BSplineKnotPoint:
    rtn = addInternalAlignmentKnotPoint(constraint->First,constraint->Second, constraint->InternalAlignmentIndex);
default:
    break;
Is it intended to omit the break after BSplineControlPoint and BSplineKnotPoint?
abdullah
Posts: 3858
Joined: Sun May 04, 2014 3:16 pm

Re: Sketcher: Bezier curves

Postby abdullah » Tue Apr 11, 2017 4:19 pm

wmayer wrote:Is it intended to omit the break after BSplineControlPoint and BSplineKnotPoint?
Not at all. I wonder how things actually work sometimes...

https://github.com/FreeCAD/FreeCAD/pull/688
User avatar
microelly2
Posts: 4690
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Sketcher: Bezier curves

Postby microelly2 » Thu Apr 13, 2017 6:25 am

There is one big feature to improve usability I want to request:
Hide/unhide the blue constraints
I use the blue constraints as driver for more complex sketches
and for a "free" curve design the sketcher can be used but the data should be hidden.

https://www.youtube.com/watch?v=J4kD1LLP3uU

Thanks in advance
abdullah
Posts: 3858
Joined: Sun May 04, 2014 3:16 pm

Re: Sketcher: Bezier curves

Postby abdullah » Thu Apr 13, 2017 12:11 pm

microelly2 wrote:There is one big feature to improve usability I want to request:
Hide/unhide the blue constraints
I use the blue constraints as driver for more complex sketches
and for a "free" curve design the sketcher can be used but the data should be hidden.

https://www.youtube.com/watch?v=J4kD1LLP3uU

Thanks in advance
So you use driven constraints as reference constraints for bspline parameter computation. Nice!!

In my list of sketch usability improvements there is inter alia:
1. hiding construction geometry from the inventor view
2. allowing to filter in the Elements Widget by construction yes, construction no, only construction (not clear yet how I want to put this in the UI)
3. hiding internal alignment constraints from the Constraint's Widget

so I add to it:
4. hiding driven constraints in the inventor view.

Feel free to speak up if you see any other usability improvement ;)
abdullah
Posts: 3858
Joined: Sun May 04, 2014 3:16 pm

Re: Sketcher: Bezier curves

Postby abdullah » Tue Apr 18, 2017 12:26 am

microelly2 wrote:There is one big feature to improve usability I want to request:
Hide/unhide the blue constraints
I use the blue constraints as driver for more complex sketches
and for a "free" curve design the sketcher can be used but the data should be hidden.

https://www.youtube.com/watch?v=J4kD1LLP3uU

Thanks in advance
https://forum.freecadweb.org/viewtopic. ... 04#p170204

Pull Request:
https://github.com/FreeCAD/FreeCAD/pull/696
User avatar
NormandC
Posts: 18534
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Sketcher: Bezier curves

Postby NormandC » Wed Apr 19, 2017 2:36 am

abdullah, you are on fire! :D
abdullah
Posts: 3858
Joined: Sun May 04, 2014 3:16 pm

Re: Sketcher: Bezier curves

Postby abdullah » Thu Apr 20, 2017 9:17 pm

It is good to have time to code. It feels good!
User avatar
Kunda1
Posts: 9209
Joined: Thu Jan 05, 2017 9:03 pm

Re: Sketcher: Bezier curves

Postby Kunda1 » Wed Apr 26, 2017 1:32 pm

Soft segway: Just a little historical context: The history of Bézier curves
Alone you go faster. Together we go farther
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
microelly2
Posts: 4690
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Sketcher: Bezier curves

Postby microelly2 » Wed Apr 26, 2017 3:15 pm

Kunda1 wrote:Soft segway: Just a little historical context: The history of Bézier curves
nice paper with a lot of interesting things.