🏒 PlaceMaker | 25% off for February including new Google Earth data imports! Learn more
  • SketchUp Orbit Tool

    3
    0 Votes
    3 Posts
    481 Views
    A
    Working on a viewing/walk though/demo plugin. It will allow to create a walk through path and several other options. One of the options is an orbit path. If the center of the orbit is not specified I want it to do whatever sketchUp does.
  • Ruby Script for coloring the selected objects

    4
    0 Votes
    4 Posts
    1k Views
    H
    Thank you very much. The code worked and will be uploading soon... And I am learning ruby for sketchup from basics now..
  • Inputbox with drop down list question

    10
    0 Votes
    10 Posts
    3k Views
    TIGT
    Dan, I stand corrected - clearly the skethcup.rb's 'inputbox' is to be preferred to the UI. version...
  • Determine the origin of a component in world space

    3
    0 Votes
    3 Posts
    175 Views
    S
    @tig said: Every group or component-instance has a complex transformation giving 3d location, rotation, scaling and so on... You can use that insertion_point = instance.transformation.origin I had a feeling you'd be the one to answer TIG, and Thank you, thank you, thank you. Works perfectly. I spent hours pulling hair on this. Don't know why I didn't think of that.
  • Which face is closest?

    7
    0 Votes
    7 Posts
    228 Views
    voljankoV
    @tig said: If you want to know the orientation of a face relative to its edge, then use this http://code.google.com/apis/sketchup/docs/ourdoc/edge.html#reversed_in? You can then compare the three faces sharing a common edge and if one is 'backwards' used face.reverse! OR use face.normal.reverse in the testing ??? This could be exactly what I need,have to test first. Thanks.
  • Double bounding box

    11
    0 Votes
    11 Posts
    396 Views
    Dan RathbunD
    @voljanko said: @dan rathbun said: group.local_bounds() Yes,it is working,I have test it....BUT,it is only available for groups,not components. This is because .definition() is exposed to ComponentInstance objects, so: def get_local_bounds(obj) case obj when Sketchup;;Group obj.local_bounds() when Sketchup;;ComponentInstance obj.definition.bounds() else obj.bounds() end end
  • Find middle edge in four way junction

    8
    0 Votes
    8 Posts
    197 Views
    TIGT
    If a vertex has four edges you trap that each edge only has one face [a taken]. If you get the vertex_normal and use a plane through the vertex.position to flatten [project] the vectors onto for the 4 edges being tested, can we ever get a zero length vector ? I think not, because the dot processing will never make a plane that's 'square' to a given vector - as there must always be some of the 4 edges spring off at angles...
  • Def help!

    6
    0 Votes
    6 Posts
    215 Views
    T
    @kyyu said: Try this: thanks I will give it a try!
  • Explode 1 level component

    8
    0 Votes
    8 Posts
    235 Views
    jolranJ
    So I was wrong in everything I said Yes it was part of some longer piece, I copy and pasted it wrong, sorry.
  • Reverse faces after pushpull??

    8
    0 Votes
    8 Posts
    444 Views
    TIGT
    My idea of using a temporary group means that the faces in the group are all that's needed to consider for reversing - so it very quick; if you are making lists of all entities before and after a pushpull then there might be thousands of them to sift through, twice! ... So why not make a group, add a circular face, pushpull it, reverse the faces in the group, re-add a circular face to the group and erase it, then add a circular face to the main-face and erase it to leave a hole over the grouped 'recess', and finally explode the group? It will be much quicker in most circumstances... and 'safer' too...
  • Problem when running Ruby Script from command line

    16
    0 Votes
    16 Posts
    4k Views
    TIGT
    @dan rathbun said: But I think his intention, is to do batch mode export to dae for a whole dir of skp files. So manual drag-n-drop is out of picture. He can use a shell script, no doubt,... ... but he could also do batch export, from within SU Ruby. You can drop multiple files onto a MAC command file or an 'applet', they are processed in turn, so the code could in turn make txt>>rb, open each SKP dropped; the rb file doing the SKP export, renaming itself txt and closing the SKP for each one. A much simpler way to export a folder of SKPs as .dae is to have a permanently loaded Ruby tool - I quickly wrote this as an example... http://forums.sketchucation.com/viewtopic.php?p=347277#p347277
  • Creating Components in Cab.rb

    26
    0 Votes
    26 Posts
    1k Views
    F
    I fixed a few things and realized I could call the instances I added to the global component by different names. It does run slow but I still haven't looked into optimising scripts so hopefully I can speed it up some though I don't mind it though, it's faster then creating a cabinet from scratch. Next on the to do/ to learn list is... Creating door and drawer fronts, creating drawers... shouldn't be a problem. Add a user defined number of shelves and insert them evenly spaced in the cabinet... I can do this manually/individually but the math involved in doing them automatically should be fun to figure out! Same thing for door and drawer fronts. And give a choice of creating an upper or lower cabinet since the building of these is different... I could use 2 different scripts like I did when moding the cab.rb script but I think it would be slick having it all-in-one. Add grain direction And eventually learning how to export the to a csv file so that I can populate an existing excel spreadsheet that I use... yes I know there are already some cut sheet/list scripts but this is more of a hobby/learning experience and I'd like to see what I can do. That should be it but I'm already happy with the progress I've made in just 3 or 4 days or learning this stuff. Again thanks for all the help I really appreciate your teach how to fish approach. Frank Test.rb
  • Some odd UV coordinates

    6
    0 Votes
    6 Posts
    190 Views
    thomthomT
    What are the UV coordinates you're getting that's so huge? I'm not sure if I've understood the issue. Is it with distorted textures?
  • Observers and undo question

    11
    0 Votes
    11 Posts
    235 Views
    thomthomT
    It's been a bit back and forth. I think it might be a combo - depending on what you do. Even they find the topic troublesome.
  • JQuery 1.5 Released

    3
    0 Votes
    3 Posts
    315 Views
    thomthomT
    @jim said: jQuery 1.6.2 released. Beware to read the change notes from 1.5.x to 1.6.x if you are upgrading.
  • Groups

    15
    0 Votes
    15 Posts
    212 Views
    TIGT
    Please don't reuse references or confuse them with methods etc - coding is complicated enough as it is I suggest you prefix new groups with a single meaningful letter, and suffix their entities with 'ents' So 'sgroup' > 'sents' and 'rgroup' > 'rents' etc. Then any other reference to 'step' or 'rail' will pass without incident... And you can easily spot the relationship of s=step and r=rail For example, I always call my temporary group 'tgroup' and its entities 'tents'.
  • Window handle from process

    37
    0 Votes
    37 Posts
    3k Views
    Dan RathbunD
    @tig said: Can't you can simply .... After having explained that using the title bar text is problematic (and subject to a bug while loading on Windows,) you still advise doing it? Again, the "Untilted" string is NOT the same on all language localizations, and some contain unicode characters. It's also possible that a SKP filename could contain unicode characters. Then you add two more situations that can "throw a shoe in the works". @unknownuser said: **, the designer and original implementor of C++":37wih2kn] "If you think it's simple, then you have misunderstood the problem" [floatr:37wih2kn]Did you really really say that? - Bjarne Stroustrup's C++ FAQ[/floatr:37wih2kn]
  • Requiring Socket on Mac crashes SU

    12
    0 Votes
    12 Posts
    1k Views
    Dan RathbunD
    @jhyuk said: Thanks a lot!!! I was able to change the symlinks and make it use 1.8.7 of the mac and copied the socket.bundle from that version and everything is working fine!! Now wouldn't it be nice if Sketchup had a button that you could press or a checkbox and it automatically used your full system Ruby install instead of that old v1.8.5 initial dead release ??
  • Draw on face

    4
    0 Votes
    4 Posts
    245 Views
    TIGT
    A line added in code will NOT split a face/edges unless you call some sort of entities.intersect_with() method... If the line is being added in in code you can check the picked points with a pick_helper to see if a face is picked under the point. Then you know the face is under a point, what the face is and then check that both points are on the same face ? http://code.google.com/apis/sketchup/docs/ourdoc/pickhelper.html#picked_face
  • NURBS plugin version 0.1

    28
    0 Votes
    28 Posts
    3k Views
    thomthomT
    @unknownuser said: How is thomthom doing the Bezier Surface? Ruby only? Currently in Ruby. But once I get things working and I can start profiling I'll probably move some stuff into a C Extension to do the main bulk of the bezier calculations etc.

Advertisement