<?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: Flat Pattern FlipAlignmentAxis help needed.... in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/flat-pattern-flipalignmentaxis-help-needed/m-p/7420806#M97660</link>
    <description>&lt;P&gt;Want to thank both of you for your replies. &amp;nbsp;I gave the accept as solution to the first response, it had more detail for me to use to figure out what I needed to do.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Was hoping for a nice neat and genral way to handle all cases a flat pattern can be created but looks like I needed to handle may conditions based on info as it is created to figure out how to handle the FlipAlignmentAxis and apply the information correctly one condition even required me to apply a 90deg rotate or it just would not work correctly. &amp;nbsp;My test pieces I was given work correctly now and I do expect more parts to come my way that don't process right and will just have to handle them as they come in until I get a full set of conditions handled for any part the engineers create.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once again Thanks for the help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Shannon&lt;/P&gt;</description>
    <pubDate>Fri, 29 Sep 2017 16:26:15 GMT</pubDate>
    <dc:creator>speterso</dc:creator>
    <dc:date>2017-09-29T16:26:15Z</dc:date>
    <item>
      <title>Flat Pattern FlipAlignmentAxis help needed....</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/flat-pattern-flipalignmentaxis-help-needed/m-p/7411336#M97657</link>
      <description>&lt;P&gt;How does one know if the FlipAlignmentAxis is positive or negative via code? &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using C# but I can do the VB.Net conversion myself if needed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Reason for needing to know this is when I do the FlatPatternOrientation changes, some files require the FlipAlignmentAxis set to true and some don't. &amp;nbsp;I am guessing it is sometimes the axis is negative but should be positive etc. &amp;nbsp;I will need to test on this data and set the FlipAlignmentAxis accordingly so every part being processed by my code generates the desired orientation. &amp;nbsp;Everything is good in all the files tested except a handful seemed to orient upside down and if I manually process through the steps it is the FlipAlignmentAxis that is causing this issue. &amp;nbsp;I currently set the FlipAlignmentAxis to "true" only, and for these few files it needs to be set to false because it is already correct.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am guessing here that I want them all to be positive and a few are already set to positive&amp;nbsp;by default and when I set the FlipAlignmentAxis to true it orients incorrectly (upside down). &amp;nbsp;If it is not just finding neg or pos let me know what else I can key on to ensure my alignment is correct.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;current code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SheetMetalComponentDefinition ShtMtlCompDef = PRTDoc.ComponentDefinition as SheetMetalComponentDefinition;&lt;/P&gt;&lt;P&gt;FlatPatternOrientation FltPatOrient = ShtMtlCompDef.FlatPattern.FlatPatternOrientations.ActiveFlatPatternOrientation.Copy("Default");&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&amp;lt;ShtMtlEdge is right most verticle edge on the A-SideFace&amp;gt;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;FltPatOrient.Activate();&lt;/P&gt;&lt;P&gt;FltPatOrient.AlignmentAxis = ShtMtlCompDef.FlatPattern.GetFlatPatternEntity(ShtMtlEdge) as Edge;&lt;BR /&gt;FltPatOrient.AlignmentType = AlignmentTypeEnum.kVerticalAlignment;&lt;BR /&gt;FltPatOrient.FlipAlignmentAxis = true;&lt;BR /&gt;FltPatOrient.FlipBaseFace = true;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I believe I need to add a condition to only set&amp;nbsp;&lt;SPAN&gt;FltPatOrient.FlipAlignmentAxis = true; (or to false) based on some information. &amp;nbsp;I just don't know where to look for this information in the inventor sheet metal object model or how to handle if this should be applied or not via program only. &amp;nbsp; It is easily enough noticeable&amp;nbsp;when working with the part in person but not sure how to determine this via code only.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If anyone has any idea please help&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank You&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Shannon&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2017 22:14:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/flat-pattern-flipalignmentaxis-help-needed/m-p/7411336#M97657</guid>
      <dc:creator>speterso</dc:creator>
      <dc:date>2017-09-26T22:14:59Z</dc:date>
    </item>
    <item>
      <title>Re: Flat Pattern FlipAlignmentAxis help needed....</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/flat-pattern-flipalignmentaxis-help-needed/m-p/7412387#M97658</link>
      <description>&lt;P&gt;The FlatPatternOrientation defines a 2D coordinate system on the FlatPattern.BaseFace, the X and Y&amp;nbsp;coordinates are defined using below properties combinations of FlatPatternOrientation:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;AlignmentType&lt;/P&gt;
