Closing an extruded shape generated over a circular path

I`ll give it a try tomorrow with lathes, thanks!

Hello again, @WillemCramer, @mawa, @shaderbytes, @Evgeni_Popov. I have been trying all the approaches that you suggested, but the problem persists. I can reduce the number of vertices by decreasing the number of steps in the extrusion process, but that’s about it.

I believe the problem is somewhat similar to the one discussed in this particular thread: How to delete obsolete vertices / facets? How to get only the "real" ones?.

When you examine the shape more closely, you can see that several vertices are being generated along straight lines. I didn’t think this was possible in a 3D render.

I also considered the possibility that the issue lies in the way I am generating the final form by doing the CSG operation, but I haven’t been able to find an alternative method. Am I hitting the end of the road here?

Yeah, I think we all pretty much are at the same state here with this. Honestly, if even @Evgeni_Popov (despite for claiming not being a specialist) says the CSG operation is ‘obscure’, I have to trust him on that. At this point, all I (with my small brain) can see as a solution is to either take a completely different approach or eventually try to challenge @Deltakosh on this :grin: I know he likes challenges, so may be? :rofl: :joy:

As @mawa said, you might want to try another method (using an external library?), as the current CSG implementation is something of a black box and there’s not much we can do to change the way it works.

Thanks! I’ll do more research, then. But, to throw more light over this issue, should I document this a little bit more and open an issue on the babylon GH repo?

I think we can add some additional doc in the CSG class to indicate that the geometry generated by CSG operations is generally complex and may be not well suited for some operations?

1 Like

I can’t help with the CSG problem in general, but the original problem of extruding shapes on a closed path is based on problems with Path3d, demonstrated here:
There are two related problems:

  • The initial and final tangents and binormals do not take into account that they are at the same point, so they are different and only based on the initial or final segment. Note that at midpoints in the path, Path3d computes reasonable average tangents and binormals.
  • At the initial and final point on the closed path, you get two different binormals, which gives two different locations for placing the points for the ribbon path, which then need to be connected by a spurious segment.

I think a fix for Path3d to support closed paths would eliminate many of the issues with extrusions and make the resulting extrusion cleaner and simpler for things like CSG

1 Like