26 Dec 2023 |
| dorianrudolph joined the room. | 14:37:17 |
| icywhite13 joined the room. | 15:14:07 |
| keane0000 joined the room. | 18:21:20 |
| magicguacamole joined the room. | 21:49:49 |
| jenmei. joined the room. | 22:45:37 |
27 Dec 2023 |
halogenix | Hi everyone. I’m searching for a solution to put some text on different coordinate on a 2D surface. I tried to change workplane coordinate by using move and moveTo but it does not work as I expect. I tried to use compound.makeText but the results are incorrect. Can you help me out? | 04:53:39 |
halogenix |  Download IMG_0002.jpg | 04:54:57 |
halogenix | Here is my code. I tried to convert some VBA code using Cad to cadquery. Thank you. | 04:54:57 |
roger_maitland |  Download image.png | 15:00:52 |
roger_maitland | My CQ is quite rusty these days, but here is how to position text on the top surface of a box with build123d:
from build123d import *
from ocp_vscode import show
with BuildPart() as example:
Box(100, 100, 5)
with BuildSketch(example.faces().sort_by(Axis.Z)[-1]):
Text("sample", font_size=20)
extrude(amount=2)
show(example)
The with BuildSketch(example.faces().sort_by(Axis.Z)[-1]): means create a sketch on a workplace aligned with the Face of the box that is the most extreme with respect to the Z axis (standard Python list indices/slicing is used). In build123d, Text is always a 2D object so it gets extruded just like any 2D object (it could be swept or lofted, etc.).
build123d has an Algebra mode as well which tends to be more compact which might be attractive if you're generating the code from VBA. | 15:00:53 |
halogenix | Thank you for your responses. It’s weird when I can make the text position with position using workplane origin. But after that it display overlapped on exported cad (dxf) Finally I use workplane translate and can display as I want | 15:22:03 |
| lucky_axolotl_45902 joined the room. | 15:38:37 |
| tomvdb_ joined the room. | 17:11:52 |
| dm4023 joined the room. | 17:25:45 |
28 Dec 2023 |
| skyr__ joined the room. | 10:18:00 |
| easonke joined the room. | 13:17:15 |
| rodolfobonnin_91887 joined the room. | 14:03:14 |
| temp joined the room. | 14:09:48 |
| tidalslug joined the room. | 17:37:12 |
| greenwizard987 joined the room. | 20:09:41 |
| k15a joined the room. | 21:57:33 |
29 Dec 2023 |
| nsfw_c5 changed their display name from Nate In Seattle to nsfw_c5. | 00:10:52 |
| loliver4306 joined the room. | 20:18:20 |
30 Dec 2023 |
| rdm4874 joined the room. | 09:53:29 |
31 Dec 2023 |
| iamhadii joined the room. | 13:10:30 |
| apirkle joined the room. | 16:44:56 |
1 Jan 2024 |
| strayzor joined the room. | 03:25:12 |
| @matrix638:matrix.org joined the room. | 13:07:33 |
2 Jan 2024 |
| mixer3d joined the room. | 11:23:27 |
| mixer3d changed their display name from onlyopen to mixer3d. | 11:24:08 |