OpenJSCAD.org icon indicating copy to clipboard operation
OpenJSCAD.org copied to clipboard

hull with a single unconvex solid

Open her01n opened this issue 1 year ago • 0 comments

Expected Behavior

hull(solid) returns a convex hull of solid.

Actual Behavior

hull(solid) returns the argument solid even when it is not convex.

Steps to Reproduce the Problem

    const { torus } = require('@jscad/modeling').primitives
    const { hull } = require('@jscad/modeling').hulls
    
    const main = () => {
        return hull(torus())
    }
    
    module.exports = { main }

Running this code produces a torus.

Workaround

Repeat the solid to get the correct behavior, for example:

    const { torus } = require('@jscad/modeling').primitives
    const { hull } = require('@jscad/modeling').hulls
    
    const main = () => {
        return hull(torus(), torus())
    }
    
    module.exports = { main }

Specifications

  • Version: JSCAD V2.6.7
  • Platform: tested on https://openjscad.xyz/ web site
  • Environment: Firefox 128.0.2

her01n avatar Jul 26 '24 07:07 her01n