-
-
Notifications
You must be signed in to change notification settings - Fork 46
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
How to update a CSG Operation #205
Comments
Please provide a live, minimal example of what the issue is and what's not working. Ie no loaded models, etc so it's clear what the code flow is. |
Video:2024-04-05.18-06-03.mp4Description:The cube shown in the video is a three-bvh-csg Operation mesh, I want its operation to be updated to SUBTRACTION when I switch the hollow type to 1 or to ADDITION when I switch it to 0. After switching if I do Observation:I have observed that doing Thanks for replying to my issue though |
Please - a live example. This means something working and editable. Not a video. |
Oh my bad here's the code editing platform: https://glitch.com/edit/#!/ |
As in my previous comment:
Unfortunately I cannot spend time dissecting almost 500 lines of code to understand what's happening. Please provide a minimal example that shows only the issue you're running in to and controls required to show it. |
For that let me make a new code and share the link here |
Link:https://glitch.com/edit/#!/summer-spurious-market This link is for the minimal code that doesn't contain anything except the problem I am facing. Preview: |
You're modifying the operation and never rerunning the CSG operation so of course the geometry will never change: gui
.add(params, "hollow", ["Off", 0, 1])
.name("Hollow Type")
.onChange(function (value) {
if (value == "off"){
console.log("OFF")
}
else if (value == 0){
inside.operation = tbc.ADDITION
}
else if (value == 1){
inside.operation = tbc.SUBTRACTION
}
csgEvaluator.evaluateHierarchy(meshBrush, mesh);
}); |
Thanks for the help man, that was a minor yet dumb mistake |
Description:
I am tying to update an operation live while the scene is running, here's my mesh thats using the operation:
What I need:
I am trying to change the operation of the
inside
mesh usinginside.operation = tbc.SUBTRACTION
with the help of a GUI button, is that possible? If so can anyone explain how it works in detail cause I am new to this CSG stuff.Thanks
The text was updated successfully, but these errors were encountered: