How do I shift a vertex to establish a single, flat surface on a quad?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
2
down vote

favorite












One thing that I've noticed when drawing quads is that, if a single surface cannot be established using the vertex arrangement (for example, if you add the default plane and raise a single vertex to 1 on the Z-axis), Blender will treat it a quad (subsurf works fine with it and will smooth it out into a hyperbolic surface) but render it as two conjoined tris (prior to the subsurf).



Now, I'm fairly certain that I should avoid this in most cases and would want to fix it if it does occur. In my example above, I could obviously just shift the vertex back to 0 on the Z-axis, because the surface is completely flat. However, if I were to rotate this quad, I would be in a situation where moving the vertex to establish a flat surface would require very precise changes to the X, Y, and Z positions.



I was wondering if there is some feature of Blender or a technique to adjust vertices exactly that the quad is absolutely flat, even if the quad is rotated.



P.S. I apologize for the very technical and possibly pedantic style of writing. Because I want to ensure the question is communicated clearly, I felt that it was necessary to be scrupulous.










share|improve this question









New contributor




thepufferfish is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



















  • Related blender.stackexchange.com/questions/35193/…
    – Mr Zak
    3 mins ago
















up vote
2
down vote

favorite












One thing that I've noticed when drawing quads is that, if a single surface cannot be established using the vertex arrangement (for example, if you add the default plane and raise a single vertex to 1 on the Z-axis), Blender will treat it a quad (subsurf works fine with it and will smooth it out into a hyperbolic surface) but render it as two conjoined tris (prior to the subsurf).



Now, I'm fairly certain that I should avoid this in most cases and would want to fix it if it does occur. In my example above, I could obviously just shift the vertex back to 0 on the Z-axis, because the surface is completely flat. However, if I were to rotate this quad, I would be in a situation where moving the vertex to establish a flat surface would require very precise changes to the X, Y, and Z positions.



I was wondering if there is some feature of Blender or a technique to adjust vertices exactly that the quad is absolutely flat, even if the quad is rotated.



P.S. I apologize for the very technical and possibly pedantic style of writing. Because I want to ensure the question is communicated clearly, I felt that it was necessary to be scrupulous.










share|improve this question









New contributor




thepufferfish is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



















  • Related blender.stackexchange.com/questions/35193/…
    – Mr Zak
    3 mins ago












up vote
2
down vote

favorite









up vote
2
down vote

favorite











One thing that I've noticed when drawing quads is that, if a single surface cannot be established using the vertex arrangement (for example, if you add the default plane and raise a single vertex to 1 on the Z-axis), Blender will treat it a quad (subsurf works fine with it and will smooth it out into a hyperbolic surface) but render it as two conjoined tris (prior to the subsurf).



Now, I'm fairly certain that I should avoid this in most cases and would want to fix it if it does occur. In my example above, I could obviously just shift the vertex back to 0 on the Z-axis, because the surface is completely flat. However, if I were to rotate this quad, I would be in a situation where moving the vertex to establish a flat surface would require very precise changes to the X, Y, and Z positions.



I was wondering if there is some feature of Blender or a technique to adjust vertices exactly that the quad is absolutely flat, even if the quad is rotated.



P.S. I apologize for the very technical and possibly pedantic style of writing. Because I want to ensure the question is communicated clearly, I felt that it was necessary to be scrupulous.










share|improve this question









New contributor




thepufferfish is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











One thing that I've noticed when drawing quads is that, if a single surface cannot be established using the vertex arrangement (for example, if you add the default plane and raise a single vertex to 1 on the Z-axis), Blender will treat it a quad (subsurf works fine with it and will smooth it out into a hyperbolic surface) but render it as two conjoined tris (prior to the subsurf).



Now, I'm fairly certain that I should avoid this in most cases and would want to fix it if it does occur. In my example above, I could obviously just shift the vertex back to 0 on the Z-axis, because the surface is completely flat. However, if I were to rotate this quad, I would be in a situation where moving the vertex to establish a flat surface would require very precise changes to the X, Y, and Z positions.



I was wondering if there is some feature of Blender or a technique to adjust vertices exactly that the quad is absolutely flat, even if the quad is rotated.



