fuzzyometry 0.0.2__tar.gz → 0.0.3__tar.gz
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.
- {fuzzyometry-0.0.2 → fuzzyometry-0.0.3}/PKG-INFO +2 -2
- fuzzyometry-0.0.3/fuzzyometry/_version.py +1 -0
- {fuzzyometry-0.0.2 → fuzzyometry-0.0.3}/fuzzyometry/bodies.py +4 -2
- fuzzyometry-0.0.3/fuzzyometry/threads.py +24 -0
- {fuzzyometry-0.0.2 → fuzzyometry-0.0.3}/pyproject.toml +1 -1
- fuzzyometry-0.0.2/fuzzyometry/_version.py +0 -1
- {fuzzyometry-0.0.2 → fuzzyometry-0.0.3}/README.md +0 -0
- {fuzzyometry-0.0.2 → fuzzyometry-0.0.3}/fuzzyometry/__init__.py +0 -0
- {fuzzyometry-0.0.2 → fuzzyometry-0.0.3}/fuzzyometry/combinations.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
2
|
Name: fuzzyometry
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.3
|
|
4
4
|
Summary: The fuzzyometry library provides smooth objects, object connections and automatic chamfer generation for xyzcad.
|
|
5
5
|
Author: Stefan Helmert
|
|
6
6
|
Author-email: stefan@entroserv.de
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.0.3"
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
from numba import njit
|
|
2
|
+
import numpy as np
|
|
2
3
|
|
|
3
4
|
|
|
4
5
|
@njit
|
|
@@ -47,8 +48,9 @@ def _fz_cuboid_ir(p, s):
|
|
|
47
48
|
|
|
48
49
|
|
|
49
50
|
@njit
|
|
50
|
-
def fz_cuboid(pnt, dimensions, r=0):
|
|
51
|
-
s = [e / 2 - r for e in dimensions]
|
|
51
|
+
def fz_cuboid(pnt, dimensions, r=0.):
|
|
52
|
+
#s = [e / 2 - r for e in dimensions]
|
|
53
|
+
s = np.array(dimensions) /2. - r
|
|
52
54
|
x, y, z = pnt
|
|
53
55
|
w, l, h = s
|
|
54
56
|
xd = min(w - x, w + x)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import numpy as np
|
|
2
|
+
from numba import njit
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
@njit
|
|
6
|
+
def fz_thread_profile(pnt, a=1.0):
|
|
7
|
+
y = pnt[1]
|
|
8
|
+
if abs(y) > 2*a:
|
|
9
|
+
return y / 2 / a
|
|
10
|
+
x = pnt[0] * 2 * np.pi
|
|
11
|
+
p = a / (-0.5 * np.sin(x) + 2**-20 - 2**-19 * np.sign(np.sin(x)))
|
|
12
|
+
q = y / (np.sin(x) + 2**-20 + 2**-19 * np.sign(np.sin(x))) - 1
|
|
13
|
+
return -p / 2 - np.sign(np.sin(x)) * (max(0, (p / 2) ** 2 - q)) ** 0.5
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@njit
|
|
17
|
+
def fz_thread(pnt, radius, n=1, profile_depth=1.0, a=1.0):
|
|
18
|
+
x, y, z = pnt
|
|
19
|
+
ang = -np.atan2(y, x)
|
|
20
|
+
r = (x**2 + y**2) ** 0.5
|
|
21
|
+
r_arg = (r - radius)/profile_depth
|
|
22
|
+
z_arg = z + n * ang / 2 / np.pi
|
|
23
|
+
return profile_depth * fz_thread_profile((z_arg, r_arg), a)
|
|
24
|
+
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "fuzzyometry"
|
|
3
|
-
version = "0.0.
|
|
3
|
+
version = "0.0.3"
|
|
4
4
|
description = "The fuzzyometry library provides smooth objects, object connections and automatic chamfer generation for xyzcad."
|
|
5
5
|
authors = ["Stefan Helmert <stefan@entroserv.de>"]
|
|
6
6
|
readme = "README.md"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.0.2"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|