sketchucation logo sketchucation
    • Login
    1. Home
    2. RickW
    3. Posts
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    ⚠️ Important | Libfredo 15.6b introduces important bugfixes for Fredo's Extensions Update
    R
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 36
    • Posts 779
    • Groups 1

    Posts

    Recent Best Controversial
    • ImageProfile script almost ready

      Almost ready to release - I expect by 4 June 2007 πŸ˜„
      http://www.smustard.com/script/ImageProfile

      I need to provide a lot of background information about this one.

      First off, the only good way I found to accomplish the goal of outlining an image (without a lot of difficulty for the end user) was to have server-side processing of the image. The image is uploaded, preprocessed, returned to SketchUp for tracing, and erased from the server. As a result, the plugin requires SU 6 and an active internet connection, and script speed will be related to internet connection speed. Sorry, but that's just how it worked out. The good news is that with a high-speed connection and moderate file sizes, turnaround time is generally under 2 minutes per image.

      Second, there is a lot of potential for commercial users of this plugin (selling components created by this plugin). To be fair to high-volume commercial users, low-volume users, and myself, I decided the best way to do the price structure was on a per-image basis. In my part of the world, it's not uncommon for skilled SketchUp users to charge $20+ per hour. An experienced SketchUpper can take 15-30 minutes for a good image tracing job. That results in an image-to-component cost of $5 to $10. Even if you found cheap labor (like $8 per hour), that would be a cost of $2 to $4 per image-to-component. I kept the pricing at $2 or less per image, and there will be special-price sales. πŸ˜„ If you find fast, quality labor at less than $8 per hour, skip the plugin and use them!

      Third, as noted on the script's page, the two lower quality settings can cut off parts of the image due to the current algorithm. I'm working on a revised algorithm that avoids these problems. Meanwhile, the two higher quality settings are very good, and with SketchUp 6's improved speed, the higher edge count isn't as much of a drawback as in v5.

      Next, transparent PNG images work the best. Period. Non-transparent PNG's can work if the background is pure white, but you'll inevitably have white areas around your image. Don't use any other file type. Again, sorry, but that's just how it is.

      Finally, the bulk-processing mechanism is not yet perfected, and will be added later. If you anticipate high-volume usage, contact me, and I'll work with you.

      posted in Plugins
      R
      RickW
    • RE: Section Cut Face

      Thanks, TIG πŸ˜„

      posted in Plugins
      R
      RickW
    • RE: Weird behaviour

      Or from the direct link in TIG's post. It's that line of text that's bluish in color.
      πŸ˜‰

      posted in Developers' Forum
      R
      RickW
    • RE: Idea for last batch of selected Reselect Ruby

      Thinking ahead (for next version?):

      1. Ability to name sets
      2. Ability to lock sets (currently, the lowest-numbered set is removed once the 21st set is created, and each set is renumbered. Locking would prevent a set from being displaced)
      3. Ability to save sets in the model for future reference

      Input is appreciated. πŸ˜„

      posted in Plugins
      R
      RickW
    • RE: Idea for last batch of selected Reselect Ruby

      Here's a screenshot of the new SelectionMemory plugin.

      It will remember up to 20 selection sets, which you can use separately or in combination to restore a selection set or build a new selection set.

      Each set can be:
      1 selected as THE selection set,
      2 added to the existing selection set, or
      3 removed from the existing selection set, or
      4 deleted from memory

      You can also Add All, Remove All, or Delete All (clears the SelectionMemory).

      Also includes a right-click menu item for re-selecting the previous selection set for those times when you just lost your set and need it back quickly.

      Any suggestions/thoughts/comments?

      Closeup of the dialog box

      http://www.sketchucation.com/forums/scf/sas/Ruby/screenshot2.png

      http://www.sketchucation.com/forums/scf/sas/Ruby/screenshot.png

      posted in Plugins
      R
      RickW
    • RE: Idea for last batch of selected Reselect Ruby

      Okay, the new SelectionMemory is getting closer to being ready! The guts work, so once I get the UI finished, it'll go live on Smustard.

      posted in Plugins
      R
      RickW
    • RE: Idea for last batch of selected Reselect Ruby

      The tool idea could work, but personally, I'd much rather write an observer than a whole new selection tool πŸ˜„ But that's just personal preference.

      posted in Plugins
      R
      RickW
    • RE: Idea for last batch of selected Reselect Ruby

      Download SelectionMemory to your Plugins folder.

      Usage: Right-click OR Plugins menu > SelectionMemory >
      Memorize (the current selection)
      Add (the current selection to what's already in memory)
      Recall (the selection items in memory)

      It's strictly a manual process right now. I'm leveraging observers to make it an automatic process.

      posted in Plugins
      R
      RickW
    • RE: Idea for last batch of selected Reselect Ruby

      No, no, download it from MY site!
      http://www.smustard.com/script/SelectionMemory πŸ˜„

      Actually, I started work a few weeks ago on a new version that will be automatic, as Azuby suggested.

      posted in Plugins
      R
      RickW
    • RE: Is there a minimum rotation for components?

      It is far less than ideal, but did you try over-rotating and then rotating back slightly less? ie. rotate 4 degrees, then come back 3.95 degrees (or radians, or whatever units)

      I suspect, though, that you're running into Sketchup's tolerance settings. No evidence other than your own - just a hunch.

      posted in Developers' Forum
      R
      RickW
    • RE: Request: Automatically add ConstructionPoint at Center of Ci

      The Tools observer has some problems - "toolname" is truncated on the Mac, making it hard (or impossible) to get the active tool based on name. However, the toolid works fine.

      class MyToolsObserver < Sketchup;;ToolsObserver
        def onActiveToolChanged(tools,toolname,toolid)
          #do stuff here
          puts "Selected tool; #{toolid} ;; #{toolname}"
        end
      end
      
      Sketchup.active_model.tools.add_observer(MyToolsObserver.new)
      
      

      That said, to constrain drawing to a 2D plane will probably require recreating all the tools with the constraints built in. 😞

      posted in Plugins
      R
      RickW
    • RE: Request: Automatically add ConstructionPoint at Center of Ci

      You want to create a view observer (not a camera observer, since those don't exist). The general form is:

      1. create the observer, deriving from the appropriate template
      2. attach the observer to the appropriate object

      In your case, this would take the form of

      class MyViewObserver < Sketchup;;ViewObserver
        def onViewChanged(view)
          # do stuff here
        end
      end
      
      $myViewObserver = Sketchup.active_model.active_entities.add_observer(MyViewObserver.new)
      #assigning to a global variable is optional, but allows you to remove the observer later
      #you could also create a class variable to store the various instances, or there are other possibilities as well
      

      Hope that helps...

      posted in Plugins
      R
      RickW
    • RE: Request: Automatically add ConstructionPoint at Center of Ci

      I should have said, "Yes, theoretically, it can be done."
      Reality is BugSplatting 😒
      Conversing with the SU crew about the issue...

      posted in Plugins
      R
      RickW
    • RE: Request: Automatically add ConstructionPoint at Center of Ci

      John,

      Yes, this can be done. I'll see if I can come up with something.

      posted in Plugins
      R
      RickW
    • RE: Model History plugin - Feedback please

      So it's like my ToDoList, but with more features. Interesting!

      posted in Plugins
      R
      RickW
    • RE: 2D drafting ruby

      Okay, I hear you. πŸ˜„ I can't promise it will happen quickly, but it's on my radar now.

      posted in Plugins
      R
      RickW
    • RE: Second life export

      My limited investigation showed a definite lack of information on what is necessary for the import data for SL. Querying the SU data is a breeze. It's getting it into a useful form that is the challenge, and I can't do that until I know what that "useful form" is...

      posted in Plugins
      R
      RickW
    • RE: How About VehicleCreator.rb

      Stu,

      It should only take a few seconds to mod my instant-Hagia-Sophia script to do the Sagrada Familia. I'll get right on that πŸ˜„

      posted in Plugins
      R
      RickW
    • RE: Creating Ruby Scripts Question

      Primarily, do research to learn about ruby. It helped me that I'd learned BASIC back in the day. [When I learned, there was no DOS because there was no Disk - our first computer loaded software from cassette tapes, and the OS was hard-wired. I still remember going with my dad to have the RAM upgraded from 16K to 64K (no joke!), and then coming home from school another time to find two large gray boxes next to the monitor. They happened to be floppy drives (the big 5.25" kind). So much faster than tapes! Then there was that MOdulator-DEModulator to allow computers to connect over phone lines (a "MODEM", it was called). And there was no such thing as a mouse...]

      Anyway, I digress. Having any background is helpful, but ruby is easy enough to learn even without a programming background. See http://www.ruby-doc.org/docs/ProgrammingRuby/ for a good introduction and research resource for ruby programming.

      Then study the ruby help files for how SketchUp adds its own objects and methods to ruby.

      Then study other scripts to see how they are constructed, what methods they use, etc.

      Some starting points:

      In ruby, the application is referred to as "Sketchup", the model is "Sketchup.active_model", and the geometry is "Sketchup.active_model.entities" (base-level geometry) or "Sketchup.active_model.active_entities" (base- or nested-level geometry).

      Any of these things can be assigned to variables:
      model=Sketchup.active_model
      entities=model.active_entities (because 'model' has been assigned to "Sketchup.active_model", then this assignment is the same as saying "entities=Sketchup.active_model.active_entities")
      selection=model.selection

      So, there's lesson one. Have fun learning!

      posted in Developers' Forum
      R
      RickW
    • RE: How the RUBY apply a dimension(with label, dimension line wi

      To confirm, dimensions are unaccessible through ruby, C++, fortran, or anything else, for any version of SketchUp (through v6 at least).

      It's been requested, so we'll see what happens...

      posted in Developers' Forum
      R
      RickW
    • 1 / 1