# QuadRemesher

**URL:** <https://discourse.mcneel.com/t/quadremesher/94739>\
**Category:** Rhino Developer\
**Tags:** quad-remesh\
**Created:** [January 14, 2020, 11:54am UTC](https://discourse.mcneel.com/t/quadremesher/94739 "2020-01-14T11:54:59Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![kostadin](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/kostadin/32/698210_2.png) [@kostadin](https://discourse.mcneel.com/u/kostadin)\
**Post date:** [January 14, 2020, 11:54am UTC](https://discourse.mcneel.com/t/quadremesher/94739/1 "2020-01-14T11:54:59Z")

</div>

Is there a way to use the new Quad Remesher which is available in Rhino 7 through API or scripting? I tried \_QuadRemesh, but it brings dialog.  
Can I provide the parameters in the script line and not have the dialog?

---

<div class="post-metadata">

**Author:** ![RIL](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/ril/32/477371_2.png) [@RIL](https://discourse.mcneel.com/u/RIL)\
**Post date:** [January 14, 2020, 12:10pm UTC](https://discourse.mcneel.com/t/quadremesher/94739/2 "2020-01-14T12:10:36Z")

</div>

Would `Mesh.Faces.ConvertTrianglesToQuads(...)` do the job for you?

[https://developer.rhino3d.com/api/RhinoCommon/html/M\_Rhino\_Geometry\_Collections\_MeshFaceList\_ConvertTrianglesToQuads.htm](https://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_Geometry_Collections_MeshFaceList_ConvertTrianglesToQuads.htm)

# MeshFaceList.ConvertTrianglesToQuads Method

_Joins adjacent triangles into quads if the resulting quad is ‘nice’._

```auto
public bool ConvertTrianglesToQuads( 
   double angleToleranceRadians, 
   double minimumDiagonalLengthRatio 
)

```

// Rolf

---

<div class="post-metadata">

**Author:** ![Jess](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/jess/32/765132_2.png) [@Jess](https://discourse.mcneel.com/u/Jess)\
**Post date:** [January 14, 2020, 12:26pm UTC](https://discourse.mcneel.com/t/quadremesher/94739/3 "2020-01-14T12:26:46Z")

</div>

> [@kostadin](#):
>
> Is there a way to use the new Quad Remesher which is available in Rhino 7 through API

Yes, in RhinoCommon: [https://developer.rhino3d.com/wip/api/RhinoCommon/html/Overload\_Rhino\_Geometry\_Mesh\_QuadRemesh.htm](https://developer.rhino3d.com/wip/api/RhinoCommon/html/Overload_Rhino_Geometry_Mesh_QuadRemesh.htm)

> [@kostadin](#):
>
> Can I provide the parameters in the script line and not have the dialog?

If you want to use the -\_QuadRemesh command with a macro then prefix the command with a hyphen “-” to suppress the dialog box.

---

<div class="post-metadata">

**Author:** ![kostadin](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/kostadin/32/698210_2.png) [@kostadin](https://discourse.mcneel.com/u/kostadin)\
**Post date:** [January 14, 2020, 12:34pm UTC](https://discourse.mcneel.com/t/quadremesher/94739/4 "2020-01-14T12:34:07Z")

</div>

This is may be what I want, but do you have also a C++ example? I am using the RhinoSDK with C++ only.

---

<div class="post-metadata">

**Author:** ![Jess](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/jess/32/765132_2.png) [@Jess](https://discourse.mcneel.com/u/Jess)\
**Post date:** [January 14, 2020, 1:25pm UTC](https://discourse.mcneel.com/t/quadremesher/94739/5 "2020-01-14T13:25:14Z")

</div>

Looks like it is not (yet) in the C++ API: [https://developer.rhino3d.com/wip/api/cpp/](https://developer.rhino3d.com/wip/api/cpp/)

You may script the command from C++ like explained here:

> **[Running Rhino Commands from Plugins](https://developer.rhino3d.com/guides/cpp/running-rhino-commands-from-plugins/)**
>
> This guide discusses the proper techniques to use when running a Rhino command from within the context of a C/C++ plugin command.

---

<div class="post-metadata">

**Author:** ![Trav](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/trav/32/681734_2.png) [@Trav](https://discourse.mcneel.com/u/Trav)\
**Post date:** [January 14, 2020, 5:32pm UTC](https://discourse.mcneel.com/t/quadremesher/94739/6 "2020-01-14T17:32:46Z")

</div>

In response to your similar question here.

> [@About the Quad Remesh category](https://discourse.mcneel.com/t/about-the-quad-remesh-category/85592/4):
>
> Can you make QuadRemesh command accessible for developers, i.e. be able to call it through the API with my parameters or through the scripting \_QuadRemesh

---

<div class="post-metadata">

**Author:** ![ucbqeor](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/ucbqeor/32/371228_2.png) [@ucbqeor](https://discourse.mcneel.com/u/ucbqeor)\
**Post date:** [August 15, 2021, 7:51pm UTC](https://discourse.mcneel.com/t/quadremesher/94739/7 "2021-08-15T19:51:39Z")

</div>

Hey, I need to use this, but the results don’t seem correct. Could you see if I am doing something wrong? I am only interested in adjacency and coplanarity (the quad diagonals ratio doesn’t concern me).[inaccurateResults.gh](https://discourse.mcneel.com/uploads/short-url/nd3yV36gAIjPefxJOQPUORiYJ7X.gh) (14.1 KB)

---

<div class="post-metadata">

**Author:** ![DanielPiker](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/danielpiker/32/666337_2.png) [@DanielPiker](https://discourse.mcneel.com/u/DanielPiker)\
**Post date:** [August 15, 2021, 8:07pm UTC](https://discourse.mcneel.com/t/quadremesher/94739/8 "2021-08-15T20:07:05Z")

</div>

The script from here might help you:

> [@Best way to create a Vis Sim type polygonal model... like 3Dstudio or Maya](https://discourse.mcneel.com/t/best-way-to-create-a-vis-sim-type-polygonal-model-like-3dstudio-or-maya/122786/9):
>
> If you don’t mind going into Grasshopper, here’s a script I made a while back for this: [quadrangulate\_more.gh](https://discourse.mcneel.com/uploads/short-url/inLhttJTcwPHG0X8QutfQVoKnc6.gh) (12.1 KB) which gives this for your mesh:

---

<div class="post-metadata">

**Author:** ![ucbqeor](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/ucbqeor/32/371228_2.png) [@ucbqeor](https://discourse.mcneel.com/u/ucbqeor)\
**Post date:** [August 15, 2021, 9:46pm UTC](https://discourse.mcneel.com/t/quadremesher/94739/9 "2021-08-15T21:46:35Z")

</div>

Thank you!

---

<div class="post-metadata">

**Author:** ![HEEN](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/heen/32/285215_2.png) [@HEEN](https://discourse.mcneel.com/u/HEEN)\
**Post date:** [June 24, 2022, 5:15pm UTC](https://discourse.mcneel.com/t/quadremesher/94739/10 "2022-06-24T17:15:14Z")

</div>

there is an upgraded version? complex meshes have a little issues, I understand can´t be perfect i just want to know if there is an improved script
