cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
GDL
About building parametric objects with GDL.

window positioning

julienK
Advocate
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.
9 REPLIES 9
Lingwisyer
Guru
I haven not encountered this before... Does the Hotspot origin and moving point not match the relevant corners of your Wallhole?



Ling.

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
julienK
Advocate
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
julienK
Advocate
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
Contributor
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
Moderator
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.

Barry.
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
Expert
Have You tried this:
https://bimcomponents.com/Search/freeform
- AC-24 FIN - WIN 10 - HP Zbook -
“A winner is just a loser who tried one more time.”
George M. Moore, Jr.