Openjscad.xyz to build some shelves

I did a thing.

The output of jscad

A thing (not quite finished, more vertical support needed)

It was an ask from my family. I did the initial planning in.. code!

https://github.com/sunnywiz/openjscad_xyz_stuff/blob/costco-box/costcoBoxes.js

Side effect of the code is it tells me how many 2x4x8’s to buy, and attempts to plan the cuts in them:

floor 0  of length  48.5  in piece  0 
floor 1  of length  48.5  in piece  1 
floor 2  of length  35  in piece  0 
floor 3  of length  35  in piece  1 
floor 4  of length  35  in piece  2 
vertical 0  of length  52  in piece  2 
vertical 1  of length  52  in piece  3 
vertical 2  of length  31  in piece  3 
vertical 3  of length  31  in piece  4 
vertical 4  of length  52  in piece  4 
vertical 5  of length  52  in piece  5 
vertical 6  of length  31  in piece  5 
vertical 7  of length  31  in piece  6 
vertical 8  of length  52  in piece  6 
vertical 9  of length  52  in piece  7 
vertical 10  of length  31  in piece  7 
vertical 11  of length  31  in piece  8 
ledge 0  of length  38  in piece  8 
ledge 1  of length  38  in piece  9 
ledge 2  of length  38  in piece  9 
ledge 3  of length  38  in piece  10 
ledge 4  of length  38  in piece  10 
ledge 5  of length  38  in piece  11 
ledge 6  of length  38  in piece  11 
ledge 7  of length  38  in piece  12 
ledge 8  of length  38  in piece  12 
ledge 9  of length  38  in piece  13 
ledge 10  of length  38  in piece  13 
ledge 11  of length  38  in piece  14 
top 0  of length  48.5  in piece  14 
top 1  of length  48.5  in piece  15 

There’s a bug though. I should have specified the width of the boxes as 22.5″, not 22″. Also, i had to re-measure where the rails go – ended up with the box at less than 17″, and the first rail at 15″, it was 15″, 32″, and 49″. Also, i really had to reinforce the vertical stuff so it didn’t .. parallelogram to the side.

The code is parametric of course. I plan to use the same code for the slightly smaller boxes. But i might use a smaller size of wood – this was overkill and way too heavy.

3D Printing Revisited

It would take too long (i don’t have the time) to write up the whole process, so to sum it up:

  • Dude posts video about 3d printing organizational trays (the guy who de-brands everything)
  • Wife shows me video on instagram
  • I say i can do that
  • I get approval for a 3D printer

I’m condensing the rest, so if you don’t know the words, well.. sorry. Research. Elegoo Neptune 3D Max. Not available. Sovol SV04 IDEX. Haven’t used 2nd extruder yet. Kinda stringy.

I had a booger of a time trying to get the first layer dialed in. Video:

openjscad is gone replaced with jscad v2, relearned it – github – https://github.com/sunnywiz/openjscad_xyz_stuff/releases/tag/print-1 –

I wish i could paste a link directly to the code rendering the model, but you can only do that for bundled single-js files, not project files at the moment.

Along the way I experimented with using Lego’s as a 3d measuring tool. There are several things i would improve about the above print. But that’s 2-3 other blog posts i don’t currently have time to write.

Now, with that out of the way, i’m trying to Dial the printer in more. The printer comes with a variant of Cura; i’m trying to bring it up with SuperSlicer (thank you Teaching Tech) which is a Prusa. I found somebody else’s config tonight, got that going, going through the calibration prints in that tonight. I have this problem with … something is gloopy and a bunch of filament goes bloop at the start of the print. Retraction print is starting now, but i think i need something along the lines of Coasting. But that’s in Cura, need to find that in Prusa.

My hope is to use the prusa-line of colorizing / multimaterial to make some interesting colorized things.

Future projects:

  • There’s a door latch strike thingy that needs some modification. That needs ABS or PETG.
  • There’s some bathroom organization stuff that I want to custom-print holders for
  • Molly has a pink necklace thing that needs some help, but that might need TPU.
  • Tons of little toy/trinkets for the grandkids. I’m holding back, so far i’ve only shown them a robot dude and flexirex.
  • I would love to redo my street map thing with the 300x300mm bed in higher detail, but i’d have to rewrite that with jscad v2. And of course, multicolor somehow?

That’s about it for now. Cheers

Tree of Directions Revisited

image

We are in the process of possibly changing residences, so (during my coding fun times on Wednesday mornings with a friend) I revisited this project.  When I left it, it looked like this:

image

In fact, that was so not-cute that I had tried to go 2D with it instead.   

I revisited it, and went through several stages. 

