View Issue Details

IDProjectCategoryView StatusLast Update
0003374SketcherFeaturepublic2021-02-06 06:48
Reporterpaullee Assigned To 
PrioritynormalSeverityfeatureReproducibilityhave not tried
Status newResolutionopen 
PlatformAllOSAllOS VersionAll
Product Version0.17 
Target Version0.20 
Summary0003374: Sketch + Gui.SelectionEx() - - - Identify Geometry Index Outside Edit Mode
DescriptionDiscussion Thread in Forum ... (seem more than Sketcher, 'Selection' function?)
"Sketch - Identify Geometry Index (inside and outside Edit Mode)"

Problem is:-
Gui.SelectionEx()[0].SubElementNames would provide different Edges 'name' Inside and Outside Sketch Edit mode ...See screencaptures
  1. Say a rectangle inside sketch, Edges index report are, Anti-Clockwise, 1-2-3-4 [EDIT] ('1' being the edge at the 'bottom')
  2.     
  3. Edge 2 is construction
  4.     
  5. Exiting Edit mode, same code seem report the Wire edge number created, INSTEAD of the Geometry inside edit mode
  6.     
  7. So, only 3 edges form a wire Outside edit mode
  8.     
  9. Edges nos. BECOME (report here as it is in same direction) 1-(none)-3-2 [EDIT] 3-none-1-2 (same edge by edge)
  10.     
  11. Or ClockWire as 1-2-3 [EDIT] Top Edge is '1' now
  12.     
  13. Using the latter 'index' in sketch.geometry[index] would report wrong edge (following Geometry Index) information
So, Solution I haven't found:-
  • Outside Edit Mode, how can I without enter edit mode, a script to identify the selected edge's (the wire shape I guess) internal Edge geometry Index?

Feature Request
e.g.
 Gui.Selection.getSelectionEx()[0].SubElement_INTERNAL_Names  
to return the same name or index as in sketch.geometry[i]

Thanks!










Additional InformationOS: Linux
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13375 (Git) AppImage
Build type: None
Branch: master
Hash: 2bfea410fce1434fec0f853b032549aa2cd3c47e
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: English/HongKong (en_HK)
TagsNo tags attached.
FreeCAD Information

Activities

paullee

2018-03-14 19:00

developer  

Kunda1

2018-06-07 18:58

administrator   ~0011363

@realthunder has implemented this in his fork: https://forum.freecadweb.org/viewtopic.php?f=22&t=27215&start=10#p222807

yorik

2022-03-03 13:55

administrator   ~0016602

This ticket has been migrated to GitHub as issue 5767.

Issue History

Date Modified Username Field Change
2018-03-14 19:00 paullee New Issue
2018-03-14 19:00 paullee File Added: Test_ Sketch_ Identify Geometry Index.fcstd
2018-06-07 18:58 Kunda1 Note Added: 0011363
2018-10-06 14:55 abdullah Product Version 0.17 => 0.19
2018-10-06 15:20 abdullah Product Version 0.19 => 0.17
2018-10-06 15:20 abdullah Target Version => 0.19
2020-11-09 18:09 abdullah Target Version 0.19 => 0.20
2021-02-06 06:48 abdullah Target Version => 0.20