P.S. I apologize for the very technical and possibly pedantic style of writing. Because I want to ensure the question is communicated clearly, I felt that it was necessary to be scrupulous.







mesh vertices geometry






share|improve this question









New contributor




thepufferfish is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




thepufferfish is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 5 hours ago





















New contributor




thepufferfish is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 5 hours ago









thepufferfish

112




112




New contributor




thepufferfish is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





thepufferfish is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






thepufferfish is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











  • Related blender.stackexchange.com/questions/35193/…
    – Mr Zak
    3 mins ago
















  • Related blender.stackexchange.com/questions/35193/…
    – Mr Zak
    3 mins ago















Related blender.stackexchange.com/questions/35193/…
– Mr Zak
3 mins ago




Related blender.stackexchange.com/questions/35193/…
– Mr Zak
3 mins ago










2 Answers
2






active

oldest

votes

















up vote
1
down vote













If you only care about planar faces in general, then there's an automatic way for that by selecting Mesh > Clean Up > Make Planar Faces.



If you really want to only move a specific vertex of the quad, you can



  1. move the 3D Cursor to one of the three other vertices (Select the vertex, Shift+S > Cursor to Selected) and switch to Pivot Point > 3D Cursor (. key)


  2. Shift-select all three vertices that should define your plane and should not move

  3. Hit Ctrl+Alt+Space to define a custom Transform Orientation

  4. Select the vertex that you want to move and scale it locally along the Z-axis of the new transform orientation: SZZ 0 Enter





share|improve this answer






















  • I knew it had to be somewhere ... of course, my meshes never need cleaning up... so I've never found that button ¦ l
    – Robin Betts
    30 mins ago

















up vote
0
down vote













Rotate vertex



This should be possible via python. Basically you rotate the vertex in question around the origin by the difference between the normals of the two planar faces of the non-planar quad.



import bmesh
import bpy

bm = bmesh.from_edit_mesh(bpy.context.object.data)
vert = [v for v in bm.verts if v.select == True][0]
face = vert.link_faces[0]#Assuming single linked face
i = [i for i in range(0, len(face.verts)) if face.verts[i] == vert][0]
next = face.verts[(i+1)%4]#quad
prev = face.verts[(i-1)%4]
opp = face.verts[(i+2)%4]
f1 = bm.faces.new([prev, vert, next])
f2 = bm.faces.new([next, opp, prev])
f1.normal_update()
f2.normal_update()
quat = f1.normal.rotation_difference(f2.normal)
bmesh.ops.rotate(bm, cent=(0,0,0), matrix=quat.to_matrix(), verts=[vert])
bm.faces.remove(f1)
bm.faces.remove(f2)
bpy.ops.object.mode_set(mode = 'OBJECT', toggle = False)





