<?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: Face display of a SWEEP command in GDL</title>
    <link>https://community.graphisoft.com/t5/GDL/Face-display-of-a-SWEEP-command/m-p/258246#M2953</link>
    <description>Ok, there is still one command, "RULED". Why don´t You try it?</description>
    <pubDate>Mon, 12 Apr 2021 10:24:52 GMT</pubDate>
    <dc:creator>Pertti Paasky</dc:creator>
    <dc:date>2021-04-12T10:24:52Z</dc:date>
    <item>
      <title>Face display of a SWEEP command</title>
      <link>https://community.graphisoft.com/t5/GDL/Face-display-of-a-SWEEP-command/m-p/258243#M2950</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I am encountering a display issue while using the SWEEP command. Compared to a simple BRICK one, if I am to make a straight extrusion, there is some kind of shading appearing on the faces. However, the base profile is strictly a square and the extrusion is totally vertical with no twist&lt;BR /&gt;&lt;BR /&gt;I tried changing the status codes or the mask but to no effect. Here is the picture of a BRICK (left) and a SWEEP (right)&lt;BR /&gt;&lt;BR /&gt;And both codes
&lt;PRE&gt;BRICK LA, LA, HT&lt;/PRE&gt;
&lt;PRE&gt;SWEEP	4, 2, 0, 1, 1+2+4+16+32,
			0, 0, 0,
			L, 0, 0,
			L, L, 0,
			0, L, 0,	
			0, 0, 0,
			0, 0, HT&lt;/PRE&gt;
This does not seem to be an issue while rendering so it's probably just a display issue&lt;/DIV&gt;</description>
      <pubDate>Tue, 14 Sep 2021 07:17:35 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Face-display-of-a-SWEEP-command/m-p/258243#M2950</guid>
      <dc:creator>MetalFingerz</dc:creator>
      <dc:date>2021-09-14T07:17:35Z</dc:date>
    </item>
    <item>
      <title>Re: Face display of a SWEEP command</title>
      <link>https://community.graphisoft.com/t5/GDL/Face-display-of-a-SWEEP-command/m-p/258244#M2951</link>
      <description>If You add 64*j7 to the mask value then the result is "square"&lt;BR /&gt;
&lt;BR /&gt;
j1=1! base surface is present,&lt;BR /&gt;
j2=1! top surface is present,&lt;BR /&gt;
j3=1! side surface is present,&lt;BR /&gt;
j5=1! base edges are visible,&lt;BR /&gt;
j6=1! top edges are visible,&lt;BR /&gt;
j7=1! cross-section edges are visible, surface is articulated.&lt;BR /&gt;
mask = j1 + 2*j2 + 4*j3 + 16*j5 + 32*j6 + 64*j7&lt;BR /&gt;
!mask=1+2+4+16+32&lt;BR /&gt;
L=1&lt;BR /&gt;
HT=3&lt;BR /&gt;
SWEEP	4, 2, 0, 1, mask,&lt;BR /&gt;
&lt;BR /&gt;
			0, 0, 0,&lt;BR /&gt;
			L, 0, 0,&lt;BR /&gt;
			L, L, 0,&lt;BR /&gt;
			0, L, 0,	&lt;BR /&gt;
			0, 0, 0,&lt;BR /&gt;
			0, 0, HT</description>
      <pubDate>Sat, 10 Apr 2021 16:52:35 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Face-display-of-a-SWEEP-command/m-p/258244#M2951</guid>
      <dc:creator>Pertti Paasky</dc:creator>
      <dc:date>2021-04-10T16:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: Face display of a SWEEP command</title>
      <link>https://community.graphisoft.com/t5/GDL/Face-display-of-a-SWEEP-command/m-p/258245#M2952</link>
      <description>&lt;BLOCKQUOTE&gt;Pertti wrote:&lt;BR /&gt;
If You add 64*j7 to the mask value then the result is "square"&lt;BR /&gt;
&lt;BR /&gt;
j1=1! base surface is present,&lt;BR /&gt;
j2=1! top surface is present,&lt;BR /&gt;
j3=1! side surface is present,&lt;BR /&gt;
j5=1! base edges are visible,&lt;BR /&gt;
j6=1! top edges are visible,&lt;BR /&gt;
j7=1! cross-section edges are visible, surface is articulated.&lt;BR /&gt;
mask = j1 + 2*j2 + 4*j3 + 16*j5 + 32*j6 + 64*j7&lt;BR /&gt;
!mask=1+2+4+16+32&lt;BR /&gt;
L=1&lt;BR /&gt;
HT=3&lt;BR /&gt;
SWEEP	4, 2, 0, 1, mask,&lt;BR /&gt;
&lt;BR /&gt;
			0, 0, 0,&lt;BR /&gt;
			L, 0, 0,&lt;BR /&gt;
			L, L, 0,&lt;BR /&gt;
			0, L, 0,	&lt;BR /&gt;
			0, 0, 0,&lt;BR /&gt;
			0, 0, HT
