/IDF2OpenSCAD

a javascript to convert IDF data into openscad file

Primary LanguageJavaScript

IDF2OpenSCAD

this is a javascript using p5.js library (rarely) to convert two files from IDF (Intermediate Data Format) to an editable OpenScad document. It adheres to Version 3.0 (from October 1996) which is still quite common.

Progress

Board, Panel File

Header

Board Outline

the board outline coordinates are put into an array. Wherever there is an arc it is translated into polygons in the .scad code. So the resolution the users sets via $fn, $fs or $fr is used.
  • thickness -linear_extrude(thickness)
  • outline polygon - polygon([[x1,y1],[x2,y2],...,[xn,yn]])
  • embedd arcs in outline - via arcGen Function in openscad code
  • circles - tbd
  • cutouts -tbd

Drilled Holes

Drilled holes are substracted from the outline polygon before extrusion.
  • diameter - circle(dia)
  • coordinates - translate([x,y])
  • plating - tbd
  • associated part - tbd
  • hole type - if (type!=VIA) - vias filtered out because of performance reasons
  • owner - ignored

Placement

Parts are placed at their respective coordinates with an extruded polygon created out of the part description file (.emp or .lib)
  • package name - tbd
  • part number - tbd
  • redDes - tbd
  • coordinates and Offset - translate([x,y,Offset])
  • rotation Angle - rotate(angle)
  • side of the board - mirror([0,0,1])
  • status - tbd

    other Outlines

    • Panel Outline -tbd
    • Other Outline -tbd

    Areas

    • Route Outline
    • Place Outline
    • Via Keepout
    • Place KeepOut
    • Place Group
    • Place Region

    other

    • Notes

    library file