[OpenSCAD] Difference between modelling with Openscad and Freecad

shadowwynd shadowwynd at gmail.com
Tue Oct 8 08:57:28 EDT 2019

Oh, I know resize, which is why I gave the example of:

- one way or another, resize doesn't work well here.  Yes, this is a "made
up" example - I am not losing any sleep over 3d printing key fobs, but it is
an example of hitting a hard wall early in the sandbox that forces the user
to choose between ugly fudge factors (that are not derivable from pure
mathematics) or ugly output (see example below).

For instance, if I take a cube and rotate it 42° about the X axis, I can,
with trig, calculate the position of the top vertex.  While this would be
much easier with some sort of [xmin,xmax,ymin,ymax,zmin,zmax] = bounds()
rotate([45,0,0]) cube(10); construction, it is perfectly doable via
(reasonably) simple math.

The problem is that OpenSCAD has operations that can not be calculated this
way (text(), surface(), import(), rands() (depending on usage), etc.) and
boolean/offset/minkowski operations in which the bounding box calculation
get downright freakish. 


module tag(name, multiplier=7)
	size = (len(name)*multiplier);

	linear_extrude(2) resize ([size, 10, 0], auto=true) text(name,
		color("yellow") translate ([-10, -10, 0]) cube ([10+size+5, 20, 1]);
		translate ([-6, 0, -1]) cylinder (d=4, h=10, $fn=20, center=true);

translate ([0, 25, 0]) tag("Pippinpaddleopsicopolis", 5);


Sent from: http://forum.openscad.org/

More information about the Discuss mailing list