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
JSM.BooleanOperation create a lot of new polygons on the same face #21
Comments
Yes, I know about this behavior. This is how boolean operations work. The object is cutted with all the polygon planes of the other object. I have a plan in my mind to merge the connecting faces, but I haven't found a fast solution yet. |
I have searched the github a bit and found that the JSClipper can do the polygon union. Here is the github repository. https://github.com/Delapouite/JsClipper |
Yes, it could work, but wouldn't be very efficient to convert 3D polygons to 2D polygons, calculate the union, then convert back to 3D and connect to the original vertices. There can be a lot of polygons if you calculate the difference with a sphere: http://jsfiddle.net/8xcjv6m9/1/ I think the correct solution should work based on the information calculated during the boolean operation (we know the original polygon index for every new polygon). I will investigate the possibilities. |
So you mean that the polygons should be merged based on their original polygons? I got from the code that the polygon only remembers the index of its immediate ancestor. Sounds like after a few boolean operation, the merge will become difficult. |
I think it should be done after every operation separately, so the next operation will run on the merged model. I see no problem with chained operations is the merge happens after each operation. |
I am doing a "Differnce" boolean operation with two cubes. Each has 6 faces(polygons). After the boolean, I found some faces has more than one polygons on them. It looks like a single face has been cut into serveral pieces after the boolean. Do you have plan to merge the polygons after the boolean?
The text was updated successfully, but these errors were encountered: