「Mechanical関数-BricsCAD」の版間の差分

提供:GizmoLabs - だいたい CAD LISP なサイト
 
(同じ利用者による、間の18版が非表示)
6行目: 6行目:




Mechanical機能はBricsCAD Professional ("PRO") resp. Mechanicalライセンスレベルを必要とするため、下位レベルのライセンスを使用する場合(またはRunAsLevel=0で無効にする場合)、APIモジュールはアクティブではなく、すべてのMechanical LISP API機能は使用できない。
Mechanical機能はBricsCAD Professional ("PRO") または Mechanicalライセンスレベルを必要とするため、下位レベルのライセンスを使用する場合(またはRunAsLevel=0で無効にする場合)、APIモジュールはアクティブではなく、すべてのMechanical LISP API機能は使用できない。


Mechanical の開発が継続されると、BRX および LISP API も拡張され、より多くの機能が提供されるとともに、サードパーティの開発者からのアイデアやフィードバックが取り入れられるようになる。
Mechanical の開発が継続されると、BRX および LISP API も拡張され、より多くの機能が提供されるとともに、サードパーティの開発者からのアイデアやフィードバックが取り入れられるようになる。
13行目: 13行目:
* a) Rhino-Import/Export, コンポーネントインスタンスと コンポーネント定義機能:これらは Professional ライセンスレベルが必要。
* a) Rhino-Import/Export, コンポーネントインスタンスと コンポーネント定義機能:これらは Professional ライセンスレベルが必要。
* b) メカニカルコンポーネント、3D 拘束グループ、3D 拘束、3D 拘束パラメータ関数機能: これらは "Mechanical "ライセンスレベルが必要。
* b) メカニカルコンポーネント、3D 拘束グループ、3D 拘束、3D 拘束パラメータ関数機能: これらは "Mechanical "ライセンスレベルが必要。


