slvs 3.2__cp313-cp313-win32.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.
slvs/__init__.py ADDED
@@ -0,0 +1,99 @@
1
+ from .solvespace import (
2
+ add_base_2d,
3
+ add_arc,
4
+ add_circle,
5
+ add_constraint,
6
+ add_cubic,
7
+ add_distance,
8
+ add_line_2d,
9
+ add_line_3d,
10
+ add_normal_2d,
11
+ add_normal_3d,
12
+ add_point_2d,
13
+ add_point_3d,
14
+ add_workplane,
15
+ angle,
16
+ clear_sketch,
17
+ coincident,
18
+ diameter,
19
+ distance,
20
+ distance_proj,
21
+ dragged,
22
+ equal,
23
+ equal_angle,
24
+ equal_point_to_line,
25
+ get_param_value,
26
+ set_param_value,
27
+ horizontal,
28
+ length_diff,
29
+ make_quaternion,
30
+ midpoint,
31
+ parallel,
32
+ perpendicular,
33
+ quaternion_n,
34
+ quaternion_u,
35
+ quaternion_v,
36
+ ratio,
37
+ same_orientation,
38
+ solve_sketch,
39
+ symmetric,
40
+ symmetric_h,
41
+ symmetric_v,
42
+ tangent,
43
+ vertical,
44
+ ResultFlag,
45
+ ConstraintType,
46
+ E_NONE,
47
+ E_FREE_IN_3D
48
+ )
49
+
50
+ __all__ = [
51
+ "add_base_2d",
52
+ "add_arc",
53
+ "add_circle",
54
+ "add_constraint",
55
+ "add_cubic",
56
+ "add_distance",
57
+ "add_line_2d",
58
+ "add_line_3d",
59
+ "add_normal_2d",
60
+ "add_normal_3d",
61
+ "add_point_2d",
62
+ "add_point_3d",
63
+ "add_workplane",
64
+ "angle",
65
+ "clear_sketch",
66
+ "coincident",
67
+ "diameter",
68
+ "distance",
69
+ "distance_proj",
70
+ "dragged",
71
+ "equal",
72
+ "equal_angle",
73
+ "equal_point_to_line",
74
+ "get_param_value",
75
+ "set_param_value",
76
+ "horizontal",
77
+ "length_diff",
78
+ "make_quaternion",
79
+ "midpoint",
80
+ "parallel",
81
+ "perpendicular",
82
+ "quaternion_n",
83
+ "quaternion_u",
84
+ "quaternion_v",
85
+ "ratio",
86
+ "same_orientation",
87
+ "solve_sketch",
88
+ "symmetric",
89
+ "symmetric_h",
90
+ "symmetric_v",
91
+ "tangent",
92
+ "vertical",
93
+ "ResultFlag",
94
+ "ConstraintType",
95
+ "E_NONE",
96
+ "E_FREE_IN_3D",
97
+ ]
98
+
99
+ __test__ = {}
slvs/solvespace.pyd ADDED
Binary file
slvs/solvespace.pyi ADDED
@@ -0,0 +1,280 @@
1
+ # -*- coding: utf-8 -*-
2
+
3
+ from typing import Tuple, TypedDict
4
+ from enum import IntEnum, auto
5
+
6
+ class ConstraintType(IntEnum):
7
+ """Symbol of the constraint types."""
8
+ POINTS_COINCIDENT = 100000
9
+ PT_PT_DISTANCE = 100001
10
+ PT_PLANE_DISTANCE = 100002
11
+ PT_LINE_DISTANCE = 100003
12
+ PT_FACE_DISTANCE = 100004
13
+ PT_IN_PLANE = 100005
14
+ PT_ON_LINE = 100006
15
+ PT_ON_FACE = 100007
16
+ EQUAL_LENGTH_LINES = 100008
17
+ LENGTH_RATIO = 100009
18
+ EQ_LEN_PT_LINE_D = 100010
19
+ EQ_PT_LN_DISTANCES = 100011
20
+ EQUAL_ANGLE = 100012
21
+ EQUAL_LINE_ARC_LEN = 100013
22
+ SYMMETRIC = 100014
23
+ SYMMETRIC_HORIZ = 100015
24
+ SYMMETRIC_VERT = 100016
25
+ SYMMETRIC_LINE = 100017
26
+ AT_MIDPOINT = 100018
27
+ HORIZONTAL = 100019
28
+ VERTICAL = 100020
29
+ DIAMETER = 100021
30
+ PT_ON_CIRCLE = 100022
31
+ SAME_ORIENTATION = 100023
32
+ ANGLE = 100024
33
+ PARALLEL = 100025
34
+ PERPENDICULAR = 100026
35
+ ARC_LINE_TANGENT = 100027
36
+ CUBIC_LINE_TANGENT = 100028
37
+ EQUAL_RADIUS = 100029
38
+ PROJ_PT_DISTANCE = 100030
39
+ WHERE_DRAGGED = 100031
40
+ CURVE_CURVE_TANGENT = 100032
41
+ LENGTH_DIFFERENCE = 100033
42
+ ARC_ARC_LEN_RATIO = 100034
43
+ ARC_LINE_LEN_RATIO = 100035
44
+ ARC_ARC_DIFFERENCE = 100036
45
+ ARC_LINE_DIFFERENCE = 100037
46
+
47
+ class EntityType(IntEnum):
48
+ POINT_IN_3D = 50000
49
+ POINT_IN_2D = 50001
50
+ NORMAL_IN_3D = 60000
51
+ NORMAL_IN_2D = 60001
52
+ DISTANCE = 70000
53
+ WORKPLANE = 80000
54
+ LINE_SEGMENT = 80001
55
+ CUBIC = 80002
56
+ CIRCLE = 80003
57
+ ARC_OF_CIRCLE = 80004
58
+
59
+ class ResultFlag(IntEnum):
60
+ """Symbol of the result flags."""
61
+ OKAY = 0
62
+ INCONSISTENT = auto()
63
+ DIDNT_CONVERGE = auto()
64
+ TOO_MANY_UNKNOWNS = auto()
65
+ REDUNDANT_OKAY = auto()
66
+
67
+ class Slvs_Entity(TypedDict):
68
+ h: int
69
+ group: int
70
+ type: int
71
+ wrkpl: int
72
+ point: list[int]
73
+ normal: int
74
+ distance: int
75
+ param: list[int]
76
+
77
+ class Slvs_Constraint(TypedDict):
78
+ h: int
79
+ group: int
80
+ type: int
81
+ wrkpl: int
82
+ valA: float
83
+ ptA: int
84
+ ptB: int
85
+ entityA: int
86
+ entityB: int
87
+ entityC: int
88
+ entityD: int
89
+ other: int
90
+ other2: int
91
+
92
+ class Slvs_SolveResult(TypedDict):
93
+ result: int
94
+ dof: int
95
+ rank: int
96
+ bad: int
97
+
98
+ E_FREE_IN_3D : Slvs_Entity
99
+ E_NONE : Slvs_Entity
100
+
101
+ def quaternion_u(
102
+ qw: float,
103
+ qx: float,
104
+ qy: float,
105
+ qz: float
106
+ ) -> Tuple[float, float, float]:
107
+ ...
108
+
109
+ def quaternion_v(
110
+ qw: float,
111
+ qx: float,
112
+ qy: float,
113
+ qz: float
114
+ ) -> Tuple[float, float, float]:
115
+ ...
116
+
117
+ def quaternion_n(
118
+ qw: float,
119
+ qx: float,
120
+ qy: float,
121
+ qz: float
122
+ ) -> Tuple[float, float, float]:
123
+ ...
124
+
125
+ def make_quaternion(
126
+ ux: float,
127
+ uy: float,
128
+ uz: float,
129
+ vx: float,
130
+ vy: float,
131
+ vz: float
132
+ ) -> Tuple[float, float, float, float]:
133
+ ...
134
+
135
+ def add_base_2d(grouph: int) -> Slvs_Entity:
136
+ ...
137
+
138
+ def add_point_2d(grouph: int, u: float, v: float, wp: Slvs_Entity) -> Slvs_Entity:
139
+ ...
140
+
141
+ def add_point_3d(grouph: int, x: float, y: float, z: float) -> Slvs_Entity:
142
+ ...
143
+
144
+ def add_normal_2d(grouph: int, wp: Slvs_Entity) -> Slvs_Entity:
145
+ ...
146
+
147
+ def add_normal_3d(grouph: int, qw: float, qx: float, qy: float, qz: float) -> Slvs_Entity:
148
+ ...
149
+
150
+ def add_distance(grouph: int, d: float, wp: Slvs_Entity) -> Slvs_Entity:
151
+ ...
152
+
153
+ def add_line_2d(grouph: int, p1: Slvs_Entity, p2: Slvs_Entity, wp: Slvs_Entity) -> Slvs_Entity:
154
+ ...
155
+
156
+ def add_line_3d(grouph: int, p1: Slvs_Entity, p2: Slvs_Entity) -> Slvs_Entity:
157
+ ...
158
+
159
+ def add_cubic(grouph: int, p1: Slvs_Entity, p2: Slvs_Entity, p3: Slvs_Entity, p4: Slvs_Entity, wp: Slvs_Entity) -> Slvs_Entity:
160
+ ...
161
+
162
+ def add_arc(grouph: int, nm: Slvs_Entity, ct: Slvs_Entity, start: Slvs_Entity, end: Slvs_Entity, wp: Slvs_Entity) -> Slvs_Entity:
163
+ ...
164
+
165
+ def add_circle(grouph: int, nm: Slvs_Entity, ct: Slvs_Entity, radius: Slvs_Entity, wp: Slvs_Entity) -> Slvs_Entity:
166
+ ...
167
+
168
+ def add_workplane(grouph: int, origin: Slvs_Entity, nm: Slvs_Entity) -> Slvs_Entity:
169
+ ...
170
+
171
+ def add_constraint(
172
+ grouph: int,
173
+ c_type: ConstraintType,
174
+ wp: Slvs_Entity,
175
+ v: float,
176
+ p1: Slvs_Entity = E_NONE,
177
+ p2: Slvs_Entity = E_NONE,
178
+ e1: Slvs_Entity = E_NONE,
179
+ e2: Slvs_Entity = E_NONE,
180
+ e3: Slvs_Entity = E_NONE,
181
+ e4: Slvs_Entity = E_NONE,
182
+ other: int = 0,
183
+ other2: int = 0
184
+ ) -> Slvs_Constraint:
185
+ ...
186
+
187
+ def coincident(grouph: int, e1: Slvs_Entity, e2: Slvs_Entity, wp: Slvs_Entity = E_FREE_IN_3D) -> Slvs_Constraint:
188
+ ...
189
+
190
+ def distance(
191
+ grouph: int,
192
+ e1: Slvs_Entity,
193
+ e2: Slvs_Entity,
194
+ value: float,
195
+ wp: Slvs_Entity = E_FREE_IN_3D
196
+ ) -> Slvs_Constraint:
197
+ ...
198
+
199
+ def equal(grouph: int, e1: Slvs_Entity, e2: Slvs_Entity, wp: Slvs_Entity = E_FREE_IN_3D) -> Slvs_Constraint:
200
+ ...
201
+
202
+ def equal_angle(
203
+ grouph: int,
204
+ e1: Slvs_Entity,
205
+ e2: Slvs_Entity,
206
+ e3: Slvs_Entity,
207
+ e4: Slvs_Entity,
208
+ wp: Slvs_Entity = E_FREE_IN_3D
209
+ ) -> Slvs_Constraint:
210
+ ...
211
+
212
+ def equal_point_to_line(
213
+ grouph: int,
214
+ e1: Slvs_Entity,
215
+ e2: Slvs_Entity,
216
+ e3: Slvs_Entity,
217
+ e4: Slvs_Entity,
218
+ wp: Slvs_Entity = E_FREE_IN_3D
219
+ ) -> Slvs_Constraint:
220
+ ...
221
+
222
+ def ratio(grouph: int, e1: Slvs_Entity, e2: Slvs_Entity, value: float, wp: Slvs_Entity = E_FREE_IN_3D) -> Slvs_Constraint:
223
+ ...
224
+
225
+ def symmetric(grouph: int, e1: Slvs_Entity, e2: Slvs_Entity, e3: Slvs_Entity = E_NONE, wp: Slvs_Entity = E_FREE_IN_3D) -> Slvs_Constraint:
226
+ ...
227
+
228
+ def symmetric_h(grouph: int, e1: Slvs_Entity, e2: Slvs_Entity, wp: Slvs_Entity) -> Slvs_Constraint:
229
+ ...
230
+
231
+ def symmetric_v(grouph: int, e1: Slvs_Entity, e2: Slvs_Entity, wp: Slvs_Entity) -> Slvs_Constraint:
232
+ ...
233
+
234
+ def midpoint(grouph: int, e1: Slvs_Entity, e2: Slvs_Entity, wp: Slvs_Entity = E_FREE_IN_3D) -> Slvs_Constraint:
235
+ ...
236
+
237
+ def horizontal(grouph: int, e1: Slvs_Entity, wp: Slvs_Entity) -> Slvs_Constraint:
238
+ ...
239
+
240
+ def vertical(grouph: int, e1: Slvs_Entity, wp: Slvs_Entity) -> Slvs_Constraint:
241
+ ...
242
+
243
+ def diameter(grouph: int, e1: Slvs_Entity, value: float) -> Slvs_Constraint:
244
+ ...
245
+
246
+ def same_orientation(grouph: int, e1: Slvs_Entity, e2: Slvs_Entity) -> Slvs_Constraint:
247
+ ...
248
+
249
+ def angle(grouph: int, e1: Slvs_Entity, e2: Slvs_Entity, value: float, wp: Slvs_Entity = E_FREE_IN_3D, inverse: bool = False) -> Slvs_Constraint:
250
+ ...
251
+
252
+ def perpendicular(grouph: int, e1: Slvs_Entity, e2: Slvs_Entity, wp: Slvs_Entity = E_FREE_IN_3D, inverse: bool = False) -> Slvs_Constraint:
253
+ ...
254
+
255
+ def parallel(grouph: int, e1: Slvs_Entity, e2: Slvs_Entity, wp: Slvs_Entity = E_FREE_IN_3D) -> Slvs_Constraint:
256
+ ...
257
+
258
+ def tangent(grouph: int, e1: Slvs_Entity, e2: Slvs_Entity, wp: Slvs_Entity = E_FREE_IN_3D) -> Slvs_Constraint:
259
+ ...
260
+
261
+ def distance_proj(grouph: int, e1: Slvs_Entity, e2: Slvs_Entity, value: float) -> Slvs_Constraint:
262
+ ...
263
+
264
+ def length_diff(grouph: int, Slvs_entityA: Slvs_Entity, Slvs_entityB: Slvs_Entity, value: float, workplane: Slvs_Entity) -> Slvs_Constraint:
265
+ ...
266
+
267
+ def dragged(grouph: int, e1: Slvs_Entity, wp: Slvs_Entity = E_FREE_IN_3D) -> Slvs_Constraint:
268
+ ...
269
+
270
+ def clear_sketch() -> None:
271
+ ...
272
+
273
+ def solve_sketch(grouph: int, calculateFaileds: bool) -> Slvs_SolveResult:
274
+ ...
275
+
276
+ def get_param_value(ph: int) -> float:
277
+ ...
278
+
279
+ def set_param_value(ph: int, value: float) -> None:
280
+ ...