Replies: 3 comments 6 replies
-
This isn't easy but here is some code to generate the diamond pattern: from build123d import *
from ocp_vscode import show_all
import copy
radius = 3
pitch = 20
gap = 0.1
repeats = 12
# Create the perimeter Edges of a single diamond
right0 = Pos(Z=-pitch / (2 * repeats) + gap) * Helix(
pitch=pitch, height=pitch / (2 * repeats) - gap, radius=radius
)
left0 = Pos(Z=-pitch / (2 * repeats) + gap) * Helix(
pitch=pitch, height=pitch / (2 * repeats) - gap, radius=radius, lefthand=True
)
right1 = right0.mirror(Plane.XY)
left1 = left0.mirror(Plane.XY)
# Create a single diamond
diamond_perimeter = Wire([right0, right1, left0, left1])
diamond = thicken(-Face.make_surface(diamond_perimeter), 0.1)
# Create many diamonds from copies of the single diamond
diamonds = [
Pos(Z=row * pitch / (2 * repeats))
* (Rot(Z=(col + (row % 2) * 0.5) * 360 / repeats) * copy.copy(diamond))
for row in range(3)
for col in range(repeats)
]
# Create a single diamond pattern object
diamond_pattern = Compound(children=diamonds)
show_all() The |
Beta Was this translation helpful? Give feedback.
-
Thank you @gumyr. I didn't expect it to be easy. I'm just wondering if rather than building diamond tiles, would it be possible to subtract straight line grooves starting with solid plain rubber layer? Before wrapping layer of rubber around the cylinder and gluing it |
Beta Was this translation helpful? Give feedback.
-
Sorry, I spoke too soon. When I try to run your code, I get the following error related to Solid.extrude_linear_with_rotation():
I even upgraded to latest CQEditor jgenestein fork, still the same error. |
Beta Was this translation helpful? Give feedback.
-
I need help with creating grooved patterns such as diamond on a cylinder. Basically these are rubber layers let's say 1/2" thick with a grooved diamond patterns 1/8" deep, like one shown on the attachment. To make things harder, these cylinders are most of the time slightly tapered towards the edges with a flat portion in the middle.
![lagging](https://private-user-images.githubusercontent.com/2590744/399104106-9a223450-a41c-4158-a762-c86d51228633.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwNjU2ODMsIm5iZiI6MTczOTA2NTM4MywicGF0aCI6Ii8yNTkwNzQ0LzM5OTEwNDEwNi05YTIyMzQ1MC1hNDFjLTQxNTgtYTc2Mi1jODZkNTEyMjg2MzMuanBnP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwOSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDlUMDE0MzAzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OTNhYWIzNjliODdjODE2YWMyYjk4ZDQ5MDRlNTljMmQwYmEwZDhhM2IwMDAzN2E1ZTgyYmIxZmVhYWM2M2UwOSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.rzTKZOzi6rqetdPfqb5KUHPqzIkgfScNuZBugJCTNlg)
Beta Was this translation helpful? Give feedback.
All reactions