TechDraw: Problems with makeCosmeticLine3D while adding a line with Z extension
- Dominant language
- C++
- Stars
- 33.6k
- Forks
- 6k
- Avg merge
- 3d 15h
- Merged PRs (30d)
- 196
Description
### Problem description
Using TechDraw to display a section of a view, along Z axe.
The section is in perspective to view the Z extend.
When using makeCosmeticLine3D, the extend in Z is not drawn and if the line is strictly vertical: "Base.FreeCADError: Unknown C++ exception".
If the section is not perspective, the Z extension cannot be seen but the crash remains.
### Workbench affected?
TechDraw
### Steps to reproduce
Open my example file
type in
[CrashCosm3Dw20230729.FCStd.gz](https://github.com/user-attachments/files/30590346/CrashCosm3Dw20230729.FCStd.gz)
Python console:
App.activeDocument().getObject("SectionView010").makeCosmeticLine3D(App.activeDocument().getObject("Line").Start,App.activeDocument().getObject("Line").End)
### Expected behavior
A vertical cosmetic line should be drawn in then perspective section view, with the Z coordinates correct.
### Actual behavior
With the vertical line supplied (with same X,Y) makeCosmeticLine3D crash with "Base.FreeCADError: Unknown C++ exception"
If you change a little X or Y of line.End, an horizontal line is drawn, ignoring the Z extention.
### Development version About Info (in Safe Mode)
```shell
Reproduces with the latest weekly:
OS: Linux Mint 22.3 Cinnamon (X-Cinnamon/cinnamon/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: French/France (fr_FR)
Stylesheet/Theme/QtStyle: FreeCAD.qss/FreeCAD Light/
QPA/File dialog/Color dialog: xcb/via Qt/via Qt
Navigation Style/Orbit Style/Rotation Mode: Gesture/Rounded Arcball/Window center
Logical DPI/Physical DPI/Pixel Ratio: 96/81.5973/1
OpenGL version/vendor/renderer: 4.6 (Compatibility Profile) Mesa 25.2.8-0ubuntu0.24.04.2/Intel/Mesa Intel(R) Graphics (RKL GT1)
```
### Last known good version (optional)
```shell
```
Contributor guide
Research direction
Reproduce the crash with CrashCosm3Dw20230729.FCStd.gz, then run the supplied Python-console call to SectionView010.makeCosmeticLine3D using the Line object's Start and End points. Inspect the makeCosmeticLine3D entry point and determine why vertical points and Z extension are mishandled. Done means a vertical cosmetic line renders in perspective with correct Z coordinates and no exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, python
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100