10
$\begingroup$

I would like to be able to select a group of faces that are all different sizes, and be able to make them all the same size. Please see the attached image for the my example -

enter image description here

I would like to resize all the highlighted faces to be 1 uniform size (ie. the average size) so that I can then extrude them back to create equal sized indents. The method needs to resize them based on their current orientation as the surface is not completely flat (intentionally).

Thanks in advance.

$\endgroup$
  • 3
    $\begingroup$ Partially related - blender.stackexchange.com/questions/7698/…. You select bottom edges of faces and execute Looptools > Space. Length of selected edges will become roughly the same. Then you should repeat that with other edges forming the faces. $\endgroup$ – Mr Zak Jan 7 '16 at 15:24
3
$\begingroup$

I'm affraid it is impossible to do this in one step. I'll show you the dirty way.

With the face select mode enabled select the face and press Shift+Num 7 to allign it to view. Then snap the cursor to it (Shift+S-->Cursor to Selected) and add a plane. Check the Allign to View box in a Tool Shelf (T) and scale it (S) to the desired size.
enter image description here

Enable the snapping tool (click the magnet icon), change snap element type to Vertex. Snap the vertices of your object to the newly added plane, then select the whole mesh (A) and remove doubles (W-->Remove Doubles). enter image description here

Repeat the process with the other faces. enter image description here

$\endgroup$
4
$\begingroup$

You could use Smooth and repeat W -> Smooth -> F6 and adjust Smoothing factor and number of Repeats.

Or a small script - at the end of the script all selected faces will have almost identical area. The orientation and shape are preserved.

import bpy
import bmesh
import math
from math import sqrt

obj = bpy.context.edit_object
me = obj.data
bm = bmesh.from_edit_mesh(me)

face_data = []
area_accum = 0.0
for f in bm.faces:
    if f.select:
        area = f.calc_area()
        if area != 0.0:  # avoid divide by zero
            center = f.calc_center_median_weighted()
            face_data.append((f, area, center))
            area_accum += area

            print(area)

area_average = area_accum / len(face_data)
print("average area is:", area_average)

for f, area, center in face_data:
    rescale = sqrt(area_average / area)
    for l in f.loops:
        v = l.vert
        v.co = ((v.co - center) * rescale) + center

bmesh.update_edit_mesh(me, True)

output:

0.009626750834286213
0.01746169477701187
0.020414138212800026
0.009531363844871521
0.012785278260707855
0.016477763652801514
0.010115167126059532
average_area 0.013773165244076933

# if you ran it a second time all areas are as close as they'll get.
0.013773156329989433
0.013773160986602306
0.013773168437182903
0.013773171231150627
0.01377316378057003
0.013773173093795776
0.013773162849247456

(view this image in a new tab to see the difference in area directly displayed on the polygons)

enter image description here

The above script preserves Shape, but uses a rescale factor to homogenize the Area of all selected Faces. If you need to also make all edge lengths the same while preserving Area and Orientation that's possible too.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.