<?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: Transient cylinder in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/transient-cylinder/m-p/10534019#M127460</link>
    <description>&lt;P&gt;When you try to make a point:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Set p3 = otg.CreatePoint(Cos(phi1 / 180 * pi), y1, Sin(phi1 / 180 * pi))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in my opinion it doesn't make sense.&lt;/P&gt;&lt;P&gt;You need 3 coordinates set in mm(or inches), but &lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;Cos(phi1 / 180 * pi) is an unitless thing. It should be multiplied by some metric value (probably r1 or r2).&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;Could you draw how this cylinder segment should (more ir less) look like?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 10 Aug 2021 13:04:38 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-08-10T13:04:38Z</dc:date>
    <item>
      <title>Transient cylinder</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/transient-cylinder/m-p/10533787#M127455</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need a segment of a transient cylinder.&lt;/P&gt;&lt;P&gt;The parameters in cylindrical coordinate system are: r1, r2, y1, y2, phi1, phi2.&lt;/P&gt;&lt;P&gt;I have the problem to define the angles phi1 and phi2.&lt;/P&gt;&lt;P&gt;Unfortunately the function 'oTransientBRep.CreateSolidCylinderCone' only uses r and y as parameters. One can only build full cylinders with this function.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to split up the cylinder with a plane at the required angle, but this doesn't work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Public Sub CreateSegmentCylinder()&lt;/P&gt;&lt;P&gt;Dim oPartDoc As PartDocument&lt;BR /&gt;Set oPartDoc = ThisApplication.ActiveDocument&lt;BR /&gt;Dim oCompDef As PartComponentDefinition&lt;BR /&gt;Set oCompDef = oPartDoc.ComponentDefinition&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dim otg As TransientGeometry&lt;BR /&gt;Set otg = ThisApplication.TransientGeometry&lt;BR /&gt;Dim oTransientBRep As TransientBRep&lt;BR /&gt;Set oTransientBRep = ThisApplication.TransientBRep&lt;BR /&gt;&lt;BR /&gt;Dim r1, r2, y1, y2, phi1, phi2 As Double&lt;BR /&gt;r1 = 1&lt;BR /&gt;r2 = 2&lt;BR /&gt;y1 = 0&lt;BR /&gt;y2 = 1&lt;BR /&gt;phi1 = 0&lt;BR /&gt;phi2 = 20&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dim p1 As Point&lt;BR /&gt;Set p1 = otg.CreatePoint(0, y1, 0)&lt;BR /&gt;Dim p2 As Point&lt;BR /&gt;Set p2 = otg.CreatePoint(0, y2, 0)&lt;BR /&gt;&lt;BR /&gt;Dim oCylinder1 As SurfaceBody&lt;BR /&gt;Set oCylinder1 = oTransientBRep.CreateSolidCylinderCone(p1, p2, r1, r1, r1)&lt;BR /&gt;&lt;BR /&gt;Dim oCylinder2 As SurfaceBody&lt;BR /&gt;Set oCylinder2 = oTransientBRep.CreateSolidCylinderCone(p1, p2, r2, r2, r2)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;' Cut oCylinder2 with oCylinder1&lt;BR /&gt;Call oTransientBRep.DoBoolean(oCylinder2, oCylinder1, kBooleanTypeDifference)&lt;BR /&gt;&lt;BR /&gt;Dim p3 As Point&lt;BR /&gt;Set p3 = otg.CreatePoint(Cos(phi1 / 180 * pi), y1, Sin(phi1 / 180 * pi))&lt;BR /&gt;Dim oplane As plane&lt;BR /&gt;Set oplane = otg.CreatePlaneByThreePoints(p1, p2, p3)&lt;BR /&gt;&lt;BR /&gt;' How can the transient cylinder split with the plane?&lt;BR /&gt;'Call oCompDef.Features.SplitFeatures.SplitBody(oplane, oCylinder2)&lt;BR /&gt;&lt;BR /&gt;' Create a base feature with the result body.&lt;BR /&gt;Dim oBaseFeature As NonParametricBaseFeature&lt;BR /&gt;Set oBaseFeature = oCompDef.Features.NonParametricBaseFeatures.Add(oCylinder2)&lt;BR /&gt;End Sub&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help&lt;/P&gt;</description>
      <pubDate>Tue, 10 Aug 2021 11:28:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/transient-cylinder/m-p/10533787#M127455</guid>
      <dc:creator>pveng</dc:creator>
      <dc:date>2021-08-10T11:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: Transient cylinder</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/transient-cylinder/m-p/10534019#M127460</link>
      <description>&lt;P&gt;When you try to make a point:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Set p3 = otg.CreatePoint(Cos(phi1 / 180 * pi), y1, Sin(phi1 / 180 * pi))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in my opinion it doesn't make sense.&lt;/P&gt;&lt;P&gt;You need 3 coordinates set in mm(or inches), but &lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;Cos(phi1 / 180 * pi) is an unitless thing. It should be multiplied by some metric value (probably r1 or r2).&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;Could you draw how this cylinder segment should (more ir less) look like?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Aug 2021 13:04:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/transient-cylinder/m-p/10534019#M127460</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-08-10T13:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: Transient cylinder</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/transient-cylinder/m-p/10534115#M127465</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;Thomasz for the quick reply,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;p3 is only for the plane definition. 3 points define a plane, p1 and p2 are on the y-axis and p3 is away from the y-axis. The distance from the axis isn't needed, only the angle of the plane. For example phi1 = 0 then p3=(1, y1, 0) and therefore the x-y-plane. If phi=90° then p3=(0, y1, 1) and therefore the y-z-plane.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is to create a transient geometry like the picture below. As Feature it is not a problem to create, but I need some thousands of this objects, which means, transient geometry is a lot more efficient.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pveng_0-1628601197343.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/950720i692267B145D6170B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pveng_0-1628601197343.png" alt="pveng_0-1628601197343.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Aug 2021 13:33:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/transient-cylinder/m-p/10534115#M127465</guid>
      <dc:creator>pveng</dc:creator>
      <dc:date>2021-08-10T13:33:15Z</dc:date>
    </item>
  </channel>
</rss>

