<?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: multiple polygon edges to curves in Maya Modeling Forum</title>
    <link>https://forums.autodesk.com/t5/maya-modeling-forum/multiple-polygon-edges-to-curves/m-p/13393339#M3795</link>
    <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4366685"&gt;@V4nDl0&lt;/a&gt;&amp;nbsp;try this Python script. It does the same as your MEL script but it shouldn't create all the duplicates its working by edge looping the selection currently, Ideally it would be better to have it create the curves based on a selection, but currently looking into it.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import maya.cmds as cmds

def create_curves_from_non_continuous_selection():
    # Get the selected edges
    edges = cmds.ls(selection=True, flatten=True)

    if edges:
        # List to store the created curve names
        curves = []
        
        # Set to keep track of processed edges to avoid duplication
        processed_edges = set()

        # Process each edge
        for edge in edges:
            if edge not in processed_edges:
                # Select the current edge and try to select the whole connected loop
                cmds.select(edge)
                cmds.polySelectSp(loop=True)
                
                # Get the selected edges after selecting the loop
                selected_edges = cmds.ls(selection=True, flatten=True)
                
                # Create the curve from the selected edge loop
                result = cmds.polyToCurve(form=2, degree=3, conformToSmoothMeshPreview=True)
                
                # Store the created curve
                curves.append(result[0])
                
                # Mark the selected edges as processed
                for e in selected_edges:
                    processed_edges.add(e)

        # Select all the created curves
        if curves:
            cmds.select(curves)
        else:
            cmds.warning("No curves created.")
    else:
        cmds.warning("No edges selected.")

