xml3d / xml3d-stl-plugin

Plugin to use STL models as external mesh references
MIT License
3 stars 1 forks source link

Bounding Box #2

Closed chriscarex closed 8 years ago

chriscarex commented 8 years ago

Hi, wanted to know if bounding box is supported for stl files uploaded with this plug-in and how can I get the values, or otherwise I recommend to add this feature to the plugin. Thanks, Christian

ksons commented 8 years ago

The <mesh> element referencing the STL file has a method getLocalBoundingBox which returns the object space bounding box of the STL file. In the example, open a console and try:

document.querySelector("mesh").getLocalBoundingBox().toString()

Works for me.

chriscarex commented 8 years ago

this works as well, thanks