&lt;/BLOCKQUOTE&gt;
Hello Pertti,&lt;BR /&gt;
&lt;BR /&gt;
Thanks for the reply. The 64 code appears to fix the smoothing effect however now there are diagonal lines on all side surfaces instead  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_sad.gif" style="display : inline;" /&gt; &lt;BR /&gt;



I tried most combinations for the mask and also changed the twisting values but I do not see any improvement. I'm guessing there is no other choice to have either the smoothing effect or the diagonal lines ?&lt;BR /&gt;
&lt;BR /&gt;
Just for info, the reason I would like to use the SWEEP instead of a simple BRICK is that I need to parametrically change the top for both Z (delta from ZZYZX) and X (delta from sweep origin) values and that the top would need to still be cut perpendicularly to the side faces.&lt;BR /&gt;
&lt;BR /&gt;
I tried using EXTRUDE for that but the top was always horizontally cut which was not the desired effect. Maybe I'm not using the proper command and it would be better to use a BRICK and then have some trigonometry to recalculate the base angle dynamically  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_mad.gif" style="display : inline;" /&gt;</description>
      <pubDate>Mon, 12 Apr 2021 09:53:04 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Face-display-of-a-SWEEP-command/m-p/258245#M2952</guid>
      <dc:creator>MetalFingerz</dc:creator>
      <dc:date>2021-04-12T09:53:04Z</dc:date>
    </item>
    <item>
      <title>Re: Face display of a SWEEP command</title>
      <link>https://community.graphisoft.com/t5/GDL/Face-display-of-a-SWEEP-command/m-p/258246#M2953</link>
      <description>Ok, there is still one command, "RULED". Why don´t You try it?</description>
      <pubDate>Mon, 12 Apr 2021 10:24:52 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Face-display-of-a-SWEEP-command/m-p/258246#M2953</guid>
      <dc:creator>Pertti Paasky</dc:creator>
      <dc:date>2021-04-12T10:24:52Z</dc:date>
    </item>
    <item>
      <title>Re: Face display of a SWEEP command</title>
      <link>https://community.graphisoft.com/t5/GDL/Face-display-of-a-SWEEP-command/m-p/258247#M2954</link>
      <description>&lt;BLOCKQUOTE&gt;Pertti wrote:&lt;BR /&gt;
Ok, there is still one command, "RULED". Why don´t You try it?
&lt;/BLOCKQUOTE&gt;
Because I do not necessarily know the coordinates of the top polygon. If it's only vertical, it's easy but if it's inclined it's not any more. Which is why it was easier to use SWEEP as I could only specify deltas from known values.&lt;BR /&gt;
&lt;BR /&gt;
But I'll try to do it with BRICK and trigonometry. It seems that's it's the best alternative visually speaking. Thanks for the help.</description>
      <pubDate>Mon, 12 Apr 2021 12:10:57 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Face-display-of-a-SWEEP-command/m-p/258247#M2954</guid>
      <dc:creator>MetalFingerz</dc:creator>
      <dc:date>2021-04-12T12:10:57Z</dc:date>
    </item>
    <item>
      <title>Re: Face display of a SWEEP command</title>
      <link>https://community.graphisoft.com/t5/GDL/Face-display-of-a-SWEEP-command/m-p/258248#M2955</link>
      <description>-Still, You could try this formula:&lt;BR /&gt;
If You define the top surface by 3 points, You get point S height easily.&lt;BR /&gt;
You can play with the attached object, it is interactive.&lt;BR /&gt;
			
&lt;PRE&gt;!this formula calculates sz height of a point S(sx,sy) on a plane P1,P2,P3
!3d program

dim Point[][]
			Point[1][1]=1.0
			Point[2][1]=1.0
			Point[3][1]=5.0
			Point[1][2]=1.0
			Point[2][2]=5.0
			Point[3][2]=3.0
			Point[1][3]=1.0
			Point[2][3]=2.1
			Point[3][3]=1.5
