Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TextureMapping for non-Meshes #648

Open
cedemax opened this issue Oct 17, 2024 · 4 comments
Open

TextureMapping for non-Meshes #648

cedemax opened this issue Oct 17, 2024 · 4 comments

Comments

@cedemax
Copy link

cedemax commented Oct 17, 2024

It seems that there is no way to assign texture mapping to non-Meshes like NURBS or Polysurfaces. It is possible to assign a material to these, but not texture mapping.

Is this something that could be added?

@fraguada
Copy link
Member

@cedemax are you using js, py, or dotnet?nCan you provide an example of something that isn't working?

@cedemax
Copy link
Author

cedemax commented Nov 27, 2024

We are using dotnet. More detail:

// We can add UVs like this to a mesh
var rMesh = new Rhino.Geometry.Mesh();
....
rMesh.TextureCoordinates.Add(...);

// but for Breps there seems to be nothing

var brep = new Rhino.Geometry.Brep();
....

brep.TextureMapping ?? 
brepFace.TextureCoordinates ??
brepTrimCurve.TextureCoordinates ??

// There are things like:
var texMap = TextureMapping.CreatePlaneMapping(...);
// but these can't seem to be applied to Breps.

It seems to work fine in the Rhino UI, so I expect it should be possible also in here?

@fraguada
Copy link
Member

Thanks. I see the method we use for Rhino, I see we don't have an analog for rhino3dm. At first glance I don't see anything that would stop us from adding this in rhino3dm. Let me check with the team.

@cedemax
Copy link
Author

cedemax commented Nov 27, 2024

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants