Comments (1)
See also #4286 and many others (#4442, #4780, #4546, #4335, et cetera).
The simple answer is that yes, the previewer gets Z-fighting artifacts any time that a face of a negative object aligns with a face of a positive object. There can be similar issues when faces that have been subtracted away align with positive faces of a different color.
Here's the FAQ entry: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/FAQ#What_are_those_strange_flickering_artifacts_in_the_preview?
There are roughly two strategies for addressing this problem:
- Arrange that those cases don't happen. The major case there is where you are subtracting a negative object from a positive one and cutting into its surface. Arrange that the negative object extends outside the positive object. (But that doesn't directly help your particular scenario.)
- Wrap strategic pieces with render(), which forces OpenSCAD to fully evaluate the geometry of that subassembly.
In your particular case, wrapping the difference() in ikea() in a render() appears to address the problem.
...
module ikea(r = 5, h = 3) {
render() difference() {
union() {
...
Why does it do this, and why doesn't somebody fix it? Because the previewer does black magic to get its performance, and it's a wonder that it works as well as it does, and nobody has a better answer. Recent work to dramatically improve render performance may provide a viable replacement, though it's still slower than the previewer and more limited in other ways like color and transparency support.
from openscad.
Related Issues (20)
- Union of closed shapes fails HOT 13
- Building on Mac OS X Using Homebrew Fails due to Qscintilla2 Versioning HOT 9
- Poor transparency calculation for previewing extruded hollow shapes with holes cut into them HOT 2
- Is this the right place to ask question about OpenSCAD HOT 4
- Chore: renovate python scripts to py>=3.8
- Display colors when rendering using F6 HOT 3
- Customizer: Support vectors with more than 4 elements HOT 1
- Nightly Build Crashes During Render of Complicated Object HOT 15
- Does not see user color schemes (Mac OS 13.6.4) HOT 2
- Intersection not working, creating union instead HOT 5
- preview does not show diffrence() correctly HOT 1
- roof_ss.cc sans me HOT 1
- `$variable` assignment no longer seems to work. HOT 13
- really weird issue that might involve floats HOT 1
- Linear_extrude with 3d vector as height yields inapropriate result HOT 3
- let color() work in rendering mode too and allow to export colored STL files. HOT 1
- Save and restore GUI window state more reliably
- Splat 2D/3D functions HOT 7
- Document vector swizzling HOT 1
- Setting to do full Renders in place of Preview on AutoReload HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openscad.