sketchucation logo sketchucation
    • Login
    πŸ›£οΈ Road Profile Builder | Generate roads, curbs and pavements easily Download

    Boolean subtraction of two circle

    Scheduled Pinned Locked Moved Developers' Forum
    13 Posts 4 Posters 707 Views 4 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.
    • thomthomT Offline
      thomthom
      last edited by

      Would it not be better to just draw two arcs?
      Instead of drawing geometry only to remove it again?

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

      1 Reply Last reply Reply Quote 0
      • E Offline
        exvion
        last edited by

        I don't know how calculate parameters of second arc.

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

          If the circles are both the same radius, then the second arc's angle would be 360 degrees - angle of first arc

          So if the first arc is 260 degrees, the other would be 100 degrees.

          ...though, saying that... since Sketchup circles aren't true circles - the ends might not meet...

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

          1 Reply Last reply Reply Quote 0
          • J Offline
            Jim
            last edited by

            If you are ultimately adding faces to the circles, you can more easily track the created faces and delete the "other" one.

            Hi

            1 Reply Last reply Reply Quote 0
            • E Offline
              exvion
              last edited by

              I created two arc

              
              group = Sketchup.active_model.entities.add_group
              vector2 = Geom;;Vector3d.new 0,0,1
              group.entities.add_arc point0, vector2, vector, diametr/2, -150.degrees, 150.degrees
              point0.z=point0.z-diametr*(3**0.5)*0.5
              group.entities.add_arc point0, vector2, vector, diametr/2, -30.degrees, 30.degrees
              
              

              How create face and push it? I try. What is wrong?

              
              face=Sketchup.active_model.entities.add_face(group.entities)
              face.pushpull distance,true
              
              

              screenshot_2009-11-26_13-05-34.png

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

                You're getting errors?
                A bit hard to guess what isn't working.

                But if I where to guess: face=Sketchup.active_model.entities.add_face(group.entities)
                Can you really create faces from entities located in a different context than the one you try to create in?

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

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

                  Thomthom ❗ Grumpy... 😠
                  To be kinder... it should be:

                  face=group.entities.add_face(group.entities.to_a)
                  

                  or even

                  face=group.entities[0].find_faces
                  

                  ❓ πŸ˜„

                  TIG

                  1 Reply Last reply Reply Quote 0
                  • E Offline
                    exvion
                    last edited by

                    Yes, this line is not correct, but I don't now how create face limited by two arc.
                    If I explode group, than I can generate face.


                    screenshot_2009-11-26_13-50-04.png


                    screenshot_2009-11-26_13-51-30.png

                    1 Reply Last reply Reply Quote 0
                    • E Offline
                      exvion
                      last edited by

                      TIG, thank. It is work.

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

                        @tig said:

                        Thomthom ❗ Grumpy... 😠

                        I came across grumpy?

                        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

                          Well it certainly wasn't my intention to come across as a drunk teacher. πŸ˜„ But I see what you mean. I was just sweeping by the forum and didn't look much into it. (which is why I didn't test the add_face method and instead asked questions)

                          Thanks for pointing that out to me though. Sense of mood are too easily lost in written communication - which makes wording more important.
                          (Mange takk. πŸ˜„ )

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

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

                            @thomthom said:

                            @tig said:

                            Thomthom ❗ Grumpy... 😠

                            I came across grumpy?

                            The English phrase is you were 'terse' [avvisende]... or 'a little short' [litt kort]... just like your old school teacher might be when you ask a seemingly stupid question or you are doing something that is obviously not right [to him] AND he has a hangover etc etc πŸ˜†

                            TIG

                            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