Creating a Name Plate

Christopher Hanusa
http://qc.edu/~chanusa
chanusa@qc.cuny.edu

Shapes

Shape Examples

Graphics[Disk[{0,0},5]]

Graphics[Disk[{0,0},{6,4}]]

Graphics[RegularPolygon[6]]

Graphics[Rectangle[{0,0},{2,1}]]

Code to Discretize:

shape=DiscretizeGraphics[Graphics[Rectangle[{0,0},{2,1}]]]

Images

Drag and drop your image here.

flower=;

Code to discretize.

image=ImageMesh[ColorNegate[flower]]

Text

word=Text[Style["word",Bold,FontFamily->"Bauhaus 93",FontSize->50]]

text=DiscretizeGraphics[word,_Text]

Resize and overlap

resizedShape=RegionResize[shape,1.3];
resizedImage=RegionResize[image,1];
translatedShape=TransformedRegion[resizedShape,TranslationTransform[-Map[Mean,RegionBounds[resizedShape]]]];
translatedImage=TransformedRegion[resizedImage,TranslationTransform[-Map[Mean,RegionBounds[resizedImage]]]];
Show[translatedShape,translatedImage]

background=translatedShape;
foreground=translatedImage;
middle=BoundaryDiscretizeRegion[RegionDifference[background,foreground]]

outerboundary=RegionBoundary[background];
innerboundary=RegionBoundary[foreground];

nameplate=Show[{
RegionProduct[background,Point[{{0.}}]],
RegionProduct[outerboundary,Line[{{0.},{.1}}]],
RegionProduct[middle,Point[{{.1}}]],
RegionProduct[innerboundary,Line[{{.1},{.2}}]],
RegionProduct[foreground,Point[{{.2}}]]
}]

Export[NotebookDirectory[]<>"nameplate.stl",nameplate]