Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
FreeCADマクロ stlファイル出力自動化
Search
kamakiri1225
October 04, 2022
Science
3.5k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
FreeCADマクロ stlファイル出力自動化
kamakiri1225
October 04, 2022
More Decks by kamakiri1225
See All by kamakiri1225
【技術書典20】OpenFOAM(自宅で深める流体解析)流れと熱移動(2)
kamakiri1225
0
650
【技術書典18】OpenFOAM 自宅で深める流体解析の基礎と応用 (1)
kamakiri1225
0
580
OpenRadiossSafetyダミーモデルの紹介
kamakiri1225
0
380
20230518数値流体解析の基礎
kamakiri1225
0
110
20241109_OpenRadiossを用いたエアバッグ 解析のモデル構築
kamakiri1225
0
960
【技術書典17】OpenFOAM(自宅で極める流体解析)2次元円柱まわりの流れ
kamakiri1225
0
3.3k
20201205_final_report_水の物性_光の速度計算.pdf
kamakiri1225
0
84
20201208_final_report_光の速度計算.pdf
kamakiri1225
0
58
第100回オープンCAE勉強会@関西
kamakiri1225
0
520
Other Decks in Science
See All in Science
機械学習 - K-means & 階層的クラスタリング
trycycle
PRO
0
2.1k
20260410_SystemsThinking
takusamar
1
160
データベース02: データベースの概念
trycycle
PRO
2
1.4k
不動産業界における業界特化のデータ整備とAI活用 ─Vertical DataとVertical AI─
estie
1
970
Utiliser Bitcoin sans Internet
rlifchitz
0
380
データベース01: データベースを使わない世界
trycycle
PRO
1
1.5k
機械学習 - ニューラルネットワーク入門
trycycle
PRO
0
1.2k
[NLP2026 参加報告会] AI for Science まとめ / NLP2026
lychee1223
0
2k
Kritische evaluatie van GenAI-output voor literatuuronderzoek
voginip
0
240
医療 LLM ベンチマークの現在地:多面的評価 と日本ローカライズ
analokmaus
1
690
CVPR2026_VGGTとその仲間たち
mickey_0226
0
1.1k
Understanding CVP Waveforms: Interpretation and Clinical Implications in Anesthesiology
taka88
0
890
Featured
See All Featured
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
260
New Earth Scene 8
popppiees
4
2.6k
A better future with KSS
kneath
240
18k
From π to Pie charts
rasagy
1
370
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
2.9k
Statistics for Hackers
jakevdp
799
230k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
6.2k
YesSQL, Process and Tooling at Scale
rocio
174
15k
Mobile First: as difficult as doing things right
swwweet
225
10k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
450
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.8k
How to Talk to Developers About Accessibility
jct
2
550
Transcript
None
ASCIIファイルをstlファイルにする 一連の面倒な操作はPythonのマクロ でやってしまおう
メッシュは削除
stlファイル出力したい面だけ 「bc:」と頭に付ける
「マクロ」>「マクロ…」 「export_stl.py」を以下に保存 or 編集 C:/ユーザ名/AppData/Roaming/FreeCAD/Macro
export_stl.py import os import Mesh import MeshPart # 現在のディレクトリ PWD
= r'C:¥work¥openfoam¥20220929_FreeCAD_stl¥stl' print('現在のディレクトリ:',PWD) labels = [] doc = App.ActiveDocument print(doc) for obj in doc.Objects: if obj.Label[0:3] == 'bc:': mesh = doc.addObject("Mesh::Feature", "Mesh") print(mesh) # mefisto #mesh.Mesh = MeshPart.meshFromShape(Shape=obj.Shape, MaxLength=10) # standard mesh.Mesh = Mesh.Mesh(obj.Shape.tessellate(0.01)) print(mesh.Mesh) label = obj.Label[3:] labels.append(label) Mesh.export([mesh], fr'{PWD}/{label}.ast') print(label) doc.removeObject(mesh.Name) print(doc.Label) print(labels, type(labels)) with open(rf'{PWD}/{doc.Label}.stl', 'w') as f: print('test') for label in labels: with open(rf'{PWD}/{label}.ast', 'r') as fi: for line in fi: if line[:5] == 'solid': line = 'solid ' + label + '¥n' elif line[:8] == 'endsolid': line = 'endsolid ' + label + '¥n' f.write(line) for label in labels: os.remove(rf'{PWD}/label.ast') 中身の編集 「export_stl.py」を実行 stlファイルが出力