Wednesday, August 21, 2019

Apotropaic marks and whiteboards

Before I became a 7th-grade math teacher, I had an opportunity to test the waters of public education, by helping to teach an oversized 9th-grade math class. It was a great experience.

If I recall correctly, this class had three girls, not related to each other, named Aylee, Hailey, and Kaylee. I performed additional duties by tutoring one of them after hours. It might have been Aylee, but I can't remember any more.

This girl had a touch of either ADD or OCD, which made it hard for her to concentrate if there were any distractions. That's why she needed one-on-one tutoring. During our tutoring sessions, I would often stand at a whiteboard, marker in hand, explaining mathematical concepts. I had to erase the whiteboard regularly.

The first few times I erased the board, I would commence teaching the next concept, to be interrupted by the sounds of distressed grunting, almost squealing, from Aylee.

I would stop, look at her, and ask, "What?"

She would point to the board and splutter, "That mark! That mark!"

I would look at the board, see a tiny spot that I'd missed, and ask, "What about it?"

"Erase it! Make it go away!"

She could not do anything until the board was completely, perfectly, erased and clean.

So I learned to wipe the board and make it perfectly clean, because naturally I wanted to create an environment in which she could learn better. That's the kind of teacher I am. Was. Whatever.

But after a few sessions, I would wipe the board and make it perfectly clean, then pick up a marker and make a little, tiny, tick mark on the board, before saying "Now, then, ..." just to needle her. It worked every time.

I'm such a meany.
Yep. Just like this.

Thursday, August 15, 2019

Arduino Project One: Revived - and another detour into 3D printing

The last installment in the story of my Arduino-controlled garage door opener was in November 2017, almost two years ago. The project stalled, not for any reasons of its own, but because of the distractions of everyday life. Now I can finally get back to it.

I may have changed the hardware, switching from an Arduino to a Raspberry Pi. I have good reasons for that, which I'll tell you in a later post. Today, I want to revisit the subject of 3D modeling software.

You will recall that in my previous article about 3D CAD, I mentioned SolidWorks, Tinkercad, SketchUp, Wings 3D, and Microsoft 3D Builder. I haven't tried SolidWorks, because it costs money and I'm cheap. I tried the other four alternatives, and all of them had serious shortcomings. Tinkercad and 3D Builder were so inadequate that I couldn't even take them seriously. Wings 3D is very powerful, but it has a painful and steep learning curve, and all I want to do is design and 3D-print a small enclosure for my project. SketchUp has the power I need, but some of the features I really want to access are hidden behind a paywall.

So, back to the (ahem) drawing board I went. This time, I found just what I was looking for.

