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!
    🔌 Smart Spline | Fluid way to handle splines for furniture design and complex structures. Download

    [Plugin] SurfaceGen (0.9.0b) — 28 April 2012

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

      You are right, in that when I get v1.4 of 'recurve' I no longer get these errors with 'surfacegen'. However, I had v1.3 [with SUpv8] and there were no major changes except for making it SUpv6 friendly ?
      Anyway... no more error messages... I'll try to break it 😉

      TIG

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

        Sponge-like object:

        Capture1.PNG

        All my plugins

        1 條回覆 最後回覆 回覆 引用 0
        • D 離線
          driven
          最後由 編輯

          this is great,

          some odd behavior on the Mac... when run from plugins (like you should) I get this

          Error; #<ArgumentError; Cannot convert argument to Sketchup;;Point3d>
          /Library/Application Support/Google SketchUp 8/SketchUp/Plugins/SURFACEGEN_Dir/surfacegen_tool.rb;266;in `add'
          /Library/Application Support/Google SketchUp 8/SketchUp/Plugins/SURFACEGEN_Dir/surfacegen_tool.rb;266;in `getExtents'
          

          if I put the surfacegen.rb into the folder do a restart and then load from Ruby Code Editor, I get this

          (eval);428; warning; don't put space before argument parentheses
          "Run aborted (error has occurred)"
          (eval);428; warning; don't put space before argument parentheses
          (eval);10; warning; already initialized constant SURFACEGEN_DIR
          (eval);11; warning; already initialized constant GRAPH_SIZE
          (eval);12; warning; already initialized constant WINDOW_HEIGHT
          (eval);13; warning; already initialized constant ATTR_DICTIONARY
          "Run aborted (error has occurred)"
          

          but if I restart again and use as_pluginloader.rb to load it I get

          
          /Library/Application Support/Google SketchUp 8/SketchUp/plugins/SURFACEGEN_Dir/surfacegen.rb;428; warning; don't put space before argument parentheses
          

          it works, but has no tool button image...
          the dialog keeps disappearing behind SU, but that needs show_modal on Macs
          this is a 'normal' load i.e. image-no dialog

          learn from the mistakes of others, you may not live long enough to make them all yourself...

          1 條回覆 最後回覆 回覆 引用 0
          • N 離線
            notareal
            最後由 編輯

            @diggsey said:

            @notareal
            That's really nice! What's the equation you used?

            F(x,y,z) = 2-(cos(x+(1+sqrt(5))/2*y)+cos(x-(1+sqrt(5))/2*y)+cos(y+(1+sqrt(5))/2*z)+cos(y-(1+sqrt(5))/2*z)+cos(z-(1+sqrt(5))/2*x)+cos(z+(1+sqrt(5))/2*x))*16/(x*x+y*y+z*z)
            [x]; -5, 5
            [y]; -5, 5
            [z]; -5, 5
            

            There is plenty more at the k3dsurf forum.

            Welcome to try Thea Render, Thea support | kerkythea.net -team member

            1 條回覆 最後回覆 回覆 引用 0
            • N 離線
              notareal
              最後由 編輯

              Perhaps you could add some more functionality; like functions min, max and abs. Also allow use of arithmetic operations and pi in axes, like -2*pi.

              Welcome to try Thea Render, Thea support | kerkythea.net -team member

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

                You already have 'pi' [in lowercase] as a function?Capture.PNG

                TIG

                1 條回覆 最後回覆 回覆 引用 0
                • thomthomT 離線
                  thomthom
                  最後由 編輯

                  @diggsey said:

                  @Pilou
                  Just re-select the group with the select tool. It seems that the SelectionObserver doesn't fire when the selection is changed in code.

                  The SelectionObserver has always been very buggy: http://www.thomthom.net/software/sketchup/observers/

                  Thomas Thomassen — SketchUp Monkey & Coding addict
                  List of my plugins and link to the CookieWare fund

                  1 條回覆 最後回覆 回覆 引用 0
                  • D 離線
                    Diggsey
                    最後由 編輯

                    Just uploaded a fairly major update to the first post!

                    @driven
                    This should fix the issues with macs. It now uses cross-platform methods to locate and load resource, and uses show_modal rather than show on macs with the WebDialog.

                    @notareal
                    The axes now let you use an expression such as 2*pi

                    @d12dozr
                    Helpful error message are now shown when an expression is invalid.

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

                      Thanks 😄

                      Error; #<ArgumentError; Cannot convert argument to Sketchup;;Point3d>
                      C;/Program Files/Google/Google SketchUp 8/Plugins/SURFACEGEN_Dir/surfacegen_tool.rb;270;in `add'
                      C;/Program Files/Google/Google SketchUp 8/Plugins/SURFACEGEN_Dir/surfacegen_tool.rb;270;in `getExtents'
                      

                      One minor error in getExtents in surfacegen_tool.rb
                      Line #270 result.add @p0 if @state >= 0
                      can raise an error so adjusting it to
                      return if !@p0 or @p0.class!=Geom::Point3d; result.add @p0 if @state >= 0 might help - you could also add similar validity checks on the other points that are added to the extents ?

                      TIG

                      1 條回覆 最後回覆 回覆 引用 0
                      • D 離線
                        Diggsey
                        最後由 編輯

                        Ah, I knew I'd forgotten something 😄

                        I've updated the first post. It shouldn't show those errors anymore.

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

                          Cool.
                          The 'rand' function is also interesting...Capture.PNG

                          TIG

                          1 條回覆 最後回覆 回覆 引用 0
                          • D 離線
                            Diggsey
                            最後由 編輯

                            Just updated again fixing a small bug with the expression parser.

                            Check out this graph:

                            http://i59.photobucket.com/albums/g314/diggsey/th_face.jpg

                            Equation = min(((max(abs(y)-(2sqrt(z+4)) ,(x+0.5abs((abs(y)+4)/3.5)/(1+(((abs(y)+4)/3.5)^2-2)^2)/2 2/(1+(z-2)^2)+abs(y/1.5)^3.5/7 ) )max( max( abs(x+0.15+(y/0.7)^2)+(z-1.3)/1.4,max(z-2.3, max( abs(x+0)/2.4 -1+2abs(1.5y)+(z+0.1)/2 , -z ))) ,x-0.8+z/2)-0.1 )*(abs(x+y^2/3)-0.2+abs(abs(z+1.8)-(0.5-(y/2)^2) )^1.2 )-0.1 ),( (x+1.2+abs(y)/10)^2+(abs(y)-1.1)^2/2.5+(z-2.3)^2/1.8-0.64))
                            x: -3 to 1
                            y: -4 to 4
                            z: -4 to 5.4

                            @TIG
                            Yes you can use any built in ruby function;)

                            @jim
                            I can't make the window resizable because it is shown and hidden by resizing it to a fixed value and zero respectively, and there is no API function to get the size of the window to save it. However, you can easily change the height of the window. Open surfacegen.rb in notepad and change the line "WINDOW_HEIGHT = 320" to about "WINDOW_HEIGHT = 350". You can try different values until you get what you want.

                            1 條回覆 最後回覆 回覆 引用 0
                            • D 離線
                              driven
                              最後由 編輯

                              yes,

                              working on the mac...

                              I don't know if I downloaded before or after your latest tweak,
                              is there a version number somewhere on the files?

                              another thing, is it possible to have a 'use last' settings option?

                              playing around with the box size on the head requires [re]inputting the data each time
                              cheers
                              john

                              learn from the mistakes of others, you may not live long enough to make them all yourself...

                              1 條回覆 最後回覆 回覆 引用 0
                              • D 離線
                                Diggsey
                                最後由 編輯

                                If you need to use the same settings as last time just copy and paste the graph, and then change the settings you need to. All the settings are stored as attributes of the graph so will be copied with it. If you need to change the size you can use the scale tool just as easily as creating a new graph.

                                1 條回覆 最後回覆 回覆 引用 0
                                • N 離線
                                  notareal
                                  最後由 編輯

                                  @tig said:

                                  You already have 'pi' [in lowercase] as a function?

                                  Also now in axes... get improvement with other functions too 😄

                                  Welcome to try Thea Render, Thea support | kerkythea.net -team member

                                  1 條回覆 最後回覆 回覆 引用 0
                                  • D 離線
                                    driven
                                    最後由 編輯

                                    BTW.. the varying size of content seen by jim is most likely due to your using [ font-size: 8pt; ] as although 1px=0.75pt different browsers treat pt oddly,

                                    with safari, in SU, on my mac 8pt is reading as 8px and everything fits if a bit small.

                                    learn from the mistakes of others, you may not live long enough to make them all yourself...

                                    1 條回覆 最後回覆 回覆 引用 0
                                    • N 離線
                                      notareal
                                      最後由 編輯

                                      Got some inspiration from http://abdelhamid394.blogspot.com/


                                      surfacegen_SU.jpg

                                      Welcome to try Thea Render, Thea support | kerkythea.net -team member

                                      1 條回覆 最後回覆 回覆 引用 0
                                      • PixeroP 離線
                                        Pixero
                                        最後由 編輯

                                        This is very cool.
                                        Two questions:
                                        Is there any noise available? If not that would be a great addition.
                                        I've tried with rand but that isn't noise. 😞

                                        A few links to good sites with functions and equations for surfaces would also help getting up to speed.

                                        1 條回覆 最後回覆 回覆 引用 0
                                        • D 離線
                                          Diggsey
                                          最後由 編輯

                                          I've updated the first post with version 0.8.

                                          @Pixero
                                          What exactly do you mean by noise? Surely just adding (rand-0.5) will put noise on the graph?

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

                                            Thanks, Diggsey.

                                            Just a minor annoyance. Since the dialog steals the focsus, whenever I select a Surface, my SU shortcuts don't work. For example, select the Surface to move it - press the 'm' shortcut to Move it - can't Move it because the dialog got the keypress. 😞

                                            Hi

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

                                            Advertisement