Merge branch 'python' of github.com:KmolYuan/solvespace into python

pull/493/head
KmolYuan 2022-02-09 11:37:27 +08:00
commit 89ab042203
1 changed files with 46 additions and 0 deletions

View File

@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
from typing import Tuple, List, Sequence, Counter, ClassVar
from enum import IntEnum, auto
def quaternion_u(
qw: float,
@ -36,6 +37,51 @@ def make_quaternion(
) -> Tuple[float, float, float, float]:
...
class Constraint(IntEnum):
"""Symbol of the constraint types."""
POINTS_COINCIDENT = 100000
PT_PT_DISTANCE = auto()
PT_PLANE_DISTANCE = auto()
PT_LINE_DISTANCE = auto()
PT_FACE_DISTANCE = auto()
PT_IN_PLANE = auto()
PT_ON_LINE = auto()
PT_ON_FACE = auto()
EQUAL_LENGTH_LINES = auto()
LENGTH_RATIO = auto()
EQ_LEN_PT_LINE_D = auto()
EQ_PT_LN_DISTANCES = auto()
EQUAL_ANGLE = auto()
EQUAL_LINE_ARC_LEN = auto()
SYMMETRIC = auto()
SYMMETRIC_HORIZ = auto()
SYMMETRIC_VERT = auto()
SYMMETRIC_LINE = auto()
AT_MIDPOINT = auto()
HORIZONTAL = auto()
VERTICAL = auto()
DIAMETER = auto()
PT_ON_CIRCLE = auto()
SAME_ORIENTATION = auto()
ANGLE = auto()
PARALLEL = auto()
PERPENDICULAR = auto()
ARC_LINE_TANGENT = auto()
CUBIC_LINE_TANGENT = auto()
EQUAL_RADIUS = auto()
PROJ_PT_DISTANCE = auto()
WHERE_DRAGGED = auto()
CURVE_CURVE_TANGENT = auto()
LENGTH_DIFFERENCE = auto()
class ResultFlag(IntEnum):
"""Symbol of the result flags."""
OKAY = 0
INCONSISTENT = auto()
DIDNT_CONVERGE = auto()
TOO_MANY_UNKNOWNS = auto()
class Params:
pass