Pryme8 Posted May 30, 2017 Share Posted May 30, 2017 Ok, I am really struggling right now to understand the unit system for BJS when it comes to importing mesh data then exporting it. I am importing and combining multiple STL files with the CSG System(https://doc.babylonjs.com/classes/2.5/csg). Then exporting them for the intended purpose of 3d Printing. At the moment I have a scalier that can be applied to the mesh before the export processes, but am having trouble finding the sweet spot... An example with some numbers would be: Correct Approx Size : 6.86 x 17.06 x 0.97 cm which could change depending on its orientation... but respectively those numbers. but what I am getting when I export with the scalier set to 10 after the unification is: 1.26 x 0.14 x 0.12 cm Then I opened that mesh in c4d at 1cm ratio, exported it at a 1cm ratio and it blew up to 68.57 x 8.90 x 170.25 so maybe I am just tripping on how I am importing exporting in c4d and that the exported mesh from BJS has the right ratio just really really small... Im getting the size from a 3rd party API that is handling the print processes, which they use mm as the scale. Basically, what is BJS base unit size? What is it in comparison to Unity? I need to figure this out stat. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 30, 2017 Share Posted May 30, 2017 There is no unit you decide if 1 is 1m or 1cm It all depends on how you build your scene Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted May 30, 2017 Author Share Posted May 30, 2017 original STL data: solid AssimpScene facet normal -0.991445 0 0.130525 outer loop vertex -17.4949 -6.9 61.5709 vertex -17.3824 -6.9 62.425 vertex -17.3824 -5.9 62.425 endloop endfacet facet normal -0.923879 0 0.382685 outer loop vertex -17.8245 -6.9 60.775 vertex -17.4949 -6.9 61.5709 vertex -17.4949 -5.9 61.5709 endloop endfacet facet normal -0.991445 0 0.130525 outer loop vertex -17.4949 -6.9 61.5709 vertex -17.3824 -5.9 62.425 vertex -17.4949 -5.9 61.5709 endloop endfacet facet normal -0.923879 0 0.382685 outer loop vertex -17.8245 -6.9 60.775 vertex -17.4949 -5.9 61.5709 vertex -17.8245 -5.9 60.775 endloop endfacet facet normal -0.793354 0 0.608761 outer loop vertex -18.349 -6.9 60.0915 vertex -17.8245 -6.9 60.775 vertex -18.349 -5.9 60.0915 endloop endfacet facet normal -0.608763 0 0.793352 outer loop vertex -19.0324 -6.9 59.5671 vertex -18.349 -6.9 60.0915 vertex -18.349 -5.9 60.0915 endloop endfacet facet normal -0.793354 0 0.608761 outer loop vertex -17.8245 -6.9 60.775 vertex -17.8245 -5.9 60.775 vertex -18.349 -5.9 60.0915 endloop endfacet facet normal -0.608763 0 0.793352 outer loop vertex -19.0324 -6.9 59.5671 vertex -18.349 -5.9 60.0915 vertex -19.0324 -5.9 59.5671 endloop endfacet facet normal -0.382682 0 0.92388 outer loop vertex -19.8283 -6.9 59.2374 vertex -19.0324 -6.9 59.5671 vertex -19.8283 -5.9 59.2374 endloop endfacet facet normal -0.130527 0 0.991445 outer loop vertex -20.6824 -6.9 59.125 vertex -19.8283 -6.9 59.2374 Exported solid exportedMesh facet normal 0.9914365069426241 -0.13058963473954632 0 outer loop vertex -17.4949 61.5709 -6.9 vertex -17.3824 62.425 -6.900000000000001 vertex -17.3824 62.425 -5.900000000000001 endloop facet normal 0.9239093154710283 -0.3826115220244365 0 outer loop vertex -17.8245 60.775 -6.9 vertex -17.4949 61.5709 -6.9 vertex -17.4949 61.5709 -5.9 endloop facet normal 0.9914365069426241 -0.13058963473954632 0 outer loop vertex -17.4949 61.5709 -6.9 vertex -17.3824 62.425 -5.900000000000001 vertex -17.4949 61.5709 -5.9 endloop facet normal 0.9239093154710283 -0.3826115220244365 0 outer loop vertex -17.8245 60.775 -6.9 vertex -17.4949 61.5709 -5.9 vertex -17.8245 60.775 -5.9 endloop facet normal 0.7933353995306864 -0.6087848091497408 0 outer loop vertex -18.349 60.0915 -6.9 vertex -17.8245 60.775 -6.9 vertex -18.349 60.0915 -5.9 endloop facet normal 0.6087678124406573 -0.7933484420708324 0 outer loop vertex -19.0324 59.5671 -6.9 vertex -18.349 60.0915 -6.9 vertex -18.349 60.0915 -5.9 endloop your right, It has to be something with how the 3rd party API is calculating the data. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 30, 2017 Share Posted May 30, 2017 Happy to help :=) Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted May 30, 2017 Author Share Posted May 30, 2017 actually after posting that, it dawned on me I was exporting and invalid STL... as soon as I added endfacet in the correct place everything fixed. GameMonetize 1 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.