[Help wanted] FreeCAD in web browser project. Its not Onshape! And its working.

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
mmiscool
Posts: 73
Joined: Sun Dec 18, 2016 9:07 pm
Location: Connecticut
Contact:

[Help wanted] FreeCAD in web browser project. Its not Onshape! And its working.

Post by mmiscool »

Hello,

This is a proper announcement about a project I have been working on for the past week or so.
Had a thread going but was probably in the wrong section (https://forum.freecadweb.org/viewtopic. ... 49#p360549).

The goal of this project is to package FreeCAD to be used via a web browser. It uses docker to package every thing and make deployment easy.

I will be updating this post with the latest build instructions. If any one wants to collaborate let me know here.
Source is up on github https://github.com/mmiscool/FC-Docker

Bugs should be reported via github. Discussion of features or improvements can happen here.


**** Help Wanted **** Short video showing it off.
phpBB [video]
Screenshot 2020-01-15 at 6.33.02 AM.png
Screenshot 2020-01-15 at 6.33.02 AM.png (369.34 KiB) Viewed 6465 times

To run it your self just run the following commands on your Ubuntu or Debian that has docker installed.
These same commands will work on the free docker playground available at https://labs.play-with-docker.com/
The docker playground will let you spin up a docker server in the cloud and run it for 4 hours at a time.

Code: Select all

git clone https://github.com/mmiscool/FC-Docker.git
cd FC-Docker
./build-run.sh 

If you do end up using https://labs.play-with-docker.com/ once the thing is done building you can open the web page by clicking the port 80 link as shown in the attached picture.
1.png
1.png (330.25 KiB) Viewed 6465 times
Last edited by mmiscool on Sat Jan 18, 2020 1:02 pm, edited 2 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
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: FreeCAD in web browser project. Its not Onshape! And its working.

Post by vocx »

My suggestion is to start small. Do not expose every single workbench to start, it's going to be too much unneeded information.

For example, Drawing is obsolete, Complete is empty, and Ship, Plot, Robot, are unmaintained, so there is no need to expose them. Ship and Plot are not even built by default any more, and their code now lives outside of the main FreeCAD repository.

So, my advice is concentrate on making the interface work with Part. Just create basic solids and their boolean operations. Then move on to PartDesign. If these work well, then you can try the rest of the workbenches.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: FreeCAD in web browser project. Its not Onshape! And its working.

Post by triplus »

Nice project.
User avatar
mmiscool
Posts: 73
Joined: Sun Dec 18, 2016 9:07 pm
Location: Connecticut
Contact:

Re: FreeCAD in web browser project. Its not Onshape! And its working.

Post by mmiscool »

Is there a more or less official list of the workbenches I should exclude or a list of workbenches I should include?
vocx wrote: Wed Jan 15, 2020 4:42 pm My suggestion is to start small. Do not expose every single workbench to start, it's going to be too much unneeded information.

For example, Drawing is obsolete, Complete is empty, and Ship, Plot, Robot, are unmaintained, so there is no need to expose them. Ship and Plot are not even built by default any more, and their code now lives outside of the main FreeCAD repository.

So, my advice is concentrate on making the interface work with Part. Just create basic solids and their boolean operations. Then move on to PartDesign. If these work well, then you can try the rest of the workbenches.
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
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: FreeCAD in web browser project. Its not Onshape! And its working.

Post by vocx »

mmiscool wrote: Wed Jan 15, 2020 8:35 pm Is there a more or less official list of the workbenches I should exclude or a list of workbenches I should include?
Why are you bottom quoting? That is horrible!

There is no official list but the Part Workbench is the most essential one, as it's the one that provides the underlying code to create Shapes in the software. Thus why I suggest this one and PartDesign, which basically has the same functions as Part to create solids, but uses the feature editing paradigm and the concept of the PartDesign Body to group different operations (PartDesign Features).

I'm just telling you this because I don't want you to waste development time getting, say, Drawing Workbench to work. There's no point; this workbench is obsolete.

So, I think if you can make this work for Part and PartDesign, then it'd be easy to add Draft, Arch, FEM, Mesh, Path, Sketcher, TechDraw. I think these are the more important workbenches.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
User avatar
mmiscool
Posts: 73
Joined: Sun Dec 18, 2016 9:07 pm
Location: Connecticut
Contact:

Re: FreeCAD in web browser project. Its not Onshape! And its working.

Post by mmiscool »

Thanks. Git hub link has been updated with the following.

Made web UI grey out icons that are not enabled in the UI. For context selection, ect.

Excluded all of the work benches except the following:
  • A2plus
  • Part
  • PartDesign
  • Draft
  • Fem
  • Mesh
  • Spreadsheet
  • Sketcher
Been playing with A2plus. It seems to be the least crashy of the FreeCAD assembly work benches.

Set up toolgroups and icons for the following workbenches:
  • A2plus
  • PartDesign
  • Sketcher
  • Spreadsheet



Other work benches are present but toolbar groups have not been set up for them.

If any one would like to take a crack at setting up tool groups for the Fem and Part work benches I would be grateful.
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 in web browser project. Its not Onshape! And its working.

Post by dcapeletti »

Good project. How do I stop the program? There should be some stop.sh
User avatar
mmiscool
Posts: 73
Joined: Sun Dec 18, 2016 9:07 pm
Location: Connecticut
Contact:

Re: FreeCAD in web browser project. Its not Onshape! And its working.

Post by mmiscool »

Hey dcapeletti.
if you are talking about killing the docker container in the ./build-run.sh there is a line at the beginning that kills the container before building and starting it again.

Code: Select all

sudo docker ps -q --filter ancestor="kewl" | xargs -r sudo docker stop
I could really use some help going through and linking all the broken icons along with configuring and setting up the tool bar pallets. Is that some thing you might be willing to help with?

If you would like to chat about how the project is set up and what files do what I would be happy to hop on a google hang outs or skype to walk you or multiple people through it. I have a skype name of bobobob10
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 in web browser project. Its not Onshape! And its working.

Post by dcapeletti »

Hey, thanks a lot for your help.
I could really use some help going through and linking all the broken icons along with configuring and setting up the tool bar pallets. Is that some thing you might be willing to help with?
At the moment I'm busy with other things in my life, but I'd love to be able to do that later.

I have a few questions:
1- what framework do you use to build the front end?
¿vuejs, react or other?

2- What technology do you use as a back end server?
Python, nodejs or other?

It would be important that I draw some slides explaining which technologies it uses, what function they fulfill and how it relates them so that they all work together. That is, draw them as layers to understand what each one of them does, how they are delegated and receive requests, what patterns they use. I mean the architecture of the project itself.

And I'm sorry, my native language is Spanish, I don't speak English haha.

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

Re: [Help wanted] FreeCAD in web browser project. Its not Onshape! And its working.

Post by dcapeletti »

I was looking at your index.html and I see that you use jquery, I think it's better that you go to a framework like vuejs. See https://vuejs.org/
Post Reply