first commit

This commit is contained in:
2026-07-17 17:45:56 +08:00
commit 04c487823b
5873 changed files with 12227228 additions and 0 deletions
@@ -0,0 +1,48 @@
(vl-load-com)
(defun agent4-format-point (p)
(if (and p (listp p) (numberp (car p)) (numberp (cadr p)))
(strcat (rtos (car p) 2 16) "\t" (rtos (cadr p) 2 16))
"\t"
)
)
(defun agent4-start-point (obj / param point)
(setq param (vl-catch-all-apply 'vlax-curve-getStartParam (list obj)))
(if (not (vl-catch-all-error-p param))
(setq point (vl-catch-all-apply 'vlax-curve-getPointAtParam (list obj param)))
)
(if (or (null point) (vl-catch-all-error-p point))
(setq point (vl-catch-all-apply 'vlax-curve-getStartPoint (list obj)))
)
(if (vl-catch-all-error-p point) nil point)
)
(defun agent4-end-point (obj / param point)
(setq param (vl-catch-all-apply 'vlax-curve-getEndParam (list obj)))
(if (not (vl-catch-all-error-p param))
(setq point (vl-catch-all-apply 'vlax-curve-getPointAtParam (list obj param)))
)
(if (or (null point) (vl-catch-all-error-p point))
(setq point (vl-catch-all-apply 'vlax-curve-getEndPoint (list obj)))
)
(if (vl-catch-all-error-p point) nil point)
)
(defun agent4-write-spline-endpoints (/ f ss i ent obj h sp ep)
(setq f (open "D:/CSharpProjects/agent4/runtime/current-standard-flow/22-sw-autolisp-spline-param-extraction/spline-endpoints.tsv" "w"))
(setq ss (ssget "_X" '((0 . "SPLINE"))))
(if ss
(progn
(setq i 0)
(while (< i (sslength ss))
(setq ent (ssname ss i))
(setq obj (vlax-ename->vla-object ent))
(setq h (vla-get-Handle obj))
(setq sp (agent4-start-point obj))
(setq ep (agent4-end-point obj))
(write-line (strcat h "\t" (agent4-format-point sp) "\t" (agent4-format-point ep)) f)
(setq i (1+ i))
)
)
)
(if f (close f))
(princ)
)
(agent4-write-spline-endpoints)
@@ -0,0 +1,47 @@
{
"ok": true,
"selection_rule": "solidworks_multiview_reference_main_bbox",
"processing_order": "remove_outer_edge_connected_frame_title_then_select_geometry_inside_previous_main_view_bbox",
"bbox": {
"min_x": 45.99011440710511,
"min_y": 233.27533622591585,
"max_x": 180.99011440710433,
"max_y": 343.275336225917,
"center_x": 113.49011440710473,
"center_y": 288.2753362259164
},
"reference_bbox": {
"min_x": 45.99011440710511,
"min_y": 233.27533622591585,
"max_x": 180.99011440710433,
"max_y": 343.275336225917,
"center_x": 113.49011440710473,
"center_y": 288.2753362259164
},
"reference_selection_path": "D:\\CSharpProjects\\agent4\\runtime\\current-standard-flow\\07-sw-after-extraction\\main-view-selection.json",
"drawing_bbox": {
"min_x": 15,
"min_y": 5,
"max_x": 589,
"max_y": 415,
"center_x": 302,
"center_y": 210
},
"frame_seed_count": 44,
"frame_title_node_count": 73,
"bbox_internal_absorbed_node_count": 0,
"selected_node_count": 98,
"selected_source_handle_count": 98,
"main_view_geometry_count": 98,
"excluded": "annotations_dimensions_text_hatch_frame_border_solidworks_title_block_other_projected_views",
"normalization_scope": "main_view",
"normalization_raw_geometry_count": 98,
"normalization_normalized_primitive_count": 178,
"normalization_normalized_line_count": 124,
"normalization_merged_line_count": 120,
"normalization_overlap_group_count": 0,
"normalization_angle_tolerance_deg": 1,
"normalization_collinear_distance_tolerance": 0.05,
"normalization_gap_tolerance": 0.05,
"normalization_merge_policy": "strong_only_same_style_collinear_interval_union"
}
@@ -0,0 +1,169 @@
{
"ok": true,
"schema": "agent4.dwg-draft.extraction.v1",
"source": "AutoCAD COM external extractor",
"prog_id": "AutoCAD.Application.23.1",
"started_auto_cad": false,
"drawing_path": "D:\\CSharpProjects\\agent4\\runtime\\current-standard-flow\\09-sw-after-projected-view\\current-solidworks-after-projected-view.dwg",
"exported_at_utc": "2026-07-05T02:42:27.9089097Z",
"model_space_count": 307,
"paper_space_count": 0,
"entity_count": 307,
"type_counts": {
"ac_db_line": 148,
"ac_db_m_text": 67,
"ac_db_arc": 29,
"ac_db_polyline": 18,
"ac_db_circle": 10,
"ac_db_spline": 35
},
"category_files": [
{
"category": "entities-common",
"file": "entities-common.json",
"full_path": "D:\\CSharpProjects\\agent4\\runtime\\current-standard-flow\\22-sw-autolisp-spline-param-extraction\\entities-common.json",
"item_count": 307,
"exists": true
},
{
"category": "geometry",
"file": "geometry.json",
"full_path": "D:\\CSharpProjects\\agent4\\runtime\\current-standard-flow\\22-sw-autolisp-spline-param-extraction\\geometry.json",
"item_count": 240,
"exists": true
},
{
"category": "normalized-geometry",
"file": "normalized-geometry.json",
"full_path": "D:\\CSharpProjects\\agent4\\runtime\\current-standard-flow\\22-sw-autolisp-spline-param-extraction\\normalized-geometry.json",
"item_count": 400,
"exists": true
},
{
"category": "merged-lines",
"file": "merged-lines.json",
"full_path": "D:\\CSharpProjects\\agent4\\runtime\\current-standard-flow\\22-sw-autolisp-spline-param-extraction\\merged-lines.json",
"item_count": 315,
"exists": true
},
{
"category": "geometry-overlaps",
"file": "geometry-overlaps.json",
"full_path": "D:\\CSharpProjects\\agent4\\runtime\\current-standard-flow\\22-sw-autolisp-spline-param-extraction\\geometry-overlaps.json",
"item_count": 0,
"exists": true
},
{
"category": "normalization-summary",
"file": "normalization-summary.json",
"full_path": "D:\\CSharpProjects\\agent4\\runtime\\current-standard-flow\\22-sw-autolisp-spline-param-extraction\\normalization-summary.json",
"item_count": 10,
"exists": true
},
{
"category": "main-view-geometry",
"file": "main-view-geometry.json",
"full_path": "D:\\CSharpProjects\\agent4\\runtime\\current-standard-flow\\22-sw-autolisp-spline-param-extraction\\main-view-geometry.json",
"item_count": 98,
"exists": true
},
{
"category": "main-view-normalized-geometry",
"file": "main-view-normalized-geometry.json",
"full_path": "D:\\CSharpProjects\\agent4\\runtime\\current-standard-flow\\22-sw-autolisp-spline-param-extraction\\main-view-normalized-geometry.json",
"item_count": 178,
"exists": true
},
{
"category": "main-view-merged-lines",
"file": "main-view-merged-lines.json",
"full_path": "D:\\CSharpProjects\\agent4\\runtime\\current-standard-flow\\22-sw-autolisp-spline-param-extraction\\main-view-merged-lines.json",
"item_count": 120,
"exists": true
},
{
"category": "main-view-overlaps",
"file": "main-view-overlaps.json",
"full_path": "D:\\CSharpProjects\\agent4\\runtime\\current-standard-flow\\22-sw-autolisp-spline-param-extraction\\main-view-overlaps.json",
"item_count": 0,
"exists": true
},
{
"category": "main-view-signature",
"file": "main-view-signature.json",
"full_path": "D:\\CSharpProjects\\agent4\\runtime\\current-standard-flow\\22-sw-autolisp-spline-param-extraction\\main-view-signature.json",
"item_count": 15,
"exists": true
},
{
"category": "bottom-view-signature",
"file": "bottom-view-signature.json",
"full_path": "D:\\CSharpProjects\\agent4\\runtime\\current-standard-flow\\22-sw-autolisp-spline-param-extraction\\bottom-view-signature.json",
"item_count": 18,
"exists": true
},
{
"category": "main-view-selection",
"file": "main-view-selection.json",
"full_path": "D:\\CSharpProjects\\agent4\\runtime\\current-standard-flow\\22-sw-autolisp-spline-param-extraction\\main-view-selection.json",
"item_count": 24,
"exists": true
},
{
"category": "view-regions",
"file": "view-regions.json",
"full_path": "D:\\CSharpProjects\\agent4\\runtime\\current-standard-flow\\22-sw-autolisp-spline-param-extraction\\view-regions.json",
"item_count": 10,
"exists": true
},
{
"category": "annotations",
"file": "annotations.json",
"full_path": "D:\\CSharpProjects\\agent4\\runtime\\current-standard-flow\\22-sw-autolisp-spline-param-extraction\\annotations.json",
"item_count": 67,
"exists": true
},
{
"category": "dimensions",
"file": "dimensions.json",
"full_path": "D:\\CSharpProjects\\agent4\\runtime\\current-standard-flow\\22-sw-autolisp-spline-param-extraction\\dimensions.json",
"item_count": 0,
"exists": true
},
{
"category": "dimensional-tolerances",
"file": "dimensional-tolerances.json",
"full_path": "D:\\CSharpProjects\\agent4\\runtime\\current-standard-flow\\22-sw-autolisp-spline-param-extraction\\dimensional-tolerances.json",
"item_count": 0,
"exists": true
},
{
"category": "roughness",
"file": "roughness.json",
"full_path": "D:\\CSharpProjects\\agent4\\runtime\\current-standard-flow\\22-sw-autolisp-spline-param-extraction\\roughness.json",
"item_count": 2,
"exists": true
},
{
"category": "geometric-tolerances",
"file": "geometric-tolerances.json",
"full_path": "D:\\CSharpProjects\\agent4\\runtime\\current-standard-flow\\22-sw-autolisp-spline-param-extraction\\geometric-tolerances.json",
"item_count": 0,
"exists": true
},
{
"category": "datums",
"file": "datums.json",
"full_path": "D:\\CSharpProjects\\agent4\\runtime\\current-standard-flow\\22-sw-autolisp-spline-param-extraction\\datums.json",
"item_count": 0,
"exists": true
},
{
"category": "unknown-entities",
"file": "unknown-entities.json",
"full_path": "D:\\CSharpProjects\\agent4\\runtime\\current-standard-flow\\22-sw-autolisp-spline-param-extraction\\unknown-entities.json",
"item_count": 0,
"exists": true
}
]
}
@@ -0,0 +1,12 @@
{
"scope": "full_drawing",
"raw_geometry_count": 240,
"normalized_primitive_count": 400,
"normalized_line_count": 326,
"merged_line_count": 315,
"overlap_group_count": 0,
"angle_tolerance_deg": 1,
"collinear_distance_tolerance": 0.05,
"gap_tolerance": 0.05,
"merge_policy": "strong_only_same_style_collinear_interval_union"
}
@@ -0,0 +1,52 @@
[
{
"space": "ModelSpace",
"index": 120,
"object_name": "AcDbMText",
"handle": "DE",
"layer": "0",
"linetype": "Continuous",
"color": 7,
"lineweight": 0,
"bbox": {
"min_x": 404.5936687456392,
"min_y": 56.952221595695626,
"max_x": 411.63003238200287,
"max_y": 58.920971595695626
},
"text": "\u8868\u9762\u7C97\u7CD9\u5EA6:",
"raw_text": "\u8868\u9762\u7C97\u7CD9\u5EA6:",
"height": 1.5,
"rotation": 0,
"insertion_point": [
404.5936687456392,
58.920971595695626,
0
]
},
{
"space": "ModelSpace",
"index": 124,
"object_name": "AcDbMText",
"handle": "E2",
"layer": "0",
"linetype": "Continuous",
"color": 7,
"lineweight": 0,
"bbox": {
"min_x": 438.3712921668303,
"min_y": 61.95052199513625,
"max_x": 445.40765580319396,
"max_y": 63.91927199513625
},
"text": "\u8868\u9762\u7C97\u7CD9\u5EA6:",
"raw_text": "\u8868\u9762\u7C97\u7CD9\u5EA6:",
"height": 1.5,
"rotation": 0,
"insertion_point": [
438.3712921668303,
63.91927199513625,
0
]
}
]
@@ -0,0 +1,35 @@
198 52.99011440710511 118.6492103747768 58.95321871314791 118.6514022719828
197 58.99011440710512 168.6492103747768 58.99011440710512 168.6492103747768
191 98.99011440710511 125.6492103747769 105.9901144071051 126.2228035035840
18C 105.9901144071051 126.2228035035840 112.9901144071051 125.6492103747768
184 105.9901144071051 141.7977672105817 139.5758256545983 125.6492103747768
181 139.5758256545983 211.6492103747769 105.9901144071051 195.5006535389719
17F 115.9901144071051 162.9271242012068 115.9901144071051 174.3712965483469
177 112.4914571602384 113.6489908734294 117.9901144071043 113.9245484806310
176 117.9901144071043 113.9245484806310 123.4722133846491 113.6506433363383
175 105.9901144071041 116.5072234849596 105.9901144071041 116.5072234849596
174 88.49145716023814 113.6489908734294 93.99011440710408 113.9245484806310
173 93.99011440710410 113.9245484806310 99.47221338464894 113.6506433363383
172 102.4901144071043 223.6488575214951 89.50962164816660 223.6465574737876
170 102.3739101207815 221.4485046682134 109.6063186934271 221.4485046682134
16F 122.4901144071043 223.6488575214951 109.5096216481666 223.6465574737876
16E 81.02055294751439 223.6283576177608 98.78156830571622 213.6485046682134
16A 98.78156830571626 123.6492103747768 81.02055294751441 113.6693574252294
169 170.9901144071043 125.1245070092174 170.9901144071043 125.1245070092174
168 170.9901144071043 202.2737130971615 170.9901144071043 202.2737130971615
150 98.99011440710511 322.5681926248816 105.9901144071051 323.2753362259170
14B 105.9901144071051 253.2753362259170 98.99011440710511 253.9824798269525
147 52.99011440710511 288.2753362259170 52.99011440710511 288.2753362259170
146 52.99011440710511 238.2753362259170 58.95321871314791 238.2775281231230
145 58.99011440710512 338.2753362259170 53.02701010106230 338.2731443287111
13F 105.9901144071051 336.2753362259170 139.5758256545983 322.5681926248815
13D 105.9901144071051 323.2753362259171 112.9901144071051 322.5681926248815
13B 139.5758256545984 253.9824798269525 105.9901144071051 240.2753362259170
139 112.9901144071051 253.9824798269525 105.9901144071051 253.2753362259171
12E 117.9901144071043 293.7753362259159 117.9901144071043 293.7753362259159
12D 105.9901144071041 305.7753362259159 105.9901144071041 305.7753362259159
12C 105.9901144071043 281.7753362259157 105.9901144071043 281.7753362259157
12B 93.99011440710410 293.7753362259157 93.99011440710410 293.7753362259157
126 98.78156830571626 319.8986149406673 98.78156830571622 256.6520575111645
125 170.9901144071043 244.7509857136382 170.9901144071043 244.7509857136382
124 170.9901144071043 321.9001918015818 170.9901144071043 321.9001918015818
1 198 52.99011440710511 118.6492103747768 58.95321871314791 118.6514022719828
2 197 58.99011440710512 168.6492103747768 58.99011440710512 168.6492103747768
3 191 98.99011440710511 125.6492103747769 105.9901144071051 126.2228035035840
4 18C 105.9901144071051 126.2228035035840 112.9901144071051 125.6492103747768
5 184 105.9901144071051 141.7977672105817 139.5758256545983 125.6492103747768
6 181 139.5758256545983 211.6492103747769 105.9901144071051 195.5006535389719
7 17F 115.9901144071051 162.9271242012068 115.9901144071051 174.3712965483469
8 177 112.4914571602384 113.6489908734294 117.9901144071043 113.9245484806310
9 176 117.9901144071043 113.9245484806310 123.4722133846491 113.6506433363383
10 175 105.9901144071041 116.5072234849596 105.9901144071041 116.5072234849596
11 174 88.49145716023814 113.6489908734294 93.99011440710408 113.9245484806310
12 173 93.99011440710410 113.9245484806310 99.47221338464894 113.6506433363383
13 172 102.4901144071043 223.6488575214951 89.50962164816660 223.6465574737876
14 170 102.3739101207815 221.4485046682134 109.6063186934271 221.4485046682134
15 16F 122.4901144071043 223.6488575214951 109.5096216481666 223.6465574737876
16 16E 81.02055294751439 223.6283576177608 98.78156830571622 213.6485046682134
17 16A 98.78156830571626 123.6492103747768 81.02055294751441 113.6693574252294
18 169 170.9901144071043 125.1245070092174 170.9901144071043 125.1245070092174
19 168 170.9901144071043 202.2737130971615 170.9901144071043 202.2737130971615
20 150 98.99011440710511 322.5681926248816 105.9901144071051 323.2753362259170
21 14B 105.9901144071051 253.2753362259170 98.99011440710511 253.9824798269525
22 147 52.99011440710511 288.2753362259170 52.99011440710511 288.2753362259170
23 146 52.99011440710511 238.2753362259170 58.95321871314791 238.2775281231230
24 145 58.99011440710512 338.2753362259170 53.02701010106230 338.2731443287111
25 13F 105.9901144071051 336.2753362259170 139.5758256545983 322.5681926248815
26 13D 105.9901144071051 323.2753362259171 112.9901144071051 322.5681926248815
27 13B 139.5758256545984 253.9824798269525 105.9901144071051 240.2753362259170
28 139 112.9901144071051 253.9824798269525 105.9901144071051 253.2753362259171
29 12E 117.9901144071043 293.7753362259159 117.9901144071043 293.7753362259159
30 12D 105.9901144071041 305.7753362259159 105.9901144071041 305.7753362259159
31 12C 105.9901144071043 281.7753362259157 105.9901144071043 281.7753362259157
32 12B 93.99011440710410 293.7753362259157 93.99011440710410 293.7753362259157
33 126 98.78156830571626 319.8986149406673 98.78156830571622 256.6520575111645
34 125 170.9901144071043 244.7509857136382 170.9901144071043 244.7509857136382
35 124 170.9901144071043 321.9001918015818 170.9901144071043 321.9001918015818