Drawing inWeb is a library that provides an API for working with dwg and dxf files directly in the browser.
The API is very close to the API of the desktop SDK but with some changes. Since this is only an alpha version, there may be performance issues or bugs. Please, if you find these, you can leave a report using the link: https://www.opendesign.com/support
Also, the documentation is not ready yet, so you can use the documentation for the desktop SDK. https://docs.opendesign.com/td/
!!! IMPORTANT !!! The current version is not intended for use in a ready-made solution. This is an beta version that is suitable for getting acquainted with the API of the new library and for creating prototypes.
Archive contains 2 directories:
Prepare protected server
Prepare examples for running
cd examples
npm install
npm start
Only one ProtectionServer is enough to operate. Upon request, a Drawing inWeb library is loaded into the browser through which you can download files and work with them. The library is available at the following link: http://127.0.0.1:5000/Files/DrawingWeb.js
python3 ODAProjectFileGenerator.py
main/build/platforms/emcc_linux.cfg
line <environment type="var" key="EMSCRIPTEN_ROOT_PATH">/emsdk/upstream/emscripten</environment>
release
(press Enter by default)emcc_linux
(press Enter by default)project will be generated to main/CMakePlatforms/emcc_linux
cd CMakePlatforms/emcc_linux
make -j4 DrawingWeb
project will be builded to main\bin\emcc_linux
You can use official emsdk manual
or use our quick start guide:
#Get the emsdk repo
git clone https://github.com/emscripten-core/emsdk.git
# Enter that 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 sdk-3.1.50-64bit
# Make the "latest" SDK "active" for the current user. (writes ~/.emscripten file)
./emsdk activate sdk-3.1.50-64bit
# Activate PATH and other environment variables in the current terminal
source ./emsdk_env.sh
# Check emsdk install correctly
emcc -v
If you have problems installing emsdk according to our brief instructions, then use the official emsdk installation documentation
Еhese dependencies are needed for the ODA perl project generator to work correctly
cmake install 3.12:
mkdir cmake
cd cmake
wget https://cmake.org/files/v3.12/cmake-3.12.1-Linux-x86_64.tar.gz
tar zxf cmake-3.12.1-Linux-x86_64.tar.gz
ln -s ./cmake-3.12.1-Linux-x86_64/bin/cmake /usr/bin/cmake
libs:
apt install -y build-essential git-core python default-jre wget libexpat1-dev make
*** Run with protection server ***
Copy DrawingWeb files:
DrawingWeb.js
and DrawingWeb.wasm
to InWeb.FileProtectionServer/src/InWeb.FileProtectionServer/Files
Compile server
InWeb.FileProtectionServer
(a folder that contains InWeb.FileProtectionServer.sln
file)dotnet build -c Release
Run server
cd src/InWeb.FileProtectionServer/bin/Release/net8.0
dotnet InWeb.FileProtectionServer.dll
then
npx http-server -p 3000 -cors -P http://localhost:5190/Files