Draft, BIM: Inconsistent selected object after object is created
- Dominant language
- C++
- Stars
- 33.6k
- Forks
- 6k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 196
Description
### Problem description
When creating BIM and Draft objects by clicking in the 3D space, typically the newly created object is selected after the command is ended. When the last click of the command is over another object, the other object is selected after the new object is created. This is especially pronounced when draft snaps are used.
This is an inconsistent behavior (user does not know which object will be selected at the end of a command), which is confusing to the user and interrupts workflows.
Sample commands which have this behavior: `Draft_Line`, `Draft_Rectangle`, `Draft_Circle`, `BIM_Wall`, `BIM_Column`, `Arch_Window`
Commands which do not have this issue: `BIM_Beam`, `Arch_CurtainWall`
I am able to reproduce in FC 1.1.3.
Note:
Notice when using snaps during `Draft_Wire` creation, other 'snapped' objects are selected during the command. I think this is similar issue.
### Workbench affected?
Draft
### Steps to reproduce
- create rectangle in new file and enable `Snap_Endpoint`
- start `Draft_Line` tool
- click in 3D space to select first point
- click on one of the endpoints of the rectangle
### Expected behavior
The `Draft_Line` command is ended, and the line should be selected. This is how it behaves when the last click is in an empty space of the 3D view.
### Actual behavior
The `Draft_Line` command is ended, but the rectangle is selected.
See behavior in the video:
https://github.com/user-attachments/assets/622aecc6-9c95-4926-81a2-cdbade75cf24
### Development version About Info (in Safe Mode)
```shell
OS: Debian GNU/Linux 13 (trixie) (GNOME/gnome-xorg/xcb)
Architecture: x86_64
Version: 26.3.0dev.20260728 (Git shallow) AppImage
Build date: 2026/07/28 21:59:12
Build type: Release
Branch: (HEAD detached at 63af5cb2f)
Hash: 63af5cb2f3dbb2b4c7333f6d220b03e05bf92f99
Python 3.11.14, Qt 6.8.3, Coin 4.0.10 (bundled), Pivy 0.6.11 (bundled), Vtk 9.3.1, boost 1_86, Eigen3 3.4.0, PySide 6.8.3
shiboken 6.8.3, xerces-c 3.3.0, Clipper2 , IfcOpenShell 0.8.0, OCC 7.8.1
Locale: English/Ireland (en_IE)
Stylesheet/Theme/QtStyle: FreeCAD.qss/FreeCAD Light/
QPA/File dialog/Color dialog: xcb/via Qt/via Qt
Navigation Style/Orbit Style/Rotation Mode: CAD/Rounded Arcball/Window center
Logical DPI/Physical DPI/Pixel Ratio: 96/158.196/1
OpenGL version/vendor/renderer: 4.6 (Compatibility Profile) Mesa 25.0.7-2+deb13u1/Intel/Mesa Intel(R) HD Graphics 4600 (HSW GT2)
```
### Last known good version (optional)
```shell
```
Contributor guide
Research direction
Reproduce the issue with Draft_Line, Snap_Endpoint, and a rectangle, then compare the listed affected commands with BIM_Beam and Arch_CurtainWall. Trace how selection is handled when the final click lands on another object; done means the newly created object is selected consistently after each command, including when Draft snaps are used.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, python
- Domain
- computer-graphics, design
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100