sketchucation logo sketchucation
    • Login
    1. Home
    2. Squall290586
    3. Posts
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    S
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 13
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: Sketchup crash when i use thread

      @thomthom said:

      It's something many people have tried to find a solution for - some uses timers to slice up the work, but each tiny slice still blocks SketchUp UI so it does affect performance. And the task itself will take longer time.

      I think the only proper solution is to make a Ruby C Extension and use C to create a native thread. But I don't think you can access the SketchUp model from a separate thread so it'd only work if you where doing calculations or other operations that doesn't need interaction with the model.

      Damn, my treatment change the model.
      I have really no possibility to not freeze the UI.

      Actually my code make this but if i click on a web dialog, sketchup crash.
      You know how read a sketchup dump file, may be the cause of my problem is in this file.

      Thanks in advance.

      posted in Developers' Forum
      S
      Squall290586
    • RE: Sketchup crash when i use thread

      @chris fullmer said:

      Because it isn't designed to work that way. Splat.

      Hi,

      How i can make a process which not freeze the UI?
      My process can take a very long time.

      But if not use thread, the UI freeze.

      Have you any solution to solve my problem?
      I search on the forum but i don't found a solution.

      Thanks in advance.

      posted in Developers' Forum
      S
      Squall290586
    • RE: Sketchup crash when i use thread

      @thomthom said:

      Basically, threads under SketchUp Ruby is a no-go. They still block SketchUp from being responsive.

      I noticed that, that's why i create a web dialog with a javascript setTimeout which call a method Thread.join() with a parameter in order to run my thread.
      But sometimes, i don't know for what sketchup crash.

      And i don't understand why.

      posted in Developers' Forum
      S
      Squall290586
    • RE: Sketchup crash when i use thread

      @thomthom said:

      Ruby threads? They will not work under SketchUp. (search the forum and you see lots of topics detailing all the issues.) Ruby threads, in Ruby 1.8 which SketchUp uses isn't real threads.

      Hi,

      I search on the forum.
      But i don't find result about thread.
      Have you any link on thread using under sketchup?

      Thanks in advance.
      πŸ˜„

      posted in Developers' Forum
      S
      Squall290586
    • Sketchup crash when i use thread

      Hi,

      I excuse me in advance for my bad english πŸ˜„.

      I develop a GCODE plugin for sktchup.
      I use threads in order to not freeze the UI on my treatment.

      But sometimes, sketchup crash and make a dump file.
      How i can read this file in order to find the cause of my problem.

      Thanks in advance.

      Best regards.

      posted in Developers' Forum
      S
      Squall290586
    • RE: Plugin to create a progress bar

      Hi,

      A new version of my progress bar is available (Version 1.1).
      After severals tests, I modify the generation of the web page using jQuery JS framework.

      And now, a processing management is available to execute the processes one by one.

      posted in Plugins
      S
      Squall290586
    • RE: Plugin to create a progress bar

      @thomthom said:

      @squall290586 said:

      I change the module sketchup with a new method it's not an existant method.
      It's very important?

      I recommend you read this: http://www.thomthom.net/thoughts/2012/01/golden-rules-of-sketchup-plugin-development/

      Thanks for this link, I will to read that carefully πŸ˜„.

      posted in Plugins
      S
      Squall290586
    • RE: Plugin to create a progress bar

      @aerilius said:

      Hi,
      we usually use an author module and then a module name of our choice ( Utils is a very generic word). Like

      module Squall
      >   module Utils
      >   end
      > end
      

      Indeed, i change all my class and i prefixe all that by the module Squall.

      posted in Plugins
      S
      Squall290586
    • RE: Plugin to create a progress bar

      I change the plugin, i create a new module with a new method.
      The link is be updated (version 1.02)

      posted in Plugins
      S
      Squall290586
    • RE: Plugin to create a progress bar

      @jim said:

      Hello Voignier. Welcome to the forum and thank you for contributing to our community.

      Every SketchUp plugin must share the same work space, which means plugins must not change the environment for other plugins. This means not using global variables, enclosing your code in a namespace, and not changing SketchUp's classes or modules.

      Doing any of these will get the plugin banned from this forum. Thanks.

      
      > require 'sketchup.rb'
      > 
      > module Sketchup
      >   def Sketchup.application_dir()
      >     Dir.chdir(Sketchup.template_dir)
      >     Dir.chdir("../../..")
      >     return Dir.getwd
      >   end
      > end
      > 
      

      Hi,

      I change the module sketchup with a new method it's not an existant method.
      It's very important?

      If yes, i will changed my plugin immediatelly.

      posted in Plugins
      S
      Squall290586
    • RE: Plugin to create a progress bar

      @driven said:

      Hi

      There are at least 2 other ProgressBar.rb's around and if both are installed they mess up loads of other scripts.

      one's at smartmustard and the other came with 'VirtualWind' ruby package...

      might be wise to triple check for name and method clashes before people download it???

      even wdProgressBar would be better as it.s in a webdialog... I assume, as I haven't downloaded all the files, I'm not sure which I need.

      welcome and goodluck with the gcode...

      john

      Hi,

      despite several search, i don't found the progress bar of virtual wind.
      Now my progress bar is finish and functional πŸ˜„

      posted in Plugins
      S
      Squall290586
    • RE: Plugin to create a progress bar

      @dave r said:

      I don't know but it sounds like you've reinvented the wheel. Congratulations!

      Hi,

      I test this class,
      It's not a real progress bar it's just a update of sketchup status.
      It open not a modal dialog

      posted in Plugins
      S
      Squall290586
    • Plugin to create a progress bar

      Hi,

      I apologize for my English πŸ˜„.
      I am french and my English is not very good.
      Actually, i develop a plugin to make GCode for milling machine.

      It's not ready for the moment but despite searches I did not find progress bar for sketchup.
      Suddenly I develop this and i think that be util for another πŸ˜„.

      You can find this plugin on this link:
      https://docs.google.com/folder/d/0B9Gb-sUls44ANW1JRkM5U2lveEU/edit

      With this plugin a new class andis available.
      This class is "Squall::ProgressBar", she have 4 instance methods:

      • initialize(max, title = "In progress", waitingMessages = [])
        "max" is the maximum value of the progress bar
        "title" is the title of the popup
        "timeLeft" is the text display after the estimate seconds
        "waitingMessages" is a array with an messages array, messages are displayed during the process

      • process() {statement}
        This method display the progress bar and execute the statement

      • progress(i = 1)
        This method update the advancement of the progress bar

      • onCancel() {statement}
        This method launch the statement if the progress bar is closed

      This class have a static variable.
      This variable is initialized to true if a progress bar is active.
      The name of this is "Squall::ProgressBar.processing"

      If several progress bar are open in same time.
      They will be executed one by one.

      And for finish, this is a little example:

      
      	pb = Squall;;ProgressBar.new(200); 
      	pb.onCancel() {puts "cancel"}; 
      	pb.process() {
      		i = 0;
      		loop{
      			pb.progress();
      			i += 1;
      	 		break if(i == 200);
      	 		sleep(0.5)
      		};
      	};
      
      

      If you have any problem with that, can you send me a message with the problem?

      Thank in advance.

      A little link on a video:

      posted in Plugins
      S
      Squall290586
    • 1 / 1