2
$\begingroup$

I am wondering if there is some easy way of quickly scaling an object across two axies (X, Y) while keeping the proportions of the object intact. It's hard to describe so I'll try using some pictures.

This is the object I want to scale: enter image description here

When I scale it along the X and Y axies, this is the result: enter image description here

Now, what I want to achieve is the walls of the object being spread out more, giving it a larger center area, but retaining the proportions of the walls, like this: enter image description here

I created the final picture by tediously having to scale all the individual edge loops to get it looking somewhat right. So I was wondering if there is a better way of achieving this, a good workflow? I hope the question is clear. Cheers.

$\endgroup$

3 Answers 3

2
$\begingroup$

Close, but only in this case

Select these vertices/edges (you can select one group of the 8, then do Shift+G --> select similar length:

enter image description here

Scale along the two axes that you want in bounding box pivot mode. Then switch to individual origins and scale in the opposite direction with only these vertices selected.

Python Script

It looks like you are only wanting to move each vertex a constant distance from the center. With normal scaling from a point p, a vertex 2 meters from p will move twice as much distance as a vertex 1 meter from p. This small snippet of Python code will not do this, but rather move each vertex a constant addend, not factor, of the radius.

Note: This script scales from the object's origin. Also, you should be in object mode to run it.

import bpy
import bmesh
from math import sqrt

scale = 2  # scale variable

# prepare bmesh
mesh = bpy.context.object.data
bm = bmesh.new()
bm.from_mesh(mesh)

for v in bm.verts:
    pos = v.co.xyz

    # r = sqrt(x^2 + y^2 + z^2)
    radius = sqrt(
        pow(pos.x, 2) + 
        pow(pos.y, 2) +
        pow(pos.z, 2))

    a = (radius + scale) / radius

    # modify the two axes you want
    pos.x *= a
    pos.y *= a

    # apply new position
    v.co.xyz = pos

# make the bmesh the object's mesh
bm.to_mesh(mesh)  
bm.free()
$\endgroup$
1
  • $\begingroup$ The first suggestion of your answer worked wonderfully! Thank you very much. $\endgroup$ May 28, 2018 at 1:10
0
$\begingroup$

I would think if you go into Edit mode, just select the bottom polygons, then turn on Proportional editing - you'd get your desired effect.

Once you scale, scroll the middle mouse up or down, to dial in the exact level of influence on the outer walls.

$\endgroup$
1
  • $\begingroup$ I figure if Mathias' got a good enough eye to manage with edge-loops, then this might suit his needs. I leave it up to him to decide. $\endgroup$ May 25, 2018 at 1:26
0
$\begingroup$
  1. CtrlAltU > Add-ons, enable the 'Offset Edges' Add-on.

  2. Select all the circumferential edges.

  3. In the 'Offset Edges' panel, select the 'Move' option.

enter image description here

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .