View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000433||FreeCAD||Bug||public||2011-09-07 01:47||2011-10-25 13:15|
|Target Version||0.12||Fixed in Version||0.12|
|Summary||0000433: Use of Pad/Pocket on some sketch profiles disables selection/preselection highlighting|
|Description||This bug was introduced in the latest commits.|
Steps to reproduce:
1 - Create a new sketch, create a closed profile consisting of one of the following:
a) a single rectangle
b) an arc joined with one or more lines
c) a polygon with more than 3 sides
2 - Pad it or pocket it over an existing Pad
3 - Preselection and selection highligthing cease to function.
Note that selection is still active, just highlighting is not showing.
|Additional Information||FreeCAD v0.12-bzr4535 (svn4889) on Ubuntu 10.04 LTS 64-Bit|
|Tags||No tags attached.|
Ok, should have tried that before posting the bug: save the document, close it and reopen it, and preselection/selection hightlighting works again. No need to restart FreeCAD.
||I can't reproduce this behaviour with svn4889. In fact yesterday I discovered the bug that if an object is in editing mode the highlighting of (pre-)/selection didn't work. But commit 4889 should have fixed this now.|
||I still have the bug in the latest bzr4551 (svn4905). I'll try to test on another machine on Ubuntu 11.04.|
Under Ubuntu I can confirm this problem. For me the selection&highlighting even doesn't work at all for the sketch object and derived shapes.
Selection of the sketch only works in editing mode and it also fails if you click on ALT+TAB to activate another application and come back again with ALT+TAB. After pressing the ALT key it again works in editing mode but still not in viewing mode.
So far this only seems to happen after a sketch was in editing mode. Then the highlighting&selection doesn't work for any object.
When duplicating the 3d view under View > Create View the new window works. But also when editing and leaving a sketch it doesn't work anymore.
||OK the problem seems to be that the highlighting gets overridden by the normal representation. If you e.g. make a pad from a sketch and set the transparency e.g. to 80% then you can see the highlighting again. So, it seems that something happens to the viewer or its root node.|
||I confirm the bug on Ubuntu 11.04 64-Bit. I don't have a 32-Bit Ubuntu system to test.|
discovered more info ( http://forum.freecadweb.org/viewtopic.php?f=3&t=1201&p=10124#p10124 ) seems indeed that the problem is not inside the viewprovider, but when you do things directly with coin nodes (like in the sketcher and draft modules).
Couple of situations:
- open a new document, draw a Part Box. Selection/preselection works
- draw a Draft Rectangle. Selection/preselection doesn't work anymore, on neither of the 2 objects
- open a new document, draw a Draft Rectangle. Selection/preselection doesn't work
- draw a Part Box, selection still doesn't work on neither of the 2 objects
- open a new document, draw an Arch Structure (which uses the part pythonfeature viewprovider), select/preselect works
- add an Arch Wall (which contains a Draft Line), select/preselect still works
- save one of those "bad" documents, reopen, selection works fine again
so it looks like the problem is when the draft module uses pivy. A further confirmation, if I make a Draft Rectangle by script, with no pivy involved (import Draft, Draft.makeRectangle(2,2) ) then selection still works.
- draw a Part Box
>>> from pivy import coin
>>> sg = Gui.ActiveDocument.ActiveView.getSceneGraph()
doesn't disable preselection. Adding a draft "tracker" object (temporary lines) neither. The problem is probably withing the event callback mechanism...
|Mhh, strange, but a show stopper for the 0.12 release...|
I found the culprit, at least in the Draft module:
changing the transparency value of a So Material disables selection/preselection highlight. The following code produces the problem:
>>> from pivy import coin
Indeed setting the transparency must be the problem. This example is even shorter:
Create a part object
Here is a workaround:
GLRender is implemented this way:
1. render selection
2. render highlighted
3. render full geometry
4. render highlighted
5. render selection
This fixes the bug as posted by the OP. But this still doesn't fix the transparency issue. So, transparency must be something different.
To fix the transparency issue in ViewProviderExt we must use SoSeparator instead of SoGroup.
This workaround was committed in r4934.
It seems that we have two issues here: the transparency stuff and the other thing (caused by drawing a rectangle) which shows similar symptoms.
The transparency apparently is a general issue and you can observe the same behaviour with a mesh. If you make e.g. a cube in the Mesh workbench, go to "Flat Lines", set and unset the transparency you can't see the edges anymore. I think there is some caching problem or so. I observed this for the new SoBrep* classes too and using a separator instead of a group fixed it. So, for this problem we at least know that this is not a problem with these SoBrep* classes.
Then the other point I still don't know by what exactly this is caused. I don't think that we therefore change a transparency somewhere so it must be something different.
in some cases after working in PartDesign the mouse interaction don't work.
So I think maybe this whole issue is a kind of filter problem of the SoFCUnifiedSelection node to filter messages out its not supposed to....
Just a thought.
Selection and Preselection highlighting still strange and often not working...
The transparency issue seems to be solved now. I reenabled the transparency of the Draft point marker, just draw some Draft stuff to see. Preselection still works after that.
I haven't seen anymore problems with preselection hilight. Can someone else confirm?
|Yep, the problems on Windows are gone to. So I think we can close now|
|double draw on M$ and Linux solve the problems. thanks to Werner|
||Not very nice but works.|
|2011-09-07 01:47||normandc||New Issue|
|2011-09-07 01:51||normandc||Note Added: 0001047|
|2011-09-07 01:52||normandc||Note Edited: 0001047|
|2011-09-07 05:45||wmayer||Note Added: 0001048|
|2011-09-10 23:29||normandc||Note Added: 0001055|
|2011-09-11 06:39||wmayer||Note Added: 0001057|
|2011-09-11 10:55||wmayer||Note Added: 0001059|
|2011-09-11 11:16||wmayer||Note Added: 0001060|
|2011-09-11 14:33||normandc||Note Added: 0001061|
|2011-09-14 12:19||yorik||Note Added: 0001066|
|2011-09-14 12:36||yorik||Note Added: 0001067|
||Note Added: 0001069|
||Status||new => assigned|
||Assigned To||=> wmayer|
||Priority||normal => high|
|2011-09-15 17:12||yorik||Note Added: 0001070|
||Product Version||trunk =>|
||Target Version||=> 0.12|
|2011-09-17 07:45||wmayer||Note Added: 0001110|
|2011-09-17 07:50||wmayer||Severity||minor => major|
|2011-09-17 08:07||wmayer||Note Added: 0001111|
|2011-09-18 06:03||wmayer||Note Added: 0001124|
||Note Added: 0001129|
|2011-10-15 14:11||yorik||Note Added: 0001162|
||Note Added: 0001189|
||Note Added: 0001190|
||Status||assigned => resolved|
||Fixed in Version||=> 0.12|
||Resolution||open => fixed|
|2011-10-25 13:15||wmayer||Note Added: 0001192|
|2011-10-25 13:15||wmayer||Status||resolved => closed|