sx=2
sy=3

			add Point[1][1],Point[1][2],Point[1][3]:sphere.1:del 1
			add Point[2][1],Point[2][2],Point[2][3]:sphere.1:del 1
			add Point[3][1],Point[3][2],Point[3][3]:sphere.1:del 1
			
			lin_ Point[1][1],Point[1][2],Point[1][3],Point[2][1],Point[2][2],Point[2][3]
			lin_ Point[2][1],Point[2][2],Point[2][3],Point[3][1],Point[3][2],Point[3][3]
			lin_ Point[3][1],Point[3][2],Point[3][3],Point[1][1],Point[1][2],Point[1][3]
						

			dx1=Point[1][1]-Point[3][1]
			dy1=Point[1][2]-Point[3][2]
			dz1=Point[1][3]-Point[3][3]
			
			dx2=Point[2][1]-Point[3][1]
			dy2=Point[2][2]-Point[3][2]
			dz2=Point[2][3]-Point[3][3]
				
			s1=dy1*dz2-dz1*dy2
			s2=dz1*dx2-dx1*dz2
			s3=dx1*dy2-dy1*dx2
			
			d=-s1*Point[3][1]-s2*Point[3][2]-s3*Point[3][3]
			sz=(-s1*sx-s2*sy-d)/s3	

			add sx,sy,sz:sphere.15:del 1&lt;/PRE&gt;</description>
      <pubDate>Mon, 12 Apr 2021 20:16:59 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Face-display-of-a-SWEEP-command/m-p/258248#M2955</guid>
      <dc:creator>Pertti Paasky</dc:creator>
      <dc:date>2021-04-12T20:16:59Z</dc:date>
    </item>
    <item>
      <title>Re: Face display of a SWEEP command</title>
      <link>https://community.graphisoft.com/t5/GDL/Face-display-of-a-SWEEP-command/m-p/258249#M2956</link>
      <description>&lt;BLOCKQUOTE&gt;MetalFingerz wrote:&lt;BR /&gt;
Just for info, the reason I would like to use the SWEEP instead of a simple BRICK is that I need to parametrically change the top for both Z (delta from ZZYZX) and X (delta from sweep origin) values and that the top would need to still be cut perpendicularly to the side faces.&lt;BR /&gt;
&lt;BR /&gt;
I tried using EXTRUDE for that but the top was always horizontally cut which was not the desired effect. Maybe I'm not using the proper command and it would be better to use a BRICK and then have some trigonometry to recalculate the base angle dynamically  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_mad.gif" style="display : inline;" /&gt;
&lt;/BLOCKQUOTE&gt;

I would have a look at TUBE.&lt;BR /&gt;
It uses the same profile along the path.&lt;BR /&gt;
You just need to remember that the first and last points on the path are 'dummy' co-ordinates that simple adjust the angle of the start and end faces of the tube.&lt;BR /&gt;
So you need to allow for these 'dummy' path points to get the correct end face angles.&lt;BR /&gt;
Basically the last point (that you can't see) is a doubling of the co-ordinates for the second last point (that you can see).&lt;BR /&gt;
This will set the angle of the last end plane perpendicular to the path.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Barry.</description>
      <pubDate>Tue, 13 Apr 2021 00:53:45 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Face-display-of-a-SWEEP-command/m-p/258249#M2956</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2021-04-13T00:53:45Z</dc:date>
    </item>
    <item>
      <title>Re: Face display of a SWEEP command</title>
      <link>https://community.graphisoft.com/t5/GDL/Face-display-of-a-SWEEP-command/m-p/258250#M2957</link>
      <description>With TUBE you will have trouble defining the rotation along the axis. I recommend BRICK and trigonometry to calculate the rotation. You'd have to do the same for a correct TUBE too.</description>
      <pubDate>Tue, 13 Apr 2021 08:47:49 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Face-display-of-a-SWEEP-command/m-p/258250#M2957</guid>
      <dc:creator>Peter Baksa</dc:creator>
      <dc:date>2021-04-13T08:47:49Z</dc:date>
    </item>
    <item>
      <title>Re: Face display of a SWEEP command</title>
      <link>https://community.graphisoft.com/t5/GDL/Face-display-of-a-SWEEP-command/m-p/258251#M2958</link>
      <description>&lt;BLOCKQUOTE&gt;Peter wrote:&lt;BR /&gt;
With TUBE you will have trouble defining the rotation along the axis. I recommend BRICK and trigonometry to calculate the rotation. You'd have to do the same for a correct TUBE too.
&lt;/BLOCKQUOTE&gt;
That's what I ended up doing ultimately. I just had to relearned some trigo which I had forgotten &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_lol.gif" style="display : inline;" /&gt; &lt;BR /&gt;
&lt;BR /&gt;
The result is as intended now and the display of the extrusion looks good. It actually made my code cleaner in the process so overall a good lesson learned from this issue.&lt;BR /&gt;
&lt;BR /&gt;
Thanks for all the replies, they may help for some other hurdles I may find in the future.</description>
      <pubDate>Wed, 14 Apr 2021 08:37:11 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Face-display-of-a-SWEEP-command/m-p/258251#M2958</guid>
      <dc:creator>MetalFingerz</dc:creator>
      <dc:date>2021-04-14T08:37:11Z</dc:date>
    </item>
  </channel>
</rss>

