<?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 Re: using Data from 2D section for 3D cut in GDL</title>
    <link>https://community.graphisoft.com/t5/GDL/using-Data-from-2D-section-for-3D-cut/m-p/261917#M4680</link>
    <description>But I have a model with a window, where the vertical section seems to be different from the 3D cutted model:&lt;BR /&gt;



How is this possible?</description>
    <pubDate>Thu, 16 Jul 2020 20:15:26 GMT</pubDate>
    <dc:creator>Martin Walter</dc:creator>
    <dc:date>2020-07-16T20:15:26Z</dc:date>
    <item>
      <title>using Data from 2D section for 3D cut</title>
      <link>https://community.graphisoft.com/t5/GDL/using-Data-from-2D-section-for-3D-cut/m-p/261915#M4678</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;I created a user definded window with complex 3D data.&lt;BR /&gt;When I create a vertical section through the window then the 3D data is cut. And the result is not what I want for a vertical section view.&lt;BR /&gt;Is there a possibility to show data from the 2D section instead?&lt;/DIV&gt;</description>
      <pubDate>Mon, 26 Sep 2022 20:48:55 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/using-Data-from-2D-section-for-3D-cut/m-p/261915#M4678</guid>
      <dc:creator>Martin Walter</dc:creator>
      <dc:date>2022-09-26T20:48:55Z</dc:date>
    </item>
    <item>
      <title>Re: using Data from 2D section for 3D cut</title>
      <link>https://community.graphisoft.com/t5/GDL/using-Data-from-2D-section-for-3D-cut/m-p/261916#M4679</link>
      <description>No.  Sections use the 3d geometry of the window.  Only in floorplan you can create 2d lines.&lt;BR /&gt;
If you want a correct section representation, you will have to create the correct 3d geometry.</description>
      <pubDate>Thu, 16 Jul 2020 17:45:55 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/using-Data-from-2D-section-for-3D-cut/m-p/261916#M4679</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-07-16T17:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: using Data from 2D section for 3D cut</title>
      <link>https://community.graphisoft.com/t5/GDL/using-Data-from-2D-section-for-3D-cut/m-p/261917#M4680</link>
      <description>But I have a model with a window, where the vertical section seems to be different from the 3D cutted model:&lt;BR /&gt;



How is this possible?</description>
      <pubDate>Thu, 16 Jul 2020 20:15:26 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/using-Data-from-2D-section-for-3D-cut/m-p/261917#M4680</guid>
      <dc:creator>Martin Walter</dc:creator>
      <dc:date>2020-07-16T20:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: using Data from 2D section for 3D cut</title>
      <link>https://community.graphisoft.com/t5/GDL/using-Data-from-2D-section-for-3D-cut/m-p/261918#M4681</link>
      <description>From what did you create the window? from scratch or using an existing object?&lt;BR /&gt;
&lt;BR /&gt;
The 2D and 3D components of any GDL object are completely separate unless you use the "Project2" command which generates the 2D from a projection of he 3D, though it is not advised as it slows regeneration.&lt;BR /&gt;
&lt;BR /&gt;
If you want the section to be a more simplified representation of your detailed 3D geometry then you need to rationalise the geometry for that view (sections are a live 3D view). you do this by using the GLOB_VIEW_TYPE function to hide/simplify the pieces of 3D geometry you don't want to see in section.&lt;BR /&gt;
&lt;BR /&gt;
for example, let say you have 4 pieces of geometry that make up the frame profile in 3D but in section you only want to see the main piece. then your code will look like this:
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;
Geometry 1 (actual GDL script just represented by the term Geometry for this post)

if GLOB_VIEW_TYPE # 4 then
      Geometry 2
      Geometry 3 
      Geometry 4 
endif
&lt;/PRE&gt;

