πŸ’‘ LightUp 7.1 | SketchUp's only real-time renderer that uses object-based rendering Download Trial
  • An issue with Windowizer30b5?

    2
    0 Votes
    2 Posts
    728 Views
    R

    I've noticed it, and I think it's an issue with ruby in SU - creating a lot of new geometry in an already dense model takes a LONG TIME. However, I'll check the code for Windowizer to see if there's something in it that might be a culprit.

  • Ruby for surveyor

    14
    0 Votes
    14 Posts
    2k Views
    F

    but I STILL like the eplanation for hexadecimal... I always saw that on my calculators and wondered 'what in the world is that?' πŸ˜„

  • Script, Rounded Corners

    11
    0 Votes
    11 Posts
    3k Views
    kenK

    @lapx said:

    Look up k-tools ruby. Under geometry/ round edge. It will do what you are asking.

    Sorry to be slow today, under my K_tools 5, I don't have the option of rounded corners, Angle division, outer circle of triangle, inner circle of triangle, Make T, Make L.

    However, thanks for the help.

    Ken

  • Extensions blog

    2
    0 Votes
    2 Posts
    1k Views
    K

    Good idea Coen .
    will this be something like the scriptspot blog?
    See here:
    http://www.scriptspot.com/

  • Call to our ruby masters: enhanced smoove tool

    2
    0 Votes
    2 Posts
    615 Views
    A

    Most of the code is trivial, only soft selection would have to be coded from start since the smoove is closed-source. But I cant devote any time to this at the moment. We should spread the coders' group by not delivering on-demand. Once u start, the simplicity of ruby Api is addictive.

  • Puppet Tool

    4
    0 Votes
    4 Posts
    1k Views
    K

    The puppet tool would be nic but you can get close by combining suanimate which is available @ ohyeahcad, the people who make podium. Combine this with ffd and you can do a lot of what you desire. Making it easy with a visual tool should be possible using these two scripts that are already developed.

  • Looking for File Parcer

    5
    0 Votes
    5 Posts
    1k Views
    AdamBA

    Sure you could use grep, sed etc but wait, what if we had a scripting language in Sketchup that had good file reading capability, powerful regular expression matching, and a binding to the Sketchup geometry API etc.

    I guess we can only hope. πŸ˜„

    Seriously, something like this works fine:

    IO.foreach("my_inputfile.ext") { |aline| /^(\S*) ([^$]*)/.match(aline) verb = $1 rest = $2 case verb ....whatever you need to do here eg entities.add_face, entities.add_group etc }

    This is my mickey mouse .obj importer I use for Sketchup:

    pos = [] tex = [] group = nil IO.foreach("/tmp/test.obj") { |aline| /^(\S*) ([^$]*)/.match(aline) verb = $1 rest = $2 case verb when "s" # ignore smoothing group when "v" # close current group if group pos = [] tex = [] group = nil end / (\S*) (\S*) (\S*)/.match(rest) pos.push Geom;;Point3d.new($1.to_f,$2.to_f,$3.to_f) when "f" if /(\S*)\/(\S*) (\S*)\/(\S*) (\S*)\/(\S*)/.match(rest) vertices = [pos[$1.to_i], pos[$3.to_i], pos[$5.to_i]] elsif /(\S*) (\S*) (\S*)/.match(rest) vertices = [pos[$1.to_i], pos[$2.to_i], pos[$3.to_i]] end group.entities.add_face vertices when "g" # open a new group /(\S*)/.match(rest) group = Sketchup.active_model.entities.add_group group.name = $1 puts "group(#{$1})" end }

    Adam

  • Hidden2Layer v1.2 > Thank you TIG

    2
    0 Votes
    2 Posts
    605 Views
    JClementsJ

    It has also been helpful when using the 3DS export filter (been experimenting with using it for passing my files to a Lightwave user as it will do somethings better than the Lightwave Plugin version 006).

  • File > Export Menu ... Is there way to add a script there

    3
    0 Votes
    3 Posts
    570 Views
    JClementsJ

    Too bad.

    Thanks for the quick reply, Jim.

    Do I assume that this has been put on "the wishlist" at one time or another?

  • A script to Analyse the loading of scripts?

    4
    0 Votes
    4 Posts
    778 Views
    A

    @Todd
    You forgot the scripts programmed as extensions. Their stub is loaded every time Sketchup starts, but the rest is loaded depending on the checkbox status in Preferences dialog. And this status can't be reached with Ruby.

    But it would be possible to overwrite the methods "load" and "require' to get to know which files get loaded. You only need to make sure the overwriting is in the script loaded first from Sketchup.

    azuby

  • WebDialog Javascript callback Maximum message size

    9
    0 Votes
    9 Posts
    2k Views
    C

    Be advised that execute_script is very buggy on Mac. It will mangle the string sent if it contains ";" or "," and probably other chars as well. Also "document." doesnt work. 😞

  • Script to make edges into a curve: needed

    15
    0 Votes
    15 Posts
    2k Views
    JClementsJ

    Edison, I think I may a have a workaround for you.

    I am certainly not an expert at dealing with contours, but through recent experimentation and the availabilty of newer scripts this could be what you need.

    You'll will need to check the accuracy of the "re-segmented" contours, however, to see if they are within the tolerances/lever of accuracy you want.

    See the attached .skp for a mini-tutorial. You will need the Weld.rbby Rick Wilson and the BezierSpline script setby Fred06. If you plan to create a terrain from the contours, then I would suggest TIG's Hidden2Layer.rb (version 1.2) script and use it as mentioned here: http://www.sketchucation.com/forums/scf/viewtopic.php?f=57&t=8726 .

    In summary, the procedure is this:
    A. Import the contours.
    B. Triple click on a contour of segments and WELD.
    C. Then right click on it and choose the the BZ context option of PolyLine Divider. Do note that for some reason (I think it has to do with the number of segments), the BZ context options may not be available; in that situation then bisect the weld segments into smaller lengths (see the mini-tutorial, Step 2).
    D. After completing Step 3, then you may want to weld the "segment-reduced" contour path back together into one continuous polyline.Screen Capture of BZ content menuMini-Tutorial for BZ method of segment reduction

    UPDATE: If Weld.rb does not work on all segments of a contour, try a selecting a smaller set of segments. OR, try selecting a few contour elevations (use one of SU's side views to do this), copy and paste them into a new file (or create a component out of them and then do a context menu Save As to create separate .skp), then try to weld, etc., then repeat the process for another set of contours; finally paste these back into one file. Otherwise, have the segments simplified by the surveyor in AutoCad first, or have them subdivide the one DWG file into 4 or more subfiles.

  • [ruby doc] Pages.selected_page=

    2
    0 Votes
    2 Posts
    493 Views
    T

    I'll add this this evening. Thanks. Todd

  • Section cut again

    9
    0 Votes
    9 Posts
    1k Views
    BurkhardB

    Thanks a lot. Forget about create group from slice 😳

  • Change active Scene/Page

    4
    0 Votes
    4 Posts
    567 Views
    R

    There is, but it's rather complicated.

    You need to use a series of Sketchup.send_action("pageNext:") commands until the Sketchup.pages.selected_page is the one you want to have active.

    EDIT:
    It appears there IS a pages.selected_page= method, that is undocumented. The method makes it UNcomplicated, but the undocumentedness re-complicates things πŸ˜„

  • Comonent Attributes Not being saved

    2
    0 Votes
    2 Posts
    286 Views
    R

    After assigning the attributes to the definition, did you save out the definition (rather, an instance of it) to an external model?

  • PathCopy not showing

    6
    0 Votes
    6 Posts
    506 Views
    R

    I'll have to check - I may have hard-coded an expected (PC) path that will be different for Mac. Regardless, the script should work, even without the cursor change.

  • Script location help please

    3
    0 Votes
    3 Posts
    405 Views
    S

    Yup curvestitcher was the one I was thinking of. Thanks for the great script Rick.

  • Copying Along A Path

    10
    0 Votes
    10 Posts
    1k Views
    Dave RD

    That's cool. Well, I won't be getting any work done for awhile now. I'm going to be playing with this instead. πŸ˜„

  • XML importer

    20
    0 Votes
    20 Posts
    2k Views
    CadFatherC

    it's a given there's no hurry Fred... 😎 ..i'm already glad to get an answer to my question - (18 replies to my languishing post in fact) cheers! πŸ˜„

Advertisement