Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 366b961039 | |||
| e244a7e2e5 | |||
| 9b55764b38 | |||
| 4b8012f94b | |||
| 9871000d84 | |||
| 17a056b3b9 |
Binary file not shown.
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 26 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 4.0 KiB |
@@ -6,7 +6,7 @@ require_relative '../constants/mat_constants'
|
||||
|
||||
module SpeckleConnector3
|
||||
module Actions
|
||||
# Action to initialize materials
|
||||
# Action to initialize materials (legacy for diff colors)
|
||||
class InitializeMaterials < Action
|
||||
# @param state [States::State] the current state of the {App::SpeckleConnectorApp}
|
||||
# @return [States::State] the new updated state object
|
||||
|
||||
@@ -23,8 +23,6 @@ module SpeckleConnector3
|
||||
new_sketchup_state = States::SketchupState.new(sketchup_model)
|
||||
sketchup_model.rendering_options['DisplaySectionPlanes'] = true
|
||||
new_state = state.with(:@sketchup_state => new_sketchup_state)
|
||||
# Init materials again
|
||||
new_state = InitializeMaterials.update_state(new_state)
|
||||
|
||||
# Read speckle entities
|
||||
#new_speckle_entities = SketchupModel::Reader::SpeckleEntitiesReader.read(sketchup_model.entities)
|
||||
|
||||
@@ -14,7 +14,7 @@ module SpeckleConnector3
|
||||
path = ENV.fetch('APPDATA')
|
||||
Pathname.new(File.join(path, 'Speckle')).cleanpath.to_s
|
||||
when OS_MAC
|
||||
File.join(Dir.home, '.config/Speckle')
|
||||
File.join(Dir.home, 'Library/Application Support/Speckle')
|
||||
else
|
||||
raise 'Speckle could not determine your Appdata path'
|
||||
end
|
||||
|
||||
@@ -34,7 +34,17 @@ module SpeckleConnector3
|
||||
edges.each { |edge| remove_edge_have_coplanar_faces(edge) }
|
||||
|
||||
# Remove remaining orphan edges
|
||||
# the commented out code throws an exception over deleted elements
|
||||
# even if they are rejected by deleted? flag
|
||||
# edges.reject(&:deleted?).select { |edge| edge.faces.empty? }.each(&:erase!)
|
||||
edges.each do |edge|
|
||||
next if edge.deleted?
|
||||
begin
|
||||
edge.erase! if edge.faces.empty?
|
||||
rescue Sketchup::DeletedEntityError
|
||||
# Ignore deleted edge
|
||||
end
|
||||
end
|
||||
|
||||
merged_faces(faces)
|
||||
end
|
||||
|
||||
@@ -44,7 +44,7 @@ module SpeckleConnector3
|
||||
# @param argb [Numeric] int value of the corresponding color
|
||||
# @return [Sketchup::Color] sketchup color
|
||||
def self.from_int(argb)
|
||||
Sketchup::Color.new((argb >> 16) & 255, (argb >> 8) & 255, argb & 255, (argb >> 24) & 255)
|
||||
Sketchup::Color.new((argb.to_i >> 16) & 255, (argb.to_i >> 8) & 255, argb.to_i & 255, (argb.to_i >> 24) & 255)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -85,7 +85,7 @@ module SpeckleConnector3
|
||||
end
|
||||
# File.exist?(@htm_file) ? dialog.set_file(@htm_file) : dialog.set_url('http://localhost:9091')
|
||||
# dialog.set_url('http://localhost:8082') # uncomment this line if you want to use your local version of ui
|
||||
dialog.set_url('https://boisterous-douhua-e3cefb.netlify.app/') # uncomment this line if you want to use deployed ui on netlify
|
||||
dialog.set_url('https://dui.speckle.systems/') # uncomment this line if you want to use deployed ui on netlify
|
||||
add_exec_callback(dialog)
|
||||
dialog
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user