First, I had to re-do how I called Google Maps – they no longer had a “free” tier that was usable, but they now had a “pay as you go” tier which equated to $5 for 1000 route requests.   No problem.  But, to keep costs low, I added a cache strategy so I didn’t ask for the same thing twice.  (Caveat: I think I forgot to turn off traffic, so different requests at different times were delayed by different amounts).

Then, I tried to create a surface underneath the plot.  I did this using some electrical engineering stuff I once helped somebody with – Here’s the plot + a surface underneath it.  Better, but not the awesome I was hoping:

image

I called that the “Minecraft” look.  (That’s a very rough draft with only 10×10, Its about the same at 50×50 except the squares are smaller). I went for something where I calculated the midpoint and drew a polyhedron from each of the four vertices, it looked a lot better:

image

(The previous were github previews of STL files; this is 3D Model Viewer built in to Windows).  

But, its still to .. Jaggedy.  So, I did a few things: First, I made it so rather than a spiderweb, I did a “ramp” effect (filling in underneath the path), as well as, I trimmed off all the residential streets (<30mph) at the ends of the routes.  This gave me a much better print, which is closer to what I had in mind when I started: something that showed “Which were the best ways to get places”:

image

However, I didn’t realize it, but I had done something even better.  Here’s Just the Ramps:

image

This is what I had been going for!  To heck with the surface print part!  You can see the mountain AND the detail!  This is commit a75a67 at https://github.com/sunnywiz/TreeOfDirection/.

Next direction — where I do the same thing for both addresses, and then figure out a way to do stuff in two colors (ie, two prints, but that join together).    In order to do this, I have to first force the bounding boxes to be exactly the same.

Also other things learned – 3D slicing has come a long way, I don’t need things to be perfectly combined as long as they don’t have holes in them.

Custom Fit Clothing: Zozo Pants

WARNING:  There is some realistic waistline shown in this post.  Do not proceed if this concerns you.   

Recently I got introduced to Zozo.com via SpaceX.  It sounded like a neat idea!  I like the sound of clothing that just fits, and their prices were not too crazy.   So when I got some birthday cash in, I went for it.

imageFirst, I bought a $5 Zozo Suit Its not meant to be worn out in public, but here’s a picture anyway.  I’ve tried to make it … PG-13.  The dots REALLY DO go everywhere.  There are different sized dots to point where the wrists and ankles and neck are.  

I used their little stand, propped up my phone, and went through the process of getting measured.  Standard photogrammetry – they take 12 pictures, guided by voice prompts.  They don’t save the pictures.  The app crashed twice on me, and once I didn’t wait long enough (I have an old phone), but I finally got these measurements:

image

Which I promptly trusted.   Not a mistake, as you will see later.

I then went on to order a pair of pants, a T-Shirt and a Long Sleeve shirt.   The Pants got delivered within a week, the shirts aren’t here yet.

Excited, I tried on the pants, and: 

image

What gives? 

Pull the pants up and ..

image

Turns out the computer had used 39” for my waist, which is technically correct, but the actual number that we should have used should have been measured a bit below, at about 37.5”.  Which is nowhere near the 34 Waist pants that fit me in normal stores.   I guess there are real inches, and designer inches.

Note, I did have an option of customizing all the numbers while ordering the pants.  I didn’t know what I was doing at that time.  THIS was my mistake, and this is where I’m learning. 

imageWell, I had taken them out of their plastic, so I figured I was stuck with the pants.  (also wrong).  I cinched them up with a belt, and they worked pretty well!  

Sealing my fate: I wore them for two days.    Now they are really “worn” and cannot be returned.

Then, later, trying to see when my shirts were going to arrive, I found this button in the app:

image

Doh!  I could have gotten them altered!   Clicking in gives a more complete method of “returning for a different fit”:

image

Okay, Zozo, I forgive you.  I really could have double-checked which measurements the computer was applying to me – I’ll do that next time I order.   I probably will order again, just to complete the cycle.

All in all, I’d give it a thumbs up.  They don’t have the most awesome clothing ever, but if you have a hard time finding the right size of stuff, this would be a relatively gentle way to get in with measurements and custom fit clothing.  You could then branch out to several of the other services, which have suddenly started showing up in my Instagram feed – go go targeted advertising. Most of them are much more expensive, for much higher quality clothing. 

Tree of Direction == Claws of Doom

https://github.com/sunnywiz/TreeOfDirection/commit/8058bc3598c189ded425f044bde39528e335d4fd

This was supposed to look pretty, but its not.

image

If I look at the simpler version in an isometric top down view, it might make more sense:

image

This is taking a grid of points on a map, and asking Google for the optimal route from home to that point.  This ends up creating .. I don’t know what to call it.  Its a decision tree, says Lamont .. yes, that’s a good name for it.   It also points out that Google has forgotten that a certain street doesn’t go through, and is incorrectly routing me down Old Henry Rd.

