jiweigang1 Posted April 29, 2015 Share Posted April 29, 2015 i use ExtrudeShape and CreateRibbon to make coustom mesh but i cant cap the top and buttom how can i do it ? , thanks! Quote Link to comment Share on other sites More sharing options...
jerome Posted April 29, 2015 Share Posted April 29, 2015 I didn't implement this because I thought this would be too many parameters to handle and because it's doable in another way : well, when you extrude a 2D shape, you pass a path of Vector3 describing this shape, don't you ?This path could be used with a ribbon to build a 2D plain shape (just give this path and the right offset or null, it should work).This plane ribbon will be the cap.Then you have to rotate it and translate it to the first (and last) point of the curve used for extrusion. I have to admit it's not straight forward Maybe these extra parameters should be added in extrusion... let me know people Quote Link to comment Share on other sites More sharing options...
jerome Posted April 29, 2015 Share Posted April 29, 2015 Another simpler way could be this one :use the CustomExtrudermake a curve with the first and second point at the same positionmake a scaleFunction with this condition : if i == 0 then return 0 else return scaleValue; so the shape will be scaled to zero, reduced at a point for the first curve position, and then scaled to scaleValue ... but as your curve two first points are at the same position, it should cap your extruded shape Quote Link to comment Share on other sites More sharing options...
jiweigang1 Posted April 30, 2015 Author Share Posted April 30, 2015 its too difficult for mecan you give me a example?thank you very much i will be easy if i use 3dmax i think it should have a Cap parameter Quote Link to comment Share on other sites More sharing options...
jerome Posted April 30, 2015 Share Posted April 30, 2015 Ok, i'll probably add an extram parameter cap :0 = none1 = cap on start2 = cap on end3 = both capped Quote Link to comment Share on other sites More sharing options...
jerome Posted May 1, 2015 Share Posted May 1, 2015 here is the general principle : http://www.babylonjs-playground.com/#LG3GS#7 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.