Welcome to machinehub¶
Contents:
machinehub¶
Todo
TODO
Getting started¶
Todo
TODO
Create a folder with the name hello_world and save all the following files inside.
Open FreeCAD and create a new document.

Create a cube.

Save the document as hello.fcstd.

You can navigate the Cube info, for example, change the Cube Label to “hello_cube”.

You can see all the editable paramaterers in the python terminal.

Save the project.

Create a machine script hello_world.py.
import sys
FREECADPATH = '/usr/lib/freecad/lib/'
sys.path.append(FREECADPATH)
import FreeCAD
import Mesh
import os
def machinebuilder(length, width, height, file_path):
document = os.path.abspath("hello.fcstd")
#-- Open document
doc = FreeCAD.openDocument(document)
#-- Edit parameters
cube = None
for figure in doc.Objects:
if figure.Label == 'hello_cube':
cube = figure
if cube:
cube.Length = length
cube.Height = height
cube.Width = width
doc.recompute()
#-- Export the file
Mesh.export([cube], file_path)
and a machinefile.txt
[doc]
-title-
Hello World Cube
-description-
A simple CUbe
-images_url-
http://d33y93cfm0wb4z.cloudfront.net/coloringimages/3D_shapes/444x271/cube_447x271.jpg
[inputs]
int(length=50)
float(width=50)
int(height=50)
Now, you should have a folder tree like the following.
hello_world/
├── hello.fcstd
├── hello_world.py
└── machinefile.txt
Create a hello_world.zip file with all the files and Upload the machine.
Release notes¶
Todo
TODO
Developer Zone¶
Installation¶
System dependencies¶
Install FreeCAD.¶
# Install FreeCAD
sudo add-apt-repository ppa:freecad-maintainers/freecad-stable
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install freecad freecad-doc
Install Docker.¶
# Install Docker
sudo apt-get install wget
wget -qO- https://get.docker.com/ | sh
Create a Docker group.¶
Warning
Warning: The docker group is equivalent to the root user.
# Create a Docker group
sudo usermod -aG docker YOUR_USER_NAME
Python requirements¶
cd machinehub
sudo -H pip install -r requirements.txt
Execute machinehub¶
Build the machinehub docker image to use as base to the machine images.
cd machinehub/machinehub/docker/
docker build -t machinehub .
Launch the webapp.
cd machinehub
python launcher.py
Configure machinehub¶
If you want to change the address or the admin info, edit ~/.machinehub/machinehub.conf yo chage the address, port, or the admin info.
[server]
host: 127.0.0.1
port: 5000
[users]
admin: admin #user: password
Try Machinehub¶


Select all the machine .zip files.

Clic in the blue upload button and machinehub will redirect your browser to the home page with the machines. loaded
