nrdvana / delorean-cad

Various models of components of the DeLorean
0 stars 0 forks source link

some files don't work in openscad #1

Open wt opened 3 years ago

wt commented 3 years ago

I was playing with your cad files. I noticed that the following files don't render in openscad:

nrdvana commented 3 years ago

dash_vent and dash_mount both use an extrude feature that I added to openscad, but didn't get merged yet and is currently kind of stalled. When I published these, I thought the feature would be available to the public soon enough.

In dash_vent, I actually wrote it both with and without my extrude feature, but the normal rotate_extrude was giving me problems in that particular case. if you wanted to help rewrite the extrude() using existing openscad features, I'd accept a pull request.

Or, if you want a version of openscad with extrude() support, I can help.

wt commented 3 years ago

What does extrude do differently? Maybe just helping me understand it works help me figure out how to do something different?

Also, do you have your extrude-enabled version of openscad on GitHub?

Wren Turkal You're more amazing than you think! ymatyt.com

On Sun, Jun 27, 2021, 23:27 M Conrad @.***> wrote:

dash_vent and dash_mount both use an extrude feature that I added to openscad, but didn't get merged yet https://github.com/openscad/openscad/pull/2796 and is currently kind of stalled. When I published these, I thought the feature would be available to the public soon enough.

In dash_vent, I actually wrote it both with and without https://github.com/nrdvana/delorean-cad/blob/master/dash_vent.scad#L152-L159 my extrude feature, but the normal rotate_extrude was giving me problems in that particular case. if you wanted to help rewrite the extrude() using existing openscad features, I'd accept a pull request.

Or, if you want a version of openscad with extrude() support, I can help.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nrdvana/delorean-cad/issues/1#issuecomment-869397380, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADFT7YY2MQVW2LIIQKL7ULTVAI5HANCNFSM47NGAPBA .

nrdvana commented 3 years ago

OpenSCAD comes with a "rotate_extrude" and "linear_extrude", where you give it one single shape (2D polygons) and it takes that 2D shape and repeats it along a line or around an axis. It creates a 3D solid by connecting the dots between the 2D slice at each iteration.

The limitations with those are that you can only progress along a line or around an axis, and also that the 2D shape is identical size/shape at every iteration. I wanted a more general-purpose extrude, where the shape can change however you like at each iteration, so long as the number of vertices is the same. This is really just a shorthand for generating a whole bunch of points and connecting them together into a whole bunch of polygons.

The dashboard vent actually is a rotational extrude around an axis, but (I forget exactly) there was some bug I triggered. When I switched it to my own extrude it worked. The dashboard_mount is really just a whole bunch of points and I was using extrude as an easy way to connect them. That could be rewritten as a whole bunch of polygons. (maybe using a scripting language to generate them?)

If you're up for compiling a custom OpenSCAD, you can checkout my branch at https://github.com/nrdvana/openscad/tree/extrude_for and follow the OpenSCAD build instructions. If you happen to be running Linux Mint, I can just send you my openscad binary.

wt commented 3 years ago

I'm running on fedora, so I will checkout your branch. I am wondering if converting these to a freecad drawing (maybe a step file) might be better. Using openscad in freecad probably will not be great as you would lose all the constraint info you captured.