vscode-ocp-cad-viewer icon indicating copy to clipboard operation
vscode-ocp-cad-viewer copied to clipboard

Incorrect Axis Display in OCP CAD Viewer on VSCode

Open kaklik opened this issue 1 year ago • 6 comments

I noticed that the X, Y, and Z axes are displayed in an unexpected and incorrect manner on my primary workstation when using the OCP CAD Viewer in VSCode. The issue appears to persist across multiple versions of the extension. I have been using OCP VSCode for about a year, and I only noticed this problem when I needed to edit the same project on another computer, where the axes were displayed correctly as expected. Until that I suppose it is some kind of OCP weird axis display method.

Actual Behavior

This screenshot shows the incorrect axis display. The axes appear bent at right angles instead of being straight lines.

Image

Expected Behavior

The X, Y, and Z axes should be displayed in this standard form. Screenshot shows the correct axis display from a different machine.

Image

System Information

The both workstation has the following software configuration:

Operating System: Ubuntu 24.04.2 LTS 
OCP CAD Viewer version: 2.6.4
VSCode version data:
    Version: 1.93.0
    Commit: 4849ca9bdf9666755eb463db297b69e5385090e3
    Date: 2024-09-04T13:02:38.431Z
    Electron: 30.4.0
    ElectronBuildId: 10073054
    Chromium: 124.0.6367.243
    Node.js: 20.15.1
    V8: 12.4.254.20-electron.0
    OS: Linux x64 6.8.0-55-generic
    

Since the issue persists across multiple versions, it may be related to system-specific settings, dependencies, or hardware differences. Let me know if I can provide any additional debugging information.

kaklik avatar Mar 14 '25 19:03 kaklik

There is no way for me to reproduce this. My guess is that it has something to do with the linux graphic driver. We already had all sorts of strange behaviour because of that.

I add three segments [(0,0,0), (size,0,0)], ... and ask threejs to visualize it.

    const vertices = new Float32Array([
            0, 0, 0, size, 0, 0,
            0, 0, 0, 0, size, 0,
            0, 0, 0, 0, 0, size
        ]);

    const geometry = new LineSegmentsGeometry();
    geometry.setPositions(vertices);    

bernhard-42 avatar Mar 15 '25 09:03 bernhard-42

Ok, I understand that it is hardly reproducible. Maybe someone has a similar issue, and in that case, the actual cause could be isolated.

The computer with the issue has the following graphical drivers:

$ lspci -nnk | grep -A3 VGA
00:02.0 VGA compatible controller [0300]: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller [8086:0152] (rev 09)
	DeviceName:  Onboard IGD
	Subsystem: Micro-Star International Co., Ltd. [MSI] Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller [1462:2111]
	Kernel driver in use: i915

$ glxinfo | grep "OpenGL version"
OpenGL version string: 4.2 (Compatibility Profile) Mesa 24.2.8-1ubuntu1~24.04.1

kaklik avatar Mar 15 '25 10:03 kaklik

Maybe post it in the build123d discord channel, link see https://github.com/gumyr/build123d

bernhard-42 avatar Mar 15 '25 11:03 bernhard-42

btw., there are newer drives 24.3.4 (maybe wouldn't go immediately for 25.0.1) https://docs.mesa3d.org/relnotes/24.3.2.html

bernhard-42 avatar Mar 15 '25 11:03 bernhard-42

btw., there are newer drives 24.3.4 (maybe wouldn't go immediately for 25.0.1) https://docs.mesa3d.org/relnotes/24.3.2.html

Just for the update. I installed the mesa drivers 25.0.1:

$ glxinfo | grep "OpenGL version"
OpenGL version string: 4.2 (Compatibility Profile) Mesa 25.0.1 - kisak-mesa PPA 

And there is no observable change or improvement.

kaklik avatar Mar 23 '25 22:03 kaklik

see also https://github.com/bernhard-42/three-cad-viewer/issues/23

bernhard-42 avatar Mar 28 '25 20:03 bernhard-42