Optimizing Cycling

Now that we have youtube, I watched some videos on “Fitting” a cycle.  Armed with that info – maybe my bicycle is not the best fit for me, but I could change some things.

imageI rode the same route three times .. ignore the dark part, that’s me putting the app on “pause”, but apparently it continues to record while doing so, which is actually great.  Its about 1.1 miles mostly up-hill.  I did it three times ..

Look at the pink.  That’s my speed going up the hill.  Note how second and third ones were definitely better.

Look at orange.  That’s my heart rate.  Look at how second and third ones were higher.

Here’s what it was: 

  • My seat was not high enough.  As a result, on the downstroke, at the 3pm point, my knee was actually out beyond where the pedal was – which brings some strain into the system. As a result, my legs hurt  .. kneecaps back to hamstrings .. so my heart couldn’t drive my legs as hard as my heart actually could.
  • 2nd trial – I brought my seat up about 2 inches ** , so that my leg was almost fully straight but my foot still parallel to the ground when the pedal was at its lowest.    I also inflated my tires up to 70 (they were at 40 before), which maybe helped some as well – although you’d think you’d see that on the downhill.  I guess air resistance trumps rolling resistance there.  ** because the seat rises up and to the back, raising the seat also moved me back a little bit. 
  • 3rd trial – I brought my seat up another inch or so, so that my foot points a bit down at the lowest spot.  It also for sure got my knee behind the line of the pedal when the pedal is at 3 o’clock.  It was a bit uncomfortable, but … seemed smoother, and .. the heart rate vs speed graph seems to agree.   I also reinstalled the bar-ends so that my hand position was further out, and I think that shows up in the downhill speed (the part not marked with pink) is higher for this trial. 

This could also all be B.S.   It could also be that:

  • The evening progressed and it got cooler
  • I drank more water so the weight of the bike went down
  • I got more properly warmed up.

