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

Create DeviationAnalysisPlugin #784

Open
xeolabs opened this issue Dec 7, 2021 · 0 comments
Open

Create DeviationAnalysisPlugin #784

xeolabs opened this issue Dec 7, 2021 · 0 comments

Comments

@xeolabs
Copy link
Member

xeolabs commented Dec 7, 2021

  • Compares two models: point cloud and BIM
  • Finds for each object a factor that indicates how far it deviates from the corresponding portion of the point cloud
  • Possibly colorizes the objects using the factor

A general idea of usage:

 import {Viewer, XKTLoaderPlugin, DeviationAnalysisPlugin} from "xeokit-sdk.es.js";
 
const viewer = new Viewer({
     canvasId: "myCanvas",
     transparent: true
});

const xktLoader = new XKTLoaderPlugin(viewer);

const model = xktLoader.load({  
     id: "myModel",
     src: "./models/xkt/Schependomlaan.xkt",
     edges: true
});


const pointCloud = xktLoader.load({  
     id: "myPointCloud",
     src: "./models/xkt/Schependomlaan.laz.xkt"
});

const deviationAnalysis = new DeviationAnalysisPlugin(viewer, { });

const analysis = deviationAnalysis.analyze({
    model: model,
    pointCloud: pointCloud
});

// Rough idea
const deviationFactor = analysis.objectDeviationFactors["2hExBg8jj4NRG6zzD0RZML"];

if (deviationFactor > 0) {
    viewer.scene.objects["2hExBg8jj4NRG6zzD0RZML"].highlighted = true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant