sketchucation logo sketchucation
    • 登入
    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!
    🔌 Easy Offset | Offset selected faces in SketchUp in positive and negative offsets. Download

    [Plugin] 3D Parametric Shapes - makes placeable components

    已排程 已置頂 已鎖定 已移動 Plugins
    76 貼文 21 Posters 20.6k 瀏覽 21 Watching
    正在載入更多貼文
    • 從舊到新
    • 從新到舊
    • 最多點贊
    回覆
    • 在新貼文中回覆
    登入後回覆
    此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
    • J 離線
      johnwmcc
      最後由 編輯

      I find I now get the same thing (not working) here - nothing is drawn.

      Will investigate asap.

      1 條回覆 最後回覆 回覆 引用 0
      • TIGT 離線
        TIG Moderator
        最後由 編輯

        Using the default of 10mm [or anything else!] the error message is:

        @unknownuser said:

        Error: #<NameError: uninitialized constant JWM::JWMShapes::Sphere::PolygonMeshHelper>
        C:/Users/TIG/sketchUcloud/plugins/jwm_shapes/jwm_shapes.rb:984:in draw_sphere' C:/Users/TIG/sketchUcloud/plugins/jwm_shapes/jwm_shapes.rb:956:in create_entities'
        C:/Users/TIG/sketchUcloud/plugins/jwm_shapes/parametric.rb:49:in initialize' C:/Users/TIG/sketchUcloud/plugins/jwm_shapes/jwm_shapes.rb:946:in new'
        C:/Users/TIG/sketchUcloud/plugins/jwm_shapes/jwm_shapes.rb:946:in create' C:/Users/TIG/sketchUcloud/plugins/jwm_shapes/jwm_shapes.rb:1731:in block in module:JWMShapes'
        SketchUp:1:in `call'

        This is weird as it worked for me before !
        Looks like a missing module/class ?
        I also get the error with Dome etc...

        TIG

        1 條回覆 最後回覆 回覆 引用 0
        • TIGT 離線
          TIG Moderator
          最後由 編輯

          mesh.extend(PolygonMeshHelper)
          should be
          mesh.extend(JWM::Shapes::PolygonMeshHelper)
          three times...

          TIG

          1 條回覆 最後回覆 回覆 引用 0
          • J 離線
            johnwmcc
            最後由 編輯

            I wonder, TIG, if you can help me understand what's gone wrong in trying to separate the code here from that in the older SU Shapes on the Extension Warehouse.

            The current problem is a name error: I get this error for the Dome and Sphere tools now, which both try to call mesh_additions.rb and fail. The other shapes don't need mesh_additions.rb, so still work properly.

            Error; #<NameError; uninitialized constant JWM;;JWMShapes;;Sphere;;PolygonMeshHelper>
            

            My overall code structure for the Sphere tool goes as follows (Dome has just the same structure), and I don't really understand it (just copied from SU Shapes!).

            file jwm_shapes.rb has:

            module JWM;;JWMShapes
            ...
              class Sphere < Parametric
              ...
              end # class Sphere
            ...
            end # module JWMShapes 
            

            file parametric.rb has:

            module JWM;;JWMShapes
              class Parametric
              ...
              end # class Parametric
            end #module JWM;;JWMShapes 
            

            file mesh_additions.rb has:

            module JWM;;Shapes
            ...
              class PolygonMeshHelper
              ...
              end #class PolygonMeshHelper
            ...
            end #module JWM;;Shapes 
            

            Apparently, instead of (as I expected) the Sphere class looking for

            JWMShapes;;Shapes;;PolygonMeshHelper
            

            it is looking instead for

            JWM;;JWMShapes;;Sphere;;PolygonMeshHelper
            

            What have I done wrong here, and how do I fix it? If you can help, I'll be most grateful

            [Later] The original SU Shapes named the overall module CommunityExtensions instead of JWM, and the mesh_additions.rb code says

            module CommunityExtensions;;Shapes
            ...
              module PolygonMeshHelper
              ...
              end # module PolygonMeshHelper
            ...
            end #module CommunityExtensions;;Shapes
            

            I.E., as well as the name change JWM<-->CommunityExtensions and JWM::JWMShapes<-->CommunityExtensions::Shapes, PolygonMeshHelper was a module, not a class.

            Changing it back from class to module doesn't seem to fix the problem.

            Looking at the above, I see that my mesh_additions.rb SHOULD say JWM::JWMShapes instead of JWM::Shapes

            module JWM;;JWMShapes
            

            , but changing that doesn't seem to fix things either.

            Help please, if you can! I'm temporarily stuck, and thoroughly confused.

            1 條回覆 最後回覆 回覆 引用 0
            • J 離線
              johnwmcc
              最後由 編輯

              I see you posted again while I was replying. Many thanks.

              Will make the changes asap.

              1 條回覆 最後回覆 回覆 引用 0
              • TIGT 離線
                TIG Moderator
                最後由 編輯

                I made the three simple changes which I suggested earlier... and it works without errors.

                You are getting yourself into a tangle... 😕

                Once you put a sub-module named within your all-encompassing 'JWM' module, then its name can be the same as similar names used in others' code...
                The nesting separates them...
                Calling them by your path JWM::... will avoid any that are poorly written by others and are 'global'...

                So be consistent use 'JWM::Shapes', OR if you must 'JWM::JWMshapes' etc consistently...
                Use Notepad++ with all affected files open and fine replace in all so they are internally consistent...
                Perhaps draw out on a sheet of A4 the nested relationships of these modules/classes.
                The full path I changed to works...

                TIG

                1 條回覆 最後回覆 回覆 引用 0
                • J 離線
                  johnwmcc
                  最後由 編輯

                  Once again, TIG, thank you for cleaning up my muddle, and for explaining what's gone on.

                  I will make the changes on my original copy here too, and go back to just called the sub-modules by the same name as the SU Shapes ones - simply Shapes.

                  Have you updated the Plugin Store rbz file, or do I still need to fix the files here then upload them? And would it now be better to delete the attached file in the first post, and replace that by a link to the Plugin Store?

                  Must stop now for a while - will resume later tonight.

                  1 條回覆 最後回覆 回覆 引用 0
                  • TIGT 離線
                    TIG Moderator
                    最後由 編輯

                    @johnwmcc said:

                    Once again, TIG, thank you for cleaning up my muddle, and for explaining what's gone on.

                    I will make the changes on my original copy here too, and go back to just called the sub-modules by the same name as the SU Shapes ones - simply Shapes.

                    Have you updated the Plugin Store rbz file, or do I still need to fix the files here then upload them? And would it now be better to delete the attached file in the first post, and replace that by a link to the Plugin Store?

                    Must stop now for a while - will resume later tonight.
                    Please update your own files / RBZ in the PluginStore.
                    But please remember to click on Publish afterwards 😉
                    I would recommend that you just have the one RBZ in the PluginStore, and add a link to its entry inside 'download' tags.
                    Put that in the very first post: when I update a plugin I usually also add it into that announcement post - a one-click direct-link means that the reader doesn't have to find it again, either in the first-post or by looking within the PluginStore itself...
                    The proper linking URL is http://sketchucation.com/pluginstore?pln=jwm_shapes

                    TIG

                    1 條回覆 最後回覆 回覆 引用 0
                    • J 離線
                      johnwmcc
                      最後由 編輯

                      Plugin store updated to v2.5.3, and first post in this thread now links to it.

                      Downloaded and tested it here in SU2015.

                      1 條回覆 最後回覆 回覆 引用 0
                      • B 離線
                        blajnov
                        最後由 編輯

                        @johnwmcc said:

                        Plugin store updated to v2.5.3, and first post in this thread now links to it.

                        Downloaded and tested it here in SU2015.

                        Works... Thanks!!! 😍

                        1 條回覆 最後回覆 回覆 引用 0
                        • JBJDesignsJ 離線
                          JBJDesigns
                          最後由 編輯

                          @johnwmcc said:

                          Jo Ann - have you ever had another version of Shapes installed, whether from the SketchUcation Plugin store, or SketchUp or Trimble Extension Warehouse? There may still be a conflict, if so.

                          Please go to your AppData/Roaming/Sketchup/SU 2014/Sketchup/Plugins folder, and delete any existing file(s) called shapes.rb or su_shapes.rb, jwm_shapes.rb or jwm_shapes_loader.rb; and delete any existing folder(s) with the name su_shapes or jwm_shapes (including all that folder's contents).

                          Then reinstall the current version (v2.5 at time of writing) of the plugin from the Plugin Store here.

                          If that doesn't work, I'm stumped.

                          Best wishes, and I hope this works.

                          John McC

                          Hi John -- I just updated your 3D Parametric Shapes script, and after restarting SketchUp, it works!!!!! Yeah!!!!!. -- Jo Ann

                          ...you send them to school, you give them books, and they eat the pages...

                          1 條回覆 最後回覆 回覆 引用 0
                          • JBJDesignsJ 離線
                            JBJDesigns
                            最後由 編輯

                            Hi John--

                            I get the following error message when I open SketchUp 2014; can you fix this? Thanks! Jo Ann 😄


                            ErrorMsg4SketchUp.png

                            ...you send them to school, you give them books, and they eat the pages...

                            1 條回覆 最後回覆 回覆 引用 0
                            • JBJDesignsJ 離線
                              JBJDesigns
                              最後由 編輯

                              @tig said:

                              I can't get it to do that !
                              What's the start of the error message say ?

                              Hi TIG,

                              Doesn't matter... I just downloaded (updated) John's 3D Parametric Shapes script and it works!

                              Thanks,
                              Jo Ann

                              ...you send them to school, you give them books, and they eat the pages...

                              1 條回覆 最後回覆 回覆 引用 0
                              • J 離線
                                johnwmcc
                                最後由 編輯

                                Glad you got it going again with little trouble.

                                1 條回覆 最後回覆 回覆 引用 0
                                • E 離線
                                  Einstein
                                  最後由 編輯

                                  Great thanks, johnwmcc, for this plugin! Did you consider designing a toolbar for it? I'm sure for many users it became one of the very basic tools in SU. Having it accessible on top of the screen would be nice 😄

                                  1 條回覆 最後回覆 回覆 引用 0
                                  • J 離線
                                    johnwmcc
                                    最後由 編輯

                                    @einstein said:

                                    Great thanks, johnwmcc, for this plugin!

                                    Thanks for your appreciate comment.

                                    @einstein said:

                                    Did you consider designing a toolbar for it? I'm sure for many users it became one of the very basic tools in SU. Having it accessible on top of the screen would be nice 😄

                                    Not sure I know how to do that, but will consider it when I have time (probably not for at least weeks) - I have several other higher priority projects on the go at the moment, leaving me little time to update this one.

                                    1 條回覆 最後回覆 回覆 引用 0
                                    • 1
                                    • 2
                                    • 3
                                    • 4
                                    • 4 / 4
                                    • 第一個貼文
                                      最後的貼文
                                    Buy SketchPlus
                                    Buy SUbD
                                    Buy WrapR
                                    Buy eBook
                                    Buy Modelur
                                    Buy Vertex Tools
                                    Buy SketchCuisine
                                    Buy FormFonts

                                    Advertisement