1

I'm completely uneducated in this area of expertise. I would like to automate placements of support posts on shapes, specifically letters. Basically I'm screwing large, physical 3D letters to a wall and I want to automate the optimal placement of the screws; Not enough screws in the right locations makes it brittle, but too many screws adds unnecessary hardware and labor costs. And currently we are placing each support by eye/hand and would love to automate this, or make it mostly automated and we can make the final adjustments.

Here is an example image of screw placements I made by hand:

Here is an example image of screw placements I made by hand

What area should I research to achieve similar results?

Medial Axis, Straight Skeleton, Voronoi Diagram, Delaunay Triangulation, Decomposing Polygonal Domains?

I'm completely lost where to start research and development.

Spektre
  • 49,595
  • 11
  • 110
  • 380
  • 2
    Can you express more specific placement rules ? Where should a screw be placed ? Where not ? How do yo choose the placement empirically ? –  Oct 03 '22 at 06:17
  • 2
    In principle, two screws are always enough ! –  Oct 03 '22 at 07:11

1 Answers1

1

I would start with:

  1. do inward edge grow fill

    to create distance to edge map so usual growth fill looks like:


    fill empty space with 0, edge with 1 and interior with -1 (or some big value).
    Then recolor all -1 neighboring 1 to 2
    Then recolor all -1 neighboring 2 to 3
    Then recolor all -1 neighboring 3 to 4 and so on until no -1 is left

  2. find local max

    in resulting map find all pixels that have no bigger neighbor and label them After that just find center (average) of each labels. This is possible screw placement.

    This will give you local maxima which are the centers of thicker parts of shape which are ideal for screw placement.

  3. find central line of you shape

    store it as list(s) of consequent coordinates. You can use A* path finding for this (path between the labeled local maxima. That will disect your shape to several curves. To have better shape of the inline you can add the distance to edge value from #1 into the A* costs to prefer staying in thicker parts of shape.

    There are also other approaches for getting the central line like horizontal and vertical ray casting remembering center of intersected parts of shape and then combining them together, or thinning DIP filter. And finaly using A* to order the resulting points and disect them to polylines between crossings.

  4. now place N screws along the polylines

    either evenly, or biased by weight (thickness) you can also do a field simulation where the screws are repelled by each other and pulled towards thicker area.

    The number of screws might be computed from shape size (how many pixels its infill has which can be obtained during the #1

However I did not test this yet so handle this more like hints which way to go...

Spektre
  • 49,595
  • 11
  • 110
  • 380