<?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: How to make face transparent for selection in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-make-face-transparent-for-selection/m-p/6345369#M19874</link>
    <description>&lt;P&gt;The API doesn't currenlty support anything beyond what you can do inside Fusion interactively.&amp;nbsp; Fusion supports setting the appearance on a face-by-face basis, so you can set the appearance of a face to a transparent appearance.&amp;nbsp; Below is some code that does this on a selected face.&amp;nbsp; To be able to assign an appearance it first has to be copied from the library into the current design.&amp;nbsp; This is done automatically when you assign an appearance in the UI but you need to do the step when using the API.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;def setAppearance():
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        des = adsk.fusion.Design.cast(app.activeProduct)
        face = adsk.fusion.BRepFace.cast(ui.selectEntity('Select a face', 'Faces').entity)
        
        if face:
            clearApp = des.appearances.itemByName('Glass (Clear)')
            if clearApp == None:
                lib = app.materialLibraries.itemByName('Fusion 360 Appearance Library')
                if lib:
                    libraryClearApp = lib.appearances.itemByName('Glass (Clear)')
                    clearApp = des.appearances.addByCopy(libraryClearApp, libraryClearApp.name)

            face.appearance = clearApp            
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
&lt;/PRE&gt;</description>
    <pubDate>Tue, 24 May 2016 05:49:33 GMT</pubDate>
    <dc:creator>ekinsb</dc:creator>
    <dc:date>2016-05-24T05:49:33Z</dc:date>
    <item>
      <title>How to make face transparent for selection</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-make-face-transparent-for-selection/m-p/6343120#M19872</link>
      <description>It need make some faces transparent and transparent for selection in my command. Like other bodies in create body command.</description>
      <pubDate>Mon, 23 May 2016 05:24:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-make-face-transparent-for-selection/m-p/6343120#M19872</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-23T05:24:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to make face transparent for selection</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-make-face-transparent-for-selection/m-p/6345354#M19873</link>
      <description>Can I realize it?</description>
      <pubDate>Tue, 24 May 2016 05:30:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-make-face-transparent-for-selection/m-p/6345354#M19873</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-24T05:30:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to make face transparent for selection</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-make-face-transparent-for-selection/m-p/6345369#M19874</link>
      <description>&lt;P&gt;The API doesn't currenlty support anything beyond what you can do inside Fusion interactively.&amp;nbsp; Fusion supports setting the appearance on a face-by-face basis, so you can set the appearance of a face to a transparent appearance.&amp;nbsp; Below is some code that does this on a selected face.&amp;nbsp; To be able to assign an appearance it first has to be copied from the library into the current design.&amp;nbsp; This is done automatically when you assign an appearance in the UI but you need to do the step when using the API.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;def setAppearance():
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        des = adsk.fusion.Design.cast(app.activeProduct)
        face = adsk.fusion.BRepFace.cast(ui.selectEntity('Select a face', 'Faces').entity)
        
        if face:
            clearApp = des.appearances.itemByName('Glass (Clear)')
            if clearApp == None:
                lib = app.materialLibraries.itemByName('Fusion 360 Appearance Library')
                if lib:
                    libraryClearApp = lib.appearances.itemByName('Glass (Clear)')
                    clearApp = des.appearances.addByCopy(libraryClearApp, libraryClearApp.name)

            face.appearance = clearApp            
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
&lt;/PRE&gt;</description>
      <pubDate>Tue, 24 May 2016 05:49:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-make-face-transparent-for-selection/m-p/6345369#M19874</guid>
      <dc:creator>ekinsb</dc:creator>
      <dc:date>2016-05-24T05:49:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to make face transparent for selection</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-make-face-transparent-for-selection/m-p/6345432#M19875</link>
      <description>&lt;P&gt;Thank you for answer. Can I make clean faces unselectable? It need select faces under clean faces. Why other&amp;nbsp;faces seems like clean under clean face?&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;IMG src="https://forums.autodesk.com/t5/image/serverpage/image-id/241999i4E6E13B129084003/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="Image 2.png" title="Image 2.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2016 07:07:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-make-face-transparent-for-selection/m-p/6345432#M19875</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-24T07:07:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to make face transparent for selection</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-make-face-transparent-for-selection/m-p/6345462#M19876</link>
      <description>&lt;P&gt;If the selection is happening within your command, you can control what is selectable.&amp;nbsp; See the overview topic for commands and especially look at what's said relative to the SelectionEvent.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://help.autodesk.com/view/NINVFUS/ENU/?guid=GUID-3922697A-7BF1-4799-9A5B-C8539DF57051" target="_blank"&gt;http://help.autodesk.com/view/NINVFUS/ENU/?guid=GUID-3922697A-7BF1-4799-9A5B-C8539DF57051&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2016 07:29:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-make-face-transparent-for-selection/m-p/6345462#M19876</guid>
      <dc:creator>ekinsb</dc:creator>
      <dc:date>2016-05-24T07:29:21Z</dc:date>
    </item>
  </channel>
</rss>

