Forum Replies Created

AuthorPosts

In the meantime someone made it! Thank You!
Teacher in HTLSalzburg
AC519, Win and Mac
GDL hobby developer 
Thanks for Your quick reply!
Some additional thougts to that topic:
Dont make the error to think, this is just a hobby of an old teacher in Austria.
Spending Your time to implement this polygonefunctionality to GDL could make hunge impact on further develop GDLs and could make much more developers step into this topic.
When reading on architalkforum, You can read that there have stoppt some of the most skilled developers to develop in GDL because of the “not evolving GDL”.
I know, i am not having any right to give You orders which way Graphisoft should use its recources, but GDL is a main feature in Archicad and could be main selling point in the future in my opinion. And i think having worked out the importance and possibilities of features similar to the Accessoryaddon enough with my examples and videos.
Teacher in HTLSalzburg
AC519, Win and Mac
GDL hobby developer 
There are several of my last uploaded GDLs on bimcomponents, which got no downladbutton on the site! I have written to the bimcomponentsSupport month ago but there is no respond and no new downloadbutton on the elementssites.
One of several examples there:
https://bimcomponents.com/GSM/Details/21360
Teacher in HTLSalzburg
AC519, Win and Mac
GDL hobby developer 
Otherwise GDL should implement an real easy way to let the user operate polygonal elements exact like other ArchicadTools like slab or roofTool with the normal petpal.
In V19 – Archicad implemented editing more polygonal elements with one single command. GDL should be enabled to be editited also with this workflow!
Then – the accessoryaddon would become needless
Teacher in HTLSalzburg
AC519, Win and Mac
GDL hobby developer 
It should be supportet and upgreaded – there is great potential in it! Dont sleep!
Teacher in HTLSalzburg
AC519, Win and Mac
GDL hobby developer 
Obviously nobody home here – i have a further suggestion for this addon: Make it possible to link more than just one GDL to the addon. I just tried to add a further SlabAccessoryGDL to a slab but then the GDL before is not linked any more and became a static element.
I am working on a GDL for flat roofs and would like to be able to “devide” the functions into several extra GDLs all linked to the SlabAddon.
I mande a functioning Attika for the Slab, but i want to add railings in betweeen or complete different things on the slabsdges – editable but linked to the slab.
The progress so far: https://www.youtube.com/watch?v=14pWsDN4R_A
Teacher in HTLSalzburg
AC519, Win and Mac
GDL hobby developer 
Are all dead here? 😉
Teacher in HTLSalzburg
AC519, Win and Mac
GDL hobby developer 
In “the general scripting assignments” You write:
GLOB_VIEW_TYPE = 2 – 2D, floor plan
The model is displayed in the standard 2D floor plan.
In a 3D script this means that the model is projected to 2D
via the project2D command.
This is the main use of an object – this 2D model must be always correct and efficient.If GLOB_FEEDBACK_MODE = 1 then
the model is displayed via feedback lines on the 2D floor plan during the hotspot editing of the object.
This model is drawn many times in a single second throughout the user interaction.
This implies that the model should represent the essential parts of the object only.
Note, that texts (generated by text2 command)
are not refreshed in feedback mode – since it would slow down the output.So it seems to be possible to make displayrefresching faster and simpler by using this.
Thanks for that!What i am missing is the following:
If the users zooms out – so that the displayd symbol of my GDL gets really small on the screen – it often is not useful any more to be visible and editable. I think it would be a good idea to connect the visibility of these hotspots to a precentage – of its extents compared to the screen. – Automaticly made by Archicad itself or controllable by the Scripter?
Also an criteria for this could be the nearess of the mousecurser similar to the behaviour of the new blue guidelines in AC19..
To make this as clear as i can: You should be zooemd in enough and the Mousecurser schould be near enough to display the Hotspot and if the Mouscurser is moved even nearer – it displays the Name of the hotspot..
Teacher in HTLSalzburg
AC519, Win and Mac
GDL hobby developer 
Editable hotspots:
It is now possible to assign “names” for the editable value. Thanks for that!
I suggest to make this names readable for the User just hovering the mouscurser above it.Now You have to klick on the hotspot to read what he does.
I would like to have it readable just hovering above it before klicking. It now displays the name of the Element. If a name for a hotspot is assigned, this should appear by hovering above it additional to the name of the element.
An other option for this could be a simple hotkey that displays ALL THE NAMES of the Hotspots of the Element by pressing the hotkey. After releasing the hotkey – normal behaviour should occur again.
Teacher in HTLSalzburg
AC519, Win and Mac
GDL hobby developer 
I wish some additional functions direct in GDL – like a function for finding intersectionpoints without having to calculate them by selfmade graphical calculations and without the need to give it to a much too complex addon like polygonoperations.
This functions should not need more than one line of coding.
I want to remind Graphisoft – GDL means “Graphical Dialog Language” and should support graphical questions and calculations with builtin functions like this – most easy for the scripter. Other languages can do similar Things since decades (eg. AutoLisp)!
Teacher in HTLSalzburg
AC519, Win and Mac
GDL hobby developer 
Sorry about the formatingi made a mistake, but after three times of editing, ist not possible any more to change anything here.
Teacher in HTLSalzburg
AC519, Win and Mac
GDL hobby developer 
I opend the “Sill”macro and tried to reverseengeneer it but – real – “i am lost” with this.
It was much easier for me to write my own code for it to calculate the intersectionpoints:
“Innenversatz der Kontur”:
breite = UEBERDAEMMUNGSBREITE
for k = 1 to points
!! Zuweisungen zu Segment
if k = 1 then !! 1. Segment – ergibt auch letzten Punkt
Winkelzuvor = alpha2D[points]
Winkeljetzt = alpha2D[k]
Winkeldanach = alpha2D[k+1]x1=x[points1] !!!Koordinaten im Segment rauspicken
x2=x[k]y1=y[points1]
y2=y[k]x11=x[k] !!!Koordinaten im Segment rauspicken
x21=x[k+1]y11=y[k]
y21=y[k+1]gosub “Parallele1”
gosub “Parallele2”
gosub “Schnittpunkte1”
gosub “Schnittpunkt zweier Linien – 2D”! addx xp[k]
! addy yp[k]
! circle 0.01
! del 2endif
if k # points and k#1 then !! zwischen Segmente
Winkelzuvor = alpha2D[k1]
Winkeljetzt = alpha2D[k]
Winkeldanach = alpha2D[1]x1=x[k1] !!!Koordinaten im Segment rauspicken
x2=x[k]y1=y[k1]
y2=y[k]x11=x[k] !!!Koordinaten im Segment rauspicken
x21=x[k+1]y11=y[k]
y21=y[k+1]gosub “Parallele1”
gosub “Parallele2”
gosub “Schnittpunkte1”
gosub “Schnittpunkt zweier Linien – 2D”! addx xp[k]
! addy yp[k]
! circle 0.01
! del 2endif
!! Ende zu Segmentnext k
!
!for k= 1 to points1
!
! put xp[k]
! put yp[k]
!
!next k
!
!
!
!PRISM nsp/2, 0.01, !! DummyPrism für den späteren WallnicheBefehl
!get(nsp)
!return !!! Ende “Innenversatz der Kontur”
“Parallele1”:
dx = x2 – x1 !!!x+y Distanz der Punkte des Segmentes
dy = y2 – y1if dx < 0 then dx = dx
if abs(dx) < eps then dx=epsif dx < eps and dx < eps then
Winkelsegment = 90
else
WinkelSegment = atn(dy/dx)
endifRewinSeg = WinkelSegment – 90
Diagonale1 = sqr (dx^2+dy^2) !!!!Distanz der Punkte des Segmentes
P1x1 = breite * cos(RewinSeg)+x1
P1y1 = breite * sin(RewinSeg)+y1
p1x2 = breite * cos(RewinSeg)+x2
p1y2 = breite * sin(RewinSeg)+y2if x2 < x1 then
P1y1 = breite * sin(RewinSeg)+y1
p1y2 = breite * sin(RewinSeg)+y2
else
endifreturn
“Parallele2”:
dx1 = x21 – x11 !!!x+y Distanz der Punkte des Segmentes
dy1 = y21 – y11if dx1 < 0 then dx1 = dx1
if abs(dx1) < eps then dx1 = epsif dx1 < eps and dx1 < eps then
Winkelsegment1 = 90
else
WinkelSegment1 = atn(dy1/dx1)
endifRewinSeg1 = WinkelSegment1 – 90
Diagonale2 = sqr (dx1^2+dy1^2) !!!!Distanz der Punkte des Segmentes
P2x1 = breite * cos(RewinSeg1)+x11
P2y1 = breite * sin(RewinSeg1)+y11
p2x2 = breite * cos(RewinSeg1)+x21
p2y2 = breite * sin(RewinSeg1)+y21if x21 < x11 then
P2y1 = breite * sin(RewinSeg1)+y11
p2y2 = breite * sin(RewinSeg1)+y21
else
endifreturn
“Schnittpunkte1”: !!!!Nicht von mir erfunden!
getValues = 1
put p1x1, p1y1, p1x2, p1y2, p2x1, p2y1, p2x2, p2y2
gosub “Schnittpunkt zweier Linien – 2D”
if not(parallelLines~5) thenspx = x~5
spy = y~5xp[k] = spx
yp[k] = spyelse
endif
return
“Schnittpunkt zweier Linien – 2D”: !!!!Nicht von mir erfunden!
if getValues then
x11~5 = get(1): y11~5 = get(1)
x12~5 = get(1): y12~5 = get(1)
x21~5 = get(1): y21~5 = get(1)
x22~5 = get(1): y22~5 = get(1)
getValues = 0
endif
u1x~5 = x12~5 – x11~5
u1y~5 = y12~5 – y11~5
u2x~5 = x22~5 – x21~5
u2y~5 = y22~5 – y21~5
!Prüfung ob parallel und Punkt finden
D~5 = u2x~5*u1y~5 – u1x~5*u2y~5
if abs(D~5) < eps then
parallelLines~5 = 1
else
parallelLines~5 = 0
endif!Schnittpunkt von nicht parallelen Linien:
if not(parallelLines~5) then
t~5 = (u1x~5*(y21~5 – y11~5) – u1y~5*(x21~5 – x11~5))/D~5
x~5 = x21~5 + t~5*u2x~5
y~5 = y21~5 + t~5*u2y~5
elsexp[k] = P2x1!p1x2 !!!!!!!!!!!!nur die halbe Wahrheit – nur für genau waagrechte und senkrechte Polygone möglich!!!
yp[k] = P2y1!p2y2 !!! falls parallele waagrechte, dann nimm die Y und Y der vorigen Punkte
!!!!!! für iregndwelchen anders geneigten Parallelen muß es noch gerechnet werden!!endif
return
If someone needs it  feel free to use it. The central part is not from me  ist an internetadvice from a friend i dont know where he got it: So i cant tell about licence of this Code..
“Schnittpunkt zweier Linien – 2D”: !!!!Nicht von mir erfunden!
if getValues then
x11~5 = get(1): y11~5 = get(1)
x12~5 = get(1): y12~5 = get(1)
x21~5 = get(1): y21~5 = get(1)
x22~5 = get(1): y22~5 = get(1)
getValues = 0
endif
u1x~5 = x12~5 – x11~5
u1y~5 = y12~5 – y11~5
u2x~5 = x22~5 – x21~5
u2y~5 = y22~5 – y21~5
!Prüfung ob parallel und Punkt finden
D~5 = u2x~5*u1y~5 – u1x~5*u2y~5
if abs(D~5) < eps then
parallelLines~5 = 1
else
parallelLines~5 = 0
endif!Schnittpunkt von nicht parallelen Linien:
if not(parallelLines~5) then
t~5 = (u1x~5*(y21~5 – y11~5) – u1y~5*(x21~5 – x11~5))/D~5
x~5 = x21~5 + t~5*u2x~5
y~5 = y21~5 + t~5*u2y~5
elsexp[k] = P2x1!p1x2 !!!!!!!!!!!!nur die halbe Wahrheit – nur für genau waagrechte und senkrechte Polygone möglich!!!
yp[k] = P2y1!p2y2 !!! falls parallele waagrechte, dann nimm die Y und Y der vorigen Punkte
!!!!!! für iregndwelchen anders geneigten Parallelen muß es noch gerechnet werden!!endif
`
Teacher in HTLSalzburg
AC519, Win and Mac
GDL hobby developer 
I tried to avoid it “the rude way” with this:
OFT = WALL_SKINS_NUMBER if OFT = 0 then end
But then – the user does not see the graphics of the window before inserting it..
Teacher in HTLSalzburg
AC519, Win and Mac
GDL hobby developer 
I really would like to get an working GDL with only the functionality of the inner offset for a polygone!
Teacher in HTLSalzburg
AC519, Win and Mac
GDL hobby developer 
What i am looking for exactly is this:
I have a given Array of x and y – a closed polygone in the form of:
x[points] and y[points] and the number of points in the Array in an extra integer named “points”.
I want to get a second polygone – with an inner offset to the original one.
As far as i understand the GDLhandbook, i first have to open a channel with the code:
kanal = INITADDONSCOPE ("PolyOperations ", "", "")
Then i have to prepare my source and Target – Polygones:
!  QUELL + ZIELCONTAINER ERZEUGEN PREPAREFUNCTION kanal, "CreateContainer", "Eingang", "" PREPAREFUNCTION kanal, "SetSourceContainer", "Eingang", "" PREPAREFUNCTION kanal, "CreateContainer", "Ergebnis", "" PREPAREFUNCTION kanal, "SetDestinationContainer", "Ergebnis", ""
after this, i have to give my extra stored coordinates into one array:
for oft = 1 to points arrayname[oft][1] = x[oft] arrayname[oft][2] = y[oft] arrayname[oft][3] = 0 !! angle? nZug=nZug+1 : zug[nZug]=oft next oft
Then i have to give the array to the function:
PREPAREFUNCTION kanal, "Store", "Polygon", points, 1, arrayname, zug (contourArray)
i have difficulties to understand this:
contourArray: An array which contains the index of the last vertex of the ith contour. It must have exactly nContours items.
Therefor i would need an Example how to to this correctly!
Then i have to “init” the calculation with: ?? or how exactly?
dim resPolyIDArray[] nPgon = CALLFUNCTION (Kanal, "OffsetEdge", "Polygon", resPolyIDArray)
Then i have to read out the resulting array:
nPgon = CALLFUNCTION (Kanal, "GetDestinationPolygons", "", resPolyIDArray)
after this i can close it:
CLOSEADDONSCOPE (Kanal)
Then i can use put and get for an Poly2Command to draw the polygone. Im i Right so far? There are a lot of possible mistakes i can make with this very complex command…
Teacher in HTLSalzburg
AC519, Win and Mac
GDL hobby developer 
AuthorPosts