The Global Archicad Community

Stay informed. Get help. Share your knowledge.

Everything about using Libraries and Library Parts - Doors/Windows/Objects/Stairs etc. (Example: How can I display a Transom above my Door?)

Moderators: Karl Ottenstein, LaszloNagy, ejrolon, Barry Kelly, gkmethy, Gergely Feher

By JGoode

I'm trying to create a fill object that I can adjust the points of the fill to wherever I want them. I also want to be able to adjust the curved sides.

Is it possible to achieve this with my script? I'd like to use a length hotspot to adjust the curve. Any help would be appreciated.
Code: Select all
poly2_b{5}      13,      3,      0,      3,      19,      19, 
                   0,            0,            1,            0,            0,            1,            0, 

                   posx1,            posy1,      1, 
        		   mposx1,          mposy1,    900, 
                   0,         -180,   4001,
        		   posx2,          posy2,      1, 
        		 mposx2,          mposy2,    900, 
                   0,         -180,   4001,
        		 posx3,          posy3,      1, 
        		 mposx3,          mposy3,    900, 
                   0,         -180,   4001,
        		 posx4, 			 posy4,      1, 
        		 mposx4, 			 mposy4,    900, 
                   0,         -180,   4001,
                   posx1,            posy1,      1
FYI Master Script
Code: Select all
mposx1 = ((posx1+posx2)/2)
mposx2 = ((posx2+posx3)/2)
mposx3 = ((posx3+posx4)/2)
mposx4 = ((posx4+posx1)/2)
parameters mposx1=mposx1, mposx2=mposx2, mposx3=mposx3, mposx4=mposx4

mposy1 = ((posy1+posy2)/2)
mposy2 = ((posy2+posy3)/2)
mposy3 = ((posy3+posy4)/2)
mposy4 = ((posy4+posy1)/2)
parameters mposy1=mposy1, mposy2=mposy2, mposy3=mposy3, mposy4=mposy4
And the pos values are as follows -
posx1 = 0
posx2 = 0
posx3 = 200
posx4 = 200
posy1 = 0
posy2 = 200
posy3 = 200
posy4 = 0

By Braza
Hi jGoode,
You can control any of these parameters with Graphical Editable Hotspots.
You can find all the information here.
Hope that helps.
By JGoode
Braza wrote:
Tue Feb 11, 2020 9:06 pm
Hi jGoode,
You can control any of these parameters with Graphical Editable Hotspots.
You can find all the information here.
Hope that helps.
Sorry, I must not have explained clearly. I know how to add hotspots to the rest of them (eg pos1x) but I want to be able to adjust the -180 values to adjust the curve. However I can't see how that's possible with the current method of adding the curves.
By Braza
Ok. I see.
I think you can find some light in the Dynamic Polyline base code that Mr. sinceV6 generously shared with us, and along with equal generous contributions of Mr. Hmooslechner, Mr. Mariosmic and the legendary GDL master Mr. Olivier Dentan.
Hope that helps.
By JGoode
I have previously seen this - however they don't have curved edges and the one that does, isn't a fill and therefore works differently to what I need.
By Braza
It is not a fill, but it has arched segments controlled by an editable hotspot.
You can isolate the code for the hotspot and reverse engineering it apply to your fill.
The Mariosmic version seems to have what you need. Have you tried?
By JGoode
I have seen this in the past and reviewed more recently - The curves are made out of Arcs which don't translate to fills at all.

The method I want to use to be able to adjust the curve is have a centre point half way between the 2 points and then set the distance from the centre point to the arc – Is this possible to do in a fill and if so, how can I do it?
By Braza
Your arched fill segments are defined by additional Status Codes 900 (center point) and 4000 (Arc using centerpoint and angle).
If you want to control the arch using a length hotspot, you will have to tie the arc angle and center point with this length.
You just have to do the trigonometry.

User avatar
By Lingwisyer
Both of which he has used. Is not the issue here less the curves, more the definition of the hotspots as they are calculated in a straight line from origin?

Given your code, does not the end point of the curve equal the following point? In turn that simplifies all of your hotspots to basic singular trig.

By Braza
JGoode deffined a fixed centerpoint at the middle of each arched segment.
If he wants to modify the arc curvature with a hotspot, the center point will necessarily be modified too.
Unless he wants the angle to be fixed in -180 degrees.
Or perhaps, most likely, I am missing the point.