Showing results for 
Search instead for 
Did you mean: 
Showing results for 
Search instead for 
Did you mean: 
2024 Technology Preview Program

2024 Technology Preview Program:
Master powerful new features and shape the latest BIM-enabled innovations

About building parametric objects with GDL.

window positioning

I created a window composed of a wallhole with four hotspots that can move in all directions to allow me to create an opening in any shape i want.

My problem is that when I move one of the corners the whole window will be moved to keep the center the window in the same position. So, if i extend one corner by 50 cm, it will only move 25 and the whole window will slide by 25 in the opposite direction.

This seems to be particular to window/door type objects, i never encountered this problem with other objects I created.

How can I change the origin or reference point of a window object so that only the corner I edit will move?

I didn't find much about this in the documentation.

Thanks for the help.
I haven not encountered this before... Does the Hotspot origin and moving point not match the relevant corners of your Wallhole?


AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win11 | i9 10850K | 64GB | RX6600 Win10 | R5 2600 | 16GB | GTX1660
The hotspots match the wallhole just fine.

The problem is that when I resize the wallhole by dragging one of the hotspots the hole will shift on the wall to keep the same center position.
So if I drag one of the hotspots by x it will only move by x/2 and the rest of the hotspots will move by x/2 in the opposite direction.
You don't need to code hotspots to stretch a wall hole If you created a window wall hole then by default the a and b nodes provided will stretch the window the way you want. Because the windows are coded from centers out you cannot use your own hot spots to change the width or height without the effect happening that you're talking about but again you don't need those because the doors and windows base nodes will control the opening size if you mapped it to the a and b parameters
I do need the hotspots because I'm want to be able to get any shape i can need otherwise I'd just use a default opening.

I'm just trying to get around the centered orgin thing.
Goker Altuntas
Might it be about activating or deactivating the base point? What flag did you use for the base point? Just 1, 1+128 or 1+256?
Also could share a bit from your script? So we can better evaluate the structure
text2 0, dy * 2, "Goker Malik Altuntas"
You should have the main rectangle use a and b variable and then code the remaining hotspots for the shape. I know as I've spent hours in the past trying to do what you are wanting and ultimately you need a defining rectangle for boundaries and then a wall hole that has hotspots for shapes that is bound by a and b respectively.

It's the same for the wall accessories of you want to define shapes by name.
But a picture or object would help for sure with the explanation you're looking for.
Barry Kelly
Sounds like your wall hole is centred on the origin?
But you are using the full values of the width and height to stretch it.
Not sure if that explains it properly.

I would use 0,0,0 as the bottom left corner of your wallhole.
Then all the co-ordinates for the other corner hotspots should be exactly as you want them.
If you need to re-centre on the origin then use a transformation before the hotspots and wallhole command.

One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Pertti Paasky
Have You tried this:
- AC-24 FIN - WIN 10 - HP Zbook -
“A winner is just a loser who tried one more time.”
George M. Moore, Jr.