I wish create a special file related to a set of triangular faces. I also wish to add additional information about the faces to indicate which is the outfacing side. (This is for an electromagnetic solving problem, which will define which permittivity sits which side of a face. I already have the solving software, but wish to enter data through FreeCAD.)
When I highlight the face in the GUI I see no change in the message console, but presumably something exists internally so the user can find which face is highlighted. I could then create the special file needed by the solver.
Where should I look for this information?
Thanks in advance for any help in this issue.
Steve
Detecting solid face highlight in Python script
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
-
- Posts: 15
- Joined: Tue May 06, 2014 3:58 pm
-
- Posts: 15
- Joined: Tue May 06, 2014 3:58 pm
Re: Detecting solid face highlight in Python script
To add to my question:
I notice in the status bar that when I highlight a face its identity does appear in the status bar
e.g. Unnamed.Shape.Face6.
How do I access this mouse clicked information in script?
I notice in the status bar that when I highlight a face its identity does appear in the status bar
e.g. Unnamed.Shape.Face6.
How do I access this mouse clicked information in script?
-
- Posts: 15
- Joined: Tue May 06, 2014 3:58 pm
Re: Detecting solid face highlight in Python script
To further add to my question:
I think I found a clue in the Code Snippets part of the wiki
http://www.freecadweb.org/wiki/index.ph ... via_Python
Next is how to use the event to find the highlighted face...?
I think I found a clue in the Code Snippets part of the wiki
http://www.freecadweb.org/wiki/index.ph ... via_Python
Next is how to use the event to find the highlighted face...?
Re: Detecting solid face highlight in Python script
best is to use the selection mechanism:
Code: Select all
>>> Gui.Selection.getSelection() #selected object only
[<Part::PartFeature>]
>>> Gui.Selection.getSelectionEx() #selected object plus child shape which is select
[<SelectionObject>]