Trait colain::Segment [−][src]
Reinterpret [T; 4] as two points
use std::fs::File; use std::io::prelude::*; use colain::{ CLI, Segment, Point, clitype::* }; let mut buf: Vec<u8> = Vec::new(); File::open("example.cli").unwrap().read_to_end(&mut buf).unwrap(); let model = CLI::<LongCLI>::new(&buf).unwrap(); let x: f32 = model.iter().next().unwrap() // first layer .iter_hatches().next().unwrap() // first set of hatches in layer .iter().next().unwrap() // first segment in hatches .start() // first point in segment .x(); // x value of first point in segment