# How to convert QuadMesh to SubD in RhinoCommon likewise \_ToSubD in GUI?

**URL:** <https://discourse.mcneel.com/t/how-to-convert-quadmesh-to-subd-in-rhinocommon-likewise-tosubd-in-gui/206402>\
**Category:** Rhino Developer\
**Tags:** windows, rhino8\
**Created:** [June 26, 2025, 5:23am UTC](https://discourse.mcneel.com/t/how-to-convert-quadmesh-to-subd-in-rhinocommon-likewise-tosubd-in-gui/206402 "2025-06-26T05:23:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Young\_Geon\_Park](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/young_geon_park/32/676667_2.png) [@Young\_Geon\_Park](https://discourse.mcneel.com/u/Young_Geon_Park)\
**Post date:** [June 26, 2025, 5:23am UTC](https://discourse.mcneel.com/t/how-to-convert-quadmesh-to-subd-in-rhinocommon-likewise-tosubd-in-gui/206402/1 "2025-06-26T05:23:46Z")

</div>

Hello,

I would like to convert a QuadMesh object to a SubD in Rhino using RhinoCommon, but I want to avoid using [rs.Command(“\_ToSubD”)] or any command-line calls.

In the GUI, I usually use \_ToSubD with the following options:

- Mesh Use = Control Points
- Mesh Crease = Yes
- Mesh Edge = Yes
- Surface Use = Position
- Surface Edge = No

However, RhinoCommon’s SubDCreationOptions exposes different parameters, and I’m not sure how to set them to match the GUI options above.

Is there a way to achieve the same result as \_ToSubD with these options using only RhinoCommon?  
Or is there another function in RhinoCommon that uses the exact same parameters as \_ToSubD?

Either approach would be a solution for me.

Additionally, when using Rhino.Geometry.Mesh.QuadRemesh() to remesh to a quad mesh, is there a way to directly convert the result to SubD as in the GUI, without using command macros?

Any advice or code examples would be greatly appreciated. Thank you!

---

<div class="post-metadata">

**Author:** ![dale](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/dale/32/685184_2.png) [@dale](https://discourse.mcneel.com/u/dale)\
**Post date:** [June 26, 2025, 3:45pm UTC](https://discourse.mcneel.com/t/how-to-convert-quadmesh-to-subd-in-rhinocommon-likewise-tosubd-in-gui/206402/2 "2025-06-26T15:45:51Z")

</div>

Hi @Young_Geon_Park,

Try using [SubD.CreateFromMesh](https://developer.rhino3d.com/api/rhinocommon/rhino.geometry.subd/createfrommesh).

– Dale

---

<div class="post-metadata">

**Author:** ![Young\_Geon\_Park](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/young_geon_park/32/676667_2.png) [@Young\_Geon\_Park](https://discourse.mcneel.com/u/Young_Geon_Park)\
**Post date:** [June 27, 2025, 3:45am UTC](https://discourse.mcneel.com/t/how-to-convert-quadmesh-to-subd-in-rhinocommon-likewise-tosubd-in-gui/206402/3 "2025-06-27T03:45:26Z")

</div>

Hello,  
Thanks to your reply.

I know that by using the command in rhinocommon to convert mesh into SubD, but i have a problem with the params.

There are a few params to control the conversion, but it is different with GUI command \_ToSubD, so i wonder how to convert as same as the GUI command.

Thanks

---

<div class="post-metadata">

**Author:** ![dale](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/dale/32/685184_2.png) [@dale](https://discourse.mcneel.com/u/dale)\
**Post date:** [June 27, 2025, 7:38pm UTC](https://discourse.mcneel.com/t/how-to-convert-quadmesh-to-subd-in-rhinocommon-likewise-tosubd-in-gui/206402/4 "2025-06-27T19:38:23Z")

</div>

Hi @Young_Geon_Park,

For meshes, this should be all you need:

```py
#! python 3
import Rhino

def GetSubDCreationOptions(UseMesh, MeshCreases, MeshCorners):

    options = Rhino.Geometry.SubDCreationOptions.Smooth

    # True = ControlPoints, False = Location
    options.InterpolateMeshVertices = UseMesh
    
    if MeshCreases:
        options.InteriorCreaseTest = Rhino.Geometry.SubDCreationOptions.InteriorCreaseOption.AtMeshDoubleEdge
    else:
        options.InteriorCreaseTest = Rhino.Geometry.SubDCreationOptions.InteriorCreaseOption.NONE

    if MeshCorners:
        options.ConvexCornerTest = Rhino.Geometry.SubDCreationOptions.ConvexCornerOption.AtMeshCorner 
    else:
        options.ConvexCornerTest = Rhino.Geometry.SubDCreationOptions.ConvexCornerOption.NONE

    return options

```

– Dale
