!DiwdZTOGzxLddvStEY:matrix.org

CadQuery Development

574 Members
3 Servers

Load older messages


SenderMessageTime
26 Dec 2023
@_discord_1186515929241223286:t2bot.iomagicguacamole joined the room.21:49:49
@_discord_395362975483166721:t2bot.iojenmei. joined the room.22:45:37
27 Dec 2023
@_discord_752766332151398411:t2bot.iohalogenix 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
@_discord_752766332151398411:t2bot.iohalogenixIMG_0002.jpg
Download IMG_0002.jpg
04:54:57
@_discord_752766332151398411:t2bot.iohalogenix Here is my code. I tried to convert some VBA code using Cad to cadquery. Thank you. 04:54:57
@_discord_896482168103125002:t2bot.ioroger_maitlandimage.png
Download image.png
15:00:52
@_discord_896482168103125002:t2bot.ioroger_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
@_discord_752766332151398411:t2bot.iohalogenix 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
@_discord_1189593108476858410:t2bot.iolucky_axolotl_45902 joined the room.15:38:37
@_discord_478852573273784331:t2bot.iotomvdb_ joined the room.17:11:52
@_discord_908372339601842236:t2bot.iodm4023 joined the room.17:25:45
28 Dec 2023
@_discord_550796583948517396:t2bot.ioskyr__ joined the room.10:18:00
@_discord_430700723601145857:t2bot.ioeasonke joined the room.13:17:15
@_discord_1151686082488971384:t2bot.iorodolfobonnin_91887 joined the room.14:03:14
@_discord_720473087778488342:t2bot.iotemp joined the room.14:09:48
@_discord_617474548807499806:t2bot.iotidalslug joined the room.17:37:12
@_discord_105616049088557056:t2bot.iogreenwizard987 joined the room.20:09:41
@_discord_227545908361953280:t2bot.iok15a joined the room.21:57:33
29 Dec 2023
@_discord_570631629211697153:t2bot.ionsfw_c5 changed their display name from Nate In Seattle to nsfw_c5.00:10:52
@_discord_857657807880716298:t2bot.iololiver4306 joined the room.20:18:20
30 Dec 2023
@_discord_804277732325589013:t2bot.iordm4874 joined the room.09:53:29
31 Dec 2023
@_discord_1190643122099736596:t2bot.ioiamhadii joined the room.13:10:30
@_discord_393449420391448577:t2bot.ioapirkle joined the room.16:44:56
1 Jan 2024
@_discord_682293183379406854:t2bot.iostrayzor joined the room.03:25:12
@matrix638:matrix.orgmatrix638 joined the room.13:07:33
2 Jan 2024
@_discord_1100329167058378835:t2bot.iomixer3d joined the room.11:23:27
@_discord_1100329167058378835:t2bot.iomixer3d changed their display name from onlyopen to mixer3d.11:24:08
@_discord_929764787682963486:t2bot.iolucandia. changed their display name from lmonari to lucandia..16:26:37
@_discord_690864330551328798:t2bot.ioweitzj joined the room.19:44:50
3 Jan 2024
@_discord_716720451153297499:t2bot.iorawwerks joined the room.05:21:11

Show newer messages


Back to Room ListRoom Version: 9