# Run the function
create_curves_from_non_continuous_selection()&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 27 Mar 2025 22:08:35 GMT</pubDate>
    <dc:creator>BoDiddley</dc:creator>
    <dc:date>2025-03-27T22:08:35Z</dc:date>
    <item>
      <title>multiple polygon edges to curves</title>
      <link>https://forums.autodesk.com/t5/maya-modeling-forum/multiple-polygon-edges-to-curves/m-p/10959559#M3785</link>
      <description>&lt;P&gt;When using "modify&amp;gt;convert&amp;gt;polygon edges to curves", Maya can only do one single edge loop at a time. Is there any way to select multiple edge loops and convert them all at once, rather than selecting them all one by one? This would be really useful for me generating hair curves for Xgen. I want to sculpt the hair as geometry and then select the relevant polygon edge loops and make them all into nurbs curves.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 18 Feb 2022 18:14:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-modeling-forum/multiple-polygon-edges-to-curves/m-p/10959559#M3785</guid>
      <dc:creator>V4nDl0</dc:creator>
      <dc:date>2022-02-18T18:14:31Z</dc:date>
    </item>
    <item>
      <title>Re: multiple polygon edges to curves</title>
      <link>https://forums.autodesk.com/t5/maya-modeling-forum/multiple-polygon-edges-to-curves/m-p/10959797#M3786</link>
      <description>&lt;P&gt;Maybe some scripting to avoid manual selecting.&lt;/P&gt;&lt;P&gt;Alternatively, more dirty way, you can convert all the selected edges to the same number of disconnected curves. &lt;EM&gt;Modeling &amp;gt; Curves &amp;gt; DuplicateSurfaceCurves.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Feb 2022 20:31:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-modeling-forum/multiple-polygon-edges-to-curves/m-p/10959797#M3786</guid>
      <dc:creator>hamsterHamster</dc:creator>
      <dc:date>2022-02-18T20:31:09Z</dc:date>
    </item>
    <item>
      <title>Re: multiple polygon edges to curves</title>
      <link>https://forums.autodesk.com/t5/maya-modeling-forum/multiple-polygon-edges-to-curves/m-p/10959911#M3787</link>
      <description>&lt;P&gt;Thanks for responding. Unfortunately I don't know how to do much with scripting. If anyone does know how to do this script, I would be very grateful for the help.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Feb 2022 21:46:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-modeling-forum/multiple-polygon-edges-to-curves/m-p/10959911#M3787</guid>
      <dc:creator>V4nDl0</dc:creator>
      <dc:date>2022-02-18T21:46:38Z</dc:date>
    </item>
    <item>
      <title>Re: multiple polygon edges to curves</title>
      <link>https://forums.autodesk.com/t5/maya-modeling-forum/multiple-polygon-edges-to-curves/m-p/12802254#M3788</link>
      <description>&lt;P&gt;nice question.&lt;/P&gt;&lt;P&gt;Autdesk?&lt;BR /&gt;Where is this tool in maya?&lt;BR /&gt;Make it finally!&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2024 14:06:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-modeling-forum/multiple-polygon-edges-to-curves/m-p/12802254#M3788</guid>
      <dc:creator>anatoliiCD3WB</dc:creator>
      <dc:date>2024-05-28T14:06:12Z</dc:date>
    </item>
    <item>
      <title>Re: multiple polygon edges to curves</title>
      <link>https://forums.autodesk.com/t5/maya-modeling-forum/multiple-polygon-edges-to-curves/m-p/13123953#M3789</link>
      <description>&lt;P&gt;Hey this script will allow you to select edges and convert them into curves:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The script retrieves the selected edges and converts them into their corresponding vertex positions.&lt;/LI&gt;&lt;LI&gt;It then creates a curve for each edge based on those vertices.&lt;/LI&gt;&lt;LI&gt;The newly created curves are selected at the end of the operation.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;import maya.cmds as cmds&lt;/P&gt;&lt;P&gt;def edges_to_curves():&lt;BR /&gt;# Get the selected edges&lt;BR /&gt;selection = cmds.ls(selection=True, fl=True)&lt;BR /&gt;&lt;BR /&gt;if not selection:&lt;BR /&gt;cmds.warning("Please select edges.")&lt;BR /&gt;return&lt;BR /&gt;&lt;BR /&gt;# Create a list to store the curves&lt;BR /&gt;curves = []&lt;BR /&gt;&lt;BR /&gt;# Loop through the selected edges&lt;BR /&gt;for edge in selection:&lt;BR /&gt;# Get the vertices of the edge&lt;BR /&gt;vertices = cmds.polyListComponentConversion(edge, toVertex=True)&lt;BR /&gt;vertices = cmds.ls(vertices, fl=True)&lt;BR /&gt;&lt;BR /&gt;# Get the positions of the vertices&lt;BR /&gt;points = [cmds.xform(vtx, q=True, t=True, ws=True) for vtx in vertices]&lt;BR /&gt;&lt;BR /&gt;# Create a curve from the points&lt;BR /&gt;curve = cmds.curve(d=3, p=points)&lt;BR /&gt;curves.append(curve)&lt;BR /&gt;&lt;BR /&gt;# Select the created curves&lt;BR /&gt;cmds.select(curves)&lt;/P&gt;&lt;P&gt;# Run the function&lt;BR /&gt;edges_to_curves()&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2024 09:26:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-modeling-forum/multiple-polygon-edges-to-curves/m-p/13123953#M3789</guid>
      <dc:creator>BoDiddley</dc:creator>
      <dc:date>2024-11-01T09:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: multiple polygon edges to curves</title>
      <link>https://forums.autodesk.com/t5/maya-modeling-forum/multiple-polygon-edges-to-curves/m-p/13127052#M3790</link>
      <description>&lt;P&gt;Just select edges and then run the below MEL script.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;// Convert selected edges to a single curve in Maya
string $selectedEdges[] = `ls -sl -fl`;
string $object[] = `listRelatives -p $selectedEdges[0]`;

string $curveNodes[];
for ($edge in $selectedEdges) {
    string $edgeCurve[] = `polyToCurve -form 2 -degree 1 -conformToSmoothMeshPreview false $edge`;
    $curveNodes[size($curveNodes)] = $edgeCurve[0];
}

string $finalCurve[] = `attachCurve -ch 0 -rpo 0 -kmk 0 -m 0 $curveNodes`;

