We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

HELP - ARC2 bug?

Anonymous
Not applicable
*** POST PART 1 ***

Hi All!
I am having quite a few issues with this seemingly ridiculously
simple object, and need to figure this out ASAP due to a deadline.
I will load all info in this and the next posts...

* * * * *

The SEGMENT object belongs to a set of "Area Calculating Objects"
I am developing to help AC comply with the Israeli codes for
building permit requests.
In short, each of these objects (Rectangle, Triangle, Circle etc.)
can "report" the mathematical function, parameters and results
into the Interactive Schedule, including showing dimensions to enable
a manual check of the calculus.

In this first post you will see the basic logic used to create the
SEGMENT object, as derived from two parameters, the Chord (A)
and the Bulge (B) - both stretchy.

When finalized, the object will only show the filled area, while the rest
would be dashed lines.

To create this object from A & B alone, the following math was used
to derive the Angle & Radius, courtesy of David Nicholson-Cole:

hangl= (90-ATN((A/2)/B))*2

rad= (A/2)SIN(angl)

(cont.)

Segment A.jpg
7 REPLIES 7
Anonymous
Not applicable
*** PART 2 - THE BUG!!! ***

The object draws OK, until stretched via the hotspots.

On certain occasions when stretched, the ARC2 goes all crazy,
either overshooting or undershooting its destination point,
as you can see on the left image.
Please take notice of the A & B values in the coordinate boxes -
these were created by STRETCHING hotspots on the screen

H O W E V E R . . .

If I over-ride these same exact dimensions by entering them
via the coordinate boxes - VIOLA -
The ARC2 draws just fine!

Is this a BUG, or should I have paid better attention during
math class?

RSVP?
Anonymous
Not applicable
here is the object itself...
Anonymous
Not applicable
*** FINAL QUESTION ***

And to wrap up this post, I need to LIMIT the stretchiness
of B so it will be no bigger than A,
as this makes the object function beyond its purpose,
(and draws funny, too).

Any Ideas?

PS: I WAS actually kicked out of math class, so it is a wonder of nature
that I am a certified architect and dare mess around with GDL 🙂

Thanks -

Gil Rosenthal
Anonymous
Not applicable
Gil

The command you are after is RANGE.
Its in the GDL guide mate.
Anonymous
Not applicable
Thanks Christian!
I 'sppose you mean RANGE as in the VALUES & RANGE thing...
such as posted here:
http://archicad-talk.graphisoft.com/viewtopic.php?p=123295&highlight=range#123295
?
I tried something like this but probably botched a comma
- Will give it another try - Thanks!

Any idea as to the behaviour of the ARC2?
Anonymous
Not applicable
Refer to GDL Technical Standards, chapter 4.4
http://www.graphisoft.com/ftp/techsupport/documentation/developer_docs/BasicLibraryDoc/14/LibDevGuid...
Only rad, alpha & beta need to be declared as parameters.

!!! ----- Master Script -----
	hangl = (90-ATN((A/2)/B))*2
	fangl = 2*hangl
	rad   = (A/2)/SIN(hangl)
	alpha = 90-hangl
	beta  = alpha+fangl


!!! ----- Parameter Script -----
	values "B" range [ , A]
	
	parameters rad  = rad,
			alpha = alpha,
			beta  = beta
Anonymous
Not applicable
Olivier -
Work Wonderfully - Thanks!!