Skip to content

Commit 25363b1

Browse files
authored
Merge pull request #3 from Kramer84/safe_type_checking
Safe type checking
2 parents 6d14509 + 70ef8b0 commit 25363b1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+2144
-39
lines changed

notebooks/OptimizationBasedModels/2D_Model_4DOF_Auto_GLD_EX1.ipynb

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@
272272
},
273273
{
274274
"cell_type": "code",
275-
"execution_count": null,
275+
"execution_count": 9,
276276
"id": "296e3160-d1fe-4f84-ab1b-804aac69c5bb",
277277
"metadata": {},
278278
"outputs": [],
@@ -287,7 +287,7 @@
287287
},
288288
{
289289
"cell_type": "code",
290-
"execution_count": null,
290+
"execution_count": 10,
291291
"id": "f9ba9590-7460-496d-8c15-f1979d39e388",
292292
"metadata": {},
293293
"outputs": [],
@@ -322,10 +322,32 @@
322322
},
323323
{
324324
"cell_type": "code",
325-
"execution_count": null,
325+
"execution_count": 11,
326326
"id": "661bb8f1-85e1-4386-8e2a-a95e5645a2ac",
327327
"metadata": {},
328-
"outputs": [],
328+
"outputs": [
329+
{
330+
"data": {
331+
"application/vnd.jupyter.widget-view+json": {
332+
"model_id": "b5b1917c7e8144bcbc717a8c70db9178",
333+
"version_major": 2,
334+
"version_minor": 0
335+
},
336+
"text/plain": [
337+
" 0%| | 0/100000 [00:00<?, ?it/s]"
338+
]
339+
},
340+
"metadata": {},
341+
"output_type": "display_data"
342+
},
343+
{
344+
"name": "stdout",
345+
"output_type": "stream",
346+
"text": [
347+
"Ratio of failed simulations in sample : 0.08898\n"
348+
]
349+
}
350+
],
329351
"source": [
330352
"# Define the seed, sample size, and file paths\n",
331353
"SEED = 420 # Example seed value\n",
@@ -870,7 +892,7 @@
870892
"name": "python",
871893
"nbconvert_exporter": "python",
872894
"pygments_lexer": "ipython3",
873-
"version": "3.13.0"
895+
"version": "3.12.8"
874896
}
875897
},
876898
"nbformat": 4,

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "otaf"
7-
version = "0.1"
7+
version = "0.2"
88
description = "OTAF : Open (mechanical) tolerance analysis framework - A comprehensive framework for modeling 3 dimensional overconstrained mechanical assemblies and doing statistical tolerance analysis."
99
readme = "README.md"
1010
license = {text = "GPL-3.0-only"}

src/otaf/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
from __future__ import annotations
12
# -*- coding: utf-8 -*-
3+
24
__author__ = "Kramer84"
35
__requires__ = [
46
"numpy",
@@ -15,7 +17,7 @@
1517

1618
import torch
1719

18-
from .assembly_modeling import (
20+
from ._assembly_modeling import (
1921
SystemOfConstraintsAssemblyModel,
2022
AssemblyDataProcessor,
2123
CompatibilityLoopHandling,
@@ -27,6 +29,7 @@
2729
I4, J4
2830
)
2931

32+
from . import _assembly_modeling as _asm
3033
from . import geometry
3134
from . import constants
3235
from . import plotting
@@ -42,8 +45,6 @@
4245
from . import example_models
4346
from . import tolerances
4447

45-
# Remove assembly_modeling from the namespace
46-
del assembly_modeling
4748

4849
__all__ = [
4950
"SystemOfConstraintsAssemblyModel",
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
from __future__ import annotations
2+
# -*- coding: utf-8 -*-
3+
4+
__author__ = "Kramer84"
5+
6+
from .assemblyModelingBaseObjects import (
7+
DeviationMatrix,
8+
GapMatrix,
9+
TransformationMatrix,
10+
I4, J4
11+
)
12+
13+
from .firstOrderMatrixExpansion import FirstOrderMatrixExpansion
14+
from .systemOfConstraintsAssemblyModel import SystemOfConstraintsAssemblyModel
15+
from .assemblyDataProcessor import AssemblyDataProcessor
16+
from .compatibilityLoopHandling import CompatibilityLoopHandling
17+
from ._interface_constraints import InterfaceLoopHandling
18+
19+
20+
__all__ = [
21+
"DeviationMatrix", "GapMatrix", "TransformationMatrix", "I4", "J4",
22+
"FirstOrderMatrixExpansion",
23+
"SystemOfConstraintsAssemblyModel",
24+
"AssemblyDataProcessor",
25+
"CompatibilityLoopHandling",
26+
"InterfaceLoopHandling",
27+
]

src/otaf/assembly_modeling/_interface_constraints/__init__.py renamed to src/otaf/_assembly_modeling/_interface_constraints/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
from __future__ import annotations
12
# -*- coding: utf-8 -*-
3+
24
__author__ = "Kramer84"
35

46
from .interfaceLoopHandling import *

0 commit comments

Comments
 (0)