kovacsv / Online3DViewer

A solution to visualize and explore 3D models in your browser.
https://3dviewer.net
MIT License
2.33k stars 518 forks source link

Distance Units #285

Open Likqez opened 2 years ago

Likqez commented 2 years ago

Describe the solution you'd like

I want all the measurements to have the unit written besides them. I can be quite confusing if your not very familiar with 3d modelling. Should be an easy addition.

Regards Lukas

kovacsv commented 2 years ago

Quick research about unit handling in supported file formats:

Format Unit Handling
Wavefront (obj)
3D Studio (3ds)
Stereolithography (stl) ❌ - unofficial solution is available
Polygon File Format (ply)
glTF (gltf, glb)
Object File Format (off)
Dotbim (bim) ✔️ - meters
Rhinoceros 3D (3dm)
Filmbox (fbx)
Collada (dae)
VRML (wrl) ❌- but meters are recommended
3D Manufacturing Format (3mf) ✔️
STEP (stp) ✔️
Industry Foundation Classes (ifc) ✔️
kovacsv commented 2 years ago

@Likqez what file format do you use when missing units?

Likqez commented 2 years ago

I was using the .stl format. Which theoretically provide units, although they can be altered by slicers or similar.

kovacsv commented 2 years ago

As far as I know STL is unitless. There are some non-official proposals to introduce units, but nothing standard. https://en.wikipedia.org/wiki/STL_(file_format)

Likqez commented 2 years ago

Okay I understand. Also, a prompt at import wouldn't make sense either.

chriskuech commented 1 year ago

@kovacsv , I am not seeing units for my stp file.

image

model.stp.txt

But opening the file as text, it seems the unit should be inches.

kovacsv commented 1 year ago

I reopen this since now there are new formats that have unit information (like step, iges) so it would make sense to introduce units.