FreeCAD packaged for web similar to onshape

A forum for research and development of the user interface of FreeCAD

Moderator: agryson

User avatar
dcapeletti
Posts: 423
Joined: Wed Jul 23, 2014 2:27 pm

Re: FreeCAD packaged for web similar to onshape

Postby dcapeletti » Sat Jan 11, 2020 12:59 pm

mmiscool wrote:
Fri Jan 10, 2020 5:53 am
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.pngScreenshot 2020-01-10 at 12.41.41 AM - Edited.png





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

wget https://transfer.sh/14Otgv/FC-Docker.zip
unzip FC-Docker.zip
cd FC-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

I'm in this interface but I get an error when downloading with wget. I could use some help. Thanks
Attachments
FreeCAD web.png
FreeCAD web.png (99.41 KiB) Viewed 245 times
kwahoo
Posts: 263
Joined: Fri Nov 29, 2013 3:09 pm
Contact:

Re: FreeCAD packaged for web similar to onshape

Postby kwahoo » Sat Jan 11, 2020 1:58 pm

mmiscool wrote:
Sat Jan 11, 2020 2:29 am
I am fairly certain that last I checked onshape was streaming to the browser client and not using webGL.
Does not seem so:
The client doesn’t receive pre-rendered images (as in the screen-scraping scenario), nor does it receive whole CAD models with precise geometry. Rather, its graphics are all in the form of triangles, rendered with WebGL (in browsers) or OpenGL (for mobile apps). Rather than using one of the third-party scenegraph libraries, we use our own custom renderers, with our own custom capabilities, and with the speed we need to display large models.
https://www.onshape.com/cad-blog/under- ... eally-work

Every approach has some (dis)advantages. Streaming does not need fast client hardware but introduces a lot of latency. But, because it is a hot topis right now, some big companies are making research or reducing streaming latency. Have you seen Stadia Streaming Tech: A Deep Dive (Google I/O'19)?
User avatar
mmiscool
Posts: 63
Joined: Sun Dec 18, 2016 9:07 pm
Location: Connecticut
Contact:

Re: FreeCAD packaged for web similar to onshape

Postby mmiscool » Sat Jan 11, 2020 2:01 pm

Hello.
It seems the file hosting service I was using is down.

I updated the list of commands in the post you referenced. Should be working now.

Did a bunch more work on this thing. Made a little video showing how to get it set up. Please keep in mind this is about a weeks worth of hacking around. It is not some thing that is any thing close to production ready.

phpBB [video]
My main project is https://autodrop3d.com
Working on https://github.com/mmiscool/FC-Docker FreeCAD for cloud with browser based access.
User avatar
dcapeletti
Posts: 423
Joined: Wed Jul 23, 2014 2:27 pm

Re: FreeCAD packaged for web similar to onshape

Postby dcapeletti » Sat Jan 11, 2020 3:18 pm

It's really very interesting. I hope you can keep hacking the web interface.
Later on I would like to be able to install this on a server of my own.

Greetings
User avatar
mmiscool
Posts: 63
Joined: Sun Dec 18, 2016 9:07 pm
Location: Connecticut
Contact:

Re: FreeCAD packaged for web similar to onshape

Postby mmiscool » Sat Jan 11, 2020 5:50 pm

Just did an update that makes it so that you don't have to click back in to the window to type. For example before when you clicked the dimension button from the tool bar you would have to click back in to the free cad dialog before being able to type. This limitation has been removed. File management has gotten a bit better.

I must say. Pretty happy with how this is turning out so far.
My main project is https://autodrop3d.com
Working on https://github.com/mmiscool/FC-Docker FreeCAD for cloud with browser based access.
User avatar
Kunda1
Posts: 6433
Joined: Thu Jan 05, 2017 9:03 pm

Re: FreeCAD packaged for web similar to onshape

Postby Kunda1 » Sat Jan 11, 2020 6:03 pm

This is pretty awesome looking.
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
dcapeletti
Posts: 423
Joined: Wed Jul 23, 2014 2:27 pm

Re: FreeCAD packaged for web similar to onshape

Postby dcapeletti » Sun Jan 12, 2020 10:03 am

Hi, are you planning to release your work as free or open source software?
Can I install the project on my server?

Thanks
User avatar
dcapeletti
Posts: 423
Joined: Wed Jul 23, 2014 2:27 pm

Re: FreeCAD packaged for web similar to onshape

Postby dcapeletti » Sun Jan 12, 2020 10:19 am

On the other hand some time ago I have been playing with 3D engines like babylonjs that drew directly the freecad objects in the browser without using VNC.

What the freecad server actually did was to rebuild the model into a mesh object to send to babylonjs every time it changed. It's a lot of work on the server for large models, but it worked. But this seems better to me as it uses vnc to take control of the freecad server.

I add a wish list for the project:
* That you can change the workbench from the same browser.
* That each user can manage his instance privately and can share it with multiple friends if he wants.
* To be able to upload models made in FreeCAD to display them in the browser.

I will continue publishing if I find some interesting features.

Thanks
User avatar
mmiscool
Posts: 63
Joined: Sun Dec 18, 2016 9:07 pm
Location: Connecticut
Contact:

Re: FreeCAD packaged for web similar to onshape

Postby mmiscool » Sun Jan 12, 2020 12:26 pm

I will be putting this out as open source of one type or another here soon.
I use components from lots of different projects so I would need to sort out a list of those project and there licences.

Because of how I am doing the packaging I think it should be fine to acknowledge the licences for the separate entities that my custom code talks with. For the code I developed and the docker file to build the image I am thinking of using https://www.gnu.org/licenses/agpl-3.0.en.html .
That would force any one who deploys as a public cloud service to release any modifications they did to it. It will either be that or just a simple standard MIT licence. I don't feel I am at the point of release yet either way. I have to automate the build process and dependency fetching first.

I did a bunch more work on this thing today. Really have some interesting things up and running now. Also been working on managing sessions and spin up/shutdown of these things on the fly. That way it can be deployed as a service with users and session management. This is really just a small portion of a much bigger goal.
My main project is https://autodrop3d.com
Working on https://github.com/mmiscool/FC-Docker FreeCAD for cloud with browser based access.
User avatar
easyw-fc
Posts: 2773
Joined: Thu Jul 09, 2015 9:34 am

Re: FreeCAD packaged for web similar to onshape

Postby easyw-fc » Sun Jan 12, 2020 12:37 pm

mmiscool wrote:
Sun Jan 12, 2020 12:26 pm
I will be putting this out as open source of one type or another here soon.
For the code I developed and the docker file to build the image I am thinking of using https://www.gnu.org/licenses/agpl-3.0.en.html .
That would force any one who deploys as a public cloud service to release any modifications they did to it.
I think GNU Affero GPL would be the best option to give the project a good chance to grow and keep people to contribute.