⚠️ Update | Sketchucation Tools 5.0.8 released with licensing improvements and bugfixes Download

Subcategories

  • No decscription available

    20 Topics
    462 Posts
    HornOxxH
    @pilou said: More appetizing in chocolate! Eggs are good as well - but only very fragile when falling down in SketchyPhysics
  • How to get face which is belong to two group

    9
    0 Votes
    9 Posts
    965 Views
    TIGT
    Try the groups' .bounds if they 'touch', then some_group.bounds.max.x OR .y OR .z and some_other_group.bounds.min.x OR .y OR .z might be coincident ?? Especially if the are simple boxes...
  • Status Text being reset

    3
    0 Votes
    3 Posts
    477 Views
    tt_suT
    There is no way to force a statusbar text to stick around. It's normally set by the active tool, but also by menu and toolbar items. Do you have a sample snippet that demonstrate the issue?
  • Need some help again.

    3
    0 Votes
    3 Posts
    454 Views
    S
    Thanks again TIG! I am very grateful. I knew I was missing something, but was pretty much stumped. Thanks for putting me back on track, and so quickly. Cheers
  • How to attach text to a line

    3
    0 Votes
    3 Posts
    689 Views
    P
    I'm sorry I have tried that .. but that is not what is in my mind.. I just want the text to follow the line even if I move one point only . . doing this manually is possible.. but not for ruby scripts I think..
  • RBZ installation on MAC OS

    3
    0 Votes
    3 Posts
    631 Views
    S
    Hi John, many thanks for your quick reply. It was really helpful. I am now using the command line of winzip in my Powershell script, as you have proposed. The generated RBZ file is now working on my MAC also. Thanks a lot for your help. Sonja
  • Best way to delete entities

    19
    0 Votes
    19 Posts
    8k Views
    Al HartA
    great - that's what I was looking for anyway
  • Problem with modules and classes: undefined method

    5
    0 Votes
    5 Posts
    687 Views
    S
    **It works!**Thanks a lot, you saved my weekend!
  • Newby Ruby "Undefined Method" issue

    3
    0 Votes
    3 Posts
    836 Views
    M
    The code is good. From the console it appears that the first run was ok, and then you ran again the script and the face cannot be created. The problem is that you are trying to create a face object in the same place occupied by the face created before. Clean all your objects first (select all> delete), and try again.
  • Exploding group removes material from a face

    4
    0 Votes
    4 Posts
    611 Views
    TIGT
    inner = [[211.304795230314, 59.3387335473855, 144.121274015103], [198.016313479612, 93.8459200290483, 144.121274015103], [198.016313479612, 93.8459200290483, 209.586476052542], [211.304795230314, 59.3387335473855, 209.586476052542]] outer_right = [[123.368393800971, 287.689711452616, 222.214015434512], [124.599206984753, 284.49356753989, 222.214015434512], [124.599206984753, 284.49356753989, 7.04087985299685], [123.368393800971, 287.689711452616, 7.04087985299685]] outer_bottom = [[123.368393800971, 287.689711452616, 0.0], [123.368393800971, 287.689711452616, 7.04087985299685], [124.599206984753, 284.49356753989, 7.04087985299685], [278.931403899607, -116.27229864223, 7.04087985299685], [280.16221708339, -119.468442554957, 7.04087985299685], [280.16221708339, -119.468442554957, 0.0]] outer_left = [[278.931403899616, -116.272298642254, 222.214015434512], [280.16221708339, -119.468442554957, 222.214015434512], [280.16221708339, -119.468442554957, 7.04087985299685], [278.931403899607, -116.27229864223, 7.04087985299685]] outer_top = [[121.306929034951, 293.042869957925, 227.414539710024], [201.765305442185, 84.110634448818, 323.731055308166], [282.223681849419, -124.821601060289, 227.414539710024], [282.223681849419, -124.821601060289, 222.214015434512], [280.16221708339, -119.468442554957, 222.214015434512], [278.931403899616, -116.272298642254, 222.214015434512], [278.931403899616, -116.272298642254, 227.414539710024], [201.765305442185, 84.110634448818, 314.768300386351], [124.599206984753, 284.49356753989, 227.414539710024], [124.599206984753, 284.49356753989, 222.214015434512], [123.368393800971, 287.689711452616, 222.214015434512], [121.306929034951, 293.042869957925, 222.214015434512]] # place bounding faces temp_group = Sketchup.active_model.entities.add_group outer_right_face = temp_group.entities.add_face outer_right temp_group.explode temp_group = Sketchup.active_model.entities.add_group outer_bottom_face = temp_group.entities.add_face outer_bottom temp_group.explode temp_group = Sketchup.active_model.entities.add_group outer_left_face = temp_group.entities.add_face outer_left temp_group.explode temp_group = Sketchup.active_model.entities.add_group outer_top_face = temp_group.entities.add_face outer_top edges=temp_group.entities.grep(Sketchup;;Edge) temp_group.explode ### edges.each{|e| e.find_faces if e.valid?} # place a textured inner face temp_group = Sketchup.active_model.entities.add_group inner_face = temp_group.entities.add_face inner temp_group.explode ( material = Sketchup.active_model.materials.add("Red") ) unless material=Sketchup.active_model.materials["Red"] material.color="Red" # make 'red' once only inner_face.material = material ### # inner_face.erase! ### alternative # inner_face has lost it's material puts inner_face.material This works. It adds a face within the overall form too. The 'window' is colored after the explosion. Note how I also only make a 'Red' material once. You could erase the 'window' instead of making it 'Red'... The order of operations and exploding groups affects the result, but knowing that you can avoid it.
  • Send_action workarounds?

    8
    0 Votes
    8 Posts
    1k Views
    Dan RathbunD
    On the PC, send_action can process native tool command integer IDs. I pub'd some IDs here (but do not use that file as is. It mods the API.) Just use it for tool ID reference. Somewhere here Thomas also posted a tool ID hash. Ex: Sketchup::send_action( 24201 ) # Union Tool
  • Is an entity in a surface

    13
    0 Votes
    13 Posts
    2k Views
    tt_suT
    That's for that revised version!
  • Problems defining a method

    4
    0 Votes
    4 Posts
    645 Views
    tt_suT
    Your error message pointed to the last line in your code: classify (u, apoint, face1) I suspect it was the space between the method name and parentheses. Especially when you encounter syntax error it's good to go over your code and make sure the code style is consistent. Checking that there are no spaces between parentheses in method calls and making sure you have parentheses around all arguments etc.
  • Prompting user to select objects while running script

    2
    0 Votes
    2 Posts
    368 Views
    tt_suT
    Sounds like you need to implement a custom Tool: http://www.sketchup.com/intl/en/developer/docs/ourdoc/tool You can make the tool select entities the user clicks on by using the PickHelper class. Both these classes has examples in the documentation that will get you started.
  • Find Intersection of 2 curves

    4
    0 Votes
    4 Posts
    710 Views
    C
    From a time complexity perspective I think the problem is inherently O(n^2) (which means that your code can't be any simpler), also, if the curves have few segments and you already know enough to throw away half of them, then I would say your code is probably close to optimal. In general, the simplest way to gain speed is to use bounding boxes in various ways like reducing the input to segments in the bounding box intersection between the curves and so on, however, there are constant costs associated with this so it may not be a gain on small inputs.
  • Entity ID and Materials!

    15
    0 Votes
    15 Posts
    5k Views
    tt_suT
    Ah, yea - there is name and display_name - at least in the Ruby API. name is the unique one that should be used to refer to materials. display_name should be used only to display the material name to the UI. However, it appear that the C API doesn't quite do that. Let me have a chat with the rest of the team.
  • Mac and Materials (with textures)

    12
    0 Votes
    12 Posts
    1k Views
    tt_suT
    I can reproduce what you see when I use a larger texture. I also notice that the Console output is odd. lots of empty lines and a strange order of the lines. I'm not sure what it is yet.
  • Set cursor position?

    11
    0 Votes
    11 Posts
    2k Views
    D
    did you have a look at http://sketchucation.com/pluginstore?pln=InfinitePanOrbit I did a mac hack to help out with it, is that the kind of thing your after? john
  • Mass Material Import with Scale and maintain aspect ratio

    2
    0 Votes
    2 Posts
    420 Views
    sdmitchS
    @lersince1991 said: Hi, I am trying to use this but all the textures are out of scale completely (254mm x 254mm) and lose their aspect ratio. Is there any way (I dont know ruby script) that someone could modify this rb script and give it a prompt for material scale and for it to maintain the aspect ratio? Old discussion: http://sketchucation.com/forums/viewtopic.php?f=180%26amp;t=17857 Original rb download link: http://rhin.crai.archi.fr/rld/plugin_details.php?id=241 Much appreciated! You can specify a size, width and height, but not a scale. If you are interested I can PM you a copy which allows size input for each texture.
  • How to make a toolbar with a dropdown menu

    12
    0 Votes
    12 Posts
    5k Views
    G
    hi guys, situation is the same with sketchup 2014? i want to make a toolbar with organises approx. 50 tools (each tool is simply the link to a dynamic component). A drop-down menu in the toolbar would be I think best solution. Just like the one what appear in "Getting Started" toolbar. I dont want to make the equivalent in webdialogs, it is possible but i think it would be a mess. please, any ideas?
  • Ruby 2.0.0 Threads in SU | how to keep a subthread running?

    20
    0 Votes
    20 Posts
    3k Views
    icehuliI
    @sr20vet said: Yep, I've taken the native threads path. Got the thread running, got even an http server running in that thread. But now, GIL is killing me. Can't call ruby from that second native thread... May I ask what exactly you are trying to do? I think you can call ruby from that second native thread. One important point is that the ruby function needs to be involved in the ruby thread, i.e. the SU thread. So in the c-extension there should be two threads, one is the same SU thread, the other is your second native thread. All ruby codes need to run within the SU thread.

Advertisement