sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    [Plugin] 3d Shapes Tool (was: Pyramid Tool)

    Scheduled Pinned Locked Moved Plugins
    53 Posts 21 Posters 49.2k Views 21 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S Offline
      sahi
      last edited by

      Corrected some errors
      arazdel-13.jpg
      SketchyPhysics_1.zip

      1 Reply Last reply Reply Quote 0
      • L Offline
        lapx
        last edited by

        Can parametric tool be added this. After or during adding shape you can change radius or height parameters. VCB stuff you know. Now this would be fantastic!!! 😎

        1 Reply Last reply Reply Quote 0
        • M Offline
          Macs
          last edited by

          I've noticed is if you draw on a back face, the cone is reversed,
          and for the sphere depends on the order of the edge passed to the add_face
          on the first face created. For the cone the first face is the base, so if it's
          draw on an existing back face, all the cone became backfaced.

          For other shapes i've just finished the regular dodecahedron (the last platonic solid missing!)

          1 Reply Last reply Reply Quote 0
          • M Offline
            Macs
            last edited by

            @lapx said:

            Can parametric tool be added this. After or during adding shape you can change radius or height parameters. VCB stuff you know. Now this would be fantastic!!! 😎

            VCB is fully supported by 3D shapes tool, read low-right corner hints.

            1 Reply Last reply Reply Quote 0
            • urgenU Offline
              urgen
              last edited by

              ...Thanks,SAHI! πŸ˜„

              MACS,don,t stop your work! πŸŽ‰

              --pupil forever...------

              1 Reply Last reply Reply Quote 0
              • JClementsJ Offline
                JClements
                last edited by

                Hi Macs:

                Request to add drawing an equal-sided cube (or maybe elongated one also?) from the center of the first mouse-click. If there was a way to alternate to starting from a corner that would be cool, but not essential.

                And, since SU's rectangle tool doesn't have an option to create a rectangle from its center, this cube tool could also be used to do this by simply not moving the mouse along a third-axis for the 3rd mouse-click (or by double-clicking on the 2nd mouse-click).

                Regards, John.

                John | Illustrator | Beaverton, Oregon

                1 Reply Last reply Reply Quote 0
                • C Offline
                  CPhillips
                  last edited by

                  @jclements said:

                  Hi Macs:

                  Request to add drawing an equal-sided cube (or maybe elongated one also?) from the center of the first mouse-click. If there was a way to alternate to starting from a corner that would be cool, but not essential.

                  And, since SU's rectangle tool doesn't have an option to create a rectangle from its center, this cube tool could also be used to do this by simply not moving the mouse along a third-axis for the 3rd mouse-click (or by double-clicking on the 2nd mouse-click).

                  Regards, John.

                  I like the idea of a center version of shapes. How a shape (or even a line) is centered would be a great option at almost every step in the process. I was thinking that the CTRL key could toggle whether that state (width,height,depth) of the shape is centered or not. That is sort of how the sphere in the SketchyPhysics solids work.

                  1 Reply Last reply Reply Quote 0
                  • TIGT Offline
                    TIG Moderator
                    last edited by

                    OFFTOPIC:
                    Mirror.rb script hands and can also copy the objects if desired - like ACAD...

                    TIG

                    1 Reply Last reply Reply Quote 0
                    • JClementsJ Offline
                      JClements
                      last edited by

                      Chris, I agree. This would be consistent with other SU tools such as the Scale tool.

                      OFFTOPIC:

                      1. A big gripe of mine is being able to scale from the center of a selection along ONLY TWO AXIS directions with one mouse-drag sequence or one entry in the VCB. Primarily at equal distances from the center. I am wondering if some of the coding included in these new hybrid tools could utilized to create such a script?

                      2. Also, when Dragging a side selection handle, you mirror or "flip" an object. However, manytimes I'd like to COPY the flipped object. In some of my 2d apps when dragging an object with the left-mouse depressed, I can drop a copy by clicking and releasing the right-mouse buttom while the left is still depressed. I think this would be a good solution for a similar SU flip-and-copy script.

                      John | Illustrator | Beaverton, Oregon

                      1 Reply Last reply Reply Quote 0
                      • P Offline
                        pav_3j
                        last edited by

                        ah very neat lil ruby there. thank you for the hard work.

                        pav

                        Just won the 'Who is Least Competitive Championships' where trying to win will make you lose. Trying to lose makes you win which makes you lose. Not trying at all makes you lose which makes you win which makes you lose.

                        1 Reply Last reply Reply Quote 0
                        • M Offline
                          Macs
                          last edited by

                          I've finished the work on icosahedron too,
                          now I will try to implement feature you all request and clean the code a little.
                          see you next week.

                          1 Reply Last reply Reply Quote 0
                          • A Offline
                            agrazdi
                            last edited by

                            Is it possible to assign a shortcut key to " create a Box " for instance.?

                            1 Reply Last reply Reply Quote 0
                            • M Offline
                              Macs
                              last edited by

                              I've updated the script see first post for details,
                              here the new toolbar with new shapes.
                              enjoy πŸ˜‰


                              3DshapesToolbar.jpg

                              1 Reply Last reply Reply Quote 0
                              • urgenU Offline
                                urgen
                                last edited by

                                ... Thanks Macs, it,s very useful work. πŸ‘ I like it... πŸ˜„

                                --pupil forever...------

                                1 Reply Last reply Reply Quote 0
                                • M Offline
                                  Macs
                                  last edited by

                                  😎


                                  snowman.jpg

                                  1 Reply Last reply Reply Quote 0
                                  • JClementsJ Offline
                                    JClements
                                    last edited by

                                    No cube/square from center? I tried the pyramid tool to do this with the last click on the same Z plane as the other clicks but, of course, I then get a square or rectangle with diagonals from corner-to-corner.

                                    John | Illustrator | Beaverton, Oregon

                                    1 Reply Last reply Reply Quote 0
                                    • M Offline
                                      Macs
                                      last edited by

                                      I think you can do this with the standard polygon tool and setting 4 sides in VCB

                                      1 Reply Last reply Reply Quote 0
                                      • S Offline
                                        sherwood11
                                        last edited by

                                        This tool (version 1.1) seems very useful .. However, It won't work for me.

                                        It will not complete after the last input
                                        and the blue-pencil pointer stays visible.

                                        It won't complete after :
                                        Cone or Pyramid, 3rd click
                                        Sphere, 2nd click
                                        Rotated Pyramid, 4th click
                                        Dodecahedron, 2nd click
                                        Icosahedron, 2nd click

                                        Any thoughts ?
                                        Is there some kind of setting in SU ?

                                        IE., Cone or Pyramid - Ruby console :

                                        Error: #<NoMethodError: undefined method GetString' for nil:NilClass> C:/Program Files/Google/Google SketchUp 8/Plugins/3dshapestool.rb:616:in create_geometry'
                                        C:/Program Files/Google/Google SketchUp 8/Plugins/3dshapestool.rb:555:in increment_state' C:/Program Files/Google/Google SketchUp 8/Plugins/3dshapestool.rb:213:in onLButtonDown'
                                        C:/Program Files/Google/Google SketchUp 8/Plugins/3dshapestool.rb:616

                                        Many Thanks,

                                        I found a solution !

                                        the problem is with this line in the script :
                                        model.start_operation $exStrings.GetString("shapename")

                                        I could not find the .GetString method anywhere ( after more hours of research than I care to mention).
                                        apperantly, this error message occurs often without meaningfull documentation to remedy. I think
                                        .GetString is some sort-of depricated method in Ruby or OpenGL or something like that ... 😠

                                        I created a class variable for each shapename
                                        placed between 'class PyramidTool' (line 29) and the first 'def Initialize' (line 36 +- ) :

                                        @@threedcone = "Cone"
                                        @@threedpyramid = "Pyramid"
                                        @@threedsphere = "Sphere"
                                        @@threedpolyhedron = "Polyhedron"
                                        @@threeddodecahedron = "Dodecahedron"
                                        @@threedicosahedron = "Icosahedron"

                                        Then I simply replaced every occurance (7) of:
                                        model.start_operation $exStrings.GetString("shapename")
                                        with,
                                        model.start_operation @@_shapename_ . . . . eg. @@threedcone

                                        Done . . . I hope this helps anyone having this problem with the .GetString method
                                        I have several scripts with this that do work ... but, I plan on modifing them also.

                                        Cheers

                                        1 Reply Last reply Reply Quote 0
                                        • J Offline
                                          johnwmcc
                                          last edited by

                                          I've just tried this in Sketchup Make 2013, as this no longer has the 3D shapes built in to the free version.

                                          It crashes Sketchup completely every time ("The Sketchup Application has stopped working"), on the third click to set height(for cone or pyramid) even after system restart, and using the plugin in a completely new drawing.

                                          There's no error message in the Ruby console, just the crash. Entirely repeatable, unfortunately.

                                          Is there an update available that would fix this?

                                          I can't find any other equivalent plugin: if anyone knows of another, I'd be grateful for a pointer to it.

                                          John McClenahan

                                          PS. Have just found the Shapes plugin by the Sketchup team, in the Extension Warehouse. That will do very well. In earlier versions of SU I thought it got installed by default, but it wasn't in SU Make 2013.

                                          1 Reply Last reply Reply Quote 0
                                          • T Offline
                                            TANER TAN
                                            last edited by

                                            Is there working version for Sketchup 2013?

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 3
                                            • 3 / 3
                                            • First post
                                              Last post
                                            Buy SketchPlus
                                            Buy SUbD
                                            Buy WrapR
                                            Buy eBook
                                            Buy Modelur
                                            Buy Vertex Tools
                                            Buy SketchCuisine
                                            Buy FormFonts

                                            Advertisement