Choose your top Archicad wishes!

Read more
Wishes
Post your wishes about Graphisoft products: Archicad, BIMx, BIMcloud, and DDScad.

XFORM (GDL) to have a scaling factor

Barry Kelly
Moderator

My wish is for the XFORM command in GDL to have a scaling factor for the bounding surface area.

Currently it can move the bounding planes in any (or all) of the 3 axis directions.

But I would like for it to also have a scaling factor so we could also reduce/enlarge the bounding planes.

I have 'faked' it in this example with a cone.

 

BarryKelly_0-1683782868440.png

Barry.

One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
7 REPLIES 7
Barry Kelly
Moderator

Just imagine it was a single HPRISM with the Z-plane scaled so it is smaller than the base

The perfect bath or basin.

 

BarryKelly_0-1683783511331.png

 

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

Hi Barry, unfortunately this is not possible.  XFORM is  simply a matrix.  When you apply a transformation matrix to an object what you effectively do is   modifying  the  proportions,  orientation, angles  or scale of the xyz  system  used to represent it.

You have your usual  xyz cartesian  coordinates  all with unit  one and orthogonal to each other to start with. You apply a matrix to it  and what it does is, transform that system and subsequently the whole field it represent.

What that mean is that every transformation made with a matrix  can  only  be linear and homogenous across the whole field.

 

 

I am not sure how it works, but thanks for explaining.

I don't even mind if it is a completely new command.

It is just a wish.

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
julienK
Advocate

It would have to be a whole new command yes.

The problem with your exemple is that the pyramid shape you want cannot be defined just by stretching  the base plane as you suggest.

To make it simple,  whatever you do with XFORM, the lines along an axis always stay parallel to each other. If you take your pyramid  image in your  original post, if  you scale the base plane,  it is not enough to define the transformation.  Scaling the base plane would mean that every lines along the z axis would have  to converge somwhere, but where?  On the positive or negative side of z ? On the axis or offset from it ? It gets messy really quick.

 

The math behind matrices is called linear algrebra and its prettty fascinating.  It is absolutely fundamental in computer science and you use it basically every time you use a command in archicad. If you are interested  look at this it explains it extremely well https://www.youtube.com/watch?v=kjBOesZCoqc&list=PL0-GT3co4r2y2YErbmuJw2L5tW4Ew2O5B

 

Hey Barry,

If you or others want some more behind-the-scenes about what the XFORM does, see pages 2 and 3 of this article I wrote 19 (!) years ago for the GDL Cookbook 4:

http://www.opengdl.org/Portals/14/OGB-objects/ottenstein/Skewer_and_XFORM.pdf?ver=PV1Znz9HJkEphx5Tk9...

 

Cheers,

Karl

 

One of the forum moderators
AC 27 USA and earlier   •   macOS Ventura 13.6.7, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB

It seems sweep might be what you are after. Ruled might work too 


@SenecaDesignLLC wrote:

It seems sweep might be what you are after. Ruled might work too 


Yes and no.

With those I will have to calculate the path and scale (SWEEP) or new node coordinates (RULED).

And I don't necessarily want the same polygon shape (SWEEP) or the same number of nodes (RULED) along the path.

 

I was hoping for something that basically places a bounding box around the elements and then reduces the scale to one end of that bounding box.

All points between the two opposite bounding box planes would be scales proportionally.

XFORM can move or skew all of the intermediate points and surfaces already, I am just hoping for some way to rescale them uniformly between the two bounding planes.

 

Barry.

 

One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11