Przejdź do treści
Biblioteka skilli
Inne · Budowanie i kod

solidworks-threaded-holes

/solidworks-threaded-holes

Modeluje gwintowane otwory M3-M8 w SolidWorks, z wiertłem, fazami i gwintami kosmetycznymi, a potem sprawdza je przed eksportem STEP.

Licencja
MIT
Ostatnia zmiana repozytorium
11.11.2026

Ocena i bezpieczeństwo

98/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena13 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
6
Skrypty
1
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 11.11.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co sprawdzić przed instalacją
  • 1 skrypt w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.

Skrypty: scripts/create_threaded_hole_template.py

Co robi i kiedy

Modeluje gwintowane otwory M3-M8 w SolidWorks, z wiertłem, fazami i gwintami kosmetycznymi, a potem sprawdza je przed eksportem STEP.

Oryginalny opis (EN)

SolidWorks automation subskill for internal threaded holes, including M3/M4/M5/M6/M8, tap-drill geometry, blind and through holes, mouth chamfers, cosmetic threads, visible 3D helices, and thread metadata. Use for tapped mounting holes, M6x1 blind holes, Hole Wizard/ThreadFeatureData/CosmeticThread workflows, STEP export, and threaded-hole review.

Jak działa

  1. Key considerations
  2. Recommended imports
  3. Reliable workflow
  4. Template usage
  5. Pitfalls
  6. Validation requirements
Sekcje z nagłówków SKILL.md, w oryginale · 103 linii, 568 słów
Podgląd SKILL.md
---
name: solidworks-threaded-holes
description: SolidWorks automation subskill for internal threaded holes, including M3/M4/M5/M6/M8, tap-drill geometry, blind and through holes, mouth chamfers, cosmetic threads, visible 3D helices, and thread metadata. Use for tapped mounting holes, M6x1 blind holes, Hole Wizard/ThreadFeatureData/CosmeticThread workflows, STEP export, and threaded-hole review.
---

# SolidWorks Threaded Holes

## Key considerations

Creating a native `ThreadFeatureData` feature through SolidWorks COM can be unreliable across versions and interface languages. Use a layered delivery strategy:

1. Run the parent skill's preflight: `python ../../scripts/sw_preflight.py`.
2. Create correct physical geometry: tap-drill diameter, blind or through depth, and mouth chamfer.
3. Attempt a native Thread feature; if it fails, try `InsertCosmeticThread3`.
4. Regardless of native or cosmetic thread success, write the thread specification, tap-drill diameter, and depth to custom properties.
5. For samples requiring a visible thread indication, add a 3D sketch helix for preview review.
6. Save `SLDPRT`, export `STEP`, run `sw_review.run_review()`, and inspect previews and the feature tree.

## Recommended imports

Reuse the parent skill's scripts:

```python
import sys
sys.path.insert(0, r"C:\path\to\solidworks-automation-skill\scripts")

from sw_connect import mm, get_com_member, create_empty_dispatch_variant
from sw_session import SolidWorksSession
from sw_export import export_to_step
from sw_review import run_review
from sw_part import sketch, sketch_rectangle, extrude_boss
```

To generate a sample, run or copy this template:

```text
subskills/solidworks-threaded-holes/scripts/create_threaded_hole_template.py
```

For live-tested interface lessons and known pitfalls, read:

```text
subskills/solidworks-threaded-holes/references/threaded-hole-lessons.md
```

## Reliable workflow

1. Establish the specification: for example `M6x1.0`, internal or external, blind or through, thread depth, hole position, material, and whether explicit machinable thread geometry is required.
2. Choose the tap drill. Typical coarse internal metric values include `M3=2.5`, `M4=3.3`, `M5=4.2`, `M6=5.0`, `M8=6.8`, and `M10=8.5` mm.
3. Cut the tap-drill hole first using a circle sketch and `FeatureCut4`; do not begin with a complex helical sweep.
4. Find the circular mouth edge by enumerating `GetBodies2/GetEdges` and checking its center, radius, and top-face height. Select with `edge.Select2()` rather than `Edge1` or coordinate picks.
5. Attempt the thread representation:
   - Native Thread: `CreateDefinition(swFmSweepThread)` + `CreateFeature(thread_data)`.
   - Cosmetic thread: `InsertCosmeticThread3(8, "Tapped Hole", "M6x1.0", diameter, 0, depth, note)`.
   - Visible fallback: a short-segment helix in a 3D sketch named `Sketch_M6x1_Visible_Internal_Thread_Helix`.