&lt;P&gt;AlignmentAxis&lt;/P&gt;
&lt;P&gt;FlipAlignmentAxis&lt;/P&gt;
&lt;P&gt;AlignmentRotation&lt;/P&gt;
&lt;P&gt;FlipBaseFace&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below is the algorithm to determine the X&amp;amp;Y coordinates:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. The AlignmentType&amp;nbsp;defines which coordinate will be along the AlignmentAxis edge. kHorizontalAlignment&amp;nbsp;indicates the X-coordinate will align with the&amp;nbsp; AlignmentAxis, and the kVerticalAlignment&amp;nbsp;indicates the Y-coordinate will align with the AlignmentAxis&amp;nbsp; edge. So this property will specify the alignment-coordinate(X or Y).&lt;/P&gt;
&lt;P&gt;2. The alignment-coordinate direction as default should align with the direction of the AlignmentAxis(as the AlignmentAxis is an Edge you can get the direction using AlignmentAxis.Geometry.Direction).&lt;/P&gt;
&lt;P&gt;3. If the FlipAlignmentAxis&amp;nbsp;is set to True, then the alignment-coordinate direction will be opposed to the direction of the FlipAlignmentAxis.&lt;/P&gt;
&lt;P&gt;4. The AlignmentRotation will rotate the alignment-coordinate. This is clockwise.&lt;/P&gt;
&lt;P&gt;5. Using above four properties you should be able to calculate the alignment-coordinate, while you also need to calculate the other coordinate. Assume that the alignment-coordinate is X-coordinate(the AlignmentType&amp;nbsp;= kHorizontalAlignment&amp;nbsp;in this case), now we need to determine the Y-coordinate, so the&amp;nbsp;FlipBaseFace should be considered now. If the FlipBaseFace is False, then the normal of the FlatPatter.BaseFace is regarded as Z-coordinate, and so you can use the X-coordinate and Z-coordinate to calculate the Y-coordinate, if the FlipBaseFace is True then the Y-coordinate will also be flipped.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So use the above algorithm&amp;nbsp;you can decide if you need to set the FlipAlignmentAxis. Hope it helps.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Sep 2017 08:03:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/flat-pattern-flipalignmentaxis-help-needed/m-p/7412387#M97658</guid>
      <dc:creator>YuhanZhang</dc:creator>
      <dc:date>2017-09-27T08:03:05Z</dc:date>
    </item>
    <item>
      <title>Re: Flat Pattern FlipAlignmentAxis help needed....</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/flat-pattern-flipalignmentaxis-help-needed/m-p/7412413#M97659</link>
      <description>&lt;P&gt;Hi speterso,&lt;BR /&gt;&lt;BR /&gt;The FlipAlignemntAxis whether alignment direction of flat pattern orientation is the opposite of the natural direction of the alignment axis.&amp;nbsp;&lt;A href="http://help.autodesk.com/view/INVNTOR/2018/ENU/?guid=GUID-27930B98-E56C-41C7-853D-5F12104E3156" target="_blank"&gt;FlatPatternOrientation.FlipAlignmentAxis Property&lt;BR /&gt;&lt;/A&gt;&lt;BR /&gt;You need to analyze AligmentAxis edge for get the information if you need to flip or not.&lt;/P&gt;
&lt;PRE&gt;FltPatOrient.AlignmentAxis = ShtMtlCompDef.FlatPattern.GetFlatPatternEntity(ShtMtlEdge) as Edge;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Jaroslav&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EDIT: Sorry for duplicate post. I was slow :).&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Sep 2017 08:13:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/flat-pattern-flipalignmentaxis-help-needed/m-p/7412413#M97659</guid>
      <dc:creator>t_hascj</dc:creator>
      <dc:date>2017-09-27T08:13:48Z</dc:date>
    </item>
    <item>
      <title>Re: Flat Pattern FlipAlignmentAxis help needed....</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/flat-pattern-flipalignmentaxis-help-needed/m-p/7420806#M97660</link>
      <description>&lt;P&gt;Want to thank both of you for your replies. &amp;nbsp;I gave the accept as solution to the first response, it had more detail for me to use to figure out what I needed to do.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Was hoping for a nice neat and genral way to handle all cases a flat pattern can be created but looks like I needed to handle may conditions based on info as it is created to figure out how to handle the FlipAlignmentAxis and apply the information correctly one condition even required me to apply a 90deg rotate or it just would not work correctly. &amp;nbsp;My test pieces I was given work correctly now and I do expect more parts to come my way that don't process right and will just have to handle them as they come in until I get a full set of conditions handled for any part the engineers create.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once again Thanks for the help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Shannon&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2017 16:26:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/flat-pattern-flipalignmentaxis-help-needed/m-p/7420806#M97660</guid>
      <dc:creator>speterso</dc:creator>
      <dc:date>2017-09-29T16:26:15Z</dc:date>
    </item>
  </channel>
</rss>

