sketchucation logo sketchucation
    • Login
    โ„น๏ธ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Convert drawing lines to orthogonal

    Scheduled Pinned Locked Moved Plugins
    21 Posts 6 Posters 9.7k Views 6 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.
    • N Offline
      nicolasweh
      last edited by

      Hi Didier, that would be awesome, just the attempt already deserves my thanks, I appreciate ๐Ÿ‘

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

        Bon courage! ๐Ÿ˜Ž

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

        1 Reply Last reply Reply Quote 0
        • Didier BurD Offline
          Didier Bur
          last edited by

          Hi,

          This idea is more complex than I though ๐Ÿ˜„
          I have writen some dirty code just to see if it is doable. It needs now heavy testing in various situations, with complex face shapes.

          A threshold parameter (angle) tells the script in which range each angle at each corner of the face has to be 'orthogonalized' (or not).
          For now, a face like on the left side of the image is reshaped to the one on the right ๐Ÿ˜‰

          Threshold 4 degrees

          Click on the image to see it in action on a more complex face:
          Threshold 20 degrees

          DB

          1 Reply Last reply Reply Quote 0
          • N Offline
            nicolasweh
            last edited by

            Hi Didier Bur, this looks excellent!!! ๐Ÿ‘
            Thanks for your hard work and invested time, I hope one day see it as a plugin ๐Ÿ˜„

            1 Reply Last reply Reply Quote 0
            • R Offline
              rv1974
              last edited by

              Didier it could be important tool!
              Please check if you could add to round the lengths values and unifying almost overlapping lines

              1 Reply Last reply Reply Quote 0
              • Didier BurD Offline
                Didier Bur
                last edited by

                Hi,

                The future 'orthogonalize' plugin is on its way...
                But I've encountered some problems to solve before reshaping a face: sometimes there are double points (especially when the face comes from an external content, such as an OSM map for instance), sometimes edges are reversed in the face record, sometimes there are colinear edges or overlapping edges, etc...

                I've almost solved all of these and the script is under heavy testing ๐Ÿ˜‰
                Below is a preview of the interface: you'll choose between 3 options, preserve the global shape of the face, preserve the segments lengths, or click on the first segment of a single face to give the script a start.

                Script will process a single face or a bunch of selected faces.

                Click on the image to see it in action

                DB

                1 Reply Last reply Reply Quote 0
                • R Offline
                  rv1974
                  last edited by

                  Please grant ability to save current settings as default globally.
                  P.S. Would it be possible to implement coordinates rounding? (for instance: 1,5,10 cm?)

                  1 Reply Last reply Reply Quote 0
                  • Didier BurD Offline
                    Didier Bur
                    last edited by

                    @rv1974

                    Settings are remembered all along the session, but I can also save them saved in the skp file (as model attributes).

                    Concerning the rounding of coordinates, it's also an interesting idea that I will look into.
                    Regards

                    DB

                    1 Reply Last reply Reply Quote 0
                    • R Offline
                      rv1974
                      last edited by

                      Yet another idea: arch\circle conversion (if some portions +- resembles them)
                      I use curic's(?) one and it's super useful functionality, but conversion won't happen if sefments aren't equal. So implementing arc conversion with threshold would be awesome.

                      1 Reply Last reply Reply Quote 0
                      • Didier BurD Offline
                        Didier Bur
                        last edited by

                        Hi everybody,

                        Below is the beta version of my Orthogonalize plugin.
                        I would have some feedback from the users, so I can enhance the plugin.

                        Install it the usual way, with the extensions manager.

                        First usage: select one or more faces in the model, righ-click on the selection and select 'Orthogonalize N faces'.
                        Please click on the Help button and read the PDF file to get information about how the script works.

                        Please report any bug you encounter, and feel free to report what's good and what is not convenient to you.

                        Best regards

                        DBUR_Orthogonalize.rbz

                        DB

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

                          Hello

                          I have nothing! (with some parameters) Same no result in 2017, 2015 Make!
                          1 st segment is working
                          Help is well working! ๐Ÿ˜Ž

                          My figure is too brutal ? (file linked)

                          ortho01.jpg


                          ortho01.skp

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

                          1 Reply Last reply Reply Quote 0
                          • R Offline
                            rv1974
                            last edited by

                            Wow I very pleased ๐Ÿ˜ฎ with results, thank you so much Didier!
                            My observations:
                            *)Currently plugin keeps to pop up in default location. Could it memorize the last re-location?
                            *)In attached image, the plugin builds approx90 degree angles (at least SU indicates **~**90.
                            *) In case of multiple faces, could we have an option to select the general rectification edge (AB)? If the face is rotated less than user's angle threshhold, then it'd be rectified by this general AB direction
                            *) Currently, it leaves co-linear points (no problem- I can delete them Fredos 'remove lonely vertices)
                            *) Is rounding planned?


                            jjjjjjj.JPG

                            1 Reply Last reply Reply Quote 0
                            • R Offline
                              rv1974
                              last edited by

                              However "Preserve segment length" option delivers bizarre result. Faces get deleted, only 2 edges survive.


                              jjj2.JPG


                              jjj3.JPG

                              1 Reply Last reply Reply Quote 0
                              • jujuJ Offline
                                juju
                                last edited by

                                @pilou said:

                                Hello

                                I have nothing! (with some parameters) Same no result in 2017, 2015 Make!
                                1 st segment is working
                                Help is well working! ๐Ÿ˜Ž

                                My figure is too brutal ? (file linked)

                                [attachment=1:27x238lf]<!-- ia1 -->ortho01.jpg<!-- ia1 -->[/attachment:27x238lf]

                                Hmmm, maybe try it in SU V6?

                                Save the Earth, it's the only planet with chocolate.

                                1 Reply Last reply Reply Quote 0
                                • Didier BurD Offline
                                  Didier Bur
                                  last edited by

                                  @Pilou:

                                  Your file is SU v6. This means the plugin isn't compatible with SU versions that use older releases of Ruby and API.
                                  Below is your file 'orthogonalized' with SU2020, with the same parameters as yours.
                                  pilou.jpg

                                  BTW, your white dashed lines indicate a better way to preserve the global shape of the face than the one I've implemented, this will become an option in the next release (I hope).

                                  Cordialement,

                                  DB

                                  1 Reply Last reply Reply Quote 0
                                  • Didier BurD Offline
                                    Didier Bur
                                    last edited by

                                    @rv1974:

                                    Thanks for reporting this bug, sort of.
                                    I see on your image that you are in a group or component. The plugin behaves weirdly in such a context. I'll fix that.
                                    Regards

                                    DB

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

                                      I have posted my file in "save as V6" but use these last Make (2017,2016,2015)all tested! ๐Ÿ˜‰
                                      See from your Doc that 2015 is out of use your plugin but must be fine for 2016 and uper...
                                      I will try with your uper left selected as first segment...

                                      Always not result when OK is pressed! ๐Ÿ˜ข
                                      If that can help : verbose don't make nothing in the Ruby console opened! (tested in 2017)

                                      Ruby Console works in 2016 but always no result :File linked (with no first segment selected)


                                      ruby_console.txt

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

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

                                      Advertisement