Tag Archives: tips

solidworks: variable global to assembly

lately i’ve taken to the “make rough sketch of parts on paper, then in solidworks, make solidworks assembly, then add all the features at the correct location with the help of CAD” method of making things. With the lasercutter especially, something you want is that if you decide to change your stock (or you measure incorrectly), you can change the thickness of  your features all at once.

This puzzled me a while back, because if you try to enter an “equals” sign into the extrude feature to create a variable like you would when dimensioning a sketch, you get an error:
error to the left
Uh, so…? What? You can’t use equations in features? That’s dumb.
Thankfully that’s not the case. Turns out you input whatever for the feature and click the check mark. Then you go back and double-click on that feature (in this case boss-extrude) in the feature tree,
 which pops up the “extrude” feature dimension on your model, 
which you can then double-click to edit. And insert an “=” sign to create a variable.
Okay, so that’s great. But this variable only exists within this one file. How do I get it into other files?
I thought there would be some assembly feature, but instead solidworks does this with good ol’ fashioned text files.
Tools > Equations > Export
There’s the “material_thickness” variable I created as = 12.5, and then there’s the “first extrude = material_thickness” which is sort of optional for exporting. All my features are meant for lasercutting so I may as well export the fact that the first extrude-boss should be of “material_thickness” thickness.

(That is, when I import in the future, I have to make sure the new file has an extrude already, or else the “equation is invalid” error will pop up because it’s like “wtf there is no extrude thickness dimension to link to in this file”. So probably best actually not to export that extrude thickness dimension, or else un-check that equation when importing).

This saves it as equations.txt
Then I create a new part (for demo purposes) and import the equations file:
And voila, everything has carried over.

NOTE: Watch your units! As you can see, the equations file doesn’t have units. So if you export as 12.5 mm in one document and then import in a document that is set to work in inches, you get a 12.5 in part.

If I want to edit the variable, I have to do so externally. At the bottom of Tools > Equations, there’s an “open file” button that I use and it pops open the equations.txt file in the default text editor (in this case notepad)
Voila, I can now edit that thickness and just hit “rebuild” (ctrl-b) 
and the new dimension is propagated in all the files.
If you want, going through this post as a slideshow may be flow better:

I made a video about hexapods.

I made a video about hexapods! yay. I’d estimate it was a full 4 or 5 days working on it, learning final cut pro along the way. It basically covers my journey through 2.007 two years ago, and is meant to be a resource for students in the class.

Note to self: shortcuts: < > ctrl-= alt-w

Meanwhile, I think an instructable a week sounds like an excellent plan for Spring semester senior year.

bulk add users to moira lists

I always forget how to do this, but if you ever need to populate an email list at MIT, you can do it through blanche.


If you want to add a long list of names to a list, you can put them all in a text file and do ‘blanche listname -al filename‘, or if you want a list to contain only the names in a text file, you can type ‘blanche listname -f filename’ and the appropriate members will be both added and removed

Thus, at a terminal, I would go

narw@ubuntu:~$ ssh nouyang@linux.mit.edu [remote login to athena]
nouyang@dr-wily:~$ vi 2.007ua [make a file with a list of athena usernames. it will accept the @mit.edu but it’s happier without. You can do this with gedit if you want.]
nouyang@dr-wily:~$ blanche 2.007-2013uas -al 2.007ua

voila! done. If you want to double-check they’ve been added, just do

nouyang@dr-wily:~$ blanche 2.007-2013uas

and everyone should pop up. or check online at https://groups.mit.edu/webmoira/


Additionally, if you’re copy-pasting a lot of stuff (e.g. from stellar) and only want the lines containing emails, you can do
and that keeps only the lines with @ signs. Blanche doesn’t much care about whitespace so don’t worry about it.

Nancy Ouyang
    Office: EAST CAMPUS # H208 
    Phone: 2256223  

gets reduced to


and blanche -al just says

Warning: “nouyang@mit.edu” converted to “nouyang” because it is a local name.

and works perfectly fine.

Software/process for making videos for online learning

This past week I finally got started on my crazy half-formed ideas about an MITx version of 2.007.

Things I learned:

  1. use camstudio for screencasting on windows (free). Note that past 2gb, or less than 3 minutes using the Intel format at 50 quality (see screenshot later in post), the avi files seem to get corrupted and unusable.
    I’d looked into using ezvid, but you can only export to youtube. 
  2. use zoomit (free) to draw on the screen in windows
  3. record in a nice place, not a stone dungeon, because it reflects in the audio
  4. macs don’t like windows-formatted hard drives, so you can read but not write from non-mac-specific external hard drives
  5. MIT specific: the “scratch” folder on the building 26 new media / macathena clusters is per-computer, so you have to log-in at the same computer to access those files. I panicked when fcpx froze and I logged in on another computer and didn’t see anything in the scratch folder…
  6. on linux, youtube-dl blahlink will download the highest resolution version of blahlink video
  7. fcpx does not like flv files, and likes wav rather than mp3 files (if your recorder gives you that option)