I’ve added something in red .. its the boundaries between “neighborhoods”.    Also note that 3 routes almost touch where my current work is, which is why there’s so much indecision about the “best” route to work.  Whereas, if you’re in the middle of a particular neighborhood, then there’s little choice.   This says the best way for me to get to the new work place will be 146->HurstBourne.

I think this is better done staying as  a 2D print.   I might need to learn.. PdfKit?   Something to generate PDF’s with.  I can get a poster-sized PDF printed for $5 via Office Max.     However, what I might do is overlay a few maps .. like “with heavy traffic” vs “without”, with transparency.   And a lot more detail.

I did learn a lot about using Google’s Directions API.   Very nice.  Polylines are pretty amazing – took a small string and it decoded into 22 points!!!   https://developers.google.com/maps/documentation/utilities/polylinealgorithm.

More to follow, I’m sure.

Commute, 3D Print: 2/3 gathering tracks, prototype

imageI should have written this a few weeks ago when this was fresh … but time has moved on.  I can’t pretend. 

Easiest way through it:

a) I did a prototype.  You can see a video of it .. pictures don’t do it justice .. at the following links:

https://www.instagram.com/p/BT-A9yrhNCv/

https://www.instagram.com/p/BT-BWXphF5I/

b) I used an Android program called “MyCarTracks” to then record my tracks.   I specifically used these options:

  • Autorecord – when turned on, mycartracks starts on boot and can be set up to start recording when the car starts moving.  This prunes out the GPS points when your car is on, but not moving yet.
  • It has the option of “don’t record a point till you’ve moved N*precision feet”, which gets rid of Jitter.  side effect though is time at stoplights ends up looking angular rather than vertical.
  • It allows track naming during or after the trip, to make it easier to identify tracks.
  • It allows export to CSV on the SD card; you don’t have to use their online service.

I tried to do the following routes – if Google Maps will let me:

image

It took several mornings – I had to go straight there, and NOT stop at Starbucks.   That can be hard, sometimes.   I also wanted to get it around 8am, during commute hours – mostly successful. 

c) I put all these maps together into my program, and …  ran into a problem.  Somehow, the code that writes out to a .STL file seems to stop at 32k.   So, I had to rejigger the code a bunch ..   I also changed it so that all the tracks would END “top-justified” at work, so that the shortest track was on top. 

image

d) And then it was time to stop.   I could have futzed with it forever ..   So, gulped, uploaded my image, ordered it printed.  And immediately:

imagee) Buyer’s regret.  Turns out I could have gotten it printed for significantly less money!   I found http://3dprintingpricecheck.com/  which led me to https://www.makexyz.com which supposedly would have printed my thing in resin for $27.90.    However, the dimensions .. maybe that’s smaller. 

So I called it “a learning experience”, and let it go, archived the project, and started a new one.

All the code is at http://github.com/sunnywiz/commute3d.  Including the final .STL (and most of the intermediate ones as well) and my GPS logs.

I’ll post some more pics and video when the print arrives.

3D Fractals via Mandelbulber

I was scanning recommended videos on Youtube when I came across this one:

[youtube=http://www.youtube.com/watch?v=QhMdL4kSnsg]

 

I had to see this.  It was amazing.  I was hooked.  I had to find more. 

That led me to this program: https://sourceforge.net/projects/mandelbulber/files/Mandelbulber%20v2/win64%20build/

Which I then ran, and tinkered with.  Result:  I rendered two/three desktop backgrounds for myself.

orange fern brushed metal
brushed metal-aliased  

At 2560×1080, the first two took about 15 minutes.  The third one, which looks like the second one, was actually rendered at 5120×2160, and then scaled down to 2560×1080 (simulating an anti-aliasing of 2x).   However, it .. came out different:

image

image

There are more holes, in the one with higher resolution.

This is because

a) Mandelbulber dynamically scales fractal complexity as it raytraces, and

b) the model that I chose, i chose one with “negative scale”, which I think means, the fractal works by taking chunks out of space rather than by adding chunks into space. 

I gave up at this point.  There’s an unlimited investigation that could happen, and my curiosity had been satisfied.  I could make desktop wallpapers of any resolution.. but I’d need to search for something cool to take a picture of.  And there’s so many variables.

I did find another VR flythrough, albeit i have no VR goggles, so someday I want to see this in stereoscopic:

