Skip to content

TrevorDArcyEvans/solve-space-web

Repository files navigation

SolveSpace in a web browser

Firefox

Background

SolveSpace

SolveSpace is an open source, parametric 2d/3d CAD program.

Major features include:

  • constraint based sketcher
  • variety of solid modelling methods
  • parametric and associative assembly
  • various analyses of sketch and solid model
  • export to various raster, 2D and 3D formats

It is written in C++ and runs on multiple platforms which support OpenGl eg, Windows, OSX and Linux.

Web Edition

In mid-2018, an Experimental SolveSpace Web Edition was released here.

This repository is an archive of files at the the above location.

Prerequisites

  • browser which supports web assembly (Chrome + Firefox)
  • python3

Getting started

git clone https://github.com/TrevorDArcyEvans/solve-space-web.git
cd solve-space-web
./servewasm.py

open SolveSpace Web Edition

Building SolveSpace Web Edition

Based on instructions here

Install prerequisites

sudo apt install git build-essential cmake

Install emscripten

Open emscripten window

# Get the emsdk repo
git clone https://github.com/emscripten-core/emsdk.git

# Enter emscripten directory
cd emsdk

# Fetch the latest version of the emsdk (not needed the first time you clone)
git pull

# Download and install the latest SDK tools.
./emsdk install latest

# Make the "latest" SDK "active" for the current user. (writes .emscripten file)
./emsdk activate latest

# Activate PATH and other environment variables in the current terminal
source ./emsdk_env.sh

Build

In an emscripten window, from above step:

git clone https://github.com/solvespace/solvespace
cd solvespace

# 'Web Edition' code is on a branch
git checkout emscripten

git submodule update --init
mkdir build
cd build
emcmake cmake .. -DCMAKE_BUILD_TYPE=Debug
make

Issues

  • still experimental
  • file open/save/export/import causes a crash

Further work

  • how to build from source
  • fix/avoid crashes
  • implement open/save/export/import

About

SolveSpace but in a web browser

Topics

Resources

License

Stars

Watchers

Forks

Languages