履歴: ソフトウェア/Fusion360
各行は、その日時に書かれた内容です。追加・削除は、1 つ前の版との行数の差です (全 15 版)。「差分」は比較する版、「基準」は比べる相手の版を選びます
| 日時 | タイトル | 文字数 | 追加 | 削除 | 内容 | 差分 | 基準 |
|---|---|---|---|---|---|---|---|
| 2025/9/28 14:21:27 | ソフトウェア/Fusion360 最新版 | 7,787 | +1 | -1 | 表示 | 差分 | — |
| 2025/9/28 14:21:27 | ソフトウェア/Fusion360 | 7,793 | +7 | -2 | 表示 | 表示中 | 選択 |
| 2025/9/23 9:34:20 | ソフトウェア/Fusion360 | 7,552 | +58 | -1 | 表示 | 差分 | 選択 |
| 2025/3/13 22:12:13 | ソフトウェア/Fusion360 | 5,656 | +3 | -2 | 表示 | 差分 | 選択 |
| 2025/3/13 15:09:43 | ソフトウェア/Fusion360 | 5,632 | +57 | -2 | 表示 | 差分 | 基準 |
| 2025/3/4 4:58:31 | ソフトウェア/Fusion360 | 4,076 | +46 | -1 | 表示 | 差分 | 選択 |
| 2025/2/19 13:14:26 | ソフトウェア/Fusion360 | 3,021 | +4 | -5 | 表示 | 差分 | 選択 |
| 2025/2/18 23:19:39 | ソフトウェア/Fusion360 | 3,045 | +51 | -0 | 表示 | 差分 | 選択 |
| 2024/1/26 11:56:24 | ソフトウェア/Fusion360 | 1,982 | +0 | -31 | 表示 | 差分 | 選択 |
| 2024/1/21 5:50:46 | ソフトウェア/Fusion360 | 3,378 | +31 | -0 | 表示 | 差分 | 選択 |
| 2021/11/25 8:56:42 | ソフトウェア/Fusion360 | 1,982 | +57 | -0 | 表示 | 差分 | 選択 |
| 2021/11/21 23:22:48 | ソフトウェア/Fusion360 | 1,076 | +8 | -2 | 表示 | 差分 | 選択 |
| 2021/11/20 23:15:32 | ソフトウェア/Fusion360 | 695 | +6 | -0 | 表示 | 差分 | 選択 |
| 2021/11/19 8:06:56 | ソフトウェア/Fusion360 | 576 | +1 | -1 | 表示 | 差分 | 選択 |
| 2021/11/19 8:06:33 | ソフトウェア/Fusion360 | 575 | — | — | 表示 | — | 選択 |
基準: ソフトウェア/Fusion360 (2025/3/13 15:09:43) → 比較: ソフトウェア/Fusion360 (2025/9/28 14:21:27)
@@ -1,4 +1,4 @@
-#author("2025-03-13T06:09:43+00:00","default:administrator","administrator")
+#author("2025-09-28T05:21:27+00:00","default:administrator","administrator")
[[公開メモ]]
* Fusion 360 について [#v56dec70]
@@ -48,6 +48,7 @@
--- R[ectangle] で長方形
--- C[ircle] で円
--- D[imension] で寸法
+--- X で点線と実線の切り替え
--- メニューから中心点円弧(角度は後から入れないと余計な補助線が書かれてしまう)
--- メニューから円形状パターン
-- 書いた線を右クリックから、中心線やコンストラクション線に変更
@@ -85,7 +86,12 @@
一連の操作に対して、後から「過去を修正」できるのが素晴らしいですね。
+** コンポーネントを別コンポーネントの下へ移動したいができない [#a96f2c0f]
+https://forums.autodesk.com/t5/fusion-design-validate-document/moving-components-into-another-component-is-not-working/m-p/8069447#M162673
+
+によると、タイムラインのマーカーを一番右にしておかないとダメなのだそうだ。
+
* Python API に関する覚書 [#ne89fc6f]
** vscode の設定 [#v47a2ec5]
@@ -214,6 +220,7 @@
のように確保していたところ、
+ LANG: python
_handlers: list[adsk.core.EventHandler] = []
^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'adsk.core' has no attribute 'EventHandler'
@@ -232,8 +239,64 @@
| adsk.core.InputChangedEventHandler
] = []
-とすることで回避した。
+のように個別の型を列挙することで回避した。
+** コンポーネントの作成方法 [#sd3084ea]
+
+ユーザが選択しているアクティブなコンポーネント(オカレンス)の下に新しいコンポーネントを作成、その下にスケッチを作成するイディオム:
+
+ LANG: python
+ app = adsk.core.Application.get()
+ design = adsk.fusion.Design.cast(app.activeProduct)
+
+ occurrence = design.activeComponent.occurrences.addNewComponent(adsk.core.Matrix3D.create())
+ if design.activeOccurrence is not None:
+ occurrence = occurrence.createForAssemblyContext(design.activeOccurrence)
+ occurrence.isGroundToParent = False
+ comp = occurrence.component
+
+ sketch = comp.sketches.add(gear.xYConstructionPlane).createForAssemblyContext(occurrence)
+
+現在アクティブなコンポーネントやオカレンスは design.activeComponent や design.activeOccurrence で得られる。
+
+作成したコンポーネントやスケッチはそのままだと座標系と結びつかないため、createForAssemblyContext でオカレンスと結び付けておく必要がある。
+
+** defineAsFreeMove による移動 [#e44585e2]
+
+行列を与えることで自由に移動できて便利なのだけれど、親コンポーネント(オカレンス)が原点から移動されている場合、ワールド座標系を基準に移動・回転されても困る。
+
+そこで、親コンポーネント(オカレンス)の座標系を基準として動かすための関数がこちら。
+
+ LANG:python
+ def comp_move_free(
+ occurrence: adsk.fusion.Occurrence,
+ entities: adsk.core.Base | Iterable[adsk.core.Base],
+ matrixes: adsk.core.Matrix3D,
+ ):
+ """entities を occurrence の座標系を基準に matrix で指定されただけ移動する"""
+
+ # matrix の調整
+ (trans_inv := occurrence.transform2.copy()).invert()
+ matrices= [trans_inv, matrix, occurrence.transform2]
+ matrix = adsk.core.Matrix3D.create()
+ for m in matrices:
+ matrix.transformBy(m)
+ if matrix.isEqualTo(adsk.core.Matrix3D.create()):
+ return None # 移動の必要なし
+
+ # entities を list にする
+ if isinstance(entities, Iterable):
+ entities = list(entities)
+ else:
+ entities = [entities]
+ collection = adsk.core.ObjectCollection.createWithArray(entities)
+
+ # 移動する
+ comp = occurrence.component
+ inp = comp.features.moveFeatures.createInput2(collection)
+ inp.defineAsFreeMove(matrix)
+ return comp.features.moveFeatures.add(inp)
+
* コメント・質問 [#u54c5099]
#article_kcaptcha