# Tag Info

Accepted

### How to prevent z-fighting in OpenSCAD?

The general advice in the OpenSCAD community is to "extend your cuts and embed your joins" (source). The rendering artifacts are one thing but rather just an annoyance; however z-fighting can also ...
• 303
Accepted

### Why is 2 / -2 / 2 equal to -2 in OpenSCAD? (Mathematical Order of Operations)

I suspect the behavior you are seeing is an undocumented feature (aka, bug) of OpenSCAD. I've found in the latest stable release that if the - is placed on either end, the result is -0.5, but in the ...
• 9,792
Accepted

### OpenSCAD can't render union of two polyhedrons, but can preview just fine

This is a case of "Mis-ordered faces". That means the order in which the vertices making up one or more faces aren't in the correct order. The vertices of a face should be listed in ...
• 141

### Is there an easy way to split models in OpenSCAD?

Rather than differencing a copy of the object from itself, which is subject to numerical instability, choose a box ("cube" in OpenSCAD terminology), and intersect it with one copy of the object, then ...

### OpenSCAD library for empty space/holes

I'm not aware of libraries that do that for you (but you can create your own, see end of the answer), but creating a relieve hole pattern is not that difficult or tedious using iterator functions (e.g....
• 30.3k

### Can the render function be used to speed up rendering?

First a disclaimer: I am far from an expert on the subject, I'm just a regular Joe who happens to use OpenSCAD and have done some experimentation with it. I believe the answer below to be correct, ...
• 4,537

### Are there any "best" or at least "common" practices to handle allowances in OpenSCAD code?

It helps to understand the different aspects of dimensions, so you can use the terminology correctly. This will help you define your variables in OpenSCAD with correct names. (Tolerance is the wrong ...
• 173

### OpenSCAD weirdness with imported STL

I see you've accepted cmm's answer, but I'd still like to take a stab at the mechanism of the failure based on your comment on it: Excellent explanation, thanks. The "WTH" cylinder is centered on ...

### Why is 2 / -2 / 2 equal to -2 in OpenSCAD? (Mathematical Order of Operations)

I filed this issue as a bug with the OpenSCAD project, and there is now a fix merged into master, as well as a test case to prevent regression. The latest nightly builds should handle this correctly ...
• 1,905
Accepted

Usually when there's an overlap in two objects during a difference action, F6 render will resolve the problem. There's something more than that involved here, as reducing the height of the cube ...
• 9,792

### OpenSCAD linear_extrude from multiple path svg import

Lame solution: creating stepped pyramid with offset. I realized that scale will not worked for motives with holes inside. Offset seems then more appropriate than scale for my application (creation of ...
• 171

### Spiral bevel gears in OpenSCAD

I read this question a few months ago, and thought I knew what you wanted. Re-reading it now confuses me a little. But, I think you may be asking for a large, flat surface with a spiral in it, like ...
• 4,398

### OpenSCAD "not valid 2-manifold" useful information

Occasionally, a model created in OpenSCAD will have, as you suggest, overlapping segments. Often enough, this will generate the message you receive. OpenSCAD has an implied union function when it ...
• 9,792

You can specify variable values from command line using: openscad ...\ ... \ [ -D var=val [..] ] \ ... \ ... \ filename See the ...
• 31
Accepted

### Is there a technique for turning an image into a 2d model?

As you are already familiar with OpenSCAD, consider to use the projection() function to accomplish your goal. If you allow for an interpretation that one can cast a shadow of the part on a surface ...
• 9,792
Accepted

### How to remove internal part of a hex grid

I ended up finding a reasonable solution myself: Basically, I diffed two identical, non-hollow geometries, in which the first one had the cells larger than they needed to be (so overlapping with ...
• 4,537
Accepted

### Why does OpenSCAD fail to cut holes in polygon sides that are exactly the width of the wall?

openSCAD simply allows having surface solutions that result in a wall of 0 thickness. The walls appear to clip in those areas and can at times be seen from both sides, like in your example: A 0 ...
• 19.2k

### Are there any "best" or at least "common" practices to handle allowances in OpenSCAD code?

I’m not aware of a standard in Openscad but I can share what I have done in the past. ...
• 106

### Is there a technique for turning an image into a 2d model?

Two options: Use TRACE2SCAD (http://aggregate.org/MAKE/TRACE2SCAD) For the more adventurous: Dig up the old pull-request for the suggested ...
• 141

### How to specify rotation origin in openscad

rotate() always rotates around the origin of the object following it. What you can do is to move your cylinder away from the origin, like this: ...
• 141
Accepted

I could finally solve the issue. Calling openscad from command line with parameters does NOT work with the AppImage I used. It works fine with a "standard" ...

### Find OpenSCAD code from image

To my knowledge, OpenSCAD does not have any such feature. However, a related feature might help you: the debugging aid modifier characters. By inserting %, ...

### Is it possible extrude faces along normals individually in OpenSCAD?

Extruding faces is only possible on 2D polygons. From a 3D object you cannot capture the face and extrude it. To extrude "faces" you would need to define the shape of the face and extend it in the ...
• 30.3k
Accepted

### Creating a two part label for storage boxes

In OpenSCAD, apply the offset transformation to inset the letter outlines before extruding them. However you may find it works better to fill the sunken letter ...
Accepted

### Handing OpenSCAD module parameters derived from other variables

This seems to be a limitation of the language. One workaround that's only moderately ugly is, in the body of the module: ...

### Is it possible extrude faces along normals individually in OpenSCAD?

For extruding a single face, as long as you can know the plane the face is in, you can projection it to a 2D shape then ...
Accepted

Even though OpenSCAD can import a variety of formats, the file structure will not be accepted by Thingiverse in the manner presented by the OP. OpenSCAD is a text-based description language. One ...
• 9,792

OpenSCAD lacks any facilities to perform computations on the resulting geometry (derived from CSG or directly imported). It has a decent functional language for expressing geometry in terms of ...