share|improve this answer




















    Your Answer




    StackExchange.ifUsing("editor", function ()
    return StackExchange.using("mathjaxEditing", function ()
    StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
    StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
    );
    );
    , "mathjax-editing");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "502"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );






    thepufferfish is a new contributor. Be nice, and check out our Code of Conduct.









     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fblender.stackexchange.com%2fquestions%2f119910%2fhow-do-i-shift-a-vertex-to-establish-a-single-flat-surface-on-a-quad%23new-answer', 'question_page');

    );

    Post as a guest






























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    1
    down vote













    If you only care about planar faces in general, then there's an automatic way for that by selecting Mesh > Clean Up > Make Planar Faces.



    If you really want to only move a specific vertex of the quad, you can



    1. move the 3D Cursor to one of the three other vertices (Select the vertex, Shift+S > Cursor to Selected) and switch to Pivot Point > 3D Cursor (. key)


    2. Shift-select all three vertices that should define your plane and should not move

    3. Hit Ctrl+Alt+Space to define a custom Transform Orientation

    4. Select the vertex that you want to move and scale it locally along the Z-axis of the new transform orientation: SZZ 0 Enter





    share|improve this answer






















    • I knew it had to be somewhere ... of course, my meshes never need cleaning up... so I've never found that button ¦ l
      – Robin Betts
      30 mins ago














    up vote
    1
    down vote













    If you only care about planar faces in general, then there's an automatic way for that by selecting Mesh > Clean Up > Make Planar Faces.



    If you really want to only move a specific vertex of the quad, you can



    1. move the 3D Cursor to one of the three other vertices (Select the vertex, Shift+S > Cursor to Selected) and switch to Pivot Point > 3D Cursor (. key)


    2. Shift-select all three vertices that should define your plane and should not move

    3. Hit Ctrl+Alt+Space to define a custom Transform Orientation

    4. Select the vertex that you want to move and scale it locally along the Z-axis of the new transform orientation: SZZ 0 Enter





    share|improve this answer






















    • I knew it had to be somewhere ... of course, my meshes never need cleaning up... so I've never found that button ¦ l
      – Robin Betts
      30 mins ago












    up vote
    1
    down vote










    up vote
    1
    down vote









    If you only care about planar faces in general, then there's an automatic way for that by selecting Mesh > Clean Up > Make Planar Faces.



    If you really want to only move a specific vertex of the quad, you can



    1. move the 3D Cursor to one of the three other vertices (Select the vertex, Shift+S > Cursor to Selected) and switch to Pivot Point > 3D Cursor (. key)


    2. Shift-select all three vertices that should define your plane and should not move

    3. Hit Ctrl+Alt+Space to define a custom Transform Orientation

    4. Select the vertex that you want to move and scale it locally along the Z-axis of the new transform orientation: SZZ 0 Enter





    share|improve this answer














    If you only care about planar faces in general, then there's an automatic way for that by selecting Mesh > Clean Up > Make Planar Faces.



    If you really want to only move a specific vertex of the quad, you can



    1. move the 3D Cursor to one of the three other vertices (Select the vertex, Shift+S > Cursor to Selected) and switch to Pivot Point > 3D Cursor (. key)


    2. Shift-select all three vertices that should define your plane and should not move

    3. Hit Ctrl+Alt+Space to define a custom Transform Orientation

    4. Select the vertex that you want to move and scale it locally along the Z-axis of the new transform orientation: SZZ 0 Enter






    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited 58 mins ago

























    answered 3 hours ago









    binweg

    2,0311412




    2,0311412











    • I knew it had to be somewhere ... of course, my meshes never need cleaning up... so I've never found that button ¦ l
      – Robin Betts
      30 mins ago
















    • I knew it had to be somewhere ... of course, my meshes never need cleaning up... so I've never found that button ¦ l
      – Robin Betts
      30 mins ago















    I knew it had to be somewhere ... of course, my meshes never need cleaning up... so I've never found that button ¦ l
    – Robin Betts
    30 mins ago




    I knew it had to be somewhere ... of course, my meshes never need cleaning up... so I've never found that button ¦ l
    – Robin Betts
    30 mins ago












    up vote
    0
    down vote













    Rotate vertex



    This should be possible via python. Basically you rotate the vertex in question around the origin by the difference between the normals of the two planar faces of the non-planar quad.



    import bmesh
    import bpy

    bm = bmesh.from_edit_mesh(bpy.context.object.data)
    vert = [v for v in bm.verts if v.select == True][0]
    face = vert.link_faces[0]#Assuming single linked face
    i = [i for i in range(0, len(face.verts)) if face.verts[i] == vert][0]
    next = face.verts[(i+1)%4]#quad
    prev = face.verts[(i-1)%4]
    opp = face.verts[(i+2)%4]
    f1 = bm.faces.new([prev, vert, next])
    f2 = bm.faces.new([next, opp, prev])
    f1.normal_update()
    f2.normal_update()
    quat = f1.normal.rotation_difference(f2.normal)
    bmesh.ops.rotate(bm, cent=(0,0,0), matrix=quat.to_matrix(), verts=[vert])
    bm.faces.remove(f1)
    bm.faces.remove(f2)
    bpy.ops.object.mode_set(mode = 'OBJECT', toggle = False)





    share|improve this answer
























      up vote
      0
      down vote













      Rotate vertex



      This should be possible via python. Basically you rotate the vertex in question around the origin by the difference between the normals of the two planar faces of the non-planar quad.



      import bmesh
      import bpy

      bm = bmesh.from_edit_mesh(bpy.context.object.data)
      vert = [v for v in bm.verts if v.select == True][0]
      face = vert.link_faces[0]#Assuming single linked face
      i = [i for i in range(0, len(face.verts)) if face.verts[i] == vert][0]
      next = face.verts[(i+1)%4]#quad
      prev = face.verts[(i-1)%4]
      opp = face.verts[(i+2)%4]
      f1 = bm.faces.new([prev, vert, next])
      f2 = bm.faces.new([next, opp, prev])
      f1.normal_update()
      f2.normal_update()
      quat = f1.normal.rotation_difference(f2.normal)
      bmesh.ops.rotate(bm, cent=(0,0,0), matrix=quat.to_matrix(), verts=[vert])
      bm.faces.remove(f1)
      bm.faces.remove(f2)
      bpy.ops.object.mode_set(mode = 'OBJECT', toggle = False)





      share|improve this answer






















        up vote
        0
        down vote










        up vote
        0
        down vote









        Rotate vertex



        This should be possible via python. Basically you rotate the vertex in question around the origin by the difference between the normals of the two planar faces of the non-planar quad.



        import bmesh
        import bpy

        bm = bmesh.from_edit_mesh(bpy.context.object.data)
        vert = [v for v in bm.verts if v.select == True][0]
        face = vert.link_faces[0]#Assuming single linked face
        i = [i for i in range(0, len(face.verts)) if face.verts[i] == vert][0]
        next = face.verts[(i+1)%4]#quad
        prev = face.verts[(i-1)%4]
        opp = face.verts[(i+2)%4]
        f1 = bm.faces.new([prev, vert, next])
        f2 = bm.faces.new([next, opp, prev])
        f1.normal_update()
        f2.normal_update()
        quat = f1.normal.rotation_difference(f2.normal)
        bmesh.ops.rotate(bm, cent=(0,0,0), matrix=quat.to_matrix(), verts=[vert])
        bm.faces.remove(f1)
        bm.faces.remove(f2)
        bpy.ops.object.mode_set(mode = 'OBJECT', toggle = False)





        share|improve this answer












        Rotate vertex



        This should be possible via python. Basically you rotate the vertex in question around the origin by the difference between the normals of the two planar faces of the non-planar quad.



        import bmesh
        import bpy

        bm = bmesh.from_edit_mesh(bpy.context.object.data)
        vert = [v for v in bm.verts if v.select == True][0]
        face = vert.link_faces[0]#Assuming single linked face
        i = [i for i in range(0, len(face.verts)) if face.verts[i] == vert][0]
        next = face.verts[(i+1)%4]#quad
        prev = face.verts[(i-1)%4]
        opp = face.verts[(i+2)%4]
        f1 = bm.faces.new([prev, vert, next])
        f2 = bm.faces.new([next, opp, prev])
        f1.normal_update()
        f2.normal_update()
        quat = f1.normal.rotation_difference(f2.normal)
        bmesh.ops.rotate(bm, cent=(0,0,0), matrix=quat.to_matrix(), verts=[vert])
        bm.faces.remove(f1)
        bm.faces.remove(f2)
        bpy.ops.object.mode_set(mode = 'OBJECT', toggle = False)






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 56 mins ago









        Blender Dadaist

        46317




        46317




















            thepufferfish is a new contributor. Be nice, and check out our Code of Conduct.









             

            draft saved


            draft discarded


















            thepufferfish is a new contributor. Be nice, and check out our Code of Conduct.












            thepufferfish is a new contributor. Be nice, and check out our Code of Conduct.











            thepufferfish is a new contributor. Be nice, and check out our Code of Conduct.













             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fblender.stackexchange.com%2fquestions%2f119910%2fhow-do-i-shift-a-vertex-to-establish-a-single-flat-surface-on-a-quad%23new-answer', 'question_page');

            );

            Post as a guest













































































            Comments

            Popular posts from this blog

            What does second last employer means? [closed]

            List of Gilmore Girls characters

            Confectionery