Things I did not do that would probably make things even better:

  • Put my seat further back.  Its as far back as it can go.
  • Use a lighter bicycle.  Mine is a hybrid with shocks and stuff .. quite heavy.
  • Take off my very heavy bicycle pack (leftover from RAGBRAI.  I needed somewhere to stick my towel and other stuff for my commute to work.  Don’t leave home without your towel!  (Don’t panic!)

Things that I am doing already:

  • I’m using .. clips?  and cleats?  I don’t know the names of them.  Basically, i have power on the upstroke as well, I just have to remember to try to bring my knees up to touch my arms.

The real test will be riding to work .. I hope on Monday .. and compare that against last Monday, see how I do.

I am excited.

Running Metrics

Looking at (some) of my numbers from this round of getting back into running –

image

  • This does not take into account exhaustion (time of day) or heat
  • The graph does not take into account distance – in general, over longer distances, your body can do less for a given HR.

Most of the numbers are in about the same line – the green line (which is data between 7/2 and 7/19). 

You can see me actually being worse than the blue line (which is data from 6/3 – 6/10).

However, notice that once I got serious and did a “long run” at low HR (the 125 HR on 7/19 which ended up at 90 minutes), my next performance jumped to the north significantly.  This is what HR training (LONG and slow, 50% between L1 and L2) can do for you.

Or, maybe I’m full of falafel and the next piece of data I get will be completely different.

This is kinda fun.   I wonder if I could convert this into a 3D sculpture of sort.

Learning New Stuff–Terraform, AWS, Lambda, DotNetCore

This last week has been a crash course in new stuff for me.  I’m helping with the scripts that manage the infrastructure around a project – freeing up the developer to work on user stories, I’m taking care (or trying to take care) of the deployment aspects of it.   In a way, its a big catch-up to other folks who have been charging ahead into newer technologies – so its not like I’m having to discover things on my own.  On the other hand, everything is already evolved to N+2, and I’m at N-1, so its a bit of a firehose.

Here goes though, stuff I’ve picked up this week:

  • Teamcity build calling a powershell script to do deployment stuff. 
    • New to me: I didn’t know PSPROJ was a thing – that I could step debug through powershell in Visual Studio now.  Come a long way since Powershell 1.0.
    • Dotnet lambda package, zipping, sending to S3…   Somebody else whose first name rhymes with “Miss” and last name rhymes with “Aye Lee” wrote this part for something else, I get to adapt it for the current project.
  • AWS API Gateway => AWS Lambda => C# NetCore1.0 => MVC  chain
    • Got to learn about the “Version Hell” that happens in NetCore1.0.   It will probably be much nicer by the time we get to 2.0 or better.. just the 1.0 to 1.1 is pretty rough at the moment.   Get the intersection of the bleeding edge of NetCore as it was 7 months ago with the bleeding edge of where AWS is taking their Amazon Linux.   We had to do a deviation and host some stuff via EB rather than Lambda. 
    • I’ll be playing more with this on Monday as I try to debug something into not giving me a 500 internal server error.
  • Terraform as a way of deploying AWS Resources
    • Modules, and Variables, and Data sources, oh my.
    • Debugging Terraform – I found the GET/POST requests.. the problem was a Content/Type for a resource in an S3 bucket.  Can’t get .body that way, so couldn’t get the hash value.
    • Partial apply’s because sometimes you don’t recognize a change and don’t want to mess up somebody else’s experimentation
    • I got to copy what Miss Aye Lee did, nice job Dude.
  • Rewrapping my brain around Build Configurations
    • Thanks to previous training, Build Config = Debug (PDB) vs Release, but also = XSLT Config Transforms to get configuration values per environment.
    • Now, Build Config = just Debug vs Release for “how debuggable do you want this”
    • There’s another avenue for “which settings do you want to use” which is completely different.
    • More playing with this on Monday.
  • AWS Security stuff
    • IAM User’s for local access from visual studio while developing
    • Roles for when running in Lambda, EC2, etc.  (Built by Terraform)
    • Policy documents describing what access available to what (built by Terraform), shared by the IAM and Role.
    • All the stuff that was actually built by Terraform using a Terraform runner credential
    • The Terraform Runner’s policy that allows it to create all the things
    • All running in another account that we cross-account assume roles into.
    • Somebody whose first name does not sound like XML and whose last name might have to do with Whiskey is a good teacher and dreamer.

The end result:

  • If starting from scratch – done by human.
    • cd env-shared;  terraform plan & apply to create shared resources, like S3 buckets, VPC’s, RDS’s, etc
    • Any further environment changes, also applied by human via script file.  No clicky the mouse.
  • New environment – like QA1 or QA2 or other – done by human
    • cd env-qa1 (or mkdir, if starting new)
    • copy and edit a file that says what the environment name is
    • terraform plan and apply to create all the things
      • DynamoDB tables
      • Queues
  • Every build to be deployed – automated, not done by human.
    • powershell to get stuff up to S3
    • powershell to call terraform to deploy
      • Lambda
      • API Gateway hangs out with this.

Pretty powerful stuff.     Glad I’m learning it.   It will feel better end of next week when I actually have something completely checked in that completely works.   

First time at Forecastle

imageThanks to volunteering for the Denny Crum Foundation, I got to spend some time at Forecastle.   Having known nothing, this is what I would tell myself in the future:

  • There is plenty of space if you’re willing to not be near the music.   Shade can be found
  • Sunscreen, definitely.
  • Bring an empty water bottle or Camel Bak (or buy a souvenir)
  • Bring a thing to cover up your nose and mouth if you’re at a dusty stage.
  • Yes you can bring a backpack.  
  • I personally did a Lyft in, can also bike in, and I’m sure that parking garages within 15-30 minutes walking distance were available.
  • Lots of food choices
  • Pay $10 for 10 tickets to the Bourbon lodge, and use their A/C and better restrooms.   Hang on to one ticket as a way to get back in whenever.
  • People were very nice!

What I would expect to pay for a day:

  • $65-ish for a day pass.
  • $20 for a meal.   So $40 for two, Lunch and Dinner.   That’s assuming you love food like me and don’t just get one thing.  (LOTS of food choices omg)
  • $10 for the Bourbon lodge (or spend $30 for the mug if you are there multiple days) for the better bathrooms and occasional AC relief
  • $15-$40 in parking / Lyft
  • $10 for a fancy water bottle souvenir
  • ??? for alcohol, sorry, i didn’t do that. 
  • $20 for a locker with charging.
  • Grand total: $170 for a day.
  • I probably wouldn’t go for VIP the first time around.  Granted, I didn’t see the VIP areas, and maybe for headliner bands you’d want VIP to get close.  But for a first-timer who doesn’t know any bands, I wouldn’t.

What I would pack in my bag / on my person, assuming its not raining:

  • Sunscreen
  • Hat/Cap
  • Bandana / face guard
  • Shades
  • Favorite water receptacle
  • TP, hand sanitizer
  • Wallet (only need ID and card and cash)
  • Cellphone
  • Battery pack and cable (if not getting the locker)

I would dress in:

  • Cargo shorts with at least 1 zipper pocket
  • Athletic moisture wicking shirt
  • Sandals or Sliders – best for sweat control. (but I’m pretty good at walking in those, you may want to upgrade to shoes for lots of walking)

============

I had a blast.  I stood in the shade, and old-man-danced, and carded people and lovingly put wristbands on them. 

Standard line:  “1973 .. Great year!” “Why?” “Because you were born!”.    (watch person melt)

I could hear music from two stages from the Bourbon tent, and it was some good stuff.   Jonathan Israel worked tirelessly .. 13 hours each day on his feet .. directing the volunteers and being the guy to direct all awkward questions to.   Once I learned the 3-5 pieces of info that people needed to know, it was very easy to engage my inner extrovert. 

Will definitely do again.  July 13-15, 2018.

Miscellany 17.7.0?

imageSometimes, I feel like I’m failing this blog.  This blog was supposed to highlight all the awesome new stuff I was learning .. on my job, mostly. 

That is not what I’ve learned from, lately.

Its only been 15 days or so since my last miscellany post.   In those last 15 days, my work has been:

  • Images and CSS and javascript, small changes.
  • “Why did X happen?” .. let me check the source code that we didn’t write .. trace it through 3-4 layers … here’s why that happened.  Your options are A,B,C.
  • How to route network cables neatly (Actually.. this is huge.  My 20yo self wishes he knew this).
  • Lots about door security systems.  I might have covered that in another post.

The rest of life has been interesting –

  • Refining my Rubik’s Cube skills.    I’m considering memorizing the Ortega method.  It brings back some magic.
  • Arranging a Disc Golf outing with some friends.   Researching form, practicing, getting better at it. We have 3 courses to choose from!
  • After way too long off, went out for a run again .. this time in FitKicks.  2 miles.  Maybe not such a good idea, i think i need a size smaller maybe.  Next race in less than 2 weeks!
  • Considering signing up for the triple crown and Derby Half-marathon for 2018.  Because Goals.  Also, a membership to the YMCA.
  • My grandson does just about anything and I melt.
  • Bose QC35 Headset.   Forking expen$ive, but yet…  the best tool for its job?  I was in a loud urban environment, and I could participate on a conference call without any problems.   Connecting to two devices at the same time really works for me (laptop + phone), and .. I find myself no longer dreading phone calls.   I’d rather do a phone call with these on than any other way.  Here’s a negative review for some contrast.
  • Mozza Pi – new place in Anchorage.  Worthy of a visit.  They’re not open for dinner yet, want to get their process honed before they ramp up.

I’m getting pretty excited – past the 50% mark on studying for the AWS Solution Architect Associate exam.   The last course on VPC’s really dialed in some stuff that I was wondering about. 

I don’t know that I’m going to get any time for my personal projects .. not for a while.  I think “exercising my body” has taken over for the summer.   And that’s okay.

Cheers

Revisiting the world of Linux and Rescue boot up disks and wiping hard drives

One of my newer roles at work is being the backup systems-admin-fix-your-network-cable-and-coffee-maker-and-upgrade-ram guy.   Whatever you call that role. 

In that role, I needed to wipe clean some machines that are leaving our premises..

It has been fun.  Along the way, this is what I learned:

  • https://www.pendrivelinux.com/  will take care of all the “let me format that USB stick for you and load an ISO on it” needs under Windows.
  • http://www.system-rescue-cd.org/ is a great little rescue disk that has a good set of utilities, including running in a graphical mode with terminals.  That way I could wipe and check cpuinfo / meminfo at the same time.   Has tools for mounting NTFS partitions as well.
  • https://github.com/martijnvanbrummelen/nwipe/  if started without args runs a text based UI that lets you choose which drives to wipe, and what algorithms to use, and is about as fast as dd.  Perhaps faster, as it will wipe multiple drives at the same time, without the need for &.
  • Some motherboards capped hard drive writes at about 34MB/s, others were at 134MB/s.. big difference.   Both were SSD.
  • Smallest USB stick i could get at Walgreens was 8GB. 

This was fun.  Looking forward to other such stuff in my new role.. just let me at that network IP address inventory!!!!  (Not a priority at this time)

Miscellany 17.6

imageBusy busy .. we’ve had a house getting interior painted, and interior carpeted, and most of my home time has been spent tearing down and putting things back.   Not much time for projects.

At work, though, several new skills.  I’ve done a lot more infrastructure stuff, which has included:

SSL stuff

  • Dealing much more with SSL certs.  I now know PFX vs CRT vs PEM vs CSR, etc.  I had to rekey a cert because the person who requested it didn’t know how to get me the private key they used, and .. AWS Elastic Beanstalk builds CPU’s on the fly, so you have to shove the PFX in after the build.  
  • Using openssl to move these things around.. running from bash under ubuntu under windows, the official one.

Building and Network stuff

  • Dealing with a Card / Fob / PIN system for building access.  They break it down to:
    • The doors (and readers)
    • The “timezones” (actually sets of T1..T2 timeslots unioned together)
    • The Access Levels, which are a combo of DOOR: (Readers) x Timezones
    • The card, which is a union of Access Levels
    • And there’s other shit like multi-panel transfers, and web admin accounts, and stuff.
  • Helping with an office move .. odds and ends.  I’m the backup to the main sysop.
  • Figuring out easy ways to do patch cable management.    And cleaning up cables in general.  My 20-y-o self would squirm, but I finally have the patience now at 45.  Or am I 46?  I forget.

AWS Stuff

  • The learning curve continues.    40% of the way through the course.  I’m delaying taking quizzes till several days after listening to the material, to verify that I’m doing things from long term storage.
  • I really want to program with the stuff, but that’s not my scope right now.

Billable Work

Nothing terribly exciting.   Except the ones in bold.  Its been a splattering of things —

  • SSL Certs in an AWS EB site
  • MVC website carousel updates
  • Tracking down why some stuff blew up (in code we didn’t write)
  • Some lost source code.  Decompilation to the rescue!  Updated some SQL that has started to fail.
  • Some .Net custom code for Peak21 ERP system – testing and rewriting and proving that an API was broken.
  • Oracle ERP system moves, changing connection strings and testing things
  • Adding Fedex shipping to a website instead of UPS, via Shippo.  Some refactoring to get things more configurable.
  • Using Feature flags a lot more, because that way the code can get out there, and then await other configuration to catch up.  FSGD!

My biggest challenge is not feeling rushed, feeling the weight of everything in my list bearing down on me, along with the craziness of learning things on the fly.

Changing Schedules

I’m trying to wake up earlier .. so that I can spend time at Starbucks .. do a little journaling, keep track of bills and fiscal transactions, write an email to my recovery sponsor.. start my day off right.  Hit rate: 60%.  Benefit: 200%.

Diet Experiments

https://www.jimmyjoy.com/products/plenny-shake is delicious.  It does clean me out a bit, but the energy curve on it is nice and stable.  When I’m on it, I crave sugar way less.. I get full faster.  I will be reordering it.   Tastes way better than soylent, IMO.

Running

Two 5k’s done.. several more to go.   I have heart rate, date, and pace information .. should make for an interesting plot.  

Home Office Organization

I made an inventory of stuff, and sorted it by:  Visibility, Usage, Importance, Replacement value, Sentimentality.  And used that to figure out what went on which shelves, etc, and what to release.

 

 

That’s it for now.  I expect my world might clear up a bit around July.

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.

Commute 3D print: 1/3: nodejs, openjscad, vscode

I have had a project in my brain for a long time – I think I first mentioned it in 2013*

The problem is, it wouldn’t go away.  It started to .. stink.  In my mind, stale, and stinking, and in my mind.   It had to be done.

The gist of the project is:

  • Take several ways of driving to work
  • Plot them out in 3D space with Time on the Z-Axis, in a virtual race as it were
  • Should be able to see things like stoplights show up as vertical bars

Well, I got tired of thinking about it, decided to do it.  I was spurred on by finding out that “jscad”, which I had known as openjscad.org, was now available as a node module — https://www.npmjs.com/package/jscad.  Okay, lets do this!

* Here’s a first reference: Car Stats: Boogers! Foiled!  1/11/2013  … There’s a few other posts just prior where I had been plotting interesting things from car track data, using powershell.

The implementation details

image

The above screenshot shows a sample output with some initial tracks, but .. they are the wrong tracks.  I’ll be recording the correct tracks later.

  • I created a “Base” for the sculpture by also drawing all the tracks along Z=0, but a little bit wider.
  • I made it a bit more stable by putting a “Pillar” up to the other end of the track, so its supported.

Code at: https://github.com/sunnywiz/commute3d .. the version as of 4/29/2017 11:57pm should be runnable to give the above output.

image

It took me probably 12 hours spread over 3 days …  here are some of the things I learned along the way:

chocolatey install nodejs

I’ve taken to using chocolatey to install windows packages so I don’t have to go hunt things down on the internet.   Most of my machines have it, its part of me setting up the machine.

I could totally install nodejs via chocolatey – and once installed, that gave me npm.

image

The command line, btw, would be:   cinst –y nodejs

npm init

This bit will seem silly to people who’ve been using it for a while, but these were the walls I had to hit.

image

Can’t npm install a package (everybody says “run this command” – it doesnt work) … until you’ve first “npm init” started a project.  I was thinking it was like CPAN where you added a package to a central repo and it was available, but nope, its more like “local depdency per project” more like nuget.  Makes sense, my CPAN (Perl) was was from 1998 and the world has changed since then.

node is awesome

It feels like the days of Perl way back.   Need something?  There’s a library.  Install it, use it, move on, solve the problem.  

VSCode is awesome

image

Editing and debugging is a LOT easier if you use an appropriate developer environment.  I tried vscode, and much to my surprise, I found it could:

  • Edit with intellisense (I knew this, but didn’t realize how fast it was)
  • Debug!  Watch!  Inspect!  OMG!   Very similar to Chrome Dev Tools.
  • Integrated terminal
  • Integrated git awareness and commits and pushes
  • Split screen yadda yadda
  • Very Nice.

nodejs asynchronous can be a learning curve

Take these two bits of code:

image

image

The first problem I had was that It would go to read all the tracks in … asynchronously.  I didn’t have a way to wait till all the tracks were read before it continued on to doing something with the tracks.

That lead me to some confusing code using “Promises.map”.  Then I found out that, most folks do const Promises = require(‘bluebird’)!    There’s a library that makes things easier.

So, if you’re not aware, and explaining to my future self:

  • Call readtracks .. its an async call
  • It returns a promise.
  • the implementation of readtracks eventually either calls resolve or reject (in my case, resolve).
  • At that point, the promise’s “then” clause gets run.
  • the glob … function (er, files)  is a “normal” nodejs callback strategy at the level below promises .. doesn’t rely on promises, its doing a directly specified callback.
  • the bluebird.map() basically does a foreach() on files, for each one, runs filename through a function, takes the result of that function, sticks it in an array.  It does this in a promise…
  • … which when its done with all the things, then calls resolve
  • the text fileName => readTrack(fileName) is the same as function(fileName) { return readTrack(fileName) }.
  • when you have promises, there’s a way of writing them out using “async” and “await”.    I didn’t try that.
  • the .then(resolve) is the same as .then(function( x ) { resolve(x); } )

The other beginner mistake that I kept making – I would forget to say “new” when I meant to create a new object.  Smile 

So I want to join two points in 3d space with a beam

I spent an embarrassingly long time trying to figure out how to take a cube, and scale it and rotate it and transform it so it acts as a beam between (x1,y1,z1) and (x2,y2,z2).

The answer is: 

image

The resolution:4 gives it four edges.

I need to view .STL files on my machine

3D Builder is a windows program that would let me do it, but it hung sometimes.

The easier route was to drag the model over to http://www.viewstl.com/  (which is what I did for the screenshot with this blog post).

Netfabb got Bought Out

Once upon a time, I found some really nice software .. which I thought I liked enough to give them real money.   Looking back, I cant find a record of giving them money… I guess I intended to at one point.

In the time that I haven’t been doing 3D printing, apparently AutoDesk bought them out, and.. the new cost is $125 PER MONTH.  Uh, no.   While researching for this blog post, I did manage to find a binary of the old netfabb Studio Basic, so I snagged that.   I saved my emails with the keys that I had used to activate it in the past, and those seemed to work, so Yay!

CSG Unioning of 1000+ things takes a long time

I also discovered console.time() while benching this.

When running the program, I end up with a bunch of CSG’s, but they’re all intersecting.  I need to merge them together to get a printable thing.

That code, when run for a larger print (100 tracks), took all of 18 hours to do the merging.  That was … too much.   So, I tried to write a program to make the merging easier.

1029 items (spheres, cylinders, boxes) unioned together, NO DEBUGGER, yielding a CSG with 11935 polygons:

  • If I union them in a for loop one after the other
    • 34 minutes!
    • It gets slower over time.
    • there’s a O(N^2) probably that happens under the hood – it has to re-consider the same shape over and over as it tries to add new shapes.
  • If I union them using a binary tree tactic:
    • 42 seconds!!!
  • The actual numbers:
    • image
  • There’s probably libraries out there that specializing in union arrays of CSGs, rather than two objects at a time.   Maybe I’ll upgrade at some point.

image

Note that if I upload the non-unioned version to somebody like sculpteo, they have an “auto-fixer” tool that fixes things pretty quickly, this is not absolutely necessary.  Just .. feels mathematically clean to do it.

I did try to write the above fancyUnion using promises, but .. didn’t help.  Node still only uses one thread, it did not branch out to multithreading. 

3 Major sources of Documentation for jscad / openjscad / csg:

Conclusion

Code is written!   

I’m going to hopefully get some tracks recorded over this week.

I’ll make another post of how the printing process goes with the real sculpture.