JSCAD User Group

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

    Passing multiple solids to entitiesFromSolids

    Development Discussions
    2
    3
    429
    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.
    • BarbourSmith
      BarbourSmith last edited by

      Hello everyone,

      I have been playing around with the built in render and using the entitiesFromSolids function. Thank you devs for kindly including that package!

      I believe the source for the function can be found here: https://github.com/jscad/OpenJSCAD.org/blob/V2/packages/utils/regl-renderer/src/geometry-utils/entitiesFromSolids.js

      I'm having trouble with understanding how to pass multiple solids. I can union them together and get that to display no problem, but my reading of the function is that it should support passing multiple solids at the same time which would be faster for me.

      Can anyone confirm that multiple solids can be passed and if so point me to how to do it?

      1 Reply Last reply Reply Quote 0
      • BarbourSmith
        BarbourSmith last edited by

        Thank you so much!

        Honestly looking at it now I don't see how I didn't understand how it worked. Union takes an array of solids so that would make the most sense. Thanks!

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

          Be careful.. there are V1 and V2 versions of the conversion routines. And only V2 is being tested.

          geometry-utils
          geometry-utils-V2
          

          I see the confusion. The entitiesFromSolids function is not well documented. 😞
          The function signiture is:

          const entitiesFromSolids = (params, solids)
          

          And solids must be a single V2 geometry or an array of V2 geometry.

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