Color lost in translation (or any operation)
-
I'm seeing some behavior which is different from what I would expect. My solids are losing their color when they are translated or operated on in any other way (ie booleans).
Is this the desired behavior? I remember V1 working differently and I would advocate for solids holding their color through operations.
Here's a quick example which shows the behavior in jscad.xyz
const jscad = require('@jscad/modeling') const { colorize, colorNameToRgb } = jscad.colors const { sphere } = jscad.primitives const { translate } = jscad.transforms const main = () => { const colorSphere = colorize(colorNameToRgb('red'), sphere()) const translatedSphere = translate([5, 0, 0], colorSphere) return [ colorSphere, translatedSphere ] } module.exports = { main }I would expect to see two red spheres, but instead I see:

Is this a bug?
-
@BarbourSmith well... let's call it a feature of V2.
colors should be added as the last step, after all operations are completed.
-
@BarbourSmith there's an open issue about this as well.
-
Thanks! I'll give it a comment of support there

Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login