Topper Posted February 12, 2018 Share Posted February 12, 2018 (edited) Hi everyone, I´m trying to figure out the best way to put holes in an extruded shape. What I want to get achieved is the upright of a pallet rack with hole patterns on three different sides based on user input. I want to keep effort and complexity as little as possible. I already tried two different approaches: 1) create shape, add holes, extrude 2) create shape, extrude, ??? I already went through the "house sample" in the PG, but the workflow there is kinda different: I want to define the holes (or their coordinates) after having extruded my shape. Here´s the result of my two tries. Is there a way to cut holes into an extruded shape by vector3 ccordinates? BR, Markus Edited February 14, 2018 by Topper still unsolved Quote Link to comment Share on other sites More sharing options...
Guest Posted February 12, 2018 Share Posted February 12, 2018 I think CSG is the best option here: http://www.babylonjs.com/demos/csg/ Quote Link to comment Share on other sites More sharing options...
Topper Posted February 12, 2018 Author Share Posted February 12, 2018 I already came across this and found a PG about making holes into a balling ball. Gonna have a look into this right away. thanks, Deltakosh Quote Link to comment Share on other sites More sharing options...
Guest Posted February 12, 2018 Share Posted February 12, 2018 my pleasure! Quote Link to comment Share on other sites More sharing options...
MarianG Posted February 12, 2018 Share Posted February 12, 2018 Hi Topper. I used csg a few months ago. You can take a look. Maybe can help. The goal was to create a generator for holes on meshes, but I need time, and now I haven't too much. Quote Link to comment Share on other sites More sharing options...
Topper Posted February 13, 2018 Author Share Posted February 13, 2018 Thanks folks, CSG is exactly what I need. It´s pretty straight forward, though. Unfortunately I didn´t find enough time yesterday evening to code the JS-functions to cut the needed holes over the whole mesh length. But CSG already became my new friend. ;-) Quote Link to comment Share on other sites More sharing options...
Guest Posted February 13, 2018 Share Posted February 13, 2018 Perfect! Quote Link to comment Share on other sites More sharing options...
Topper Posted February 14, 2018 Author Share Posted February 14, 2018 Ok, I still Need some help, I´m using a for loop to create multiple cylinders along the main mesh´s Y-axis to cut holes using CSG. For some reasing it only cuts out the hole the last cylinder produces. I´m not sure if i´m using the wrong order of my code lines in the for loop. http://www.babylonjs-playground.com/#5KCYBZ#1 Thanks, Markus Quote Link to comment Share on other sites More sharing options...
JohnK Posted February 14, 2018 Share Posted February 14, 2018 One way is to merge all of the 'sideHole's into one mesh before using CSG https://www.babylonjs-playground.com/#5KCYBZ#2 GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
Topper Posted February 14, 2018 Author Share Posted February 14, 2018 Thanks JohnK, this works well. BR, Markus Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.