10

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 cause unexpected errors during STL export (I did not experience that myself so far, just read this somewhere). So you would change the dimensions of your objects ...


8

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 middle, my results are the same as yours. Surrounding the -2 with parentheses results in a correct answer, however. It appears that the parentheses turns a ...


5

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 term to use.) And once you have correct names, you'll understand how to specify the dimensions in OpenSCAD. Tolerance is the amount of random deviation or ...


4

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 the queen piece, and that has a sphere with lots of faces on top. So it looks like the "kink" is inside the queen where the sphere and the base cube overlap, and ...


4

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, but I will be very grateful if errors or misconceptions were brought to my attention in the comments. :) I have read that sometimes the function render is ...


4

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 from here on out.


4

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 difference it from the other copy of the object. This is all easy if you use modules to encapsulate your parts, and it also works with imported STL files. ...


4

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 creates a non-manifold object from the difference. user R..'s answer has merit but is not going to solve the problem. Isolating the cube from the code and exporting ...


3

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


3

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 comes to independent objects, but if you wish to clear those errors, experiment with explicit union statements where you have joining objects. It may be necessary ...


3

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 others), and the second one had them exactly of the right dimension: difference() { base_geometry(range, angle, infill, extra_padding = 2); base_geometry(range,...


3

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.i. the for loop). Note that it may not be a good idea to make enclosed holes inside your object, see the edit section at the bottom of the answer. Small ...


2

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: rotate(a=[90,0,0]) { translate([0,10,0]) cylinder(h=10,r1=10,r2=10); }


2

I’m not aware of a standard in Openscad but I can share what I have done in the past. cutoutActualDiameter = 10; cutoutDiameterClearance = 0.1; cutoutDiameter = cutoutActualDiameter + cutoutDiameterClearance; I know this is verbose but unfortunately in my experience that is a necessity if you want your code to be maintainable in Openscad. The benefit of ...


2

Two options: Use TRACE2SCAD (http://aggregate.org/MAKE/TRACE2SCAD) For the more adventurous: Dig up the old pull-request for the suggested trace() module: https://github.com/openscad/openscad/pull/1110


2

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 below, it becomes a 2D representation of the part. This is effectively how projection works in OpenSCAD. Note that the part image below is centered in x, y, z ...


2

To my knowledge, OpenSCAD does not have any such feature. However, a related feature might help you: the debugging aid modifier characters. By inserting %, #, !, or * before an object (including aggregate objects), you can control how it renders in relation to the whole file; this makes it possible to do "binary search" type operations to figure out where ...


2

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" installation, though. Thanks for your support.


2

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 shapes with nail polish then remove the overflow with acetone; see my question & answer https://3dprinting.stackexchange.com/a/10872/11157.


2

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 the tightening mechanism in a 3-jaw chuck. In effect, are you using the large cylinder as a worm gear to drive four gears which ride on it? I thought you wanted ...


2

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 linear_extrude that. In general you need the cut=true variant of projection, and you need to translate/rotate the object to be projected such that the face is in the XY plane (this is the "as long as you can know") part. Unfortunately this ...


2

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 third dimension of your choice. This way a 3D shape is created that could be concatenated (joined using e.g. union) to the original shape. For the extrusion, the ...


2

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 creates parameters assigned to specific aspects of a model and implements those parameters to create the desired shapes/components by typing in a text editor. The ...


2

This seems to be a limitation of the language. One workaround that's only moderately ugly is, in the body of the module: mouth = is_undef(mouth) ? pin_radius * 0.9 : mouth; etc. If you'll only be using the file via a use directive in other files, another approach is file-scope variables. These can be overridden when the module is called, just like module ...


2

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 parameters and functions/modules, but the road is one way; geometry is an output only and doesn't loop back into input. So automation of this entirely in OpenSCAD is ...


2

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" or "outside" the other is subject to numerical instability. Whenever using differences you need to make the object being subtracted extend by at ...


2

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 stamps) It takes ages to render, but it could be enough for simple patterns. Any better solution are still welcome... module buildPyramidalExtrude(height,...


2

The union syntax addresses this: translate([-40,-40,0]) difference() { union() { cube ([90,28,12]); translate([20,0,20]) cube([12,12,12]); } translate([12,-.01,5]) cube([12.7,28.02,14.02]); translate([65,-.01,5]) cube([12.7,28.02,14.02]); } It supports creating an object before the difference syntax is ...


2

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 thickness wall is also exportable into an STL as a set of triangles spun up by vertices that are in each other's plane but have inverted normal vectors for the two ...


1

One can create a module to import the respective STL files. module bring_it_on_1() { import("c:/user/models/egg_on_face.stl"); } translate([-10, 20, 0]) bring_it_on_1(); Other modifiers can be used and will act on the STL file appropriately.


Only top voted, non community-wiki answers of a minimum length are eligible