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

    [Plugin] FredoTools::Convexify - v1.0 - 25 Feb 15

    Scheduled Pinned Locked Moved Plugins
    28 Posts 9 Posters 21.0k Views 9 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.
    • D Offline
      Daniel S
      last edited by

      Hi Fredo!!!

      This plugin can make the decomposition of 3D shapes into "pyramidal" parts?

      Look at this:
      http://www.3ders.org/articles/20141211-pyramidal-shape-algorithm-removes-need-for-3d-print-material-support.html
      http://www.math.zju.edu.cn/ruizhenhu/projects/pym/pym_small.pdf

      Daniel S

      1 Reply Last reply Reply Quote 0
      • fredo6F Offline
        fredo6
        last edited by

        @daniel s said:

        This plugin can make the decomposition of 3D shapes into "pyramidal" parts?

        I am afraid this is a very different problem, much more complex actually.
        I imagine that if it does matter for 3D printing, then 3D Printing software editors would have embedded this capability in their applications.

        Fredo

        1 Reply Last reply Reply Quote 0
        • A Offline
          Anton_S
          last edited by

          @fredo6 said:

          That won't be easy from the code itself and anyway it heavily relies on Sketchup framework to describe geometry (faces, edges, etc....). The best is that I provide you with a short description of the algorithm which could be adapted to your geometrical frameworks in MSPhysics and underlying engine.

          Thank you Fredo. It seems complicated, but I'm fairly sure its possible to put together a C extension out of this. I'll look into the source and try to break it down. Otherwise, I could stick with Ruby-SketchUp implementation.

          Thanks again,
          Anton

          1 Reply Last reply Reply Quote 0
          • A Offline
            Anton_S
            last edited by

            I decided to do a little test and got a generation error with that camel, which I got at 3dwarehouse.

            @unknownuser said:

            Date: 27-Feb-15 01:54:52
            An error occurred in Convexify 3D Shapes
            Error while processing Convexify

            wrong argument type (expected Sketchup::Face)

            body_Lib6Solid.rb: 1212 -- reversed_in?
            body_Lib6Solid.rb: 1212 -- block in solid_transfer_section_faces
            body_Lib6Solid.rb: 1205 -- each
            body_Lib6Solid.rb: 1205 -- solid_transfer_section_faces
            body_Lib6Solid.rb: 1034 -- solid_split
            body_Lib6Solid.rb: 909 -- solid_split_robot
            body_Lib6Solid.rb: 560 -- robot_execute_protected
            body_Lib6Solid.rb: 506 -- robot_execute
            body_Lib6Solid.rb: 482 -- block in convexify
            Lib6Operation.rb: 325 -- call
            Lib6Operation.rb: 325 -- step_geometry
            Lib6Operation.rb: 286 -- block in yield?
            SketchUp: 1 -- call

            Generation Options:

            Put the Convex shapes on LAYER: Fredo6_Convexify
            Tolerance Concavity: 0 deg.
            Animation algorithm: NO

            A bit different error shows up when I generate with Animation set to 0.2s.

            Edit: Adding next if edge0.faces.size != 2 to body_lib6Solid.rb, line 1210 (after break unless edge0) seems to fix that initial error, and generate convex decomposition without problems. However, changing tolerance makes a different error to appear. Maybe you could look into it if you have time...


            camel.skp

            1 Reply Last reply Reply Quote 0
            • fredo6F Offline
              fredo6
              last edited by

              Anton,

              Thanks for pointing to this bug.

              Actually, the correction is to replace line 1207 (an error of too quick copy / paste!)

              		#ledges = face.edges.sort { |e1, e2| e2.length <=> e1.length }
              		ledges = ledges.sort { |e1, e2| e2.length <=> e1.length }
              
              

              I'll fix and re-release, after looking at the Camel

              Fredo

              1 Reply Last reply Reply Quote 0
              • A Offline
                Anton_S
                last edited by

                Thanks. I was kind of wondering whether multiple convex shapes could be combined. The algorithm generates too much convex shapes for complex models. It would be nice to have a cleanup method which then combines final convex groups if they together are still a convex shape.

                1 Reply Last reply Reply Quote 0
                • pilouP Offline
                  pilou
                  last edited by

                  I am disapointed that the Pilou's model is not a real solid! 💚
                  It should because it has an external closed skin! 😉
                  Sure internal is maybe some convoluted! 😄

                  So next plug will be to tranform it in a real solid! 😉

                  In any way another Cristallographic task! 😲 👍 😎

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

                  1 Reply Last reply Reply Quote 0
                  • fredo6F Offline
                    fredo6
                    last edited by

                    @anton_s said:

                    Thanks. I was kind of wondering whether multiple convex shapes could be combined. The algorithm generates too much convex shapes for complex models. It would be nice to have a cleanup method which then combines final convex groups if they together are still a convex shape.

                    Anton,

                    This would be another type of decomposition (say a "blockify" method). Convexify does the job, and none of the small pièces can be combined to form a bigger convex piece. In the camel, many of the mesh quads have a diagonal that is a concave edge.

                    For collision, I guess that what you need is an approximate block decomposition that would be visually sufficient to give the impression of contact.

                    Fredo

                    1 Reply Last reply Reply Quote 0
                    • fredo6F Offline
                      fredo6
                      last edited by

                      @pilou said:

                      So next plug will be to tranform it in a real solid! 😉

                      Did you try Solid Inspector by thomthom. I think TIG also has a plugin for that.

                      Fredo

                      1 Reply Last reply Reply Quote 0
                      • pilouP Offline
                        pilou
                        last edited by

                        I will try that! 😄

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

                        1 Reply Last reply Reply Quote 0
                        • D Offline
                          dkluger
                          last edited by

                          I am having a problem with Convexify. I am running SU15 Make. I have this tool on another computer and it runs seamlessly. I can't figure out why it won't work on this computer.

                          Running the tool seems to work at first where I get prompted to use the whole model (if nothing is selected) and then I can select the convex decomposition parameters. Once I click "OK" the green hour glass comes up, but then nothing happens. The second I move my mouse, the hour glass changes to a pointer as if nothing ever happened. Any clue to what's going on here?

                          1 Reply Last reply Reply Quote 0
                          • M Offline
                            meak
                            last edited by

                            hello,
                            Unfortunately, I have exactly the same problem.
                            I work with pro skecthup 2015

                            1 Reply Last reply Reply Quote 0
                            • fredo6F Offline
                              fredo6
                              last edited by

                              Thanks for signaling.
                              This is a bug introduced by LibFredo6 6.8. Sorry for inconvenience.

                              Please install LibFredo6 6.8c, now published on the PluginStore.

                              Fredo

                              1 Reply Last reply Reply Quote 0
                              • M Offline
                                meak
                                last edited by

                                speed and efficiency
                                a big applause
                                thank you a lot
                                is it possible to keep the exploded model?

                                1 Reply Last reply Reply Quote 0
                                • pilouP Offline
                                  pilou
                                  last edited by

                                  Will be fine if we can exit with an actual position of the animation Explode Convexify colored view!
                                  (with colors or not)
                                  Or does exist a trick ?
                                  (sure I can use other thing like Explode-view, Animator, ... but that give not the colors etc...

                                  GIF_fine.gif

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

                                  1 Reply Last reply Reply Quote 0
                                  • pilouP Offline
                                    pilou
                                    last edited by

                                    Seems there is a glitch!
                                    convex_glitch.jpg


                                    Glitch_Convex_V6.skp

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

                                    1 Reply Last reply Reply Quote 0
                                    • gillesG Offline
                                      gilles
                                      last edited by

                                      It's seems to be relative with angular tolerance.

                                      Glitch_Convex_V6.png

                                      " c'est curieux chez les marins ce besoin de faire des phrases "

                                      1 Reply Last reply Reply Quote 0
                                      • gillesG Offline
                                        gilles
                                        last edited by

                                        But I may be wrong…

                                        Glitch_Convex.png

                                        " c'est curieux chez les marins ce besoin de faire des phrases "

                                        1 Reply Last reply Reply Quote 0
                                        • pilouP Offline
                                          pilou
                                          last edited by

                                          Even more evident for 2 simple circles extruded! 😮
                                          Dashed lines should be the good ones!

                                          simple_cercle.jpg

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

                                          1 Reply Last reply Reply Quote 0
                                          • fredo6F Offline
                                            fredo6
                                            last edited by

                                            Pilou,

                                            This is normal.

                                            The corresponding vertices of the inner and outer circles are not 'aligned', that is, the line joining two corresponding vertices does not go through the common center of the circles.

                                            This is a frequent issue when drawing co-centric circles. Because they are made of segments, it may important to keep them 'aligned'. I must say that the Circle tool does not help too much for that.

                                            If Convexify was 'following' your edges in the current model, the pieces would not be convex or would have to be divided in smaller chunks.

                                            Fredo

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

                                            Advertisement