Sketcher: Bezier curves

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

Re: Sketcher: Bezier curves

Postby abdullah » Wed Mar 01, 2017 9:14 pm

triplus wrote:The effort is ongoing here:

https://forum.freecadweb.org/viewtopic.php?f=4&t=17501


Thanks!

I am stopping the development of BSplines until our packaging experts load a working OCCT 7 version to Launchpad. From the thread, I think they are almost there. In the meantime, well, I will use FreeCAD a little bit :)
triplus
Posts: 4857
Joined: Mon Dec 12, 2011 4:45 pm

Re: Sketcher: Bezier curves

Postby triplus » Wed Mar 01, 2017 11:59 pm

Well-earned break! :)
abdullah
Posts: 1502
Joined: Sun May 04, 2014 3:16 pm

Re: Sketcher: Bezier curves

Postby abdullah » Mon Mar 06, 2017 9:42 pm

And resuming...

bspline_pole_increase_knot_multiplicity.png
bspline_pole_increase_knot_multiplicity.png (25.36 KiB) Viewed 232 times


OS: Ubuntu 16.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10235 +20 (Git)
Build type: Debug
Branch: bspline_stage1b_2017_thirddeliverable
Hash: fb907b9cb0d6a884519949045f9f423fc302f6b4
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0

It is nice not to get a crash...

I have to find my lost context on what I have to do, but I think this third_deliverable will not have much more functionality.

My current list:
1. Fix curvature comb as indicated by Werner
2. Implement decrease knot multiplicity
3. Review return types in functions (I have some boolean returning functions that should probably better off by returning nothing and raising an exception if something happens)
4. Ask for icons and integrate icons.
5. Fix annoying bug that crashes FC when undo is effected after a multiplicity change.
6. Do something so that FC compiled against OCC<6.9.0 does not crash.

If you think I am missing something relevant speak your mind :)
triplus
Posts: 4857
Joined: Mon Dec 12, 2011 4:45 pm

Re: Sketcher: Bezier curves

Postby triplus » Mon Mar 06, 2017 9:46 pm

abdullah wrote:If you think I am missing something relevant speak your mind :)


Nice resume. If only all Linux boxes would resume in such style. But it is getting better compared to few years back. ;)
abdullah
Posts: 1502
Joined: Sun May 04, 2014 3:16 pm

Re: Sketcher: Bezier curves

Postby abdullah » Mon Mar 06, 2017 10:11 pm

I have just sorted out the code into commits and updated the branch:
https://github.com/abdullahtahiriyo/Fre ... eliverable

I do not expect testing or feedback at this time (of course if you want to update to Xenial, install Norm's libocc and compile and test and if you find any issue report it here, I am fine with that :D ). Just sorting out things.
triplus
Posts: 4857
Joined: Mon Dec 12, 2011 4:45 pm

Re: Sketcher: Bezier curves

Postby triplus » Mon Mar 06, 2017 10:36 pm

abdullah wrote:I do not expect testing or feedback at this time (of course if you want to update to Xenial


Checked.

, install Norm's libocc


Nah. That ship has sailed. But looking at the horizon it's doing just OK. And that is good enough for me. ;)

and compile and test and if you find any issue report it here, I am fine with that :D ). Just sorting out things.


It has a place on my todo list (under work in progress). ;)
wmayer
Site Admin
Posts: 11234
Joined: Thu Feb 19, 2009 10:32 am

Re: Sketcher: Bezier curves

Postby wmayer » Tue Mar 07, 2017 8:35 am

Very often the travis or AppVeyor builds fail because of this error:
======================================================================
ERROR: testSlotCase (TestSketcherApp.SketcherSolverTestCases)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\projects\freecad\build\Mod\Sketcher\TestSketcherApp.py", line 113, in testSlotCase
CreateSlotPlateSet(self.Slot)
File "C:\projects\freecad\build\Mod\Sketcher\TestSketcherApp.py", line 61, in CreateSlotPlateSet
SketchFeature.setDatum(9,200.000000)
ValueError: Cannot set the datum because the sketch contains conflicting constraints
----------------------------------------------------------------------


If wonder why this happens and how it can be fixed.
abdullah
Posts: 1502
Joined: Sun May 04, 2014 3:16 pm

Re: Sketcher: Bezier curves

Postby abdullah » Tue Mar 07, 2017 1:26 pm

wmayer wrote:Very often the travis or AppVeyor builds fail because of this error:
======================================================================
ERROR: testSlotCase (TestSketcherApp.SketcherSolverTestCases)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\projects\freecad\build\Mod\Sketcher\TestSketcherApp.py", line 113, in testSlotCase
CreateSlotPlateSet(self.Slot)
File "C:\projects\freecad\build\Mod\Sketcher\TestSketcherApp.py", line 61, in CreateSlotPlateSet
SketchFeature.setDatum(9,200.000000)
ValueError: Cannot set the datum because the sketch contains conflicting constraints
----------------------------------------------------------------------


If wonder why this happens and how it can be fixed.


Aside from the obvious: delete the unit test, I will give it a try...

My current list:
1. Fix curvature comb as indicated by Werner
2. Implement decrease knot multiplicity
3. Review return types in functions (I have some boolean returning functions that should probably better off by returning nothing and raising an exception if something happens)
4. Ask for icons and integrate icons.
5. Fix annoying bug that crashes FC when undo is effected after a multiplicity change.
6. Do something so that FC compiled against OCC<6.9.0 does not crash.
7. Check Werner's solver test case issue.
User avatar
saso
Posts: 610
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: Sketcher: Bezier curves

Postby saso » Tue Mar 07, 2017 1:37 pm

abdullah wrote:My current list:
1. Fix curvature comb as indicated by Werner
2. Implement decrease knot multiplicity
3. Review return types in functions (I have some boolean returning functions that should probably better off by returning nothing and raising an exception if something happens)
4. Ask for icons and integrate icons.
5. Fix annoying bug that crashes FC when undo is effected after a multiplicity change.
6. Do something so that FC compiled against OCC<6.9.0 does not crash.
7. Check Werner's solver test case issue.

Since 8 is a nice number :roll: how about adding support for bezier curves to draft -> draft to sketch tool?
abdullah
Posts: 1502
Joined: Sun May 04, 2014 3:16 pm

Re: Sketcher: Bezier curves

Postby abdullah » Tue Mar 07, 2017 6:09 pm

saso wrote:Since 8 is a nice number :roll: how about adding support for bezier curves to draft -> draft to sketch tool?


Draft is Python. I do not have the competence to do any decent Python. Sorry! :oops: