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

    Posts

    Recent Best Controversial
    • Guitar Study

      Hi everyone.

      I no longer have the equipment to do woodworking (Apartment Dweller now.) but I have always loved working with wood. Used to build accoustic guitars at one time.

      After looking at Sketchup I wondered just how far I could go in modeling one.

      The attached is just a stab at the general geometry. Not the actual componets.
      If I get far enough I will put together an actual true dimension assembly.

      I am not happy with the heel in my model. It should be wider at the top where it joins the neck. (Smoother join as well.) While remaining the size it is where it joins the back.

      I didn't realize what a comlex shape it was until I had to describe it in Sketchup.


      Roughed out Guitar

      posted in Woodworking
      G
      Gruff
    • RE: Automaticaly try to import files that aren't .sku

      [quote="Jim"]

      
      ENV # View the entire hash
      ENV["TheKey"] # returns a value
      ENV["TheKey'] = nil # setting a value
      
      

      Cool Beans Jim. 😎

      Of course it doesn't solve requiring my app to be running all the time. I suppose I could make it so it always stays on top but that could get to be annoying.

      Dropping the DWG file on the taskbar icon doesn't Drop the file. Instead it make the application you dropped on the active application (So you have to drop a second time)

      Can a web form detect a DragDrop event? If so perhaps a small always running web form would a better route? At least you could then import Acad files while SketchUp was running.

      Don't know diddly about web apps so I am out of my element there.

      posted in Developers' Forum
      G
      Gruff
    • RE: Automaticaly try to import files that aren't .sku

      Jim could you expand on what you are saying some?

      Are you saying the a Windows Environment variable can be read by ruby in sketchup?
      If so can it be set to nil when the ruby script is done importing the DWG?

      I guess I envision something like the following pseudo-code

      
      If EnvVar != nil then
        import EnvVar
        set EnvVar = nil
      end if
      
      

      That would be a better idea than creating and destroying a hard coded script file as my program currently does.

      posted in Developers' Forum
      G
      Gruff
    • RE: [Plugin] FreeDXF Importer

      @thomthom said:

      Nice list of specs you found there Jim. Are you writing against the 2010 version?

      I'd recommend writing it to the earliest version of DXF that is still supported under 2010.
      One heck of a lot of users are still using 2006 and earlier.

      ~Gruff

      posted in Plugins
      G
      Gruff
    • RE: Automaticaly try to import files that aren't .sku

      Eric,

      Sorry about that my PM'er is apparently not working.

      Re-thought the whole issue. Perhaps I tried to make it too non-specific.
      Delete the executable and the template file.

      Attached is a one trick pony sort of program in a Zipped file.
      Unzip it and put it in your plugins folder. Make a shortcut to it on your desktop.

      Run the program and drag-drop a DWG or DXF file anywhere on the program's dialog.

      Sketchup will be launched and your DWG / DXF file should be loaded.
      (This program will not work by file association at all.)

      I hard coded the creation of the ruby file inside the executable.
      The delay time to file deletion in the dialog is necessary as the Ruby Script file it creates has to be destroyed, otherwise the script would try to import the same file everytime you started SketchUp.

      The delay is user definable because you may need to load some very large Autocad files and it wouldn't do to have the Ruby file deleted while it is still trying to import.

      The program will remember your last delay time between sessions.


      New Program to import DWG or DXF

      posted in Developers' Forum
      G
      Gruff
    • RE: Automaticaly try to import files that aren't .sku

      @eric_erb said:

      Anybody get this to work?

      Well obviously I have. πŸ˜„

      What are you having trouble with? Do you get any errors?

      posted in Developers' Forum
      G
      Gruff
    • RE: Automaticaly try to import files that aren't .sku

      Okay, Here is the final product.

      I added a couple more comment line constants for the template file that control.

      Seconds until file deleted 2 - 30
      Show Launcher Dialog true/false

      The Attached Zip file contains three files.
      All three need to be placed in your PlugIns Folder.

      1. RubyScriptlauncher.exe
      2. Auto_Import_dwg.txt (Sample template file)
      3. File Type Diagram.jpg (Setting up 'File Type')

      Since I did not use any fancy controls you should not need an installation setup program for RubyScriptLauncher.exe

      RE: setting up the 'File Type' for DWG or other CAD files.
      If you have AutoCad or other applications that use DWG then it could become problimatical.

      Have Fun,


      Zipped Sources

      posted in Developers' Forum
      G
      Gruff
    • RE: Logic with arcs (mini-challenge?)

      Jeff,

      Geometry is just mathematics with constraints or extra rules if you will. You cannot solve a problem unless you have enough known variab les. In Geometry this also means you cannot solve by starting with a piece of geometry that is not locked down. Your sliding right hand box is an example. You have to start with the left.

      You can make the problem easier if you define the tangent radii as equal. Since you want 12'6" for the initial I'd make them both 12' 6"

      In the old days on a drafting board I would have done this with just a compass, dividers, and a straight edge. πŸ˜„

      The attached SKP shows the process step by step. I used 96 segments per Arc to make things smoother.


      Tangent Arcs by defined radii

      posted in SketchUp Discussions
      G
      Gruff
    • RE: The "Duh!" thread (aka the Doh! thread)

      One more Duh!

      When viewing a model in XRay mode.

      If you hold down shift whilst using the 2D drawing tools the new 2D geometry is forced onto the nearest face (closest to your eye.). Even snap points to (Behind) geometry is projected to the nearest face.

      The sort of meets my needs for construction planes that I am comfortable using in other solid modelers.

      The only painful part of it is that you have to continuously hold down the shift key. It would be nice if Caps lock toggled the feature.

      posted in SketchUp Discussions
      G
      Gruff
    • RE: Solid objects?

      @chopper greg said:

      I would think that a little more than a warning dialog would be of greater use - like highlighting the area ( or area's ) that has intersection occurring, even then that might be less functional than allowing full contact but no penetration of an object on another object - like a 5mm OD peg not quite fitting into a 5mm ID hole.

      I do not think you realize what a complex thing it is you ask Greg.
      I have many years of Solidmodeling under my belt with most of the popular true solid modelers (Solidworks, Inventor, Intergraph, Unigraphics, Etc...) I can tell you that none of them implement what you describe in any usable way.

      Solidworks can do motion. You can add 'Mates' between solid parts. This allows them to pivot, slide, hinge and quite a bit more. They even added virtual motors both radial and linear. With some fancy footwork they can simulate belts and gears, in the latter case it doesn't work by virtual friction or surfaces impacting other surfaces. The point I'm getting at is that with all this parts can still intersect and pass through each other.

      There once was a third party product ... I think it was called Solidmotion that we bought. It did motion studies and could do what you talk about but not in real time. You setup the parameters and let it run overnight. It built a slide show that you could animate and see the results. (Wasn't terribly useful)

      This sort of thing requires a lot of horsepower.

      Perhaps Simple alignment mates could be added to Sketch up. I can see that working. You would select a face on each of two parts then apply a coincident mate. The loose part moves to that position.
      Three Mates and your parts are locked where you want them to be.

      I am getting Solidworks 2010 end of this month. I'll let you know what new stuff they added.

      posted in Newbie Forum
      G
      Gruff
    • RE: The "Duh!" thread (aka the Doh! thread)

      @plot-paris said:

      wow, cool. didn't know about that eihter. but what I would even more like to see is a push/pull like this:
      [attachment=0:2sngi41l]<!-- ia0 -->strange_pushpull.jpg<!-- ia0 -->[/attachment:2sngi41l]

      Similar to that I'd like to see some way of locking the move tool do the same thing to an edge of a face. Allow the face to only stretch normal to the side of the line. Say you had a square face 6"x8"
      Grab on one of the 8" lines and pull out making it 12" x 8".

      Basically I need the face to larger than the original facet.

      posted in SketchUp Discussions
      G
      Gruff
    • RE: Looking ahead to SU 8.

      [quote="plot-paris"][remus, I think gruff ment 'construction planes' as opposed to 'section planes', similar to construction lines but only as planes πŸ˜„

      I've been in solid modeling for many years.

      The biggest pain I have with Sketchup is the fact that think you have drawn a flat sketch but when you rotate the model parts of your sketch fly off in z or other directions.

      By construction Plane I mean a see through plane you define in space that you may draw 2D entities upon similar to drawing on a model face. They would need a toggle to lock/unlock the 2D sketch tools to them. infered snap points from the model would be projected to the plane.

      Redefining the 3D Axis in Sketchup sort of gets you there except it doesn lock you to the plane.

      Construction plane creation

      1. Parallel at a distance. (Similar to push/pull but without the join)
      2. Angled from (Select an face or plane an axis to rotate about.)
      3. Three point
      4. Line and a point
      5. two lines
      posted in SketchUp Discussions
      G
      Gruff
    • RE: ? [Question] - A Ruby Calculator ?

      @newone said:

      You can simply use Ruby Console for that. πŸ˜„

      Pretty terse New. πŸ˜„
      How do you get the console to push the result into the VCB?

      posted in Developers' Forum
      G
      Gruff
    • RE: Automaticaly try to import files that aren't .sku

      TIG:
      😳 Not used to Ruby's Escape char yet. Didn't have one in VB.

      Eric_Erb:
      Made several attempts at a solution. Ended up by chaining the following tools

      1. Windows File Types setting (A process launched when double clicking a file)
      2. RubyScriptLauncher.exe (My New Executable)
      3. Ruby template file (textbased)
      4. SketchUp

      The end result is relatively quick and close to what you asked for. The only thing I can think of that might be an issue is that you can only import one file at a time and that it launches a new copy of SketchUp each time you use it.

      I found one unexpected bug with my program this morning so I will not be uploading it until tonight when I get home and fix it.

      I wrote the program to be non-specific.
      It may be used with any file type that Sketchup can import through the SketchUp API.
      You control what happens via the information you plug into the Windows File type settings and a the Ruby template file. You can have multiple template files for different import file types. My program uses the template file to construct a ruby file in plugins before starting Sketchup. After Sketchup is running and the file is imported the ruby file is automatically deleted.

      Both the program and the template file must be located in the SketchUp PlugIns folder.

      --- template file Auto_Import_DWG.TXT example ---
      ` # TEMPORARY_RUBY_FILENAME = Auto_Import_DWG.rb

      The comment line above is required. Use any name you like for the .rb file.

      model = Sketchup.active_model
      show_summary = false
      status = model.import "INSERT_FILENAME_TO_IMPORT_HERE", show_summary

      In the line above the string "INSERT_FILENAME_TO_IMPORT_HERE" must exist.

      It is case sensitive

      layers = model.layers

      Turn on all imported Layers

      layers.each do | layer |
      layer.page_behavior = LAYER_VISIBLE_BY_DEFAULT
      layer.visible = true
      end

      view = model.active_view
      view.refresh
      view.zoom_extents

      All comment lines and empty lines are removed when the ruby file is created.

      Feel free to add whatever ruby code you want to run.`

      --- end template file Auto_Import_DWG.TXT example ---

      --- Windows File Type Information example ---
      Application to perform this action:
      "C:\Program Files\Google\Google SketchUp 7\Plugins\RubyScriptLauncher.exe" "%1" "Auto_Import_Dwg.TXT"
      (Note the double quotes around each piece of information.)

      If you need help getting to and setting up the Windows File Type settings for DWG let me know.

      posted in Developers' Forum
      G
      Gruff
    • RE: Looking ahead to SU 8.
      1. Explode tool made into three options.
        a) Explode as it is today
        b) Explode groups but do as today but do not explode Arcs, Circles or Curves
        c) Explode only selected Arcs, Circles or Curves

      2. Construction Planes
        a) Various methods to create them.
        b) Ability to show/hide/delete them.
        b) Some method to lock/unlock the drawing tools to them.

      3. Ability to load a Ruby script from the command line when starting SketchUp.

      posted in SketchUp Discussions
      G
      Gruff
    • RE: The "Duh!" thread (aka the Doh! thread)

      More of an Ahh! than a Duh!

      1. Discovered that ALT-Push/Pull will move a loose planar face in the face normal

      I find I need to create duplicate parallel faces offset from the body a lot.

      1. To do this I use CTRL-Push/Pull to make a copy extrude.
        Rotate the model view 90 degrees to the face normal
        then use a right to left select window to select the extruded side faces,
        then press the Delete key.

      I'm left with a face normal to and inline with the original at a distance.

      posted in SketchUp Discussions
      G
      Gruff
    • RE: Automaticaly try to import files that aren't .sku

      Okay, answering my own question I cannot find any doumentation that says that Sketchup has command line parameters to load a Ruby Script.

      Another method would be to have the DXF file launch a Batch File when double clicked. The batch file would take the selected filename as an arument and use it to write a ruby script in the plugIn folder then launch Sketchup.

      Following this Idea I wrote a small ruby script that should import a DWG.
      It fails though. I can manually select 'File | Import' in Sketchup and the same dxf imports perfectly. Can someone look over my script?

      --- LoadDWG.rb ---
      model = Sketchup.active_model
      show_summary = true
      status = model.import "C:\AAA\ACIS Files\WKT 2424 A4O.dwg", show_summary
      --- End LoadDWG.rb ---

      This is the error I am getting.
      --- Error ---
      Error opening AutoCAD import file: Can't open file
      This does not appear to be a valid AutoCAD DWG or DXF file
      or the file is write protected
      --- End Error ---

      I am using Sketchup 7 with the optional downloaded DXF/DWG import tool.

      posted in Developers' Forum
      G
      Gruff
    • RE: Automaticaly try to import files that aren't .sku

      @eric_erb said:

      if i could get it to work with .dxf or .dwg I'd be thrilled. So if one would be easier than the other for some reason, that's fine. Same goes for any other 3D cad format from autoCAD for that matter.

      If I can get the script to import properly and if the
      ArgV method is supported in Sketchup Ruby I see no reason why something couldn't be put together.

      TIG:

      My bad. I meant to say DWG in my post above.
      I can import the same exact DWG file from the same path manually From the SketchUp Main menu "File | Import | Dxf/Dwg"
      The Ruby script I show fails every time.

      Could you try the import script with a DWG file?

      I have the feeling that since they removed DXF/DWG import and made it an addin that the Sketchup ver 7 API no longer supports DXF/DWG import regardless of whether you install the separate importer download.

      posted in Developers' Forum
      G
      Gruff
    • RE: Automaticaly try to import files that aren't .sku

      Can Ruby Scripts Accept a command line parameter on load?

      Does Sketchup have command line parameters itself that can load a Ruby Script?

      I'd say these were key to cobbling together a solution.

      posted in Developers' Forum
      G
      Gruff
    • RE: Clear the ruby window

      This looks like a great group to hang around with. Looking forward to spending some time here.

      RE: the Ruby console

      I cannot believe that the good folks at Sketchup didn't provide a CLS command. Seems like a no brainer to me.

      WinAPI's can get flakey.

      posted in Developers' Forum
      G
      Gruff
    • 1 / 1