13 Dec 2023 |
| Spectre5 joined the room. | 05:48:11 |
14 Dec 2023 |
| kartheek8012 joined the room. | 12:31:51 |
16 Dec 2023 |
| frantic9100 set a profile picture. | 20:34:20 |
19 Dec 2023 |
| jmansion joined the room. | 12:44:36 |
| guille77 changed their profile picture. | 14:09:16 |
| jarn_62438 joined the room. | 18:44:31 |
20 Dec 2023 |
| clairbee_75188 joined the room. | 13:33:48 |
| clairbee joined the room. | 13:38:53 |
| apostolos. removed their profile picture. | 15:38:51 |
21 Dec 2023 |
| arv.ai joined the room. | 04:59:09 |
| vtiger_69143 joined the room. | 14:15:06 |
22 Dec 2023 |
| regattaguru_15413 joined the room. | 14:48:07 |
| poblazaid joined the room. | 19:55:59 |
23 Dec 2023 |
| Karim joined the room. | 12:29:16 |
25 Dec 2023 |
| shehabattia96 joined the room. | 04:14:13 |
26 Dec 2023 |
| halogenix joined the room. | 10:43:34 |
| 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 |