Draft Bezier Copy/Paste

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Post Reply
User avatar
wandererfan
Veteran
Posts: 5992
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Draft Bezier Copy/Paste

Post by wandererfan »

Can anybody confirm this behaviour?

. create BezCurve
. select BezCurve
. Edit->Copy ==> "Gui::Command::activated(0): Unknown C++ exception thrown"
. Edit->Paste ==> no result

Edit->Duplicate Selection appears to work correctly.

wf

OS: Ubuntu 12.04.4 LTS
Platform: 64-bit
Version: 0.14.3055 (Git)
Branch: BezierProto
Hash: 95d4e1852ee05d2fb065eb3e242c73febbf0ccdb
Python version: 2.7.3
Qt version: 4.8.1
Coin version: 3.1.3
SoQt version: 1.5.0
OCC version: 6.6.0
User avatar
quick61
Veteran
Posts: 3804
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: Draft Bezier Copy/Paste

Post by quick61 »

wandererfan wrote:Can anybody confirm this behaviour?

. create BezCurve
. select BezCurve
. Edit->Copy ==> "Gui::Command::activated(0): Unknown C++ exception thrown"
. Edit->Paste ==> no result

Edit->Duplicate Selection appears to work correctly.

wf

OS: Ubuntu 12.04.4 LTS
Platform: 64-bit
Version: 0.14.3055 (Git)
Branch: BezierProto
Hash: 95d4e1852ee05d2fb065eb3e242c73febbf0ccdb
Python version: 2.7.3
Qt version: 4.8.1
Coin version: 3.1.3
SoQt version: 1.5.0
OCC version: 6.6.0

Sure can wf, my build does the exact same thing.

Confirmed - ui::Command::activated(0): Unknown C++ exception thrown

OS: Ubuntu 13.10
Platform: 64-bit
Version: 0.14.3053 (Git)
Branch: BezierProto
Hash: 34bc68bd3d4b57e48838b2f8652062eb10d6b5d3
Python version: 2.7.5+
Qt version: 4.8.4
Coin version: 4.0.0a
SoQt version: 1.5.0
OCC version: 6.7.0


And the same behavior is in the piecewise-bezier build as well.

OS: Ubuntu 13.10
Platform: 64-bit
Version: 0.14.3054 (Git)
Branch: piecewise-bezier
Hash: 4fd4741a31a660845d982f675aa2ac86126bb6d2
Python version: 2.7.5+
Qt version: 4.8.4
Coin version: 4.0.0a
SoQt version: 1.5.0
OCC version: 6.7.0
This post made with 0.0% Micro$oft products - GOT LINUX?
jmaustpc
Veteran
Posts: 11211
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Draft Bezier Copy/Paste

Post by jmaustpc »

Hi
I've got the same error happening here on
OS: Ubuntu 12.04.4 LTS
Platform: 64-bit
Version: 0.14.3051 (Git)
Branch: piecewise-bezier
Hash: db63d5f067d3c1ab3807db605a32c497ee745f01
Python version: 2.7.3
Qt version: 4.8.2
Coin version: 3.1.3
SoQt version: 1.5.0
OCC version: 6.5.0

I just pulled shoogen's latest updates

and the problem is still there
OS: Ubuntu 12.04.4 LTS
Platform: 64-bit
Version: 0.14.3055 (Git)
Branch: piecewise-bezier
Hash: 95d4e1852ee05d2fb065eb3e242c73febbf0ccdb
Python version: 2.7.3
Qt version: 4.8.2
Coin version: 3.1.3
SoQt version: 1.5.0
OCC version: 6.5.0


Is this problem related to the undo/redo system that I think shoogen or someone else was still working on?
User avatar
shoogen
Veteran
Posts: 2823
Joined: Thu Dec 01, 2011 5:24 pm

Re: Draft Bezier Copy/Paste

Post by shoogen »

For a debug build it returns "Unhandled unknown exception caught in GUIApplication::notify"
OS: Debian GNU/Linux 7.3 (wheezy)
Platform: 64-bit
Version: 0.14.3078 (Git)
Branch: (remotes/github/master-12-ga3cbd92)
Hash: a3cbd92b0e3778c407ca866e44325d6f9bfc0a11
Python version: 2.7.3
Qt version: 4.8.2
Coin version: 3.1.3
SoQt version: 1.5.0
OCC version: 6.5.2
User avatar
shoogen
Veteran
Posts: 2823
Joined: Thu Dec 01, 2011 5:24 pm

Re: Draft Bezier Copy/Paste

Post by shoogen »

Code: Select all

>>> App.ActiveDocument.BezCurve.Shape.MemSize
Traceback (most recent call last):
  File "<input>", line 1, in <module>
Exception: Unknown exception while reading attribute 'MemSize' of object 'Persistence'
reproduces the problem

EDIT: http://www.freecadweb.org/tracker/view.php?id=1369
User avatar
wandererfan
Veteran
Posts: 5992
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Draft Bezier Copy/Paste

Post by wandererfan »

Thanks shoogen/wmayer. BezCurve copy works with this change.

Pretty sure the patch for BezierSurface needs attention. NbUPoles*NbVpoles, not NbUpoles+NbUPoles.

Code: Select all

-                        memsize += (surface.NbUKnots()+surface.NbVKnots()) * sizeof(Standard_Real);
+                        memsize += (surface.NbUPoles()+surface.NbUPoles()) * sizeof(Standard_Real);
                         memsize += (surface.NbUPoles()*surface.NbVPoles()) * sizeof(Geom_CartesianPoint);
wf
User avatar
shoogen
Veteran
Posts: 2823
Joined: Thu Dec 01, 2011 5:24 pm

Re: Draft Bezier Copy/Paste

Post by shoogen »

applying a patch which differs from werners fix creates merge conflicts. I would make more sense to cherry pick werners commit. Another idea would be to abandon the current branch an rebase on top of the current master.
wmayer
Founder
Posts: 20074
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Draft Bezier Copy/Paste

Post by wmayer »

Oops, git show 06e7723
User avatar
wandererfan
Veteran
Posts: 5992
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Draft Bezier Copy/Paste

Post by wandererfan »

shoogen wrote:applying a patch which differs from werners fix creates merge conflicts. I would make more sense to cherry pick werners commit. Another idea would be to abandon the current branch an rebase on top of the current master.
Should be sorted out now.
https://github.com/WandererFan/freecad- ... ezierProto
Post Reply