All Projects → benardt → JScad2d

benardt / JScad2d

Licence: Apache-2.0 license
Javascript Library for CAD 2D drawing from json file

Programming Languages

Jupyter Notebook
11667 projects
javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to JScad2d

Cavaliercontours
2D polyline library for offsetting, combining, etc.
Stars: ✭ 135 (+440%)
Mutual labels:  cad, 2d
Qcad
QCAD - The Open Source 2D CAD. QCAD is a cross-platform CAD solution for Windows, macOS and Linux. It supports the DXF format and optionally the DWG format (through a proprietary plugin).
Stars: ✭ 768 (+2972%)
Mutual labels:  cad, 2d
astar-gridmap-2d
A* algorithms for 2D gridmaps. The fastest one, until you prove me wrong
Stars: ✭ 43 (+72%)
Mutual labels:  2d
SuperCTF
A multiplayer capture the flag game made in Godot with love and blood. Running live at www.superctf.com
Stars: ✭ 26 (+4%)
Mutual labels:  2d
libcg
The tiny C library of 2D computer graphics.
Stars: ✭ 80 (+220%)
Mutual labels:  2d
Limbo
Library for VLSI CAD Design Useful parsers and solvers' api are implemented.
Stars: ✭ 84 (+236%)
Mutual labels:  cad
cadnano2
Cadnano2
Stars: ✭ 23 (-8%)
Mutual labels:  cad
game-map-editor
game-map-editor
Stars: ✭ 17 (-32%)
Mutual labels:  2d
visual-heatmap
Open source javascript module for high performance, large scale heatmap rendering.
Stars: ✭ 21 (-16%)
Mutual labels:  2d
sokol gp
Minimal modern efficient cross platform 2D graphics painter in C
Stars: ✭ 228 (+812%)
Mutual labels:  2d
SchrodingerWellPython
2D 3D Time independent FDM Schrodinger equation solver for arbitrary shape of well
Stars: ✭ 21 (-16%)
Mutual labels:  2d
gdstk
Gdstk (GDSII Tool Kit) is a C++/Python library for creation and manipulation of GDSII and OASIS files.
Stars: ✭ 171 (+584%)
Mutual labels:  cad
AntSimulator
Simple Ants simulator
Stars: ✭ 1,939 (+7656%)
Mutual labels:  2d
pykicad
Library for working with KiCAD file formats
Stars: ✭ 46 (+84%)
Mutual labels:  cad
Py3ODE
Port of PyODE for Python 3
Stars: ✭ 29 (+16%)
Mutual labels:  2d
flowwie-freecad
Flowwie's FreeCAD ressources for everybody to learn computer aided design with the Open Source CAD software FreeCAD.
Stars: ✭ 214 (+756%)
Mutual labels:  cad
vivid.ex
Vivid is a simple 2D rendering library written in Elixir.
Stars: ✭ 27 (+8%)
Mutual labels:  2d
foxtrot
A fast, experimental STEP file viewer
Stars: ✭ 151 (+504%)
Mutual labels:  cad
Pyslvs-UI
An open source planar linkage mechanism simulation and mechanical synthesis system.
Stars: ✭ 130 (+420%)
Mutual labels:  2d
CadZinho
Minimalist computer aided design (CAD) software
Stars: ✭ 75 (+200%)
Mutual labels:  cad

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

  • Full parametric modeling
  • Draw any shape (print squeleton for debug)
  • Make fillet
  • Fill shape with hatch
  • Draw dimensions
  • Apply transformation
    • Rotate
  • Import from local drive or server
  • Export on local drive with format:
    • JSON (native format)
    • SVG

Usage

API Reference

  • JScad2d.loadFileAsText()
  • JScad2d.readfile(url)
  • JScad2d.zoomandpan(value)
    • value for zoom: zoomIn or zoomOut or reset
    • value for pan: left or right or up or down
  • JScad2d.displayClassToggle('dim' or 'ptsfillet' or 'squeleton')
  • JScad2d.drawOrigin()
  • JScad2d.doDebug()

Code example

Add JS libraries and style sheets links inside HEAD tag:

<head>
    <link rel="stylesheet" type="text/css" href="./jsoneditor/jsoneditor.min.css">
    <link rel="stylesheet" type="text/css" href="./jscad2d/JScad2d.css">
    <script src="./svg-pan-zoom/svg-pan-zoom.js"></script>
    <script src="./jsoneditor/jsoneditor.min.js"></script>
    <script src="./jscad2d/JScad2d.js"></script>
</head>

JSON file description for PART

  • Header {}
    • Type: part
    • Name
    • Title
    • Unit
  • Parameters{}
  • Views[]
    • [] {}
      • Header {}
        • Name
        • Origine {}
          • x
          • y
        • Hatch {}
      • Lines []
        • [] {}
      • Stroke
      • Start {}
      • End {}
      • Shapes []
        • [] {}
          • Fill
      • Points []
        • [] {}
          • x
          • y
          • length
          • angle
          • r
  • Format{}
  • Dimensions[]

JSON file description for ASSY

  • Header {}
  • Type: assy
  • Name
  • Title
  • Page size
  • Unit
  • Parameters[]
  • Parts[]
    • Name
    • View
    • Origine{}
    • Transformation{}
  • Dimensions[]

Dependencies

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].