JSCAD User Group

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Multicolor (by faces) model

    Comments & Feedback
    2
    3
    1798
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • gilboonet
      gilboonet last edited by gilboonet

      Hello, i'm still working on improving my unflatten script, and the latest improvement I'm working on is a convenient way to specify separated spaces on a model. OBJ format can save a model with faces of different materials, so I adapt my Stl2Jscad nodejs script to obj. Here is an example using it :
      https://github.com/gilboonet/auto_flattener/tree/master/testOBJ

      To show the example into openjscad.org there's some work to do :

      • copy the directory and open it,
      • run node obj2jscad montage2 on the cli, that will create the file "modele_obj.jscad",
      • open openjscad.org and drag "modele_obj.jscad" and "testOBJ.jscad"

      You can then, easily modify the model colors (I do it with Wings 3D and what is important is not the colors but the materials), save the obj file, run obj2jscad on it again, and refresh jscad script.

      I'm not certain that lots of people need multicolor models but I hope that that idea could be useful.
      0_1557258094010_Capture d’écran de 2019-05-07 21-17-32.png

      z3dev 1 Reply Last reply Reply Quote 0
      • gilboonet
        gilboonet last edited by

        My code (obj2jscad) only reads a very simple OBJ file (only triangular without normals or textures) and take use of its facets materials groups. Materials are described into another file that I don't use but it could be done to read colors as materials simplest expression can be colors. True OBJ format is much more complex than that.

        1 Reply Last reply Reply Quote 0
        • z3dev
          z3dev @gilboonet last edited by z3dev

          @gilboonet Cool innovations!

          Colors are becoming very important with the growing number of multiple head/filament printers. The slicing software requires different colors when deciding on the filament to use.

          It would be nice to add the support for colors (materials?) into the OBJ import/export library. I'll chat with you later when revisiting the OBJ libraries.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Powered by NodeBB | Contributors