Closed bitbybit-dev closed 3 years ago
Correct. Colors are not transferred, and apply only to the geometry as a whole.
When using V2, be sure to set color as the last step, after applying other operations.
Thanks, I will keep that in mind.
@bitbybit-dev thanks again.
just one more tip... a design can return one or more geometries. many of the export formats (like DXF) will convert each geometry into appropriate objects. so, your design can choose to combine everything into ONE BIG GEOMETRY, or return a bunch of little geometries. it just depends on what you want to do with it.
@z3dev also thanks for fast reply and suggestions!
I sort of imagined that coloured 3D printers would use this info from V1 when printing single mesh, but saving multiple objects with different colours before going to 3D print probably is also ok. My experience in that is a bit limited. In any case, users of my platform will need to make this choice themselves, I am exposing csg as it is and so far it works really well.
@bitbybit-dev nice feedback. keep in touch and let us know if there are any issues. i would expect a few in V2. ;)
fyi, i discussed color prints with Mr. Prusa at Makers Faire Tokyo. (We had a great discussion). For multi-color prints, each part must be seperate, and have a unique color. The Prusa slicer uses that information to activate the nozzle (color), and create the multi-color print. P.S. His file format of choice is 3MF, which is coming in JSCAD.
That sounds great! I will follow the development of 3MF integration then. I get that V2 can be a bit unstable, but I like the API choices you've made and unit tests make a big difference :) I'll be testing csg quite extensively through https://bitbybit.dev UI, if something comes up I'll let you know. Prusa slicer looks great, I was only familiar with Cura...
@bitbybit-dev oh... by the way, this library is now part of OpenJSCAD.org repository, and known as the 'modeling' package. you should be working with that repository now, as this one (CSG.js) is no longer maintained.
Ah :) That is some very valuable information, had an idea that csg.js was part of OpenJSCAD.org as it was not marked deprecated. Last commit was suspiciously old indeed... I will clone it through OpenJSCAD.org then and use modeling package. Thanks!
Excellent. Here's a starting point...
https://openjscad.org/dokuwiki/doku.php?id=early_v2
FYI, you can also find the @jscad/modeling library on NPM. It was published today! :)
Haha, that's some top-notch support. NPM package will be very helpful as I only need that part at this moment, thanks! Its probably not the best place to throw these questions, but if it is possible to publish io package to npm that would be awesome as well ;)
Should be there... here's the list of published packages.
Successfully published:
OK, amazing @z3dev, thanks a lot for all the help here! I have everything I need to continue ;) And it all started with colors... Now I just need to code it out.
Great work on the library. If I understand it correctly in V1 API after applying boolean operations colour data was transferred further down the chain and existed as a property on each polygon. In V2 I see that applying booleans on coloured meshes returns objects that 'forget' about original colour. Is there some way to force that in V2? Thank you.