Jump to content

Scaling illudes me... BJS Unit Size


Pryme8
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...