delete $curveNodes;
select $finalCurve[0];&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&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="Screenshot 2024-11-04 012020.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1429005i19D44EDEF820DB15/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2024-11-04 012020.png" alt="Screenshot 2024-11-04 012020.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 03 Nov 2024 13:15:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-modeling-forum/multiple-polygon-edges-to-curves/m-p/13127052#M3790</guid>
      <dc:creator>mabioca</dc:creator>
      <dc:date>2024-11-03T13:15:14Z</dc:date>
    </item>
    <item>
      <title>Re: multiple polygon edges to curves</title>
      <link>https://forums.autodesk.com/t5/maya-modeling-forum/multiple-polygon-edges-to-curves/m-p/13381500#M3791</link>
      <description>&lt;P&gt;So i did it this way and it worked (for those who do not know how to run script in maya press ctrl + enter) :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;import maya.cmds as cmds&lt;/P&gt;&lt;P&gt;def edges_to_curves():&lt;BR /&gt;# Get the selected edges&lt;BR /&gt;selection = cmds.ls(selection=True, fl=True)&lt;/P&gt;&lt;P&gt;if not selection:&lt;BR /&gt;cmds.warning("Please select at least one edge.")&lt;BR /&gt;return&lt;/P&gt;&lt;P&gt;print("Selected components:", selection) # Debugging&lt;/P&gt;&lt;P&gt;# Ensure only edges are selected&lt;BR /&gt;edges = cmds.filterExpand(selection, selectionMask=32) # 32 is the mask for edges&lt;BR /&gt;if not edges:&lt;BR /&gt;cmds.warning("No valid polygon edges selected.")&lt;BR /&gt;return&lt;/P&gt;&lt;P&gt;print("Filtered edges:", edges) # Debugging&lt;/P&gt;&lt;P&gt;# Create a list to store the curves&lt;BR /&gt;curves = []&lt;/P&gt;&lt;P&gt;# Loop through the selected edges&lt;BR /&gt;for edge in edges:&lt;BR /&gt;print(f"Processing edge: {edge}") # Debugging&lt;BR /&gt;&lt;BR /&gt;# Get the vertices of the edge&lt;BR /&gt;vertices = cmds.polyListComponentConversion(edge, toVertex=True)&lt;BR /&gt;vertices = cmds.ls(vertices, fl=True)&lt;/P&gt;&lt;P&gt;print(f"Vertices for edge {edge}:", vertices) # Debugging&lt;/P&gt;&lt;P&gt;if len(vertices) != 2:&lt;BR /&gt;cmds.warning(f"Skipping edge {edge}: Expected 2 vertices, found {len(vertices)}")&lt;BR /&gt;continue # Skip problematic edges&lt;/P&gt;&lt;P&gt;# Get the positions of the vertices&lt;BR /&gt;points = [cmds.xform(vtx, q=True, t=True, ws=True) for vtx in vertices]&lt;/P&gt;&lt;P&gt;print(f"Points for edge {edge}:", points) # Debugging&lt;/P&gt;&lt;P&gt;# Create a linear curve from the points&lt;BR /&gt;curve = cmds.curve(d=1, p=points) # d=1 for straight-line curves&lt;BR /&gt;curves.append(curve)&lt;/P&gt;&lt;P&gt;if curves:&lt;BR /&gt;cmds.select(curves)&lt;BR /&gt;cmds.confirmDialog(title="Success", message=f"Created {len(curves)} curves from edges.")&lt;BR /&gt;else:&lt;BR /&gt;cmds.warning("No curves were created.")&lt;/P&gt;&lt;P&gt;# Run the function&lt;BR /&gt;edges_to_curves()&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 13:32:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-modeling-forum/multiple-polygon-edges-to-curves/m-p/13381500#M3791</guid>
      <dc:creator>nickylasb</dc:creator>
      <dc:date>2025-03-20T13:32:36Z</dc:date>
    </item>
    <item>
      <title>Re: multiple polygon edges to curves</title>
      <link>https://forums.autodesk.com/t5/maya-modeling-forum/multiple-polygon-edges-to-curves/m-p/13383833#M3792</link>
      <description>&lt;P&gt;Thanks! However, the result of running this script is the creation of separate curves from the selected edges, which can be achieved using Curves &amp;gt; Offset &amp;gt; Offset Curve&lt;/P&gt;</description>
      <pubDate>Mon, 24 Mar 2025 10:14:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-modeling-forum/multiple-polygon-edges-to-curves/m-p/13383833#M3792</guid>
      <dc:creator>mabioca</dc:creator>
      <dc:date>2025-03-24T10:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: multiple polygon edges to curves</title>
      <link>https://forums.autodesk.com/t5/maya-modeling-forum/multiple-polygon-edges-to-curves/m-p/13389368#M3793</link>
      <description>&lt;P&gt;Thanks everyone for trying to help, but so far I haven't had success with any of the scripts posted, they either give syntax errors or create the wrong kind of curves.&lt;BR /&gt;In case my original question was unclear -&lt;BR /&gt;I want to select MULTIPLE EDGE LOOPS and convert them into separate individual curves, 1 for each edge loop selected. Just like using "modify &amp;gt; convert polygon edges to curve" but doing many edge loops in a single action.&lt;BR /&gt;LIKE THIS:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HAIR.JPG" style="width: 881px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1481584i8E7D2D8B2115D3FD/image-size/large?v=v2&amp;amp;px=999" role="button" title="HAIR.JPG" alt="HAIR.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Using Chat GPT, I was sort of able to come up with this attempt at a script:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;string $edge;&lt;BR /&gt;string $curves[];&lt;BR /&gt;string $edges[] = `ls -sl -flatten`;&lt;BR /&gt;for ($edge in $edges) {&lt;BR /&gt;select -r $edge;&lt;BR /&gt;polySelectSp -loop; // or performSelContiguousEdges 0;&lt;/P&gt;&lt;P&gt;// change -degree to 1 for a linear (instead of smooth) curve&lt;BR /&gt;string $result[] = `polyToCurve -form 2 -degree 3 -conformToSmoothMeshPreview 1`;&lt;BR /&gt;$curves[size($curves)] = $result[0];&lt;BR /&gt;}&lt;BR /&gt;select -r $curves;&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;// Warning: string $edge;&lt;BR /&gt;// Warning: Line 1.13 : Redeclaration of variable "$edge" shadows previous declaration at line 6. Previous value will be retained.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- but this script creates way too many curves. For example, if I select just four edge loops and run the script, I get 136 curves - the curves are good and usable, but I have to delete 132 of them. So for a full haircut I have to delete thousands of unwanted curves.&lt;BR /&gt;If anyone who knows scripting can help fix this script, I'm still looking. Thanks!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Mar 2025 12:31:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-modeling-forum/multiple-polygon-edges-to-curves/m-p/13389368#M3793</guid>
      <dc:creator>V4nDl0</dc:creator>
      <dc:date>2025-03-25T12:31:07Z</dc:date>
    </item>
    <item>
      <title>Re: multiple polygon edges to curves</title>
      <link>https://forums.autodesk.com/t5/maya-modeling-forum/multiple-polygon-edges-to-curves/m-p/13393036#M3794</link>
      <description>&lt;P&gt;Hey I think I've got a bit of a work around for you to try to achieve this.&lt;BR /&gt;&lt;BR /&gt;Under the Modify menu convert your mesh to SubD then convert the SubD mesh to a Nurbs mesh now select your Isoparms highlighted in yellow in the image bellow. Now use Duplicate Surface Curves under the Curves menu (might find it useful to go into the options for this tool first and tick Group with Original) now you should have your curves.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;If you run SubD to Nurbs on a more complicated mesh your final Nurbs object will probably produce multiple Nurbs shapes. Here's a way to combine all the shapes to make it easier to select your Isoparms (This will only make its easier for you to select your Isoparms but the edges will still cut at the shape end so you'll still need to use curve attach to connect them)&lt;BR /&gt;&lt;BR /&gt;Firstly Freeze transforms on all your Nurbs shapes&lt;BR /&gt;now create a Null group ctrl+G&lt;BR /&gt;Under Display in your outliner check on Shapes&lt;BR /&gt;now copy the shape name, for example "subdToNurbsShape1_Shape1"&amp;nbsp;&lt;BR /&gt;now in the input line menu at the top of your toolbar select "select by name" then paste&amp;nbsp;subdToNurbsShape1_Shape1 but remove the number at the end and replace with a * so it should look like this "subdToNurbsShape1_Shape*" this will now select all shapes.&lt;BR /&gt;Now ctrl select your Null grp then in the MEL script write "parent -r-s" this will now combine all your shapes&amp;nbsp;&lt;BR /&gt;You should now be able to select multiple Isoparms across all your Nurbs shapes&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Its a bit of a janky work around but let me know if this works for you.&lt;BR /&gt;Your script does a good job, maybe someone can tweak it so that it doesn't generate so many and only the selected ones&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Curve_workflow.PNG" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1482309i9D393C74F584D1BE/image-size/large?v=v2&amp;amp;px=999" role="button" title="Curve_workflow.PNG" alt="Curve_workflow.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Mar 2025 05:01:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-modeling-forum/multiple-polygon-edges-to-curves/m-p/13393036#M3794</guid>
      <dc:creator>BoDiddley</dc:creator>
      <dc:date>2025-03-27T05:01:06Z</dc:date>
    </item>
    <item>
      <title>Re: multiple polygon edges to curves</title>
      <link>https://forums.autodesk.com/t5/maya-modeling-forum/multiple-polygon-edges-to-curves/m-p/13393339#M3795</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4366685"&gt;@V4nDl0&lt;/a&gt;&amp;nbsp;try this Python script. It does the same as your MEL script but it shouldn't create all the duplicates its working by edge looping the selection currently, Ideally it would be better to have it create the curves based on a selection, but currently looking into it.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import maya.cmds as cmds

def create_curves_from_non_continuous_selection():
    # Get the selected edges
    edges = cmds.ls(selection=True, flatten=True)

    if edges:
        # List to store the created curve names
        curves = []
        
        # Set to keep track of processed edges to avoid duplication
        processed_edges = set()

        # Process each edge
        for edge in edges:
            if edge not in processed_edges:
                # Select the current edge and try to select the whole connected loop
                cmds.select(edge)
                cmds.polySelectSp(loop=True)
                
                # Get the selected edges after selecting the loop
                selected_edges = cmds.ls(selection=True, flatten=True)
                
                # Create the curve from the selected edge loop
                result = cmds.polyToCurve(form=2, degree=3, conformToSmoothMeshPreview=True)
                
                # Store the created curve
                curves.append(result[0])
                
                # Mark the selected edges as processed
                for e in selected_edges:
                    processed_edges.add(e)

        # Select all the created curves
        if curves:
            cmds.select(curves)
        else:
            cmds.warning("No curves created.")
    else:
        cmds.warning("No edges selected.")

# Run the function
create_curves_from_non_continuous_selection()&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 27 Mar 2025 22:08:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-modeling-forum/multiple-polygon-edges-to-curves/m-p/13393339#M3795</guid>
      <dc:creator>BoDiddley</dc:creator>
      <dc:date>2025-03-27T22:08:35Z</dc:date>
    </item>
    <item>
      <title>Re: multiple polygon edges to curves</title>
      <link>https://forums.autodesk.com/t5/maya-modeling-forum/multiple-polygon-edges-to-curves/m-p/13429657#M3796</link>
      <description>&lt;P&gt;Many thanks! This Python script from Chat GPT, making a slight adjustment, will produce straight curves:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;import maya.cmds as cmds&lt;/P&gt;&lt;P&gt;def create_straight_curves_from_edges():&lt;BR /&gt;# Get the selected edges&lt;BR /&gt;edges = cmds.ls(selection=True, flatten=True)&lt;/P&gt;&lt;P&gt;if edges:&lt;BR /&gt;# List to store the created curve names&lt;BR /&gt;curves = []&lt;BR /&gt;&lt;BR /&gt;# Set to keep track of processed edges to avoid duplication&lt;BR /&gt;processed_edges = set()&lt;/P&gt;&lt;P&gt;# Process each edge&lt;BR /&gt;for edge in edges:&lt;BR /&gt;if edge not in processed_edges:&lt;BR /&gt;# Select the current edge and try to select the whole connected loop&lt;BR /&gt;cmds.select(edge)&lt;BR /&gt;cmds.polySelectSp(loop=True)&lt;BR /&gt;&lt;BR /&gt;# Get the selected edges after selecting the loop&lt;BR /&gt;selected_edges = cmds.ls(selection=True, flatten=True)&lt;BR /&gt;&lt;BR /&gt;# Create a curve from the selected edge loop with straight segments (degree 1)&lt;BR /&gt;result = cmds.polyToCurve(form=2, degree=1, conformToSmoothMeshPreview=False)&lt;BR /&gt;&lt;BR /&gt;# Store the created curve&lt;BR /&gt;curves.append(result[0])&lt;BR /&gt;&lt;BR /&gt;# Mark the selected edges as processed&lt;BR /&gt;for e in selected_edges:&lt;BR /&gt;processed_edges.add(e)&lt;/P&gt;&lt;P&gt;# Select all the created curves&lt;BR /&gt;if curves:&lt;BR /&gt;cmds.select(curves)&lt;BR /&gt;else:&lt;BR /&gt;cmds.warning("No curves created.")&lt;BR /&gt;else:&lt;BR /&gt;cmds.warning("No edges selected.")&lt;/P&gt;&lt;P&gt;# Run the function&lt;BR /&gt;create_straight_curves_from_edges()&lt;/P&gt;</description>
      <pubDate>Wed, 16 Apr 2025 18:38:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-modeling-forum/multiple-polygon-edges-to-curves/m-p/13429657#M3796</guid>
      <dc:creator>robszczerba</dc:creator>
      <dc:date>2025-04-16T18:38:40Z</dc:date>
    </item>
  </channel>
</rss>

