<?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 CREATE HOLE ON HIGHLIGHTED PART I TRIED BUT I AM NOT ABLE TO DO PLEASE GIVE SOME WAY OF DOING in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to/m-p/12436128#M2313</link>
    <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14570628"&gt;@sHubamyadav016&lt;/a&gt;&amp;nbsp;-San.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There was no mention of hole location.&lt;BR /&gt;At the very least, I would have presented a way to find the sloped surface you are looking for.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;def create_hole_by_diagonal_face(
        ext: adsk.fusion.ExtrudeFeature) -&amp;gt; None:

    comp: adsk.fusion.Component = ext.parentComponent
    origin_face_geos = [
        comp.xYConstructionPlane.geometry,
        comp.yZConstructionPlane.geometry,
        comp.xZConstructionPlane.geometry,
    ]

    def is_diagonal_face(targetFace: adsk.fusion.BRepFace) -&amp;gt; bool:
        targetGeo: adsk.core.Plane = adsk.core.Plane.cast(
            targetFace.geometry
        )
        if not targetGeo: return None

        return not any(
            [plane.isParallelToPlane(targetGeo) for plane in origin_face_geos]
        )

    diagonalFaces = []
    for face in ext.sideFaces:
        if is_diagonal_face(face):
            diagonalFaces.append(face)

    if len(diagonalFaces) &amp;lt; 0: return

    refFace: adsk.fusion.BRepFace = diagonalFaces[0]
    skt: adsk.fusion.Sketch = comp.sketches.add(
        refFace
    )
    circles: adsk.fusion.SketchCircles = skt.sketchCurves.sketchCircles

    eva: adsk.core.SurfaceEvaluator = refFace.evaluator
    prmRange: adsk.core.BoundingBox2D = eva.parametricRange()
    _, minPnt = eva.getPointAtParameter(prmRange.minPoint)

    facePoint: adsk.core.Point3D = skt.modelToSketchSpace(
        minPnt
    )
    centerLst = [facePoint.copy() for _ in range(3)]
    vecLst = [
        adsk.core.Vector3D.create(50, 30, 0),
        adsk.core.Vector3D.create(115, 30, 0),
        adsk.core.Vector3D.create(180, 30, 0),
    ]
    [p.translateBy(v) for p, v in zip(centerLst, vecLst)]

    holeRadius = 8
    for center in centerLst:
        circles.addByCenterRadius(
            center,
            holeRadius
        )

    extrudes: adsk.fusion.ExtrudeFeatures = comp.features.extrudeFeatures
    extrudes.addSimple(
        adsk.core.ObjectCollection.createWithArray(
            list(skt.profiles)[1:]
        ),
        adsk.core.ValueInput.createByReal(-10),
        adsk.fusion.FeatureOperations.CutFeatureOperation,
    )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Does it matter that the wall thickness is not uniform?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 730px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1303854i5FFD9793BBD43A86/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I strongly recommend that you learn how to model in the GUI before working on the API.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The all capitalized text is difficult to read, even for a Japanese person like me.&lt;/P&gt;</description>
    <pubDate>Tue, 12 Dec 2023 13:38:37 GMT</pubDate>
    <dc:creator>kandennti</dc:creator>
    <dc:date>2023-12-12T13:38:37Z</dc:date>
    <item>
      <title>HOW TO</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to/m-p/12430140#M2310</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import adsk.core, adsk.fusion, traceback, math&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import adsk.core, adsk.fusion, traceback, math

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface
        design = app.activeProduct
        model = design.activeComponent

        # Create a new component for the panel.
        root_comp = design.rootComponent
        new_comp = root_comp.occurrences.addNewComponent(adsk.core.Matrix3D.create())
        panel_comp = new_comp.component

        # Create a new sketch for the panel.
        sketches = panel_comp.sketches
        xy_plane = panel_comp.xYConstructionPlane
        panel_sketch = sketches.add(xy_plane)


        # Define the corners of the panel profile.
        corner1 = adsk.core.Point3D.create(0, 0, 0)
        corner2 = adsk.core.Point3D.create(0, 1588, 0)
        corner3 = adsk.core.Point3D.create(200, 1717, 0)
        corner4 = adsk.core.Point3D.create(200, 0, 0)

        # Create lines connecting the corners to form the panel profile.
        lines = panel_sketch.sketchCurves.sketchLines
        line1 = lines.addByTwoPoints(corner1, corner2)
        line2 = lines.addByTwoPoints(corner2, corner3)
        line3 = lines.addByTwoPoints(corner3, corner4)
        line4 = lines.addByTwoPoints(corner4, corner1)


        # Create the panel extrusion.
        extrudes = panel_comp.features.extrudeFeatures
        prof = panel_sketch.profiles.item(0)  # Check if there's a profile before accessing it.
        if prof:
            ext_input = extrudes.createInput(prof, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)
            ext_input.setDistanceExtent(False, adsk.core.ValueInput.createByReal(65))  # Adjust the extrusion length as needed
            ext = extrudes.add(ext_input)

        # Create a sketch for the cutting profile.
        cutting_sketch = sketches.add(xy_plane)
        cutting_lines = cutting_sketch.sketchCurves.sketchLines

        # Define the corners for the cut profile, leaving a 5mm border.
        cut_corner1 = adsk.core.Point3D.create(5,5,5)
        cut_corner2 = adsk.core.Point3D.create(5, 1583, 5)  # 1588 - 5
        cut_corner3 = adsk.core.Point3D.create(195,1712,5)  # 1717 - 5
        cut_corner4 = adsk.core.Point3D.create(195, 5, 5)

        # Create lines connecting the corners to form the cut profile.
        cut_line1 = cutting_lines.addByTwoPoints(cut_corner1, cut_corner2)
        cut_line2 = cutting_lines.addByTwoPoints(cut_corner2, cut_corner3)
        cut_line3 = cutting_lines.addByTwoPoints(cut_corner3, cut_corner4)
        cut_line4 = cutting_lines.addByTwoPoints(cut_corner4, cut_corner1)

        # Create a "Cut" extrude feature to remove the portion outside the cut profile.
        cutting_ext_input = extrudes.createInput(cutting_sketch.profiles.item(0), adsk.fusion.FeatureOperations.CutFeatureOperation)
        cutting_ext_input.setDistanceExtent(False, adsk.core.ValueInput.createByReal(65))  # Same depth as the original extrusion
        cutting_ext = extrudes.add(cutting_ext_input)

         # Create a hole on the left plane of the panel.
        a = 100
        for i in range(10):
                if i==1:
                    a += 200
                elif i==2:
                    a +=200
                elif i==3:
                    a +=250
                elif i==4:
                    a +=250
                elif i==5:
                    a +=100
                elif i==6:
                    a +=150
                elif i==7:
                    a +=100
                elif i==8:
                    a +=150
                elif i==9:
                    a +=100


                # Create a hole on the bottom plane of the panel.
                side_plane = panel_comp.yZConstructionPlane
                hole_sketch = panel_comp.sketches.add(side_plane)

                # Define the center and radius of the hole.
                hole_center = adsk.core.Point3D.create(-40, a, 200)  
                hole_radius = 8  # Adjust the radius as needed

                # Create a circle for the hole.
                hole_sketch.sketchCurves.sketchCircles.addByCenterRadius(hole_center, hole_radius)

                # Extrude the hole sketch to create the hole on the bottom face.
                hole_prof = hole_sketch.profiles[0]
                hole_ext_input = extrudes.createInput(hole_prof, adsk.fusion.FeatureOperations.CutFeatureOperation)
                hole_ext_input.setDistanceExtent(False, adsk.core.ValueInput.createByReal(-5))  # Adjust the depth of the hole as needed
                hole_ext = extrudes.add(hole_ext_input)

         # Create a hole on the left plane of the panel.
        a = 100
        for i in range(9):
                if i==1:
                    a += 200
                elif i==2:
                    a +=200
                elif i==3:
                    a +=250
                elif i==4:
                    a +=250
                elif i==5:
                    a +=100
                elif i==6:
                    a +=150
                elif i==7:
                    a +=100
                elif i==8:
                    a +=150
                    


                # Create a hole on the SIDE plane of the panel.
                side_plane = panel_comp.yZConstructionPlane
                hole_sketch = panel_comp.sketches.add(side_plane)

                # Define the center and radius of the hole.
                hole_center = adsk.core.Point3D.create(-40, a, 0)  # Adjust the position as needed
                hole_radius = 8  # Adjust the radius as needed

                # Create a circle for the hole.
                hole_sketch.sketchCurves.sketchCircles.addByCenterRadius(hole_center, hole_radius)

                # Extrude the hole sketch to create the hole on the bottom face.
                hole_prof = hole_sketch.profiles[0]
                hole_ext_input = extrudes.createInput(hole_prof, adsk.fusion.FeatureOperations.CutFeatureOperation)
                hole_ext_input.setDistanceExtent(False, adsk.core.ValueInput.createByReal(5))  # Adjust the depth of the hole as needed
                hole_ext = extrudes.add(hole_ext_input)

                 # Create a hole on the bottom plane of the panel.
        x = 0
        for i in range(3):
                x += 50
                # Create a hole on the bottom plane of the panel.
                bottom_plane = panel_comp.xZConstructionPlane
                hole_sketch = panel_comp.sketches.add(bottom_plane)

                # Define the center and radius of the hole.
                hole_center = adsk.core.Point3D.create(x,-40,0)  # Adjust the position as needed
                hole_radius = 8  # Adjust the radius as needed

                # Create a circle for the hole.
                hole_sketch.sketchCurves.sketchCircles.addByCenterRadius(hole_center, hole_radius)

                # Extrude the hole sketch to create the hole on the bottom face.
                hole_prof = hole_sketch.profiles[0]
                hole_ext_input = extrudes.createInput(hole_prof, adsk.fusion.FeatureOperations.CutFeatureOperation)
                hole_ext_input.setDistanceExtent(False, adsk.core.ValueInput.createByReal(5))  # Adjust the depth of the hole as needed
                hole_ext = extrudes.add(hole_ext_input)
                 
                


                


                

                 

                        
                # Create an I-profile on the left face.
                Right_plane = panel_comp.xYConstructionPlane
                iprofile_sketch = panel_comp.sketches.add(Right_plane)

                # Define the coordinates of the I-profile.
                # Define the rectangle's corner points.
                iprofile_corner1 = adsk.core.Point3D.create(5, 930, 25)  # Adjust the position as needed
                iprofile_corner2 = adsk.core.Point3D.create(5, 920, 25)  # Adjust the position as needed
                iprofile_corner3 = adsk.core.Point3D.create(5, 920, 20)  # Adjust the position as needed
                iprofile_corner4 = adsk.core.Point3D.create(5, 923, 20)  # Adjust the position as needed
                iprofile_corner5 = adsk.core.Point3D.create(5, 923, 10)  # Adjust the position as needed
                iprofile_corner6 = adsk.core.Point3D.create(5, 920, 10)  # Adjust the position as needed
                iprofile_corner7 = adsk.core.Point3D.create(5, 920, 5)   # Adjust the position as needed
                iprofile_corner8 = adsk.core.Point3D.create(5, 930, 5)   # Adjust the position as needed
                iprofile_corner9 = adsk.core.Point3D.create(5, 930, 10)  # Adjust the position as needed
                iprofile_corner10 = adsk.core.Point3D.create(5, 927, 10)  # Adjust the position as needed
                iprofile_corner11 = adsk.core.Point3D.create(5, 927, 20)  # Adjust the position as needed
                iprofile_corner12 = adsk.core.Point3D.create(5, 930, 20)  # Adjust the position as needed

                # Create lines connecting the corners to form the I-profile.
                # Create lines connecting the corners to form the I-profile.
                lines = iprofile_sketch.sketchCurves.sketchLines
                line1 = lines.addByTwoPoints(iprofile_corner1, iprofile_corner2)
                line2 = lines.addByTwoPoints(iprofile_corner2, iprofile_corner3)
                line3 = lines.addByTwoPoints(iprofile_corner3, iprofile_corner4)
                line4 = lines.addByTwoPoints(iprofile_corner4, iprofile_corner5)
                line5 = lines.addByTwoPoints(iprofile_corner5, iprofile_corner6)
                line6 = lines.addByTwoPoints(iprofile_corner6, iprofile_corner7)
                line7 = lines.addByTwoPoints(iprofile_corner7, iprofile_corner8)
                line8 = lines.addByTwoPoints(iprofile_corner8, iprofile_corner9)
                line9 = lines.addByTwoPoints(iprofile_corner9, iprofile_corner10)
                line10 = lines.addByTwoPoints(iprofile_corner10, iprofile_corner11)
                line11 = lines.addByTwoPoints(iprofile_corner11, iprofile_corner12)
                line12 = lines.addByTwoPoints(iprofile_corner12, iprofile_corner1)  

                # Create a profile from the I-profile sketch.
                iprofile_profile = iprofile_sketch.profiles.item(0)

                # Extrude the I-profile in the opposite direction.
                i_ext_input = extrudes.createInput(iprofile_profile, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)
                i_ext_input.setDistanceExtent(False, adsk.core.ValueInput.createByReal(-190))  # Adjust the extrusion height as needed

                i_ext = extrudes.add(i_ext_input)

                 #wall tie
        z = 0
        for i in range(4):
                if i == 0:
                  z = 0
                elif i == 1:
                  z += 400
                elif i == 2:
                  z += 500
                elif i == 3:
                  z += 500
         

                plane = panel_comp.xYConstructionPlane
                hole_sketch1 = panel_comp.sketches.add(plane)  # Use a different variable name

                corner1 = adsk.core.Point3D.create(0, 80 + z, 0)  # Adjust the position as needed
                corner2 = adsk.core.Point3D.create(3.5, 80 + z, 0)  # Adjust the position as needed
                corner3 = adsk.core.Point3D.create(3.5, 120 + z, 0)  # Adjust the position as needed
                corner4 = adsk.core.Point3D.create(0, 120+ z, 0)

                lines = hole_sketch1.sketchCurves.sketchLines
                line1 = lines.addByTwoPoints(corner1, corner2)
                line2 = lines.addByTwoPoints(corner2, corner3)
                line3 = lines.addByTwoPoints(corner3, corner4)
                line4 = lines.addByTwoPoints(corner4, corner1)

                hole_prof1 = hole_sketch1.profiles[0]
                hole_ext_input1 = extrudes.createInput(hole_prof1, adsk.fusion.FeatureOperations.CutFeatureOperation)
                hole_ext_input1.setDistanceExtent(False, adsk.core.ValueInput.createByReal(65))  # Adjust the depth of the hole as needed
                hole_ext1 = extrudes.add(hole_ext_input1)

        z=0
        for i in range(4):
                if i==0:
                  z = 0
                elif i==1:
                  z +=400
                elif i==2:
                  z +=500
                elif i==3:
                  z +=500
       
                hole_sketch2 = panel_comp.sketches.add(plane)
                corner1 = adsk.core.Point3D.create(200-3.5, 80+z, 0)  # Adjust the position as needed
                corner2 = adsk.core.Point3D.create(200, 80+z, 0)  # Adjust the position as needed
                corner3 = adsk.core.Point3D.create(200, 120+z, 0)  # Adjust the position as needed
                corner4 = adsk.core.Point3D.create(200-3.5, 120+z, 0)

                lines = hole_sketch2.sketchCurves.sketchLines
                line1 = lines.addByTwoPoints(corner1, corner2)
                line2 = lines.addByTwoPoints(corner2, corner3)
                line3 = lines.addByTwoPoints(corner3, corner4)
                line4 = lines.addByTwoPoints(corner4, corner1)

                hole_prof2 = hole_sketch2.profiles[0]
                hole_ext_input2 = extrudes.createInput(hole_prof2, adsk.fusion.FeatureOperations.CutFeatureOperation)
                hole_ext_input2.setDistanceExtent(False, adsk.core.ValueInput.createByReal(65))  # Adjust the depth of the hole as needed
                hole_ext2 = extrudes.add(hole_ext_input2)
                 


                

            

        
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 13 Jan 2024 11:21:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to/m-p/12430140#M2310</guid>
      <dc:creator>sHubamyadav016</dc:creator>
      <dc:date>2024-01-13T11:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: HOW TO CREATE HOLE ON HIGHLIGHTED PART I TRIED BUT I AM NOT ABLE TO DO PLEASE GIVE SOME WAY OF DOING</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to/m-p/12433362#M2311</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14570628"&gt;@sHubamyadav016&lt;/a&gt;&amp;nbsp;-San.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried a few.&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;LI-CODE lang="python"&gt;・・・
        # Create a "Cut" extrude feature to remove the portion outside the cut profile.
        cutting_ext_input = extrudes.createInput(cutting_sketch.profiles.item(0), adsk.fusion.FeatureOperations.CutFeatureOperation)
        cutting_ext_input.setDistanceExtent(False, adsk.core.ValueInput.createByReal(65))  # Same depth as the original extrusion
        cutting_ext = extrudes.add(cutting_ext_input)

        create_hole_by_diagonal_face(ext)# &amp;lt;-here

         # Create a hole on the left plane of the panel.
