sketchucation logo sketchucation
    • Login
    1. Home
    2. honoluludesktop
    3. Topics
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    ⚠️ Important | Libfredo 15.8b introduces important bugfixes for Fredo's Extensions Update
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 151
    • Posts 2,177
    • Groups 1

    Topics

    • honoluludesktopH

      Trim Edges

      Watching Ignoring Scheduled Pinned Locked Moved Plugins
      4
      0 Votes
      4 Posts
      685 Views
      TIGT
      Yes, it works in any plane - the lines must be coplanar and potentially intersect...
    • honoluludesktopH

      Banned file extetion names for upload

      Watching Ignoring Scheduled Pinned Locked Moved SketchUp Discussions sketchup
      3
      0 Votes
      3 Posts
      214 Views
      thomthomT
      zip it. works and saves diskspace and bandwidth
    • honoluludesktopH

      How would this study be accomplished with a modeler?

      Watching Ignoring Scheduled Pinned Locked Moved Corner Bar
      4
      0 Votes
      4 Posts
      179 Views
      K
      @unknownuser said: ...Sketch Clearly...or else they will just be nothing but...lines... I forgot who said that, but it always helps
    • honoluludesktopH

      Changing transformation variables

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      13
      0 Votes
      13 Posts
      698 Views
      M
      @honoluludesktop said: Hi Martin, I originally posted an application that did some simple transformations, and became interested in the subject. As you know I am a beginner at all of this and while experimenting, I tried to change some values just to see how my components would behaved, failed to do so, and asked for help Fine. I was afraid you overlooked available ways of getting stuff moved / rotated / scaled. I know I did when I started fiddling.
    • honoluludesktopH

      Transformation

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      9
      0 Votes
      9 Posts
      400 Views
      honoluludesktopH
      I was drawing the matrix from memory of a screen dump the night before and thought elements [9], [10], and [11] were the component's origin. So I tried to make that fit the illustration of your matrix, and erroneously guessed at the order:-)
    • honoluludesktopH

      ? on transformation

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      4
      0 Votes
      4 Posts
      271 Views
      J
      .transform! uses the Group's or Instance's current Transformation and applies the new one (change by a Transformation) .transformation= simply replaces the Group's or Instance's Transformation with the new one (change to a Transformation.) For example, if you use the IDENTITY matrix: entity.transform!(IDENTITY) - no change. entity.transformation= IDENTITY - position, rotation and scaling are all reset.
    • honoluludesktopH

      Help with Components

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      30
      0 Votes
      30 Posts
      4k Views
      honoluludesktopH
      Yes, "comp_entities" is the exploded array. OK, so when I see is_a? in this manner, the do loop is "select(ing) the entity(s)" in the array that is a (are) %(#FF0000)Sketchup::Drawingelement. Is it faster (better) then: comp_entities.each do |e| if e.is_a? Sketchup;;Drawingelement comp_new.push e end end Addenda: Corrected as noted below.
    • honoluludesktopH

      Transformations

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      29
      0 Votes
      29 Posts
      2k Views
      C
      @zitoun said: I have no clue what these are yet, but I guess I somehow can retrieve my rotation matrix from such component... Note that a transformation has the .to_a method as well which gives you exactly the information you're looking for. The array it returns is 16 floats for the four by four matrix which defines the transformation from the components defining coordinate system to the current coordinate system. Since you mentioned quaternions I'll assume you're familiar with with the essentials of matrices and linear transformations. First, we can interpret the scaling and rotation of a component as the action of a matrix on the basis vectors of the component definition. Say for example you define your component relative to the standard basis of x=[1,0,0], y=[0,1,0], z=[0,0,1]. Rather than keeping these vectors separately, you can just encode them as the 3x3 identity matrix, and then define all the entities in the component relative to this matrix. From here, any sort of rotation/scaling can be interpreted as a change of basis. The trouble of course is that any linear transformation preserves the zero vector, so you can't model a translation in this way. This means to fully describe the relative coordinates you require a an equation of the form Ax + b where A is an invertible 3x3 change of basis matrix and b is the translation vector with x being the "defining" vector of some entity internal to the component. This is where the clever bit comes in. You can model an affine transformation of the form Ax + b as a single matrix transformation by embedding it into a space with one higher dimension. This is why the transformation.to_a method returns a 16 entry array, it's a 4x4 matrix with the first four entries being the first column, the second four entries being the second column and so on. It's easy enough to extract the original 3x3 matrix and the translation vector as well, the "upper-left" 3x3 block matrix is exactly the change of basis matrix A, and the final column vector is of the form [b, 1] where b is the translation vector. From here extracting the rotation matrix is a simple matter of matrix algebra since any change of basis matrix A can be decomposed as A = QS where Q is a rotation matrix and S is a diagonal matrix representing the scaling of each axis. It's worth getting to know the 4x4 representation if you haven't before since it's also the way the OpenGL standard models the objects. The ability to model vector addition as matrix multiplication is only one of the reason they do it, the other being that when you're rendering perspective views rather than simply orthographic views the value of the bottom right entry plays an important role in correcting the scale of the transformation after applying the perspective matrix.
    • honoluludesktopH

      Passing arguements

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      6
      0 Votes
      6 Posts
      288 Views
      honoluludesktopH
      Guys, thanks for the help. Chris, I will look very carefully at your example.
    • honoluludesktopH

      API bugs

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      9
      0 Votes
      9 Posts
      309 Views
      thomthomT
      Yea, template snippets would be nice.
    • honoluludesktopH

      Rotate Component Axis

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      9
      0 Votes
      9 Posts
      531 Views
      honoluludesktopH
      Hmm... on further inspection, while I can apply the method, I did not get the desired output. The resulting transformation has the bounding box, and axis (I think) pointing in the right direction, but the component did not return to its original location. Maybe I can figure it out this weekend. I often use UI.messagebox (variable) to check my work as I go along, but some (?) of the transformations do not seem to display until the program has been completed.
    • honoluludesktopH

      Angle = vector1.angle_between vector2

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      6
      0 Votes
      6 Posts
      358 Views
      honoluludesktopH
      Tossed everything, went "mushin", empty mind, back to the api, and found in one line, exactly what I was trying to do: new_transformation = Geom::Transformation.new(point,vector_z) Sigh.....what was I thinking before?-(, Thanks for trying to help.
    • honoluludesktopH

      Bounding box

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      4
      0 Votes
      4 Posts
      353 Views
      thomthomT
      Moved the thread to the Developer's forum. We have reorganized so that the Plugin section is only a list of plugins you can download and use.
    • honoluludesktopH

      SU 7.1 point release?

      Watching Ignoring Scheduled Pinned Locked Moved SketchUp Discussions sketchup
      2
      0 Votes
      2 Posts
      265 Views
      soloS
      http://forums.sketchucation.com/viewtopic.php?f=15&t=23731
    • honoluludesktopH

      Components

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      12
      0 Votes
      12 Posts
      794 Views
      honoluludesktopH
      TIG, Got it, thanks: model = Sketchup.active_model selection = model.selection selection.each do |i| puts "Component(s)" if i.is_a? Sketchup;;ComponentInstance puts i.definition.name i.definition.entities.each do|j| if j.is_a? Sketchup;;ComponentInstance puts j.definition.name j.definition.entities.each do|k| if k.is_a? Sketchup;;ComponentInstance puts k.definition.name end end end end end end Now, to organize as a proceedure to accomplish the above (3 levels) to the nth level:-}
    • honoluludesktopH

      Reading the SU API

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      17
      0 Votes
      17 Posts
      896 Views
      M
      @honoluludesktop said: ... If so is it efficient? Twentieth century issue.
    • honoluludesktopH

      How to use Ruby API

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      28
      0 Votes
      28 Posts
      2k Views
      honoluludesktopH
      Darn, I finished coding only to discover the "putdxf" I use for my CAD import has a bug that fails to locate multiple blocks correctly. I confirmed this by being unable to "putdxf" with the system's "getdxf". Will have to rewrite as a "command line" script. Thanks for everything, sorry I couldn't understand much of what you tried to explain to me. But, because of your help, I will get better in time
    • honoluludesktopH

      Ruby variables

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      8
      0 Votes
      8 Posts
      1k Views
      honoluludesktopH
      OK, I think I figured it out: module module.method01 . data=module.module02(data) #call method02 . end module.menthod02(data) . data=..... end end #menu I should have known that:-) Now, whats a CLASS?
    • honoluludesktopH

      Atelier

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      1
      0 Votes
      1 Posts
      361 Views
      No one has replied
    • honoluludesktopH

      Editing string variables

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      9
      0 Votes
      9 Posts
      339 Views
      thomthomT
      Plus, regex can handle the Unicode data from Sketchup, which SU's Ruby doesn't.
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 6 / 8