Hi,
Is it possible to apply texture mapping to surfaces?
For meshes there is something like this in RhinoCommon:
mesh.TextureCoordinates.SetTextureCoordinates(Mapping);
Is there similar thingy for breps/surfaces?
I tried this
private void RunScript(Guid x, Brep y, Plane p, ref object A)
{
Rhino.Render.TextureMapping textureMapping = Rhino.Render.TextureMapping.CreatePlaneMapping(p, new Interval(-400, 400), new Interval(-400, 400), new Interval(0, 1));
Rhino.DocObjects.Tables.ObjectTable.ModifyTextureMapping(x, 1, textureMapping);
}
http://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_DocObject…
But I get error:
Error (CS0120): An object reference is required for the non-static field, method, or property ‘Rhino.DocObjects.Tables.ObjectTable.ModifyTextureMapping(System.Guid, int, Rhino.Render.TextureMapping)’ (line 74)
What does this error mean?