ChatGPT-4においてビジュアルスクリプティングを罫線(└├│など)を使ってノードの繋がりを表現することはできますか。
ChatGPT
はい、ChatGPT-4を使ってビジュアルスクリプティングのノードとその繋がりを表現することは可能です。テキストベースでのビジュアル表現は限られていますが、罫線(└、├、│など)を利用して、ノード間の関係やフローを示すことができます。たとえば、シンプルなフローチャートのような構造をテキストで作成することが可能です。
例えば以下のように表現できます:
Copy code
ノード1
│
├─> ノード2
│ │
│ └─> ノード3
│
└─> ノード4
この例では、ノード1がノード2とノード4に分岐し、ノード2がさらにノード3に繋がっていることを示しています。このようにして、複雑なビジュアルスクリプティングのフローやロジックを簡略化して表現することができます。
User
"""ノード1
#COMMAND;READONLYREFFILE;[VWLibDef]/Input\Dim.py;
#Modified April 2017
@Marionette.NodeDefinition
class Params(metaclass = Marionette.OrderedClass):
#APPEARANCE
#Name
this = Marionette.Node( 'Dim' )
this.SetDescription('A real value with units')
#Input Ports
#OIP Controls
dim = Marionette.OIPControl( 'Dim', Marionette.WidgetType.RealCoord, 0.0)
dim.SetDescription('A numeric OIP control that accepts unit indicators')
#Output Ports
d = Marionette.PortOut('n')
d.SetDescription('The resulting value in document units')
#BEHAVIOR
def RunNode(self):
#inputs
dim = self.Params.dim.value
#script
units = vs.GetPrefReal(150)
result = dim/units
#outputs
self.Params.d.value = result
"""
"""ノード2
#COMMAND;READONLYREFFILE;[VWLibDef]/Objects\Rectangle\Rectangle.py;
#Modified by MFarrell May 2017
@Marionette.NodeDefinition
class Params(metaclass = Marionette.OrderedClass):
#APPEARANCE
#Name
this = Marionette.Node( "Create Rectangle" )
this.SetDescription( 'Creates a rectangle with the provided specifications' )
#Input Ports
pt = Marionette.PortIn( (0,0), "p" )
pt.SetDescription( "The origin of the rectangle" )
width = Marionette.PortIn( 1, 'nWidth' )
width.SetDescription( "The width of the rectangle" )
height = Marionette.PortIn( 1, 'nHeight' )
height.SetDescription( "The height of the rectangle" )
orientation = Marionette.PortIn( (1,0), 'vRot' )
orientation.SetDescription( "The orientation of the rectangle" )
#OIP Controls
#Output Ports
rectangle = Marionette.PortOut('hRect')
rectangle.SetDescription( "The created rectangle" )
#BEHAVIOR
this.SetLinksObjects()
def RunNode(self):
#inputs
origin = self.Params.pt.value
width_ = self.Params.width.value
height_ = self.Params.height.value
rotation_ = self.Params.orientation.value
#script
vs.RectangleN(origin[0],origin[1],rotation_[0],rotation_[1],width_,height_)
r = vs.LNewObj()
#outputs
self.Params.rectangle.value = r
"""
例えば上記のノード1、ノード2を使って1辺が910mmの四角形オブジェクトを生成するビジュアルスクリプティング(Vectorworks Marionette Network)を罫線を使って表現してください。
ChatGPT
以下は、ノード1「Dim」(次元ノード)とノード2「Create Rectangle」(四角形作成ノード)を使用して、1辺が910mmの四角形オブジェクトを生成するビジュアルスクリプティング(Vectorworks Marionette Network)の表現です。
yaml
Copy code
ノード1: Dim
│
└───> [value: 910mm] ──> ノード2: Create Rectangle
│
├───> [width: 910mm] ────> 四角形オブジェクト生成
│
└───> [height: 910mm]
この表現では、ノード1「Dim」が値910mmを生成し、これをノード2「Create Rectangle」の幅と高さの入力として使用しています。ノード2はこれらの寸法を基に四角形オブジェクトを生成します。
User
"""ノード3
#COMMAND;READONLYREFFILE;[VWLibDef]/Objects/Solid\Box.py;
#Created by MFarrell September 2015
@Marionette.NodeDefinition
class Params(metaclass = Marionette.OrderedClass):
#APPEARANCE
#Name
this = Marionette.Node( "Create Box" )
this.SetDescription( 'Creates a rectangular prism with the input values.' )
#Input Ports
origin = Marionette.PortIn( (0,0,0), "p3D" )
origin.SetDescription( "The 3D origin of the prism." )
width = Marionette.PortIn( 1, 'nWidth' )
width.SetDescription( "The width of the prism." )
depth = Marionette.PortIn( 1, 'nDepth' )
depth.SetDescription( "The depth of the prism." )
height = Marionette.PortIn( 5, 'nHeight' )
height.SetDescription('The height of the prism.')
#OIP Controls
#Output Ports
xtrds = Marionette.PortOut('hBox')
xtrds.SetDescription('The resulting prism.')
#BEHAVIOR
this.SetLinksObjects()
def RunNode(self):
#inputs
origin = self.Params.origin.value
width_ = self.Params.width.value
depth_ = self.Params.depth.value
height_ = self.Params.height.value
#script
if len(origin)==2:
origin[2] = 0
bottom = origin[2]
vs.RectangleN(origin[0],origin[1],1,0,width_,depth_)
prof = vs.LNewObj()
vs.BeginXtrd(bottom, bottom + height_)
vs.CreateDuplicateObject(prof, vs.Handle(0))
vs.EndXtrd()
extr = vs.LNewObj()
(ok, start, rotX, rotY, rotZ) = vs.GetEntityMatrix(prof)
vs.SetEntityMatrix(extr, start, rotX, rotY, rotZ)
vs.Marionette_DisposeObj(prof)
#outputs
self.Params.xtrds.value = extr
"""
さらにノード3を付け加えてz方向に910mmの立方体をつくるビジュアルスクリプティング(Vectorworks Marionette Network)を罫線を使って表現してください。
ChatGPT
以下は、ノード1「Dim」、ノード2「Create Rectangle」、およびノード3「Create Box」を使用して、1辺が910mmの立方体オブジェクトを生成するビジュアルスクリプティング(Vectorworks Marionette Network)の表現です。
yaml
Copy code
ノード1: Dim
│
└───> [value: 910mm] ──> ノード2: Create Rectangle
│
├───> [width: 910mm] ────> 四角形オブジェクト生成
│
└───> [height: 910mm] ──> ノード3: Create Box
│
├───> [width: 910mm]
├───> [depth: 910mm]
└───> [height: 910mm] ────> 立方体オブジェクト生成
この表現では、ノード1「Dim」が値910mmを生成し、これをノード2「Create Rectangle」の幅と高さの入力として使用し、四角形オブジェクトを生成します。次に、ノード3「Create Box」がこの四角形を基にして、幅、奥行き、高さすべてが910mmの立方体オブジェクトを生成します。
User
間違えました。
ノード3は下記の内容のノードでした。
"""ノード3
#COMMAND;READONLYREFFILE;[VWLibDef]/Objects\Solid\Extrude.py;
#Modified by MFarrell May 2017
@Marionette.NodeDefinition
class Params(metaclass = Marionette.OrderedClass):
#APPEARANCE
#Name
this = Marionette.Node( "Extrude" )
this.SetDescription('Extrudes a 2D profile from a bottom Z value to a top Z value')
#Input Ports
profile = Marionette.PortIn( vs.Handle(0), 'hObj' )
profile.SetDescription('The 2D object to extrude')
top = Marionette.PortIn( 5, 'nTop' )
top.SetDescription('The Z value of the top of the resulting extrusion')
bottom = Marionette.PortIn( 0, 'nBot' )
bottom.SetDescription('The Z value of the bottom of the resulting extrusion')
#OIP Controls
#Output Ports
xtrds = Marionette.PortOut('hObj')
xtrds.SetDescription('The resulting extrusion')
#BEHAVIOR
this.SetLinksObjects()
def RunNode(self):
#inputs
prof = self.Params.profile.value
top = self.Params.top.value
bottom = self.Params.bottom.value
#script
vs.BeginXtrd(bottom, top)
vs.CreateDuplicateObject(prof, vs.Handle(0))
vs.EndXtrd()
extr = vs.LNewObj()
(ok, start, rotX, rotY, rotZ) = vs.GetEntityMatrix(prof)
vs.Marionette_DisposeObj(prof)
vs.SetEntityMatrix(extr, start, rotX, rotY, rotZ)
#outputs
self.Params.xtrds.value = extr
"""
Create Boxノードを廃止してここで訂正したノード3を使用してもう一度先と同じZ軸方向に910mmの立方体を作るビジュアルスクリプティング(Vectorworks Marionette Network)を罫線を使って表現してください。
ChatGPT
以下は、ノード1「Dim」、ノード2「Create Rectangle」、およびノード3「Extrude」を使用して、Z軸方向に910mmの立方体オブジェクトを生成するビジュアルスクリプティング(Vectorworks Marionette Network)の表現です。
yaml
Copy code
ノード1: Dim
│
└───> [value: 910mm] ──> ノード2: Create Rectangle
│
├───> [width: 910mm]
├───> [height: 910mm]
│
└───> 四角形オブジェクト ──> ノード3: Extrude
│
├───> [profile: 四角形オブジェクト]
├───> [top: 910mm]
└───> [bottom: 0mm] ────> 立方体オブジェクト生成
この表現では、ノード1「Dim」が値910mmを生成し、これをノード2「Create Rectangle」の幅と高さの入力として使用し、四角形オブジェクトを生成します。次に、ノード3「Extrude」がこの四角形を基にして、0mmから910mmまでのZ軸方向に押し出し、立方体オブジェクトを生成します。
User
ノード3のPythonスクリプトにある"""profile = Marionette.PortIn( vs.Handle(0), 'hObj' )"""についてMarionette.PortIn関数の第2引数('hObj')がポート入力名です。他のノードも同様なのでこの第2引数の表現に差し替えてください。
ChatGPT
以下は、ノード1「Dim」、ノード2「Create Rectangle」、および修正されたノード3「Extrude」を使用して、Z軸方向に910mmの立方体オブジェクトを生成するビジュアルスクリプティング(Vectorworks Marionette Network)の表現です。
yaml
Copy code
ノード1: Dim
│
└───> [Dim: 910mm] ──> ノード2: Create Rectangle
│
├───> [p: 原点]
├───> [nWidth: 910mm]
├───> [nHeight: 910mm]
├───> [vRot: 向き]
│
└───> [hRect: 四角形オブジェクト] ──> ノード3: Extrude
│
├───> [hObj: 四角形オブジェクト]
├───> [nTop: 910mm]
└───> [nBot: 0mm] ────> [hObj: 立方体オブジェクト生成]
この表現では、各ノードの入力ポート名を明示し、それぞれのノードがどのように連携して立方体オブジェクトを生成するかを示しています。
User
ChatGPT-4において罫線以外を使ってビジュアルスクリプティング(Vectorworks Marionette Network)を表現することはできますか。
ChatGPT
ChatGPT-4は、ビジュアルスクリプティング(Vectorworks Marionette Network)を表現するために罫線以外の方法を使用することはできません。このツールは主にテキストベースのコミュニケーションに特化しており、複雑なビジュアル表現やグラフィカルな要素の生成には対応していません。ビジュアルスクリプティングを視覚的に表現するためには、専用のソフトウェアや描画ツールを使用することが必要です。
User
それではChatGPT-4においてビジュアルスクリプティング(Vectorworks Marionette Network)を表現する唯一の方法が罫線を使用した方法ということですか。
ChatGPT
はい、現在のChatGPT-4の機能では、ビジュアルスクリプティング(Vectorworks Marionette Network)を表現するために罫線を使用する方法が唯一の選択肢です。このツールは主にテキストに基づいたコミュニケーションを行うため、複雑なグラフィック表現や図形の作成はできません。したがって、テキストと基本的な罫線を使用して、ビジュアルスクリプティングの概念やノードの関連性を表現することが可能です。
User
"""提案してもらった、ノード1「Dim」、ノード2「Create Rectangle」、および修正されたノード3「Extrude」を使用して、Z軸方向に910mmの立方体オブジェクトを生成するビジュアルスクリプティング(Vectorworks Marionette Network)の表現"""についてノード2の出力ポートの表現が入力ポートから│を一つ挟んで表現されてるためわかりやすかったです。同じようにノード3の出力ポートも表現してください。
ChatGPT
了解しました。ノード3「Extrude」の出力ポートを、ノード2「Create Rectangle」の出力ポートと同様に、入力ポートと出力ポートの間に罫線を使って表現します。
csharp
Copy code
ノード3: Extrude
入力ポート ──> 処理 ──> 出力ポート
[profile] ──> [Extrude Logic] ──> [xtrds]
[top] ──> [Extrude Logic] ──> [xtrds]
[bottom] ──> [Extrude Logic] ──> [xtrds]
この表現では、各入力ポートが「Extrude Logic」を経由して出力ポート「xtrds」に接続されていることを示しています。これにより、ノード間のデータフローが視覚的に理解しやすくなります。
User
User
ノード3のPythonスクリプトにある"""profile = Marionette.PortIn( vs.Handle(0), 'hObj' )"""についてMarionette.PortIn関数の第2引数('hObj')がポート入力名です。他のノードも同様なのでこの第2引数の表現に差し替えてください。
ChatGPT
了解しました。ノード3「Extrude」のPythonスクリプトで使用されているMarionette.PortIn関数の第2引数(ポート名)を用いた表現に変更しましょう。他のノードも同様にします。
csharp
Copy code
ノード3: Extrude
入力ポート ──> 処理 ──> 出力ポート
[hObj] ──> [Extrude Logic] ──> [xtrds]
[nTop] ──> [Extrude Logic] ──> [xtrds]
[nBot] ──> [Extrude Logic] ──> [xtrds]
この表現では、ノード3「Extrude」の各入力ポート(hObj, nTop, nBot)が中央の「Extrude Logic」処理を経由して出力ポート「xtrds」に接続されていることを示しています。これにより、ノード間のデータフローがより明確に理解できるようになります。
User
ノード1: Dim
│
└───> [Dim: 910mm] ──> ノード2: Create Rectangle
│
├───> [p: 原点]
├───> [nWidth: 910mm]
├───> [nHeight: 910mm]
├───> [vRot: 向き]
│
└───> [hRect: 四角形オブジェクト] ──> ノード3: Extrude
│
├───> [hObj: 四角形オブジェクト]
├───> [nTop: 910mm]
└───> [nBot: 0mm] ────> [hObj: 立方体オブジェクト生成]
上記の表現を下記の表現にすると私は理解しやすいです。その理由は入力ポートと出力ポートの関係がわかりやすくなるからです。今後は入力ポートと出力ポートの関係を下記のように表現してください。
ノード1: Dim
│
└───> [Dim: 910mm] ──> ノード2: Create Rectangle
│
├───> [p: 原点]
├───> [nWidth: 910mm]
├───> [nHeight: 910mm]
├───> [vRot: 向き]
│
└───> [hRect: 四角形オブジェクト] ──> ノード3: Extrude
│
├───> [hObj: 四角形オブジェクト]
├───> [nTop: 910mm]
├───> [nBot: 0mm]
│
└────> [hObj: 立方体オブジェクト生成]
ChatGPT
了解しました。下記のようにノード間の入力ポートと出力ポートの関係を表現します。
yaml
Copy code
ノード1: Dim
│
└───> [Dim: 910mm] ──> ノード2: Create Rectangle
│
├───> [p: 原点]
├───> [nWidth: 910mm]
├───> [nHeight: 910mm]
├───> [vRot: 向き]
│
└───> [hRect: 四角形オブジェクト] ──> ノード3: Extrude
│
├───> [hObj: 四角形オブジェクト]
├───> [nTop: 910mm]
├───> [nBot: 0mm]
│
└────> [hObj: 立方体オブジェクト生成]
この表現では、ノード間のデータフローが明確に示されており、各ノードの入力と出力が直感的に理解しやすくなっています。これにより、ビジュアルスクリプティング(Vectorworks Marionette Network)の構造がより分かりやすくなります。
User
"""ノード4
#COMMAND;READONLYREFFILE;[VWLibDef]/Operations\Move.py;
#Modified April 2017
#Updated May 2018 to allow absolute location MFarrell
@Marionette.NodeDefinition
class Params(metaclass = Marionette.OrderedClass):
#APPEARANCE
#Name
this = Marionette.Node( 'Move' )
this.SetDescription("This node will move an object or point by an offset in 2D or 3D. If the object is planar this node does not move it outside of its plane.")
#Input Ports
input = Marionette.PortIn( vs.Handle(0), 'itemIn' )
input.SetDescription('An object, vector or point to move')
d = Marionette.PortIn( 0, 'vOffset')
d.SetDescription('The distance to move the object. It could be a 2D/3D vector or Point2/Point3 in the Input category')
#OIP Controls
cases = ['Relative', 'Absolute']
case = Marionette.OIPControl( 'Location', Marionette.WidgetType.RadioButton, 0, cases)
case.SetDescription('an OIP control representing the casing options for the input string.')
#Output Ports
output = Marionette.PortOut('itemOut')
output.SetDescription('The result')
#BEHAVIOR
def RunNode(self):
#inputs
d = self.Params.d.value
i = self.Params.input.value
cases = self.Params.cases
case = self.Params.case.value
#script
if type(i) is tuple:
if len(i) == 3:
o = [0,0,0]
o[0] = i[0] + d[0]
o[1] = i[1] + d[1]
o[2] = i[2] + d[2]
else:
o = [0,0]
o[0] = i[0] + d[0]
o[1] = i[1] + d[1]
out = tuple(o)
else:
planar = Marionette.Is2DObject(i)
if not planar:
if cases[case] == 'Relative':
if len(d) == 2:
d = [d[0], d[1], 0]
vs.Move3DObj(i, d[0], d[1], d[2])
if cases[case] == 'Absolute':
objCent = vs.Get3DCntr(i)
vs.Move3DObj(i, d[0] - objCent[0][0], d[1] - objCent[0][1], d[2] - objCent[1])
else:
if cases[case] == 'Relative':
vs.HMove(i, d[0], d[1])
if cases[case] == 'Absolute':
pt = vs.HCenter(i)
vs.HMove(i, d[0] - pt[0], d[1] - pt[1])
out = i
#outputs
self.Params.output.value = out
"""
それでは上記のノード4を付け加えてx軸方向に1820mm、y軸方向に600mm相対的に移動するようにしたビジュアルスクリプティング(Vectorworks Marionette Network)を罫線を使って表現してください。
ChatGPT
ノード1: Dim
│
└───> [Dim: 910mm] ──> ノード2: Create Rectangle
│
├───> [p: 原点]
├───> [nWidth: 910mm]
├───> [nHeight: 910mm]
├───> [vRot: 向き]
│
└───> [hRect: 四角形オブジェクト] ──> ノード3: Extrude
│
├───> [hObj: 四角形オブジェクト]
├───> [nTop: 910mm]
├───> [nBot: 0mm]
│
└────> [hObj: 立方体オブジェクト生成] ──> ノード4: Move
│
├───> [itemIn: 立方体オブジェクト]
├───> [vOffset: (1820mm, 600mm, 0mm)]
│
└────> [itemOut: 移動後の立方体オブジェクト]
この表現では、ノード1からノード4へのデータの流れが示され、各ノードの入力と出力が明確に示されています。最終的に、ノード4によって立方体オブジェクトが指定された距離だけ移動されるプロセスが可視化されています。
User
"""ノード5
#COMMAND;READONLYREFFILE;[VWLibDef]/Points\Get XYZ.py;
#Modified by MFarrell Nov 2018
@Marionette.NodeDefinition
class Params(metaclass = Marionette.OrderedClass):
#APPEARANCE
#Name
this = Marionette.Node( "Get XYZ" )
this.SetDescription( 'Return the x, y, and z components of a point or vector.' )
#Input Ports
pt = Marionette.PortIn( (0,0,0), 'p' )
pt.SetDescription('A 3D point or vector')
#OIP Controls
#Output Ports
x = Marionette.PortOut('nX')
x.SetDescription('The x coordinate of p')
y = Marionette.PortOut('nY')
y.SetDescription('The y coordinate of p')
z = Marionette.PortOut('nZ')
z.SetDescription('The z coordinate of p')
#BEHAVIOR
def RunNode(self):
#inputs
p = self.Params.pt.value
#script
#outputs
self.Params.x.value = p[0]
self.Params.y.value = p[1]
self.Params.z.value = p[2]
"""
ノード4: Moveの入力ポート( [vOffset: (1820mm, 600mm, 0mm)])に入力するためのノード5を上記のように用意しました。これを付け加えてビジュアルスクリプティング(Vectorworks Marionette Network)を罫線を使って表現してください。
ChatGPT
ノード1: Dim
│
└───> [Dim: 910mm] ──> ノード2: Create Rectangle
│
├───> [p: 原点]
├───> [nWidth: 910mm]
├───> [nHeight: 910mm]
├───> [vRot: 向き]
│
└───> [hRect: 四角形オブジェクト] ──> ノード3: Extrude
│
├───> [hObj: 四角形オブジェクト]
├───> [nTop: 910mm]
├───> [nBot: 0mm]
│
└────> [hObj: 立方体オブジェクト生成] ──> ノード4: Move
│
├───> [itemIn: 立方体オブジェクト]
├───> [vOffset: (1820mm, 600mm, 0mm)]
│
└────> [itemOut: 移動後の立方体オブジェクト]
ノード5: Get XYZ
│
└───> [pt: (0,0,0)]
│
├───> [nX: x座標]
├───> [nY: y座標]
└───> [nZ: z座標] ──> [vOffset: (1820mm, 600mm, 0mm)] ──> ノード4: Move
この表現では、ノード5が座標の個別の要素(x, y, z)を抽出し、それらをノード4の入力ポート「vOffset」に提供するプロセスを示しています。ノード5の出力がノード4の入力要件に合わせて調整されており、ビジュアルスクリプティングの流れが明確になっています。
User
ノード5は間違えました。
下記のノード5に訂正します。
もう一度罫線を使ってビジュアルスクリプティング(Vectorworks Marionette Network)を表現し直してください。
"""ノード5
#COMMAND;READONLYREFFILE;[VWLibDef]/Points\Point 3D.py;
#Modified by MFarrell May 2017
@Marionette.NodeDefinition
class Params(metaclass = Marionette.OrderedClass):
#APPEARANCE
#Name
this = Marionette.Node( "Point 3D" )
this.SetDescription('Create a 3D point from x,y,z values')
#Input Ports
x = Marionette.PortIn( 0, 'nX' )
x.SetDescription('A value representing the distance from the origin along the x axis')
y = Marionette.PortIn( 0, 'nY' )
y.SetDescription('A value representing the distance from the origin along the y axis')
z = Marionette.PortIn( 0, 'nZ' )
z.SetDescription('A value representing the distance from the origin along the z axis')
#OIP Controls
#Output Ports
pt = Marionette.PortOut('p')
pt.SetDescription('A 3D point')
#BEHAVIOR
def RunNode(self):
#inputs
x = self.Params.x.value
y = self.Params.y.value
z = self.Params.z.value
#script
#outputs
self.Params.pt.value = ( x, y, z )
"""
ChatGPT
ノード1: Dim
│
└───> [Dim: 910mm] ──> ノード2: Create Rectangle
│
├───> [p: 原点]
├───> [nWidth: 910mm]
├───> [nHeight: 910mm]
├───> [vRot: 向き]
│
└───> [hRect: 四角形オブジェクト] ──> ノード3: Extrude
│
├───> [hObj: 四角形オブジェクト]
├───> [nTop: 910mm]
├───> [nBot: 0mm]
│
└────> [hObj: 立方体オブジェクト生成] ──> ノード4: Move
│
├───> [itemIn: 立方体オブジェクト]
└───> [vOffset: (1820mm, 600mm, 0mm)]
ノード5: Point 3D
│
├───> [nX: 1820mm]
├───> [nY: 600mm]
├───> [nZ: 0mm]
│
└───> [pt: (1820mm, 600mm, 0mm)] ──> [vOffset: (1820mm, 600mm, 0mm)] ──> ノード4: Move
ノード5はXYZ座標を入力して3Dポイントを生成し、その出力をノード4の「vOffset」に提供します。これにより、立方体オブジェクトが指定された距離と方向に移動します。
User
"""ノード6
#COMMAND;READONLYREFFILE;[VWLibDef]/Input\Real.py;
#Modified April 2017
@Marionette.NodeDefinition
class Params(metaclass = Marionette.OrderedClass):
#APPEARANCE
#Name
this = Marionette.Node( 'Real' )
this.SetDescription('A Real value defined in the OIP in document units')
#Input Ports
#OIP Controls
Real = Marionette.OIPControl( 'real', Marionette.WidgetType.Real, 0.0)
Real.SetDescription('A value in document units')
#Output Ports
r = Marionette.PortOut('n')
r.SetDescription('The value')
#BEHAVIOR
def RunNode(self):
#inputs
real = self.Params.Real.value
#script
#outputs
self.Params.r.value = real
"""
ノード6を使ってノード5の移動距離の数値入力(x,y,zの各値)に利用します。ノード6を加えてビジュアルスクリプティング(Vectorworks Marionette Network)を罫線を使って表現してください。
ChatGPT
ノード1: Dim
│
└───> [Dim: 910mm] ──> ノード2: Create Rectangle
│
├───> [p: 原点]
├───> [nWidth: 910mm]
├───> [nHeight: 910mm]
├───> [vRot: 向き]
│
└───> [hRect: 四角形オブジェクト] ──> ノード3: Extrude
│
├───> [hObj: 四角形オブジェクト]
├───> [nTop: 910mm]
├───> [nBot: 0mm]
│
└────> [hObj: 立方体オブジェクト生成] ──> ノード4: Move
│
├───> [itemIn: 立方体オブジェクト]
└───> [vOffset: (1820mm, 600mm, 0mm)]
ノード6: Real
│
└───> [real: 1820mm] ──> [nX: 1820mm] ──> ノード5: Point 3D
└───> [real: 600mm] ──> [nY: 600mm]
└───> [real: 0mm] ───> [nZ: 0mm]
│
└───> [pt: (1820mm, 600mm, 0mm)] ──> [vOffset: (1820mm, 600mm, 0mm)] ──> ノード4: Move
このビジュアルスクリプティングでは、ノード6を使用して移動距離の数値を指定し、それをノード5に渡して3Dポイントを生成します。その後、このポイントをノード4の移動オフセットとして使用して、立方体オブジェクトを指定された方向と距離に移動させます。
↓sample file (with_chatgpt.vwx)