View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000112||FreeCAD||Feature||public||2010-06-27 14:16||2011-08-01 14:53|
|Priority||low||Severity||minor||Reproducibility||have not tried|
|Target Version||0.12||Fixed in Version||0.12|
|Summary||0000112: Make python workbenches able to handle edit mode|
|Description||I think it would be cool if workbenches could handle edit mode...|
Specially with parametric objects, Edit mode could allow you to edit parameters graphically.
For example, in the case of a parametric rectangle, in edit mode you would see a draggable dot at the placement point, and draggable length and width parameters.
I suppose what would be best is a function in the Workbench class that is called when entering edit mode, like Activated()? If that function doesn't exist, then fall back to default edit mode.
Then all the rest (adding temporary extra nodes to the object coin node, etc...) would be the responsablility of the workbench itself...
What do you think?
Maybe there is also another approach, more powerful, but much harder to do... It would be, instead of making workbenches handle editmode, make edit mode handle parameters?
But that's hard, because imagine the case of the rectangle: it has a placement point, a length and a width. But the edit mode has no way to know where the length and width parameters are used... How/where to draw them on screen? Then each and every parameter should contain additional info, so the edit mode knows where to draw them. Pretty complicated I think.
So probably first idea is handier to do... What is your opinion?
|Tags||No tags attached.|
|Actually the methode is called at the ViewProvider. Called setEdit() and resetEdit(). I think thats easy to do....|
Perfect! I've been playing a bit with the SoDragger nodes, it's super cool to create very professional-looking draggers, that can also display all kind of custom information. I think it will be pretty easy to build a good editmode for the draft module, specially now that it's all parametric.
On this page http://www-evasion.imag.fr/~Francois.Faure/doc/inventorMentor/sgi_html/ch15.html there is even an interesting section treating about swapping nodes with manipulators. That could be used to create a kind of "generic" edit mode for Part shapes, where you could simply "drag" the vertices...
Just an idea for later.
Done in r4717
The python binding has been extended by a couple of methods:
* for a given view provider you can call the methods:
+ startEditing(int mode=0) -> True/False
+ finishEditing() -> None
+ isEditing() -> True/False
And for you custom view provider classes you can implement the methods:
+ def setEdit(vp, mode)
+ def unsetEdit(vp, mode)
|2010-06-27 14:16||yorik||New Issue|
||Note Added: 0000253|
||Status||new => assigned|
||Assigned To||=> Jriegel|
||Target Version||=> 0.11|
|2010-07-14 16:14||yorik||Note Added: 0000267|
||Target Version||0.11 => 0.12|
||Relationship added||child of 0000276|
|2011-08-01 14:53||wmayer||Note Added: 0000969|
|2011-08-01 14:53||wmayer||Status||assigned => closed|
|2011-08-01 14:53||wmayer||Resolution||open => fixed|
|2011-08-01 14:53||wmayer||Fixed in Version||=> 0.12|