# Quadremesh acting strange?

Hi all,

I’ve set up a method to make a quadmesh based on a outline and i’m running into a strange problem I think.
First of all the method which doesnt give me a quadremesh but a null but seems to me logical:

``````int pointCount = Convert.ToInt32(System.Math.Floor(offset[0].GetLength()))/2;
NurbsCurve offsetToPolyline = offset[0].Rebuild(pointCount, 1, false);
if (offsetToPolyline.TryGetPolyline(out Polyline feetureInsoleBorder))
{
Mesh OutlineMesh = Mesh.CreateFromClosedPolyline(feetureInsoleBorder);
}
``````

Second because i was debugging i added RhinoDoc.ActiveDoc.Objects.AddMesh(OutlineMesh);
When i bake the mesh to the document the quadremesh is working…

``````int pointCount = Convert.ToInt32(System.Math.Floor(offset[0].GetLength()))/2;
NurbsCurve offsetToPolyline = offset[0].Rebuild(pointCount, 1, false);
if (offsetToPolyline.TryGetPolyline(out Polyline feetureInsoleBorder))
{
Mesh OutlineMesh = Mesh.CreateFromClosedPolyline(feetureInsoleBorder);
}
``````

Any ideas why this happening?
Should i do something with the Mesh before i quadremesh?

kind regards Reinder

It sounds like you need to compute some normals for your input mesh first, then pass it to QuadRemesh.

The normals are being computed when your mesh gets added to the doc. Thus the difference.

Hey Travis.

Thanks for your reply. Indeed is computing normals the solution for this problem.

kind regards reinder

1 Like