Last active
January 27, 2020 14:52
-
-
Save StudioLE/ead3ee485787dbbed1a52ef26f769716 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
b = brick; | |
footprint = Rectangle.ByWidthLength(b.Width, b.Length); | |
surface = Surface.ByPatch(footprint); | |
base = surface.Thicken(6/5, false); | |
p1 = [Imperative] | |
{ | |
points = []; | |
w = b.Width / 2 - 0.5; | |
l = b.Length / 2 - 0.5; | |
for(x in (w * -1)..w) | |
{ | |
for(y in (l * -1)..l) | |
{ | |
p = Point.ByCoordinates(x, y, 6/5); | |
points = List.AddItemToEnd(p, points); | |
} | |
} | |
return points; | |
}; | |
p2 = Autodesk.Geometry.Translate(p1, 0, 0, 1/5); | |
studs = Cylinder.ByPointsRadius(p1, p2, 1.5/5); | |
parts = List.Flatten([base, studs], 1); | |
Autodesk.Solid.ByUnion(parts); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment