<?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 Betreff: How can I use an edge as a profile for a not solid sweep (surface)? in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-can-i-use-an-edge-as-a-profile-for-a-not-solid-sweep-surface/m-p/10620661#M7983</link>
    <description>&lt;P&gt;Thank you kandennti, that is a great peace of work!&lt;BR /&gt;With the&amp;nbsp;&lt;SPAN&gt;Component.createBRepEdgeProfile method I can now use edges as profiles by simply write:&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;prof&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;root_comp&lt;/SPAN&gt;&lt;SPAN&gt;.createBRepEdgeProfile(&lt;/SPAN&gt;&lt;SPAN&gt;edge&lt;/SPAN&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;False&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt;But using it in my script worked just for the first three arcs. Then the&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-family: inherit;"&gt;body&lt;/SPAN&gt;&lt;SPAN style="font-family: inherit;"&gt;.edges.item(&lt;/SPAN&gt;&lt;SPAN style="font-family: inherit;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-family: inherit;"&gt;) was the wrong one... somehow the item-number of the ages change by position of the surface... and so further arcs failed.&amp;nbsp;&lt;BR /&gt;I wonder how you managed to solve this problem! I will try to understand your code and give further feedback.&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="adminTCYL2_0-1631606792764.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/964818i3494C6B55D7E42BA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="adminTCYL2_0-1631606792764.png" alt="adminTCYL2_0-1631606792764.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 14 Sep 2021 08:07:22 GMT</pubDate>
    <dc:creator>adminTCYL2</dc:creator>
    <dc:date>2021-09-14T08:07:22Z</dc:date>
    <item>
      <title>How can I use an edge as a profile for a not solid sweep (surface)?</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-can-i-use-an-edge-as-a-profile-for-a-not-solid-sweep-surface/m-p/10619403#M7980</link>
      <description>&lt;P&gt;I use rotated sweeps as basis to draw electrical coils. This works best on lines or arcs and not good on splines.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;The basis curve is done by a formular. So I get points and normaly I would draw a spline along, but in this case it is better to draw arcs along. Then I do this rotated sweeps along the arcs.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="adminTCYL2_0-1631557766320.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/964628i1D9D4B1764F11804/image-size/medium?v=v2&amp;amp;px=400" role="button" title="adminTCYL2_0-1631557766320.png" alt="adminTCYL2_0-1631557766320.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But there is a problem: Each surface has its own profile and they do not connect.&amp;nbsp;&lt;BR /&gt;To connect them to one surface I want to use the end-edge of an arc-sweep as profile for the next arc-sweep.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;In my script you see out comanded lines where I try this. But Fusion does not accept the edge as a profile.&amp;nbsp;&lt;BR /&gt;Does someone know a solution?&lt;/P&gt;&lt;LI-CODE lang="general"&gt;import adsk.core, adsk.fusion, adsk.cam, traceback, math

def run(context):
	ui = None
	try:
		app = adsk.core.Application.get()
		ui = app.userInterface
		design = app.activeProduct
		# Get the root component of the active design.
		root_comp = design.rootComponent
		# Create a new sketch on the xy plane.
		sketches = root_comp.sketches
		xyPlane = root_comp.xYConstructionPlane
		sketch = sketches.add(xyPlane)
		points = adsk.core.ObjectCollection.create() # Create an object collection for the points.
        

		windings = 10
		pointsPerRound = 4 # Number of points that splines are generated.
		i = -pointsPerRound*windings #Startwert, der in der Schleife runtergezählt wird
		r = 0.5
		h = 0


		while i &amp;lt;= 0:
			t = (math.pi/(pointsPerRound*windings))*i*2
			h = 1.5+((-r)*(math.sin(t*windings)))
			xCoord = (h)*(math.sin(t))
			yCoord = (h)*(math.cos(t))
			zCoord = ((-r)*(math.cos(t*windings)))
			points.add(adsk.core.Point3D.create(xCoord,yCoord,zCoord))
			i = i + 1
		
		#Combining the points to arcs
		arcs = adsk.core.ObjectCollection.create()
		for j in range(0,int((windings*pointsPerRound)/2)):
			arc = sketch.sketchCurves.sketchArcs.addByThreePoints(points[2*j],points[2*j+1],points[2*j+2])
			arcs.add(arc)
			profilStart = adsk.core.Point3D.create(points[2*j].x,points[2*j].y,points[2*j].z-0.2)
			profilEnd =   adsk.core.Point3D.create(points[2*j].x,points[2*j].y,points[2*j].z-0.01)
			profil=sketch.sketchCurves.sketchLines.addByTwoPoints(profilStart,profilEnd)

			"""
			# The right way would be: define a start profile for the sweep...
			if j==0:
				profilStart = adsk.core.Point3D.create(points[0].x,points[0].y,points[0].z-0.2)
				profilEnd =   adsk.core.Point3D.create(points[0].x,points[0].y,points[0].z-0.01)		
				profil=sketch.sketchCurves.sketchLines.addByTwoPoints(profilStart,profilEnd)
			# ..and then use the edge of the last sweep as profile for the next: 
			else:
				itemIndex = root_comp.bRepBodies.count-1
				body = root_comp.bRepBodies.item(itemIndex)
				profil=	body.edges.item(3)  #it is not clear witch of the four items
				sketch.add(profil)
			"""
			prof = root_comp.createOpenProfile(profil, False)
			path = root_comp.features.createPath(arc, False)
			sweeps = root_comp.features.sweepFeatures
			sweepInput1 = sweeps.createInput(prof, path, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)
			sweepInput1.twistAngle = adsk.core.ValueInput.createByReal(100)
			sweepInput1.isSolid = False
			sweep = sweeps.add(sweepInput1)

		for j in range(0,10):
			arcs[j].startSketchPoint.merge(arcs[j+1].endSketchPoint)


	except:
		if ui:
			ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Sep 2021 18:34:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-can-i-use-an-edge-as-a-profile-for-a-not-solid-sweep-surface/m-p/10619403#M7980</guid>
      <dc:creator>adminTCYL2</dc:creator>
      <dc:date>2021-09-13T18:34:36Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use an edge as a profile for a not solid sweep (surface)?</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-can-i-use-an-edge-as-a-profile-for-a-not-solid-sweep-surface/m-p/10620552#M7981</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6857866"&gt;@adminTCYL2&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It looked interesting, so I gave it a try.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I decided to create only one SketchLine, which would be the profile of the first Sweep, and use the edge of the previous Sweep for the rest of the Sweeps.&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;# Fusion360API Python script
import adsk.core, adsk.fusion, traceback, math

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface
        design = app.activeProduct
        # Get the root component of the active design.
        root_comp = design.rootComponent

        windings = 10
        pointsPerRound = 4 # Number of points that splines are generated.
        i = -pointsPerRound*windings #Startwert, der in der Schleife runtergezählt wird
        r = 0.5
        h = 0

        # create points
        points = []
        while i &amp;lt;= 0:
            t = (math.pi/(pointsPerRound*windings))*i*2
            h = 1.5+((-r)*(math.sin(t*windings)))
            xCoord = (h)*(math.sin(t))
            yCoord = (h)*(math.cos(t))
            zCoord = ((-r)*(math.cos(t*windings)))
            points.append(
                adsk.core.Point3D.create(xCoord,yCoord,zCoord)
            )
            i = i + 1

        # create sketch
        sketches = root_comp.sketches
        xyPlane = root_comp.xYConstructionPlane
        sketch: adsk.fusion.Sketch = sketches.add(xyPlane)
        sketch.arePointsShown = False

        # create arcs
        sketch.isComputeDeferred = True
        sktArcs = sketch.sketchCurves.sketchArcs
        arcs = [sktArcs.addByThreePoints(p1, p2, p3) 
            for p1, p2, p3 in zip(points[0::2], points[1::2], points[2::2])]

        # create start line &amp;amp; OpenProfile
        line: adsk.fusion.SketchLine = sketch.sketchCurves.sketchLines.addByTwoPoints(
            adsk.core.Point3D.create(
                points[0].x,
                points[0].y,
                points[0].z - 0.2
            ),
            adsk.core.Point3D.create(
                points[0].x,
                points[0].y,
                points[0].z - 0.01
            )
        )
        profile: adsk.fusion.Profile = root_comp.createOpenProfile(line)
        sketch.isComputeDeferred = False

        # create paths
        paths = [root_comp.features.createPath(arc, False) for arc in arcs]

        # create SweepFeatureInput - This is only temporary.
        sweeps: adsk.fusion.SweepFeatures = root_comp.features.sweepFeatures
        twistAngle = adsk.core.ValueInput.createByReal(100)
        sweepIpt: adsk.fusion.SweepFeatureInput = sweeps.createInput(
            profile,
            paths[0],
            adsk.fusion.FeatureOperations.NewBodyFeatureOperation
        )
        sweepIpt.isSolid = False
        sweepIpt.twistAngle = twistAngle

        # create SweepFeature
        # Create a SweepFeature while modifying SweepFeatureInput.
        # Find the edge that will be the next profile from the SweepFeature.
        for path in paths:
            sweepIpt.profile = profile
            sweepIpt.path = path

            sweepFeat: adsk.fusion.SweepFeature = sweeps.add(sweepIpt)
            edge: adsk.fusion.BRepEdge = findNextProfileEdge(sweepFeat)

            profile = root_comp.createBRepEdgeProfile(edge, False)

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))


def findNextProfileEdge(
    sweepFeat: adsk.fusion.SweepFeature) -&amp;gt; adsk.fusion.BRepEdge:

    profileGeo: adsk.core.Line3D = sweepFeat.profile.item(0).entity.geometry

    nextProfileEdge = None
    edge: adsk.fusion.BRepEdge
    for edge in sweepFeat.sideFaces[0].edges:
        if edge.geometry.objectType != 'adsk::core::Line3D':
            continue

        if not idEqualLine(profileGeo, edge.geometry):
            nextProfileEdge = edge
            break
    
    if not nextProfileEdge:
        raise ValueError("Cannot find the next profile!")

    return nextProfileEdge


def idEqualLine(
    l1: adsk.core.Line3D,
    l2: adsk.core.Line3D) -&amp;gt; bool:

    if not l1.isColinearTo(l2):
        return False

    p1: adsk.core.Point3D = l2.startPoint
    p2: adsk.core.Point3D = l2.endPoint
    if l1.startPoint.isEqualTo(p1):
        if l1.endPoint.isEqualTo(p2):
            return True
    elif l1.startPoint.isEqualTo(p2):
        if l1.endPoint.isEqualTo(p1):
            return True

    return False&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't know about these shapes, but since the Arcs are not smoothly connected, the resulting Surface is not smooth either.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 934px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/964791i0C9B9D91A74131E8/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;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, the first and last edges were not connected.&lt;BR /&gt;I think it was a problem with the twist angle calculation, but I couldn't figure out what was right.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2.png" style="width: 517px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/964792i57FE2E9CB180E102/image-size/large?v=v2&amp;amp;px=999" role="button" title="2.png" alt="2.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Sep 2021 07:07:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-can-i-use-an-edge-as-a-profile-for-a-not-solid-sweep-surface/m-p/10620552#M7981</guid>
      <dc:creator>kandennti</dc:creator>
      <dc:date>2021-09-14T07:07:08Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use an edge as a profile for a not solid sweep (surface)?</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-can-i-use-an-edge-as-a-profile-for-a-not-solid-sweep-surface/m-p/10620586#M7982</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6857866"&gt;@adminTCYL2&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I forgot to write down the most important thing. &lt;BR /&gt;It is the Component.createBRepEdgeProfile method that gets the profile from the edge.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-ca25aae8-7ca2-4048-b912-e980774a736e" target="_blank" rel="noopener"&gt;https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-ca25aae8-7ca2-4048-b912-e980774a736e&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Sep 2021 07:29:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-can-i-use-an-edge-as-a-profile-for-a-not-solid-sweep-surface/m-p/10620586#M7982</guid>
      <dc:creator>kandennti</dc:creator>
      <dc:date>2021-09-14T07:29:54Z</dc:date>
    </item>
    <item>
      <title>Betreff: How can I use an edge as a profile for a not solid sweep (surface)?</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-can-i-use-an-edge-as-a-profile-for-a-not-solid-sweep-surface/m-p/10620661#M7983</link>
      <description>&lt;P&gt;Thank you kandennti, that is a great peace of work!&lt;BR /&gt;With the&amp;nbsp;&lt;SPAN&gt;Component.createBRepEdgeProfile method I can now use edges as profiles by simply write:&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;prof&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;root_comp&lt;/SPAN&gt;&lt;SPAN&gt;.createBRepEdgeProfile(&lt;/SPAN&gt;&lt;SPAN&gt;edge&lt;/SPAN&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;False&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt;But using it in my script worked just for the first three arcs. Then the&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-family: inherit;"&gt;body&lt;/SPAN&gt;&lt;SPAN style="font-family: inherit;"&gt;.edges.item(&lt;/SPAN&gt;&lt;SPAN style="font-family: inherit;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-family: inherit;"&gt;) was the wrong one... somehow the item-number of the ages change by position of the surface... and so further arcs failed.&amp;nbsp;&lt;BR /&gt;I wonder how you managed to solve this problem! I will try to understand your code and give further feedback.&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="adminTCYL2_0-1631606792764.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/964818i3494C6B55D7E42BA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="adminTCYL2_0-1631606792764.png" alt="adminTCYL2_0-1631606792764.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Sep 2021 08:07:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-can-i-use-an-edge-as-a-profile-for-a-not-solid-sweep-surface/m-p/10620661#M7983</guid>
      <dc:creator>adminTCYL2</dc:creator>
      <dc:date>2021-09-14T08:07:22Z</dc:date>
    </item>
    <item>
      <title>Betreff: How can I use an edge as a profile for a not solid sweep (surface)?</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-can-i-use-an-edge-as-a-profile-for-a-not-solid-sweep-surface/m-p/10620784#M7984</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;Kandennti,&amp;nbsp;&lt;BR /&gt;I tested your script. It works very fine. The only change I did was not to calculate all parts (arcs) and enhanced the calculated points so that the arcs are short and the coil is very near to the mathematical optimum.&amp;nbsp;&lt;BR /&gt;As you see this script allows very many rotations and can be basis for drawing electrical coils along the edge of the sweeps. I accepted your solution, because this script is your success not mine. I would not have been able to write this nice function to choose allways the right edge.&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="adminTCYL2_0-1631609618961.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/964851iF5763A272D537E90/image-size/medium?v=v2&amp;amp;px=400" role="button" title="adminTCYL2_0-1631609618961.png" alt="adminTCYL2_0-1631609618961.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# Fusion360API Python script
import adsk.core, adsk.fusion, traceback, math

def run(context):
	ui = None
	try:
		# Settings:
		windings = 10
		pointsPerRound = 20 # Number of points that splines are generated.
		calculatedArcs = 20 # All are calculated by windings*pointsPerRound/2
		r = 0.5
		h = 0
		rotations=100

		app = adsk.core.Application.get()
		ui = app.userInterface
		design = app.activeProduct
		root_comp = design.rootComponent

		# create points
		points = []
		i = -pointsPerRound*windings
		while i &amp;lt;= 0:
			t = (math.pi/(pointsPerRound*windings))*i*2
			h = 1.5+((-r)*(math.sin(t*windings)))
			xCoord = (h)*(math.sin(t))
			yCoord = (h)*(math.cos(t))
			zCoord = ((-r)*(math.cos(t*windings)))
			points.append(
				adsk.core.Point3D.create(xCoord,yCoord,zCoord)
			)
			i = i + 1

		# create sketch
		sketches = root_comp.sketches
		xyPlane = root_comp.xYConstructionPlane
		sketch: adsk.fusion.Sketch = sketches.add(xyPlane)
		sketch.arePointsShown = False

		# create arcs
		sketch.isComputeDeferred = True
		sktArcs = sketch.sketchCurves.sketchArcs
		arcs = [sktArcs.addByThreePoints(p1, p2, p3) 
			for p1, p2, p3 in zip(points[0::2], points[1::2], points[2::2])]

		# create start line &amp;amp; OpenProfile
		line: adsk.fusion.SketchLine = sketch.sketchCurves.sketchLines.addByTwoPoints(
			adsk.core.Point3D.create(
				points[0].x,
				points[0].y,
				points[0].z - 0.2
			),
			adsk.core.Point3D.create(
				points[0].x,
				points[0].y,
				points[0].z - 0.01
			)
		)
		profile: adsk.fusion.Profile = root_comp.createOpenProfile(line)
		sketch.isComputeDeferred = False

		# create paths
		paths = [root_comp.features.createPath(arc, False) for arc in arcs]

		# create SweepFeatureInput - This is only temporary.
		sweeps: adsk.fusion.SweepFeatures = root_comp.features.sweepFeatures
		twistAngle = adsk.core.ValueInput.createByReal(rotations)
		sweepIpt: adsk.fusion.SweepFeatureInput = sweeps.createInput(
			profile,
			paths[0],
			adsk.fusion.FeatureOperations.NewBodyFeatureOperation
		)
		sweepIpt.isSolid = False
		sweepIpt.twistAngle = twistAngle

		# create SweepFeature
		# Create a SweepFeature while modifying SweepFeatureInput.
		# Find the edge that will be the next profile from the SweepFeature.
		for j in range (0,calculatedArcs):
		#for path in paths:
			sweepIpt.profile = profile
			sweepIpt.path = paths[j] # =path
			sweepFeat: adsk.fusion.SweepFeature = sweeps.add(sweepIpt)
			edge: adsk.fusion.BRepEdge = findNextProfileEdge(sweepFeat)

			profile = root_comp.createBRepEdgeProfile(edge, False)

	except:
		if ui:
			ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))


