Draft API/ja: Difference between revisions

From FreeCAD Documentation
No edit summary
(Updating to match new version of source page)
(3 intermediate revisions by 2 users 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 *
myrect = makeRectangle(4,3)
myrect = Draft.makeRectangle(4, 3)
mydistance = FreeCAD.Vector(2,2,0)
mydistance = FreeCAD.Vector(2, 2, 0)
move(myrect,mydistance)
Draft.move(myrect, mydistance)
}}
}}



<div class="mw-translate-fuzzy">
{{APIFunction/jp|cut|FreeCAD.Object, FreeCAD.Object|与えられた2つのオブジェクトの差分から作成されたカットオブジェクトを返します。元のオブジェクトは非表示になります。|新しく作成されたオブジェクト}}
{{APIFunction/jp|cut|FreeCAD.Object, FreeCAD.Object|与えられた2つのオブジェクトの差分から作成されたカットオブジェクトを返します。元のオブジェクトは非表示になります。|新しく作成されたオブジェクト}}


Line 43: Line 45:
{{APIFunction/jp|makeWire|list または Part.Wire, [closed], [placement], [facemode]|与えられたベクトルのリストまたは与えられたワイヤーからワイヤーオブジェクトを作成します。closedがTrue、または最初と最後の点が一致している場合はワイヤーが閉じます。facemodeがTrue(またはワイヤーが閉じている)の場合にはワイヤーは塗りつぶされた状態で表示されます。 Draftツールバーの現在の線の色と幅が使用されます。|新しく作成されたオブジェクト.}}
{{APIFunction/jp|makeWire|list または Part.Wire, [closed], [placement], [facemode]|与えられたベクトルのリストまたは与えられたワイヤーからワイヤーオブジェクトを作成します。closedがTrue、または最初と最後の点が一致している場合はワイヤーが閉じます。facemodeがTrue(またはワイヤーが閉じている)の場合にはワイヤーは塗りつぶされた状態で表示されます。 Draftツールバーの現在の線の色と幅が使用されます。|新しく作成されたオブジェクト.}}


{{APIFunction/jp|move|FreeCAD.Object または list, Vector, [copymode])|与えられたオブジェクトまたは与えられたリストに入っているオブジェクトを与えられたベクトルによって表される方向と距離に移動させます。copymodeがTrueの場合、実際のオブジェクトは動かされず、代わりにコピーが作成されます。|オブジェクト(copymodeがTrueの場合はオブジェクトのコピー)}}
{{APIFunction/jp|move|FreeCAD.Object または list, Vector, [copymode]|与えられたオブジェクトまたは与えられたリストに入っているオブジェクトを与えられたベクトルによって表される方向と距離に移動させます。copymodeがTrueの場合、実際のオブジェクトは動かされず、代わりにコピーが作成されます。|オブジェクト(copymodeがTrueの場合はオブジェクトのコピー)}}


{{APIFunction/jp|precision| |Draftのユーザー設定から精度の値を返します|整数}}
{{APIFunction/jp|precision| |Draftのユーザー設定から精度の値を返します|整数}}
Line 61: Line 63:
{{APIFunction/jp|getSVG|FreeCAD.Object, [linemodifier], [textmodifier], [(u,v)]|
{{APIFunction/jp|getSVG|FreeCAD.Object, [linemodifier], [textmodifier], [(u,v)]|
与えられたオブジェクトのSVG表現を作成します。linemodifier属性はライン幅の(パーセント単位の)拡大縮小率で、textmodifierはテキストサイズ用です。またオプションで投影面を定義するベクトルのタプルを指定できますが、指定しない場合はジオメトリーはXY平面に投影されます。|与えられたオブジェクトのSVG表現が入った文字列}}
与えられたオブジェクトのSVG表現を作成します。linemodifier属性はライン幅の(パーセント単位の)拡大縮小率で、textmodifierはテキストサイズ用です。またオプションで投影面を定義するベクトルのタプルを指定できますが、指定しない場合はジオメトリーはXY平面に投影されます。|与えられたオブジェクトのSVG表現が入った文字列}}
</div>



{{Draft Tools navi{{#translation:}}}}
[[Category:API]]
{{Userdocnavi{{#translation:}}}}
[[Category:Poweruser Documentation]]
[[Category:API{{#translation:}}]]
[[Category:Poweruser Documentation{{#translation:}}]]


{{clear}}
{{clear}}

Revision as of 22:25, 20 February 2020

これらの関数は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)

Template:APIFunction/jp

Template:APIFunction/jp

Template:APIFunction/jp

Template:APIFunction/jp

Template:APIFunction/jp

Template:APIFunction/jp

Template:APIFunction/jp

Template:APIFunction/jp

Template:APIFunction/jp

Template:APIFunction/jp

Template:APIFunction/jp

Template:APIFunction/jp

Template:APIFunction/jp

Template:APIFunction/jp

Template:APIFunction/jp

Template:APIFunction/jp

Template:APIFunction/jp

Template:APIFunction/jp

Template:APIFunction/jp

Template:APIFunction/jp

Template:APIFunction/jp

Template:APIFunction/jp