build123d-techdraw 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- build123d_techdraw/__init__.py +182 -0
- build123d_techdraw/_version.py +24 -0
- build123d_techdraw/annotations/__init__.py +77 -0
- build123d_techdraw/annotations/callouts.py +730 -0
- build123d_techdraw/annotations/centerlines.py +284 -0
- build123d_techdraw/annotations/dimensions.py +1226 -0
- build123d_techdraw/annotations/gdt.py +263 -0
- build123d_techdraw/annotations/resolver.py +175 -0
- build123d_techdraw/annotations/surface.py +129 -0
- build123d_techdraw/annotations/symbols.py +40 -0
- build123d_techdraw/annotations/tables.py +257 -0
- build123d_techdraw/builder.py +917 -0
- build123d_techdraw/context.py +17 -0
- build123d_techdraw/core/__init__.py +25 -0
- build123d_techdraw/core/booklet.py +100 -0
- build123d_techdraw/core/scale.py +67 -0
- build123d_techdraw/core/sheet.py +1200 -0
- build123d_techdraw/core/title_block.py +403 -0
- build123d_techdraw/core/view.py +1802 -0
- build123d_techdraw/layout/__init__.py +15 -0
- build123d_techdraw/layout/linter.py +228 -0
- build123d_techdraw/layout/multiview.py +544 -0
- build123d_techdraw/py.typed +0 -0
- build123d_techdraw/recognizers/__init__.py +15 -0
- build123d_techdraw/recognizers/features.py +240 -0
- build123d_techdraw/renderers/__init__.py +15 -0
- build123d_techdraw/renderers/dxf.py +235 -0
- build123d_techdraw/renderers/pdf.py +376 -0
- build123d_techdraw/renderers/svg.py +28 -0
- build123d_techdraw/renderers/theme.py +189 -0
- build123d_techdraw-0.1.0.dist-info/METADATA +306 -0
- build123d_techdraw-0.1.0.dist-info/RECORD +34 -0
- build123d_techdraw-0.1.0.dist-info/WHEEL +4 -0
- build123d_techdraw-0.1.0.dist-info/licenses/LICENSE +176 -0
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
"""build123d-techdraw: 2D technical drawing and blueprint engine for build123d."""
|
|
2
|
+
|
|
3
|
+
from build123d_techdraw.annotations.callouts import (
|
|
4
|
+
BOMBalloon,
|
|
5
|
+
ChamferCallout,
|
|
6
|
+
HoleCallout,
|
|
7
|
+
LeaderNote,
|
|
8
|
+
SectionCuttingLine,
|
|
9
|
+
ThreadCallout,
|
|
10
|
+
WeldingSymbol,
|
|
11
|
+
WeldType,
|
|
12
|
+
)
|
|
13
|
+
from build123d_techdraw.annotations.centerlines import (
|
|
14
|
+
BoltCircle,
|
|
15
|
+
Centerline,
|
|
16
|
+
CenterMark,
|
|
17
|
+
)
|
|
18
|
+
from build123d_techdraw.annotations.dimensions import (
|
|
19
|
+
AngularDimension,
|
|
20
|
+
BaselineDimensionGroup,
|
|
21
|
+
ChainDimensionGroup,
|
|
22
|
+
DiameterDimension,
|
|
23
|
+
DimensionType,
|
|
24
|
+
LinearDimension,
|
|
25
|
+
OrdinateDimension,
|
|
26
|
+
OrdinateDimensionGroup,
|
|
27
|
+
OrdinateDimensionSet,
|
|
28
|
+
RadialDimension,
|
|
29
|
+
Tolerance,
|
|
30
|
+
format_dimension_value,
|
|
31
|
+
)
|
|
32
|
+
from build123d_techdraw.annotations.gdt import (
|
|
33
|
+
DatumFeature,
|
|
34
|
+
DatumFeatureSymbol,
|
|
35
|
+
FeatureControlFrame,
|
|
36
|
+
GDTCharacteristic,
|
|
37
|
+
)
|
|
38
|
+
from build123d_techdraw.annotations.surface import (
|
|
39
|
+
MaterialRemoval,
|
|
40
|
+
SurfaceFinish,
|
|
41
|
+
SurfaceFinishSymbol,
|
|
42
|
+
)
|
|
43
|
+
from build123d_techdraw.annotations.symbols import render_projection_cone_svg
|
|
44
|
+
from build123d_techdraw.annotations.tables import RawSVG, Schedule, Table
|
|
45
|
+
from build123d_techdraw.builder import (
|
|
46
|
+
AssemblyBOM,
|
|
47
|
+
AuxiliaryView,
|
|
48
|
+
BottomView,
|
|
49
|
+
BreakView,
|
|
50
|
+
BuildDrawing,
|
|
51
|
+
BuildSheet,
|
|
52
|
+
BuildView,
|
|
53
|
+
DetailView,
|
|
54
|
+
FrontView,
|
|
55
|
+
GeneralNotes,
|
|
56
|
+
IsometricView,
|
|
57
|
+
LeftView,
|
|
58
|
+
RearView,
|
|
59
|
+
Revision,
|
|
60
|
+
RightView,
|
|
61
|
+
SectionView,
|
|
62
|
+
StandardMultiview,
|
|
63
|
+
TitleBlock,
|
|
64
|
+
TopView,
|
|
65
|
+
View,
|
|
66
|
+
)
|
|
67
|
+
from build123d_techdraw.core.booklet import DrawingBooklet
|
|
68
|
+
from build123d_techdraw.core.scale import (
|
|
69
|
+
calculate_auto_scale,
|
|
70
|
+
find_closest_iso_scale,
|
|
71
|
+
format_iso_scale,
|
|
72
|
+
)
|
|
73
|
+
from build123d_techdraw.core.sheet import DrawingSheet, SheetSize
|
|
74
|
+
from build123d_techdraw.core.title_block import BOMItem, RevisionEntry, TitleBlockInfo
|
|
75
|
+
from build123d_techdraw.core.view import SheetView, ViewType
|
|
76
|
+
from build123d_techdraw.layout.linter import LintIssue, run_sheet_lint
|
|
77
|
+
from build123d_techdraw.layout.multiview import (
|
|
78
|
+
MultiviewLayout,
|
|
79
|
+
add_assembly_bom_and_balloons,
|
|
80
|
+
add_standard_multiview,
|
|
81
|
+
generate_assembly_bom,
|
|
82
|
+
)
|
|
83
|
+
from build123d_techdraw.recognizers.features import (
|
|
84
|
+
RecognizedBoltCircle,
|
|
85
|
+
RecognizedHole,
|
|
86
|
+
recognize_bolt_circles,
|
|
87
|
+
recognize_holes,
|
|
88
|
+
)
|
|
89
|
+
from build123d_techdraw.renderers.dxf import DXFRenderer
|
|
90
|
+
from build123d_techdraw.renderers.pdf import PDFRenderer
|
|
91
|
+
from build123d_techdraw.renderers.svg import SVGRenderer
|
|
92
|
+
from build123d_techdraw.renderers.theme import THEME_COLORS, Theme, ThemeColors
|
|
93
|
+
|
|
94
|
+
try:
|
|
95
|
+
from ._version import __version__
|
|
96
|
+
except ImportError: # pragma: no cover
|
|
97
|
+
__version__ = "0.1.0.dev0"
|
|
98
|
+
|
|
99
|
+
__all__ = [
|
|
100
|
+
"AngularDimension",
|
|
101
|
+
"AssemblyBOM",
|
|
102
|
+
"AuxiliaryView",
|
|
103
|
+
"BOMBalloon",
|
|
104
|
+
"BOMItem",
|
|
105
|
+
"BaselineDimensionGroup",
|
|
106
|
+
"BoltCircle",
|
|
107
|
+
"BottomView",
|
|
108
|
+
"BreakView",
|
|
109
|
+
"BuildDrawing",
|
|
110
|
+
"BuildSheet",
|
|
111
|
+
"BuildView",
|
|
112
|
+
"CenterMark",
|
|
113
|
+
"Centerline",
|
|
114
|
+
"ChainDimensionGroup",
|
|
115
|
+
"ChamferCallout",
|
|
116
|
+
"DXFRenderer",
|
|
117
|
+
"DatumFeature",
|
|
118
|
+
"DatumFeatureSymbol",
|
|
119
|
+
"DetailView",
|
|
120
|
+
"DiameterDimension",
|
|
121
|
+
"DimensionType",
|
|
122
|
+
"DrawingBooklet",
|
|
123
|
+
"DrawingSheet",
|
|
124
|
+
"FeatureControlFrame",
|
|
125
|
+
"FrontView",
|
|
126
|
+
"GDTCharacteristic",
|
|
127
|
+
"GeneralNotes",
|
|
128
|
+
"HoleCallout",
|
|
129
|
+
"IsometricView",
|
|
130
|
+
"LeaderNote",
|
|
131
|
+
"LeftView",
|
|
132
|
+
"LinearDimension",
|
|
133
|
+
"LintIssue",
|
|
134
|
+
"MaterialRemoval",
|
|
135
|
+
"MultiviewLayout",
|
|
136
|
+
"OrdinateDimension",
|
|
137
|
+
"OrdinateDimensionGroup",
|
|
138
|
+
"OrdinateDimensionSet",
|
|
139
|
+
"PDFRenderer",
|
|
140
|
+
"RadialDimension",
|
|
141
|
+
"RawSVG",
|
|
142
|
+
"RearView",
|
|
143
|
+
"RecognizedBoltCircle",
|
|
144
|
+
"RecognizedHole",
|
|
145
|
+
"Revision",
|
|
146
|
+
"RevisionEntry",
|
|
147
|
+
"RightView",
|
|
148
|
+
"SVGRenderer",
|
|
149
|
+
"Schedule",
|
|
150
|
+
"SectionCuttingLine",
|
|
151
|
+
"SectionView",
|
|
152
|
+
"SheetSize",
|
|
153
|
+
"SheetView",
|
|
154
|
+
"StandardMultiview",
|
|
155
|
+
"SurfaceFinish",
|
|
156
|
+
"SurfaceFinishSymbol",
|
|
157
|
+
"THEME_COLORS",
|
|
158
|
+
"Table",
|
|
159
|
+
"Theme",
|
|
160
|
+
"ThemeColors",
|
|
161
|
+
"ThreadCallout",
|
|
162
|
+
"TitleBlock",
|
|
163
|
+
"TitleBlockInfo",
|
|
164
|
+
"Tolerance",
|
|
165
|
+
"TopView",
|
|
166
|
+
"View",
|
|
167
|
+
"ViewType",
|
|
168
|
+
"WeldType",
|
|
169
|
+
"WeldingSymbol",
|
|
170
|
+
"add_assembly_bom_and_balloons",
|
|
171
|
+
"add_standard_multiview",
|
|
172
|
+
"calculate_auto_scale",
|
|
173
|
+
"find_closest_iso_scale",
|
|
174
|
+
"format_dimension_value",
|
|
175
|
+
"format_iso_scale",
|
|
176
|
+
"generate_assembly_bom",
|
|
177
|
+
"recognize_bolt_circles",
|
|
178
|
+
"recognize_holes",
|
|
179
|
+
"render_projection_cone_svg",
|
|
180
|
+
"run_sheet_lint",
|
|
181
|
+
"__version__",
|
|
182
|
+
]
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# file generated by vcs-versioning
|
|
2
|
+
# don't change, don't track in version control
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
__all__ = [
|
|
6
|
+
"__version__",
|
|
7
|
+
"__version_tuple__",
|
|
8
|
+
"version",
|
|
9
|
+
"version_tuple",
|
|
10
|
+
"__commit_id__",
|
|
11
|
+
"commit_id",
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
version: str
|
|
15
|
+
__version__: str
|
|
16
|
+
__version_tuple__: tuple[int | str, ...]
|
|
17
|
+
version_tuple: tuple[int | str, ...]
|
|
18
|
+
commit_id: str | None
|
|
19
|
+
__commit_id__: str | None
|
|
20
|
+
|
|
21
|
+
__version__ = version = '0.1.0'
|
|
22
|
+
__version_tuple__ = version_tuple = (0, 1, 0)
|
|
23
|
+
|
|
24
|
+
__commit_id__ = commit_id = None
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"""Engineering annotations: ISO dimensions, GD&T, surface finish, centerlines, tables, and callouts."""
|
|
2
|
+
|
|
3
|
+
from build123d_techdraw.annotations.callouts import (
|
|
4
|
+
BOMBalloon,
|
|
5
|
+
ChamferCallout,
|
|
6
|
+
HoleCallout,
|
|
7
|
+
LeaderNote,
|
|
8
|
+
SectionCuttingLine,
|
|
9
|
+
ThreadCallout,
|
|
10
|
+
WeldingSymbol,
|
|
11
|
+
WeldType,
|
|
12
|
+
)
|
|
13
|
+
from build123d_techdraw.annotations.centerlines import (
|
|
14
|
+
BoltCircle,
|
|
15
|
+
Centerline,
|
|
16
|
+
CenterMark,
|
|
17
|
+
)
|
|
18
|
+
from build123d_techdraw.annotations.dimensions import (
|
|
19
|
+
AngularDimension,
|
|
20
|
+
BaselineDimensionGroup,
|
|
21
|
+
ChainDimensionGroup,
|
|
22
|
+
DiameterDimension,
|
|
23
|
+
DimensionType,
|
|
24
|
+
LinearDimension,
|
|
25
|
+
OrdinateDimension,
|
|
26
|
+
OrdinateDimensionGroup,
|
|
27
|
+
OrdinateDimensionSet,
|
|
28
|
+
RadialDimension,
|
|
29
|
+
Tolerance,
|
|
30
|
+
format_dimension_value,
|
|
31
|
+
)
|
|
32
|
+
from build123d_techdraw.annotations.gdt import (
|
|
33
|
+
DatumFeatureSymbol,
|
|
34
|
+
FeatureControlFrame,
|
|
35
|
+
GDTCharacteristic,
|
|
36
|
+
)
|
|
37
|
+
from build123d_techdraw.annotations.surface import (
|
|
38
|
+
MaterialRemoval,
|
|
39
|
+
SurfaceFinishSymbol,
|
|
40
|
+
)
|
|
41
|
+
from build123d_techdraw.annotations.symbols import render_projection_cone_svg
|
|
42
|
+
from build123d_techdraw.annotations.tables import RawSVG, Schedule, Table
|
|
43
|
+
|
|
44
|
+
__all__ = [
|
|
45
|
+
"AngularDimension",
|
|
46
|
+
"BOMBalloon",
|
|
47
|
+
"BaselineDimensionGroup",
|
|
48
|
+
"BoltCircle",
|
|
49
|
+
"CenterMark",
|
|
50
|
+
"Centerline",
|
|
51
|
+
"ChainDimensionGroup",
|
|
52
|
+
"ChamferCallout",
|
|
53
|
+
"DatumFeatureSymbol",
|
|
54
|
+
"DiameterDimension",
|
|
55
|
+
"DimensionType",
|
|
56
|
+
"FeatureControlFrame",
|
|
57
|
+
"GDTCharacteristic",
|
|
58
|
+
"HoleCallout",
|
|
59
|
+
"LeaderNote",
|
|
60
|
+
"LinearDimension",
|
|
61
|
+
"MaterialRemoval",
|
|
62
|
+
"OrdinateDimension",
|
|
63
|
+
"OrdinateDimensionGroup",
|
|
64
|
+
"OrdinateDimensionSet",
|
|
65
|
+
"RadialDimension",
|
|
66
|
+
"RawSVG",
|
|
67
|
+
"Schedule",
|
|
68
|
+
"SectionCuttingLine",
|
|
69
|
+
"SurfaceFinishSymbol",
|
|
70
|
+
"Table",
|
|
71
|
+
"ThreadCallout",
|
|
72
|
+
"Tolerance",
|
|
73
|
+
"WeldType",
|
|
74
|
+
"WeldingSymbol",
|
|
75
|
+
"format_dimension_value",
|
|
76
|
+
"render_projection_cone_svg",
|
|
77
|
+
]
|