Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sketchup 2017 under wine - Blank export settings #171

Closed
Witko opened this issue Oct 25, 2017 · 4 comments
Closed

Sketchup 2017 under wine - Blank export settings #171

Witko opened this issue Oct 25, 2017 · 4 comments

Comments

@Witko
Copy link

Witko commented Oct 25, 2017

Currently, after clicking export to stl a window is shown, but its blank. This prevents the usage of export completely.

@Aerilius
Copy link
Contributor

Sketchup-stl uses SKUI for its user interface. SKUI works only in WebDialogs and uses some Windows-libraries outside of the official SketchUp Ruby API. I see two possible causes of the problem:

  • In your setup of Wine, WebDialogs may not work by default and need tweaking (usually one had to install IE8, but I believe Wine 2.4's Gecko-based replacement is now fully on par with IE).
  • The tricks and assumptions that SKUI takes with the Windows API make it fail in Wine.

Keep in mind SketchUp does not officially support Wine, which is odd, considering Wine is the only way to access SketchUp on one of the most important maker platforms.

Porting SKUI to HtmlDialog would circumvent the problem. Making a plain-old simple webdialog version of the UI would also help. As a work-around you can use the command line interface on the Ruby console:

CommunityExtensions::STL::Exporter.export("Z:/home/Witko/model.stl", Sketchup.active_model.active_entities, {'selection_only' => false, 'export_units' => 'Model Units', 'stl_format' => 'ASCII'})

@Witko
Copy link
Author

Witko commented Oct 26, 2017

Hi,
thanks for response - it does work. Im trying to implement my own extension which would call this - is it possible? Im a bit stuck at the actual call - i cant see the error that happens. This is the code i have so far:

require 'sketchup'
require 'extensions'
require 'sketchup-stl'

module Examples
  module StlExport

def self.export_stl
  CommunityExtensions::STL::Exporter.export("Z:/tmp/model.stl", Sketchup.active_model.active_entities, {'selection_only' => false, 'export_units' => 'Model Units', 'stl_format' => 'ASCII'})
end

unless file_loaded?(__FILE__)
  menu = UI.menu('Plugins')
  menu.add_item('Export STL') {
    self.export_stl
  }

  file_loaded(__FILE__)
end

  end
end

I guess its an import issue. Would you be so kind to point me to the right direction?
Thanks!

@Witko
Copy link
Author

Witko commented Oct 26, 2017

Hmm,
it seems it works. I was calling wrong ui item.
i've just added require require 'sketchup-stl/exporter'

@thomthom
Copy link
Member

As of SketchUp 2018, a native STL importer/exporter is shipped with SketchUp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants