sketchucation logo sketchucation
    • Login
    1. Home
    2. markozeta
    3. Posts
    โ„น๏ธ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    M
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 10
    • Posts 53
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: Get the global rotation of a DC

      Alright, did the matrix math for ya. Ready?

      Your complete rotation matrix for your system is:

      (C_C)(C_B)+(S_A)(S_C)(S_B); (S_A)(S_C)(C_B)-(S_B)(C_C); (C_A)(S_C);;
      (C_A)(S_B); (C_A)(C_B); -(S_A);;
      (S_A)(S_B)(C_C)-(C_B)(S_C); (S_A)(C_B)(C_C)+(S_B)(S_C); (C_A)(C_C);;;

      WHERE:

      S_ represents sine, C_ represents cosine
      A is first angle (rotation about global/local X) - doesn't matter which since global is local for first rotation.
      B is second angle (rotation about global Z)
      C is final angle (rotation about local Y)

      So, you need to make the .to_a matrix of your rotation be equal to this matrix (after normalizing the axis vectors), then solve for A, B, and C. This matrix is very similar to rotation of Z, then X, then Y, but still different.

      posted in Dynamic Components
      M
      markozeta
    • RE: [Work-in-Progress] DC "Animate" record macro

      @thomthom said:

      What are the problems you're having with the attributes? Example?

      Well, I opened up the Sketchup Attribute Manager. http://code.google.com/p/sketchupattributemanager/wiki/Welcome. Using this, I made a simple dynamic component. When I loaded the attributes X, Y, Z onto the component, they showed up on the attribute manager. Then when I moved the block, reloaded the attribute manager, the new coordinates were not updated. This same issue happened when I scales and rotated the component, compelling me to believe the problem was most likely with the attribute manager not reading the dc (even after I hit redraw). I don't know of something similar to the attribute manager that will work with DC's, and that' my real difficulty. Without it, debugging this idea will be difficult without knowing exactly the formatting of the current functions.

      posted in Dynamic Components
      M
      markozeta
    • RE: Get the global rotation of a DC

      Ahh, I see.

      The rotation matrix of a rotation about global x is [[1, 0, 0][0, c, -s][0, s, c]]; rotation about global z is [[c, -s, 0][s, c, 0][0, 0, 1]].

      Rotation about LOCAL y is a bit harder - are you sure this is not global? For this, we use http://en.wikipedia.org/wiki/Rodrigues%27_rotation_formula.

      ` V(rot) = V*c + (Z x V)s + (ZV)Z(1-c), where:

      Lower case are scalars
      Upper case are Vectors
      V(rot) is the new vector
      V is the old vector
      Z is the global rotation vector
      c is cosine
      s is sine

      • indicates dot multiplication
        x indicates cross multiplication`

      Combined, this can get you where you need to go - sorta. Lemme know if you need help on the matrix multiplication.

      posted in Dynamic Components
      M
      markozeta
    • [Work-in-Progress] DC "Animate" record macro

      This was actually my suggestion to all for the google product page information. Then I realized that it should be possible to program myself. At least I think so.

      I know how to do the math, but can't for the life of me figure out how to read attribute dictionaries. I read up on chris fullmer's tutorials on these things, and when I used webconsole with the attribute dictionaries, it didn't help.

      So, bear with me while I work on this idea, but I think I can make it happen. This will be my first script that I'll do.

      posted in Dynamic Components sketchup
      M
      markozeta
    • RE: Get the global rotation of a DC

      @lachlan said:

      Is there some mathematical way to do it? Or even better, an inbuilt ruby command?

      Well, yes and no.

      Take components transformation matrix. Do a transformation.to_a.

      Matrix is 4x4. I'll work with the top row for this example, the other rows are similar.

      1, 2, 3, 0 for top row. Then this is a stretched x-axis, so you must normalize the axis. To do this, divide it by it's magnitude (in this case, it's 1^2+2^2+3^2, or 14. 1/14 = .072, 2/14 = .143, 3/14 = .214) This is the unscaled x-axis (since the transformation matrix is multiplied by the scale factor). Repeat for rows 2 and 3. Four relates to positioning.

      Multiply these 3x3 matrices by itself for nested components. This will get you the global transformation (at least for rotations). Note that you can just normalize the axis at the end of transformation as well - this will allow you to recover the global scale as well. Then use the euler angle formulas to find out the angles (http://en.wikipedia.org/wiki/Euler_angles#Derivation_of_the_Euler_angles_of_a_given_frame)

      posted in Dynamic Components
      M
      markozeta
    • RE: Get the global rotation of a DC

      Rotations are not linear.

      Take a cube, with all 3 lengths different. Copy it. Rotate it 90 degrees on the X, then 90 degrees on the new Y. Take the same cube, rotate it 90 degrees on Y, then 90 degrees on the new X. It's different. This is because rotations are not linear - a + b != b + a.

      Sooo, what to do is realize how sketchup works. Sketchup rotates first on X, then on Y, then on Z. Thus, by rotating along X by 35, then on the new Y by -30, then finally by -36. This creates the same as 45 on Z, then 45 on new X.

      The two are equivalent. http://en.wikipedia.org/wiki/Euler_angles#Table_of_matrices will demonstrate. Sketchup system has a basic rotation matrix using the xyz. This is EQUIVALENT to your system (using ZXY, for example, with a rotation about Y of 0). Do the math yourself, you'll see that you wind up with the same matrix or you'll wind up with a transposed matrix, or to say the least a rearranged matrix. (i.e. what was in row 1 is now in row 2, and what was in column 1 is now in column 2, etc)

      Back to your original question though - those are the global X,Y,Z rotations, assuming that the rotations you are reading are not nested inside of another component- but they are in rotate X, then Y, then Z notation.

      Side note - if you do have a nested dynamic component, and need to get the global rotations of a nested dc, you need to take the rotations of the parent, assemble the rotation matrix as explained in the wikipedia article. Then construct the nested component's rotation matrix. Finally multiply the two matrices together. Once you've done that, deconstruct the product (beware of gimbal lock when you deconstruct the matrix; this occurs if the middle rotation is 0 degrees - however as long as you can deal with a rotation of 2 degrees in the X and 3 degrees in the Z being the equivalent to 3 degrees in the X and then 2 degrees in the Z, you'll be ok).

      posted in Dynamic Components
      M
      markozeta
    • RE: Dynamic Component Copies and Transformation

      Jon,

      I don't know much about Ruby, or components.

      I do know that the "generate report" function of pro version is a ruby script by google, and that it (for the most part) can read this problem. That being said, since this is the weekend and I only have my free version here, take my dynamic flange model (posted in the dynamic components section of these forums), which has multiple, multiple embeded copies as a test model. Run the "generate report" function on that model - I believe it will tell you what the X,Y,Z of each component is - and it will give you the same information as you've been getting. Not much help.

      So, that's what the attribute dictionary is getting. By searching, however, you can pull out information about the copies function (i.e. copy number). You can also find the formula for X,Y,Z by finding _X_Position_Formula (or something similar). Using the direct formula, you could in theory look for the word "copy" in the Position formula, and find out what X SHOULD BE by doing the math yourself.

      Not pretty, but that's the only thing I can think of until I play around with my pro version at work.

      posted in Developers' Forum
      M
      markozeta
    • RE: [Plugin] Proper Animation V1.08 Beta(Updated 14/11/10)

      @dave r said:

      I saw a post in the SketchUp forum about making a paper airplane animation. I was curious and thought I'd play with it. In the attached model, I've got two components. The triangular one is supposed to fold up. As it does, though, it moves away from the other component. When I rotated it, I rotated along the edge common to both. Is there a way to make the component "hinge" on the edge?
      [attachment=1:wt057bzy]<!-- ia1 -->Folding Paper.skp<!-- ia1 -->[/attachment:wt057bzy]

      This seems to be an issue with the transformation.interpolate - interpolate only works by interpolating the movements, but rotations of multiple axis are not linear functions - and therefore cannot be interpolated.

      Instead, to obtain the full information about the object, information about a second point must be known.

      Imagine rotating a ball counterclockwise 90 degrees about the x axis and then 90 degrees CCW about the y axis, v. rotating a ball 90 degrees CCW about the y axis and then 90 degrees CCW about the x axis. It's not the same! The point (0,1,0) would be moved to (1,0,0) in the first instance, and it would be at (0,0,1) in the second instance!

      With a little bit of effort, I think I can fix this (yay for paying attention in my dynamics course!) assuming the author does not mind? It would just take a bit of direct manipulation on the transformation matrix. (and a better understanding from myself of Ruby, it seems I can read ruby but can never write it).

      posted in Plugins
      M
      markozeta
    • RE: Sketchup 7.1 bugs

      I can't select a section plane once I put it in my model!

      Help!

      posted in SketchUp Bug Reporting
      M
      markozeta
    • French, German, Italian, Spanish OH MY!

      Link Preview Image
      Google SketchUp 7 is now available in French, Italian, Spanish, and German

      Follow the SketchUpdate blog for SketchUp news, modeling tips and tricks, user stories and more.

      favicon

      (sketchupdate.blogspot.com)

      Seems like they were working on this all along. Even yesterday I saw that french was 6, now it's 7 for all.

      posted in SketchUp Discussions sketchup
      M
      markozeta
    • RE: [Plugin] Perpendicular Face Tools (UPDATED 26-03-09)

      7.1 bug perhaps? Entering in a fractional value for face size for the circular tool (e.g. 6 3/4") in the VCB results in the circle only coming out to 6" radius.

      And I use this thing all the time... help me out!

      posted in Plugins
      M
      markozeta
    • RE: Sketchup 7.1 bugs

      @remus said:

      [/blatant self promotion]

      Not even 2 days and your taking advantage of the system... ๐Ÿ˜ฎ

      For free. ๐Ÿ˜’

      โค the script! ๐ŸŽ‰

      posted in SketchUp Bug Reporting
      M
      markozeta
    • RE: Dynamic Component, sub-components shift in relative position

      This is a pretty easy fix, just set x, y, z to proper values.

      See attached.

      By setting the X, Y of the cross bar's axis to the correct location, (e.g. 0.75", 0.75"), the cross bar stays in place. Then the farther away bar just needs it's X, Y, Z, coordinates set to equal the length of the component, and tada, the part works fine. Then I just added some bulletproofing (e.g. set LenZ_Part = LenZ_FatherComp), so that way scaling wouldn't mess it up. And turn the scaling handles off, since you won't be using those (I hope not, this would be a bit more complicated if you needed to include dynamic scaling).


      It's a table!

      posted in Dynamic Components
      M
      markozeta
    • RE: LayOut 2.1 - A warning!!!!

      @markozeta said:

      @bjanzen said:

      1. This is true there's not a context menu, but there's easy ways to do "...and on windows, there is no context menu to easily adjust your dimensions as the video shows, so you have to enable the "dimensions setting" on the panel." If you have dimension styles you want to toggle between, you should create a LayOut document with your different styles, File->Save as Scrapbook, then leave that scrapbook open in LayOut. You can then select the dimensions you want to change style, type "s" (it's in shortcuts as "Other/Pick Style"), sample the dimension style you have in your scrapbook, and "Voila" (or "Viola", for you in the strings section), your dimensions have the new style.

      ๐Ÿค“ You guys should post a video of this neat little trick as part of your documentation. I think it would help a ton in people realizing how cool these new dimensions can be.

      Nevermind that - seems you had it, but it was within the last 15 seconds of the Tyson video, which is after my short attention span saw something shiny.

      posted in LayOut Discussions
      M
      markozeta
    • RE: LayOut 2.1 - A warning!!!!

      @bjanzen said:

      What you can't do is put your model on a shared layer and have the dimensions stick to the model as you change the camera or adjust the model in LayOut. Is that what you were thinking?

      Correct. And they don't scale correctly either on the shared layer, either. That makes a lot of sense though, never thought of that.

      @bjanzen said:

      1. This is true there's not a context menu, but there's easy ways to do "...and on windows, there is no context menu to easily adjust your dimensions as the video shows, so you have to enable the "dimensions setting" on the panel." If you have dimension styles you want to toggle between, you should create a LayOut document with your different styles, File->Save as Scrapbook, then leave that scrapbook open in LayOut. You can then select the dimensions you want to change style, type "s" (it's in shortcuts as "Other/Pick Style"), sample the dimension style you have in your scrapbook, and "Voila" (or "Viola", for you in the strings section), your dimensions have the new style.

      ๐Ÿค“ You guys should post a video of this neat little trick as part of your documentation. I think it would help a ton in people realizing how cool these new dimensions can be.

      posted in LayOut Discussions
      M
      markozeta
    • RE: LayOut 2.1 - A warning!!!!

      @gaieus said:

      Have you tried the new dimensioning tool in LO however? ๐Ÿ‘

      It'll save me so much time. Had a brief experience with it, but mostly it's getting used to. The dimension you want must be on the same layer as your model, and on windows, there is no context menu to easily adjust your dimensions as the video shows, so you have to enable the "dimensions setting" on the panel.

      But otherwise, yeah, it'll save me a ton of time.

      posted in LayOut Discussions
      M
      markozeta
    • [REQ - Help] Division!

      I'm writing up a plug-in that for the most part won't help most people, it's a plug-in to divide and conquer my pieces (and set them to layers and scenes, but I won't get into that until the divide and conquer works).

      Essentially, we make pipe. Pipe that is so big, so large, that frankly we need to cut it up into tiny little pieces that will fit on a truck and send it out.

      So, imagine a jigsaw puzzle. I design the entire puzzle in sketchup and then I want to export each individual piece of that puzzle into layout. To do that, I need to make one scene where the entire puzzle is shown, one scene where only piece 1 is shown, one scene where only piece 2 is shown, etc, then export this into layout.

      Oh, and since these are pipes, they're round, and that means that if I leave a single hidden line out of place, I'm screwed over, since those hidden lines have a nasty little habit of appearing on layer zero, which will pop up into layout on the sheets with only one piece on it with everything else hidden, since Layer0 is the default.

      Now this should be easy enough to automate with a script...? I've never been much of an expert in ruby, but I know the basics of an Object Oriented Language, and have written many, many beautiful excel macros, for example.

      posted in Plugins
      M
      markozeta
    • LayOut 2.1 - A warning!!!!

      Error 404 (Not Found)!!1

      favicon

      (sketchup.google.com)

      At the BOTTOM of this page, it says:

      @unknownuser said:

      Warning: If you've made changes to the default scrapbooks or templates that shipped with LayOut 2 (without renaming the files), those changes will be overwritten when you upgrade to Maintenance Release 1. To save your changes, follow the below steps before you upgrade:

      Note it says BEFORE YOU INSTALL 7.1. Be careful with this.

      @unknownuser said:

      Windows

      To save changes made to the default Templates:

      1. Navigate to 'C:\Documents and Settings\All Users\Application Data\Google\Google SketchUp 7\LayOut\Templates.'
      2. Find the template files you want to save, and copy them to 'C:\Documents and Settings~your user name\Application Data\Google\Google SketchUp 7\LayOut\Templates.' The templates will now appear in your 'My Templates' folder in the Getting Started dialog. Alternatively, you can rename the template files you want to save. The upgrade will not overwrite the default files if their names have been changed.

      To save changes made to the default Scrapbooks:

      1. Navigate to 'C:\Documents and Settings\All Users\Application Data\Google\Google SketchUp 7\LayOut\Scrapbooks.'
      2. Find the scrapbook files you want to save, and copy them to 'C:\Documents and Settings~your user name\Application Data\Google\Google SketchUp 7\LayOut\Scrapbooks.' Alternatively, you can rename the scrapbook files you want to save. The upgrade will not overwrite the default files if their names have been changed.

      Mac

      To save changes made to the default Templates:

      1. Navigate to 'Hard Drive\Library\Application Support\Google SketchUp 7\LayOut\Templates.'
      2. Find the template files you want to save, and copy them to '~user name\Library\Application Support\Google SketchUp 7\LayOut\Templates.' The templates will now appear in your 'My Templates' folder in the Getting Started dialog. Alternatively, you can rename the template files you want to save. The upgrade will not overwrite the default files if their names have been changed.

      To save changes made to the default Scrapbooks:

      1. Navigate to 'Hard Drive\Library\Application Support\Google SketchUp 7\LayOut\Scrapbooks.'
      2. Find the scrapbook files you want to save, and copy them to '~user name\Library\Application Support\Google SketchUp 7\LayOut\Scrapbooks.' Alternatively, you can rename the scrapbook files you want to save. The upgrade will not overwrite the default files if their names have been changed.

      This could affect you, be careful!

      Mark

      posted in LayOut Discussions layout
      M
      markozeta
    • RE: Licence

      @thomthom said:

      I got a Pro licence - I've only used it on my Main desktop. But I started wondering - does the licence follow the computer of the user? Can I also use my Pro licence on my laptop?

      Thom,

      We asked Chris in Boulder regarding this. A license for Sketchup will work for a desktop and a laptop, just don't use them at the same time. They'll allow it, just ask the person who sent you your key in the mail.

      posted in SketchUp Discussions
      M
      markozeta
    • RE: [Plugin] 2D Tools

      @earthmover said:

      One other request would be the ability to have leader text that doesn't change size when your scroll in and out. Perhaps there is a setting to change this that I don't know about??? Perhaps an improved leader text tool for 2D tools would be in order.

      Set your text size to be a value in inches, rather than point size.

      Window > Model Info > Text > Font Size.

      Set it for a value in inches and it will be constant. In points it will move zoom with the zoom.

      posted in Plugins
      M
      markozeta
    • 1
    • 2
    • 3
    • 1 / 3