6. Add the mouth chamfer last. Typical sizes are `C0.3-C0.8`; the M6 default is `C0.6`.
7. Write custom properties and parameter JSON, save, export STEP, and review.

## Template usage

Generate the default M6x1 internal blind-hole sample:

```powershell
python subskills/solidworks-threaded-holes/scripts/create_threaded_hole_template.py `
  --output-dir C:\CADAutomationWorkbench\solidworks_threaded_hole_output
```

Generate an M8x1.25 hole with custom block dimensions:

```powershell
python subskills/solidworks-threaded-holes/scripts/create_threaded_hole_template.py `
  --thread M8 `
  --block-length 60 `
  --block-width 36 `
  --block-thickness 20 `
  --thread-depth 16 `
  --output-dir C:\CADAutomationWorkbench\m8_threaded_hole_output
```

The default `--hole-face top` drills inward from the mounting base's top face. For side holes, pass `--hole-face front` or `--hole-face right`.

## Pitfalls

- Do not assume explicit helical thread geometry is included in STEP by default. A true helical sweep increases rebuild time and failure risk.
- Do not promise that `ThreadFeatureData` will succeed. `CreateFeature(ThreadFeatureData)` has returned `None` in local tests.
- Do not rely solely on `CosmeticThread`: it may return an object yet fail to appear consistently in the saved feature tree.
- Keep the tap-drill hole and mouth chamfer correct; they establish the physical geometry and manufacturing intent.
- Visible lines are not a drawing thread callout. State the specification, depth, and representation method in properties or delivery notes.
- Saving alone is insufficient. Inspect the review report and isometric and top previews.

## Validation requirements

Each completed run must produce:

- `*.SLDPRT`
- `*.step`
- `*_parameters.json`
- `*_review_report.json`
- `*_isometric.bmp/png`

Check at least:

- `evaluation.status` is `pass` or an explained `warn`.
- `expected_outputs_exist` is `True`.
- `previews_not_blank` is `True`.
- The feature tree contains the tap-drill cut, mouth chamfer, and at least one of Thread, CosmeticThread, or a visible helix representation.
Pliki w paczce (6)
  • README.md 2 KB
  • SKILL.md 5 KB
  • manifest.yaml 1 KB
  • agents/openai.yaml 1 KB
  • references/threaded-hole-lessons.md 6 KB
  • scripts/create_threaded_hole_template.py 22 KB

Wersje

W bazie nie ma innych skilli o nazwie solidworks-threaded-holes.

Migawka bazy z 13.11.2026 · wersja paczki 95677ff78f21 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 98solidworks-fillet-chamfer-cnc
    Automatyzuje w SolidWorks części do obróbki CNC z wieloma zaokrągleniami i fazami: uchwyty, obudowy, płyty z otworami i eksport STEP.
  • 100solidworks-draw
    Buduje parametryczne modele części maszynowych w SolidWorks na podstawie opisu w języku naturalnym, na przykład wałów, tarcz i tłoków.
  • 90solidworks
    Przeszukuje, przegląda i kontroluje pobieranie oraz zapis plików w magazynie SolidWorks PDM przez narzędzia solidworks_pdm.
  • 98solidworks-vibecad
    Planuje parametryczne projekty w SolidWorks: zamienia opis mechaniczny w plan, sprawdza reguły wytwarzania i przygotowuje podsumowanie dla API.
  • 98solidworks-vibecad
    Zamienia wymagania mechaniczne opisane słowami na plan projektu parametrycznego w SolidWorks, z kontrolą zasad produkcyjnych i bramkami przeglądu.
  • 86sheet-metal-production
    Przygotowuje części blacharskie zestawu SolidWorks do produkcji: podsumowanie, kontrolę DFM, DXF do cięcia laserem i zestawienie.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.