sketchucation logo sketchucation
    • Login
    โ„น๏ธ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    [Plugin] 3D Parametric Shapes - makes placeable components

    Scheduled Pinned Locked Moved Plugins
    76 Posts 21 Posters 18.9k 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.
    • ntxdaveN Offline
      ntxdave
      last edited by

      Feature Request- I would like to see a modification that would allow you to specify where the 3D shape is drawn. I currently is always drawn at 0,0,0. While the shape is added to your model as a group which allows you to easily move it, there could be times when that space is occupied and you would have trouble getting to the shape just added. It would be good if you could click the spot where you want the shape added before adding it.

      This was discussed in another thread and it was suggested that I add it as a request in this thread........

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

        I have looked at doing this, but found it too difficult for me. Sorry - I did try!

        I did produce some code that would read the pick point (there are other plugins that I was able to adapt this from).

        But I couldn't see how to incorporate that into saving the parameters of the object, or even how to draw it at the picked point. My Ruby coding skills aren't good enough, I'm afraid.

        But I'd be very happy to have someone else edit the code to do this if they know how!

        Even if they can't do that, it would be very good if the parametric.rb code could be modified to save and list the object parameters IN ORDER - at the moment, they are stored as a hash, which has no intrinsic order, and doesn't list in the order of entry, or necessarily even the same order on different uses. (Again, I'm not a good enough Ruby programmer to know how to do that).

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

          What if you used Components instead of Groups, then simply attached the Component to the mouse cursor for placement using Model#place_component()?

          Hi

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

            I'll see if I can work out how to convert the Group into a Component without losing the parametric properties of the Shape. I think I tried it a while ago, but if I remember correctly, the parametric properties don't survive the conversion from Group to Component, and I couldn't (at the time, anyway) see how to fix that.

            It won't be soon, though - I haven't much time spare from other non-SU projects at the moment.

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

              @johnwmcc said:

              I'll see if I can work out how to convert the Group into a Component without losing the parametric properties of the Shape. I think I tried it a while ago, but if I remember correctly, the parametric properties don't survive the conversion from Group to Component, and I couldn't (at the time, anyway) see how to fix that.

              It won't be soon, though - I haven't much time spare from other non-SU projects at the moment.

              You wouldn't convert the Group to a Component. You would add a ComponentDefinition then add the geometry to the definition. Then call Model.place_component with the new definition.

              parametric.rb will work with the instances. All instances will be updated when edited. I made a quick example using someone's stringer-drawing code.

              parametric-stringer.gif


              parametric-stringer.rb

              Hi

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

                The issue that was raised in another recent thread was that, although the jwm version and the Trimble su_ EWH version are different toolsets with different modules, methods etc, they both ill-advisedly share the same Extension name.

                This means that the first RB to load 'jwm' lays claim to that Extension and loads its code - when the 'su_' version comes along it does not load as it thinks its Extension is already loaded [which it is, at least going 'by-name'].
                So if both Plugins' RB files are installed only the 'jwm' version will loads and appear in the menu !

                This was confusing users who expected them both to load separately.
                Naming one of their Extensions slightly differently would be helpful.

                In passing: the oldie @Last 'shapes.rb' version is only provided in the SCF Plugin store as legacy code [I'll add a note to its entry...]

                TIG

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

                  Many thanks for the guidance and example, Jim.

                  I'll see what I can make of it, but not quickly I'm afraid.

                  As to the naming, I'm happy to change the name to avoid conflict betwwen the Trimble EW hosted and SketchUcation versions.

                  Thought the name change might take a while to get right, but it was a quick set of internal name changes, and I've tested that the new rbz file loads in Windows 7, SU2014 and SU2015 (the latter, in the 64 bit version).

                  Modification now done in downloadable v2.2.8 rbz file in original post at top of this thread.

                  Will update the Plugin Store by this weekend.

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

                    @John

                    You can just change your Extension name to say 'JWM Shapes' or 'Shapes Tool [JWM]' - such names won't clash with the su_ one of 'Shapes Tool' !

                    You both already separate your code inside your own modules and methods, so no issues there...

                    I have added a note to the oldie @Last legacy version in the PluginStore, redirecting to your newer/better version... ๐Ÿ˜„

                    TIG

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

                      Thank you TIG. I've done pretty much what you suggest in the renaming - the module is now JWMShapes, and the .rb file name is jwm_shapes.rb, whereas before both just said Shapes or shapes.rb. The menu label now says 3D Shapes (JWM) instead of just 3D Shapes.

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

                        The version in the PluginStore is already named "jwm_shapes" [.rb & subfile] ๐Ÿ˜•
                        It is unwise to rename loading RB files as any older ones will still get loaded too !
                        But no issues as it still has the same name ??

                        Your module inside the subfolder's 'shapes.rb' was named 'JWM', so it didn't need changing either, as that already separated it from other versions...

                        The Extension name was the only real issue as it was shared by the su_ version !
                        Therefore your version took precedence as it loaded in alphanumeric order before the su_ one and claimed the one available slot.

                        TIG

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

                          Added missing validation checks in v2.2.9 to require minumum of 3 segments or sides for Tube, Pyramid and Torus.

                          Uploaded latest v2.2.9 to Plugin Store, and updated Basic Info version number, Quick Start, and Documentation.

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

                            There is an EXTREMELY old version of Shapes in the Plugin Store, by @Last: Shapes v1.0.

                            The current one is authored by me and Trimble, and is found under the name "SU Draw Parametric Shapes v2.2.7"

                            The version number currently in the Plugin Store is the same as the RBZ here (v2.2.7) - and has been for many months (I haven't updated it recently, and have no current plans for enhancements).

                            I had wondered myself about the o umlaut in the folder name, but have no direct experience of using non-ASCII characters in Windows folder structures, though I do know they can cause problems.

                            I don't think I know how to suggest anything further to help - I don't know of anything specific to this plugin that might cause the problem Emre has reported.

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

                              v2.5 changes the drawn shapes from groups to components, and allows the user to place them at any pickable point, not just insert them at the world origin.

                              Thanks to Jim Foltz for providing sample code which I was able to adapt.

                              See Plugin Store, or the first post in this thread, for the latest v2.5

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

                                John - the plugin did not get published. It has disappeared. I would guess there is a 'publish' button that needs clicked.

                                Hi

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

                                  I've published it for you [v2.5]. ๐Ÿค“
                                  http://sketchucation.com/pluginstore?pln=jwm_shapes
                                  Remember that when you edit the file set in your plugin it is automatically set to be "Unpublished" ['red' button] - this is so there is never a half-baked set of data in the public arena.
                                  Click the 'red' button when you are done, and it goes 'green' = "Published" - the public can see you plugin again.
                                  In other tabs, remember to click the 'orange' button to confirm edited text etc, otherwise those edits are lost when you leave the tab...

                                  TIG

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

                                    Sorry about that - I hope I saved all the edits then - will check later today.

                                    Many thanks, TIG, for fixing my mistakes.

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

                                      I think all the documentation is now updated and the edits are saved - several links to image files were broken though, and I don't know why. Repaired now.

                                      NOTE: I found there were multiple copies of one image and deleting them didn't immediately show them as removed - small bug on the Files tab file uploads page?

                                      1 Reply Last reply Reply Quote 0
                                      • ntxdaveN Offline
                                        ntxdave
                                        last edited by

                                        @johnwmcc said:

                                        v2.5 changes the drawn shapes from groups to components, and allows the user to place them at any pickable point, not just insert them at the world origin.

                                        Thanks to Jim Foltz for providing sample code which I was able to adapt.

                                        See Plugin Store, or the first post in this thread, for the latest v2.5

                                        Has it been tested with 2015?

                                        Since I have the "other" version installed (not your version), what steps do I need to take to update (assuming your updated version is "clean" for 2015)?

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

                                          this version now works fine in all SketchUp versions since at least v8, including v2015.

                                          It is now separated from the SketchUp's own "su_" version from the EWHouse...

                                          They now have separate Extension names and menu items etc, and so they could be installed side-by-side - Although considering the improvements to this tool, I'd now recommend it over the "su_" one - it offers all of its functionality, plus some extra forms and the ability to determine the shapes location as it is created...

                                          Do NOT install the old @Last legacy version !

                                          TIG

                                          1 Reply Last reply Reply Quote 0
                                          • ntxdaveN Offline
                                            ntxdave
                                            last edited by

                                            @tig said:

                                            this version now works fine in all SketchUp versions since at least v8, including v2015.

                                            It is now separated from the SketchUp's own "su_" version from the EWHouse...

                                            They now have separate Extension names and menu items etc, and so they could be installed side-by-side - Although considering the improvements to this tool, I'd now recommend it over the "su_" one - it offers all of its functionality, plus some extra forms and the ability to determine the shapes location as it is created...

                                            Do NOT install the old @Last legacy version !

                                            Thanks for the quick feedback. I think the fact that I can now control where the shape is drawn is a very strong point. I will install it and remove the su_ version.

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

                                            Advertisement