[youtube=http://www.youtube.com/watch?v=kOu3_tmHxu4]

 

Be aware there’s a lot of material editing stuff that you can do as well – which can be a bit hard if you haven’t dealt with materials (specular, texture, etc) before.   Oh, and dynamic volumetric fog – lots of computation even at 320×200.    Like I said, unlimited time could be spent…

Or you can oogle these:

http://www.mandelbulber.com/gallery_page1.php

image

(screenshotted so you can see how beautiful before deciding to click the link).

Fun Things Lately

I don’t know when I’ll have time to do a proper update, so here’s a list-dump of geeky stuff I’ve been up to lately:

  • I started playing Cities: Skylines two days ago.  My brain is processing all kinds of patterns around roadways and pedestrian paths and stuff like that. 
    • imageimage
    • Left was my 6th or so city.. Right is my 8th or so city.  I keep trying to get things “perfect”. 
    • I made a chart of “Noise Polluting” vs “Ground Polluting”, and another chart of “Who wants to be near whom”. 
    • My best idea so far is a big Triangle with Commercial, Industry, and Residential at each corner.
  • My 3D printer broke, and then resurrected itself – there’s a loose power wire going to the extruder.  Its jiggered so that it works for now.
  • I volunteered to make a unique 3D print for a fundraiser basket.  I started off in blender, ended up doing it mostly in OpenJSCAD.  Here are the draft (left) and almost-final-but-slight-oops (right):
  • At work, not much is new.    Still working in an fairly simple MVC app, which deals with gathering user input, filling out PDF’s, and submitting information to various external services.
    • A little bit of PDF parsing and modification that I’d never done before.
    • A little bit of image-detection using some System.Drawing libraries (to detect if what the user uploaded was a valid image)
    • Mostly churning through smaller tasks in preparation for a release.
    • A lot of dealing with configuration migration problems.   Finding a way to export and import configurations between environments so that changes only need to be hand-typed once, and then can be copied from environment to environment. 
    • Next week I get to start investigating 3 services I’ve never talked to before.  Exciting!

House Print 4/N: “Second Beta”

image

I have 3.5 floors printed!  And they go together!  With Stairs!

image image
image image

There are some problems:

image I forgot to cut a section out of the “concrete” that the family room sits on to make room for the stairs from the basement up to the family room.

I also had a hard time getting the steps on the left to fit – I had to resort to my wife’s Dremel to cut some of it down to size.   (Incidentally, a Dremel doesn’t cut it, it selectively melts it via friction)

image I did not make the basement 7ft high like it really is.   Thus, the kitchen is than in reality – and the stairs are the wrong height.

In this same picture, you can also see the problem I have with trying to get the stairs to fit.   
The kitchen wall does not line up with the bedroom wall.

image I ran out of filament with 3 pieces of the bedroom to go.   If I had not made mistakes, I could have gotten the whole thing in a 1kg spool.   (In the pictures above, notice the bedroom has no upper section)

I have ordered a 2kg (5.5 lb) spool of white (“Studio Line White” from JustPLA.com);  With it I’m going to start over.  This time:

  • Correct the basement height
  • Put the stairs in from the start so they get “cut” correctly.  
  • I want to reflect where the ground level is better.

~~~~~~~

For this blog post, I snapped this tag:

https://github.com/sunnywiz/housejscad/tree/Post4

image

When I get time, I plan on making a how-to video – for my own benefit, since a year from now I won’t remember the details:

  • How to create the blueprint
  • How to size the blueprint to create the text overlap
  • How to use the code to generate the STL’s
  • How to use the Join libraries to make the pieces possibly fit each other
  • How to use the Cut libraries to make things printable on my print bed and Plate them
  • How to use the Microsoft / NetFabb Cloud service to fix the model
  • How to use Blender to section the shells off into separate prints
  • How I glued things together (as best as I have found so far)

Pewee, we have a problem (House Print 3/N)

(I live in Pewee Valley, KY, not Houston, TX)

image

This is the 1:48 scale print of the fourth floor.   The source is here:  https://github.com/sunnywiz/housejscad/tree/Post3  and the STL files you are seeing here are bedroom0.stl, bedroom1.stl, and bedroom2.stl.

Problem: The top half doesn’t quite fit the bottom half.   This is because the top half isn’t large enough to hold the shape together – when the roof prints, its warm, and as it cools, it wants to shrink, and so it wants to curve.  The bottom print wants to do the same, but the walls are large enough to prevent this from happening.

Solution: no-roof.  Which, my wife points it, is the way to go:  then you can easily play with the furniture inside.   The side effect of that is, in the current iteration, I won’t be doing top/bottom alignment tabs (similar to the “cross” thing on the left side of the picture). 

Otherwise, the 1:48 scale is working well.  Here is the same bottom half, but with Victorian doll furniture inside it:

image

The checkerboard at the bottom of the picture is also working well as a place to glue things.  Here it is glued to the next piece:

image

Pretty proud of it so far!