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

DistanceMeasurementPlugin works with Mesh? #1438

Open
g-rodigy opened this issue Apr 14, 2024 · 2 comments
Open

DistanceMeasurementPlugin works with Mesh? #1438

g-rodigy opened this issue Apr 14, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@g-rodigy
Copy link
Contributor

Describe the bug
DistanceMeasurementPlugin not working if on scene has Mesh.

To Reproduce

var viewer = new Viewer({
    canvasId: 'cv',
});
var distancePlugin = new DistanceMeasurementsPlugin(viewer)
var distanceMeasurementsMouseControl = new DistanceMeasurementsMouseControl(distancePlugin, {
    snapping: true
})
distanceMeasurementsMouseControl.activate();

new Mesh(viewer.scene, {
    geometry: new ReadableGeometry(viewer.scene, buildPolylineGeometry({
        points: [
            0, 0, 0,
            10, 0, 0,
            10, 2, 0,
            0, 2, 0,
            0, 0, 0,
        ]
    })),
    material: new PhongMaterial(viewer.scene, {
        emissive: [0, 1,]
    }),
});

Screenshots
xeokit-sdk v2.5.2-beta-32
image
image

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Chrome
  • Version v123

Additional context
Tested also on version v2.6.0-beta-12

@paireks
Copy link
Member

paireks commented Apr 21, 2024

Hello :)

It looks to me that it is not related to Mesh itself, cause if you will use e.g. buildSphereGeometry and/or buildCylinderGeometry you can easily create dimensions, but once you want to draw lines using e.g. buildGridGeometry and/or buildPolylineGeometry - then this problem occurs. I wonder if it's related to some hovering, that there is no way to pick a line?

Also once you change snapping: false -> this problem is gone, but then it seems there is still some issue to draw some dimensions, as the pointer doesn't allow to move in some of the areas of the 3d model. If I have e.g. cylinder + grid on one scene, then I can only draw dimensions on cylinder :)

@paireks paireks added the enhancement New feature or request label Apr 21, 2024
@g-rodigy
Copy link
Contributor Author

g-rodigy commented Apr 21, 2024

I did some tests and then add measurements. Usually I don't use meshes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants