Sunday, November 15, 2026

3D Printing a Replacement Hook for an RC Jeep — From One Photo

One phone photo and two ruler measurements were enough to get a printable replacement for the winch hook our twins lost off their RC Jeep. No 3D scanner, no 360° photo session, no CAD skills.

The lost hook

We bought the twins matching remote control Jeeps, and each one came with a little black winch hook on a cord. Within a few weeks one of the hooks was gone. Nobody knows where, and the carpet isn't telling.

The surviving hook is a simple part: an eye at the top for the cord, a thick shank, and a J-shaped curve at the bottom. It's about 2.5 cm tall and 1.5 cm wide at the widest point. It looked like exactly the kind of thing a 3D printer is good at, if I could just get a model of it.

Why I skipped the 3D scanning apps

The scanning apps I knew about use photogrammetry. You walk around the object taking dozens of photos from every angle, and the app stitches them into a 3D mesh. That works well for complex, organic shapes. For a 2.5 cm piece of shiny black plastic, it's a tough job: small, dark, glossy objects are some of the hardest things for those apps to capture cleanly.

More importantly, it was overkill. This hook is essentially a flat profile with rounded edges. Everything that makes it a hook (the eye, the shank, the curve) is visible in a single photo taken straight on. The third dimension is just thickness. If I could trace the outline and give it a thickness, I'd have the part.

The approach: one photo, two measurements

I set the surviving hook on the carpet, took one photo with my phone from directly above, and put it in a folder on my computer. Then I asked Claude, Anthropic's AI assistant, for help:

The surviving hook, photographed straight down on the carpet

The one and only input photo: the surviving hook, shot straight down.

Can you make a stl 3d printable model of the hook that I can replace a missing one from? This hook is about 2.5cm long at the longest and 1.5cm wide at the widest. It doesn't need to be pixel perfect... just roughly the same.

That was the whole input: the photo, the overall height and width, and permission to be approximate. Claude had access to the folder through the Claude desktop app, so it could look at the photo directly and write the finished files back into the same folder.

A few minutes later I had an STL file sitting next to the photo, plus a rendered preview to compare against the real thing.

Behind the scenes: what Claude actually did

The part I found most interesting was how the model got built. There was no tracing tool and no CAD program. The hook was described entirely in Python code, then converted to a mesh and checked like any other piece of software.

  1. Looked at the folder. It held the photo (PXL_20261101_172606934.jpg) and a first version of a generator script, generate_hook.py, that was already in the folder.
  2. Read the photo and the script. Claude viewed the photo and compared it to the shape described in the script, checking that the eye, shank and hook curve lined up with what the photo showed.
  3. Described the outline as math. The script defines the hook's 2D outline as a signed distance field: a function that tells you, for any point, how far it is from the edge of the hook (negative inside, positive outside). The outline is built from three simple pieces:
    • a circle for the eye, about 8.6 mm across, with a 4.3 mm hole for the cord
    • a smooth curved "spine" through 9 control points, each with its own thickness, so the shank swells to its widest at the belly and tapers toward the tip
    • a circle subtracted from the inside of the J, so the throat of the hook stays cleanly open
  4. Gave it thickness. The flat outline was extruded to 4.5 mm thick, with 1.55 mm rounded edges all around. Both faces stay flat, so it lies on the print bed with no supports.
  5. Rendered a preview and compared it to the photo. The script draws a shaded front view on a 5 mm grid and a tilted 3D view. The silhouette matched the real hook closely enough that no shape changes were needed.
  6. Built the first mesh and checked it. The script's built-in mesher produced about 120,000 triangles. Claude then counted how many triangles share each edge. In a clean, closed solid, every edge is shared by exactly two triangles. This mesh had 12 edges that weren't, a small defect most slicers would quietly repair, but not something worth shipping.
  7. Tried a quick fix, then a better method. Nudging the sampling grid only reduced the bad edges to 4, then 1. So Claude wrote a short new script, build_stl.py, that rebuilds the mesh with the marching cubes algorithm from the scikit-image library, then nudges every vertex exactly onto the hook's surface.
  8. Verified the final file. The rebuilt mesh came out with 0 bad edges and consistent triangle orientation, which means it's watertight and slices cleanly. Final numbers: 15.0 × 25.0 × 4.5 mm, 290,840 triangles, about 790 mm³ of plastic.
  9. Saved the results back to my folder: rc_jeep_hook.stl, the preview image, and build_stl.py.

Here's the core of the shape definition, the list of points the hook's spine passes through. Each row is an x and y position in millimeters plus the thickness at that point:

spine_ctrl = [
    [5.65, 19.20, 3.30],  # Inside eyelet base
    [5.20, 15.20, 2.85],  # Neck
    [3.60, 10.00, 3.45],  # Left belly (thickest part of the shank)
    [4.10,  5.60, 3.30],  # Lower left bend
    [6.60,  3.15, 3.10],  # Bottom-most bend
    [10.00, 3.25, 2.85],  # Lower right bend
    [12.55, 5.45, 2.35],  # Right curve rising toward tip
    [13.45, 8.35, 1.80],  # Upper right tip curve
    [13.15, 10.10, 1.50], # Rounded hook tip
]

And the check that caught the defect, simplified:

# Every edge of a closed solid should belong to exactly 2 triangles
edges = np.sort(np.concatenate([f[:, [0, 1]], f[:, [1, 2]], f[:, [2, 0]]]), axis=1)
_, counts = np.unique(edges, axis=0, return_counts=True)
print("bad edges:", (counts != 2).sum())   # first mesh: 12, final mesh: 0

The nice thing about a shape defined this way is that it's easy to tweak. Want the hook 10% bigger, or a larger hole for a thicker cord? Change a number and rerun the script.

The result and printing tips

The finished model is 25 mm tall, 15 mm wide and 4.5 mm thick, with the same eye, shank and J-curve as the original. It isn't a pixel-perfect copy, but it doesn't need to be: it just has to hold the cord and look right next to its twin.

Rendered preview of the 3D model: front view on a 5 mm grid and a tilted 3D view

The generated model: front view on a 5 mm grid (left) and a tilted 3D view (right).

Setting

Recommendation

Orientation

Lay it flat. Both faces are flat, so no supports are needed.

Material

PETG or ABS if the winch pulls hard; PLA is fine for light play.

Strength

100% infill, or at least 4 walls. It's a small part, so this costs almost nothing.

Size

Scale it in your slicer if your hook is a bit bigger or smaller.

If your kids' Jeep uses a different hook, the same trick works for any part that's basically flat: one straight-on photo, the overall dimensions, and a request for an STL.

Friday, November 7, 2025

XConnect certs from DigiCert Need Client Authentication or XDB services will get Forbidden errors

ATTENTION all DigiCert customers who mint certificates for Sitecore's XConnect. They have discontinued automatically adding the Client Authentication extended usage to the cert.



See their bulletin here:

Sunsetting the client authentication EKU from DigiCert public TLS certificates


If you aren't careful and ignore the extra radio button selection during the creation of the certificate, you will have unhealthy XConnect services.  And you'll spend hours troubleshooting the configs, thumbprint values, key permissions, etc.  Because the error message is a familiar client validation error.

Message: The HTTP response was not successful: Forbidden


Sitecore also provides some helpful troubleshooting steps in case this issue is unrelated to your errors.  Check them out here:  How-to's - Troubleshooting xConnect certificate issues


 Notice that the DigiCert announcement also warns that you'll have to plan accordingly for anything minted after May 1, 2026.

Sunday, August 20, 2023

Pixel Phone Owners using eSIM - Get a Backup physical SIM immediately!!!

I was on vacation and my billing cycle ended with Google Fi.  I had changed my subscription plan mid-month so it would upgrade to unlimited data for the next billing month because I would be mostly travelling that month. 

A plan change must initiate an eSIM update and it failed. Not only did my plan upgrade fail to apply, but I could not get any service activated on my phone from Google Fi then.  Hours on chat with Google Fi, numerous emails with screenshots and debug logs back and forth, and resetting my phone twice.  Nothing allowed the Google Fi app to activate my eSIM.

Two weeks later and I returned back to the states and got a new physical SIM for Google Fi and everything works now. Googling, you'll find numerous reports of users with Pixels and eSIMs that stop working. Some blame security patches in Android, some blame the carrier (Google Fi), some blame the Pixel hardware. All I know is you can't trust eSIM and when it's broken, no cell service makes it difficult to do a lot of things. I will never trust eSIM technology again. And I think I may travel with a backup SIM card even. I learned that lesson the hard way.

If you use Google Fi, they'll send you an SIM card for free: https://fi.google.com/order-sim.  Do it now!

Monday, September 30, 2019

Override xaml.xml files in the ~/sitecore/shell/override folder

Occasionally you'll have the desire to add your own custom functionality to dialogs in the Content Editor.  Many of these dialogs can be found under the ~/sitecore/shell/ folder.

Sitecore already comes pre-configured to look in the ~/sitecore/shell/override to find override XmlControls under the node.  That is baked into the Sitecore.config file.

<controlSources>
  <source mode="on" namespace="Sitecore.Web.UI.XmlControls" folder="/sitecore/shell/override" deep="true"/>

