FreeCAD packaged for web similar to onshape

A forum for research and development of the user interface of FreeCAD
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
mmiscool
Posts: 73
Joined: Sun Dec 18, 2016 9:07 pm
Location: Connecticut
Contact:

FreeCAD packaged for web similar to onshape

Post by mmiscool »

Hey,
Had a fun few days packaging free cad up and doing some web servery things. Should have a package published here soon

Currently have gotten the following things working.
Streaming session FreeCAD to the browser.
HTML user interface with ribbon style tool bar configuration and tool to customise that interface.
Build scripts tested on Debian and Ubuntu 18.04.
Works in Firefox or chrome. Chrome has one known bug at the moment.
Uses the latest stable versions of the FreeCAD package.
Runs entirely in docker.

Just wanted to guage community interest in such a package.

-Mike
My main project is https://autodrop3d.com
Effort on https://github.com/mmiscool/FC-Docker FreeCAD for cloud with browser based access has been discontinued in favor of focused development on https://github.com/xibyte/jsketcher
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: FreeCAD packaged for web similar to onshape

Post by Kunda1 »

mmiscool wrote: Thu Jan 09, 2020 6:49 am Just wanted to guage community interest in such a package.
Sounds great. Over the years, even before I arrived, many folks have done this.
Are you planning to release this open source ?
mmiscool wrote: Thu Jan 09, 2020 6:49 am Had a fun few days packaging free cad up and doing some web servery things.
'
JFYI it's 'FreeCAD' not 'free cad'
"having fun packaging FreeCAD" (whatever floats your boat :lol: )... Maybe you could consider helping us out in the Packaging Forum ? https://forum.freecadweb.org/viewforum.php?f=42
There is also an effort to create a FreeCAD development docker container, see issue #3821 maybe that would interest you as well ?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
mmiscool
Posts: 73
Joined: Sun Dec 18, 2016 9:07 pm
Location: Connecticut
Contact:

Re: FreeCAD packaged for web similar to onshape

Post by mmiscool »

Ok.
The following link is a zip file for the package I have been working on. Please note. This is a very early snapshot of a dev environment not intended to really be used but just an example to show the possibilities. I do not have all of the GUI commands linked to the right icons yet. That will Just take some time and patience.

If you do end up testing spinning a part using 2 buttons on the mouse at the same time only works in firefox. Not chrome at the moment. Every thing else should work in chrome.

Here are some screen shots! If they look a little weird keep in mind I am running on a chromebook.
Screenshot 2020-01-10 at 12.41.56 AM.png
Screenshot 2020-01-10 at 12.41.56 AM.png (771.21 KiB) Viewed 2175 times
Screenshot 2020-01-10 at 12.41.41 AM - Edited.png
Screenshot 2020-01-10 at 12.41.41 AM - Edited.png (241.51 KiB) Viewed 2175 times




Build instructions
If you are familiar with how to work docker you can do the following commands to get a server up and running real quick.

Code: Select all

git clone https://github.com/mmiscool/FC-Docker.git
cd FC-Docker
./build-run.sh 
This will work on ubuntu 18.04 and debian9 so long as you have docker installed.

If you do not run your own docker server the same commands can be used to get a container running FreeCAD with a browser based interface on https://labs.play-with-docker.com/
That web site lets you play with docker containers for free. Just sign up and it gives you a console to play in.

Once it is done building click the port 80 link as shown in attached screen shot.

That web site will let you run a temporary docker container for 4 hours.
The first time you run a build it will take a few minuets to complete.
Screenshot 2020-01-10 at 12.45.41 AM (1).png
Screenshot 2020-01-10 at 12.45.41 AM (1).png (330.25 KiB) Viewed 2175 times
Last edited by mmiscool on Tue Jan 14, 2020 5:38 am, edited 4 times in total.
My main project is https://autodrop3d.com
Effort on https://github.com/mmiscool/FC-Docker FreeCAD for cloud with browser based access has been discontinued in favor of focused development on https://github.com/xibyte/jsketcher
User avatar
mmiscool
Posts: 73
Joined: Sun Dec 18, 2016 9:07 pm
Location: Connecticut
Contact:

Re: FreeCAD packaged for web similar to onshape

Post by mmiscool »

I updated the previous post for the URL of the package. There was a small problem with the first build I posed so if you got it before I updated you will want to rebuild it again.
My main project is https://autodrop3d.com
Effort on https://github.com/mmiscool/FC-Docker FreeCAD for cloud with browser based access has been discontinued in favor of focused development on https://github.com/xibyte/jsketcher
User avatar
pablogil
Posts: 881
Joined: Wed Nov 26, 2014 3:19 pm
Location: Badajoz (Spain)
Contact:

Re: FreeCAD packaged for web similar to onshape

Post by pablogil »

Awesome!!
My dreams come true!
Really, I was expecting this as the best update that FreeCAD can ever have... run it inside the browser (ala OnShape) would make it worldwide relevant.

Well, I'm going to try it out.

PS - I'm web designer and responsible of FreeCAD stylesheets (themes) among other things so I am very interested in helping you with the look and feel of this FreeCAD web app.
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
User avatar
mmiscool
Posts: 73
Joined: Sun Dec 18, 2016 9:07 pm
Location: Connecticut
Contact:

Re: FreeCAD packaged for web similar to onshape

Post by mmiscool »

Hello pablogil,
Styling this thing would be great.
I prefer to chat via google hangouts or phone when collaborating with folks.

If you want to send me a PM through here.

Also from your testing did it seem that it was working ?
My main project is https://autodrop3d.com
Effort on https://github.com/mmiscool/FC-Docker FreeCAD for cloud with browser based access has been discontinued in favor of focused development on https://github.com/xibyte/jsketcher
User avatar
pablogil
Posts: 881
Joined: Wed Nov 26, 2014 3:19 pm
Location: Badajoz (Spain)
Contact:

Re: FreeCAD packaged for web similar to onshape

Post by pablogil »

Yes, it's working through online docker container:
Captura de pantalla 2020-01-10 a las 10.56.28.png
Captura de pantalla 2020-01-10 a las 10.56.28.png (497.03 KiB) Viewed 2130 times
It would be nice to chat or communicate in order to make this happen, my available time is reduced so be patient, please.

One question: is Docker project open source? I don't know if this would become a dead end for real FreeCAD development...
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
User avatar
kwahoo
Posts: 680
Joined: Fri Nov 29, 2013 3:09 pm
Contact:

Re: FreeCAD packaged for web similar to onshape

Post by kwahoo »

Works for me on Kubuntu 19.10 without any issues. Does it use VNC to stream 3D view and sidebar?

AFAIK Onshape uses a different method - it has a complete WebGL-based client side.
User avatar
mmiscool
Posts: 73
Joined: Sun Dec 18, 2016 9:07 pm
Location: Connecticut
Contact:

Re: FreeCAD packaged for web similar to onshape

Post by mmiscool »

I am fairly certain that last I checked onshape was streaming to the browser client and not using webGL.

I will be posting an update tonight with an intuitive tool bar editor and other changes.

Should be fun.
My main project is https://autodrop3d.com
Effort on https://github.com/mmiscool/FC-Docker FreeCAD for cloud with browser based access has been discontinued in favor of focused development on https://github.com/xibyte/jsketcher
User avatar
dcapeletti
Posts: 504
Joined: Wed Jul 23, 2014 2:27 pm

Re: FreeCAD packaged for web similar to onshape

Post by dcapeletti »

Hi, this sounds very interesting. How can I try this? Can I try it online or do I have to download and install it on my computer?

If I have to download it, I would like to know the installation instructions.

Thanks :)
Locked