Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

Announcing a FS to hack slicer reinforcements by injecting defects into the part

kenn_sebesta167
kenn_sebesta167 Member Posts: 121 ✭✭✭
edited August 12 in FeatureScript

https://cad.onshape.com/documents/b95216af1e90e786deb23796/w/2ecd2d07e99b4ff6ba9897e3/e/62dfca14b08639924f9223fe

Screenshot 2026-08-11 at 10.10.12 PM.png

I made an FS that strengthens chosen regions of 3D prints without touching slicer settings, and it does it in the slightly stupid way of filling a region with spherical voids.

The trick is that slicers put walls around every internal cavity. If you seed a volume with a bunch of bubbles, the slicer puts perimeters all through that volume and you get something close to locally solid infill. This reinforces the part locally, without depending on using slicer settings to force different infill density.

Screenshot 2026-08-11 at 10.10.36 PM.png

Using it: model a tool body over the region you want reinforced, pick the target part, set a ball radius and a defect density in holes/cm^3 (which is the peak density if using linear/quadratic falloff). Density can be uniform through the region, or decay linearly or quadratically from the center for a strong core that fades out to normal infill. The skin thickness input keeps voids at least that far inside the part's outer surface, so hopefully surface finish and outer walls are untouched. There's a random seed so layouts are reproducible, and a debug checkbox that can show you the balls without cutting anything.

Screenshot 2026-08-11 at 10.12.29 PM.png

(AI generated text): A note for anyone writing FeatureScript: generating random points sounds trivial and is not. FS numbers are doubles, so the classic C rand() LCG constants silently overflow the 53-bit exact-integer range and your "random" sequence quietly turns to garbage. What finally worked: Numerical Recipes constants (a = 1664525, c = 1013904223, m = 2^32) with the modulo done as x - floor(x/m)*m, which keeps every intermediate below 2^53 and exact in doubles. If your feature needs randomness, steal that.

P.S> I cannot remember whose youtube video inspired this. Please let me know if you have the link or any information I could use to track it down.

Comments

  • kenn_sebesta167
    kenn_sebesta167 Member Posts: 121 ✭✭✭
    edited August 12

    Worth remarking, we can't predict on a case-by-case basis how much this impacts strength and stiffness. You'll always want to test for optimal density.

  • martin_kopplow
    martin_kopplow Member Posts: 1,611 PRO

    I've been using "alomost zero thickness" surfaces to create internal reinforcements and can confirm the approach actually works. I do not see the point for the micro spheres, though. They appear a bit too much random to me.

  • kenn_sebesta167
    kenn_sebesta167 Member Posts: 121 ✭✭✭
    edited August 12

    Randomness certainly isn't ideal for guaranteeing part properties. That said, the microspheres provide some level of isometric behavior in the joint, which helps somewhat. And load paths through infill is already a stochastic process, so adding this on top should just be multiplying a gaussian by a gaussian, resulting in a gaussian.

    I'd not be surprised at all to learn that other shapes could be generally better, since the FDM process already has anisometric strength properties along the layer lines.

    I'd love to know how you go about creating the zero-thickness surfaces. There's no reason this FS can't be extended to support other shapes and distribution algorithms as well.

  • martin_kopplow
    martin_kopplow Member Posts: 1,611 PRO

    My "Almost Zero Thickness Surfaces" usually act more like ribs within the infill. Them being almost zero ensures the wall material they provoke will still stick together. A typical case would be to have a set of radial ribs around a load bearing hole.

    Screenshot 2026-08-13 123543.png

    https://cad.onshape.com/documents/bc7a9d77124a7c5da8f41ae8/w/1207bc6f4cfb720c01551047/e/0e76a73fda747552df6adebb?renderMode=0&uiState=6a7d9ed623f8313b3b41469a