0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

材料力学「示力図 とは何ですか。」をAI先生に聞きました。 ・トラス構造における示力図(軸力図)

Last updated at Posted at 2025-06-01

・私が考えて質問をしなくても、ChatGPT先生が提案されますので、質問リストの意味がなくなってきました。
「はい。」の直前のChatGPT先生の提案のみを拾う事ができますか。
 ChatGPT先生へどのように聞けばいいですか?

(本日の)ChatGPT先生へ

質問リスト

・質問リストの追番は無視して下さい。1個ずつです。途中の回答表示は省略しています。

# 質問リスト
1. 示力図 とは何ですか。
2. 教えて下さい。
3. トラス構造で。
4. 3で
5. 3で
6. 2で
7. 1で
8. 1
9. はい
10. はい。
11. はい。
12. はい。
13. 2
14. お願いします。
15. 私の質問をMarkdown形式でリスト化して出力して。Markdown形式でリストからアスタリスクは削除して。1行目に、# 質問リスト の文字を出力して。最後の質問も追加して下さい。追番を追加して下さい。Markdown形式で。

(途中省略)

🏗️ 1. 例題:5節点Warrenトラス
🔤 2. Bow’s Notation の適用
🧮 3. Cremona図での力の釣り合い
🔁 4. 各節点で繰り返す
🎨 5. FreeCADで作図する場合(概要)
📌 6. ポイントの整理
了解しました。では、Warrenトラス(5節点)の構造図とCremona図をFreeCADのDraftモジュールで描くスクリプトを順にご紹介します。
🖊️ スクリプト:部材の色分け(引張:青、圧縮:赤)

・反応しません。あきらめました。

import FreeCAD as App

doc = App.ActiveDocument

# 色分けルール:オブジェクト名に対応する力の種類を指定
# オブジェクト名 : "tension"(引張) or "compression"(圧縮)
force_state = {
    "Line": "tension",       # 例)部材a
    "Line001": "compression",# 例)部材f
    "Line002": "tension",    # 例)部材b
    "Line003": "compression",
    "Line004": "tension",
    "Line005": "compression",
    # 必要に応じてここに追加(FreeCAD上の線名に合わせて)
}

# 色指定(RGB 0〜1)
color_map = {
    "tension": (0.0, 0.0, 1.0),      # 青
    "compression": (1.0, 0.0, 0.0),  # 赤
}

# 適用
for obj_name, force_type in force_state.items():
    try:
        obj = doc.getObject(obj_name)
        if obj and force_type in color_map:
            obj.ViewObject.LineColor = color_map[force_type]
    except Exception as e:
        print(f"{obj_name}: エラー - {e}")

・エラーがでます。あきらめました。

Gemini先生へ

copilot先生へ

いつもの? sympyの実行環境と 参考のおすすめです。

(テンプレート)

いつもと違うおすすめです。

Qiita内

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?