Code Monkey home page Code Monkey logo

Comments (12)

z3dev avatar z3dev commented on September 23, 2024

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.

from csg.js.

 avatar commented on September 23, 2024

Thanks, I will keep that in mind.

from csg.js.

z3dev avatar z3dev commented on September 23, 2024

@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.

from csg.js.

 avatar commented on September 23, 2024

@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.

from csg.js.

z3dev avatar z3dev commented on September 23, 2024

@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.

from csg.js.

 avatar commented on September 23, 2024

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...

from csg.js.

z3dev avatar z3dev commented on September 23, 2024

@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.

from csg.js.

 avatar commented on September 23, 2024

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!

from csg.js.

z3dev avatar z3dev commented on September 23, 2024

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! :)

from csg.js.

 avatar commented on September 23, 2024

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 ;)

from csg.js.

z3dev avatar z3dev commented on September 23, 2024

Should be there... here's the list of published packages.

Successfully published:

from csg.js.

 avatar commented on September 23, 2024

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.

from csg.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.