Stretch both ways

Viewing 8 reply threads
  • Author
    Posts
    • #3578
      Bruce Walker
      Participant

      I’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?

      www.brucepwalker.com
      https://www.mindmeister.com/65450406

      AC20 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

    • #3580
      Barry Kelly
      Participant

      It’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

    • #3581
      Bruce Walker
      Participant

      That’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/65450406

      AC20 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

    • #3586
      Bruce Walker
      Participant

      So, 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/65450406

      AC20 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

    • #3587
      Bruce Walker
      Participant

      Why are .gsm files prohibited on a GDL forum? Bizarre.

      Attachments:

      www.brucepwalker.com
      https://www.mindmeister.com/65450406

      AC20 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

      • #3603
        Gergely Fehér
        Keymaster

        It’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

    • #3609
      Bruce Walker
      Participant

      Is anybody able to offer advice on properly stretching around a centre point?

      www.brucepwalker.com
      https://www.mindmeister.com/65450406

      AC20 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

      • #3611
        Gergely Fehér
        Keymaster

        Bruce,

        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

    • #3619
      Bruce Walker
      Participant

      Thanks 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/65450406

      AC20 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

    • #3620
      Barry Kelly
      Participant

      At 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

    • #3621
      Bruce Walker
      Participant

      That’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/65450406

      AC20 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

      • #3638
        Dominika Bobály
        Keymaster

        There 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

Viewing 8 reply threads
  • The forum ‘Graphical editing’ is closed to new topics and replies.