🔌 Smart Spline | Fluid way to handle splines for furniture design and complex structures. Download
  • Problem adding instance of child component

    7
    0 Votes
    7 Posts
    241 Views
    K
    Ok I tried the other method c2=@model.entities.add_instance(ent_def,insert_tran) when I first looked at the suggestion I thought that was how I added the instance in my origional code but closer inspection I noted that I was using c2=@model.active_entities.add_instance(ent_def,insert_tran) Once I replaced active_entities with just entities the code worked also. Thanks Keith
  • Why is my Group deleted while trying to add entities to it?

    20
    0 Votes
    20 Posts
    1k Views
    T
    Also, even if you don't use it, group.entities.add_faces_from_mesh and group.entities.fill_from_mesh seem to delete everything existent in that group. Edit: thomthom corrected me, sorry. Also, i wrote group.fill_from_mesh instead of group.ENTITIES.fill_from_mesh. I'm going to crawl back to my hole now, one post, two mistakes is quite embarrassing.
  • Detect if SU was started with a template or a model

    3
    0 Votes
    3 Posts
    147 Views
    daikuD
    Worked Perfectly. Thanks, Tig!
  • Push pull problems/face orientation wobbly

    3
    0 Votes
    3 Posts
    394 Views
    S
    Thanks Dan. Will do. [edit] In the end I set up a vector in the direction I wanted the face to go and used "samedirection" to check and used reverse liked you suggested. Initially I tried 'parrallel?' not thinking that that wouldnt catch vectors in the exact opposite direction. if not(face.normal.samedirection? correctV3d ) then face.reverse! end This worked.
  • Rotation about the origin

    6
    0 Votes
    6 Posts
    408 Views
    daikuD
    This already exists here: http://rhin.crai.archi.fr/rld/plugin_details.php?id=345 and here: http://forums.sketchucation.com/viewtopic.php?f=323&t=9739&hilit=rot90 Perfect for mapping to a shortcut key.
  • Retrive the tool selected before launching my plugin

    12
    0 Votes
    12 Posts
    787 Views
    N
    Now, I'm using name to identify the tool For this moment it works I don't understand the ID method, maybe when I feel ill at ease with ruby, I can understand how it works Thank you Dan and Karen !!
  • Webdialog: set_url and write html in a file? how?

    11
    0 Votes
    11 Posts
    783 Views
    bomastudioB
    I've just used the wget.exe tool. And it works!! But I had some trouble with the system command....
  • Hierarchy question

    3
    0 Votes
    3 Posts
    176 Views
    Dan RathbunD
    Edited the first paragraph of my reply (above,) to make it more clear that the entities collection, belongs to the ComponentDefinition, and not the instance (be they groups or components.)
  • Sketchup and ruby

    5
    0 Votes
    5 Posts
    491 Views
    S
    Thank you very much TIG and kwalkerman. I have tried some simple codes.And the tool interface and pickhelper will be just fine for the task. But now it raised a problem. I want to select a whole sketchup entities object, as one object. So that when I click anywhere on that object (like a house or a building), the same data record will be retrieved from the database. The database contains a record for each house. Do you have any idea about this? Thank you
  • Meshing question

    10
    0 Votes
    10 Posts
    393 Views
    M
    Merci quand meme! Ca fait plaisir de discuter de toutes facons. OK, It's still on! Pilou thought I was looking for plugins, not for coding methods.
  • 3D view inside my website

    12
    0 Votes
    12 Posts
    1k Views
    T
    A friend of mine sent me the following link, looks like another reason to buy an iPad soon. http://itunes.apple.com/ca/app/magicplan/id427424432?mt=8&ls=1 I'm curious for feedback, .... any ipadies out there willing to testdrive this app?
  • HELP setting up a SU code editor

    97
    0 Votes
    97 Posts
    10k Views
    C
    I did a search on the aptana site for "sketchup" and didn't find anything. Are there any installation instructions on how to pair up aptana and sketchup? @thomthom said: That's an interesting article. @unknownuser said: You can download Aptana Studio and RadRails, but the installation process is long and complicated. Besides, if you just want a Ruby editor, downloading a 30-day evaluation version of the gigantic Aptana Studio isn't worth it. Complicated installation process? And the thing is free. http://www.aptana.org/ Anyway - are you able to set breakpoints etc in SU plugin scripts and run them from Eclipse?
  • One-liners

    22
    0 Votes
    22 Posts
    1k Views
    N
    I've actually gone and changed my first post so that semi colons are allowed, and have modified your magic formula so the 3 steps are all in one line. I wanted no semicolons to avoid people going crazy with them (you could essentially write a whole program with them in one line of text). How about 3 semi colons maximum?
  • Copy tool --> no preview

    14
    0 Votes
    14 Posts
    510 Views
    N
    @dan rathbun said: @thomthom said: Instead of a timer, wouldn't DefinitionObserver.onComponentInstanceAdded be better..? https://developers.google.com/sketchup/docs/ourdoc/definitionobserver#onComponentInstanceAdded He is a month-old newbie.. I didn't want to go into observers with him yet. right ! thanks not "month-old", I'm "week-old" newbie !
  • Stumped

    2
    0 Votes
    2 Posts
    194 Views
    TIGT
    I moved your post to a more appropriate place. There are several good threads here - e.g. http://forums.sketchucation.com/viewtopic.php?f=180&t=10142 Also 'Automatic Sketchup' is a good general primer. http://www.autosketchup.com/ On your particular subject... You have already go something like mytext=Sketchup.active_model.active_entities.add_3d_text(xxxxxxxxxxxxxx) where ' xxxxxxxxxxxxxx' represents the various arguments that you need to pass to the method... This then adds the 3d-text as 'raw geometry' into the current context [usually the model's entities]. If you look at the API section on 'entities' https://developers.google.com/sketchup/docs/ourdoc/entities there are lots of ways to add things to ANY 'entities' collection... So to add a group to the model.entities use group=Sketchup.active_model.entities.add_group() Now you have a group in the model and can add things to that group's entities, instead of the model, thus... group.entities.add_3d_text(xxxxxxxxxxxxxx) Now the 3d-text's geometry is inside 'group'... You can add more things into it, or change its name, material, layer etc as you now have a reference to it ' group'... You can even add groups inside such new groups etc, as you desire...
  • Mystery

    4
    0 Votes
    4 Posts
    244 Views
    M
    @tig said: Are all of your methods wrapped inside a module and/or class ? I'd be surprised that Fredo has a raw 'deactivate' method I suspect you do ! It might be an observer trapping your error into his own error reporting, assuming it's his tool's error... The standard Tool deactivate method is def deactivate(**view**) ...Try adding that inside a Tool class... ??? https://developers.google.com/sketchup/docs/ourdoc/tool#deactivate YES! That did it! Yes it was all within a class. Just adding "(view)" solved the problem. I didn't change anything else. The deactivate method was within the class and still is. Yes indeed I strongly suspected that Fredo had nothing to do with this. Thanks TIG and Dan.
  • Looking for a Developer

    4
    0 Votes
    4 Posts
    195 Views
    J
    @dan rathbun said: Are you the JL2004 who posted this ?? https://groups.google.com/forum/?fromgroups#!topic/sketchupruby/2Tdb5bYyyd8 No that is not me. I am looking through the Ruby Guide as well as teaching myself Ruby. Just feel its taking a long time and its something I would like to get out sooner than later.
  • Define possible (manifold) groups in a model

    2
    0 Votes
    2 Posts
    154 Views
    TIGT
    Perhaps start from a different angle... A manifold solid group has the following properties... It contains only faces and their edges. AND these edges can only have two faces - no fewer, no more. So this is start - you can eliminate all other faces/edges ? The number of permutations will always expand exponentially... What is it you are trying to do, exactly ?
  • Menus & Tools

    11
    0 Votes
    11 Posts
    560 Views
    N
    @dan rathbun said: @niccah said: Just a small question: Why you are writing " Sketchup.require"? Are there any differences to the "normal" require? FYI: The "normal" require (and load,) comes from module Kernel. Sketchup.require and Sketchup.load can call the internal decryption for rbs files, but the Kernel ones cannot. Okay, this sounds logic! Thanks for the information!
  • Plugin for Gaussian bells

    5
    0 Votes
    5 Posts
    268 Views
    D
    thank you very much for the help, great links

Advertisement