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

    [Plugin][WIP][OpenSource] Bezier Surface

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

      @unclex said:

      It's just always updating...

      Like the GIF[attachment=0:1br0oo34]<!-- ia0 -->8.gif<!-- ia0 -->[/attachment:1br0oo34]

      Cannot Click or DoubleClick

      and when SU opening, nothing prompt

      Any errors in the Ruby Console?
      What SketchUp version?

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

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

        @oxer said:

        Thanks you very much for the plugin!! 👍 👍
        I installed it in SU2014 & SU2015 on Mac but the plugin didn't work, I found a conflict with smartdrop.rb and Sketchyphysics, I deleted smartdrop.rb (I use tt.raytracer now to drop components) and I have deactivated Sketchyphysics on SU2014 with Sketchucation Plugins Manager and Bezier Surface work fine now.
        😍

        SketchyPhysics is known to clash with extensions. I think an update is coming.
        Not sure about smartdrop.rb - not familiar with that one.

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

        1 條回覆 最後回覆 回覆 引用 0
        • OxerO 離線
          Oxer
          最後由 編輯

          A quick test taking like reference the torso of Box.

          Quick Torso Femenino.jpg

          "The result is the end what is important is the process" by Oxer
          [http://www.oxervision.blogspot.com/(http://www.oxervision.blogspot.com/)]

          1 條回覆 最後回覆 回覆 引用 0
          • panixiaP 離線
            panixia
            最後由 編輯

            @thomthom said:

            @panixia said:

            yeah. force encoding blablabla.. getting similar message when loading sketchup

            The bla bla bla bit of error message is in fact very useful for developers when debugging errors - please post all of it when reporting issues.

            i'm pretty much sure that the "blablabla" part of the message returned ad least 3 different values with different tries (that's pretty odd i suppose) the last try being: "Loading File tt_bezier_surface.rb
            undefined method `force_encoding' for #String:0xec947b8no such file to load --" 😲
            hope this can help

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

              I'll mainly focus on my subdivision extension over this one. Though I'll try to maintain small bug fixes and pull requests. I'll see after SUbD is done what I do with this project.

              Btw, I have a fix for the compatibility bug with SU2013 and older. I'll be pushing an update.

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

              1 條回覆 最後回覆 回覆 引用 0
              • jolranJ 離線
                jolran
                最後由 編輯

                @unknownuser said:

                I'll mainly focus on my subdivision extension over this one

                I understand.

                @unknownuser said:

                Btw, I have a fix for the compatibility bug with SU2013 and older. I'll be pushing an update.

                👍

                1 條回覆 最後回覆 回覆 引用 0
                • pilouP 離線
                  pilou
                  最後由 編輯

                  When there is incompatibility (Sketchyphysics 3, SKalp, (my case) etc...
                  Who is faulty ? These plugins or Bezier Surface ?

                  @oxer : Rodin 2 😄

                  Frenchy Pilou
                  Is beautiful that please without concept!
                  My Little site :)

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

                    Bezier Surface is confined to its own namespace - so the only thing I can think of would be possibly other extension clashing with observers. SketchyPhysics has been known to clash with many extensions - though I'm not sure if it's been updated recently to address that.
                    Odd if Skalp clashes... maybe observer fights?
                    Do you get any errors in the Ruby Console?

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

                    1 條回覆 最後回覆 回覆 引用 0
                    • pilouP 離線
                      pilou
                      最後由 編輯

                      @unknownuser said:

                      Do you get any errors in the Ruby Console?

                      See my previous posts from here

                      Messages were the same that the restant on my post linked 😉

                      So for have no message errors I disconnect plugins after plugins.

                      Frenchy Pilou
                      Is beautiful that please without concept!
                      My Little site :)

                      1 條回覆 最後回覆 回覆 引用 0
                      • CadFatherC 離線
                        CadFather
                        最後由 編輯

                        ok, in my case progressbar.rb is the culprit

                        now it's smartdrop

                        it changes.. 😆

                        1 條回覆 最後回覆 回覆 引用 0
                        • U 離線
                          unclex
                          最後由 編輯

                          @thomthom said:

                          Re: [Plugin][WIP][OpenSource] Bezier Surface

                          Postby thomthom » Mon Nov 24, 2014 4:18 am

                          unclex wrote:It's just always updating...
                          
                          Like the GIF
                          8.gif
                          
                          
                          
                          Cannot Click or DoubleClick
                          
                          and when SU opening, nothing prompt
                          

                          Any errors in the Ruby Console?
                          What SketchUp version?

                          Now I Know what happened
                          Smartdrop clash with TTlib2
                          something named "definition"

                          so I change "definition" to "a4sddefinition" @ smartdrop.rb
                          and it works

                          Smartdrop.rb

                          1 條回覆 最後回覆 回覆 引用 0
                          • jeff hammondJ 離線
                            jeff hammond
                            最後由 編輯

                            .

                            here's a simple introductory example.. maybe something a lot of people can use..
                            seamless background for rendering


                            1- draw the patch next to a flat plane:
                            1.png


                            2- double click the patch to enter the editing mode.. select the back line:
                            2.png


                            3- using the blue arrow on the gizmo, move the edge vertical:
                            3.png


                            4- using the red arc, rotate the edge downwards 90º (degrees will be shown in the measurement box)
                            4.png


                            5- using the blue square, scale downwards.. align the green control point with the green axis
                            5.png


                            6- change the segmentation in the measurements box (i think i used 20)

                            6.png



                            DreamCar.jpg

                            dotdotdot

                            1 條回覆 最後回覆 回覆 引用 0
                            • jolranJ 離線
                              jolran
                              最後由 編輯

                              Wow, this topic is moving fast now. 😄

                              Ok, so it's cubic 4 X 4 Bezier Patch. (As can be seen).

                              The idea I had was to conform my surfaces(from the node editor) to be valid with your nice editing possibilities after baked down to Sketchup.

                              I've built a simple translation-Gizmo for moving points(must have that at least) but your editing abilities are way more advanced. More than I would need actually in my GUI, since mostly dependent on parameter values..

                              This would be at a later stage anyway. There is still plenty of Math to deal with 😄

                              In all case.
                              Congratulations to this version! The Gizmo is spectacular. 👍

                              BTW
                              I don't know if you are gonna continue updating this plugin, since focus is on the subdivision pligin. But if you do and stay with Beziers, have you had a look at the power basis forms ? I studied them a little before since easier to grasp.
                              They are used a lot in gamers code.

                              They should perform better.
                              It's also possible to have other degree curves with different matrix.
                              For example a 3 X 3 Patch with degree 2 Power basis.
                              Although the @last Bezier code base the degree on n_points so that should be the same.. ?
                              (this is for a curve)

                              #                      ┌            ┐   ┌    ┐
                              #                      │ −1  3 −3 1 │   │ P1 │     MATRIX FORM for Cubic Bezier with 4 controlpoints.
                              # P(t) = [t³ t² t 1] · │  3 −6  3 0 │ . │ P2 │
                              #                      │ −3  3  0 0 │   │ P3 │
                              #                      │  1  0  0 0 │   │ P3 │
                              #                      └            ┘   └    ┘
                              #
                              # t = interval-value between 0 and 1. t2 = t*t, t3 = t2*t 
                              # For even greater efficiency a,b,c,t3 coefficients could be cached and reused,
                              # and updated when interval/subd changes.
                              #
                              def power_basis(t3,t2,t, p0, p1, p2, p3)
                              
                              	# Calculate 4 coefficients (MATRIX T*U) where 4th coefficient is simply reusing t3
                              	a = t3*(-1) + t2*3    + t*(-3) + 1
                              	b = t3*3    + t2*(-6) + t*3 
                              	c = t3*(-3) + t2*3 
                              
                              	# Calculate Points coordinates (MATRIX U*V)
                              	x = a*p0.x + b*p1.x + c*p2.x + t3*p3.x
                                  y = a*p0.y + b*p1.y + c*p2.y + t3*p3.y
                                  z = a*p0.z + b*p1.z + c*p2.z + t3*p3.z
                              	
                              	return Geom;;Point3d.new(x,y,z) # Return 1 point from interpolation
                              
                              end
                              
                              1 條回覆 最後回覆 回覆 引用 0
                              • BoxB 離線
                                Box
                                最後由 編輯

                                I found a little problem with it.
                                If you scale to 0 as a way of straightening an edge it freezes and won't update the surface. If you get out of edit mode and go back in an move a point it will revert to the unscaled skin.

                                http://i155.photobucket.com/albums/s296/storeben/SU/0Scale.gif

                                1 條回覆 最後回覆 回覆 引用 0
                                • Rich O BrienR 離線
                                  Rich O Brien Moderator
                                  最後由 編輯

                                  @box

                                  I'm not seeing that occur for me

                                  Download the free D'oh Book for SketchUp 📖

                                  1 條回覆 最後回覆 回覆 引用 0
                                  • BoxB 離線
                                    Box
                                    最後由 編輯

                                    IT doesn't happen on all axis, I have yet to determine exactly when it happens, but I will pin it down.

                                    1 條回覆 最後回覆 回覆 引用 0
                                    • BoxB 離線
                                      Box
                                      最後由 編輯

                                      Try this and see if it is just me.
                                      The patch is drawn up the blue along the red. Second patch added, joint moved up on the blue. Select the two edges(3 points) on the red and scale to 0.
                                      Please excuse the sloppy movements, I find it's very hard to maneuver on a trackpad.

                                      http://i155.photobucket.com/albums/s296/storeben/SU/Red.gif

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

                                        @pilou said:

                                        @unknownuser said:

                                        Do you get any errors in the Ruby Console?

                                        See my previous posts from here

                                        Messages were the same that the restant on my post linked 😉

                                        So for have no message errors I disconnect plugins after plugins.

                                        Ah, there's something suspicious:

                                        @unknownuser said:

                                        Error: #<NoMethodError: undefined method parent' for nil:NilClass> C:/Users/Pilou/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/ChrisP_PutsCompOnFace.rb:21:in definition'

                                        Looks like this extension has injected itself into the system somewhere. Maybe it modified .definition. What happens if you remove that extension?
                                        (Also, where did you get that extension?)

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

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

                                          @cadfather said:

                                          ok, in my case progressbar.rb is the culprit

                                          now it's smartdrop

                                          it changes.. 😆

                                          Ah yes, progressbar.rb is also known. But wasn't that updated?

                                          Is smart drop also conflicting?

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

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

                                            @unclex said:

                                            @thomthom said:

                                            Re: [Plugin][WIP][OpenSource] Bezier Surface

                                            Postby thomthom » Mon Nov 24, 2014 4:18 am

                                            unclex wrote:It's just always updating...
                                            
                                            Like the GIF
                                            8.gif
                                            
                                            
                                            
                                            Cannot Click or DoubleClick
                                            
                                            and when SU opening, nothing prompt
                                            

                                            Any errors in the Ruby Console?
                                            What SketchUp version?

                                            Now I Know what happened
                                            Smartdrop clash with TTlib2
                                            something named "definition"

                                            so I change "definition" to "a4sddefinition" @ smartdrop.rb
                                            and it works

                                            [attachment=0:nay6raup]<!-- ia0 -->Smartdrop.rb<!-- ia0 -->[/attachment:nay6raup]

                                            Right, so this is what is happening:

                                            Smartdrop is modifying the SketchUp API classes - which is a Bad Thing (TM)

                                            
                                            class Sketchup;;Group 
                                              def definition
                                                return(entities[0].parent) 
                                              end 
                                            end
                                            
                                            

                                            This method is bugged - it will fail when the group is empty because it tries to get the parent of the first entity in the entities collection. entities.parent would have worked though - so close. (But not perfectly in all older SU versions as there was a SU bug. There is a workaround for that, but that is not implemented here.)
                                            This is a good example of why modifying classes and modules that doesn't belong to your own extension is a bad thing. Before SU2015 it was adding a method that was not there, but as of SU2015 we added .definition for Group - meaning now it's also overriding the Ruby API.

                                            Was this the latest version of smart drop - or is there a new one that might have fixed this?

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

                                            1 條回覆 最後回覆 回覆 引用 0
                                            • 1
                                            • 2
                                            • 7
                                            • 8
                                            • 9
                                            • 10
                                            • 11
                                            • 12
                                            • 13
                                            • 9 / 13
                                            • 第一個貼文
                                              最後的貼文
                                            Buy SketchPlus
                                            Buy SUbD
                                            Buy WrapR
                                            Buy eBook
                                            Buy Modelur
                                            Buy Vertex Tools
                                            Buy SketchCuisine
                                            Buy FormFonts

                                            Advertisement