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

Triangulate triangles ?

Scheduled Pinned Locked Moved Plugins
41 Posts 8 Posters 7.9k Views
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.
  • P Offline
    pilou
    last edited by pilou 17 Oct 2013, 11:57

    Does this is existing ?

    SandBox makes something but one by one and you must find the red point! ๐Ÿ˜ฎ
    (read image right to left ๐Ÿ˜ณ Like Suzan ๐Ÿ˜„
    media.jpg

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

    1 Reply Last reply Reply Quote 0
    • T Offline
      TIG Moderator
      last edited by 17 Oct 2013, 12:09

      See a new entry of an oldie in the SCF PluginStore...
      http://sketchucation.com/forums/viewtopic.php?p=495376#p495376

      TIG

      1 Reply Last reply Reply Quote 0
      • P Offline
        pilou
        last edited by 17 Oct 2013, 12:41

        Seems that is not the trick!
        You must find first the middle point intersection on the face! ๐Ÿ˜„
        And works only face by face!

        I have tried your "Add Center Point": alas that don't work for a triangle! (for it's edges yes but not for the face itself)
        I have tried your "Center of Gravity": alas that don't work with a face

        There is something cool with your roof plugin, alas that works only one trangular face by one triangular face (and the minimum angle of roof is 1ยฐ and not 0ยฐ ๐Ÿ˜„
        (the angle problem will be not a problem : we can flatten the result - but face one by one is a problem ๐Ÿ˜„
        And there is a little deviation / view top / Camera projection Parallel

        deviation.jpg

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

        1 Reply Last reply Reply Quote 0
        • P Offline
          pilou
          last edited by 17 Oct 2013, 14:50

          seems it's also the connections of the medians and the gravity center of a triangle so
          an interesting thing! ๐Ÿ˜„

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

          1 Reply Last reply Reply Quote 0
          • R Offline
            Rich O Brien Moderator
            last edited by 17 Oct 2013, 14:51

            Does it need to be 3 tris? Can it be 4?

            Download the free D'oh Book for SketchUp

            1 Reply Last reply Reply Quote 0
            • R Offline
              Rich O Brien Moderator
              last edited by 17 Oct 2013, 14:56

              Image 1.png

              Download the free D'oh Book for SketchUp

              1 Reply Last reply Reply Quote 0
              • P Offline
                pilou
                last edited by 17 Oct 2013, 14:57

                4 ? Like what ? Please an image! You speak of a quadrangle hidden on a triangle ?
                No 3 triangles!
                A simple triangle(s)( any number ) with this simple construction of 3 medians ๐Ÿ˜„

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

                1 Reply Last reply Reply Quote 0
                • R Offline
                  renderiza
                  last edited by 17 Oct 2013, 14:59

                  Adding the feature to slit multiple face by automatically finding the center point will be great addition! This should triangulate any type of face aka trig, quad, ect... Because your connecting a line from center to every other vertex. Maybe adding things like skip one vertex every time you add a line will be interesting to see.

                  Rich O Brian that would be great as well!

                  [url=https://www.sketchupcode.com/:z3kqsidd]My Extensions ...[/url:z3kqsidd]

                  1 Reply Last reply Reply Quote 0
                  • R Offline
                    Rich O Brien Moderator
                    last edited by 17 Oct 2013, 15:00

                    It is Artisan subdivide. Thank you Catmull Clark ๐Ÿ˜‰

                    Download the free D'oh Book for SketchUp

                    1 Reply Last reply Reply Quote 0
                    • P Offline
                      pilou
                      last edited by 17 Oct 2013, 15:04

                      So no! ๐Ÿ˜„ And why not the connections with middles ?

                      Medians are wanted! ๐Ÿ˜„
                      But if you a have the plugin why not, that can be used for other thing ๐Ÿ˜„

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

                      1 Reply Last reply Reply Quote 0
                      • P Offline
                        pilou
                        last edited by 17 Oct 2013, 15:05

                        Yep cool, but not like the first post ๐Ÿ˜„
                        And I should know it ! ๐Ÿ˜‰

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

                        1 Reply Last reply Reply Quote 0
                        • P Offline
                          pilou
                          last edited by 17 Oct 2013, 15:50

                          Alas I have deserted the Ruby language for a while! ๐Ÿ˜ž

                          If you can make a little plugin that will be wonderful ๐Ÿ˜Ž

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

                          1 Reply Last reply Reply Quote 0
                          • R Offline
                            renderiza
                            last edited by 17 Oct 2013, 15:51

                            Here is an example code for achieving what you want Pilou...

                            
                            model = Sketchup.active_model
                            ents = model.active_entities
                            sel = model.selection
                            faces = ents.grep(Sketchup;;Face)
                            
                            faces.each do |face|
                              vertices = face.vertices
                              bbox = face.bounds
                              cpoint = bbox.center
                            
                              vertices.each do |vertex|
                                p1 = cpoint
                                p2 = vertex
                                line = ents.add_line p1,p2 
                               end
                            end
                            
                            

                            Note: Some very pretty geometry start appearing when you keep splitting! ๐Ÿ‘

                            [url=https://www.sketchupcode.com/:z3kqsidd]My Extensions ...[/url:z3kqsidd]

                            1 Reply Last reply Reply Quote 0
                            • R Offline
                              renderiza
                              last edited by 17 Oct 2013, 15:53

                              I will do that! ๐Ÿ‘

                              [url=https://www.sketchupcode.com/:z3kqsidd]My Extensions ...[/url:z3kqsidd]

                              1 Reply Last reply Reply Quote 0
                              • T Offline
                                TIG Moderator
                                last edited by 17 Oct 2013, 15:55

                                Beat me to it ๐Ÿ˜‰
                                You might want to change the
                                faces = ents.grep(Sketchup::Face)
                                to
                                faces = **sel**.grep(Sketchup::Face)
                                So then the user changes only selected faces ?
                                OR perhaps
                                faces = sel.grep(Sketchup::Face) faces = ents.grep(Sketchup::Face) **unless faces[0]**
                                so it works on a selection OR everything if there is no selection...

                                Also you want to make it undoable, so add
                                **model.start_operation('subtri')** faces.each... ...end **model.commit_operation**
                                ๐Ÿค“

                                TIG

                                1 Reply Last reply Reply Quote 0
                                • R Offline
                                  renderiza
                                  last edited by 17 Oct 2013, 16:15

                                  Hahaha!

                                  TIG I would be very happy if you modify your existing plugin to add Pilou is feature request. ๐Ÿ‘

                                  I am interested in making this for learning and I have some additional ideas I want to explore. I consider you my mentor TIG and there will never be competition between you and me I promise! ๐Ÿ’š

                                  By the way thanks for the suggestion! ๐Ÿ‘

                                  Here is updated code...

                                  model = Sketchup.active_model
                                  ents = model.active_entities
                                  sel = model.selection
                                  faces = sel.grep(Sketchup;;Face)
                                  
                                  model.start_operation('csplit')
                                    faces.each do |face|
                                      vertices = face.vertices
                                      bbox = face.bounds
                                      cpoint = bbox.center
                                  
                                      vertices.each do |vertex|
                                        p1 = cpoint
                                        p2 = vertex
                                        line = ents.add_line p1,p2
                                      end
                                    end
                                    sel.clear
                                  model.commit_operation
                                  

                                  [url=https://www.sketchupcode.com/:z3kqsidd]My Extensions ...[/url:z3kqsidd]

                                  1 Reply Last reply Reply Quote 0
                                  • T Offline
                                    TIG Moderator
                                    last edited by 17 Oct 2013, 16:24

                                    OK
                                    I'll make a simple script and publish it shortly...

                                    TIG

                                    1 Reply Last reply Reply Quote 0
                                    • R Offline
                                      renderiza
                                      last edited by 17 Oct 2013, 16:37

                                      Thank you TIG! ๐Ÿ‘

                                      [url=https://www.sketchupcode.com/:z3kqsidd]My Extensions ...[/url:z3kqsidd]

                                      1 Reply Last reply Reply Quote 0
                                      • A Offline
                                        anar
                                        last edited by 17 Oct 2013, 18:01

                                        Thanks Pilou !
                                        You convinced TIG...
                                        And Thanks TIG, I think it's a must have !

                                        http://www.polyloop.net/attachment.php?attachmentid=32959&d=1382032801

                                        1 Reply Last reply Reply Quote 0
                                        • T Offline
                                          TIG Moderator
                                          last edited by 17 Oct 2013, 18:02

                                          Try this http://sketchucation.com/forums/viewtopic.php?p=495430#p495430
                                          TriangulateAllFaces...

                                          TIG

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

                                          Advertisement