speckle_connector/converter/to_speckle.rb
# convert a component instane to a speckle block instance
convert a component instane to a speckle block instance
convert a component instane to a speckle block instance
def component_instance_to_speckle(instance, is_group: false)
    transform = instance.transformation
    {
      speckle_type: "Objects.Other.BlockInstance",
      applicationId: instance.guid,
      is_sketchup_group: is_group,
      units: @units,
      bbox: bounds_to_speckle(instance.bounds),
      name: instance.name == "" ? nil : instance.name,
      renderMaterial: instance.material.nil? ? nil : material_to_speckle(instance.material),
      transform: transform_to_speckle(transform),
      "@blockDefinition" => component_definition_to_speckle(instance.definition)
    }
  end
def component_instance_to_speckle ( instance , is_group : false ) transform = instance . transformation { speckle_type : "Objects.Other.BlockInstance" , applicationId : instance . guid , is_sketchup_group : is_group , units : @units , bbox : bounds_to_speckle ( instance . bounds ) , name : instance . name == "" ? nil : instance . name , renderMaterial : instance . material . nil? ? nil : material_to_speckle ( instance . material ) , transform : transform_to_speckle ( transform ) , "@blockDefinition" => component_definition_to_speckle ( instance . definition ) } end
convert a component instane to a speckle block instance
convert a component instane to a speckle block instance
instance
is_group