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

    Face.plane?

    Scheduled Pinned Locked Moved Developers' Forum
    8 Posts 5 Posters 443 Views 5 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

      I'm trying to work out the values of Face.plane. Am I right that the first three numbers is the normal?

      But what's the fourth?

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

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

        Hi Thomthom!
        I will try to tanslate an answer from Didier here :
        Plane returns an array of four values :

        • First three numbers is the normal of the face
        • Fourth number is the elevation (distance Z) of the plane.

        Draw a face with Z = 0.
        Try to move your face on 1 meter on Z.
        Face.plane will return [0,0,1,39.3700787401575] (39.3700787401575 = 1m in inches).

        Frenglish at its best !
        My scripts

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

          I don't think the D is purely elevation. I thought that initially, but when I did some test I saw something: If I drew I single square flat, then copied that upwards, both these squares had the same plane, even though they where at different Z-position. If I added another square to one of them standing 90 degrees upwards, connected, the last number of the plane changed, even though I hand not made any changes to the face itself, only connected another face to it. That puzzles me.

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

          1 Reply Last reply Reply Quote 0
          • tbdT Offline
            tbd
            last edited by

            thomthom: attach the model and the code for testing. a face that have a different Z should have a different plane equation

            SketchUp Ruby Consultant | Podium 1.x developer
            http://plugins.ro

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

              Hi,
              As said before, Ax + By + Cz + D = 0 is the equation of a plane, where A,B and C are the vector coordinates of the normal to the plane, and D is the shortest distance between a point on the plane and the origin 0,0,0, that's to say it is the intersection of a line normal to this plane (passing through point 0,0,0) and the plane itself.
              A,B,C give the plane its "orientation" around the axes, and D its distance to zero.
              Hope this helps,

              DB

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

                Isn't it the plane equation: Ax + By + Cz + D = 0 ?
                A,B,C is the normal, D is an offset (though I don't think you can say it's the "elevation"; it's more like if you placed the normal vector at the origin, it's the distance along that vector until you intersect the plane. It can be elevation, but could just as easily be along any arbitrary axis).

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

                  @unknownuser said:

                  thomthom: attach the model and the code for testing. a face that have a different Z should have a different plane equation

                  Didn't save it. Can't reproduce it with a new file either. Must be my head going bonkers last night.

                  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

                    Thanks for the heads up people.

                    Wish that API wiki truly was a wiki so that info could have been added there.

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

                    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