speckle_connector/converter/to_speckle.rb
# get a flat array of vertices from a sketchup polygon mesh
get a flat array of vertices from a sketchup polygon mesh
get a flat array of vertices from a sketchup polygon mesh
def mesh_points_to_array(mesh)
    pts_array = []
    mesh.points.each do |pt|
      pts_array.push(
        length_to_speckle(pt[0]),
        length_to_speckle(pt[1]),
        length_to_speckle(pt[2])
      )
    end
    pts_array
  end
def mesh_points_to_array ( mesh ) pts_array = [ ] mesh . points . each do | pt | pts_array . push ( length_to_speckle ( pt [ 0 ] ) , length_to_speckle ( pt [ 1 ] ) , length_to_speckle ( pt [ 2 ] ) ) end pts_array end
get a flat array of vertices from a sketchup polygon mesh
get a flat array of vertices from a sketchup polygon mesh
mesh