benardt / JScad2d

Javascript Library for CAD 2D drawing from json file
Apache License 2.0
42 stars 9 forks source link
2d cad javascript json

Code Grade

JScad2d

Javascript Library for CAD 2D drawing from json file. A JSON file includes all data needed to draw paramateric 2D shape as vector image. Export in JSON file or in SVG file.

Test here the live demo

Screenshots

Global view

Description

Draw parts and assemble them in an assembly drawing. Parts and Assy drawing are built from json file. A special editor allows live drawing.

NOTE: assembly functionality not yet coded!

Features

Usage

API Reference

Code example

Add JS libraries and style sheets links inside HEAD tag:

<head>
    <link rel="stylesheet" type="text/css" href="https://github.com/benardt/JScad2d/blob/master/jsoneditor/jsoneditor.min.css">
    <link rel="stylesheet" type="text/css" href="https://github.com/benardt/JScad2d/blob/master/jscad2d/JScad2d.css">
    <script src="https://github.com/benardt/JScad2d/raw/master/svg-pan-zoom/svg-pan-zoom.js"></script>
    <script src="https://github.com/benardt/JScad2d/raw/master/jsoneditor/jsoneditor.min.js"></script>
    <script src="https://github.com/benardt/JScad2d/raw/master/jscad2d/JScad2d.js"></script>
</head>

JSON file description for PART

JSON file description for ASSY

Dependencies