Draft API/ja: Difference between revisions
No edit summary |
(Updating to match new version of source page) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
<languages/> |
<languages/> |
||
<div class="mw-translate-fuzzy"> |
|||
これらの関数はDraftモジュールの一部であり、Draftモジュールをインポートすることでスクリプト、マクロ、Pythonインタプリタから使用することができます。 |
これらの関数はDraftモジュールの一部であり、Draftモジュールをインポートすることでスクリプト、マクロ、Pythonインタプリタから使用することができます。 |
||
</div> |
|||
These functions are part of the [[Draft Workbench|Draft Workbench]] and can be used in [[macros|macros]] and from the [[Python|Python]] console once the {{incode|Draft}} module has been imported. |
|||
例: |
例: |
||
{{Code|code= |
{{Code|code= |
||
import FreeCAD |
import FreeCAD, Draft |
||
from Draft import * |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
{{APIFunction/jp|cut|FreeCAD.Object, FreeCAD.Object|与えられた2つのオブジェクトの差分から作成されたカットオブジェクトを返します。元のオブジェクトは非表示になります。|新しく作成されたオブジェクト}} |
{{APIFunction/jp|cut|FreeCAD.Object, FreeCAD.Object|与えられた2つのオブジェクトの差分から作成されたカットオブジェクトを返します。元のオブジェクトは非表示になります。|新しく作成されたオブジェクト}} |
||
Line 61: | Line 64: | ||
与えられたオブジェクトのSVG表現を作成します。linemodifier属性はライン幅の(パーセント単位の)拡大縮小率で、textmodifierはテキストサイズ用です。またオプションで投影面を定義するベクトルのタプルを指定できますが、指定しない場合はジオメトリーはXY平面に投影されます。|与えられたオブジェクトのSVG表現が入った文字列}} |
与えられたオブジェクトのSVG表現を作成します。linemodifier属性はライン幅の(パーセント単位の)拡大縮小率で、textmodifierはテキストサイズ用です。またオプションで投影面を定義するベクトルのタプルを指定できますが、指定しない場合はジオメトリーはXY平面に投影されます。|与えられたオブジェクトのSVG表現が入った文字列}} |
||
<div class="mw-translate-fuzzy"> |
|||
[[Category:API]] |
[[Category:API]] |
||
[[Category:Poweruser Documentation]] |
[[Category:Poweruser Documentation]] |
||
</div> |
|||
[[Category:API]] |
|||
[[Category:Poweruser Documentation]] |
|||
{{clear}} |
{{clear}} |
Revision as of 20:11, 4 March 2019
これらの関数はDraftモジュールの一部であり、Draftモジュールをインポートすることでスクリプト、マクロ、Pythonインタプリタから使用することができます。
These functions are part of the Draft Workbench and can be used in macros and from the Python console once the Draft
module has been imported.
例:
import FreeCAD, Draft
myrect = Draft.makeRectangle(4, 3)
mydistance = FreeCAD.Vector(2, 2, 0)
Draft.move(myrect, mydistance)