hullprod 1.0.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.
- hullprod-1.0.0/CHANGELOG.md +58 -0
- hullprod-1.0.0/CITATION.cff +19 -0
- hullprod-1.0.0/CONTRIBUTING.md +57 -0
- hullprod-1.0.0/LICENSE +30 -0
- hullprod-1.0.0/MANIFEST.in +2 -0
- hullprod-1.0.0/PKG-INFO +230 -0
- hullprod-1.0.0/README.md +192 -0
- hullprod-1.0.0/docs/experimental.md +42 -0
- hullprod-1.0.0/docs/getting-started.md +83 -0
- hullprod-1.0.0/docs/metrics.md +76 -0
- hullprod-1.0.0/docs/outputs.md +72 -0
- hullprod-1.0.0/docs/python-api.md +41 -0
- hullprod-1.0.0/docs/validity-and-provenance.md +64 -0
- hullprod-1.0.0/hullprod/__init__.py +17 -0
- hullprod-1.0.0/hullprod/_version.py +3 -0
- hullprod-1.0.0/hullprod/api.py +142 -0
- hullprod-1.0.0/hullprod/backends.py +195 -0
- hullprod-1.0.0/hullprod/brep_display.py +317 -0
- hullprod-1.0.0/hullprod/brep_geometry.py +485 -0
- hullprod-1.0.0/hullprod/brep_metrics.py +295 -0
- hullprod-1.0.0/hullprod/brep_quadrature.py +734 -0
- hullprod-1.0.0/hullprod/brep_sections.py +446 -0
- hullprod-1.0.0/hullprod/brep_validity.py +417 -0
- hullprod-1.0.0/hullprod/cache.py +103 -0
- hullprod-1.0.0/hullprod/cli.py +289 -0
- hullprod-1.0.0/hullprod/curvature.py +24 -0
- hullprod-1.0.0/hullprod/examples/__init__.py +1 -0
- hullprod-1.0.0/hullprod/examples/simple_sphere.iges +51 -0
- hullprod-1.0.0/hullprod/examples/simple_sphere.stl +563 -0
- hullprod-1.0.0/hullprod/experimental_curvature.py +162 -0
- hullprod-1.0.0/hullprod/experimental_fairness.py +165 -0
- hullprod-1.0.0/hullprod/experimental_mass_curvature.py +157 -0
- hullprod-1.0.0/hullprod/experimental_standard_curvature.py +737 -0
- hullprod-1.0.0/hullprod/export.py +336 -0
- hullprod-1.0.0/hullprod/fairness.py +5 -0
- hullprod-1.0.0/hullprod/io.py +54 -0
- hullprod-1.0.0/hullprod/manifest.py +308 -0
- hullprod-1.0.0/hullprod/mesh_ops.py +161 -0
- hullprod-1.0.0/hullprod/mesh_quality.py +341 -0
- hullprod-1.0.0/hullprod/metrics.py +789 -0
- hullprod-1.0.0/hullprod/plotting.py +625 -0
- hullprod-1.0.0/hullprod/reference_length.py +144 -0
- hullprod-1.0.0/hullprod/report.py +432 -0
- hullprod-1.0.0/hullprod/schema.py +81 -0
- hullprod-1.0.0/hullprod/sections.py +471 -0
- hullprod-1.0.0/hullprod/types.py +117 -0
- hullprod-1.0.0/hullprod/units.py +79 -0
- hullprod-1.0.0/hullprod/validity.py +127 -0
- hullprod-1.0.0/hullprod.egg-info/PKG-INFO +230 -0
- hullprod-1.0.0/hullprod.egg-info/SOURCES.txt +71 -0
- hullprod-1.0.0/hullprod.egg-info/dependency_links.txt +1 -0
- hullprod-1.0.0/hullprod.egg-info/entry_points.txt +2 -0
- hullprod-1.0.0/hullprod.egg-info/requires.txt +17 -0
- hullprod-1.0.0/hullprod.egg-info/top_level.txt +1 -0
- hullprod-1.0.0/pyproject.toml +89 -0
- hullprod-1.0.0/setup.cfg +4 -0
- hullprod-1.0.0/tests/test_analytic_meshes.py +258 -0
- hullprod-1.0.0/tests/test_brep_native.py +504 -0
- hullprod-1.0.0/tests/test_curvature_boundary_audit.py +218 -0
- hullprod-1.0.0/tests/test_display_ux.py +172 -0
- hullprod-1.0.0/tests/test_documentation_contract.py +80 -0
- hullprod-1.0.0/tests/test_field_exports.py +136 -0
- hullprod-1.0.0/tests/test_final_ux.py +248 -0
- hullprod-1.0.0/tests/test_global_local_consistency.py +91 -0
- hullprod-1.0.0/tests/test_mesh_quality.py +103 -0
- hullprod-1.0.0/tests/test_multi_hull_benchmarks.py +76 -0
- hullprod-1.0.0/tests/test_output_contract.py +126 -0
- hullprod-1.0.0/tests/test_packaging_contract.py +31 -0
- hullprod-1.0.0/tests/test_reference_length.py +185 -0
- hullprod-1.0.0/tests/test_scientific_contract.py +253 -0
- hullprod-1.0.0/tests/test_signature_and_section_policy.py +199 -0
- hullprod-1.0.0/tests/test_v1_user_experience.py +210 -0
- hullprod-1.0.0/tests/test_validity_schema.py +55 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to HullProd will be documented in this file.
|
|
4
|
+
|
|
5
|
+
HullProd follows semantic versioning. Patch releases fix defects without
|
|
6
|
+
breaking the public contract, minor releases add backward-compatible features,
|
|
7
|
+
and major releases may change public schemas, formulas, CLI behavior, or field
|
|
8
|
+
and output-layout contracts.
|
|
9
|
+
|
|
10
|
+
## [1.0.0] - 2026-09-03
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- A zero-configuration `hullprod INPUT` workflow for IGES, STEP, STL, OBJ, and
|
|
15
|
+
PLY, with automatic native-BRep or triangle-mesh backend selection.
|
|
16
|
+
- The explicit recommended signature `I_D`, `I_D_plus`, `I_D_minus`, and the
|
|
17
|
+
four represented-valid-area curvature-class fractions.
|
|
18
|
+
- Stable `signature.json`, one-row `signature.csv`, `validity.json`,
|
|
19
|
+
`provenance.json`, and concise text/HTML summaries.
|
|
20
|
+
- ParaView-readable `surface_fields.vtp`, portable field CSV, and default
|
|
21
|
+
developability-density and curvature-class plots.
|
|
22
|
+
- A shared `hullprod.assess(...)` Python API, deterministic automatic geometric
|
|
23
|
+
reference length, explicit `--lref`, and safe nonempty-output handling.
|
|
24
|
+
- Small redistributable IGES and STL analytical examples for installed-wheel
|
|
25
|
+
smoke testing.
|
|
26
|
+
- Clean-wheel validation on Linux with Python 3.10–3.12 and on macOS Apple
|
|
27
|
+
Silicon with Python 3.12, including native BRep and mesh inputs.
|
|
28
|
+
|
|
29
|
+
### Changed
|
|
30
|
+
|
|
31
|
+
- Standard installation now includes the `cadquery-ocp` dependency used for
|
|
32
|
+
native IGES/STEP evaluation; BRep global values do not come from display
|
|
33
|
+
tessellation.
|
|
34
|
+
- Zero-configuration reference length now uses a rigid-motion-invariant
|
|
35
|
+
principal-axis projected span, with a centroid-radial fallback for isotropic
|
|
36
|
+
geometry; explicit user and configured benchmark reference lengths remain
|
|
37
|
+
authoritative.
|
|
38
|
+
- Gaussian-curvature mesh results exclude invalid open-boundary vertices and
|
|
39
|
+
report represented-valid-area normalization and mesh-quality provenance.
|
|
40
|
+
- The legacy `hullprod assess INPUT` command and raw metric keys remain
|
|
41
|
+
available for compatibility.
|
|
42
|
+
- The default static HTML report is now a compact user view; full provenance,
|
|
43
|
+
validity, and numerical internals remain in linked machine-readable files.
|
|
44
|
+
- Source/working units and the interpreted reference length are shown before
|
|
45
|
+
integration. Explicit reference lengths are compared with the automatic span
|
|
46
|
+
and receive a nonfatal warning below a 0.1 or above a 10 ratio.
|
|
47
|
+
- Human-facing output distinguishes scientifically valid results from local
|
|
48
|
+
BRep quadrature cautions and mesh representation sensitivity.
|
|
49
|
+
|
|
50
|
+
### Experimental and non-recommended quantities
|
|
51
|
+
|
|
52
|
+
- Curvature energy, curvature fairness, section waviness, FFT section waviness,
|
|
53
|
+
and robust research variants are outside the recommended signature and
|
|
54
|
+
require explicit opt-in.
|
|
55
|
+
- `developability_area_ratio` is auxiliary/redundant; local plate twist and
|
|
56
|
+
triangle/mesh-quality quantities are representation diagnostics.
|
|
57
|
+
- HullProd does not provide a fabrication-cost, man-hour, forming-route, or
|
|
58
|
+
shipyard-calibrated composite score.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
type: software
|
|
3
|
+
message: "If you use HullProd in scientific work, please cite the software and the related publication when available."
|
|
4
|
+
title: "HullProd: Geometry-Based Producibility Metrics for Ship Hull Forms"
|
|
5
|
+
version: "1.0.0"
|
|
6
|
+
date-released: 2026-09-03
|
|
7
|
+
authors:
|
|
8
|
+
- family-names: "Serani"
|
|
9
|
+
given-names: "Andrea"
|
|
10
|
+
license: "BSD-3-Clause"
|
|
11
|
+
repository-code: "https://github.com/cnr-inm-mao/hullprod"
|
|
12
|
+
url: "https://github.com/cnr-inm-mao/hullprod"
|
|
13
|
+
keywords:
|
|
14
|
+
- ship design
|
|
15
|
+
- hull forms
|
|
16
|
+
- producibility
|
|
17
|
+
- manufacturability
|
|
18
|
+
- geometry processing
|
|
19
|
+
- naval architecture
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Contributing to HullProd
|
|
2
|
+
|
|
3
|
+
HullProd is scientific software with a deliberately narrow scope: geometry-based
|
|
4
|
+
producibility signatures from triangulated and native-BRep external hull
|
|
5
|
+
surfaces. Contributions are welcome within that scope.
|
|
6
|
+
|
|
7
|
+
## Scope of contributions
|
|
8
|
+
|
|
9
|
+
Appropriate contributions include:
|
|
10
|
+
|
|
11
|
+
- bug fixes;
|
|
12
|
+
- improved mesh-quality diagnostics;
|
|
13
|
+
- improved numerical robustness of existing metrics;
|
|
14
|
+
- additional analytic tests;
|
|
15
|
+
- benchmark workflows;
|
|
16
|
+
- documentation improvements;
|
|
17
|
+
- export utilities for visualization tools;
|
|
18
|
+
- reproducible examples based on redistributable geometries.
|
|
19
|
+
|
|
20
|
+
Contributions that require shipyard-specific production data, structural
|
|
21
|
+
scantlings, cost models, man-hour models, or detailed fabrication planning
|
|
22
|
+
should be discussed first because they lie outside the mesh/native-CAD
|
|
23
|
+
geometry-assessment workflow.
|
|
24
|
+
|
|
25
|
+
## Development setup
|
|
26
|
+
|
|
27
|
+
A CPython 3.10, 3.11, or 3.12 environment is required.
|
|
28
|
+
|
|
29
|
+
Create and activate a development environment with a supported interpreter:
|
|
30
|
+
|
|
31
|
+
python3.12 -m venv .venv
|
|
32
|
+
source .venv/bin/activate
|
|
33
|
+
|
|
34
|
+
Install the package in editable mode with development dependencies:
|
|
35
|
+
|
|
36
|
+
python -m pip install -U pip
|
|
37
|
+
python -m pip install -e ".[dev]"
|
|
38
|
+
|
|
39
|
+
## Checks before committing
|
|
40
|
+
|
|
41
|
+
Before committing, please run:
|
|
42
|
+
|
|
43
|
+
ruff check .
|
|
44
|
+
pytest -q
|
|
45
|
+
python -m build
|
|
46
|
+
python -m twine check dist/*.whl dist/*.tar.gz
|
|
47
|
+
git diff --check
|
|
48
|
+
|
|
49
|
+
## Coding style
|
|
50
|
+
|
|
51
|
+
The project uses Ruff for linting. Code should favor clarity, explicit variable
|
|
52
|
+
names, and reproducible numerical behavior over compactness. Pull requests
|
|
53
|
+
should include focused tests and documentation for user-visible changes.
|
|
54
|
+
|
|
55
|
+
## Scientific caution
|
|
56
|
+
|
|
57
|
+
HullProd metrics are geometric descriptors. They should not be presented as direct predictors of fabrication cost, man-hours, shipyard productivity, or production schedule unless additional calibrated production data are introduced and validated.
|
hullprod-1.0.0/LICENSE
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026, Andrea Serani
|
|
4
|
+
All rights reserved.
|
|
5
|
+
|
|
6
|
+
Redistribution and use in source and binary forms, with or without
|
|
7
|
+
modification, are permitted provided that the following conditions are met:
|
|
8
|
+
|
|
9
|
+
1. Redistributions of source code must retain the above copyright notice,
|
|
10
|
+
this list of conditions and the following disclaimer.
|
|
11
|
+
|
|
12
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
13
|
+
this list of conditions and the following disclaimer in the documentation
|
|
14
|
+
and/or other materials provided with the distribution.
|
|
15
|
+
|
|
16
|
+
3. Neither the name of the copyright holder nor the names of its contributors
|
|
17
|
+
may be used to endorse or promote products derived from this software
|
|
18
|
+
without specific prior written permission.
|
|
19
|
+
|
|
20
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS”
|
|
21
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
22
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
23
|
+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
|
24
|
+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
25
|
+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
26
|
+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
27
|
+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
28
|
+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
29
|
+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
30
|
+
POSSIBILITY OF SUCH DAMAGE.
|
hullprod-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: hullprod
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Geometry-based producibility assessment of ship hull forms from triangulated meshes and native IGES/STEP boundary representations.
|
|
5
|
+
Author: Andrea Serani
|
|
6
|
+
License-Expression: BSD-3-Clause
|
|
7
|
+
Project-URL: Homepage, https://github.com/cnr-inm-mao/hullprod
|
|
8
|
+
Project-URL: Repository, https://github.com/cnr-inm-mao/hullprod
|
|
9
|
+
Project-URL: Issues, https://github.com/cnr-inm-mao/hullprod/issues
|
|
10
|
+
Keywords: ship design,hull forms,producibility,manufacturability,geometry processing,naval architecture
|
|
11
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
12
|
+
Classifier: Intended Audience :: Science/Research
|
|
13
|
+
Classifier: Intended Audience :: Manufacturing
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Topic :: Scientific/Engineering
|
|
19
|
+
Requires-Python: <3.13,>=3.10
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
License-File: LICENSE
|
|
22
|
+
Requires-Dist: numpy>=1.23
|
|
23
|
+
Requires-Dist: scipy>=1.9
|
|
24
|
+
Requires-Dist: trimesh>=4.0
|
|
25
|
+
Requires-Dist: matplotlib>=3.7
|
|
26
|
+
Requires-Dist: pandas>=1.5
|
|
27
|
+
Requires-Dist: cadquery-ocp<7.10,>=7.9.3.1.1
|
|
28
|
+
Provides-Extra: dev
|
|
29
|
+
Requires-Dist: pytest>=8; extra == "dev"
|
|
30
|
+
Requires-Dist: build>=1.2; extra == "dev"
|
|
31
|
+
Requires-Dist: twine>=5; extra == "dev"
|
|
32
|
+
Requires-Dist: ruff==0.16.4; extra == "dev"
|
|
33
|
+
Requires-Dist: vtk>=9.3; extra == "dev"
|
|
34
|
+
Provides-Extra: benchmark
|
|
35
|
+
Requires-Dist: networkx>=3.0; extra == "benchmark"
|
|
36
|
+
Requires-Dist: vtk>=9.3; extra == "benchmark"
|
|
37
|
+
Dynamic: license-file
|
|
38
|
+
|
|
39
|
+
<p align="center">
|
|
40
|
+
<img
|
|
41
|
+
src="https://raw.githubusercontent.com/cnr-inm-mao/hullprod/main/assets/branding/hullprod-logo-horizontal.png"
|
|
42
|
+
alt="HullProd logo"
|
|
43
|
+
width="420"
|
|
44
|
+
>
|
|
45
|
+
</p>
|
|
46
|
+
|
|
47
|
+
# HullProd
|
|
48
|
+
|
|
49
|
+
[](https://github.com/cnr-inm-mao/hullprod/actions/workflows/ci.yml)
|
|
50
|
+

|
|
51
|
+
[](LICENSE)
|
|
52
|
+
|
|
53
|
+
**Geometry-based producibility screening for ship hull surfaces.**
|
|
54
|
+
|
|
55
|
+
HullProd computes a compact signature of double-curvature intensity, sign, and
|
|
56
|
+
areal composition directly from native IGES/STEP BRep geometry or triangulated
|
|
57
|
+
STL/OBJ/PLY surfaces. It also exports distributed fields, plots, validity, and
|
|
58
|
+
representation provenance.
|
|
59
|
+
|
|
60
|
+
## Installation
|
|
61
|
+
|
|
62
|
+
HullProd requires Python 3.10–3.12. The intended public installation command is:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
pip install hullprod
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
One installation includes both the native OpenCascade and triangle-mesh
|
|
69
|
+
backends; no separate CAD extra or system OpenCascade installation is required.
|
|
70
|
+
|
|
71
|
+
## Quick start
|
|
72
|
+
|
|
73
|
+
Assess native CAD directly:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
hullprod myvessel.iges
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
The same command works for a triangulated surface:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
hullprod myvessel.stl
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
HullProd selects the backend from the file extension and writes a predictable
|
|
86
|
+
`myvessel_hullprod/` result directory.
|
|
87
|
+
|
|
88
|
+
To supply the normalization length explicitly:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
hullprod myvessel.iges --lref 200000
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
`--lref` uses the working length unit of the input geometry. For CAD imported
|
|
95
|
+
in millimetres, `200000` means 200000 mm, or 200 m. HullProd prints the source
|
|
96
|
+
unit, working unit, and interpreted value before integration and warns about a
|
|
97
|
+
large discrepancy from the automatic geometric span without changing the
|
|
98
|
+
supplied value.
|
|
99
|
+
|
|
100
|
+
See [Getting started](docs/getting-started.md) for output-directory controls
|
|
101
|
+
and other normal options.
|
|
102
|
+
|
|
103
|
+
## Recommended signature
|
|
104
|
+
|
|
105
|
+
HullProd 1.0 reports exactly:
|
|
106
|
+
|
|
107
|
+
```text
|
|
108
|
+
[I_D, I_D_plus, I_D_minus,
|
|
109
|
+
a_C_flat, a_C_single, a_C_elliptic, a_C_saddle]
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
- `I_D` measures total normalized double-curvature intensity.
|
|
113
|
+
- `I_D_plus` and `I_D_minus` separate elliptic/synclastic and
|
|
114
|
+
saddle/reverse/anticlastic intensity.
|
|
115
|
+
- The four `a_C` values are represented-valid-area fractions for flat, singly
|
|
116
|
+
curved, elliptic, and saddle/reverse regions.
|
|
117
|
+
|
|
118
|
+
Together they describe **intensity**, **sign**, and **areal extent**. HullProd
|
|
119
|
+
does not combine them into a universal scalar producibility score. The default
|
|
120
|
+
quasi-zero factors are `h_f = k_f = 1e-4`; these are numerical classification
|
|
121
|
+
thresholds, not manufacturing limits. See [Metrics](docs/metrics.md) for the
|
|
122
|
+
equations and interpretation.
|
|
123
|
+
|
|
124
|
+
## What HullProd produces
|
|
125
|
+
|
|
126
|
+
A normal result directory contains:
|
|
127
|
+
|
|
128
|
+
- `signature.json` and `signature.csv` for the recommended global signature;
|
|
129
|
+
- `report.html` for a compact, static user report;
|
|
130
|
+
- `validity.json` and `provenance.json` for scientific interpretation and audit;
|
|
131
|
+
- `plots/` with developability-density and curvature-class maps; and
|
|
132
|
+
- `fields/` with ParaView-readable VTP and portable CSV surface fields.
|
|
133
|
+
|
|
134
|
+
The complete output contract and file roles are documented in
|
|
135
|
+
[Outputs](docs/outputs.md).
|
|
136
|
+
|
|
137
|
+
## Supported geometry
|
|
138
|
+
|
|
139
|
+
| Representation | Formats | Backend |
|
|
140
|
+
|---|---|---|
|
|
141
|
+
| Native BRep | `.iges`, `.igs`, `.step`, `.stp` | Direct CAD derivatives and trimmed-domain quadrature |
|
|
142
|
+
| Triangle mesh | `.stl`, `.obj`, `.ply` | Discrete curvature reconstruction on the supplied mesh |
|
|
143
|
+
|
|
144
|
+
Unsupported formats fail with an actionable error; HullProd does not silently
|
|
145
|
+
convert a BRep to a mesh for canonical global evaluation or fit CAD to a mesh.
|
|
146
|
+
|
|
147
|
+
## BRep and mesh realizations
|
|
148
|
+
|
|
149
|
+
Native BRep evaluation is the canonical realization when source CAD is
|
|
150
|
+
available. Its global metrics come from direct surface derivatives and
|
|
151
|
+
trimmed-domain integration, not from the display/export tessellation.
|
|
152
|
+
|
|
153
|
+
Mesh evaluation is supported when triangulated geometry is the available
|
|
154
|
+
representation. Its derivative-based values are explicitly
|
|
155
|
+
representation-sensitive and should be interpreted with the recorded mesh
|
|
156
|
+
quality and refinement provenance. This distinction does not make mesh results
|
|
157
|
+
invalid; it makes their represented geometry part of the result.
|
|
158
|
+
|
|
159
|
+
Without `--lref`, both backends use the same conceptual automatic convention: a
|
|
160
|
+
rigid-motion-invariant principal-axis projected span, with a deterministic
|
|
161
|
+
centroid-radial fallback for isotropic samples. It is recorded as
|
|
162
|
+
`auto_principal_span` and is never described as `L_pp`.
|
|
163
|
+
|
|
164
|
+
## Python API
|
|
165
|
+
|
|
166
|
+
The Python API uses the same assessment pipeline as the CLI:
|
|
167
|
+
|
|
168
|
+
```python
|
|
169
|
+
from hullprod import assess
|
|
170
|
+
|
|
171
|
+
result = assess("myvessel.iges")
|
|
172
|
+
print(result.signature)
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
See the [Python API guide](docs/python-api.md).
|
|
176
|
+
|
|
177
|
+
## Documentation
|
|
178
|
+
|
|
179
|
+
- [Getting started](docs/getting-started.md)
|
|
180
|
+
- [Recommended metrics](docs/metrics.md)
|
|
181
|
+
- [Result files and field exports](docs/outputs.md)
|
|
182
|
+
- [Validity and provenance](docs/validity-and-provenance.md)
|
|
183
|
+
- [Python API](docs/python-api.md)
|
|
184
|
+
- [Experimental quantities](docs/experimental.md)
|
|
185
|
+
- [Release history](CHANGELOG.md)
|
|
186
|
+
|
|
187
|
+
README plus versioned Markdown under `docs/` are the complete v1 documentation
|
|
188
|
+
system; no hosted documentation site is required.
|
|
189
|
+
|
|
190
|
+
## Scientific scope and limitations
|
|
191
|
+
|
|
192
|
+
HullProd is a geometry-based early-design screening tool, not a
|
|
193
|
+
fabrication-cost predictor. It does not directly predict labor, forming route,
|
|
194
|
+
production schedule, or shipyard-specific performance. It does not perform panelization, seam
|
|
195
|
+
placement, forming simulation, optimization, or geometry repair.
|
|
196
|
+
|
|
197
|
+
Auxiliary, mesh-diagnostic, and experimental quantities are kept separate from
|
|
198
|
+
the recommended signature. Their status is explained in
|
|
199
|
+
[Experimental quantities](docs/experimental.md).
|
|
200
|
+
|
|
201
|
+
## Funding
|
|
202
|
+
|
|
203
|
+
Development of HullProd was supported by the U.S. Office of Naval Research
|
|
204
|
+
(ONR) through the Naval International Cooperative Opportunities in Science and
|
|
205
|
+
Technology (NICOP) program, under Grant No. N00014-26-1-2164, as part of the
|
|
206
|
+
BEAM project (*Bayesian Exploration and Optimization for Hull-form Architecture
|
|
207
|
+
and Producibility Modeling*).
|
|
208
|
+
|
|
209
|
+
The views and conclusions expressed in this software and its documentation are
|
|
210
|
+
those of the authors and do not necessarily reflect the views of the Office of
|
|
211
|
+
Naval Research.
|
|
212
|
+
|
|
213
|
+
## Citation
|
|
214
|
+
|
|
215
|
+
Please cite the software using [CITATION.cff](CITATION.cff). Cite the associated
|
|
216
|
+
manuscript once final publication metadata are available; no DOI or journal
|
|
217
|
+
record is claimed here before publication.
|
|
218
|
+
|
|
219
|
+
## Contributing
|
|
220
|
+
|
|
221
|
+
Bug reports, documentation corrections, reproducible analytical tests, and
|
|
222
|
+
carefully scoped numerical improvements are welcome. See
|
|
223
|
+
[CONTRIBUTING.md](CONTRIBUTING.md) before proposing changes to scientific
|
|
224
|
+
definitions.
|
|
225
|
+
|
|
226
|
+
## License
|
|
227
|
+
|
|
228
|
+
HullProd is distributed under the [BSD-3-Clause license](LICENSE). The bundled
|
|
229
|
+
analytical sphere fixtures are project-owned; restricted benchmark geometry is
|
|
230
|
+
not redistributed.
|
hullprod-1.0.0/README.md
ADDED
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img
|
|
3
|
+
src="https://raw.githubusercontent.com/cnr-inm-mao/hullprod/main/assets/branding/hullprod-logo-horizontal.png"
|
|
4
|
+
alt="HullProd logo"
|
|
5
|
+
width="420"
|
|
6
|
+
>
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
# HullProd
|
|
10
|
+
|
|
11
|
+
[](https://github.com/cnr-inm-mao/hullprod/actions/workflows/ci.yml)
|
|
12
|
+

|
|
13
|
+
[](LICENSE)
|
|
14
|
+
|
|
15
|
+
**Geometry-based producibility screening for ship hull surfaces.**
|
|
16
|
+
|
|
17
|
+
HullProd computes a compact signature of double-curvature intensity, sign, and
|
|
18
|
+
areal composition directly from native IGES/STEP BRep geometry or triangulated
|
|
19
|
+
STL/OBJ/PLY surfaces. It also exports distributed fields, plots, validity, and
|
|
20
|
+
representation provenance.
|
|
21
|
+
|
|
22
|
+
## Installation
|
|
23
|
+
|
|
24
|
+
HullProd requires Python 3.10–3.12. The intended public installation command is:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
pip install hullprod
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
One installation includes both the native OpenCascade and triangle-mesh
|
|
31
|
+
backends; no separate CAD extra or system OpenCascade installation is required.
|
|
32
|
+
|
|
33
|
+
## Quick start
|
|
34
|
+
|
|
35
|
+
Assess native CAD directly:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
hullprod myvessel.iges
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
The same command works for a triangulated surface:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
hullprod myvessel.stl
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
HullProd selects the backend from the file extension and writes a predictable
|
|
48
|
+
`myvessel_hullprod/` result directory.
|
|
49
|
+
|
|
50
|
+
To supply the normalization length explicitly:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
hullprod myvessel.iges --lref 200000
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
`--lref` uses the working length unit of the input geometry. For CAD imported
|
|
57
|
+
in millimetres, `200000` means 200000 mm, or 200 m. HullProd prints the source
|
|
58
|
+
unit, working unit, and interpreted value before integration and warns about a
|
|
59
|
+
large discrepancy from the automatic geometric span without changing the
|
|
60
|
+
supplied value.
|
|
61
|
+
|
|
62
|
+
See [Getting started](docs/getting-started.md) for output-directory controls
|
|
63
|
+
and other normal options.
|
|
64
|
+
|
|
65
|
+
## Recommended signature
|
|
66
|
+
|
|
67
|
+
HullProd 1.0 reports exactly:
|
|
68
|
+
|
|
69
|
+
```text
|
|
70
|
+
[I_D, I_D_plus, I_D_minus,
|
|
71
|
+
a_C_flat, a_C_single, a_C_elliptic, a_C_saddle]
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
- `I_D` measures total normalized double-curvature intensity.
|
|
75
|
+
- `I_D_plus` and `I_D_minus` separate elliptic/synclastic and
|
|
76
|
+
saddle/reverse/anticlastic intensity.
|
|
77
|
+
- The four `a_C` values are represented-valid-area fractions for flat, singly
|
|
78
|
+
curved, elliptic, and saddle/reverse regions.
|
|
79
|
+
|
|
80
|
+
Together they describe **intensity**, **sign**, and **areal extent**. HullProd
|
|
81
|
+
does not combine them into a universal scalar producibility score. The default
|
|
82
|
+
quasi-zero factors are `h_f = k_f = 1e-4`; these are numerical classification
|
|
83
|
+
thresholds, not manufacturing limits. See [Metrics](docs/metrics.md) for the
|
|
84
|
+
equations and interpretation.
|
|
85
|
+
|
|
86
|
+
## What HullProd produces
|
|
87
|
+
|
|
88
|
+
A normal result directory contains:
|
|
89
|
+
|
|
90
|
+
- `signature.json` and `signature.csv` for the recommended global signature;
|
|
91
|
+
- `report.html` for a compact, static user report;
|
|
92
|
+
- `validity.json` and `provenance.json` for scientific interpretation and audit;
|
|
93
|
+
- `plots/` with developability-density and curvature-class maps; and
|
|
94
|
+
- `fields/` with ParaView-readable VTP and portable CSV surface fields.
|
|
95
|
+
|
|
96
|
+
The complete output contract and file roles are documented in
|
|
97
|
+
[Outputs](docs/outputs.md).
|
|
98
|
+
|
|
99
|
+
## Supported geometry
|
|
100
|
+
|
|
101
|
+
| Representation | Formats | Backend |
|
|
102
|
+
|---|---|---|
|
|
103
|
+
| Native BRep | `.iges`, `.igs`, `.step`, `.stp` | Direct CAD derivatives and trimmed-domain quadrature |
|
|
104
|
+
| Triangle mesh | `.stl`, `.obj`, `.ply` | Discrete curvature reconstruction on the supplied mesh |
|
|
105
|
+
|
|
106
|
+
Unsupported formats fail with an actionable error; HullProd does not silently
|
|
107
|
+
convert a BRep to a mesh for canonical global evaluation or fit CAD to a mesh.
|
|
108
|
+
|
|
109
|
+
## BRep and mesh realizations
|
|
110
|
+
|
|
111
|
+
Native BRep evaluation is the canonical realization when source CAD is
|
|
112
|
+
available. Its global metrics come from direct surface derivatives and
|
|
113
|
+
trimmed-domain integration, not from the display/export tessellation.
|
|
114
|
+
|
|
115
|
+
Mesh evaluation is supported when triangulated geometry is the available
|
|
116
|
+
representation. Its derivative-based values are explicitly
|
|
117
|
+
representation-sensitive and should be interpreted with the recorded mesh
|
|
118
|
+
quality and refinement provenance. This distinction does not make mesh results
|
|
119
|
+
invalid; it makes their represented geometry part of the result.
|
|
120
|
+
|
|
121
|
+
Without `--lref`, both backends use the same conceptual automatic convention: a
|
|
122
|
+
rigid-motion-invariant principal-axis projected span, with a deterministic
|
|
123
|
+
centroid-radial fallback for isotropic samples. It is recorded as
|
|
124
|
+
`auto_principal_span` and is never described as `L_pp`.
|
|
125
|
+
|
|
126
|
+
## Python API
|
|
127
|
+
|
|
128
|
+
The Python API uses the same assessment pipeline as the CLI:
|
|
129
|
+
|
|
130
|
+
```python
|
|
131
|
+
from hullprod import assess
|
|
132
|
+
|
|
133
|
+
result = assess("myvessel.iges")
|
|
134
|
+
print(result.signature)
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
See the [Python API guide](docs/python-api.md).
|
|
138
|
+
|
|
139
|
+
## Documentation
|
|
140
|
+
|
|
141
|
+
- [Getting started](docs/getting-started.md)
|
|
142
|
+
- [Recommended metrics](docs/metrics.md)
|
|
143
|
+
- [Result files and field exports](docs/outputs.md)
|
|
144
|
+
- [Validity and provenance](docs/validity-and-provenance.md)
|
|
145
|
+
- [Python API](docs/python-api.md)
|
|
146
|
+
- [Experimental quantities](docs/experimental.md)
|
|
147
|
+
- [Release history](CHANGELOG.md)
|
|
148
|
+
|
|
149
|
+
README plus versioned Markdown under `docs/` are the complete v1 documentation
|
|
150
|
+
system; no hosted documentation site is required.
|
|
151
|
+
|
|
152
|
+
## Scientific scope and limitations
|
|
153
|
+
|
|
154
|
+
HullProd is a geometry-based early-design screening tool, not a
|
|
155
|
+
fabrication-cost predictor. It does not directly predict labor, forming route,
|
|
156
|
+
production schedule, or shipyard-specific performance. It does not perform panelization, seam
|
|
157
|
+
placement, forming simulation, optimization, or geometry repair.
|
|
158
|
+
|
|
159
|
+
Auxiliary, mesh-diagnostic, and experimental quantities are kept separate from
|
|
160
|
+
the recommended signature. Their status is explained in
|
|
161
|
+
[Experimental quantities](docs/experimental.md).
|
|
162
|
+
|
|
163
|
+
## Funding
|
|
164
|
+
|
|
165
|
+
Development of HullProd was supported by the U.S. Office of Naval Research
|
|
166
|
+
(ONR) through the Naval International Cooperative Opportunities in Science and
|
|
167
|
+
Technology (NICOP) program, under Grant No. N00014-26-1-2164, as part of the
|
|
168
|
+
BEAM project (*Bayesian Exploration and Optimization for Hull-form Architecture
|
|
169
|
+
and Producibility Modeling*).
|
|
170
|
+
|
|
171
|
+
The views and conclusions expressed in this software and its documentation are
|
|
172
|
+
those of the authors and do not necessarily reflect the views of the Office of
|
|
173
|
+
Naval Research.
|
|
174
|
+
|
|
175
|
+
## Citation
|
|
176
|
+
|
|
177
|
+
Please cite the software using [CITATION.cff](CITATION.cff). Cite the associated
|
|
178
|
+
manuscript once final publication metadata are available; no DOI or journal
|
|
179
|
+
record is claimed here before publication.
|
|
180
|
+
|
|
181
|
+
## Contributing
|
|
182
|
+
|
|
183
|
+
Bug reports, documentation corrections, reproducible analytical tests, and
|
|
184
|
+
carefully scoped numerical improvements are welcome. See
|
|
185
|
+
[CONTRIBUTING.md](CONTRIBUTING.md) before proposing changes to scientific
|
|
186
|
+
definitions.
|
|
187
|
+
|
|
188
|
+
## License
|
|
189
|
+
|
|
190
|
+
HullProd is distributed under the [BSD-3-Clause license](LICENSE). The bundled
|
|
191
|
+
analytical sphere fixtures are project-owned; restricted benchmark geometry is
|
|
192
|
+
not redistributed.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Auxiliary, diagnostic, and experimental quantities
|
|
2
|
+
|
|
3
|
+
The recommended HullProd 1.0 signature is limited to total and signed
|
|
4
|
+
developability intensity plus the four curvature-class area fractions:
|
|
5
|
+
|
|
6
|
+
```text
|
|
7
|
+
I_D, I_D_plus, I_D_minus,
|
|
8
|
+
a_C_flat, a_C_single, a_C_elliptic, a_C_saddle
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Other quantities have deliberately different roles.
|
|
12
|
+
|
|
13
|
+
## Auxiliary
|
|
14
|
+
|
|
15
|
+
`developability_area_ratio` is the valid-area fraction above the shared
|
|
16
|
+
Gaussian-curvature threshold. Under the common threshold it equals
|
|
17
|
+
`a_C_elliptic + a_C_saddle`, so it is retained for compatibility but is not an
|
|
18
|
+
independent signature component.
|
|
19
|
+
|
|
20
|
+
## Mesh diagnostics
|
|
21
|
+
|
|
22
|
+
Mesh-quality statistics, boundary information, triangle/edge statistics, and
|
|
23
|
+
local plate twist describe the assessed representation. They help interpret
|
|
24
|
+
mesh curvature reliability; they are not geometry-invariant signature
|
|
25
|
+
components or manufacturing acceptance limits.
|
|
26
|
+
|
|
27
|
+
## Screened experimental metrics
|
|
28
|
+
|
|
29
|
+
`curvature_energy`, `curvature_fairness`, `section_waviness`,
|
|
30
|
+
`section_waviness_fft`, and robust research variants were investigated but are
|
|
31
|
+
not part of the recommended v1 signature. They are not computed or plotted by
|
|
32
|
+
default.
|
|
33
|
+
|
|
34
|
+
Request the screened set deliberately with:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
hullprod myvessel.iges --experimental
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Experimental values appear in a separately labelled JSON/report section and
|
|
41
|
+
never enter `recommended_signature`. Their mathematical meanings and existing
|
|
42
|
+
raw keys are preserved for research compatibility.
|