Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use Emacs-SCAD in org-babel mode? #4

Open
philipsd6 opened this issue Aug 16, 2023 · 1 comment
Open

How to use Emacs-SCAD in org-babel mode? #4

philipsd6 opened this issue Aug 16, 2023 · 1 comment

Comments

@philipsd6
Copy link

I can't figure out why the Org Babel method isn't working for me. I've got an org document containing:

* Testing SCAD
#+name: cube
#+begin_src scad :results file :file-ext scad
cube([8,8,8]);
#+end_src

If I execute that block with C-c C-c I see Code block evaluation complete. in the minibuffer and I get:

#+RESULTS: cube
[[file:cube.scad]]

But the cube.scad buffer is empty. If I tangle the whole file with C-c C-v C-t I see Tangled 0 code blocks from testing.org.

Additionally, since a Scad code block requires :file header argument it's unclear how I can iteratively build up a SCAD file. I'm used to doing literate coding with org-babel, where I expect to have commentary about what I'm doing as I create each part going into the design. Each block would either overwrite the file or be a separate file, right?

@minad
Copy link
Member

minad commented Aug 25, 2023

Hi, the README contains the following example:

#+begin_src scad :file example.png :colorscheme Tomorrow :size 200,200
  for (y=[0:2:20]) {
      translate([0,0,y+1])
          cube([30-2*y,30-2*y,2], true);
  }
#+end_src

When evaluating this block it will render the model and display the png. Right now the support is only basic.

If I tangle the whole file with C-c C-v C-t I see Tangled 0 code blocks from testing.org.

I am not really familiar with tangling, so I am not sure about the expected result.

Additionally, since a Scad code block requires :file header argument it's unclear how I can iteratively build up a SCAD file.

Afaik this is currently not supported. But patches adding such an iterative block feature are welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants