designix 0.5.3
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.
- package/.eslintignore +17 -0
- package/.eslintrc.cjs +24 -0
- package/.prettierignore +15 -0
- package/.prettierrc +8 -0
- package/README.md +27 -0
- package/export_svg/base.svg +1 -0
- package/export_svg/base_cut.svg +1 -0
- package/export_svg/base_hollow.svg +1 -0
- package/export_svg/base_top.svg +1 -0
- package/export_svg/calculation_of_initAngle2.svg +1 -0
- package/export_svg/circles.svg +1 -0
- package/export_svg/circles_amplitude-offset.svg +1 -0
- package/export_svg/circles_amplitude-scale.svg +1 -0
- package/export_svg/circles_angle.svg +1 -0
- package/export_svg/default_param_blank.svg +1 -0
- package/export_svg/dummy_pole_static.svg +1 -0
- package/export_svg/dummy_pole_static_face.svg +1 -0
- package/export_svg/gear_addendeum_dedendum_sizes.svg +9 -0
- package/export_svg/gear_addendum_and_dedendum.svg +1 -0
- package/export_svg/gear_adherence_replaced_by_teeth.svg +1 -0
- package/export_svg/gear_base_circle_for_involute.svg +2 -0
- package/export_svg/gear_base_left_circle_for_involute.svg +2 -0
- package/export_svg/gear_base_right_circle_for_involute.svg +2 -0
- package/export_svg/gear_inter_axis_maximum_distance.svg +1 -0
- package/export_svg/gear_inter_axis_minimum_distance.svg +1 -0
- package/export_svg/gear_large_base_radius.svg +5 -0
- package/export_svg/gear_module_and_tooth_thickness.svg +3 -0
- package/export_svg/gear_optimum_base_radius.svg +5 -0
- package/export_svg/gear_optimum_base_radius_with_longer_inter_axis.svg +5 -0
- package/export_svg/gear_right_left_base_circles.svg +1 -0
- package/export_svg/gear_small_base_radius.svg +5 -0
- package/export_svg/gear_wheel_circles.svg +2 -0
- package/export_svg/gears.svg +71 -0
- package/export_svg/gears_motion_transmission_via_adherence.svg +1 -0
- package/export_svg/heliostat.svg +1 -0
- package/export_svg/heliostat2_face_sizing.svg +1 -0
- package/export_svg/heliostat2_side_sizing.svg +1 -0
- package/export_svg/heliostat_face_sizing.svg +1 -0
- package/export_svg/heliostat_overview.svg +1 -0
- package/export_svg/heliostat_side.svg +1 -0
- package/export_svg/heliostat_side_sizing.svg +1 -0
- package/export_svg/involute_of_circle.svg +19 -0
- package/export_svg/involute_of_circle_R0.svg +1 -0
- package/export_svg/involute_of_circle_Ri1_u0.svg +1 -0
- package/export_svg/involute_of_circle_Ri2_u2.svg +1 -0
- package/export_svg/left_side_angle_kitchen.svg +1 -0
- package/export_svg/negative_involute_of_circle_R0.svg +1 -0
- package/export_svg/point_c_position_and_speed_negative.svg +1 -0
- package/export_svg/point_c_position_and_speed_positive.svg +1 -0
- package/export_svg/pole_rotor.svg +1 -0
- package/export_svg/pole_rotor_cut.svg +1 -0
- package/export_svg/pole_rotor_ends.svg +1 -0
- package/export_svg/pole_stator.svg +3 -0
- package/export_svg/pole_stator_E2.svg +3 -0
- package/export_svg/pole_stator_bottom.svg +1 -0
- package/export_svg/pole_stator_cut.svg +1 -0
- package/export_svg/pole_stator_face.svg +1 -0
- package/export_svg/pole_stator_right.svg +1 -0
- package/export_svg/rake.svg +1 -0
- package/export_svg/rake_door.svg +1 -0
- package/export_svg/rake_face.svg +1 -0
- package/export_svg/rake_side.svg +1 -0
- package/export_svg/rake_side_stopper.svg +1 -0
- package/export_svg/rake_top.svg +1 -0
- package/export_svg/rake_top_stopper.svg +1 -0
- package/export_svg/rectangle.svg +1 -0
- package/export_svg/rectangle_height.svg +1 -0
- package/export_svg/rectangle_width.svg +1 -0
- package/export_svg/right_side_angle_kitchen.svg +1 -0
- package/export_svg/rod.svg +1 -0
- package/export_svg/rod_cut.svg +1 -0
- package/export_svg/rod_plate.svg +1 -0
- package/export_svg/rod_top.svg +1 -0
- package/export_svg/spider.svg +1 -0
- package/export_svg/spider_lateral.svg +1 -0
- package/export_svg/spider_profile.svg +1 -0
- package/export_svg/surface.svg +3 -0
- package/export_svg/surface_crenel.svg +1 -0
- package/export_svg/surface_extremities.svg +2 -0
- package/export_svg/surface_lz.svg +1 -0
- package/export_svg/surface_main.svg +1 -0
- package/export_svg/surface_power.svg +2 -0
- package/export_svg/surface_space_evolution.svg +1 -0
- package/export_svg/surface_space_shape.svg +1 -0
- package/export_svg/swing.svg +1 -0
- package/export_svg/swing_face.svg +1 -0
- package/export_svg/swing_side.svg +1 -0
- package/export_svg/swing_top.svg +1 -0
- package/export_svg/swing_with_rod.svg +1 -0
- package/export_svg/trapeze.svg +1 -0
- package/export_svg/trapeze_rod.svg +1 -0
- package/export_svg/trapeze_side.svg +1 -0
- package/export_svg/trapeze_top.svg +1 -0
- package/export_svg/verify_contour_1.svg +1 -0
- package/export_svg/verify_contour_1_l1.svg +1 -0
- package/export_svg/verify_contour_1_r1.svg +1 -0
- package/export_svg/verify_line.svg +1 -0
- package/export_svg/verify_line_2_l1cx.svg +1 -0
- package/export_svg/verify_line_p1x.svg +1 -0
- package/export_svg/verify_point.svg +1 -0
- package/export_svg/verify_point_p1x.svg +1 -0
- package/export_svg/verify_vector_p1x.svg +1 -0
- package/package.json +76 -0
- package/src/dummy/circles.ts +65 -0
- package/src/dummy/pole_static.ts +86 -0
- package/src/dummy/rectangle.ts +55 -0
- package/src/dummy/svg/circles.svg +288 -0
- package/src/dummy/svg/circles_amplitude-offset.svg +109 -0
- package/src/dummy/svg/circles_amplitude-scale.svg +122 -0
- package/src/dummy/svg/circles_angle.svg +110 -0
- package/src/dummy/svg/dummy_pole_static.svg +192 -0
- package/src/dummy/svg/dummy_pole_static_face.svg +176 -0
- package/src/dummy/svg/rectangle.svg +131 -0
- package/src/dummy/svg/rectangle_height.svg +82 -0
- package/src/dummy/svg/rectangle_width.svg +81 -0
- package/src/gears/gearWheelProfile.test.ts +25 -0
- package/src/gears/gearWheelProfile.ts +753 -0
- package/src/gears/gear_wheel_wheel.ts +335 -0
- package/src/gears/involute.test.ts +21 -0
- package/src/gears/involute.ts +113 -0
- package/src/gears/simplified_gear_wheel.ts +242 -0
- package/src/gears/svg/calculation_of_initAngle2.svg +376 -0
- package/src/gears/svg/gear_addendeum_dedendum_sizes.svg +471 -0
- package/src/gears/svg/gear_addendum_and_dedendum.svg +269 -0
- package/src/gears/svg/gear_adherence_replaced_by_teeth.svg +168 -0
- package/src/gears/svg/gear_base_circle_for_involute.svg +376 -0
- package/src/gears/svg/gear_base_left_circle_for_involute.svg +556 -0
- package/src/gears/svg/gear_base_right_circle_for_involute.svg +516 -0
- package/src/gears/svg/gear_inter_axis_maximum_distance.svg +218 -0
- package/src/gears/svg/gear_inter_axis_minimum_distance.svg +218 -0
- package/src/gears/svg/gear_large_base_radius.svg +199 -0
- package/src/gears/svg/gear_module_and_tooth_thickness.svg +319 -0
- package/src/gears/svg/gear_optimum_base_radius.svg +232 -0
- package/src/gears/svg/gear_optimum_base_radius_with_longer_inter_axis.svg +344 -0
- package/src/gears/svg/gear_right_left_base_circles.svg +295 -0
- package/src/gears/svg/gear_small_base_radius.svg +163 -0
- package/src/gears/svg/gear_wheel_circles.svg +348 -0
- package/src/gears/svg/gears.svg +4726 -0
- package/src/gears/svg/gears_motion_transmission_via_adherence.svg +178 -0
- package/src/gears/svg/involute_of_circle.svg +2745 -0
- package/src/gears/svg/involute_of_circle_R0.svg +334 -0
- package/src/gears/svg/involute_of_circle_Ri1_u0.svg +297 -0
- package/src/gears/svg/involute_of_circle_Ri2_u2.svg +386 -0
- package/src/gears/svg/left_side_angle_kitchen.svg +207 -0
- package/src/gears/svg/negative_involute_of_circle_R0.svg +381 -0
- package/src/gears/svg/point_c_position_and_speed_negative.svg +343 -0
- package/src/gears/svg/point_c_position_and_speed_positive.svg +339 -0
- package/src/gears/svg/right_side_angle_kitchen.svg +201 -0
- package/src/gears/wheelElements.test.ts +13 -0
- package/src/gears/wheelElements.ts +176 -0
- package/src/geometrix_verification/svg/verify_contour_1.svg +320 -0
- package/src/geometrix_verification/svg/verify_contour_1_l1.svg +102 -0
- package/src/geometrix_verification/svg/verify_contour_1_r1.svg +170 -0
- package/src/geometrix_verification/svg/verify_line.svg +845 -0
- package/src/geometrix_verification/svg/verify_line_2_l1cx.svg +274 -0
- package/src/geometrix_verification/svg/verify_line_p1x.svg +261 -0
- package/src/geometrix_verification/svg/verify_point.svg +350 -0
- package/src/geometrix_verification/svg/verify_point_p1x.svg +258 -0
- package/src/geometrix_verification/svg/verify_vector_p1x.svg +282 -0
- package/src/geometrix_verification/verify_contour_1.ts +94 -0
- package/src/geometrix_verification/verify_contour_2.ts +267 -0
- package/src/geometrix_verification/verify_contour_3.ts +409 -0
- package/src/geometrix_verification/verify_contour_4.ts +91 -0
- package/src/geometrix_verification/verify_exports_1.ts +95 -0
- package/src/geometrix_verification/verify_line.ts +76 -0
- package/src/geometrix_verification/verify_line_2.ts +76 -0
- package/src/geometrix_verification/verify_line_3.ts +64 -0
- package/src/geometrix_verification/verify_point.ts +62 -0
- package/src/geometrix_verification/verify_point_2.ts +66 -0
- package/src/geometrix_verification/verify_vector.ts +70 -0
- package/src/heliostat/base.ts +254 -0
- package/src/heliostat/heliostat.ts +317 -0
- package/src/heliostat/heliostat_2.ts +284 -0
- package/src/heliostat/pole_rotor.ts +165 -0
- package/src/heliostat/pole_static.ts +275 -0
- package/src/heliostat/rake.ts +486 -0
- package/src/heliostat/rake_stopper.ts +409 -0
- package/src/heliostat/rod.ts +200 -0
- package/src/heliostat/spider.ts +238 -0
- package/src/heliostat/surface.ts +320 -0
- package/src/heliostat/svg/base.svg +1367 -0
- package/src/heliostat/svg/base_cut.svg +459 -0
- package/src/heliostat/svg/base_hollow.svg +469 -0
- package/src/heliostat/svg/base_top.svg +338 -0
- package/src/heliostat/svg/heliostat.svg +8013 -0
- package/src/heliostat/svg/heliostat2_face_sizing.svg +1386 -0
- package/src/heliostat/svg/heliostat2_side_sizing.svg +984 -0
- package/src/heliostat/svg/heliostat_face_sizing.svg +1448 -0
- package/src/heliostat/svg/heliostat_overview.svg +1552 -0
- package/src/heliostat/svg/heliostat_side.svg +1470 -0
- package/src/heliostat/svg/heliostat_side_sizing.svg +1128 -0
- package/src/heliostat/svg/pole_rotor.svg +592 -0
- package/src/heliostat/svg/pole_rotor_cut.svg +287 -0
- package/src/heliostat/svg/pole_rotor_ends.svg +336 -0
- package/src/heliostat/svg/pole_stator.svg +1945 -0
- package/src/heliostat/svg/pole_stator_E2.svg +410 -0
- package/src/heliostat/svg/pole_stator_bottom.svg +330 -0
- package/src/heliostat/svg/pole_stator_cut.svg +465 -0
- package/src/heliostat/svg/pole_stator_face.svg +457 -0
- package/src/heliostat/svg/pole_stator_right.svg +357 -0
- package/src/heliostat/svg/rake.svg +4691 -0
- package/src/heliostat/svg/rake_door.svg +617 -0
- package/src/heliostat/svg/rake_face.svg +1211 -0
- package/src/heliostat/svg/rake_side.svg +809 -0
- package/src/heliostat/svg/rake_side_stopper.svg +596 -0
- package/src/heliostat/svg/rake_top.svg +514 -0
- package/src/heliostat/svg/rake_top_stopper.svg +565 -0
- package/src/heliostat/svg/rod.svg +1314 -0
- package/src/heliostat/svg/rod_cut.svg +265 -0
- package/src/heliostat/svg/rod_plate.svg +409 -0
- package/src/heliostat/svg/rod_top.svg +577 -0
- package/src/heliostat/svg/spider.svg +693 -0
- package/src/heliostat/svg/spider_lateral.svg +222 -0
- package/src/heliostat/svg/spider_profile.svg +429 -0
- package/src/heliostat/svg/surface.svg +3577 -0
- package/src/heliostat/svg/surface_crenel.svg +1335 -0
- package/src/heliostat/svg/surface_extremities.svg +510 -0
- package/src/heliostat/svg/surface_lz.svg +182 -0
- package/src/heliostat/svg/surface_main.svg +366 -0
- package/src/heliostat/svg/surface_power.svg +331 -0
- package/src/heliostat/svg/surface_space_evolution.svg +210 -0
- package/src/heliostat/svg/surface_space_shape.svg +98 -0
- package/src/heliostat/svg/swing.svg +3310 -0
- package/src/heliostat/svg/swing_face.svg +902 -0
- package/src/heliostat/svg/swing_side.svg +574 -0
- package/src/heliostat/svg/swing_top.svg +923 -0
- package/src/heliostat/svg/swing_with_rod.svg +547 -0
- package/src/heliostat/svg/trapeze.svg +1711 -0
- package/src/heliostat/svg/trapeze_rod.svg +122 -0
- package/src/heliostat/svg/trapeze_side.svg +361 -0
- package/src/heliostat/svg/trapeze_top.svg +1057 -0
- package/src/heliostat/swing.ts +246 -0
- package/src/heliostat/trapeze.ts +510 -0
- package/src/index.ts +33 -0
- package/src/svg/default_param_blank.svg +40 -0
- package/tsconfig.json +13 -0
- package/vitest.config.ts +7 -0
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
|
3
|
+
|
|
4
|
+
<svg
|
|
5
|
+
width="200.99998"
|
|
6
|
+
height="200.99998"
|
|
7
|
+
viewBox="0 0 53.181246 53.181245"
|
|
8
|
+
version="1.1"
|
|
9
|
+
id="svg695"
|
|
10
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
11
|
+
xmlns:svg="http://www.w3.org/2000/svg">
|
|
12
|
+
<defs
|
|
13
|
+
id="defs692">
|
|
14
|
+
<rect
|
|
15
|
+
x="165.83929"
|
|
16
|
+
y="886.69299"
|
|
17
|
+
width="58.306961"
|
|
18
|
+
height="27.666842"
|
|
19
|
+
id="rect1831" />
|
|
20
|
+
<rect
|
|
21
|
+
x="157.59195"
|
|
22
|
+
y="882.45026"
|
|
23
|
+
width="81.515121"
|
|
24
|
+
height="28.505205"
|
|
25
|
+
id="rect1783" />
|
|
26
|
+
<marker
|
|
27
|
+
style="overflow:visible"
|
|
28
|
+
id="TriangleStart"
|
|
29
|
+
refX="0"
|
|
30
|
+
refY="0"
|
|
31
|
+
orient="auto-start-reverse"
|
|
32
|
+
markerWidth="5.3244081"
|
|
33
|
+
markerHeight="6.155385"
|
|
34
|
+
viewBox="0 0 5.3244081 6.1553851"
|
|
35
|
+
preserveAspectRatio="xMidYMid">
|
|
36
|
+
<path
|
|
37
|
+
transform="scale(0.5)"
|
|
38
|
+
style="fill:context-stroke;fill-rule:evenodd;stroke:context-stroke;stroke-width:1pt"
|
|
39
|
+
d="M 5.77,0 -2.88,5 V -5 Z"
|
|
40
|
+
id="path135" />
|
|
41
|
+
</marker>
|
|
42
|
+
<marker
|
|
43
|
+
style="overflow:visible"
|
|
44
|
+
id="Arrow1L-367"
|
|
45
|
+
refX="0"
|
|
46
|
+
refY="0"
|
|
47
|
+
orient="auto-start-reverse"
|
|
48
|
+
markerWidth="8.75"
|
|
49
|
+
markerHeight="5"
|
|
50
|
+
viewBox="0 0 8.75 5"
|
|
51
|
+
preserveAspectRatio="xMidYMid">
|
|
52
|
+
<path
|
|
53
|
+
style="fill:context-stroke;fill-rule:evenodd;stroke:none"
|
|
54
|
+
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
|
55
|
+
id="arrow1L-5"
|
|
56
|
+
transform="scale(-0.5)" />
|
|
57
|
+
</marker>
|
|
58
|
+
<marker
|
|
59
|
+
style="overflow:visible"
|
|
60
|
+
id="Arrow1L-3-3"
|
|
61
|
+
refX="0"
|
|
62
|
+
refY="0"
|
|
63
|
+
orient="auto-start-reverse"
|
|
64
|
+
markerWidth="8.75"
|
|
65
|
+
markerHeight="5"
|
|
66
|
+
viewBox="0 0 8.75 5"
|
|
67
|
+
preserveAspectRatio="xMidYMid">
|
|
68
|
+
<path
|
|
69
|
+
style="fill:context-stroke;fill-rule:evenodd;stroke:none"
|
|
70
|
+
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
|
71
|
+
id="arrow1L-6-5"
|
|
72
|
+
transform="scale(-0.5)" />
|
|
73
|
+
</marker>
|
|
74
|
+
<rect
|
|
75
|
+
x="372.01367"
|
|
76
|
+
y="274.98071"
|
|
77
|
+
width="57.012054"
|
|
78
|
+
height="32.118458"
|
|
79
|
+
id="rect1499-6" />
|
|
80
|
+
<rect
|
|
81
|
+
x="373.3457"
|
|
82
|
+
y="209.37923"
|
|
83
|
+
width="65.277283"
|
|
84
|
+
height="27.877937"
|
|
85
|
+
id="rect1517-2" />
|
|
86
|
+
<rect
|
|
87
|
+
x="399.97449"
|
|
88
|
+
y="129.03419"
|
|
89
|
+
width="56.102253"
|
|
90
|
+
height="26.07551"
|
|
91
|
+
id="rect1535-9" />
|
|
92
|
+
<rect
|
|
93
|
+
x="249.58293"
|
|
94
|
+
y="441.07812"
|
|
95
|
+
width="31.984295"
|
|
96
|
+
height="20.337519"
|
|
97
|
+
id="rect1607-1" />
|
|
98
|
+
<rect
|
|
99
|
+
x="292.84778"
|
|
100
|
+
y="411.62289"
|
|
101
|
+
width="56.435627"
|
|
102
|
+
height="34.83194"
|
|
103
|
+
id="rect1625-2" />
|
|
104
|
+
<rect
|
|
105
|
+
x="349.40002"
|
|
106
|
+
y="374.27997"
|
|
107
|
+
width="50.587605"
|
|
108
|
+
height="42.512707"
|
|
109
|
+
id="rect1643-7" />
|
|
110
|
+
<marker
|
|
111
|
+
style="overflow:visible"
|
|
112
|
+
id="TriangleStart-7"
|
|
113
|
+
refX="0"
|
|
114
|
+
refY="0"
|
|
115
|
+
orient="auto-start-reverse"
|
|
116
|
+
markerWidth="5.3244081"
|
|
117
|
+
markerHeight="6.155385"
|
|
118
|
+
viewBox="0 0 5.3244081 6.1553851"
|
|
119
|
+
preserveAspectRatio="xMidYMid">
|
|
120
|
+
<path
|
|
121
|
+
transform="scale(0.5)"
|
|
122
|
+
style="fill:context-stroke;fill-rule:evenodd;stroke:context-stroke;stroke-width:1pt"
|
|
123
|
+
d="M 5.77,0 -2.88,5 V -5 Z"
|
|
124
|
+
id="path135-3" />
|
|
125
|
+
</marker>
|
|
126
|
+
<rect
|
|
127
|
+
x="165.83929"
|
|
128
|
+
y="886.69299"
|
|
129
|
+
width="58.306961"
|
|
130
|
+
height="27.666842"
|
|
131
|
+
id="rect1831-2" />
|
|
132
|
+
<rect
|
|
133
|
+
x="157.59195"
|
|
134
|
+
y="882.45026"
|
|
135
|
+
width="81.515121"
|
|
136
|
+
height="28.505205"
|
|
137
|
+
id="rect1783-3" />
|
|
138
|
+
</defs>
|
|
139
|
+
<g
|
|
140
|
+
id="layer1"
|
|
141
|
+
transform="translate(-38.571071,-203.06992)">
|
|
142
|
+
<rect
|
|
143
|
+
style="fill:#ffffff;stroke:#ffffff;stroke-width:0.264583"
|
|
144
|
+
id="rect111-0"
|
|
145
|
+
width="52.916668"
|
|
146
|
+
height="52.916668"
|
|
147
|
+
x="38.703362"
|
|
148
|
+
y="203.20221" />
|
|
149
|
+
<path
|
|
150
|
+
style="fill:#ffffff;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1L-367)"
|
|
151
|
+
d="M 42.55225,229.02035 H 84.436379"
|
|
152
|
+
id="path327-6" />
|
|
153
|
+
<path
|
|
154
|
+
style="fill:#ffffff;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1L-3-3)"
|
|
155
|
+
d="M 64.321138,250.78924 V 208.90511"
|
|
156
|
+
id="path327-7-2" />
|
|
157
|
+
<circle
|
|
158
|
+
style="fill:none;stroke:#ff6600;stroke-width:0.264583"
|
|
159
|
+
id="path1340-6"
|
|
160
|
+
cx="77.044075"
|
|
161
|
+
cy="220.87285"
|
|
162
|
+
r="1.0397817" />
|
|
163
|
+
<path
|
|
164
|
+
style="fill:none;stroke:#999999;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:1, 1;stroke-dashoffset:0;stroke-opacity:1"
|
|
165
|
+
d="m 77.044071,229.02035 v -8.14749 H 64.321138"
|
|
166
|
+
id="path1443-1" />
|
|
167
|
+
<text
|
|
168
|
+
xml:space="preserve"
|
|
169
|
+
transform="matrix(0.26458333,0,0,0.26458333,-25.517173,157.18025)"
|
|
170
|
+
id="text1497-8"
|
|
171
|
+
style="font-size:12px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect1499-6);display:inline;fill:#2ca02c"><tspan
|
|
172
|
+
x="372.01367"
|
|
173
|
+
y="285.59766"
|
|
174
|
+
id="tspan2660">p1x</tspan></text>
|
|
175
|
+
<text
|
|
176
|
+
xml:space="preserve"
|
|
177
|
+
transform="matrix(0.26458333,0,0,0.26458333,-40.881436,163.40982)"
|
|
178
|
+
id="text1515-7"
|
|
179
|
+
style="font-size:12px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect1517-2);display:inline;fill:#2ca02c"><tspan
|
|
180
|
+
x="373.3457"
|
|
181
|
+
y="219.99609"
|
|
182
|
+
id="tspan2662">p1y</tspan></text>
|
|
183
|
+
<text
|
|
184
|
+
xml:space="preserve"
|
|
185
|
+
transform="matrix(0.26458333,0,0,0.26458333,-26.989292,180.87059)"
|
|
186
|
+
id="text1533-9"
|
|
187
|
+
style="font-size:14.6667px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect1535-9);display:inline;fill:#2ca02c"><tspan
|
|
188
|
+
x="399.97461"
|
|
189
|
+
y="142.01175"
|
|
190
|
+
id="tspan2664">p1</tspan></text>
|
|
191
|
+
<path
|
|
192
|
+
style="fill:none;stroke:#999999;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:1, 1;stroke-dashoffset:0;stroke-opacity:1"
|
|
193
|
+
d="M 64.453504,246.75621 H 82.757229 V 228.95814"
|
|
194
|
+
id="path1443-5-2" />
|
|
195
|
+
<circle
|
|
196
|
+
style="fill:none;stroke:#ff6600;stroke-width:0.264583"
|
|
197
|
+
id="path1340-3-0"
|
|
198
|
+
cx="82.780602"
|
|
199
|
+
cy="246.6597"
|
|
200
|
+
r="1.0397817" />
|
|
201
|
+
<text
|
|
202
|
+
xml:space="preserve"
|
|
203
|
+
transform="matrix(0.26458333,0,0,0.26458333,18.045468,128.21888)"
|
|
204
|
+
id="text1605-2"
|
|
205
|
+
style="font-size:14.6667px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect1607-1);display:inline;fill:#0044aa"><tspan
|
|
206
|
+
x="249.58203"
|
|
207
|
+
y="454.05472"
|
|
208
|
+
id="tspan2666">p2</tspan></text>
|
|
209
|
+
<text
|
|
210
|
+
xml:space="preserve"
|
|
211
|
+
transform="matrix(0.26458333,0,0,0.26458333,3.5128565,115.81884)"
|
|
212
|
+
id="text1623-3"
|
|
213
|
+
style="font-size:12px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect1625-2);display:inline;fill:#0044aa"><tspan
|
|
214
|
+
x="292.84766"
|
|
215
|
+
y="422.24023"
|
|
216
|
+
id="tspan2668">p2x</tspan></text>
|
|
217
|
+
<text
|
|
218
|
+
xml:space="preserve"
|
|
219
|
+
transform="matrix(0.26458333,0,0,0.26458333,-34.785699,145.63099)"
|
|
220
|
+
id="text1641-7"
|
|
221
|
+
style="font-size:12px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect1643-7);display:inline;fill:#0044aa"><tspan
|
|
222
|
+
x="349.40039"
|
|
223
|
+
y="384.89648"
|
|
224
|
+
id="tspan2670">p2y</tspan></text>
|
|
225
|
+
<path
|
|
226
|
+
style="fill:#ffffff;stroke:#ff00ff;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#TriangleStart)"
|
|
227
|
+
d="M 52.184621,226.61386 44.722168,209.52265"
|
|
228
|
+
id="path1817-6" />
|
|
229
|
+
<path
|
|
230
|
+
style="fill:none;stroke:#b3b3b3;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
|
231
|
+
d="m 52.30586,226.5345 h 3.565152"
|
|
232
|
+
id="path1678" />
|
|
233
|
+
<path
|
|
234
|
+
style="fill:none;stroke:#800080;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
|
235
|
+
d="m 53.64522,226.58574 c 0,0 0.203246,-0.95527 -0.04519,-1.31787 -0.226108,-0.33001 -0.704997,-0.43817 -1.103654,-0.47144 -0.336631,-0.0281 -0.985033,0.23811 -0.985033,0.23811"
|
|
236
|
+
id="path1680" />
|
|
237
|
+
<text
|
|
238
|
+
xml:space="preserve"
|
|
239
|
+
transform="matrix(0.26458333,0,0,0.26458333,12.447834,-10.10952)"
|
|
240
|
+
id="text1781"
|
|
241
|
+
style="font-size:10.6667px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect1783);fill:#800080"><tspan
|
|
242
|
+
x="157.5918"
|
|
243
|
+
y="891.8887"
|
|
244
|
+
id="tspan2672">v1a</tspan></text>
|
|
245
|
+
<text
|
|
246
|
+
xml:space="preserve"
|
|
247
|
+
transform="matrix(0.26458333,0,0,0.26458333,4.0163906,-21.915801)"
|
|
248
|
+
id="text1829"
|
|
249
|
+
style="font-size:10.6667px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect1831);fill:#800080"><tspan
|
|
250
|
+
x="165.83984"
|
|
251
|
+
y="896.13089"
|
|
252
|
+
id="tspan2674">v1l</tspan></text>
|
|
253
|
+
<path
|
|
254
|
+
style="fill:#ffffff;stroke:#ff00ff;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#TriangleStart-7)"
|
|
255
|
+
d="m 51.316215,236.38865 -7.521977,9.41775"
|
|
256
|
+
id="path1817-6-6" />
|
|
257
|
+
<path
|
|
258
|
+
style="fill:none;stroke:#b3b3b3;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
|
259
|
+
d="m 51.480059,236.43194 h 3.565152"
|
|
260
|
+
id="path1678-1" />
|
|
261
|
+
<text
|
|
262
|
+
xml:space="preserve"
|
|
263
|
+
transform="matrix(0.26458333,0,0,0.26458333,-0.37956107,3.324846)"
|
|
264
|
+
id="text1829-9"
|
|
265
|
+
style="font-size:10.6667px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect1831-2);display:inline;fill:#800080"><tspan
|
|
266
|
+
x="165.83984"
|
|
267
|
+
y="896.13089"
|
|
268
|
+
id="tspan2676">v2l</tspan></text>
|
|
269
|
+
<path
|
|
270
|
+
style="fill:none;stroke:#800080;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
|
271
|
+
d="m 52.978676,236.28306 c 0,0 0.169237,-0.97223 -0.08526,-1.34067 -0.288539,-0.41773 -0.883549,-0.56585 -1.387363,-0.62847 -0.613547,-0.0763 -1.350109,-0.0668 -1.825493,0.32845 -0.37711,0.31359 -0.476977,0.88776 -0.520319,1.3763 -0.043,0.48468 -0.0089,1.03472 0.267764,1.43499 0.129883,0.1879 0.585761,0.35563 0.585761,0.35563"
|
|
272
|
+
id="path2199" />
|
|
273
|
+
<text
|
|
274
|
+
xml:space="preserve"
|
|
275
|
+
transform="matrix(0.26458333,0,0,0.26458333,8.2986425,-2.7791391)"
|
|
276
|
+
id="text1781-1"
|
|
277
|
+
style="font-size:10.6667px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect1783-3);display:inline;fill:#800080"><tspan
|
|
278
|
+
x="157.5918"
|
|
279
|
+
y="891.8887"
|
|
280
|
+
id="tspan2678">v2a</tspan></text>
|
|
281
|
+
</g>
|
|
282
|
+
</svg>
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
// verify_contour_1.ts
|
|
2
|
+
|
|
3
|
+
import type { tParamDef, tParamVal, tGeom, tPageDef } from 'geometrix';
|
|
4
|
+
import { contour, contourCircle, figure, pNumber, initGeom } from 'geometrix';
|
|
5
|
+
|
|
6
|
+
const pDef: tParamDef = {
|
|
7
|
+
partName: 'verify_contour_1',
|
|
8
|
+
params: [
|
|
9
|
+
//pNumber(name, unit, init, min, max, step)
|
|
10
|
+
pNumber('r1', 'mm', 30, 10, 200, 1),
|
|
11
|
+
pNumber('d1', 'mm', 20, 10, 200, 1),
|
|
12
|
+
pNumber('w1', 'mm', 100, 10, 200, 1),
|
|
13
|
+
pNumber('r2', 'mm', 60, 10, 200, 1),
|
|
14
|
+
pNumber('l1', 'mm', 10, 5, 200, 1),
|
|
15
|
+
pNumber('l2', 'mm', 30, 5, 200, 1)
|
|
16
|
+
],
|
|
17
|
+
paramSvg: {
|
|
18
|
+
r1: 'verify_contour_1_r1.svg',
|
|
19
|
+
d1: 'verify_contour_1_r1.svg',
|
|
20
|
+
w1: 'verify_contour_1_r1.svg',
|
|
21
|
+
r2: 'verify_contour_1_r1.svg',
|
|
22
|
+
l1: 'verify_contour_1_l1.svg',
|
|
23
|
+
l2: 'verify_contour_1_l1.svg'
|
|
24
|
+
},
|
|
25
|
+
sim: {
|
|
26
|
+
tMax: 10,
|
|
27
|
+
tStep: 0.5,
|
|
28
|
+
tUpdate: 500 // every 0.5 second
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
function pGeom(t: number, param: tParamVal): tGeom {
|
|
33
|
+
const rGeome = initGeom(pDef.partName);
|
|
34
|
+
rGeome.logstr += `${rGeome.partName} simTime: ${t}\n`;
|
|
35
|
+
try {
|
|
36
|
+
const figOne = figure();
|
|
37
|
+
const r1 = param.r1;
|
|
38
|
+
const d1 = param.d1;
|
|
39
|
+
const w1 = param.w1;
|
|
40
|
+
const r2 = param.r2;
|
|
41
|
+
const l1 = param.l1;
|
|
42
|
+
const l2 = param.l2;
|
|
43
|
+
const h1 = 6 * r1 + 4 * d1;
|
|
44
|
+
const w12 = w1 / 2;
|
|
45
|
+
const c1 = d1 + r1;
|
|
46
|
+
const c12 = 2 * r1 + d1;
|
|
47
|
+
const c2 = c1 + c12;
|
|
48
|
+
const c3 = c1 + 2 * c12;
|
|
49
|
+
const ctr1 = contour(0, 0);
|
|
50
|
+
ctr1.addSegStrokeA(w1, 0);
|
|
51
|
+
ctr1.addSegStrokeA(w1, h1);
|
|
52
|
+
ctr1.addSegStrokeA(0, h1);
|
|
53
|
+
ctr1.closeSegStroke();
|
|
54
|
+
ctr1.check();
|
|
55
|
+
figOne.addMain(ctr1);
|
|
56
|
+
figOne.addMain(contourCircle(w12, c1, r1));
|
|
57
|
+
figOne.addMain(contourCircle(w12, c2, r1 + t));
|
|
58
|
+
figOne.addMain(contourCircle(w12, c3, r1));
|
|
59
|
+
const ctr2 = contourCircle(w1 + r2, 3 * c1, r2);
|
|
60
|
+
ctr2.check();
|
|
61
|
+
figOne.addSecond(ctr2);
|
|
62
|
+
const ctr3 = contour(200 + l1, 200)
|
|
63
|
+
.addSegStrokeA(200 + l1 + l2, 200)
|
|
64
|
+
.addSegStrokeR(0, l1)
|
|
65
|
+
.addSegStrokeRP(0, l1)
|
|
66
|
+
.addSegStrokeRP(Math.PI / 2, l2)
|
|
67
|
+
.addSegStrokeAP(Math.PI / 4, Math.sqrt(2) * (200 + l1 + l2))
|
|
68
|
+
.addSegStrokeA(200 + l1 + l2, 200 + 2 * l1 + l2)
|
|
69
|
+
.addSegStrokeR(-l2, 0)
|
|
70
|
+
.addSegStrokeR(0, -l1)
|
|
71
|
+
.addSegStrokeR(-l1, 0)
|
|
72
|
+
.addSegStrokeRP(-Math.PI / 2, l2)
|
|
73
|
+
.addSegStrokeR(l1, 0)
|
|
74
|
+
.closeSegStroke();
|
|
75
|
+
ctr3.check();
|
|
76
|
+
figOne.addSecond(ctr3);
|
|
77
|
+
rGeome.fig = { one: figOne };
|
|
78
|
+
rGeome.logstr += 'verify_contour_1 draw successfully!\n';
|
|
79
|
+
rGeome.calcErr = false;
|
|
80
|
+
} catch (emsg) {
|
|
81
|
+
rGeome.logstr += emsg as string;
|
|
82
|
+
console.log(emsg);
|
|
83
|
+
}
|
|
84
|
+
return rGeome;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const verifyContour1Def: tPageDef = {
|
|
88
|
+
pTitle: 'Verify contour 1',
|
|
89
|
+
pDescription: 'Debugging contour.ts',
|
|
90
|
+
pDef: pDef,
|
|
91
|
+
pGeom: pGeom
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export { verifyContour1Def };
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
// verify_contour_2.ts
|
|
2
|
+
|
|
3
|
+
import type { tParamDef, tParamVal, tGeom, tPageDef } from 'geometrix';
|
|
4
|
+
import { degToRad, contour, figure, pNumber, initGeom } from 'geometrix';
|
|
5
|
+
|
|
6
|
+
const pDef: tParamDef = {
|
|
7
|
+
partName: 'verify_contour_2',
|
|
8
|
+
params: [
|
|
9
|
+
//pNumber(name, unit, init, min, max, step)
|
|
10
|
+
pNumber('r1', 'mm', 20, 5, 200, 1),
|
|
11
|
+
pNumber('a1', 'deg', 30, -200, 200, 1),
|
|
12
|
+
pNumber('at1', 'deg', 30, -200, 200, 1),
|
|
13
|
+
pNumber('at2', 'deg', 50, -200, 200, 1)
|
|
14
|
+
],
|
|
15
|
+
paramSvg: {
|
|
16
|
+
r1: 'verify_contour_1_r1.svg',
|
|
17
|
+
a1: 'verify_contour_1_r1.svg',
|
|
18
|
+
at1: 'verify_contour_1_r1.svg',
|
|
19
|
+
at2: 'verify_contour_1_r1.svg'
|
|
20
|
+
},
|
|
21
|
+
sim: {
|
|
22
|
+
tMax: 10,
|
|
23
|
+
tStep: 0.5,
|
|
24
|
+
tUpdate: 500 // every 0.5 second
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
function pGeom(t: number, param: tParamVal): tGeom {
|
|
29
|
+
const rGeome = initGeom(pDef.partName);
|
|
30
|
+
rGeome.logstr += `${rGeome.partName} simTime: ${t}\n`;
|
|
31
|
+
try {
|
|
32
|
+
const figOne = figure();
|
|
33
|
+
const r1 = param.r1 + t;
|
|
34
|
+
const ata = param.a1 + t;
|
|
35
|
+
const at1 = param.at1 + t;
|
|
36
|
+
const at2 = param.at2 + t;
|
|
37
|
+
const ctr1 = contour(20, 20);
|
|
38
|
+
ctr1.addSegStrokeA(40, 20);
|
|
39
|
+
ctr1.addPointA(60, 20).addSegArc(r1, true, true);
|
|
40
|
+
ctr1.addPointA(80, 20).addSegArc(r1, true, false);
|
|
41
|
+
ctr1.addPointA(100, 20).addSegArc(r1, false, true);
|
|
42
|
+
ctr1.addPointA(120, 20).addSegArc(r1, false, false);
|
|
43
|
+
ctr1.addSegStrokeA(140, 20);
|
|
44
|
+
ctr1.addSegStrokeA(140, 40);
|
|
45
|
+
ctr1.addPointA(140, 60).addSegArc(r1, true, true);
|
|
46
|
+
ctr1.addPointA(140, 80).addSegArc(r1, true, false);
|
|
47
|
+
ctr1.addPointA(140, 100).addSegArc(r1, false, true);
|
|
48
|
+
ctr1.addPointA(140, 120).addSegArc(r1, false, false);
|
|
49
|
+
ctr1.addSegStrokeA(140, 140);
|
|
50
|
+
ctr1.addSegStrokeA(120, 140);
|
|
51
|
+
ctr1.addPointA(100, 140).addSegArc(r1, true, true);
|
|
52
|
+
ctr1.addPointA(80, 140).addSegArc(r1, true, false);
|
|
53
|
+
ctr1.addPointA(60, 140).addSegArc(r1, false, true);
|
|
54
|
+
ctr1.addPointA(40, 140).addSegArc(r1, false, false);
|
|
55
|
+
ctr1.addSegStrokeA(20, 140);
|
|
56
|
+
ctr1.addSegStrokeA(20, 120);
|
|
57
|
+
ctr1.addPointA(20, 100).addSegArc(r1, true, true);
|
|
58
|
+
ctr1.addPointA(20, 80).addSegArc(r1, true, false);
|
|
59
|
+
ctr1.addPointA(20, 60).addSegArc(r1, false, true);
|
|
60
|
+
ctr1.addPointA(20, 40).addSegArc(r1, false, false);
|
|
61
|
+
ctr1.closeSegStroke();
|
|
62
|
+
ctr1.check(); // throw an exception if any error
|
|
63
|
+
figOne.addMain(ctr1);
|
|
64
|
+
const ctr2 = contour(20, -20);
|
|
65
|
+
ctr2.addSegStrokeA(40, -40);
|
|
66
|
+
ctr2.addPointA(60, -60).addSegArc(r1, true, true);
|
|
67
|
+
ctr2.addPointA(80, -80).addSegArc(r1, true, false);
|
|
68
|
+
ctr2.addPointA(100, -100).addSegArc(r1, false, true);
|
|
69
|
+
ctr2.addPointA(120, -120).addSegArc(r1, false, false);
|
|
70
|
+
ctr2.addSegStrokeA(140, -140);
|
|
71
|
+
ctr2.addSegStrokeR(20, 20)
|
|
72
|
+
.addPointR(20, 20)
|
|
73
|
+
.addSegArc(r1, false, false)
|
|
74
|
+
.addPointRP(Math.PI / 4, 28)
|
|
75
|
+
.addSegArc(r1, false, true)
|
|
76
|
+
.addPointRP(Math.PI / 4, 28)
|
|
77
|
+
.addSegArc(r1, true, true)
|
|
78
|
+
.addPointRP(Math.PI / 4, 28)
|
|
79
|
+
.addSegArc(r1, true, false)
|
|
80
|
+
.addSegStrokeRP(Math.PI / 4, 20)
|
|
81
|
+
.addSegStrokeRP(-Math.PI / 4, 20)
|
|
82
|
+
.addPointR(10, -9)
|
|
83
|
+
.addPointR(20, -20)
|
|
84
|
+
.addSegArc2()
|
|
85
|
+
.addPointR(20, -9)
|
|
86
|
+
.addPointR(20, -20)
|
|
87
|
+
.addSegArc2()
|
|
88
|
+
.addPointR(9, -6)
|
|
89
|
+
.addPointR(20, -20)
|
|
90
|
+
.addSegArc2()
|
|
91
|
+
.addPointR(9, -14)
|
|
92
|
+
.addPointR(20, -20)
|
|
93
|
+
.addSegArc2()
|
|
94
|
+
.addPointR(9, 0)
|
|
95
|
+
.addPointR(20, -20)
|
|
96
|
+
.addSegArc2()
|
|
97
|
+
.addSegStrokeR(20, -20)
|
|
98
|
+
.addSegStrokeR(20, 20)
|
|
99
|
+
.addPointR(9, 20)
|
|
100
|
+
.addPointR(20, 20)
|
|
101
|
+
.addSegArc2()
|
|
102
|
+
.addPointR(20, 10)
|
|
103
|
+
.addPointR(20, 20)
|
|
104
|
+
.addSegArc2()
|
|
105
|
+
.addPointR(9, 6)
|
|
106
|
+
.addPointR(20, 20)
|
|
107
|
+
.addSegArc2()
|
|
108
|
+
.addPointR(9, 14)
|
|
109
|
+
.addPointR(20, 20)
|
|
110
|
+
.addSegArc2()
|
|
111
|
+
.addPointR(9, 0)
|
|
112
|
+
.addPointR(20, 20)
|
|
113
|
+
.addSegArc2()
|
|
114
|
+
.addSegStrokeR(20, 20)
|
|
115
|
+
.addSegStrokeR(0, 20)
|
|
116
|
+
.addPointR(15, 8)
|
|
117
|
+
.addPointR(0, 20)
|
|
118
|
+
.addSegArc2()
|
|
119
|
+
.addPointR(-15, 8)
|
|
120
|
+
.addPointR(0, 20)
|
|
121
|
+
.addSegArc2()
|
|
122
|
+
.addPointR(5, 8)
|
|
123
|
+
.addPointR(0, 20)
|
|
124
|
+
.addSegArc2()
|
|
125
|
+
.addPointR(-5, 8)
|
|
126
|
+
.addPointR(0, 20)
|
|
127
|
+
.addSegArc2()
|
|
128
|
+
.addSegStrokeR(0, 20)
|
|
129
|
+
.addSegStrokeR(20, 0)
|
|
130
|
+
.addPointR(8, 15)
|
|
131
|
+
.addPointR(20, 0)
|
|
132
|
+
.addSegArc2()
|
|
133
|
+
.addPointR(8, -15)
|
|
134
|
+
.addPointR(20, 0)
|
|
135
|
+
.addSegArc2()
|
|
136
|
+
.addPointR(8, 5)
|
|
137
|
+
.addPointR(20, 0)
|
|
138
|
+
.addSegArc2()
|
|
139
|
+
.addPointR(8, -5)
|
|
140
|
+
.addPointR(20, 0)
|
|
141
|
+
.addSegArc2()
|
|
142
|
+
.addSegStrokeR(20, 0)
|
|
143
|
+
.addSegStrokeR(0, -20)
|
|
144
|
+
.addPointR(15, -8)
|
|
145
|
+
.addPointR(0, -20)
|
|
146
|
+
.addSegArc2()
|
|
147
|
+
.addPointR(-15, -8)
|
|
148
|
+
.addPointR(0, -20)
|
|
149
|
+
.addSegArc2()
|
|
150
|
+
.addPointR(5, -8)
|
|
151
|
+
.addPointR(0, -20)
|
|
152
|
+
.addSegArc2()
|
|
153
|
+
.addPointR(-5, -8)
|
|
154
|
+
.addPointR(0, -20)
|
|
155
|
+
.addSegArc2()
|
|
156
|
+
.addSegStrokeR(0, -20)
|
|
157
|
+
.addSegStrokeR(-20, 0)
|
|
158
|
+
.addPointR(-8, 15)
|
|
159
|
+
.addPointR(-20, 0)
|
|
160
|
+
.addSegArc2()
|
|
161
|
+
.addPointR(-8, -15)
|
|
162
|
+
.addPointR(-20, 0)
|
|
163
|
+
.addSegArc2()
|
|
164
|
+
.addPointR(-8, 5)
|
|
165
|
+
.addPointR(-20, 0)
|
|
166
|
+
.addSegArc2()
|
|
167
|
+
.addPointR(-8, -5)
|
|
168
|
+
.addPointR(-20, 0)
|
|
169
|
+
.addSegArc2()
|
|
170
|
+
.addSegStrokeR(-20, 0)
|
|
171
|
+
.closeSegStroke();
|
|
172
|
+
ctr2.check(); // throw an exception if any error
|
|
173
|
+
figOne.addMain(ctr2);
|
|
174
|
+
const ctr3 = contour(200, 200)
|
|
175
|
+
.addSegStrokeR(20, 0)
|
|
176
|
+
.addPointR(20, 0)
|
|
177
|
+
.addSegArc3(degToRad(ata), true)
|
|
178
|
+
.addSegStrokeR(20, 0)
|
|
179
|
+
.addPointR(20, 0)
|
|
180
|
+
.addSegArc3(degToRad(ata), false)
|
|
181
|
+
.addSegStrokeR(20, 0)
|
|
182
|
+
.addSegStrokeR(0, 20)
|
|
183
|
+
.addPointR(0, 20)
|
|
184
|
+
.addSegArc3(degToRad(ata), true)
|
|
185
|
+
.addSegStrokeR(0, 20)
|
|
186
|
+
.addPointR(0, 20)
|
|
187
|
+
.addSegArc3(degToRad(ata), false)
|
|
188
|
+
.addSegStrokeR(0, 20)
|
|
189
|
+
.addSegStrokeR(-20, 0)
|
|
190
|
+
.addPointR(-20, 0)
|
|
191
|
+
.addSegArc3(degToRad(ata), true)
|
|
192
|
+
.addSegStrokeR(-20, 0)
|
|
193
|
+
.addPointR(-20, 0)
|
|
194
|
+
.addSegArc3(degToRad(ata), false)
|
|
195
|
+
.addSegStrokeR(-20, 0)
|
|
196
|
+
.addSegStrokeR(0, -20)
|
|
197
|
+
.addPointR(0, -20)
|
|
198
|
+
.addSegArc3(degToRad(ata), true)
|
|
199
|
+
.addSegStrokeR(0, -20)
|
|
200
|
+
.addPointR(0, -20)
|
|
201
|
+
.addSegArc3(degToRad(ata), false)
|
|
202
|
+
.addSegStrokeR(0, -20);
|
|
203
|
+
ctr3.check(); // throw an exception if any error
|
|
204
|
+
figOne.addMain(ctr3);
|
|
205
|
+
const ctr4 = contour(600, 200)
|
|
206
|
+
.addSegStrokeR(20, 20)
|
|
207
|
+
.addPointR(20, 20)
|
|
208
|
+
.addSegArc3(degToRad(ata), true)
|
|
209
|
+
.addSegStrokeR(20, 20)
|
|
210
|
+
.addPointR(20, 20)
|
|
211
|
+
.addSegArc3(degToRad(ata), false)
|
|
212
|
+
.addSegStrokeR(20, 20)
|
|
213
|
+
.addSegStrokeR(-20, 20)
|
|
214
|
+
.addPointR(-20, 20)
|
|
215
|
+
.addSegArc3(degToRad(ata), true)
|
|
216
|
+
.addSegStrokeR(-20, 20)
|
|
217
|
+
.addPointR(-20, 20)
|
|
218
|
+
.addSegArc3(degToRad(ata), false)
|
|
219
|
+
.addSegStrokeR(-20, 20)
|
|
220
|
+
.addSegStrokeR(-20, -20)
|
|
221
|
+
.addPointR(-20, -20)
|
|
222
|
+
.addSegArc3(degToRad(ata), true)
|
|
223
|
+
.addSegStrokeR(-20, -20)
|
|
224
|
+
.addPointR(-20, -20)
|
|
225
|
+
.addSegArc3(degToRad(ata), false)
|
|
226
|
+
.addSegStrokeR(-20, -20)
|
|
227
|
+
.addSegStrokeR(20, -20)
|
|
228
|
+
.addPointR(20, -20)
|
|
229
|
+
.addSegArc3(degToRad(ata), true)
|
|
230
|
+
.addSegStrokeR(20, -20)
|
|
231
|
+
.addPointR(20, -20)
|
|
232
|
+
.addSegArc3(degToRad(ata), false)
|
|
233
|
+
.addSegStrokeR(20, -20);
|
|
234
|
+
ctr4.check(); // throw an exception if any error
|
|
235
|
+
figOne.addMain(ctr4);
|
|
236
|
+
const ctr5 = contour(100, 500);
|
|
237
|
+
for (let i = 0; i < 8; i++) {
|
|
238
|
+
const adir = i * 45;
|
|
239
|
+
const adirRad = degToRad(adir);
|
|
240
|
+
ctr5.addSegStrokeRP(adirRad, 20)
|
|
241
|
+
.addPointRP(adirRad, 20)
|
|
242
|
+
.addSeg2Arcs(degToRad(adir + at1), degToRad(180 + adir - at2))
|
|
243
|
+
.addSegStrokeRP(adirRad, 20)
|
|
244
|
+
.addPointRP(adirRad, 20)
|
|
245
|
+
.addSeg2Arcs(degToRad(adir - at1), degToRad(180 + adir + at2))
|
|
246
|
+
.addSegStrokeRP(adirRad, 20);
|
|
247
|
+
}
|
|
248
|
+
ctr5.check(); // throw an exception if any error
|
|
249
|
+
figOne.addMain(ctr5);
|
|
250
|
+
rGeome.fig = { one: figOne };
|
|
251
|
+
rGeome.logstr += 'verify_contour_2 draw successfully!\n';
|
|
252
|
+
rGeome.calcErr = false;
|
|
253
|
+
} catch (emsg) {
|
|
254
|
+
rGeome.logstr += emsg as string;
|
|
255
|
+
console.log(emsg);
|
|
256
|
+
}
|
|
257
|
+
return rGeome;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
const verifyContour2Def: tPageDef = {
|
|
261
|
+
pTitle: 'Verify contour 2',
|
|
262
|
+
pDescription: 'Debugging more contour.ts',
|
|
263
|
+
pDef: pDef,
|
|
264
|
+
pGeom: pGeom
|
|
265
|
+
};
|
|
266
|
+
|
|
267
|
+
export { verifyContour2Def };
|