speckle_connector/converter/to_speckle.rb
# get an array of face indices from a sketchup polygon mesh INCLUDING negative indices for hidden meshes
get an array of face indices from a sketchup polygon mesh INCLUDING negative indices for hidden meshes
get an array of face indices from a sketchup polygon mesh INCLUDING negative indices for hidden meshes
def mesh_faces_with_edges_to_array(mesh, offset)
    faces = []
    mesh.polygons.each do |poly|
      faces.push(
        poly.count, *poly.map { |index| index.positive? ? index + offset : index - offset }
      )
    end
    faces
  end
def mesh_faces_with_edges_to_array ( mesh , offset ) faces = [ ] mesh . polygons . each do | poly | faces . push ( poly . count , * poly . map { | index | index . positive? ? index + offset : index - offset } ) end faces end
get an array of face indices from a sketchup polygon mesh INCLUDING negative indices for hidden meshes
get an array of face indices from a sketchup polygon mesh INCLUDING negative indices for hidden meshes
mesh
offset