Code Monkey home page Code Monkey logo

laserfile's Introduction

process directory

The Process directory contains four python files

  • order_reverse.py: reverse the order of two points in the sublist. (not necessary when points are arranged in order)

  • plot_segment.py: Interpolates between given points with a consistent spacing. If the input list contains only two points, it linearly interpolates between them. If the input list contains more than two points, it uses B-spline interpolation. Then it project the 3D coordinates onto a 2D plane based on the normal vector of the shape. Lastly, upscale to the ilda coordinate system and output to a json file in specific format.

      each point is formatted as: 
      {
          "segment": 0,
          "x": -5772.550179748316,
          "y": -30000.0,
          "color": 0,
          "blanking": true
      }
    
  • *Path2.py: Insert interpolated points between two points with different segment values, blanking of every interpolated points is set to true.

  • *process.py: Assemble all the functions in all other three python file, generate a json file as outputs

Usage: In the process directory, open process.py file, in the process("input file path", "output file path") function at the very bottom, change the input file, output file path accordingly.

Ex: process("/Users/mrweilin/Desktop/Research/New_floor/revise_new_floor.json", "/Users/mrweilin/Desktop/Research/New_floor/final_new_floor.json")   

laser directory

laser-dac-master/packages/ilda-reader

  • test.ts: read in a ilda file and convert it to array of point (use "> output.json" to store the output to a json file)

      const buffer = fs.readFileSync('file.ild');
    

laser-dac-master/packages/ilda-writer

  • test.ts: read in a json file and convert it to a ilda file

      const data = fs.readFileSync('input.json', 'utf8');
      fs.writeFileSync('output.ild', b);
    

laserfile's People

Contributors

wouyang2 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.