Hacker News new | past | comments | ask | show | jobs | submit login
Online 3D Viewer for FreeCAD files (3dviewer.net)
113 points by app4soft on Feb 25, 2023 | hide | past | favorite | 23 comments



Online 3D Viewer[0,1] is an open-source 3D models viewer for web, based on Enscripten-port of OCCT (Open Cascade)[2].

It supports wide range of formats, including BREP, STEP, IGES, FreeCAD, Rhinoceros 3D and various common mesh formats.[3]

I, as user of FreeCAD, wrote short thread on its features & possible use as replacement for GrabCAD.[4]

[0] https://github.com/kovacsv/Online3DViewer

[1] https://github.com/kovacsv/Online3DViewerExamples

[2] https://github.com/kovacsv/occt-import-js

[3] https://3dviewer.net/info/index.html

[4] https://fosstodon.org/@app4soft/109925148654197144


Any idea if it supports any of FreeCAD's "Assembly*" modules?


It seems like FreeCAD's "Assembly" (Assembly3?) support still is WIP, but not yet works.[0]

BTW, FCStd-files with multiply bodies/parts already works. Here is a viewer link[1] for FreeCAD's built-in `ArchDetail.FCStd`[2] example model.

[0] https://github.com/kovacsv/Online3DViewer/issues/312

[1] https://3dviewer.net/#model=https://raw.githubusercontent.co... (ATTENTION! Huge CPU/RAM load on start!)

[2] https://github.com/FreeCAD/FreeCAD/tree/master/data/examples


And here is a discussion of this Online 3D Viewer on FreeCAD forum now:[0]

[0] https://forum.freecad.org/viewtopic.php?t=41926&p=663399#p66...


> You can load models from your computer. In this case the model won't be uploaded to any web server, the entire process happens in your browser.

Could I somehow embed this as a preview feature in an other application (which is completely under my control)?

Let's say I am working on a gallery application, but not for photos/image files, but for 3D files. Could I ember a browser/html page render and use this online 3D viewer there?


You can find help for embedding in the developer documentation:

https://kovacsv.github.io/Online3DViewer/index.html


Very nice, this project has potential, it would be nice if there were someone already working on an online FreeCAD sort of alternative too :)


I something similar for climate data, but loading data from a different site was not possible due to CORS. How is CORS not a problem with this setup? @app4soft: Did you allow all origins? Isn’t this a security issue?


Same, CORS must be enabled on the server to make it loadable in the viewer. Among the big file share solutions DropBox works the best with the viewer.

Search for DropBox in the documentation for details:

https://3dviewer.net/info/index.html


You should ask @kovacsv, not me.


I can't wait to get home to see if I can use this as a preview in readme.md somehow.

For kicad projects too not just freecad.


> in readme.md somehow

In GitHub repo its impossible to insert interactive <iframe> into Markdown files (and wiki, comments in issues and pulls).[0]

But for GitHub Pages site it might works (just use HTTPS).[1]

[0] https://debug.to/5532/how-to-embed-iframe-in-github

[1] https://stackoverflow.com/questions/48612913/simple-iframe-i...


I have links to youtube videos with a big thumbnail. That's good enough. Similarly a static image that links to an interactive viewer is good enough. All that's needed is a way to have the viewer launch with the model loaded, ie pass it the address to the fcstd or step file.

There is actually an STL viewer already in github, and it even shows visual diffs, but I never get to use it because I consider STL to be an output format that I don't want in my source repos, only in release assets.

But the fcstd file is the source, so a direct viewer for that is awesome.

For kicad... it would require exporting to step and having the step be available somewhere, but it would be worth it for some projects.


Which open-source formats are equivalent of the Soliworks part (.SLDPRT) and assembly (.SLDASM)?


I'm not sure about all open-source CAD apps, but FreeCAD files (.FCStd) and SolveSpace files (.SLVS) could be both part and assembly same time.

Even more, FCStd-file is more like a project container file, that may include parts, assemblies and other data (images, templates, etc.) imported into project.


To add to what app4soft said, assemblies are not a thing in FreeCAD. There are multiple addons that add that capability though.


Loads fast. Does it not include all of OCCT?


There are diagrams of bundle analyzer:[0]

BTW, May You finally unban me in SolveSpace repo? Its a year already.

[0] https://github.com/kovacsv/Online3DViewer/issues/357


It uses occt-import-js that compiles only a minimal set of code from OCCT to open step, iges and brep files.

https://github.com/kovacsv/occt-import-js


Kicad 3dshape format when? :)


> Kicad 3dshape format when?

Create a feature request:[0]

[0] https://github.com/kovacsv/Online3DViewer/issue


* Correct link to issues tracker: https://github.com/kovacsv/Online3DViewer/issues


Great work




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: