πŸ’‘ LightUp 7.1 | SketchUp's only real-time renderer that uses object-based rendering Download Trial
  • Organizer.rb error on sketchupConnector.dll

    7
    0 Votes
    7 Posts
    1k Views
    KrisidiousK

    you're awesome... that trouble script is the foshizzle

  • Is there a way in Ruby to import KML files into SU?

    3
    0 Votes
    3 Posts
    1k Views
    JClementsJ

    I believe so. I believe it can be opened with a standard editor.

    If I can get a sample file of data points, I will post it here.

    I'll have to wait until person who creates specific KMLs returns from vacation in 2 weeks.

  • Finding a face's azimuth

    6
    0 Votes
    6 Posts
    2k Views
    R

    The problem is compounded by angles generally being measured counter-clockwise, while azimuth angles are measured clockwise.

    I think it would come down to determining the quadrant of the vector (by checking X and Y for +/- value), then adding the previous right-angle azimuth vector to the angle_between of it and the specified vector

    if vector.x>0 if vector.y>0 az = [0,1,0].angle_between(vector).radians else az = [1,0,0].angle_between(vector).radians+Math;;PI/2 end else if vector.y<0 az = [0,-1,0].angle_between(vector).radians+Math;;PI else az = [-1,0,0].angle_between(vector).radians+(3*Math;;PI/2) end

    The above example doesn't take into account cases where x or y equal zero, so you'll have to add that. It shouldn't be too difficult, though.

  • Face width and height in 2d

    6
    0 Votes
    6 Posts
    960 Views
    R

    It's possible to use vectors to represent axes. The face.normal should be the Z axis, the X axis should be the intersection of a flat (XY) plane with the face plane, and the Y axis can be determined by the cross product of the X and Z axes.

    There's also a quicker way to do this after finding the Z axis (the face.normal):
    axes = face.normal.axes
    xAxis,yAxis,zAxis = axes

    However you do it, once you have the axis vectors, you can then either:

    test the X and Y axes against the points of the face to determine which are minimal and maximal, or use an axes transform to convert the vertex positions of the face to the world XYZ coordinates and then determine the minimal and maximal XY values.
  • Align face to endpoint script ?

    3
    0 Votes
    3 Posts
    883 Views
    D

    Hi TIG

    Your extrude along a path is my bread and butter script for plan development.

    The core of a copy plan system and tut that I am in process on as we speak.

    An align_face script would be appreciated by all I am sure and thanks for the get-back.

    Dave

  • How to test if user is currently using Photomatch?

    3
    0 Votes
    3 Posts
    741 Views
    W

    Thanks, Rick, but that's not really what I am looking for. I'm not trying to test whether the user is editing their photomatch (i.e. adjusting vanishing points, origin, etc.). I just want to know if the user has selected a photomatch scene tab and has not changed the camera view (photo background is still in view). The active tool could be anything (select, linetool, pushpull, etc, I don't care).

    In other words, I just want to test if the photomatch background is still in view. There doesn't seem to be anything in the RenderingOptions, Page, or Camera classes to help me here.

  • Align a face to a plane ..

    6
    0 Votes
    6 Posts
    3k Views
    P

    OK, here's the workflow to create unfolded sheetmetal parts -

    create first end of a transition create second end of transition use skin.rb to join the ends delete end faces and tweak surfaces as necessary use JF_unfold.rb to create a flat pattern align flat pattern to xy, xz or yz planes perspective off, select appropriate view, export DXF for profile cutting.

    Will play around with the Align feature later.

  • Script loading errors

    10
    0 Votes
    10 Posts
    2k Views
    A

    The thing with "between" definitively is an error from the filter_extension extension, it is located in the file filter/geom_selection.rb in line 4. Because the programmers used the evaluation technique, the error is hard to track. So I crawled all the "requires" and decoded them. From the filter_extension.rb you can see who has made the script - F. Rodriguez and Didier Bur.

    Also have a look on this old (cached) thread

    For the housebuilder thing look here.

    azuby

  • Is there any script to get plane align to camera ?

    7
    0 Votes
    7 Posts
    2k Views
    N

    Kris,

    I find it's a good idea to keep an eye on things in case you try to pull a fast one.

    -Gully

    [Gully Foyle]

  • Is disabling menu items and or tools possible?

    7
    0 Votes
    7 Posts
    2k Views
    A

    For me this code works with the additional line. I put it to a .rb file, load Sketchup, try to use Plugins > Cornflakes > Add mild, it is grayed, I open a .skp file and try the same and get my breakfest.

    azuby

  • Loading error on align and Align_2d script with XP Professio

    2
    0 Votes
    2 Posts
    723 Views
    A

    I can't help you in that case, but a "compile" error on Ruby scripts? Should be an "Interpreter error" Try to check the Ruby versions. Type to the Ruby Console:

    VERSION # or RUBY_VERSION

    azuby

  • PayPal - SDK for Ruby

    3
    0 Votes
    3 Posts
    1k Views
    N

    Tom,

    Of course PayPal has SDK for Ruby.
    Download it and try it.
    PayPal's Ruby SDK

    Thanks,

    -Jim-

    -=-=-=-=-=-=-=-=-

    Attention Developers! Make up to $1000 per referral with PayPal's
    [url=https://www.paypal.com/cgi-bin/webscr?cmd=_web-referrals-mrb-outside]
    Merchant Referral Bonus[/url]

    Want to
    accept credit cards online?
    Visit PayPal [url=https://www.paypal.com/us/cgi-bin/webscr?cmd=_merchant-outside]Merchant
    Services[/url] for
    [url=https://www.paypal.com/cgi-bin/webscr?cmd=_wp-pro-overview-outside]online
    payment processing[/url] made easy.

    Now offering Payflow
    payment gateway solution -
    online credit card processing with
    fraud protection,
    recurring billing, and other
    payment services to work with your
    shopping cart and
    internet merchant account.

    Developer Resources: PayPal Integration Center,
    PayPal Developer Network,
    PayPal Developer Blog

    [phpwizard01]

  • Sketchup.find_support_files

    3
    0 Votes
    3 Posts
    1k Views
    N

    Thanks Todd

    I know how to use find_support_file - its the plural version find_support_files I dont quite understand. It's not really important to know - just a query.

    Indeed, the search on the old ruby group is broken - not mush use.

    Regards
    Bill Wood

    [BillW]

  • Image Shadow ?

    4
    0 Votes
    4 Posts
    790 Views
    T

    I want to add that this script is pretty cool. I've been beta testing the Mac version for Rick, and even though it doesn't work, yet, it is still pretty neat technology.

    Todd

  • DoorMaker

    3
    0 Votes
    3 Posts
    889 Views
    H

    Paul,
    If it's not bust don't fix it !!!
    Your DoorMaker script is really good now - doesn't really need to be touched.
    ...
    If you've got creative energies to spare...
    What would be really good would be a WindowMaker script that works in a similar way to your DoorMaker script.
    I'm aware of the Windowizer script which is pretty good.
    However, the window geometry is only correct when viewed from one side and needs to be finished off manually from the unfinished side. (Still quicker than creating a window from scratch).
    ...
    Regards
    Howard L'

    PS
    My favourite episode is the one with the visiting bishop who hates rabbits !!!

  • Clearing 3D Warehouse information saved in a SKP file

    5
    0 Votes
    5 Posts
    8k Views
    TaffGochT

    Al,

    There's a problem ( perhaps - please confirm )

    I've been experimenting for a week-or-so regarding the problem with the Model ID being 'inherited' from a parent model, when using the 'Save as...' or 'Save copy as...' commands. As you noted, the 'cloned' file has the same 'mid' number as the parent model file. I've been testing ruby code with the ruby console.

    Problem description

    I discovered how to delete the 'ModelID' key, exactly the same way you coded in your ruby script. I could indeed upload the 'clone' file to the 3DWarehouse, as a 'new' model. I then completed the upload process by saving the file before closing it, as you're supposed to, in order to save the new ModelID into the 'clone' model file. When I reload the model, there is NO 'ModelID' key stored in the file.

    Doing it again, I checked for a 'ModelID' key as soon as the upload was successfully completed. Again, no 'ModelID' key! In the ruby console, I am using the following to return the 'ModelID' key:

    Sketchup.active_model.get_attribute('3DWarehouse','ModelID')

    Experimenting further, I found that the Warehouse apparently does generate a new 'mid' number, but it either does not return it to my model in SketchUp, or the model fails to accept it. Additional testing revealed that a new 'mid' number does not get coded into the model unless the entire dictionary, '3DWarehouse' is deleted. (This deletes the 'ModelID' key, which is contained in the dictionary.) I used the following in the ruby console:

    Sketchup.active_model.attribute_dictionaries.delete('3DWarehouse')

    Checking afterwards, the dictionary and key are indeed deleted. Uploading to the Warehouse is accepted as a new model, and a new 'mid' number is generated, just as before. Upon completion, and checking my model for the 'ModelID' key, the correct number is, this time, returned in the ruby console (by correct, I mean it matches the URL 'mid' number.)

    By using, primarily, the two ruby snippets above, I'm convinced that deleting just the key doesn't completely fix the problem - the dictionary has to be deleted, as well.

    During testing, I also used these two snippets (for diagnostics):

    Sketchup.active_model.attribute_dictionary('3DWarehouse').keys

    Sketchup.active_model.attribute_dictionary('3DWarehouse')

    Would you be so kind as to confirm this behavior? If your posted ruby script requires revision, now's the time to catch it, before many people download or reference it.

    Regards,
    Taff

  • Change dimension font size from within a ruby script?

    2
    0 Votes
    2 Posts
    964 Views
    R

    Unfortunately, no. Ruby access to dimension objects is pretty much non-existent. Sorry...

  • PathCopy.rb does not show

    13
    0 Votes
    13 Posts
    4k Views
    R

    Susan,

    Thanks for doing my tech support for me πŸ˜„ I guess that's what happens with time zone differences...

  • Plugins folder in different place/path on computer

    7
    0 Votes
    7 Posts
    856 Views
    T

    Thanks azuby. I also found a description on my Mac by going into Terminal and typing "man ln". I figured that's what they were.

    Todd

  • How to save user settings across sessions?

    10
    0 Votes
    10 Posts
    2k Views
    R

    I use attributes to store data in a model when it's relevant to the model (like in my ToDoList plugin). But something that would be comparable to a "global" setting is best (IMO) put into something external - registry/ini file/other text file.

Advertisement