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

clipping feature have a conflict with angular #119

Open
Medo-85 opened this issue Apr 26, 2022 · 5 comments
Open

clipping feature have a conflict with angular #119

Medo-85 opened this issue Apr 26, 2022 · 5 comments

Comments

@Medo-85
Copy link

Medo-85 commented Apr 26, 2022

Hello, it seems that the clipping feature have a conflict with angular, somehow I tried with latest web-ifc-viewer and doesn't work for any projects
I also tried with the angular example and I could recreate by doing the following in 'ifc.service.ts' file

startIfcViewer(container: HTMLElement) {
    if (!container) return this.notFoundError('container');
    this.container = container;
    this.setupIfcScene();
    this.setupInputs();
    
    window.onkeydown = (event: any) => {
      if(event.code === 'KeyP') {
          this.ifcViewer?.clipper.createPlane();
      }
      else if(event.code === 'KeyO') {
          this.ifcViewer?.clipper.deletePlane();
      }
    };
  }

The clipper plane get created but not actual clipping happened as in the following image

image

@agviegas
Copy link
Collaborator

Try with the latest version (1.0.177)!

@Medo-85
Copy link
Author

Medo-85 commented Apr 26, 2022

Try with the latest version (1.0.177)!

Sure @agviegas will try today.

@eng-luciano-julien
Copy link
Contributor

I had the same problem. In my case without using angular.
Updating to the latest version (1.0.177) solved the problem.

@eng-luciano-julien
Copy link
Contributor

@Medo-85 use deleteAllPlanes() instead of deletePlane() to remove the all the clippings.

@Medo-85
Copy link
Author

Medo-85 commented Apr 27, 2022

window.onkeydown = (event: any) => {
if(event.code === 'KeyP') {
this.ifcViewer?.clipper.createPlane();
}
else if(event.code === 'KeyO') {
this.ifcViewer?.clipper.deletePlane();
}

You are right @agviegas tried it today and it works with 1.0.177 thank you.

@eng-luciano-julien Sure this one is very handy instead deleting one by one.

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

3 participants