== ライセンスレベルの確認方法は? ==
== ライセンスレベルの確認方法は? ==
37行目: 35行目:
** [[#メカニカル コンポーネント定数|コンポーネント定数]]
** [[#メカニカル コンポーネント定数|コンポーネント定数]]
** [[#3D 拘束定数|3D 拘束定数]]
** [[#3D 拘束定数|3D 拘束定数]]
** [[#メカニカルコンポーネント関数]]
** [[#メカニカルコンポーネント関数|メカニカルコンポーネント関数]]
** [[#3D拘束グループ関数]]
** [[#3D拘束グループ関数|3D拘束グループ関数]]
** [[#3D拘束関数]]
** [[#3D拘束関数|3D拘束関数]]
** [[#3D拘束パラメータ関数]]
** [[#3D拘束パラメータ関数|3D拘束パラメータ関数]]
** [[#Rhinoインポート/エクスポート機能]]
** [[#Rhinoインポート/エクスポート機能|Rhinoインポート/エクスポート機能]]




=== メカニカルコンポーネント関数 ===
== メカニカルコンポーネント関数 ==
メカニカル関数はすべて接頭辞 : "mech:" がつく。
メカニカル関数はすべて接頭辞 : "mech:" がつく。


<div class="mcol3">
* [[mech:get-componentparameternames]]
* [[mech:get-componentparameternames]]
* [[mech:get-componentparameterexpr]]
* [[mech:get-componentparameterexpr]]
57行目: 54行目:
* [[mech:set-componentparameterexpr]]
* [[mech:set-componentparameterexpr]]


==== メカニカルコンポーネント インスタンス関数====
 
== メカニカルコンポーネント インスタンス関数==
メカニカルコンポーネントインスタンス関数はすべて接頭辞 : "mech:instance" がつく。
メカニカルコンポーネントインスタンス関数はすべて接頭辞 : "mech:instance" がつく。
* [[mech:instance-get-allcategories]]
* [[mech:instance-get-allcategories]]
70行目: 68行目:




==== メカニカルコンポーネント定義関数====
== メカニカルコンポーネント定義関数==
メカニカルコンポーネントインスタンス関数はすべて接頭辞 : "mech:compdef" がつく。
メカニカルコンポーネントインスタンス関数はすべて接頭辞 : "mech:compdef" がつく。
<div class="mcol2">
* [[mech:compdef-has-definition]]
* [[mech:compdef-has-definition]]
* [[mech:compdef-get-allcategories]]
* [[mech:compdef-get-allcategories]]
108行目: 108行目:
* [[mech:compdef-set-sectionable]]
* [[mech:compdef-set-sectionable]]
* [[mech:compdef-unmech]]
* [[mech:compdef-unmech]]
</div>  
</div>


 
== 3D拘束グループ関数 ==
=== 3D拘束グループ関数 ===
メカニカル関数はすべて接頭辞 : "mech:" がつく。
メカニカル関数はすべて接頭辞 : "mech:" がつく。
<div class="mcol2">
<div class="mcol2">
129行目: 128行目:




=== 3D拘束関数 ===  
== 3D拘束関数 ==
メカニカル3D拘束関数はすべて接頭辞 : "mech:constraint" がつく。
メカニカル3D拘束関数はすべて接頭辞 : "mech:constraint" がつく。
<div class="mcol2">
<div class="mcol3">
* [[mech:constraint-get-arguments]]
* [[mech:constraint-get-arguments]]
* [[mech:constraint-get-blockid]]
* [[mech:constraint-get-blockid]]
148行目: 147行目:
* [[mech:constraint-set-name]]
* [[mech:constraint-set-name]]
* [[mech:constraint-set-placement]]
* [[mech:constraint-set-placement]]
</div>  
</div>
 
== 3D拘束パラメータ関数 ==
メカニカル3D拘束パラメータ関数はすべて接頭辞 : "mech:parameters" がつく。


これらの関数は、3DConstraints の Parameters を扱うために利用することができる。


=== 3D拘束パラメータ関数 ===
<div class="mcol3">
メカニカル3D拘束パラメータ関数はすべて接頭辞 : "mech:parameters" がつく。
<div class="mcol2">
* [[mech:parameters-erase]]
* [[mech:parameters-erase]]
* [[mech:parameters-get-blockid]]
* [[mech:parameters-get-blockid]]
171行目: 172行目:
* [[mech:parameters-set-unitstype]]
* [[mech:parameters-set-unitstype]]
* [[mech:parameters-set-value]]
* [[mech:parameters-set-value]]
</div>  
</div>
 


=== Rhinoインポート/エクスポート機能 ===
== Rhinoインポート/エクスポート機能 ==
メカニカル関数はすべて接頭辞 : "mech:rhino" がつく。
メカニカル Rhino関数はすべて接頭辞 : "mech:rhino" がつく。


* [[mech:rhino-exportfile]]
* [[mech:rhino-exportfile]]
* [[mech:rhino-importfile]]
* [[mech:rhino-importfile]]


==関連==
* [[シートメタル関数-BricsCAD]]


== メカニカル コンポーネント定数 ==
== メカニカル コンポーネント定数 ==


これらの定数は [[メカニカルコンポーネント関数-bricscad|メカニカルコンポーネント関数]]のコンテキストで使用され、すべて定義済みのLispシンボルとして利用可能。
これらの定数は [[#メカニカルコンポーネント関数]]のコンテキストで使用され、すべて定義済みのLispシンボルとして利用可能。


{| class="wikitable"  
{| class="wikitable"  
192行目: 190行目:
| コンポーネントタイプ || bc3dcNone || 0 || コンポーネントタイプはビットフラグを使用して組み合わせや追加が可能。
| コンポーネントタイプ || bc3dcNone || 0 || コンポーネントタイプはビットフラグを使用して組み合わせや追加が可能。
|-
|-
| || bc3dcAssembly || 1
| || bc3dcAssembly || 1 || アセンブリ
|-
|-
| || bc3dcPart || 2
| || bc3dcPart || 2 || パーツ
|-
|-
| || bc3dcIsStandard || 4
| || bc3dcIsStandard || 4 || 標準
|-
|-
| || c3dcIsMechanicalBlockOrEntity || 8
| || c3dcIsMechanicalBlockOrEntity || 8 || メカニカルブロックかエンティティ
|-
|-
| コンポーネントファイルステータス || bc3dcNotExternal || 0 ||
| コンポーネントファイルステータス || bc3dcNotExternal || 0 || 外部参照でない
|-
|-
|  || bc3dcResolved || 1
|  || bc3dcResolved || 1 || 解決
|-
|-
|  || bc3dcFileNotFound || 2
|  || bc3dcFileNotFound || 2 || ファイルが見つからない
|-
|-
|  || bc3dcUnresolved || 3
|  || bc3dcUnresolved || 3 || 未解決
|-
|-
| コンポーネントBOMステータス || bc3dcRegular || 0 ||
| コンポーネントBOMステータス || bc3dcRegular || 0 || 標準
|-
|-
|  || bc3dcTransparent || 1
|  || bc3dcTransparent || 1 || 透過
|-
|-
|  || bc3dcTerminal || 2
|  || bc3dcTerminal || 2 || 末端
|-
|-
|  || bc3dcExcluded || 3
|  || bc3dcExcluded || 3 || 除外
|-
|-
| カスタムプロパティパラメータ || bc3dcDoNotCreate || 0 ||
| カスタムプロパティパラメータ || bc3dcDoNotCreate || 0 || 未作成
|-
|-
|  || bc3dcCreateForThisIfNotExist || 1
|  || bc3dcCreateForThisIfNotExist || 1 || これは存在しない
|-
|-
|  || bc3dcCreateForAllIfNotExist || 2
|  || bc3dcCreateForAllIfNotExist || 2 || すべて存在しない
|}
|}


==3D 拘束定数==
==3D 拘束定数==


これらの定数は、[[3D拘束関数-bricscad|3D拘束関数]]のコンテキストで使用され、すべて定義済みのLispシンボルとして利用可能。
これらの定数は、[[#3D拘束関数|3D拘束関数]]のコンテキストで使用され、すべて定義済みのLispシンボルとして利用可能。


{| class="wikitable"  
{| class="wikitable"  
! !! 定数名 !! 値 !! 概要
! !! 定数名 !! 値 !! 概要
|-
|-
| 3DConstraints Type || bc3dcTypeUnknown || 0 ||
| 3D拘束タイプ || bc3dcTypeUnknown || 0 || 未知
|-
|-
| || bc3dcTypeAngle || 1
| || bc3dcTypeAngle || 1 ||  角度拘束
|-
|-
| || bc3dcTypeCoincident || 2
| || bc3dcTypeCoincident || 2 || 一致拘束
|-
|-
| || bc3dcTypeConcentric || 3
| || bc3dcTypeConcentric || 3 || 同心円拘束
|-
|-
| || bc3dcTypeDistance || 4
| || bc3dcTypeDistance || 4 || 距離拘束
|-
|-
| || bc3dcTypeFix || 5
| || bc3dcTypeFix || 5 || 固定拘束
|-
|-
| || bc3dcTypeMajorRadius || 6
| || bc3dcTypeMajorRadius || 6 || 主要半径拘束
|-
|-
| || bc3dcTypeMinorRadius || 7
| || bc3dcTypeMinorRadius || 7 || 非主要半経拘束
|-
|-
| || bc3dcTypeParallel || 8
| || bc3dcTypeParallel || 8 ||  並行拘束
|-
|-
| || bc3dcTypePerpendicular || 9
| || bc3dcTypePerpendicular || 9 || 垂直拘束
|-
|-
| || bc3dcTypePlanarAngle || 10
| || bc3dcTypePlanarAngle || 10 ||  平面角拘束
|-
|-
| || bc3dcTypeRadius || 11
| || bc3dcTypeRadius || 11 ||  半経拘束
|-
|-
| || bc3dcTypeRigidSet || 12
| || bc3dcTypeRigidSet || 12 ||  剛体セット拘束
|-
|-
| || bc3dcTypeTangent || 13
| || bc3dcTypeTangent || 13 ||  正接拘束
|-
|-
| || bc3dcTypeCircularArray || 14
| || bc3dcTypeCircularArray || 14 ||  円形配列拘束
|-
|-
| || bc3dcTypeObjectAngle || 15
| || bc3dcTypeObjectAngle || 15 ||  図形角度拘束
|-
|-
| || bc3dcTypePath || 16
| || bc3dcTypePath || 16 ||  パス拘束
|-
|-
| 3DConstraints Directions || bc3dcDirectionAny || 0
| 3D拘束指示 || bc3dcDirectionAny || 0 || 任意
|-
|-
| || bc3dcDirectionSame || 1
| || bc3dcDirectionSame || 1 ||  一部
|-
|-
| || bc3dcDirectionOpposite || 2
| || bc3dcDirectionOpposite || 2 ||  反対
|-
|-
| || bc3dcDirectionKeep || 3
| || bc3dcDirectionKeep || 3 ||  保持
|-
|-
| 3DConstraints MeasurementMode || bc3dcMeasurementModeCenter || 0
| 3D拘束測定モード || bc3dcMeasurementModeCenter || 0 ||  中心
|-
|-
| || bc3dcMeasurementModeBoundary || 1
| || bc3dcMeasurementModeBoundary || 1 ||  領域
|-
|-
| || bc3dcMeasurementModeCentralPoint || 2
| || bc3dcMeasurementModeCentralPoint || 2 || 中央
|-
|-
| 3DConstraints Placement || bc3dcPlacementAny || 0
| 3D拘束位置づけ|| bc3dcPlacementAny || 0 ||  任意
|-
|-
| || bc3dcPlacementOutside || 1
| || bc3dcPlacementOutside || 1 ||  外側
|-
|-
| || bc3dcPlacementInside || 2
| || bc3dcPlacementInside || 2 ||  内側
|-
|-
| || bc3dcPlacementKeep || 3
| || bc3dcPlacementKeep || 3 ||  保持
|-
|-
| 3DConstraints CoordinateSystemObject || bc3dcCSOrigin || 0
| 3D拘束座標系オブジェクト || bc3dcCSOrigin || 0 || 原点
|-
|-
| || bc3dcCSX || 1
| || bc3dcCSX || 1 || X
|-
|-
| || bc3dcCSY || 2
| || bc3dcCSY || 2 || Y
|-
|-
| || bc3dcCSZ || 3
| || bc3dcCSZ || 3 || Z
|-
|-
| || bc3dcCSXY || 4
| || bc3dcCSXY || 4 || XY
|-
|-
| || c3dcCSYZ || 5
| || c3dcCSYZ || 5 ||  YZ
|-
|-
| || bc3dcCSZX || 6
| || bc3dcCSZX || 6 || ZX
|-
|-
| 3DC Parameters Units Type || bc3dcUnitNone || 0
| 3D拘束パラメータ単位種別 || bc3dcUnitNone || 0 ||  なし
|-
|-
| || bc3dcUnitLength || 1
| || bc3dcUnitLength || 1 || 長さ単位
|-
|-
| || bc3dcUnitArea || 2
| || bc3dcUnitArea || 2 || 領域単位
|-
|-
| || bc3dcUnitVolume || 3
| || bc3dcUnitVolume || 3 || 体積単位
|-
|-
| 3DC Parameters Expose Mode || bc3dcExposeOff || 0
| 3D拘束パラメータ露光モード || bc3dcExposeOff || 0 || オフ
|-
|-
| || bc3dcExposeOn || 1
| || bc3dcExposeOn || 1 || オン
|-
|-
| || bc3dcExposeUndefined || 2
| || bc3dcExposeUndefined || 2 || 未定義
|-
|-
| 3DC Parameters GeometryDriven Mode || bc3dcGdOff || 0
| 3D拘束パラメータ ジオメトリ ドリブンモード || bc3dcGdOff || 0 ||  オフ
|-
|-
| || bc3dcGdOn || 1
| || bc3dcGdOn || 1 || オン
|-
|-
| || bc3dcGdAuto || 2
| || bc3dcGdAuto || 2 || 自動
|-
|-
|}
|}
-----
''関連事項''
* [[シートメタル関数-BricsCAD]]
[[Category:BricsCADのLISP]]

2023年6月18日 (日) 06:44時点における最新版

BricsCAD の Mechanical LISP API について

V23以降、BricsCAD LISP は Mechanical機能専用のインターフェースを提供している(「Professional」または「Mechanical」ライセンスが必要)。 この新しい API は、名前、引数、動作、結果において通常のAutoLISPの論理に従った、シンプルで柔軟な設計になっている。


Mechanical機能はBricsCAD Professional ("PRO") または Mechanicalライセンスレベルを必要とするため、下位レベルのライセンスを使用する場合(またはRunAsLevel=0で無効にする場合)、APIモジュールはアクティブではなく、すべてのMechanical LISP API機能は使用できない。

Mechanical の開発が継続されると、BRX および LISP API も拡張され、より多くの機能が提供されるとともに、サードパーティの開発者からのアイデアやフィードバックが取り入れられるようになる。

Mechanical LISP API には 2 つの部分がある。

  • a) Rhino-Import/Export, コンポーネントインスタンスと コンポーネント定義機能:これらは Professional ライセンスレベルが必要。
  • b) メカニカルコンポーネント、3D 拘束グループ、3D 拘束、3D 拘束パラメータ関数機能: これらは "Mechanical "ライセンスレベルが必要。

ライセンスレベルの確認方法は?

  • (bcad$LicenseLevels) と (vle-licenselevel) という2つのLisp関数があり、どちらも同じ実装を使用している。
  • Mechanicalが使用可能な場合、返されるリストには "Professional "または "Mechanical "という文字列が含まれる。
  • 「RunAsLevel」設定も結果リストで尊重される。


Mechanical LISP APIを有効にするには?

Mechanical 機能の LISP 関数セットは BRX コア システムを使用して実装されているため、.NET Framework を使用して Mechanical LISP インタフェース関数を明示的にロード/起動する必要がある (AutoCAD AutoLISP で必須の (vl-load-com) と似た方法)。

(vl-load-mech)

コンテキスト条件 (Professional と Mechanical ライセンス) が満たされている場合、拡張機能がロードされ、1 (Pro 機能が使用可能) または 2 (Mechanical 機能が使用可能) が返されるか、Pro または Mechanical ライセンスが使用できない場合は NIL (後者の場合、特定の LISP 機能が使用できない) が返される。

いくつかの一般的なヒントとルール

「エンティティ名」の使用 : 関数で「エンティティ名」が必要な場合、すべてのケースで「classic ename」と「vla object」の両方が常に有効であり、サポートされている。



メカニカルコンポーネント関数

メカニカル関数はすべて接頭辞 : "mech:" がつく。


メカニカルコンポーネント インスタンス関数

メカニカルコンポーネントインスタンス関数はすべて接頭辞 : "mech:instance" がつく。


メカニカルコンポーネント定義関数

メカニカルコンポーネントインスタンス関数はすべて接頭辞 : "mech:compdef" がつく。

3D拘束グループ関数

メカニカル関数はすべて接頭辞 : "mech:" がつく。


3D拘束関数

メカニカル3D拘束関数はすべて接頭辞 : "mech:constraint" がつく。

3D拘束パラメータ関数

メカニカル3D拘束パラメータ関数はすべて接頭辞 : "mech:parameters" がつく。

これらの関数は、3DConstraints の Parameters を扱うために利用することができる。

Rhinoインポート/エクスポート機能

メカニカル Rhino関数はすべて接頭辞 : "mech:rhino" がつく。


メカニカル コンポーネント定数

これらの定数は #メカニカルコンポーネント関数のコンテキストで使用され、すべて定義済みのLispシンボルとして利用可能。

定数名 概要
コンポーネントタイプ bc3dcNone 0 コンポーネントタイプはビットフラグを使用して組み合わせや追加が可能。
bc3dcAssembly 1 アセンブリ
bc3dcPart 2 パーツ
bc3dcIsStandard 4 標準
c3dcIsMechanicalBlockOrEntity 8 メカニカルブロックかエンティティ
コンポーネントファイルステータス bc3dcNotExternal 0 外部参照でない
bc3dcResolved 1 解決
bc3dcFileNotFound 2 ファイルが見つからない
bc3dcUnresolved 3 未解決
コンポーネントBOMステータス bc3dcRegular 0 標準
bc3dcTransparent 1 透過
bc3dcTerminal 2 末端
bc3dcExcluded 3 除外
カスタムプロパティパラメータ bc3dcDoNotCreate 0 未作成
bc3dcCreateForThisIfNotExist 1 これは存在しない
bc3dcCreateForAllIfNotExist 2 すべて存在しない

3D 拘束定数

これらの定数は、3D拘束関数のコンテキストで使用され、すべて定義済みのLispシンボルとして利用可能。

定数名 概要
3D拘束タイプ bc3dcTypeUnknown 0 未知
bc3dcTypeAngle 1 角度拘束
bc3dcTypeCoincident 2 一致拘束
bc3dcTypeConcentric 3 同心円拘束
bc3dcTypeDistance 4 距離拘束
bc3dcTypeFix 5 固定拘束
bc3dcTypeMajorRadius 6 主要半径拘束
bc3dcTypeMinorRadius 7 非主要半経拘束
bc3dcTypeParallel 8 並行拘束
bc3dcTypePerpendicular 9 垂直拘束
bc3dcTypePlanarAngle 10 平面角拘束
bc3dcTypeRadius 11 半経拘束
bc3dcTypeRigidSet 12 剛体セット拘束
bc3dcTypeTangent 13 正接拘束
bc3dcTypeCircularArray 14 円形配列拘束
bc3dcTypeObjectAngle 15 図形角度拘束
bc3dcTypePath 16 パス拘束
3D拘束指示 bc3dcDirectionAny 0 任意
bc3dcDirectionSame 1 一部
bc3dcDirectionOpposite 2 反対
bc3dcDirectionKeep 3 保持
3D拘束測定モード bc3dcMeasurementModeCenter 0 中心
bc3dcMeasurementModeBoundary 1 領域
bc3dcMeasurementModeCentralPoint 2 中央
3D拘束位置づけ bc3dcPlacementAny 0 任意
bc3dcPlacementOutside 1 外側
bc3dcPlacementInside 2 内側
bc3dcPlacementKeep 3 保持
3D拘束座標系オブジェクト bc3dcCSOrigin 0 原点
bc3dcCSX 1 X
bc3dcCSY 2 Y
bc3dcCSZ 3 Z
bc3dcCSXY 4 XY
c3dcCSYZ 5 YZ
bc3dcCSZX 6 ZX
3D拘束パラメータ単位種別 bc3dcUnitNone 0 なし
bc3dcUnitLength 1 長さ単位
bc3dcUnitArea 2 領域単位
bc3dcUnitVolume 3 体積単位
3D拘束パラメータ露光モード bc3dcExposeOff 0 オフ
bc3dcExposeOn 1 オン
bc3dcExposeUndefined 2 未定義
3D拘束パラメータ ジオメトリ ドリブンモード bc3dcGdOff 0 オフ
bc3dcGdOn 1 オン
bc3dcGdAuto 2 自動



関連事項