Extend or shorten the model lengthwise

Now there is a window

image-20220826130856009

This window consists of 4 objects like below

image-20220826131055823

Assembled as shown below

image-20220826131245937

Now if I want to make the window wider, I need to elongate the upper and lower objects, but the shape of the corners remains the same

image-20220826131356231

If you use the method of setting scale, the bevel of the edge will be deformed

image-20220826131600271

image-20220826131606934

How to stretch, increase or shorten the length without deforming the corners to get a new combination of windows

Here the bevel of the object is a hollow shape, is it possible to identify all the points of the bevel to do inward or outward stretching, or is there any other solution to get a window with a length or width resized

image-20220826132200960

The easiest solution may be to just split these shapes into 2 parts, and put them inside a Three.Group:

image-20220826131245937

Group will allow you to treat the entire combination as a single 3D object. And when scaling, scale just the middle part, while only offsetting the corners based on the total object width.

Another option is to move/shift (not scale) vertices on opposite sides along X-axis. :thinking:

1 Like

Thanks for the reply,

  1. Is there a demo that can tell me how to cut an object into two parts, such as parts A and B in your schematic diagram
  2. If there is a logo in the middle of part B in your schematic diagram, we do not want to change the size of the logo, is there any other solution?

Thanks for the reply,
Is there a demo that can achieve this effect?

  1. I’d personally just prepare part A and part B in Blender. Code-based geometries are kinda hard to maintain over time.
  2. You can place a transparent PlaneGeometry in front of “part B” and apply the logo on it (then just position the plane to be in the middle of the entire object width.)

(Small digress: if you’re familiar with react, consider going for react-three-fiber. (a) React components make it blissfully easy for you to do the calculations of scale and offsets based on the props you pass to the component - which in turn makes construction / configurator projects simpler and more predictable (b) r3f has drei decals - which once again, reduces all the texture / decal management to just a single line of code that can be applied on pretty much anything.)

1 Like

A gif, as a proof that it’s achievable.

PartLength

Is it possible to provide a demo link with this gif please ?

Thank you very much for your suggestion, we will analyze these tool components you mentioned.

Based on your tips, we have found a way to adjust the coordinates of all the points on the left side of the center point to the left, and the points on the right side of the center point to the right, if there is a logo in the middle, from the 20% position in the width direction do point coordinate adjustment left or right, thanks a lot for your suggestion

You’re welcome :handshake:
Here is the example: https://codepen.io/prisoner849/pen/VwXOGYo

3 Likes

If you don’t need it dynamically, you might consider constructing the window similar to the one in this resource.

3 Likes

This solution is great, thanks again.

1 Like

Your demo is great which can be used as our reference, thanks.

In this project I used the frames:

Showrooms easy to generate from data of a construction drawing or dimensional sketch - now on Github

1 Like