2013-09-21
03:36 AM
- last edited on
2024-09-26
01:46 PM
by
Doreena Deng
2023-11-13 02:19 PM
Thanks! Very usefull. Is it also possible to add a fill?
I am trying to make an object using 3 different transparant fills on top of each other.
2023-11-13 02:33 PM
You can add a fill by copying the snippet below to the object's 2D code section.
fill 2 ! or whatever you want
for i = 1 to points
put xx[i], yy[i]
next i
poly2 nsp/2, 1+2+4, get(nsp)
2023-11-13 03:21 PM
Thanks a lot! Just what I needed. Works perfect!
2023-11-13 06:20 PM
2023-11-14 02:58 AM
Try something like ...
for i = 1 to points
put xx[i], yy[i], s[i]
next i
poly2_B nsp/3, 1+2+4,
fill_pen, fill_background_pen,
get(nsp)
You have to add the status code to your PUT statements.
,s[i] could probably just be replaced with ,1 if you want all the edges visible.
Change the number of nodes to allow for the fact you are PUTing 3 values now.
Adjust the POLY command.
Barry.
2023-11-14 09:11 AM
Thanks Barry!
The script works but i get a remark when I try to set the values of the s[i] to the same value
"Possibly unwanted parameter type change
at line 52 in the 2D script"
2023-11-14 09:24 AM
If it is always going to be '1' then I would try ...
for i = 1 to points
put xx[i], yy[i], 1
next i
And not worry about setting the array values for s[i]
Barry.
2023-11-14 09:31 AM - edited 2023-11-14 09:31 AM
In fact I added a fill to a polyline object just a little while ago.
Barry.
2024-12-02 01:31 PM
Since this is obviously very useful functionality and implementing it in GDL is so limited and painful, I made a Wish to make it work 'natively' in AC: https://community.graphisoft.com/t5/Wishlist/Bring-standard-polyline-and-polygon-editing-tools-to-GD... .
2 hours ago
Trying to figure it out how it works "for fun" and tinkering bit for better ( or worse probably)
There is a few things that I don't fully understand ^^
1) Is there a reason for the following:?
The master script has the following sections for adding points parameter related
!===MAKE ROOM FOR NEW VALUES IN ARRAYS=====
!===GIVE PARAMETER ARRAYS THEIR CALCULATED VALUES=====while the parameterscript has the following sections for removing points parameter related:
!===DECLARE TEMP ARRAYS=====
!===CHECK ARRAYS FOR NUMBER OF POINTS=====
!===GIVE STORED REDUCED VALUES TO ORIGINAL ARRAYS=====
!===GIVE PARAMETER ARRAYS THEIR CALCULATED VALUES=====however the main logic for adding or removing is in masterscript anyway:
!===FOR ADDING POINTS===============================================
!===FOR REMOVING POINTS=============================================why not write in master like this and delete from parameterscript:
!===DECLARE TEMP ARRAYS=====
!===MAKE ROOM FOR NEW VALUES IN ARRAYS=====
!===CHECK ARRAYS FOR NUMBER OF POINTS=====
!===GIVE STORED REDUCED VALUES TO ORIGINAL ARRAYS=====
!===GIVE PARAMETER ARRAYS THEIR CALCULATED VALUES=====works just fine so far.
2)There were also some arrays that seem unnececery for the insert hotspots and endhotspots if i dind't miss anything