Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft: Error on Select working Plane #14196

Closed
2 tasks done
gianlucafiore opened this issue May 21, 2024 · 11 comments · Fixed by #14206
Closed
2 tasks done

Draft: Error on Select working Plane #14196

gianlucafiore opened this issue May 21, 2024 · 11 comments · Fixed by #14206
Labels
Bug This issue or PR is related to a bug WB BIM Related to the BIM/Arch Workbench

Comments

@gianlucafiore
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Problem description

When you try to select a work plane that is automatically referenced to a face, it generates the following error

image

image

Full version info

OS: Windows 11 build 22631
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.37436 (Git)
Build type: Release
Branch: main
Hash: 040502280fc9637fb3aada037523283168b81a02
Python 3.11.9, Qt 5.15.13, Coin 4.0.2, Vtk 9.2.6, OCC 7.7.2
Locale: Spanish/Argentina (es_AR)
Installed mods: 
  * Dracula 0.0.5
  * OpenDark 2024.3.13

Subproject(s) affected?

None

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@gianlucafiore gianlucafiore changed the title Draft: Select Plane Draft: Error on Select working Plane May 21, 2024
@gianlucafiore
Copy link
Author

image

I have just realized that the error comes from when I want to use a face of a volume generated by extrusion as a work plane, and not for example on a wall of the BIM tool

image

@gianlucafiore
Copy link
Author

gianlucafiore commented May 21, 2024

image

Another mistake I just detected is that when selecting several faces from one or more volumes obtained by means of an extruded plane, only the first selected face is illuminated, but the second one is not illuminated by holding ctrl. Pressed

But with the walls it does work

image

@maxwxyz
Copy link
Collaborator

maxwxyz commented May 21, 2024

I cannot reproduce this. Can you add a demo file?

@maxwxyz maxwxyz added WB BIM Related to the BIM/Arch Workbench Missing: confirmation Missing confirmation from other testers Missing: example file labels May 21, 2024
@Roy-043
Copy link
Contributor

Roy-043 commented May 21, 2024

Looking at the error message (2nd image) this may be related to toponaming code.

@gianlucafiore
Copy link
Author

@yorikvanhavre
Copy link
Member

I can't reproduce the problem, nor with the provided file or a clean new shape... But reading the error message, it seems to indicate an edge and a face were selected? Although that too shouldn't produce an error, but just indicate a message

Could you provide a precise step-by-step instruction on how to reproduce the error?

@gianlucafiore
Copy link
Author

gianlucafiore commented May 22, 2024

1- I create some volumes from planes (rectangles, polylines), extruded. And I also create a wall with some minimal complexity to compare

2- the first error registered is that I want to establish the personalized work plane on any face of said volumes and I get the error detailed above. Not happening like this when I select a plane of a wall type volume

3- the next error that I identify is when, in the volumes (generated from extruded planes) I want to select by pressing the ctrl key. several faces of the same or different volumes, or faces and edges, or several edges, etc. It does not do so, only the first selected face/edge/vertex and the following ones are illuminated, although it does show in the tree on the left that all the different objects are being selected.
while on the wall I can select all the faces, edges and vertices that I want

@yorikvanhavre
Copy link
Member

Okay I see now. I still don't get an error, though, but indeed doing this:

  1. Create a Draft Rectangle
  2. Extrude it using Part Extrude
  3. Cannot place the working plane on any of its faces anymore (no error though, the WP gets placed on the current view for me)

The selection looks OK though (Gui.Selection.getSelectionEx()[0].SubElementNames returns correct things like [Face1]

Investigating more...

@yorikvanhavre
Copy link
Member

yorikvanhavre commented May 22, 2024

The selection looks OK though (Gui.Selection.getSelectionEx()[0].SubElementNames returns correct things like [Face1]

Actually not always. Now I get (';Edge2;:G;XTR;:H210:7,F.Face2',)

>>> FreeCADGui.Selection.getSelectionEx("", 0)[0].SubElementNames
(';Edge2;:G;XTR;:H210:7,F.Face2',)
>>> FreeCADGui.Selection.getSelectionEx()[0].SubElementNames
('Face2',)

There is our culprit. The second argument being 0 means: TNP disabled. Needs to be 1

@Roy-043
Copy link
Contributor

Roy-043 commented May 22, 2024

There is an underlying problem that needs to fixed as well I think. SubElementNames should not contain such a string. Maybe one of the toponaming devs can comment? @CalligaroV can you have a look?

There are other occurrences of FreeCADGui.Selection.getSelectionEx("", 0) in the Draft and BIM code that would need to be checked as well.

@yorikvanhavre
Copy link
Member

Indeed, in
BIM/ArchCutPlane.py
BIM/bimcommands/BimCutPlane.py
Draft/WorkingPlane.py

@maxwxyz maxwxyz added Bug This issue or PR is related to a bug and removed Missing: confirmation Missing confirmation from other testers Missing: example file labels May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This issue or PR is related to a bug WB BIM Related to the BIM/Arch Workbench
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants