navaltoolbox 0.1.0__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.
- navaltoolbox-0.1.0/PKG-INFO +20 -0
- navaltoolbox-0.1.0/navaltoolbox/__init__.py +70 -0
- navaltoolbox-0.1.0/navaltoolbox/navaltoolbox.pyi +769 -0
- navaltoolbox-0.1.0/navaltoolbox/py.typed +0 -0
- navaltoolbox-0.1.0/pyproject.toml +35 -0
- navaltoolbox-0.1.0/rust/Cargo.lock +1322 -0
- navaltoolbox-0.1.0/rust/Cargo.toml +57 -0
- navaltoolbox-0.1.0/rust/README.md +117 -0
- navaltoolbox-0.1.0/rust/src/downflooding.rs +257 -0
- navaltoolbox-0.1.0/rust/src/hull.rs +364 -0
- navaltoolbox-0.1.0/rust/src/hydrostatics/calculator.rs +221 -0
- navaltoolbox-0.1.0/rust/src/hydrostatics/dataclasses.rs +78 -0
- navaltoolbox-0.1.0/rust/src/hydrostatics/mod.rs +26 -0
- navaltoolbox-0.1.0/rust/src/lib.rs +66 -0
- navaltoolbox-0.1.0/rust/src/mesh/clipper.rs +289 -0
- navaltoolbox-0.1.0/rust/src/mesh/loader.rs +94 -0
- navaltoolbox-0.1.0/rust/src/mesh/mod.rs +28 -0
- navaltoolbox-0.1.0/rust/src/mesh/transform.rs +115 -0
- navaltoolbox-0.1.0/rust/src/python.rs +820 -0
- navaltoolbox-0.1.0/rust/src/silhouette/core.rs +325 -0
- navaltoolbox-0.1.0/rust/src/silhouette/loader.rs +181 -0
- navaltoolbox-0.1.0/rust/src/silhouette/mod.rs +27 -0
- navaltoolbox-0.1.0/rust/src/stability/calculator.rs +293 -0
- navaltoolbox-0.1.0/rust/src/stability/dataclasses.rs +198 -0
- navaltoolbox-0.1.0/rust/src/stability/mod.rs +26 -0
- navaltoolbox-0.1.0/rust/src/tanks/dataclasses.rs +48 -0
- navaltoolbox-0.1.0/rust/src/tanks/mod.rs +26 -0
- navaltoolbox-0.1.0/rust/src/tanks/tank.rs +288 -0
- navaltoolbox-0.1.0/rust/src/vessel.rs +437 -0
- navaltoolbox-0.1.0/rust/tests/data/box_10x10.stl +86 -0
- navaltoolbox-0.1.0/rust/tests/data/dtmb5415.stl +24054 -0
- navaltoolbox-0.1.0/rust/tests/integration_tests.rs +711 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: navaltoolbox
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Classifier: Development Status :: 3 - Alpha
|
|
5
|
+
Classifier: Intended Audience :: Science/Research
|
|
6
|
+
Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
|
|
7
|
+
Classifier: Programming Language :: Python :: 3
|
|
8
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
13
|
+
Classifier: Programming Language :: Rust
|
|
14
|
+
Classifier: Topic :: Scientific/Engineering
|
|
15
|
+
Summary: High-performance naval architecture library for hydrostatics, stability, and tank calculations
|
|
16
|
+
Home-Page: https://github.com/NavalToolbox/navaltoolbox-lib
|
|
17
|
+
Author: Antoine ANCEAU
|
|
18
|
+
License: AGPL-3.0-or-later
|
|
19
|
+
Requires-Python: >=3.9
|
|
20
|
+
Project-URL: Repository, https://github.com/NavalToolbox/navaltoolbox-lib
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Copyright (C) 2026 Antoine ANCEAU
|
|
2
|
+
#
|
|
3
|
+
# This file is part of navaltoolbox.
|
|
4
|
+
#
|
|
5
|
+
# navaltoolbox is free software: you can redistribute it and/or modify
|
|
6
|
+
# it under the terms of the GNU Affero General Public License as published by
|
|
7
|
+
# the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
# (at your option) any later version.
|
|
9
|
+
#
|
|
10
|
+
# This program is distributed in the hope that it will be useful,
|
|
11
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
# GNU Affero General Public License for more details.
|
|
14
|
+
#
|
|
15
|
+
# You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
|
+
|
|
18
|
+
"""
|
|
19
|
+
NavalToolbox - High-performance naval architecture library.
|
|
20
|
+
|
|
21
|
+
This library provides tools for hydrostatics, stability analysis,
|
|
22
|
+
and tank management in naval architecture applications.
|
|
23
|
+
|
|
24
|
+
Classes:
|
|
25
|
+
Hull: A hull geometry loaded from an STL file.
|
|
26
|
+
Vessel: A vessel containing hulls, tanks, and silhouettes.
|
|
27
|
+
Silhouette: A 2D profile for wind heeling calculations.
|
|
28
|
+
Tank: A tank with fluid management capabilities.
|
|
29
|
+
HydrostaticsCalculator: Calculator for hydrostatic properties.
|
|
30
|
+
StabilityCalculator: Calculator for stability curves (GZ).
|
|
31
|
+
DownfloodingOpening: Openings for downflooding analysis.
|
|
32
|
+
OpeningType: Types of downflooding openings.
|
|
33
|
+
|
|
34
|
+
Example:
|
|
35
|
+
>>> from navaltoolbox import Hull, Vessel, HydrostaticsCalculator
|
|
36
|
+
>>> hull = Hull("ship.stl")
|
|
37
|
+
>>> vessel = Vessel(hull)
|
|
38
|
+
>>> calc = HydrostaticsCalculator(vessel)
|
|
39
|
+
>>> state = calc.calculate_at_draft(5.0)
|
|
40
|
+
>>> print(f"Displacement: {state.displacement:.0f} kg")
|
|
41
|
+
"""
|
|
42
|
+
|
|
43
|
+
# Re-export all types from the native module
|
|
44
|
+
from .navaltoolbox import (
|
|
45
|
+
Hull,
|
|
46
|
+
Vessel,
|
|
47
|
+
Silhouette,
|
|
48
|
+
OpeningType,
|
|
49
|
+
DownfloodingOpening,
|
|
50
|
+
HydrostaticState,
|
|
51
|
+
HydrostaticsCalculator,
|
|
52
|
+
StabilityPoint,
|
|
53
|
+
StabilityCurve,
|
|
54
|
+
StabilityCalculator,
|
|
55
|
+
Tank,
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
__all__ = [
|
|
59
|
+
"Hull",
|
|
60
|
+
"Vessel",
|
|
61
|
+
"Silhouette",
|
|
62
|
+
"OpeningType",
|
|
63
|
+
"DownfloodingOpening",
|
|
64
|
+
"HydrostaticState",
|
|
65
|
+
"HydrostaticsCalculator",
|
|
66
|
+
"StabilityPoint",
|
|
67
|
+
"StabilityCurve",
|
|
68
|
+
"StabilityCalculator",
|
|
69
|
+
"Tank",
|
|
70
|
+
]
|