I don't say it's impossible but I believe it's quite near to impossible for most of OpenSCAD users to model this relatively simple drawing[1]. It's a breeze in CAD with constraint solver. Also it's viable in code-first systems with access to shape coordinates (build123d) using only construction geometry and projections. OpenSCAD requires hard trigonometry and math skills to pull it out. OpenSCAD has amazing community…
13 minutes. And I am very much at the lower end of the CAD skill scale $fn=100; difference(){ union(){ cylinder(d=55,h=60); translate([125,0,0]) cylinder(d=30,h=32); linear_extrude(11) polygon([[0,25],[125,15],[125,-15],[0,-25]]); translate([0,5.5,0]) rotate([90,0,0]) linear_extrude(11) polygon([[0,50],[125,40],[125,0],[0,0]]); } cylinder(d=35,h=70); translate([125,0,0]) cylinder(d=20,h=40); translate([110,8,98]) rot…
OpenSCAD: The Programmer's Solid 3D CAD Modeller
121–130 of 191 posts
Re: OpenSCAD: The Programmer's Solid 3D CAD Modeller
#122If you want to do code-CAD for anything substantial and you haven't yet developed a significant dependency on OpenSCAD, do your brain a favour and spend at least some time with CadQuery, Build123D or (if you prefer JS to Python) Replicad. As impressive as NopSCADlib and BOSL2 are (and OMG they are, when you consider what they have to work with!) , OpenSCAD is a one-way, declarative CSG environment that essentially on…
Re: OpenSCAD: The Programmer's Solid 3D CAD Modeller
#123OpenSCAD of course is not as powerful as other tools, but it has a lot of pros (depending on what you consider a pro): - Free, unlike other tools such as Fusion or SolidWorks - Open Source, unlike other tools such as Tinkercad or OnShape - 100% based on a programming language: compared to others is like comparing plain HTML with HTML + JS - Parameterizable (as a consequence of being based on a programming language),…
- writing out a text from OpenPythonSCAD
- reading it into LaTeX to measure it[1]
- re-setting the text using METAPOST embedded in LuaLaTeX so as to write out an SVG
- reading the SVG back into OpenPythonSCAD
Bailed when it looked as if the latter step would require using Inkscape to convert to paths (at that point it seemed it would just make more sense to do it all in Inkscape)
1 - https://graphicdesign.stackexchange.com/questions/31088/any-...
Re: OpenSCAD: The Programmer's Solid 3D CAD Modeller
#124Earlier quoted context omitted.
13 minutes. And I am very much at the lower end of the CAD skill scale $fn=100; difference(){ union(){ cylinder(d=55,h=60); translate([125,0,0]) cylinder(d=30,h=32); linear_extrude(11) polygon([[0,25],[125,15],[125,-15],[0,-25]]); translate([0,5.5,0]) rotate([90,0,0]) linear_extrude(11) polygon([[0,50],[125,40],[125,0],[0,0]]); } cylinder(d=35,h=70); translate([125,0,0]) cylinder(d=20,h=40); translate([110,8,98]) rot…
I appreciate your attempt and time spent. It's an amazing showcase how simple things could be easily expressed in OpenSCAD. But the part in question sadly is not that simple. All tangents are wrong.
The balance is a bit more involved --- I'll see if I can find time to model this in a couple of ways....
Re: OpenSCAD: The Programmer's Solid 3D CAD Modeller
#125I don't say it's impossible but I believe it's quite near to impossible for most of OpenSCAD users to model this relatively simple drawing[1]. It's a breeze in CAD with constraint solver. Also it's viable in code-first systems with access to shape coordinates (build123d) using only construction geometry and projections. OpenSCAD requires hard trigonometry and math skills to pull it out. OpenSCAD has amazing community…
13 minutes. And I am very much at the lower end of the CAD skill scale $fn=100; difference(){ union(){ cylinder(d=55,h=60); translate([125,0,0]) cylinder(d=30,h=32); linear_extrude(11) polygon([[0,25],[125,15],[125,-15],[0,-25]]); translate([0,5.5,0]) rotate([90,0,0]) linear_extrude(11) polygon([[0,50],[125,40],[125,0],[0,0]]); } cylinder(d=35,h=70); translate([125,0,0]) cylinder(d=20,h=40); translate([110,8,98]) rot…
r1, r2 = 55/2, 30/2
cd = 125
# construct rib profile, start with slope and oversized arc
# reposition line to be constrained on arc center height and Y axis
l = build_line(O, op_line(-8, 30, name='l1'), op_arc(30, -90, name='a1'))
l.move(Vector(77-r1*2, 0) - l.a1.center_point)
ip, = intersections(l.l1, Axis.Y)
l.move(Y(50 - ip.Y))
# Now we know first arc center and could project it on a second arc center
# axis with known distance and get tangent point. Use point to trim oversized fist arc
# and create second tangent arc.
a2c = point_on_axis_with_dist(l.a1.center_point, Axis.X.offset((0, 66+32)), 66+30)
ip, = intersections(l.a1, axis_from_points(l.a1.center_point, a2c))
l.append(op_trim(ip), op_arc(to=(a2c.X, 32)), XA(cd-r1), YA(0), (l.s.X, 0)).close()
# Convex hull of base cylinders would have correct tangents
base_sk = make_hull((X(cd) * Circle(r2) + Circle(r1)).edges())
# Contruct final part
obj = extrude(X(r1) * RX(90) * l.face(), 11/2, both=True) + extrude(base_sk, 11)
obj += Cylinder(r1, 60, align=A.d)
obj += X(cd) * Cylinder(r2, 32, align=A.d)
obj -= Cylinder(35/2, 60, align=A.d)
obj -= X(cd) * Cylinder(20/2, 32, align=A.d)
It took 15 minutes and I used my helpers to aid rib profile construction. With stock build123d it's quite a chore.Re: OpenSCAD: The Programmer's Solid 3D CAD Modeller
#126Earlier quoted context omitted.
13 minutes. And I am very much at the lower end of the CAD skill scale $fn=100; difference(){ union(){ cylinder(d=55,h=60); translate([125,0,0]) cylinder(d=30,h=32); linear_extrude(11) polygon([[0,25],[125,15],[125,-15],[0,-25]]); translate([0,5.5,0]) rotate([90,0,0]) linear_extrude(11) polygon([[0,50],[125,40],[125,0],[0,0]]); } cylinder(d=35,h=70); translate([125,0,0]) cylinder(d=20,h=40); translate([110,8,98]) rot…
I appreciate your attempt and time spent. It's an amazing showcase how simple things could be easily expressed in OpenSCAD. But the part in question sadly is not that simple. All tangents are wrong.
Re: OpenSCAD: The Programmer's Solid 3D CAD Modeller
#127Earlier quoted context omitted.
I appreciate your attempt and time spent. It's an amazing showcase how simple things could be easily expressed in OpenSCAD. But the part in question sadly is not that simple. All tangents are wrong.
Erh? Are you complaining about some minor adjustment, so that lines are not meeting the curves smoothly? I did not even understand what TANGENT means, cause I know much nothing about CAD.
You are right on a precipice between what you know, and falling into a deep, deep trough of CAD knowledge!
https://en.wikipedia.org/wiki/Tangent_lines_to_circles
You absolutely don't need to get into the maths to get value from this idea. The maths terrifies me. Just know this core concept: a tangent line meets a circle only once and is at right angles to the radius when it does.
Here's why this is valuable in CAD environments that properly support it: once you know how a tangent line works, and see how a constraint-based modeller represents them, it is possible to understand how to model a whole set of smoothly rounded features that the CAD package can automatically adjust to changes made to core measurements, retaining this perfect "join". Rounded slots, curved rounded slots, fillets, all sorts of interesting motion components, etc.
Re: OpenSCAD: The Programmer's Solid 3D CAD Modeller
#128Earlier quoted context omitted.
I appreciate your attempt and time spent. It's an amazing showcase how simple things could be easily expressed in OpenSCAD. But the part in question sadly is not that simple. All tangents are wrong.
Erh? Are you complaining about some minor adjustment, so that lines are not meeting the curves smoothly? I did not even understand what TANGENT means, cause I know much nothing about CAD.
Re: OpenSCAD: The Programmer's Solid 3D CAD Modeller
#129Earlier quoted context omitted.
I appreciate your attempt and time spent. It's an amazing showcase how simple things could be easily expressed in OpenSCAD. But the part in question sadly is not that simple. All tangents are wrong.
Erh? Are you complaining about some minor adjustment, so that lines are not meeting the curves smoothly? I did not even understand what TANGENT means, cause I know much nothing about CAD.