TimT77 Posted November 27, 2018 Share Posted November 27, 2018 Hi all! Is there a possibility to get the polygon points of a mesh as a result of CSG union? I prepared a playground: https://www.babylonjs-playground.com/#PS63MV#1 There i have 2 polygons (PolygonMeshBuilder) and a final mesh as the union (CSG) of the initial polygons. Is there a way to get the outer points/vertices of the union CSG (green) in correct order, so that i have an array of points to create the same polygon (like the green one) with the PolygonMeshBuilder ? Thanks in advance! Kind regards, Tim Quote Link to comment Share on other sites More sharing options...
Sebavan Posted November 27, 2018 Share Posted November 27, 2018 You can use mergedMesh.getVerticesData(BABYLON.VertexBuffer.PositionKind); https://www.babylonjs-playground.com/#PS63MV#2 Quote Link to comment Share on other sites More sharing options...
TimT77 Posted November 27, 2018 Author Share Posted November 27, 2018 Thanks for your answer Sebavan! But therewith i get all vertices, these of the top/surface too: https://www.babylonjs-playground.com/#PS63MV#3 How can i separate only the points of the outer border? Quote Link to comment Share on other sites More sharing options...
Sebavan Posted November 27, 2018 Share Posted November 27, 2018 Maybe you could manually go through the array and remove the one with the smaller y ? 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.