Compare commits
8 Commits
0defdc24cc
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| aea8c5e029 | |||
| eb04b9d73a | |||
| 8e8ce9e676 | |||
| 9fa569e449 | |||
| b959208ddc | |||
| aeb34cd85a | |||
| a3715cd036 | |||
| 099630ca86 |
@@ -4,13 +4,14 @@ import argparse
|
|||||||
import win32com.client
|
import win32com.client
|
||||||
import pythoncom
|
import pythoncom
|
||||||
|
|
||||||
def export_assemblies_to_stl(input_dir, output_dir):
|
def export_assemblies_to_stl(input_dir, output_dir, filter_name=None, minimized=False):
|
||||||
pythoncom.CoInitialize()
|
pythoncom.CoInitialize()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# Solid Edge starten oder verbinden
|
# Solid Edge starten oder verbinden
|
||||||
se_app = win32com.client.Dispatch("SolidEdge.Application")
|
se_app = win32com.client.Dispatch("SolidEdge.Application")
|
||||||
se_app.Visible = True
|
se_app.Visible = True
|
||||||
|
se_app.WindowState = 2 if minimized else 1
|
||||||
|
|
||||||
documents = se_app.Documents
|
documents = se_app.Documents
|
||||||
|
|
||||||
@@ -18,6 +19,8 @@ def export_assemblies_to_stl(input_dir, output_dir):
|
|||||||
|
|
||||||
for filename in os.listdir(input_dir):
|
for filename in os.listdir(input_dir):
|
||||||
if filename.lower().endswith(".asm"):
|
if filename.lower().endswith(".asm"):
|
||||||
|
if filter_name and filter_name.lower() not in filename.lower():
|
||||||
|
continue
|
||||||
asm_path = os.path.join(input_dir, filename)
|
asm_path = os.path.join(input_dir, filename)
|
||||||
stl_filename = os.path.splitext(filename)[0] + ".stl"
|
stl_filename = os.path.splitext(filename)[0] + ".stl"
|
||||||
stl_path = os.path.join(output_dir, stl_filename)
|
stl_path = os.path.join(output_dir, stl_filename)
|
||||||
@@ -29,7 +32,7 @@ def export_assemblies_to_stl(input_dir, output_dir):
|
|||||||
doc = documents.Open(asm_path)
|
doc = documents.Open(asm_path)
|
||||||
# STL exportieren in den Unterordner
|
# STL exportieren in den Unterordner
|
||||||
doc.SaveAs(stl_path)
|
doc.SaveAs(stl_path)
|
||||||
print(f"→ Exported to: {stl_path}")
|
print(f"-> Exported to: {stl_path}")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Error processing {filename}: {e}")
|
print(f"Error processing {filename}: {e}")
|
||||||
finally:
|
finally:
|
||||||
@@ -69,6 +72,8 @@ if __name__ == "__main__":
|
|||||||
parser = argparse.ArgumentParser(description="Exportiert alle .asm-Dateien in einem Ordner nach STL.")
|
parser = argparse.ArgumentParser(description="Exportiert alle .asm-Dateien in einem Ordner nach STL.")
|
||||||
parser.add_argument("--in", dest="input_dir", required=False, help="Ordner mit .asm-Dateien (Standard: WORK oder ../work)")
|
parser.add_argument("--in", dest="input_dir", required=False, help="Ordner mit .asm-Dateien (Standard: WORK oder ../work)")
|
||||||
parser.add_argument("--out", dest="output_dir", required=False, help="Zielordner für STL-Dateien (Standard: work/STL_Export)")
|
parser.add_argument("--out", dest="output_dir", required=False, help="Zielordner für STL-Dateien (Standard: work/STL_Export)")
|
||||||
|
parser.add_argument("--filter", dest="filter_name", required=False, help="Nur Dateien verarbeiten, deren Name diesen String enthält")
|
||||||
|
parser.add_argument("--se-minimized", dest="minimized", action="store_true", default=False, help="Solid Edge minimiert starten")
|
||||||
|
|
||||||
if len(sys.argv) == 2 and sys.argv[1] in ("-h", "--help"):
|
if len(sys.argv) == 2 and sys.argv[1] in ("-h", "--help"):
|
||||||
parser.print_help()
|
parser.print_help()
|
||||||
@@ -97,4 +102,7 @@ if __name__ == "__main__":
|
|||||||
print(f"Input folder not found: {input_dir}")
|
print(f"Input folder not found: {input_dir}")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
export_assemblies_to_stl(input_dir, output_dir)
|
if args.filter_name:
|
||||||
|
print(f"Filtering files containing: '{args.filter_name}'\n")
|
||||||
|
|
||||||
|
export_assemblies_to_stl(input_dir, output_dir, args.filter_name, args.minimized)
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
# CLAUDE.md
|
||||||
|
|
||||||
|
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
||||||
|
|
||||||
|
## Projektübersicht
|
||||||
|
|
||||||
|
**SSG-Ruledesigner-Konfigurator** ist die Library der Schönenberger GmbH für den
|
||||||
|
RuleDesigner Fusion (RD Fusion) — ein PDM-System zur Verwaltung von CAD-Daten. Der
|
||||||
|
**RuleDesigner Configurator** ist eine *low-code*-Programmierumgebung, über die das PDM
|
||||||
|
an externe Systeme (Datenbanken, CAD wie Solid Edge, Export nach CSV/JSON) angebunden
|
||||||
|
wird. Dieses Repo bündelt Konfigurationen, Layouts, Bibliotheken und Schulungs-Doku für
|
||||||
|
den abteilungsübergreifenden Einsatz bei Schönenberger.
|
||||||
|
|
||||||
|
## Projektstruktur
|
||||||
|
|
||||||
|
```text
|
||||||
|
SSG-Ruledesigner-Konfigurator/
|
||||||
|
├── MAIN_SSG.rdx # Haupt-Konfiguration (RuleDesigner)
|
||||||
|
├── Sub_DWG2SWG.rdx # Teil-Konfiguration DWG→SWG
|
||||||
|
├── Editor2DLibrary/ # 2D-Editor-Bibliothek
|
||||||
|
├── CAD/ # CAD-Daten
|
||||||
|
├── CSV/ # CSV-Daten/Exporte
|
||||||
|
├── SVGs/ # SVG-Grafiken
|
||||||
|
├── Pictures/ # Bilder
|
||||||
|
├── HallenLayouts/ # Hallen-Layouts
|
||||||
|
├── Sessions/ # Session-Daten
|
||||||
|
├── Doku/ # Dokumentation
|
||||||
|
├── wiki/ # Wiki (Roadmap, Home, Schulungs-Doku)
|
||||||
|
├── _setenv.bat # Umgebung setzen
|
||||||
|
└── cleanLocalShapes.bat # Lokale Shapes bereinigen
|
||||||
|
```
|
||||||
|
|
||||||
|
## Hinweise
|
||||||
|
|
||||||
|
- Die `.rdx`-Dateien sind RuleDesigner-Configurator-Projekte (low code).
|
||||||
|
- Ausführliche Doku und Roadmap liegen im `wiki/` (siehe `Readme.md` für Links).
|
||||||
|
- Ziel: Programmierarbeiten künftig durch hauseigene Mitarbeiter (nach Schulung).
|
||||||
@@ -258,6 +258,51 @@ def md_tabelle(fall_name, h0_val, h1_val):
|
|||||||
return "\n".join(lines)
|
return "\n".join(lines)
|
||||||
|
|
||||||
|
|
||||||
|
def grenzen():
|
||||||
|
"""Erzeugt Übersichtstabellen: für welche (ΔH, L1) Kombinationen
|
||||||
|
existieren gültige Lösungen? Zeigt den kleinsten gültigen α_F.
|
||||||
|
ΔH von 0..5 m, L1 von 3..15 m."""
|
||||||
|
delta_h_list = [0, 1, 2, 3, 4, 5]
|
||||||
|
l1_list = [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
|
||||||
|
lines = []
|
||||||
|
|
||||||
|
for richtung in ("aufwärts", "abwärts"):
|
||||||
|
lines.append(f"### {richtung.capitalize()}\n")
|
||||||
|
lines.append("Zelle = kleinster gültiger α_F [°], "
|
||||||
|
"**—** = keine Lösung\n")
|
||||||
|
|
||||||
|
# Header
|
||||||
|
header = "| ΔH \\ L₁ |" + "|".join(f" {l1} m " for l1 in l1_list) + "|"
|
||||||
|
sep = "|--------:|" + "|".join("------:" for _ in l1_list) + "|"
|
||||||
|
lines.append(header)
|
||||||
|
lines.append(sep)
|
||||||
|
|
||||||
|
for dh in delta_h_list:
|
||||||
|
if richtung == "aufwärts":
|
||||||
|
h0, h1 = 0, dh
|
||||||
|
else:
|
||||||
|
h0, h1 = dh, 0
|
||||||
|
|
||||||
|
row = f"| {dh} m |"
|
||||||
|
for l1 in l1_list:
|
||||||
|
min_alpha = None
|
||||||
|
for alpha_f_deg in ALPHA_F_LIST:
|
||||||
|
erg = berechne(h0, h1, l1, L_ES, H_ES, L_AS, H_AS,
|
||||||
|
alpha_f_deg, ALPHA_S)
|
||||||
|
if erg is not None:
|
||||||
|
gueltig, _ = validierung(erg)
|
||||||
|
if gueltig:
|
||||||
|
min_alpha = alpha_f_deg
|
||||||
|
break
|
||||||
|
if min_alpha is not None:
|
||||||
|
row += f" {min_alpha}° |"
|
||||||
|
else:
|
||||||
|
row += " — |"
|
||||||
|
lines.append(row)
|
||||||
|
lines.append("")
|
||||||
|
return "\n".join(lines)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
md = []
|
md = []
|
||||||
md.append("# Förderer-Berechnung (2D-Modell)\n")
|
md.append("# Förderer-Berechnung (2D-Modell)\n")
|
||||||
@@ -283,6 +328,9 @@ def main():
|
|||||||
# Fall 2: Abwärts – H0=5 → H1=2 (vertauscht!)
|
# Fall 2: Abwärts – H0=5 → H1=2 (vertauscht!)
|
||||||
md.append(md_tabelle("Fall 2: Abwärts", h0_val=H1, h1_val=H0))
|
md.append(md_tabelle("Fall 2: Abwärts", h0_val=H1, h1_val=H0))
|
||||||
|
|
||||||
|
md.append("## Grenzen der Varianten\n")
|
||||||
|
md.append(grenzen())
|
||||||
|
|
||||||
result = "\n".join(md)
|
result = "\n".join(md)
|
||||||
print(result)
|
print(result)
|
||||||
|
|
||||||
@@ -349,3 +397,46 @@ Probe: H_ES + H_F + H_S + H_AS = ΔH
|
|||||||
| 39 | 2.7537 | 3.2463 | 2.2299 | 0.1701 | 3.0000 | ✓ gültig |
|
| 39 | 2.7537 | 3.2463 | 2.2299 | 0.1701 | 3.0000 | ✓ gültig |
|
||||||
| 45 | 2.2009 | 3.7991 | 2.2009 | 0.1991 | 3.0000 | ✓ gültig |
|
| 45 | 2.2009 | 3.7991 | 2.2009 | 0.1991 | 3.0000 | ✓ gültig |
|
||||||
| 51 | 1.7637 | 4.2363 | 2.1780 | 0.2220 | 3.0000 | ✓ gültig |
|
| 51 | 1.7637 | 4.2363 | 2.1780 | 0.2220 | 3.0000 | ✓ gültig |
|
||||||
|
|
||||||
|
|
||||||
|
## Grenzen der Varianten
|
||||||
|
|
||||||
|
| Parameter | Wert |
|
||||||
|
|-----------|-----:|
|
||||||
|
| ΔH | 0 … 5 m |
|
||||||
|
| L₁ | 3 … 15 m |
|
||||||
|
| α_S | 3° |
|
||||||
|
| L_ES, L_AS | 1.000 m |
|
||||||
|
| H_ES, H_AS | 0.300 m |
|
||||||
|
|
||||||
|
Zelle = kleinster gültiger α_F [°], **—** = keine Lösung
|
||||||
|
|
||||||
|
### Aufwärts
|
||||||
|
|
||||||
|
| ΔH \ L₁ | 3 m | 4 m | 5 m | 6 m | 7 m | 8 m | 9 m | 10 m | 11 m | 12 m | 13 m | 14 m | 15 m |
|
||||||
|
|--------:|------:|------:|------:|------:|------:|------:|------:|------:|------:|------:|------:|------:|------:|
|
||||||
|
| 0 m | 33° | 18° | 12° | 9° | 9° | 6° | 6° | 6° | 6° | 6° | 6° | 3° | 3° |
|
||||||
|
| 1 m | — | 39° | 33° | 24° | 18° | 15° | 15° | 12° | 12° | 12° | 9° | 9° | 9° |
|
||||||
|
| 2 m | — | — | 45° | 39° | 33° | 24° | 24° | 24° | 18° | 15° | 15° | 15° | 12° |
|
||||||
|
| 3 m | — | — | 51° | 45° | 39° | 33° | 33° | 27° | 24° | 24° | 24° | 18° | 18° |
|
||||||
|
| 4 m | — | — | — | 51° | 45° | 39° | 39° | 33° | 33° | 27° | 24° | 24° | 24° |
|
||||||
|
| 5 m | — | — | — | — | 51° | 45° | 39° | 39° | 33° | 33° | 27° | 27° | 24° |
|
||||||
|
|
||||||
|
### Abwärts
|
||||||
|
|
||||||
|
| ΔH \ L₁ | 3 m | 4 m | 5 m | 6 m | 7 m | 8 m | 9 m | 10 m | 11 m | 12 m | 13 m | 14 m | 15 m |
|
||||||
|
|--------:|------:|------:|------:|------:|------:|------:|------:|------:|------:|------:|------:|------:|------:|
|
||||||
|
| 0 m | 33° | 18° | 12° | 9° | 9° | 6° | 6° | 6° | 6° | 6° | 6° | 3° | 3° |
|
||||||
|
| 1 m | 24° | 12° | 9° | 6° | 6° | 6° | 6° | — | — | — | — | — | — |
|
||||||
|
| 2 m | — | 39° | 27° | 24° | 18° | 15° | 12° | 12° | 9° | 9° | 9° | 9° | 9° |
|
||||||
|
| 3 m | — | 51° | 39° | 33° | 27° | 24° | 24° | 18° | 15° | 15° | 15° | 12° | 12° |
|
||||||
|
| 4 m | — | — | 51° | 45° | 39° | 33° | 27° | 24° | 24° | 24° | 18° | 18° | 15° |
|
||||||
|
| 5 m | — | — | — | 51° | 45° | 39° | 33° | 33° | 27° | 24° | 24° | 24° | 24° |
|
||||||
|
|
||||||
|
**Lücke bei ΔH = 1 m, L₁ ≥ 10 m:** Im Abwärts-Fall ist der Zähler der L_F-Formel
|
||||||
|
$(ΔH - H_{ES} - H_{AS}) - L_{rest} \cdot \tan(α_S)$. Bei ΔH = 1 m und L₁ = 10 m wird
|
||||||
|
$L_{rest}$ = 8 m und der Zähler = (1 − 0,3 − 0,3) − 8 · tan 3° = 0,4 − 0,419 = −0,019.
|
||||||
|
Da der Nenner für alle α_F > 3° positiv ist, wird L_F negativ — es gibt keine gültige Lösung.
|
||||||
|
|
||||||
|
Weil bei so kleinem Höhenunterschied die Reststrecke mit 3°-Neigung allein schon mehr Höhe verbraucht als verfügbar ist.
|
||||||
|
Die Reststrecke allein erzeugt durch die 3°-Neigung der S-Strecke plus H_ES + H_AS bereits mehr Höhe als der verfügbare Höhenunterschied ΔH = 1 m hergibt.
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
"zMin": "",
|
"zMin": "",
|
||||||
"zMax": "",
|
"zMax": "",
|
||||||
"zStep": "",
|
"zStep": "",
|
||||||
"direction": 300.0,
|
"direction": 330.0,
|
||||||
"linkClass": "Gefaellestrecke",
|
"linkClass": "Gefaellestrecke",
|
||||||
"label": "H0",
|
"label": "H0",
|
||||||
"isDimension": true
|
"isDimension": true
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
"zMin": "",
|
"zMin": "",
|
||||||
"zMax": "",
|
"zMax": "",
|
||||||
"zStep": "",
|
"zStep": "",
|
||||||
"direction": 60.0,
|
"direction": 30.0,
|
||||||
"linkClass": "Gefaellestrecke",
|
"linkClass": "Gefaellestrecke",
|
||||||
"label": "H0",
|
"label": "H0",
|
||||||
"isDimension": true
|
"isDimension": true
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
"zMin": "",
|
"zMin": "",
|
||||||
"zMax": "",
|
"zMax": "",
|
||||||
"zStep": "",
|
"zStep": "",
|
||||||
"direction": 330.0,
|
"direction": 300.0,
|
||||||
"linkClass": "Gefaellestrecke",
|
"linkClass": "Gefaellestrecke",
|
||||||
"label": "H0",
|
"label": "H0",
|
||||||
"isDimension": true
|
"isDimension": true
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
"zMin": "",
|
"zMin": "",
|
||||||
"zMax": "",
|
"zMax": "",
|
||||||
"zStep": "",
|
"zStep": "",
|
||||||
"direction": 30,
|
"direction": 60.0,
|
||||||
"linkClass": "Gefaellestrecke",
|
"linkClass": "Gefaellestrecke",
|
||||||
"label": "H0",
|
"label": "H0",
|
||||||
"isDimension": true
|
"isDimension": true
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
"zMin": "",
|
"zMin": "",
|
||||||
"zMax": "",
|
"zMax": "",
|
||||||
"zStep": "",
|
"zStep": "",
|
||||||
"direction": 180,
|
"direction": 180.0,
|
||||||
"linkClass": "Gefaellestrecke",
|
"linkClass": "Gefaellestrecke",
|
||||||
"label": "H1",
|
"label": "H1",
|
||||||
"isDimension": true
|
"isDimension": true
|
||||||
|
|||||||
+4336
-4126
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user