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

Fix clip plane color #508

Merged
merged 1 commit into from
Oct 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix clip plane color
martinRenou committed Oct 21, 2024

Verified

This commit was signed with the committer’s verified signature.
radoering Randy Döring
commit 9df3fa032042302f21540b595971ba7cca6f0316
6 changes: 4 additions & 2 deletions packages/base/src/3dview/mainview.tsx
Original file line number Diff line number Diff line change
@@ -330,7 +330,7 @@ export class MainView extends React.Component<IProps, IStates> {
this._clippingPlaneMeshControl = new THREE.Mesh(
new THREE.PlaneGeometry(1, 1),
new THREE.MeshBasicMaterial({
color: 'black',
color: DEFAULT_MESH_COLOR_CSS,
opacity: 0.2,
transparent: true,
side: THREE.DoubleSide
@@ -1435,6 +1435,8 @@ export class MainView extends React.Component<IProps, IStates> {
DEFAULT_EDGE_COLOR.set(getCSSVariableColor(DEFAULT_EDGE_COLOR_CSS));
BOUNDING_BOX_COLOR.set(getCSSVariableColor(BOUNDING_BOX_COLOR_CSS));

this._clippingPlaneMeshControl.material.color = DEFAULT_EDGE_COLOR;

this.setState(old => ({ ...old, lightTheme }));
};

@@ -1544,7 +1546,7 @@ export class MainView extends React.Component<IProps, IStates> {
private _explodedViewLinesHelperGroup: THREE.Group | null = null; // The list of line helpers for the exploded view
private _cameraSettings: CameraSettings = { type: 'Perspective' };
private _clipSettings: ClipSettings = { enabled: false, showClipPlane: true };
private _clippingPlaneMeshControl: THREE.Mesh; // Plane mesh using for controlling the clip plane in the UI
private _clippingPlaneMeshControl: BasicMesh; // Plane mesh using for controlling the clip plane in the UI
private _clippingPlaneMesh: THREE.Mesh | null = null; // Plane mesh used for "filling the gaps"
private _clippingPlane = new THREE.Plane(new THREE.Vector3(-1, 0, 0), 0); // Mathematical object for clipping computation
private _clippingPlanes = [this._clippingPlane];

Unchanged files with check annotations Beta

import { expect, test, galata } from '@jupyterlab/galata';

Check failure on line 1 in ui-tests/tests/ui.spec.ts

GitHub Actions / Integration tests

tests/ui.spec.ts:51:11 › UI Test › File operations › Should be able to render fan.stl without error

1) tests/ui.spec.ts:51:11 › UI Test › File operations › Should be able to render fan.stl without error Test timeout of 60000ms exceeded.
import path from 'path';
test.use({ autoGoto: false });
await page
.getByRole('tablist', { name: 'main sidebar' })
.getByRole('tab', { name: 'JupyterCad Control Panel' })
.click();

Check failure on line 66 in ui-tests/tests/ui.spec.ts

GitHub Actions / Integration tests

tests/ui.spec.ts:51:11 › UI Test › File operations › Should be able to render fan.stl without error

1) tests/ui.spec.ts:51:11 › UI Test › File operations › Should be able to render fan.stl without error Error: locator.click: Test timeout of 60000ms exceeded. Call log: - waiting for getByRole('tablist', { name: 'main sidebar' }).getByRole('tab', { name: 'JupyterCad Control Panel' }) - locator resolved to <li role="tab" tabindex="-1" id="tab-key-1-6" aria-selected="true" title="JupyterCad Control Panel" class="lm-TabBar-tab lm-mod-current" data-id="jupytercad::leftControlPanel">…</li> - attempting click action - waiting for element to be visible, enabled and stable - element is visible, enabled and stable - scrolling into view if needed - done scrolling - <dialog aria-modal="true" class="lm-Widget jp-Dialog" aria-label="File Load Error for fan.stl Unexpected token 's', "solid CATI"... is not valid JSON">…</dialog> intercepts pointer events - retrying click action, attempt #1 - waiting for element to be visible, enabled and stable - element is visible, enabled and stable - scrolling into view if needed - done scrolling - <dialog aria-modal="true" class="lm-Widget jp-Dialog" aria-label="File Load Error for fan.stl Unexpected token 's', "solid CATI"... is not valid JSON">…</dialog> intercepts pointer events - retrying click action, attempt #2 - waiting 20ms - waiting for element to be visible, enabled and stable - element is visible, enabled and stable - scrolling into view if needed - done scrolling - <dialog aria-modal="true" class="lm-Widget jp-Dialog" aria-label="File Load Error for fan.stl Unexpected token 's', "solid CATI"... is not valid JSON">…</dialog> intercepts pointer events - retrying click action, attempt #3 - waiting 100ms - waiting for element to be visible, enabled and stable - element is visible, enabled and stable - scrolling into view if needed - done scrolling - <dialog aria-modal="true" class="lm-Widget jp-Dialog" aria-label="File Load Error for fan.stl Unexpected token 's', "solid CATI"... is not valid JSON">…</dialog> intercepts pointer events - retrying click action, attempt #4 - waiting 100ms - waiting for element to be visible, enabled and stable - element is visible, enabled and stable - scrolling into view if needed - done scrolling - <dialog aria-modal="true" class="lm-Widget jp-Dialog" aria-label="File Load Error for fan.stl Unexpected token 's', "solid CATI"... is not valid JSON">…</dialog> intercepts pointer events - retrying click action, attempt #5 - waiting 500ms - waiting for element to be visible, enabled and stable - element is visible, enabled and stable - scrolling into view if needed - done scrolling - <dialog aria-modal="true" class="lm-Widget jp-Dialog" aria-label="File Load Error for fan.stl Unexpected token 's', "solid CATI"... is not valid JSON">…</dialog> intercepts pointer events - retrying click action, attempt #6 - waiting 500ms - waiting for element to be visible, enabled and stable - element is visible, enabled and stable - scrolling into view if needed - done scrolling - <dialog aria-modal="true" class="lm-Widget jp-Dialog" aria-label="File Load Error for fan.stl Unexpected token 's', "solid CATI"... is not valid JSON">…</dialog> intercepts pointer events - retrying click action, attempt #7 - waiting 500ms - waiting for element to be visible, enabled and stable - element is visible, enabled and stable - scrolling into view if needed - done scrolling - <dialog aria-modal="true" class="lm-Widget jp-Dialog" aria-label="File Load Error for fan.stl Unexpected token 's', "solid CATI"... is not valid JSON">…</dialog> intercepts pointer events - retrying click action, attempt #8 - waiting 500ms - waiting for element to be vi
await page
.getByRole('tablist', { name: 'alternate sidebar' })
.getByRole('tab', { name: 'JupyterCad Control Panel' })