規則

MotionSolve APIステートメントは、以下のスタイル規則に従います。

注: Pythonは大文字と小文字が区別されるため、MotionSolve Pythonインターフェースもこれに従います。したがって、次のようになります:
>>>
>>>from math import sin, pi
>>>sin(pi/2)
1.0

>>>Sin(pi/2)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'Sin' is not defined

MotionSolveクラス

すべてのMotionSolveクラスで、アッパーキャメルケースが使用され、先頭の文字が常に大文字になります。クラス名で複数の意味のある単語が連結されている場合は、後続の各単語の先頭の文字も大文字になります。その他の文字はすべて小文字です。下の例で説明します。

有効なクラス名 無効なクラス名のバリエーション
Part PART、part、pARTなど
Joint JOINT、joint、jOiNtなど
SpringDamer Springdamper、SPRINGDAMPER、springdamperなど
>>> from msolve import *
>>>
>>> jupiter = PaRT(MASS=1.89E27) # Incorrect capitalization
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'PaRT' is not defined

>>> jupiter = Part (mass=1.89813E27) # Correct capitalization
>>> jupiter.mass
1.89813e+27

MotionSolveクラスの属性

属性は常に小文字です。下の表で説明します。
有効な属性名 無効な属性名
id ID、Id、iD
label Label、labeLなど
variables Variables、VARiablesなど