<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Ceiling Editor v2.01 simple correction in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/Ceiling-Editor-v2-01-simple-correction/m-p/249869#M6478</link>
    <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;R&gt;Hi,&lt;BR /&gt;
I was trying to contact with the author of the Ceiling Editor object (the one from BIM Components) no luck for now...but...I have done a little improvement (a dirty way for now) so to be able to schedule the ceiling area which might / and was crucial in my practice.&lt;BR /&gt;
&lt;BR /&gt;
So:&lt;BR /&gt;
If anyone wishes to add this to the object pleas add a parameter: "Ceiling_area" and place it  after "gs_list_custom_5" (so to be shown in the proper section and just shown).&lt;BR /&gt;
&lt;BR /&gt;
next place the below code just above 
&lt;PRE&gt;goto "MasterEnd"&lt;/PRE&gt;
in the master script:&lt;BR /&gt;

&lt;PRE&gt;!area calculation for listing

! area calculation

		polyArea = 0
		for q = 1 to nc - 1
			idx = 2 * q - 1
			x1 = field_poly[1][idx]
			y1 = field_poly[1][idx + 1]
			x2 = field_poly[1][idx + 2]
			y2 = field_poly[1][idx + 3]
			polyArea = polyArea + (x2 + x1) * (y2 - y1)
		next q
		polyArea = abs (polyArea) / 2
		holeArea = 0
		for wo = 1 to nHoles
			for q = 1 to n_hpoly[wo] - 1
				idx = 2 * q - 1
				x1 = hole_poly[wo][idx]
				y1 = hole_poly[wo][idx + 1]
				x2 = hole_poly[wo][idx + 2]
				y2 = hole_poly[wo][idx + 3]
				holeArea = holeArea + (x2 + x1) * (y2 - y1)
			next q
		next wo
		holeArea = abs (holeArea) / 2
		polyArea = polyArea - holeArea
		Ceiling_area=polyArea
		Parameters Ceiling_area=Ceiling_area&lt;/PRE&gt;

The calculation is copied from the 2d script - and does not interfere with the calculation done there. &lt;BR /&gt;
&lt;BR /&gt;
BTW if by any chance the "bMovedIntNodes" sets to ON when editing the part then set it back to off ( allows the initial state of rectangular ceiling and allowing to add the side nodes)&lt;BR /&gt;
&lt;BR /&gt;
Edit:&lt;BR /&gt;
One more change: If You wish the gridlines were snpable:&lt;BR /&gt;
&lt;BR /&gt;
search the 2d script for:
&lt;PRE&gt;line2 sectp&lt;W&gt;[1], sectp&lt;W&gt;[2], sectp[w + 1][1], sectp[w + 1][2]&lt;/W&gt;&lt;/W&gt;&lt;/PRE&gt;
and add a line below:
&lt;BLOCKQUOTE&gt;hotline2 sectp&lt;W&gt;[1], sectp&lt;W&gt;[2], sectp[w + 1][1], sectp[w + 1][2]&lt;/W&gt;&lt;/W&gt;&lt;/BLOCKQUOTE&gt;

It is basically the same code as above but adding a hotline in the same place the gridline is. I did not add the IDs for the hotlines so anchoring dimensions to them may be risky (no time to analyze the whole code).&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Have fun,&lt;BR /&gt;
Best regards,&lt;BR /&gt;
Piotr&lt;/R&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 08 Dec 2016 21:25:32 GMT</pubDate>
    <dc:creator>Piotr Dobrowolski</dc:creator>
    <dc:date>2016-12-08T21:25:32Z</dc:date>
    <item>
      <title>Ceiling Editor v2.01 simple correction</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Ceiling-Editor-v2-01-simple-correction/m-p/249869#M6478</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;R&gt;Hi,&lt;BR /&gt;
I was trying to contact with the author of the Ceiling Editor object (the one from BIM Components) no luck for now...but...I have done a little improvement (a dirty way for now) so to be able to schedule the ceiling area which might / and was crucial in my practice.&lt;BR /&gt;
&lt;BR /&gt;
So:&lt;BR /&gt;
If anyone wishes to add this to the object pleas add a parameter: "Ceiling_area" and place it  after "gs_list_custom_5" (so to be shown in the proper section and just shown).&lt;BR /&gt;
&lt;BR /&gt;
next place the below code just above 
&lt;PRE&gt;goto "MasterEnd"&lt;/PRE&gt;
in the master script:&lt;BR /&gt;

&lt;PRE&gt;!area calculation for listing

! area calculation

		polyArea = 0
		for q = 1 to nc - 1
			idx = 2 * q - 1
			x1 = field_poly[1][idx]
			y1 = field_poly[1][idx + 1]
			x2 = field_poly[1][idx + 2]
			y2 = field_poly[1][idx + 3]
			polyArea = polyArea + (x2 + x1) * (y2 - y1)
		next q
		polyArea = abs (polyArea) / 2
		holeArea = 0
		for wo = 1 to nHoles
			for q = 1 to n_hpoly[wo] - 1
				idx = 2 * q - 1
				x1 = hole_poly[wo][idx]
				y1 = hole_poly[wo][idx + 1]
				x2 = hole_poly[wo][idx + 2]
				y2 = hole_poly[wo][idx + 3]
				holeArea = holeArea + (x2 + x1) * (y2 - y1)
			next q
		next wo
		holeArea = abs (holeArea) / 2
		polyArea = polyArea - holeArea
		Ceiling_area=polyArea
		Parameters Ceiling_area=Ceiling_area&lt;/PRE&gt;

The calculation is copied from the 2d script - and does not interfere with the calculation done there. &lt;BR /&gt;
&lt;BR /&gt;
BTW if by any chance the "bMovedIntNodes" sets to ON when editing the part then set it back to off ( allows the initial state of rectangular ceiling and allowing to add the side nodes)&lt;BR /&gt;
&lt;BR /&gt;
Edit:&lt;BR /&gt;
One more change: If You wish the gridlines were snpable:&lt;BR /&gt;
&lt;BR /&gt;
search the 2d script for:
&lt;PRE&gt;line2 sectp&lt;W&gt;[1], sectp&lt;W&gt;[2], sectp[w + 1][1], sectp[w + 1][2]&lt;/W&gt;&lt;/W&gt;&lt;/PRE&gt;
and add a line below:
&lt;BLOCKQUOTE&gt;hotline2 sectp&lt;W&gt;[1], sectp&lt;W&gt;[2], sectp[w + 1][1], sectp[w + 1][2]&lt;/W&gt;&lt;/W&gt;&lt;/BLOCKQUOTE&gt;

It is basically the same code as above but adding a hotline in the same place the gridline is. I did not add the IDs for the hotlines so anchoring dimensions to them may be risky (no time to analyze the whole code).&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Have fun,&lt;BR /&gt;
Best regards,&lt;BR /&gt;
Piotr&lt;/R&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 08 Dec 2016 21:25:32 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Ceiling-Editor-v2-01-simple-correction/m-p/249869#M6478</guid>
      <dc:creator>Piotr Dobrowolski</dc:creator>
      <dc:date>2016-12-08T21:25:32Z</dc:date>
    </item>
  </channel>
</rss>