・・・

def create_hole_by_diagonal_face(
        ext: adsk.fusion.ExtrudeFeature) -&amp;gt; list:

    comp: adsk.fusion.Component = ext.parentComponent
    origin_face_geos = [
        comp.xYConstructionPlane.geometry,
        comp.yZConstructionPlane.geometry,
        comp.xZConstructionPlane.geometry,
    ]

    def is_diagonal_face(targetFace: adsk.fusion.BRepFace) -&amp;gt; bool:
        targetGeo: adsk.core.Plane = adsk.core.Plane.cast(
            targetFace.geometry
        )
        if not targetGeo: return None

        return not any(
            [plane.isParallelToPlane(targetGeo) for plane in origin_face_geos]
        )

    diagonalFaces = []
    for face in ext.sideFaces:
        if is_diagonal_face(face):
            diagonalFaces.append(face)

    if len(diagonalFaces) &amp;lt; 0: return

    refFace: adsk.fusion.BRepFace = diagonalFaces[0]
    skt: adsk.fusion.Sketch = comp.sketches.add(
        refFace
    )
    circles: adsk.fusion.SketchCircles = skt.sketchCurves.sketchCircles

    facePoint: adsk.core.Point3D = skt.modelToSketchSpace(
        refFace.pointOnFace
    )
    centerLst = [facePoint.copy() for _ in range(3)]
    vecLst = [
        adsk.core.Vector3D.create(-50, 0, 0),
        adsk.core.Vector3D.create(0, 0, 0),
        adsk.core.Vector3D.create(50, 0, 0),
    ]
    [p.translateBy(v) for p, v in zip(centerLst, vecLst)]

    holeRadius = 8
    for center in centerLst:
        circles.addByCenterRadius(
            center,
            holeRadius
        )

    extrudes: adsk.fusion.ExtrudeFeatures = comp.features.extrudeFeatures
    extrudes.addSimple(
        adsk.core.ObjectCollection.createWithArray(
            list(skt.profiles)[1:]
        ),
        adsk.core.ValueInput.createByReal(-10),
        adsk.fusion.FeatureOperations.CutFeatureOperation,
    )&lt;/LI-CODE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 649px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1303389i25B6DA0E562380B5/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 11 Dec 2023 15:05:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to/m-p/12433362#M2311</guid>
      <dc:creator>kandennti</dc:creator>
      <dc:date>2023-12-11T15:05:45Z</dc:date>
    </item>
    <item>
      <title>Re: HOW TO CREATE HOLE ON HIGHLIGHTED PART I TRIED BUT I AM NOT ABLE TO DO PLEASE GIVE SOME WAY OF DOING</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to/m-p/12435268#M2312</link>
      <description>&lt;P&gt;I DID BY YOUR METHOD BUT THE PROBLEM I WANT TO USING THIS TO AUTOMATE THE WHOLE PROCESS SO THE DISTANCE OF FIRST HOLE SHOULD BE 50 BUT IN YOUR CASE IS 76 HOW CAN I FIX THE DIATANCE OF FIRST HOLW SHOULD BE 50 FROM CORNER&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 05:33:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to/m-p/12435268#M2312</guid>
      <dc:creator>sHubamyadav016</dc:creator>
      <dc:date>2023-12-12T05:33:19Z</dc:date>
    </item>
    <item>
      <title>Re: HOW TO CREATE HOLE ON HIGHLIGHTED PART I TRIED BUT I AM NOT ABLE TO DO PLEASE GIVE SOME WAY OF DOING</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to/m-p/12436128#M2313</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14570628"&gt;@sHubamyadav016&lt;/a&gt;&amp;nbsp;-San.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There was no mention of hole location.&lt;BR /&gt;At the very least, I would have presented a way to find the sloped surface you are looking for.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;def create_hole_by_diagonal_face(
        ext: adsk.fusion.ExtrudeFeature) -&amp;gt; None:

    comp: adsk.fusion.Component = ext.parentComponent
    origin_face_geos = [
        comp.xYConstructionPlane.geometry,
        comp.yZConstructionPlane.geometry,
        comp.xZConstructionPlane.geometry,
    ]

    def is_diagonal_face(targetFace: adsk.fusion.BRepFace) -&amp;gt; bool:
        targetGeo: adsk.core.Plane = adsk.core.Plane.cast(
            targetFace.geometry
        )
        if not targetGeo: return None

        return not any(
            [plane.isParallelToPlane(targetGeo) for plane in origin_face_geos]
        )

    diagonalFaces = []
    for face in ext.sideFaces:
        if is_diagonal_face(face):
            diagonalFaces.append(face)

    if len(diagonalFaces) &amp;lt; 0: return

    refFace: adsk.fusion.BRepFace = diagonalFaces[0]
    skt: adsk.fusion.Sketch = comp.sketches.add(
        refFace
    )
    circles: adsk.fusion.SketchCircles = skt.sketchCurves.sketchCircles

    eva: adsk.core.SurfaceEvaluator = refFace.evaluator
    prmRange: adsk.core.BoundingBox2D = eva.parametricRange()
    _, minPnt = eva.getPointAtParameter(prmRange.minPoint)

    facePoint: adsk.core.Point3D = skt.modelToSketchSpace(
        minPnt
    )
    centerLst = [facePoint.copy() for _ in range(3)]
    vecLst = [
        adsk.core.Vector3D.create(50, 30, 0),
        adsk.core.Vector3D.create(115, 30, 0),
        adsk.core.Vector3D.create(180, 30, 0),
    ]
    [p.translateBy(v) for p, v in zip(centerLst, vecLst)]

    holeRadius = 8
    for center in centerLst:
        circles.addByCenterRadius(
            center,
            holeRadius
        )

    extrudes: adsk.fusion.ExtrudeFeatures = comp.features.extrudeFeatures
    extrudes.addSimple(
        adsk.core.ObjectCollection.createWithArray(
            list(skt.profiles)[1:]
        ),
        adsk.core.ValueInput.createByReal(-10),
        adsk.fusion.FeatureOperations.CutFeatureOperation,
    )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Does it matter that the wall thickness is not uniform?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 730px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1303854i5FFD9793BBD43A86/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I strongly recommend that you learn how to model in the GUI before working on the API.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The all capitalized text is difficult to read, even for a Japanese person like me.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 13:38:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to/m-p/12436128#M2313</guid>
      <dc:creator>kandennti</dc:creator>
      <dc:date>2023-12-12T13:38:37Z</dc:date>
    </item>
    <item>
      <title>Re: HOW TO CREATE HOLE ON HIGHLIGHTED PART I TRIED BUT I AM NOT ABLE TO DO PLEASE GIVE SOME WAY OF DOING</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to/m-p/12438225#M2314</link>
      <description>&lt;P&gt;THANK YOU FOR HELPING ME&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;to angle if you can help me it will really useful for me as a fresher&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 13 Jan 2024 11:23:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to/m-p/12438225#M2314</guid>
      <dc:creator>sHubamyadav016</dc:creator>
      <dc:date>2024-01-13T11:23:41Z</dc:date>
    </item>
    <item>
      <title>Re: HOW TO CREATE HOLE ON HIGHLIGHTED PART I TRIED BUT I AM NOT ABLE TO DO PLEASE GIVE SOME WAY OF DOING</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to/m-p/12438227#M2315</link>
      <description>&lt;P&gt;HOW TO DRAW THE GIVEN FIGURE&amp;nbsp; HOW TO TAKE BOTH ANGLE PLEASE GIVE ME SLIGHT HELP I WILL&amp;nbsp; BE REALLY THANKFUL TO YOU&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2023 10:18:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to/m-p/12438227#M2315</guid>
      <dc:creator>sHubamyadav016</dc:creator>
      <dc:date>2023-12-13T10:18:12Z</dc:date>
    </item>
  </channel>
</rss>

