jimy-byerley / pymadcad

Simple yet powerful CAD (Computer Aided Design) library, written with Python.
https://madcad.netlify.app/
GNU Lesser General Public License v3.0
205 stars 15 forks source link

How to add color to each vertex? #97

Closed JeffreyWardman closed 7 months ago

JeffreyWardman commented 7 months ago

I want to be able to store the RGB/RGBA information in the mesh so I can either display it via madcad.show() or via another library. I want to ensure that the RGB/RGBA information is extended to other points, e.g. after madcad.thicken(mesh).

Is this possible? If stored as an option, would it be manipulated as well?

jimy-byerley commented 7 months ago

Hello, sorry for the answering delay

My answer will be disappointing: there is no way to keep such per-vertex information in madcad meshes, Mesh.options is just data associated to the mesh but its content is not processed by mesh manipulation functions If you have to keep such information along with the meshes, you will have to do it by hand ... :-/