• Login
sketchucation logo sketchucation
  • Login
πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

NURBS plugin version 0.1

Scheduled Pinned Locked Moved Developers' Forum
28 Posts 7 Posters 2.9k Views 7 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
    solo
    last edited by 28 Jul 2011, 19:38

    Whooho!!

    Cannot help you with code, but mate I'm here with encouragement.

    http://www.solos-art.com

    If you see a toilet in your dreams do not use it.

    1 Reply Last reply Reply Quote 0
    • R Offline
      Rich O Brien Moderator
      last edited by 28 Jul 2011, 19:43

      I played with the car model and so far it's pretty good. Have you seen n-gon's Bezier Patch plugin?

      Download the free D'oh Book for SketchUp πŸ“–

      1 Reply Last reply Reply Quote 0
      • M Offline
        Mr.K.1
        last edited by 28 Jul 2011, 20:00

        Nope did not spot that, and I started work on this because I couldn't find any Sketchup surface builders anywhere.
        Thanks for the heads up, guess I'm off the hook then πŸ˜„

        I'm just gonna wrap this one up into a slightly more wholesome package and direct people to the other version.

        1 Reply Last reply Reply Quote 0
        • D Offline
          Dan Rathbun
          last edited by 28 Jul 2011, 20:44

          @unknownuser said:

          @unknownuser said:

          Error Loading File NurbsPlugin.rb
          > > 127; The specified procedure could not be found.   - Init_Nurbs
          > > C;/PROGRA~2/Google/GOOGLE~1/Plugins/Nurbs.dll
          

          Nurbs.dll is in my plugins folder. Is this v7 only?

          That is only Ruby trying to call an initialization command in DLL which doesn't exist, I tried adding some empty ones to get around the error message but nothing fixed it sofar.

          This is only the first crack at the plugin, and I see I got alot of corners to trim.

          Actually the DLL is NOT a Ruby C extension, so cannot be loaded with require() (at this time.)
          As it's accessed via the Win32API class... for now just comment out the line
          require 'Nurbs.dll'
          as it doesn't do anything anyway.

          I'm not here much anymore.

          1 Reply Last reply Reply Quote 0
          • D Offline
            Dan Rathbun
            last edited by 28 Jul 2011, 20:46

            Looking thru the CPP file, I dont see anything that couldn't just be written in pure Ruby. (might be slower of course.)

            I'm not here much anymore.

            1 Reply Last reply Reply Quote 0
            • M Offline
              Mr.K.1
              last edited by 28 Jul 2011, 21:14

              But if I remove require() Win32API doesn't find the file at all... and I'm guessing using a full path would actually fix that.

              Yes the C++ code is fairly simple, I thought interfacing a working example with Ruby would be simple to make and compute faster, but as it turns out it needs alot of array transformations(which were nibbling away at my sanity) plus the added time cost of those it is very questionable if a direct Ruby compute would be any slower.
              And since drawing is the real time hog it doesn't really matter.

              How is thomthom doing the Bezier Surface? Ruby only?

              1 Reply Last reply Reply Quote 0
              • D Offline
                Dan Rathbun
                last edited by 28 Jul 2011, 21:41

                @unknownuser said:

                But if I remove require() Win32API doesn't find the file at all... and I'm guessing using a full path would actually fix that.

                Yes... normally the DLLs used are system files like user32.dll etc. so the OS knows where to find them.

                The default working dir when Ruby starts is the HOME dir... ENV['USERPROFILE'] but you can save it, change it, use it and restore it.

                Your also creating a new Win32API instance each time that method is called.
                It would be simplier to create a reference to the call outside the method:
                olddir = Dir.getwd Dir.chdir(File.expand_path(File.dirname(__FILE__))) @nurbs = Win32API.new('Nurbs','nurbs', ["p","p","p"],"L") Dir.chdir(olddir)

                then within the method
                @nurbs.call(@a,@b,@c)

                I'm not here much anymore.

                1 Reply Last reply Reply Quote 0
                • D Offline
                  Dan Rathbun
                  last edited by 28 Jul 2011, 21:46

                  @unknownuser said:

                  How is thomthom doing the Bezier Surface? Ruby only?

                  dunno.. he's on vacation.

                  I'm not here much anymore.

                  1 Reply Last reply Reply Quote 0
                  • D Offline
                    Dan Rathbun
                    last edited by 29 Jul 2011, 16:30

                    @dan rathbun said:

                    See Fredo6's BezierSpline Plugin plugin for examples.

                    SO.. was Fredo's utility what you wanted, but could not find it because he didn't use the word "NURBS" ??

                    I'm not here much anymore.

                    1 Reply Last reply Reply Quote 0
                    • M Offline
                      Mr.K.1
                      last edited by 29 Jul 2011, 20:02

                      I was looking for a surface builder, don't know if I'm missing something but Fredo's BezierSpline just does 2D curves.

                      But if there already is any sort of SU surface builder in existance I would love to know about it.

                      1 Reply Last reply Reply Quote 0
                      • D Offline
                        Dan Rathbun
                        last edited by 29 Jul 2011, 20:50

                        @unknownuser said:

                        I was looking for a surface builder, don't know if I'm missing something but Fredo's BezierSpline just does 2D curves.

                        But if there already is any sort of SU surface builder in existance I would love to know about it.

                        Fredo's (Beta) CurviLoft

                        Now once a surface mesh is created, the built in tools lack power. If ThomThom is working on a mesh editor tool, then you just KNOW it will be a good one!

                        Add:

                        SoapSkin Bubble

                        SurfaceGen

                        I'm not here much anymore.

                        1 Reply Last reply Reply Quote 0
                        • M Offline
                          Mr.K.1
                          last edited by 29 Jul 2011, 21:02

                          YES! Curviloft is exactly what I wanted, thank you.

                          Now I can move on to other projects, and it makes this thread/topic obsolete, could someone please remove it?

                          1 Reply Last reply Reply Quote 0
                          • R Offline
                            Rich O Brien Moderator
                            last edited by 29 Jul 2011, 21:19

                            Are you sure about removing this?

                            Download the free D'oh Book for SketchUp πŸ“–

                            1 Reply Last reply Reply Quote 0
                            • D Offline
                              Dan Rathbun
                              last edited by 29 Jul 2011, 21:44

                              I don't mind... the code was way before alpha!

                              Just a rudimentary example of concept.

                              Users would be better off using one of the mesh / surface packages from the Plugins forum.

                              I'm not here much anymore.

                              1 Reply Last reply Reply Quote 0
                              • M Offline
                                Mr.K.1
                                last edited by 30 Jul 2011, 05:22

                                Exactly, I don't want other users stumbling upon my poor attempts at reinventing water when there are so many well done plugins available.

                                If I ever get back to finishing this I'll post a new thread, but right now this thread is of no value and should be deleted.

                                1 Reply Last reply Reply Quote 0
                                • F Offline
                                  fredo6
                                  last edited by 30 Jul 2011, 07:19

                                  Dear Mr.K

                                  If you have a C/C++ library containing Surface Nurbs functionality, I am interested to have a look and possibly build the SU GUI around it.

                                  As you noticed, Curviloft (or ExtrudeEdgeByxxx by TIG) are not really Nurbs modelers, but use splines and bezier curves to generate surfaces based on coons, stretching and averaging. Real surfacic Nurbs are more powerful, but for performance reasons the calculations must be done in C. The closest I know to be a real surfacic modeler is

                                  • BezierPatch by Victor Liu
                                  • BezierSurface by ThomThom
                                  • TGI3d (probably based on true Nurbs)
                                  • Artisan by Whaat
                                  • Soap, Skin & Bubble
                                  • FerrariSketch
                                  • maybe others that I am not aware of

                                  If your package includes Nurbs curves only, then it is more something that is today in BezierSpline and that I will definitely include in a more advanced form in the refresh of this plugin.

                                  Thanks

                                  Fredo

                                  1 Reply Last reply Reply Quote 0
                                  • M Offline
                                    Mr.K.1
                                    last edited by 30 Jul 2011, 09:11

                                    Well I should probably explain that I am not all that knowledgeable in the Spline area, and have no idea if the code I have is real surfacic Nurbs, or what the differences are.

                                    All I really did was shoehorn a C++ NURBS example into a DLL example and made a Ruby interface for it.
                                    And it really shows as I was fruitlessly trying to fix the density error(the surface vertices stretch out at the start and bunches up at the end), suppose to be controllable in the U,V knot vectors but they are built as specified by formulas and any attempt at correction makes it worse.

                                    Maybe you have some more insight on this?

                                    1 Reply Last reply Reply Quote 0
                                    • E Offline
                                      EarthMover
                                      last edited by 30 Jul 2011, 15:44

                                      @unknownuser said:

                                      Dear Mr.K

                                      If you have a C/C++ library containing Surface Nurbs functionality, I am interested to have a look and possibly build the SU GUI around it.

                                      Thanks

                                      Fredo

                                      πŸ‘ πŸ‘ πŸ‘

                                      3D Artist at Clearstory 3D Imaging
                                      Guide Tool at Winning With Sketchup
                                      Content Creator at Skapeup

                                      1 Reply Last reply Reply Quote 0
                                      • D Offline
                                        Dan Rathbun
                                        last edited by 30 Jul 2011, 17:31

                                        @unknownuser said:

                                        Exactly, I don't want other users stumbling upon my poor attempts at reinventing water when there are so many well done plugins available.

                                        If I ever get back to finishing this I'll post a new thread, but right now this thread is of no value and should be deleted.

                                        YOU can edit your first post, and remove the file attachments. Put a note to PM you if they are coders and wish to see the latest version.

                                        People are still d/l'ing it. (Some end up leaving beta scripts in their Plugins folder, forever.)

                                        I'm not here much anymore.

                                        1 Reply Last reply Reply Quote 0
                                        • thomthomT Offline
                                          thomthom
                                          last edited by 1 Aug 2011, 14:24

                                          @unknownuser said:

                                          How is thomthom doing the Bezier Surface? Ruby only?

                                          Currently in Ruby. But once I get things working and I can start profiling I'll probably move some stuff into a C Extension to do the main bulk of the bezier calculations etc.

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

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

                                          Advertisement