dxfedit/思路.MD
puzzlesion bcefe9c927 chore: add test files, results, and miscellaneous updates
This commit bundles together a wide range of additions and modifications:

- A large number of new test CAD files (.dxf, .dwg) and expected output files (.pdf) have been added to the
2025-09-12 17:21:28 +08:00

1004 B
Raw Blame History

1、通过aposecad库找到导入的dwg所有布局里的特定名字的块;获得这部分特定块的坐标(矩形)

PAPER_SIZES_MM = { "A4": {"landscape": (297, 210), "portrait": (210, 297)}, "A3": {"landscape": (420, 297), "portrait": (297, 420)}, "A2": {"landscape": (594, 420), "portrait": (420, 594)}, "A1": {"landscape": (841, 594), "portrait": (594, 841)}, "A0": {"landscape": (1189, 841), "portrait": (841, 1189)}, }

PRINTABLE_BLOCKS = { "A$C2EB80DB8": ("A1", "portrait"), "A$C1CC9093B": ("A1", "landscape"), "A$C6D564680": ("A2", "portrait"), "新块": ("A3", "landscape"), "新块1": ("A4", "portrait"),

2、利用坐标打印功能对以上块进行打印并按照顺序命名 https://docs.aspose.com/cad/zh/java/developer-guide/autocad-drawings/dwg-drawings/convert-dwg-to-dwf-with-coordinatesconvert-dwg-to-pdf-with-coordinates/#%E5%A6%82%E4%BD%95%E5%B0%86-dwg-%E8%BD%AC%E6%8D%A2%E4%B8%BA%E5%B8%A6%E5%9D%90%E6%A0%87%E7%9A%84-pdf