This allows you to drop into that folder your customized .xml dialog file that contains your own layout and custom CodeBeside.  The Content Editor will load that one instead of the Sitecore coded one.

However some of the controls under the ~/sitecore/shell/ folder are built with a different technology.

(To read more about the two different control types, Mark Stiles has done an amazing job at documenting them: https://markstiles.net/blog/2014/1/5/sheer-ui-1-a-tale-of-two-systems/)

The extension of these controls is xaml.xml.  Sitecore defines where it finds these controls in the xamlSharp.config file.  Oddly enough, this one doesn't include the  ~/sitecore/shell/override folder.

It is simple to create your own override config for this in Sitecore.

1. Create a new file called xamlSharpOverride.config

2. It should contain the following:
<configuration>
  <sitecore>
    <xamlsharp>
      <sources>
        <source type="Sitecore.Web.UI.XamlSharp.Xaml.XamlFileControlSource,Sitecore.Kernel" patch:before="*">
          <watchers hint="list:AddWatcher">
            <watcher type="Sitecore.Web.UI.XamlSharp.Xaml.XamlFileWatcher,Sitecore.Kernel">
              <folder>/sitecore/shell/override</folder>
              <filter>*.xaml.xml</filter>
              <codefilter>*.xaml.xml.cs</codefilter>
              <includesubdirectories>true</includesubdirectories>
            </watcher>
          </watchers>
        </source>
      </sources>
    </xamlsharp>
  </sitecore>
</configuration>

This config will insert that source folder at the top of the xamlSharp sources list.  Any .xaml.xml file you customize can now be placed into the ~/sitecore/shell/override folder.

Wednesday, May 1, 2019

You can skip the WITH(NOLOCK) when querying Sitecore's dbo.Fields sql view

Don't worry about adding a NOLOCK hint to your SELECT queries against the Fields view in Sitecore.  They already include that hint on all of the tables.


SELECT id, 
       itemid, 
       '' AS Language, 
       fieldid, 
       value, 
       created, 
       updated 
FROM   dbo.sharedfields WITH (nolock) 
UNION ALL 
SELECT id, 
       itemid, 
       language, 
       fieldid, 
       value, 
       created, 
       updated 
FROM   dbo.unversionedfields WITH (nolock) 
UNION ALL 
SELECT dbo.versionedfields.id, 
       dbo.versionedfields.itemid, 
       dbo.versionedfields.language, 
       dbo.versionedfields.fieldid, 
       dbo.versionedfields.value, 
       dbo.versionedfields.created, 
       dbo.versionedfields.updated 
FROM   dbo.versionedfields WITH (nolock) 
       INNER JOIN (SELECT itemid, 
                          language, 
                          Max(version) AS Version 
                   FROM   dbo.versionedfields AS VersionedFields_1 WITH (nolock) 
                   GROUP  BY itemid, 
                             language) AS b 
               ON dbo.versionedfields.itemid = b.itemid 
                  AND dbo.versionedfields.language = b.language 
                  AND dbo.versionedfields.version = b.version 

Wednesday, October 10, 2018

Alexa Skill Developer #1 Support Issue for Me

I took a long hiatus from building skills and am just getting back into it.  I made some dumb mistakes getting stuff to work.  But recently I realized it wasn't always my dumb mistakes.  I ran into an issue twice where all I had to do was "reboot" my Alexa skill.  Equivalent of the the favorite help desk suggestion of turn it off and back on again; unplug it and plug it back in.




Flipping the Test is enabled for this skill was required a couple of times that I remember.

  1. I updated my invocation phrase and rebuilt my models, but things did not work right until I toggled this switch.
  2. After having my certification fail, I tried testing my interactions again and my skill didn't respond.  Toggling the switch fixed that also.
So, when all else fails... flip this switch off and on again.

Friday, August 18, 2017

Don't Let Microsoft SQL Round Your DateTime Field's Milliseconds

I needed to export some data out of Application Insights and save it locally.  While doing a sanity check, I realized that some of my datetime values were not the same.

Therefore, I created a simple test.
  1. Create a table with just a datetime field.
  2. Insert the value I expected.
  3. Select that data back out and witness the rounded value.



I finally found an answer here:
https://stackoverflow.com/questions/36414315/inserting-datetime-with-milliseconds-into-sql-server-table-issue

MS SQL rounds the DateTime field in increments of .000, .003, and .007.  I would assume that means it is saving on memory space behind the scenes by only offering 3 options for the single digit of milliseconds?

Whatever the case, if precision is necessary (as it was for the Application Insights data I was getting),  use the newer datetime2(3) field definition.