Script to extract wireframe (or equivalent in python)

Hi

I have this simple script to extract my wireframe, it works fine, but I want to Show surface isocurve be set to “on” in the end of the script.
How can I add this?

! _Select _Pause _-Properties _Object _ShowIsocurves _No _EnterEnd _ExtractWireframe

Hi @MAD3D,

below should yield the same result as above macro without changing the isocurve density:

import rhinoscriptsyntax as rs

def ExtractEdgeCurves():
    
    msg = "Select surfaces and polysurfaces to extract edge curves"
    ids = rs.GetObjects(msg, 8 + 16, True, True, False)
    if not ids: return
    
    results = []
    rs.EnableRedraw(False)
    
    for id in ids:
        rc = rs.DuplicateEdgeCurves(id, False)
        if rc: results.extend(rc)
    
    if len(results) > 0:
        rs.SelectObjects(results)
    
    rs.EnableRedraw(True)
    
ExtractEdgeCurves()

c.

Thanks a lot @clement, it´s Perfect!!! :slight_smile: