sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    πŸ›£οΈ Road Profile Builder | Generate roads, curbs and pavements easily Download

    Painting a quadrangular

    Scheduled Pinned Locked Moved Developers' Forum
    10 Posts 3 Posters 475 Views 3 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.
    • K Offline
      kolem
      last edited by

      I took the linetool.rb and tweaked it a little to fit my needs, and that was making a line and then hide it, the use for it if you have a quadrangular that sketchup cant 'paint' you make that line which makes 2 triangles that sketchup can 'paint'.
      the thing is that when i draw that missing line it doesn't paint the 2 triangles?
      any ideas?

      1 Reply Last reply Reply Quote 0
      • thomthomT Offline
        thomthom
        last edited by

        SketchUp can't paint a quadrangular?
        Can you provide an example?

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

        1 Reply Last reply Reply Quote 0
        • thomthomT Offline
          thomthom
          last edited by

          Oh wait - when you say 'paint' - do you mean it doesn't create the faces?

          So you in some cases have a quadrangular that isn't co-planar - so you need an edge going across it?
          With your tool - that creates the edge, call Edge.find_faces on the edge you create. That will make it behave like SU's native line tool and generate faces formed by the face if possible.

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

          1 Reply Last reply Reply Quote 0
          • K Offline
            kolem
            last edited by

            if its not on the same plane

            1 Reply Last reply Reply Quote 0
            • K Offline
              kolem
              last edited by

              yea that case,
              how do i use Edge.find_faces

              1 Reply Last reply Reply Quote 0
              • K Offline
                kolem
                last edited by

                i looked at the example, and did this:

                	myline=view.model.entities.add_line(p1,p2)
                	myline.hidden=true
                	face = entities.add_face(p1,p2)
                

                not working, probably a syntax error.
                any ideas?

                1 Reply Last reply Reply Quote 0
                • thomthomT Offline
                  thomthom
                  last edited by

                  You are trying to create a face with only two points.
                  The .find_edges leaves SU to create the faces. As you can see from the API docs - that method is called on edges. So you call that method on the reference to your edge.

                  Like so:
                  myline=view.model.entities.add_line(p1,p2) myline.hidden=true myline.find_faces

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

                  1 Reply Last reply Reply Quote 0
                  • K Offline
                    kolem
                    last edited by

                    ok it works but I don't get the problem
                    whats the difference between find face and add face?

                    1 Reply Last reply Reply Quote 0
                    • TIGT Offline
                      TIG Moderator
                      last edited by

                      The method entities.add_face(..............) adds a face from three or more coplanar points/edges/etc that you specify - and only adds that face.
                      But edge.find_faces finds all of the faces that edge could have - these might be additional 'internal faces' in complex 3D form - as there could be several sets of coplanar edges that will 'take a face' - some of which you probably don't want!

                      TIG

                      1 Reply Last reply Reply Quote 0
                      • K Offline
                        kolem
                        last edited by

                        thanks a lot!

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

                        Advertisement