hexapods video

(cc zero) made in inkscape + gimp + solidworks screenshot.

I’m still alive! I lolfailed at making a comic over IAP, but that is okay. Because! I ramped back up into happy excited mode! I hope this lasts more than 24 hours. I’m stressed about The Future but what the heck I am now able to convince myself to enjoy the moment and not be all “I should have done this by now” and “f***there’s a million things I should do, maybe i should just sleep instead.”

Thanks, brain. *scrunches face* I wonder about saying things like this when I am trying to find a job. oh well!

Anyway, I spent the last few days working on a video about hexapods, ostensibly to help people understand the design process for 2.007. (I made 18-servo-pod for 2.007 instead of participating in the contest). I’d taken part in a documentary-making class before, which used the final cut pro installed on the macs in the New Media Athena Cluster in building 26.

(We made this: http://vimeo.com/11305828)

But this was a bit different. For one thing, neither of the two hexapods (linkage and 18 servo) work right now. For another, since it’s a video about the design process, basically I am stuck with whatever media I took 2 years ago. So I have a lot less video and more pictures than might be ideal.

Anyway, turns out video editing software (in my case, final cut pro x) is magical and there’s no need about worrying about timing my screencasts with my audio recordings (which are done separately — I probably read each paragraph of the script 3 or 4 times) (The main advantage of reading it paragraph by paragraph is when you make a mistake reading it, you can re-record just that paragraph).

I used a stand-alone mic from a friend, and transferred sd-card files.

Using multiple monitors

My setup was like so:

Note the camstudio video settings, I think way lower would still be fine.. It also used to automatically open the avi file after recording, which got annoying so I turned that off.

I have two monitors, so I set the rightmost one to be 1280×720 resolution, lower than it can be.
Camstudio has a “select screen” option so it will only record one screen. Zoomit didn’t handle multiple screen as gracefully — I ended up making my right monitor the default (bringing the taskbar along with it :'( ) because it would let me type, but not draw, if I activated it (hit ctrl-2) on the wrong screen.

creative commons licensing

you can make your youtube videos creative commons license by default:
I went back and marked all my s*y videos cc, and set cc as default as well.
In addition, I just looked at cc licensing my images, and realized I’d set that as default a while back.

To find cc license videos, just type “hexapods, creativecommons“.

final cut pro x

Relatively intuitive to use. I used option-w to insert gaps (for breathers), cmd-r to “retime” edit the length of clips, and to make the end of a video sustained, I did it hackisly by cutting (b for blade) the end of a video and then using cmd-r to stretch that to however long I wanted it. There’s also automatic audio enhancements — I used “background hum removal’ a lot, and I need to go back and auto-enhance audio for all of them (I spoke rather softly).

other shortcuts: < and > for moving items around, ctrl-= for increasing 1db audio level, alt-w for insert gap.
oh I also learned -12 dB is a pretty standard audio level (depends on if you expect your video to be on tinny computer speakers or on real audio equipment) and you never want audio to reach 0 dB (when speakers distory).


The draft version can be seen here:
I need to figure out the purpose of this video so that I can add and intro and conclusion to it. Also, credits. I tried to keep most of the reused videos / pictures in-browser so I’m not directly re-using someone’s video; I wonder if using 6 seconds of the dancing hexapods video is acceptable? Unclear, but I decided in favor of making something rather than twiddling my thumbs worrying about things.

misc. ubuntu things

I was always a bit disappointed that bash history saves  to disk only the session that is closed last.
Turns out there is a way to fix that:

vi ~/.bashrc
export PROMPT_COMMAND='history -a; history -r'


I have a vmware ubuntu 11.04 (natty narwhal) setup.
things I investigated today:

  • screenlets and digitalclock (“dark clean” theme)
    • digitalclock appears glitchy — artifact of vmware?
    • themes for the cairo-clock
      • http://gnome-look.org/index.php?xsortmode=high&page=0&xcontentmode=1861
        • http://gnome-look.org/content/show.php/Japanese+Theme+Cairo-clock?content=91147
  • equinox set of themes
  • elegant-gnome theme (was not able to get this to install) http://gnome-look.org/content/show.php/Elegant+Gnome+Pack?content=127826
  • wallpaper-clocks http://www.vladstudio.com/wallpaperclocks/browse.php
    • http://www.vladstudio.com/wallpaperclock/?northern_lights
    • http://www.vladstudio.com/wallpaperclock/?robots_in_love
  • orta theme http://mygeekopinions.blogspot.com/2011/06/how-to-install-orta-theme-pack-in.html

Currently settled at Dusk with transparent menubars