Home › Forums › Problems and solutions in GDL › Graphical editing › Stretch both ways
- This topic has 11 replies, 4 voices, and was last updated 7 years, 5 months ago by
Dominika Bobály.
-
AuthorPosts
-
-
October 9, 2017 at 09:06 #3578
Bruce Walker
ParticipantI’m trying to figure out how to add dynamic hotspots to both ends of my object, and have the object stretch in that direction.
If you look at the Rail Simple Bar, it does what I want…but when I try it, the result is my object half-stretching around the origin. I’ve opened the Rail to have a look, but can’t figure it out.
What is the secret?
Attachments:
www.brucepwalker.com
https://www.mindmeister.com/65450406AC20 6005 AUS Full & AC 21 3009 NZE Full | Win 10 Pro 64 | Intel i7-7700HQ 2.80GHz | 16 Gb RAM
NVIDIA GeForce GTX 1060 8Mb -
October 9, 2017 at 09:36 #3580
Barry Kelly
ParticipantIt’s hard to say what is happening without seeing your objects code.
But if you want to make both ends of an editable hotspot to be editable then you can add a ‘hotspot attribute’ of 256 to your ‘base hotspot (type 1)
So the base hotspot would be …HOTSPOT2 x, y , unID , paramReference , 1+256
Barry.
Versions 6.5 to 22
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Dell Precision M6800 - i7 4700MQ @ 2.40GHz, 16GB RAM, AMD FirePro M6100 (2GB), Windows 7 64bit -
October 9, 2017 at 09:52 #3581
Bruce Walker
ParticipantThat’s an embarrassing oversight on my part. Thanks Barry.
Still trying to figure out my particular object…but I’ll work on it a bit more before asking silly questions again.
Cheers
www.brucepwalker.com
https://www.mindmeister.com/65450406AC20 6005 AUS Full & AC 21 3009 NZE Full | Win 10 Pro 64 | Intel i7-7700HQ 2.80GHz | 16 Gb RAM
NVIDIA GeForce GTX 1060 8Mb -
October 14, 2017 at 05:36 #3586
Bruce Walker
ParticipantSo, I’ve worked on this further, and cannot get this particular object to behave the way I want. I have created a test object for demonstration purposes (attached). This object draws a main box, with a secondary box inside. I need to add dynamic hotspots to be able to adjust the dimensions of the secondary box…this is where I’m having trouble.
Refer attached .gsm
Any help would be appreciated.
www.brucepwalker.com
https://www.mindmeister.com/65450406AC20 6005 AUS Full & AC 21 3009 NZE Full | Win 10 Pro 64 | Intel i7-7700HQ 2.80GHz | 16 Gb RAM
NVIDIA GeForce GTX 1060 8Mb -
October 14, 2017 at 05:37 #3587
Bruce Walker
ParticipantWhy are .gsm files prohibited on a GDL forum? Bizarre.
Attachments:
www.brucepwalker.com
https://www.mindmeister.com/65450406AC20 6005 AUS Full & AC 21 3009 NZE Full | Win 10 Pro 64 | Intel i7-7700HQ 2.80GHz | 16 Gb RAM
NVIDIA GeForce GTX 1060 8Mb-
October 19, 2017 at 10:54 #3603
Gergely Fehér
KeymasterIt’s a security issue with the hosting service we use for the page. Sorry, but I can’t do anything with it – gsm files are forbidden with many big hosting companies…
Gergely Fehér
Team Leader, Library Team
GRAPHISOFT SE
-
October 23, 2017 at 05:58 #3609
Bruce Walker
ParticipantIs anybody able to offer advice on properly stretching around a centre point?
www.brucepwalker.com
https://www.mindmeister.com/65450406AC20 6005 AUS Full & AC 21 3009 NZE Full | Win 10 Pro 64 | Intel i7-7700HQ 2.80GHz | 16 Gb RAM
NVIDIA GeForce GTX 1060 8Mb-
October 23, 2017 at 14:16 #3611
Gergely Fehér
KeymasterBruce,
In situations like this, you should add a new parameter, as the half of the original, and create hs editing for this halfParam. In the paramscript you should link the Param and halfParam with GLOB_MODPAR_NAME.
Gergely Fehér
Team Leader, Library Team
GRAPHISOFT SE
-
-
October 23, 2017 at 19:49 #3619
Bruce Walker
ParticipantThanks Gergely. I have tried this method before:
1. Using the half-width parameter, the user can snap to what they want, but has to work out half the full width on the fly for a typed entry.
2. Using the full-width parameter, the user cannot snap to what they want, but is able to type in the width they want.I was hoping someone knew of a really clever parameter-swapping method that would deal with both these issues. That’s ok – it is what it is.
Cheers,
www.brucepwalker.com
https://www.mindmeister.com/65450406AC20 6005 AUS Full & AC 21 3009 NZE Full | Win 10 Pro 64 | Intel i7-7700HQ 2.80GHz | 16 Gb RAM
NVIDIA GeForce GTX 1060 8Mb -
October 24, 2017 at 02:17 #3620
Barry Kelly
ParticipantAt the end of the ‘moving’ hotspot (flag type 2), you can add an optional display parameter.
So you need the full width and half width parameters as mentioned (linked via GLOB_MODPAR_NAME).
Then you add the hotspot to adjust the half width but add the optional parameter for the full width at the end of the moving hotspot code.
The user will be adjusting the half width but seeing the value of the full width.Barry.
Versions 6.5 to 22
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Dell Precision M6800 - i7 4700MQ @ 2.40GHz, 16GB RAM, AMD FirePro M6100 (2GB), Windows 7 64bit -
October 24, 2017 at 02:33 #3621
Bruce Walker
ParticipantThat’s awesome! I had a vague suspicion that this sort of thing could be done…now I know how!
Thank you Barry & Gergely…it is now working as desired. Much appreciated.
www.brucepwalker.com
https://www.mindmeister.com/65450406AC20 6005 AUS Full & AC 21 3009 NZE Full | Win 10 Pro 64 | Intel i7-7700HQ 2.80GHz | 16 Gb RAM
NVIDIA GeForce GTX 1060 8Mb-
October 31, 2017 at 13:37 #3638
Dominika Bobály
KeymasterThere is a detailed tutorial for similar cases here, with downloadable example objects (the one you need is Central editing example AC19.gsm in the lcf).
Dominika Bobály
Product Manager
GRAPHISOFT SE
-
-
-
AuthorPosts
- The forum ‘Graphical editing’ is closed to new topics and replies.