Haskell-Things / Haskell-Things/ImplicitCAD

Integration of ImplicitCAD in ExplicitCAD

Open
#277 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.6k
Forks
148
PR merge metrics
No merged PRs in 30d

Description

In the spirit of not hijacking issues anymore I opened a new issue, because I'm actually a bit unhappy with the current interface between ExplicitCAD and openextcad/ImplicitCAD.

I just compiled implicitsnap, after figuring out it is not a snap-archived (https://snapcraft.io/) version of extopenscad ;) I knew about the online-viewer on implicitcad.org, but I forgot it was named snap.

I'm not much of (ok, not at all) a haskell programmer (altough I like that smileys are apparently valid haskell code), so I have a couple of questions:

(1) I want - at least in the long run - support OpenSCAD-style `#`, i.e. the following object(s) become transparent. This doesn't has to be the `#`-character, since it is used for comments in extopenscad. I like the feature for debugging as it makes invisible objects (for example inside a difference()) visible, and hence debugable. I often mess up a direction when translating an object, or an axis when rotating it, so seeing the difference between what I think I programmed and the compiled & rendered output let's me fix this stuff real easy.

As for implementation two ideas come to my mind: First, this can of course be implemented in extopenscad as first-class primitive. The downsides are that `#` already has the meaning for comments, it makes the renderer/parser more difficult, and ~~I don't know if output format such as STL even have the ability to attach something like attributes to objects~~ apparently it doesn't but OBJ does.
Second, this can be implemented inside the viewer, i.e. ExplicitCAD. The downsides are that ExplicitCAD has to implement at least a rudimentary parser to find the end of `#` - probably the matching semicolon. Additionally ExplicitCAD has to overlay the resulting STLs i.e. parse all transformations up the root of the document. Still, I like the second version better, since this allows me to implement color, etc too. Maybe I can re-use the parser from ImplicitCAD for that?

(2) 2D-preview - I tried previewing 2D objects with ExplicitCAD and it complained about empty STLs. Which makes sense :) The previewer on implicitcad.org handles this case. I think it gives 2D objects just a little z-height, so they become 3D objects. Is this done inside the editor or inside implicitsnap/extopenscad/implicitcad?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.