I make the houses by rotating and translating a bunch of these pieces
together. I made the house in question by calculating exactly the right
amount to scale and translate three of the pieces together to make the shape
you see, but it's interpreting that single surface on the left as two
surfaces. Any help is greatly appreciated. Thanks in advance!
better open a new thread if your post doesn't refer to the current thread.
MichaelAtOz can you do the shift?
To answer your question: If you use the right tools and handle them
properly, curvy things with fancy shapes are well possible in OpenSCAD. See
my sketchy code doing a handle similar to the one you referred to. I used a
technique that leads into the world of point lists where affine operations
are implemented as functions. It comprises an interpolation scheme named
nSpline() from the splines.scad lib, one or more shape generator schemes an
extrusion path scheme which have to be individually implemented and the
extrusion scheme sweep() from the Naca_sweep.scad lib. Follow the link to
download these libraries.
To see what happens you can cautiously play around with the values of A.
Each row of A (and B) is a parameter set that is interpreted by handle() and
describes a key slice and its positioning in 3D. As commented in the line
above A, a slice is defined by two radii used in the oval() call, a rotation
around the y axis, and a translation along x and z. The interpolation scheme
interpolates the key slices sequence into a much more refined sequence.
oval() returns a point list, T_ and Ry_ operate over it, and sweep()
consumes the list with the slices and does all the dirty work needed for
extrusion and the final polyhedron call.
The model shown is already the result of a union. I would suppose that a
union would've eliminated those lines but for some reason it hasn't. I'll
post some code when I get a chance, but for now, know that each house piece
is a polyhedron, and the house itself is a union of those polyhedrons.
As for the other replies, I have no idea what they're talking about
OpenSCAD is fundamentally a solid modeller, i.e. models described as
surface meshes. The "wireframe" view shows you the contours of the
resulting polyhedron faces after boolean operations, but before
tesselation of faces into triangles (STL contains only triangles).
Compare OpenSCAD wireframe views of
You will see a similar effect to what you are describing. The difference
is that the top and bottom surfaces are not perfectly flush in the
I suspect the same happens in your case. Since the roofs are not
parallel to any global axes, there is a numerical uncertainty in the
exact roof angles, as the two houses are computed from different
coordinates. The result is that they have slightly different roof angles
and/or the top roof is slightly offset +Z from the other. This leads to
the same effect as with the cubes above.
nothing is impossible. It mainly depends on how you construct your solid.
With a global union you easily run into numerical problems, so better avoid
it. If start carving out your house from a large cube in a subtractive
fashion (using a large global difference), you won't see such lines, at
least if you further avoid numerical problems by using oversized
subtrahends. See the following code pieces, which are semantically
rotate([10, 0, 0]) cube(20);
rotate([10, 0, 0]) translate([5,5,0])cube(20); // perfectly calculated, but