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

Cutting feature bug? #60

Open
SakuraHoshizaki opened this issue Jul 14, 2024 · 1 comment
Open

Cutting feature bug? #60

SakuraHoshizaki opened this issue Jul 14, 2024 · 1 comment
Assignees

Comments

@SakuraHoshizaki
Copy link

SakuraHoshizaki commented Jul 14, 2024

I would like to cut both the mesh and point cloud generated by quint workflow and take some screenshots of the cross-section. But the online tools seems not supporting this so I downloaded the source code to run locally and to modify the cutting behavior in the Javascript. However in the original main.js, line 345:

if(!document.getElementById("cut_cloud").checked){

            cutCloud(flatrf,(maxx+minx)/2,(maxy+miny)/2,(maxz+minz)/2,maxx-minx,maxy-miny,maxz-minz);

            cutMesh(flatrf,flatnrm,(maxx+minx)/2,(maxy+miny)/2,(maxz+minz)/2,maxx-minx,maxy-miny,maxz-minz);

            cutSurface(flatrf,nrm,(maxx+minx)/2,(maxy+miny)/2,(maxz+minz)/2,maxx-minx,maxy-miny,maxz-minz);

        } else {

            solidMesh(flatrf,flatnrm);

            cutCloud(flatrf,(maxx+minx)/2,(maxy+miny)/2,(maxz+minz)/2,maxx-minx,maxy-miny,maxz-minz);

            transparentMesh(flatrf);

}

which seems to actually trying to do the cut as what I needed.
When I comment out this:

cutMesh(flatrf,flatnrm,(maxx+minx)/2,(maxy+miny)/2,(maxz+minz)/2,maxx-minx,maxy-miny,maxz-minz);

cutSurface(flatrf,nrm,(maxx+minx)/2,(maxy+miny)/2,(maxz+minz)/2,maxx-minx,maxy-miny,maxz-minz);


Then the cloud cutting started working, but from the opposite side of the cutting axis.

I'm not familiar with the tool or WebGL, but I guess this may be a not expected behavior of the cutting tool.

Also for my project, I'm trying to read the code and figure out what's happening. If I have more information I will update this thread.

@SakuraHoshizaki
Copy link
Author

AHHH
Sorry for my misunderstanding
I learned about how the program working, and that's what it is supposed to do. The cutxxx function is to draw the cutted object, not to cut the object.

I got what I need by inverting the axis.

Also for the enhancement advise, a cross-section image series generator from any angle will be very helpful for making customized demonstration animations

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

2 participants