Closing an extruded shape generated over a circular path

The CSG class is a bit like black magic, it can generate triangles whose origins you don’t necessarily understand!

I’m afraid there’s nothing to be done, except to run a post-processing that tries to simplify the geometry by replacing several triangles with a single one…

1 Like

yup , even if I simplify the cylinder to 8 points , and make sure the rotation of the boolean mesh is aligned , it still has bad results , here I even didnt close the triangle to remove even more clutter and also I made the boolean smaller than the cylinder … you will notice it still has garble geometry ( and it doesnt matter if you try make the boolean bigger either )

maybe you need to rethink what you end goal is and how to achieve it. Are you expecting all sorts of combinations of booleans? Maybe you can find another 3rd party libarary to do it ? I dont do this sort of stuff at run time so i have not looked into such things personally. Let us know if you find a better working solution :wink:

to be completely honest with you at first i had no idea what you were on about.
camming out of your scene i thought i started to understand your problem although i am still not sure.
did you ever try using a lathe?

1 Like

@WillemCramer , @shaderbytes ,

The key part here is creating a complex figure by subtracting material emulating a lathe operation. So, the intermediate figures are needed. The babylon lathe figure does not allow to do inner material subtraction in a simple way so extruding it looked like a more direct approach, but if the CSG keeps doing that I will need to look for a third party solution or another operation.

@aritzmetal @shaderbytes

How’s this?

I kept following from a distance and (for whatever this thought of mine is worth :thinking:) I’m now starting to believe that you should do that (and not spend more time on it, if by any means possible). I believe the solution of making the substract from a mesh (as per @WillemCramer example and the link I gave you) should be a safe option. It’s the way I’ve done mine. Else, find a way to do it outside BJS as suggested by @shaderbytes. I’m not a good coder (far from it) but I have experience with digital projects and usually, when things start to get too messy and require too much efforts, it is where you should think about a new approach to the problem.

1 Like

i was slightly afraid i’d be making a fool of myself again :stuck_out_tongue_winking_eye: :sunglasses:

I believe you’ll build confidence over time. To be honest, most of the time, I have no faen clue what I’m doing. But since people from the team as knowledgeable as @RaananW said the same, I feel less of a jerk. Eventually, when I got it right it might as well be just ‘incidental’ :wink: …And then I just apologize for all the rest of the crap I post :grin:

1 Like

@mawa , @WillemCramer I think you’re right, I have been playing with your solution and although it seemed like the best approach it still generates the inner wireframe.

I might be overoptimizing the results, but as you said if it starts being so messy it might be because I didn’t pick the right tool. Do you have any recommendation for a postprocessing tool to recalc the wireframes by any chance?

Also, thank you guys for all the effort at least I could close the profile what was totally worth it. :heart:

1 Like

As I said I’m no true coder. Means I’m not necessarly looking for the 1% optimization and slickest code that in fine, doesn’t change shit to the experience. However, here, looking at this wireframe…well, that’s a bit too much, even for me. It could clearly do with some simplification. I haven’t tried the performance mode yet, I don’t know if it can act on the geometry. At this stage, I’ll gladly let someone else answer.

I tried to apply a simplifying process with no luck:

The geometry generated by CSG is really hard to work with…

it fascinates me now and i have tried a few adjustments too with no luck
i think CSG is not the right way to go indeed. best keep thinking shapes as long as possible

now i only wonder why the result seems to result in a flatShadedMesh

looks ok here

I guess it’s not the main issue here. This simple shape generates 50k vertices and 16k faces. I’d say it’s useless as is.

hahahahaha - i never checked :wink:

only other hand - compared with images/textures :thinking:

Yep, thats a huge downside when doing more operations on the same shape :frowning:

result with using a lathe as a cutter
vertices = 1233

geometry still looks odd
sampling IS set to 17 instead of 33 first
at 33 it’s 3781

thing is with the first example is that i was imagining a physical machine doing it. hence the rotation approach

One thing is for sure: You do have a lot more patience than I have :grin: I admit at this point, I gave up with this approach. But praise you if you find the solution :smiley: :hugs: