-
Hi, I am using OpenJSCAD programmatically. It works fine 90% of the time, but there seem to be some bugs in edge cases. In order to report the bugs, I am trying to minimise the test cases. And for that, I am trying to remove a few steps from the code. My current code is along these lines:
I want to eliminate step 2, since a known bug is present in extrusion (#907) If I don't do step 2 (extrusion), the viewer doesn't show anything on screen. Is it possible to show the 2D geometry directly? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
@t1u1 welcome i wouldn't worry about #907 as that's a very complex edge case. you probably won't have any issues with extrudeLinear() the simplest viewer can be found in the regl_renderer directory, called demo.hmtl that should get you going |
Beta Was this translation helpful? Give feedback.
-
@t1u1 yes you can. just return that 2d primitive from main const jscad = require('@jscad/modeling')
const { circle } = jscad.primitives
const main = ()=>{
return circle({radius: 15})
}
module.exports = {main} |
Beta Was this translation helpful? Give feedback.
-
OK, I figured out what was missing in my renderer: the drawLines command! Rendering of 2D primitives is now working! Thanks for the help @hrgdavor @z3dev I can now try to isolate the boolean bugs from the extrusion bugs. |
Beta Was this translation helpful? Give feedback.
@t1u1 welcome
i wouldn't worry about #907 as that's a very complex edge case. you probably won't have any issues with extrudeLinear()
the simplest viewer can be found in the regl_renderer directory, called demo.hmtl
that should get you going