11
votes
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 ...
8
votes
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 ...
8
votes
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 ...
5
votes
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 ...
5
votes
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....
5
votes
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, ...
5
votes
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 ...
4
votes
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 ...
4
votes
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 ...
4
votes
Accepted
OpenSCAD not rendering polyhedron
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 ...
4
votes
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 ...
3
votes
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 ...
3
votes
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 ...
3
votes
OpenSCAD 2018 Command line
You can specify variable values from command line using:
openscad ...\
... \
[ -D var=val [..] ] \
... \
... \
filename
See the ...
3
votes
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 ...
3
votes
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 ...
3
votes
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 ...
2
votes
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.
...
2
votes
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 ...
2
votes
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:
...
2
votes
Accepted
OpenSCAD 2018 Command line
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" ...
2
votes
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 %, ...
2
votes
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 ...
2
votes
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 ...
2
votes
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:
...
2
votes
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 ...
2
votes
Accepted
.STEP/.F3D to .SCAD file?
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 ...
2
votes
OpenSCAD / FreeCAD splitting, hollowing and threading model
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 ...
2
votes
OpenSCAD not rendering polyhedron
If the polyhedron surface and top surface of the cube are exactly coplanar, which they seem to be, it won't work; OpenSCAD operates numerically rather than analytically and which is "inside" ...
2
votes
OpenSCAD linear_extrude from multiple path svg import
What you seem to want is not per-path scale but offset. This is an open PR in OpenSCAD and hopefully will be upstream soon.
Only top scored, non community-wiki answers of a minimum length are eligible