speckle_connector/converter/to_speckle.rb
# get a flat array of face indices from a sketchup face
get a flat array of face indices from a sketchup face
get a flat array of face indices from a sketchup face
def face_indices_with_edges_to_array(face, offset = 1)
    soft_edges = face.outer_loop.edges.map(&:soft?)
    face_array = [face.vertices.count]
    face_array.push(*face.vertices.count.times.map { |index| soft_edges[index] ? -(index + offset) : index + offset })
    face_array
  end
def face_indices_with_edges_to_array ( face , offset = 1 ) soft_edges = face . outer_loop . edges . map ( & :soft? ) face_array = [ face . vertices . count ] face_array . push ( * face . vertices . count . times . map { | index | soft_edges [ index ] ? - ( index + offset ) : index + offset } ) face_array end
get a flat array of face indices from a sketchup face
get a flat array of face indices from a sketchup face
face
offset