hi i created script c# for set XYZ Size of Texture Material(and we can bake that object with Material in Rhino by siz) but output for bake only== Mesh ! and i need bake it for example Brep Surface ,…(According to the input geometry)
Any suggestions or any C# Api? Because I didn’t find any Api for Brep or Surface Like Mesh
mesh.TextureCoordinates(textureMapping);
private void RunScript(Mesh mesh, Box box, string path, double tr, ref object MeshMap, ref object Material)
{
Component.Name = "Texture Maping,Matrial";
if(Component.Params.Input[1].VolatileDataCount != 0 && mesh != null){
var textu = TextureMapping.CreateBoxMapping(box.Plane, box.X, box.Y, box.Z, true);
mesh.TextureCoordinates.SetTextureCoordinates(textu);
MeshMap = mesh;}
Material mat = new Material();
if (path != null)
{
mat.SetBitmapTexture(path);
mat.Transparency = tr;
}
var m = RenderMaterial.CreateBasicMaterial(mat, RhinoDoc.ActiveDoc);
Material = new GH_Material(m);
}
texture mapping.zip (205.0 KB)
2 posts - 2 participants