@plastichub/osr-cad

Common CAD tools for OSR(OpenSourceRecycling)

Usage no npm install needed!

<script type="module">
  import plastichubOsrCad from 'https://cdn.skypack.dev/@plastichub/osr-cad';
</script>

README

OSR CAD Tools

This is a CLI(CommandLineInterface) toolset to convert 3D files, using Solidworks and other software.

Requirements

  1. Node-JS
  2. Install Git (and the tools!) (Make sure you enable Linux tools on Windows console)
  3. Solidworks 2020. In case you are using another version, please find on your disc 'SolidWorks.Interop.sldworks.dll' and replace the one in ./sw

Optional requirements (for any image/raster conversion related commands)

Installation


git clone https://gitlab.com/plastichub/osr/osr-convert-cad.git
cd osr-convert-cad
npm i

# or 

npm i @plastichub/osr-cad -g

Usage

Open a terminal and run this:

osr-cad --help (RTFM)

See more in ./Examples.md

References

Todos

  • Select default views via CLI Argument
  • Arg: Skip suppressed | hidden (difficult since it's out of part file scope, check explorer api ) | dry mode
  • Arg: Overwrite files
  • Arg: skip non OSR parts
  • Arg: displaymode : wireframe, shaded, ... (see SW Docs)
  • report
  • export as lib
  • Multi view (trainings data for @plastichub/part-detector)
  • Speed: use same instance for multiple exports
  • Context Menu Shell Extension (@osr-tools)
  • Local/Global config (=>osrl)
  • [-] Report templates
    • xls
    • md
    • txt
  • [-] Plugin interface for custom format (chained) => osrl
  • Conversions
  • STEP -> SLDPRT (via xad->fc)
  • any -> 3dxml (osrl!)
  • any -> html (via edrawings)

Commands

  • Solidworks
  • [-] Set system wide options for JPG output
  • [-] Set system wide options for PDF output
  • [-] Directory index (=>osrl)
  • arg: local HTML path/dir offset
  • arg: generate UNC paths
  • format: PDF
  • [-] arg: sw drawing/BOMs to CSV/xls
  • Part/Sub-Assembly web(&local) compilation/index (=>osrl)
  • [-] Web directory (xeokit)

Lib

  • SW: 4view single image

Issues

  • Incorrect JPG output with sw2020

Utils