View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001873 | Sketcher | Bug | public | 2014-12-23 03:31 | 2015-12-15 13:18 |
Reporter | cleahcim | Assigned To | wmayer | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | not fixable | ||
Platform | Microsoft | OS | Windows | OS Version | 8 |
Product Version | 0.14 | ||||
Fixed in Version | 0.16 | ||||
Summary | 0001873: Error working with getSelectionEx()[0].SubObjects | ||||
Description | When you are in the edit mode of a sketch and select lines/edges then SubObjects will list the Edges you selected. However (while in edit mode), if you select an end-point of a line, select a standalone point, or select an entire arch then FreeCADGui.getSelectionEx()[0].SubObjects returns the following exception: CODE: SELECT ALL Traceback (most recent call last): File "<input>", line 1, in <module> Exception: Unknown exception while reading attribute 'SubObjects' of object 'SelectionObject' OS: Windows Word size: 64-bit Version: 0.14.3700 (Git) Branch: releases/FreeCAD-0-14 Hash: 32f5aae0a64333ec8d5d160dbc46e690510c8fe1 Python version: 2.7.6 Qt version: 4.8.5 Coin version: 4.0.0a SoQt version: 1.6.0a OCC version: 6.6.0 | ||||
Steps To Reproduce | * make new document * add new sketch * draw two lines * select/highlight the two lines (while in edit mode) * open console and run:>>> FreeCADGui.Selection.getSelectionEx()[0].SubObjects **This should return the two selected edges * Add a point and an arch * Select the point or arch and run in console :>>> FreeCADGui.Selection.getSelectionEx()[0].SubObjects ** You should see the error that I reported. * Repeat in various combinations. As long as any single point is selected or anything that isn't a line it will return the mentioned error. | ||||
Additional Information | * While working with the Sketch outside of editing mode the error does not present it self. This could be a work around for the script I am writing however, I wanted to work with construction lines and points that the user adds and selects. Mention in forum: http://forum.freecadweb.org/viewtopic.php?f=22&t=9037#p73720 | ||||
Tags | sketcher | ||||
FreeCAD Information | |||||
has duplicate | 0001882 | closed | Gui.getSelectionEx SubObjects return unknown exception when the focus of an arc is selected |
|
The problem is the numbering of edges after a vertex is added. When adding first a vertex and then an edge then the edge number becomes 2 instead of 1. |
|
This commit https://github.com/FreeCAD/FreeCAD_sf_master/commit/714908d3e9909fb2a149cd7fbdddd00a74190f6a introduced "CurvIdToGeoId" which is used to get the index to an edge. However, when filling up the array it doesn't handle the case when vertexes are part of the sketch. |
|
The commit fixes the problem only partially... |
|
There is still a minor problem with the numbering if the sketch has construction lines because they do not appear in the shape but appear in the list of edges in edit mode. |
|
Unfortunately, this issue cannot be solved. The number of sub-elements of an object in edit mode may differ from the number of sub-elements of the geometric model. This happens when a sketch has separate vertexes or construction lines. |
|
As said earlier a sketch in edit mode shows more elements than in normal mode and this makes it impossible to make the selection match. |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-12-23 03:31 | cleahcim | New Issue | |
2014-12-23 14:45 | cleahcim | Tag Attached: sketcher | |
2014-12-23 15:15 | wmayer | Status | new => confirmed |
2014-12-23 15:51 | wmayer | Note Added: 0005437 | |
2014-12-23 17:29 | wmayer | Note Added: 0005438 | |
2014-12-23 21:19 | wmayer | Changeset attached | => FreeCAD Master master 33bc596f |
2014-12-23 21:19 | wmayer | Assigned To | => wmayer |
2014-12-23 21:19 | wmayer | Status | confirmed => closed |
2014-12-23 21:19 | wmayer | Resolution | open => fixed |
2014-12-24 14:43 | wmayer | Note Added: 0005439 | |
2014-12-24 14:43 | wmayer | Status | closed => confirmed |
2014-12-24 14:43 | wmayer | Resolution | fixed => reopened |
2014-12-24 14:43 | wmayer | Additional Information Updated | |
2014-12-25 14:28 | wmayer | Note Added: 0005440 | |
2014-12-25 23:26 | wmayer | Note Added: 0005443 | |
2014-12-25 23:26 | wmayer | Severity | major => minor |
2014-12-29 15:54 | wmayer | Relationship added | has duplicate 0001882 |
2015-05-17 09:37 | wmayer | Note Added: 0006145 | |
2015-05-17 09:37 | wmayer | Status | confirmed => closed |
2015-05-17 09:37 | wmayer | Resolution | reopened => not fixable |
2015-12-15 13:18 | yorik | Fixed in Version | => 0.16 |