speckle_connector/converter/to_speckle.rb
# get an array of face indices from a sketchup polygon mesh
get an array of face indices from a sketchup polygon mesh
get an array of face indices from a sketchup polygon mesh
def mesh_faces_to_array(mesh, offset = 0)
    faces = []
    mesh.polygons.each do |poly|
      faces.push(
        poly.count, *poly.map { |index| index.abs + offset }
      )
    end
    faces
  end
def mesh_faces_to_array ( mesh , offset = 0 ) faces = [ ] mesh . polygons . each do | poly | faces . push ( poly . count , * poly . map { | index | index . abs + offset } ) end faces end
get an array of face indices from a sketchup polygon mesh
get an array of face indices from a sketchup polygon mesh
mesh
offset