GLOB_VIEW_TYPE  4 is for sections (refer to GDL manual for the rest, and don use this function in the parameter script)&lt;BR /&gt;
# stands for "not equal to"&lt;BR /&gt;
&lt;BR /&gt;
So in plain English (far less efficient) it reads:&lt;BR /&gt;
&lt;BR /&gt;
execute Geometry 1&lt;BR /&gt;
&lt;BR /&gt;
if the view is NOT a section view then&lt;BR /&gt;
      execute Geometry 2&lt;BR /&gt;
      execute Geometry 3&lt;BR /&gt;
      execute Geometry 4&lt;BR /&gt;
&lt;BR /&gt;
You can also be far more clever with this function and simplify a single complex shape by using the PUT and GET functions to define the shape as this allows you to define the points of the shape prior to the shape command hence adding conditions to the points.&lt;BR /&gt;
&lt;BR /&gt;
for example a C channel can be made into a simple rectangle as follows:
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;HEIGHT = 2.100
WIDTH = .050
DEPTH = .100
THICK = .002

put 0, 		0, 15
put WIDTH, 	0, 15
if GLOB_VIEW_TYPE # 4 then
	put WIDTH, THICK, 15
	put THICK, THICK, 15
	put THICK, DEPTH -THICK, 15
	put WIDTH, DEPTH -THICK, 15
endif
put WIDTH, DEPTH, 15
put 0, DEPTH, 15
prism_ nsp/3, HEIGHT,
	get(nsp)
&lt;/PRE&gt;

it super easy and as you can see it gives you the ability to make your geometry responsive to all sorts of conditions.&lt;BR /&gt;
personally i always use the PUT and GET functions for my geometry as it means i don't have to keep changing the value that sets the number of nodes (which gets frustrating) as i can use the "nsp/3" instead. But the main reason is it allows me to make the geometry far more conditional.</description>
      <pubDate>Thu, 16 Jul 2020 22:39:10 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/using-Data-from-2D-section-for-3D-cut/m-p/261918#M4681</guid>
      <dc:creator>Kristian Bursell</dc:creator>
      <dc:date>2020-07-16T22:39:10Z</dc:date>
    </item>
    <item>
      <title>Re: using Data from 2D section for 3D cut</title>
      <link>https://community.graphisoft.com/t5/GDL/using-Data-from-2D-section-for-3D-cut/m-p/261919#M4682</link>
      <description>Hi, many thanks for your response!&lt;BR /&gt;
With if GLOB_VIEW_TYPE = 4 then I know, if I am in a section view. &lt;BR /&gt;
Would it be possible to recognize the direction of the 3D section?&lt;BR /&gt;
I would like to know if a window is cut perpendicular.</description>
      <pubDate>Fri, 24 Jul 2020 13:02:31 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/using-Data-from-2D-section-for-3D-cut/m-p/261919#M4682</guid>
      <dc:creator>Martin Walter</dc:creator>
      <dc:date>2020-07-24T13:02:31Z</dc:date>
    </item>
    <item>
      <title>Re: using Data from 2D section for 3D cut</title>
      <link>https://community.graphisoft.com/t5/GDL/using-Data-from-2D-section-for-3D-cut/m-p/261920#M4683</link>
      <description>&lt;BLOCKQUOTE&gt;Martin wrote:&lt;BR /&gt;
Hi, many thanks for your response!&lt;BR /&gt;
With if GLOB_VIEW_TYPE = 4 then I know, if I am in a section view. &lt;BR /&gt;
Would it be possible to recognize the direction of the 3D section?&lt;BR /&gt;
I would like to know if a window is cut perpendicular.
&lt;/BLOCKQUOTE&gt;

&lt;BR /&gt;
Not possible that I am aware of.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Barry.</description>
      <pubDate>Sun, 26 Jul 2020 15:18:32 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/using-Data-from-2D-section-for-3D-cut/m-p/261920#M4683</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2020-07-26T15:18:32Z</dc:date>
    </item>
  </channel>
</rss>