def findNextProfileEdge(
    sweepFeat: adsk.fusion.SweepFeature) -&amp;gt; adsk.fusion.BRepEdge:

    profileGeo: adsk.core.Line3D = sweepFeat.profile.item(0).entity.geometry

    nextProfileEdge = None
    edge: adsk.fusion.BRepEdge
    for edge in sweepFeat.sideFaces[0].edges:
        if edge.geometry.objectType != 'adsk::core::Line3D':
            continue

        if not idEqualLine(profileGeo, edge.geometry):
            nextProfileEdge = edge
            break
    
    if not nextProfileEdge:
        raise ValueError("Cannot find the next profile!")

    return nextProfileEdge


def idEqualLine(
    l1: adsk.core.Line3D,
    l2: adsk.core.Line3D) -&amp;gt; bool:

    if not l1.isColinearTo(l2):
        return False

    p1: adsk.core.Point3D = l2.startPoint
    p2: adsk.core.Point3D = l2.endPoint
    if l1.startPoint.isEqualTo(p1):
        if l1.endPoint.isEqualTo(p2):
            return True
    elif l1.startPoint.isEqualTo(p2):
        if l1.endPoint.isEqualTo(p1):
            return True

    return False&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Sep 2021 08:56:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-can-i-use-an-edge-as-a-profile-for-a-not-solid-sweep-surface/m-p/10620784#M7984</guid>
      <dc:creator>adminTCYL2</dc:creator>
      <dc:date>2021-09-14T08:56:38Z</dc:date>
    </item>
  </channel>
</rss>