(Yet another detour: I've gotten so used to the Linux command line, that I do a lot of graphics work directly in text files. I mean, I write web pages in raw HTML/Javascript/MarkDown/other stuff. I write formatted and typesetted technical documents in LaTeX. For business and technical graphics, I use GraphViz. I use the command-line version of ImageMagick to manipulate existing images. 

And back in the Good Old Days, I used to use the DOS version of WordPerfect with "Reveal Codes" turned on, and I would edit the codes manually. Also back in the good old days, before WISYWIG editors, and before I learned LaTeX, I used to use troff and Interleaf LISP to create typesetted documents. Oh yeah, and I used to write raw HPGL and Logo to do vector graphics - you know, line drawings. Stone knives and bearskins. Old man's voice: "And we liked it! *ptui*")

All of that, just to say that I'm very comfortable with manipulating text-based input to produce graphical output. So I happened across a beautiful little 3D CAD program called OpenSCAD

An OpenSCAD screenshot
Another OpenSCAD screenshot, showing the three panes

OpenSCAD doesn't look like much. It has a window with three panes. On the left is the Editor, where you write the text that defines your part: "Put a cube here. Put a cylinder there. Drill a hole in the cylinder." In the center is the Viewer, where you can see your creation from different angles and at different distances. On the right is the Customizer, a neat little thing you can use to modify your design on the fly without having to rewrite the text in the Editor window.

Creating a model in OpenSCAD is like writing a program. If you've used modern scripting languages like Python or JavaScript, it will feel familiar to you. Pressing F5 or F6 to draw your design is like compiling a program. If you've used compiled languages like C or C++, this will also feel familiar to you. And if you get the programming wrong, OpenSCAD will give you an error message and point you to the line where the error was detected. If you've ever done any programming in your life, I'm certain that this will feel familiar to you.

One of the things that I like best about OpenSCAD is that you can minimize the Editor and Customizer panes, leaving just the Viewer pane, and do your editing in your own favorite editor, in a separate window. Being a Vim fan, I open a terminal window and bang away in Vim. Every time I save the file, OpenSCAD detects that the file has changed, and it computes and displays the new object.

OpenSCAD in use. That's my GVIM editor on the left.
(I'll tell you about the hardware in the enclosure in a later post.)
OpenSCAD can export shapes in a variety of file formats, the most important of which is STL (short for stereolithography, a fancy word for "3D printing"), the format preferred by 3D printing services. Cura LE, from Lulzbot, takes an STL file and converts it into the "slices" required by a 3D printer.

Cura LE (Lulzbot Edition)

Now, here's a new player in the game: FreeCAD. One OpenSCAD user reported that OpenSCAD can occasionally mess up an STL file, and the model will not render properly in Cura. He suggests using FreeCAD as an intermediary between OpenSCAD and Cura.

FreeCAD is a relative newcomer to the 3D design world. It's actually been around since 2002, but it didn't become a serious contender until Release 0.14, in 2014. Even today, at Release 0.18, its makers warn that it's still not ready for prime time, but it's a very good parametric 3D modeling package.

FreeCAD screenshot


(Very technical aside: FreeCAD uses the parametric 3D design paradigm, while OpenSCAD uses the constructive solid geometry (CSG) paradigm. I barely know what those words mean, but I do know that my brain wraps more easily around CSG than parametric design. You may feel differently, and if you do, then you should skip OpenSCAD and use FreeCAD directly. I'm serious.)

So my design path now goes like this:
1. Design the thing using OpenSCAD.
2. Import the SCAD file into FreeCAD, and export it as an STL file.
3. Open the STL file in Cura LE and prepare it for printing.

It works for me. And the price is right. 

If I weren't so cheap, I could spend real money and get one piece of software that does it all for me. But if I had that much money, I'd also buy my own 3D printer. And a OneWheel.

Postscript: Are you wishing I had included a weblink for something that I mentioned? Like SketchUp? Or ImageMagick? Some of these items have links in my previous post on this subject. For the others, you'll have to do a Web search. I'm sorry. I got tired of typing.


To read the other postings about this project, click here and scroll to the end.

DraftSight is no longer free

Remember when I wrote that article about DraftSight, and I was excited because it was an AutoCAD clone, but it was free? And remember when I wrote some follow-up articles uncovering all of DraftSight's hidden 3D design features, even though Dassault Systèmes told the world that it was just 2D drafting software? Well, DraftSight has grown up.

DraftSight 2018 is the last free version of DraftSight. Starting with DraftSight 2019, all future versions will cost money. Not only that, but all pre-2019 versions of DraftSight will stop working, or "cease to run", as the announcement says, after December 31, 2018.

Click here for the official announcement. (In case that link stops working, here's what it looked like in October 2018.)
DraftSight announcement


Dassault Systèmes are, of course, perfectly justified in charging money for DS. DS is professional-quality software, that's for sure. It was written by hired engineers in a for-profit company, and they deserve to make a profit on it. Not only that, but DS 2019 now officially includes a full complement of 3D design tools; it's billed as "a 2D drafting and 3D design experience."

And, considering the prices of comparable software, DS 2019 may still be a bargain, compared to the competition:

  • $100/yr for the Standard version, 2D only, for hobbyists, students and teachers.
  • $200/yr for the Professional version, still 2D only.
  • $500/yr for the Premium version, which includes the 3D tools.
Are there free alternatives? Well, sure, all of the AutoCAD clones that existed before DraftSight are still there. But the state of the art has progressed since DraftSight was first released in 2011. Now, designers are doing 3D CAD and then converting their creations into data files for 3D printing, CNC milling, and other automated manufacturing processes. But there's still a need for the 2D drawings, and so the higher-quality 3D CAD packages (the ones that cost money) can also generate the 2D drawings from the 3D models.

Next, I'm going to tell you about the new CAD solution that I'm going to use.

Friday, August 2, 2019

In case anybody thinks I consider the Harry Potter movies inferior to the books

In case anybody thinks I consider the Harry Potter movies inferior to the books:

Um ...

Okay, but only a little tiny bit. Read on ...

J. K. Rowling actively participated in all of the movies. They are true to her original vision. They launched the careers of many successful actors and actresses, and boosted the careers of many other people in the movie industry. The movies are, in one word, masterpieces.

There's absolutely nothing wrong with the movies. I LOVE THEM. The sets, the graphics, the special effects, are amazing. The acting, the directing, the music, the props -- all of it is fantastic. Maybe even magical.

Most of the time, the movie dialogue is word for word from the books. And in some instances, the more memorable lines come from the movies, not the books. The storyline in the movies is as captivating as in the books.

There's just one little thing, and I'm at a loss to explain it. I consider it a personal failing. It's this: I can stay up reading the Harry Potter books until 3:30 in the morning. But every time I sit down to watch a Harry Potter movie, I fall asleep in the middle of it.

Every. Single Time.