Jump to content

node example for filling an area with symbols


Recommended Posts

Normally, an int will be automatically converted to a real value if necessary. So this should not be your problem. I don't see your script but I can imagine the problem is to repeat different angle values for the number of your symbols. You can make this by repeating one of the inputs of your angle generator (random number as example)

 

A good start is to just check it step by step. As example connect an int to the angle and look what happens. Then you connect a real value and look again what happens. You will see, there is no difference between the input. But If you have a hundred symbols, and just input one value to the angle, all symbols will be rotated to the same angle. Use the debug mode (bug method) to see, if all wires have the same number of values.

 

Another Issue could be, the Rotate-Node detects your symbol as a 2D Object. So you cant make a 3D Rotation. Maybe you have 2D/3D Symbols? Just post a part of your example, because it's hard to tell all possible issues on stock.

 

591164ea529c8_3DRotate.png.39e55a2c85297f2cc41c6256a41b4a86.png

Repeat Angle.png

symbol angles.vwx

Edited by DomC
  • Like 1
Link to comment

I got this script there I've done by working on your file. ( see attachment). ( hope you don't mind, let me know)

 

I succeeded on implementing the rotations. z axis for the symbol angle and a 3D rotate too.

I got some unstabilities but it doesn't bother me as it's just a work in progress. I plan to do some kind of ivy leaves.

 

I noticed your script is not really efficient for near vertical surfaces, cos the symbols are put using a x,y pattern, I think I got a way to avoid it. ( by turning an the control surface to be near horizontal before executing the script, then get it back where it was.)... not so neat but efficient I think.

 

I plan to work on a way to execute this script in a volume ( a 3D grid to replace the 2 grid you used). I thought of building a 3D grid of 3Dloci according to the control object dimensions, and put a symbol on each 3Dloci. but I can't find a good way to see if a loci is inside or outside a 3D volume.... I thought of trying a boolean on each loci but it seems senseless.

 

Got to go now to a more money productive work. See ya.

 

Thanks for your help.

 

Untitled 26 copie.vwx

Edited by mattao
Link to comment

Hello,

 

Sorry for this probably stupid question but... How using this wonderfull script in an other file?

I tried to "export scrit" and import in an other file but, i've un error each time.

 

In fact, i wonder in general how to transform a marionette in script...

 

Thanks ;-)

 

Link to comment
1 hour ago, Jab_be said:

Hello,

 

Sorry for this probably stupid question but... How using this wonderfull script in an other file?

I tried to "export scrit" and import in an other file but, i've un error each time.

 

In fact, i wonder in general how to transform a marionette in script...

 

Thanks ;-)

 

It's not easy... but not so hard

 

You've got to copy the marionette object to use it AND the folder it's linked to. The marionette object call for a folder ( like the Baume folder in some of the DomC provided files). Copy the folder first... then the marionette object, otherwise it call an inexistent folder and crash.

 

On my files I succeed in linking the marionette object to other folders containing other symbols AND modifying the marionette object "control geometry" to be as needed.

I"ve succesfully obtain "foliage like" effects by doing so

 

Please pardon my english ... i am not very fluent in these language

Edited by mattao
Link to comment
  • Vectorworks, Inc Employee
On 5/16/2017 at 6:24 PM, Jab_be said:

 

Sorry for this probably stupid question but... How using this wonderfull script in an other file?

I tried to "export scrit" and import in an other file but, i've un error each time.

 

 

Hello @Jab_be,

 

If you want to save a Marionette script to use in another file, the easiest way is to wrap the network, select the wrapper and go to Modify -> Create Symbol... and make sure that "Convert to Plug-In Object" is checked. Now your network is a Plug-In Object in your document and you can import it into another document just like any other Plug-In Object.

  • Like 2
Link to comment
  • 2 years later...

Im trying to modify the node, so the marionette is also able to scale the symbols. The new node works fine as long as i don't use it with symbols that contain image-props. When i use them the texture is not scaled. As a workaround i can duplicate the marionette object. As soon as i delete this duplicate all the textures are scaled correctly in the original marionette object. It's like they redraw when i delete the duplicate. I also had this issue with image props within scaled symbols in a converted file from vw2018. I suspect that something with the display of image probs in scaled symbols is not yet correct.

Here is a sample file of the marionette object:

fill area with scaled symbols.vwx

I also tried to implement the workaround into the marionette-node. When i use this script on a symbol with an image-prop inside it reproduces the issue.

hSym = vs.GetObject('test')
vs.SetObjectVariableInt(hSym, 101, 2)
vs.SetObjectVariableReal(hSym, 102, 10)

When you add these two lines. It works correctly.

hSym = vs.GetObject('test')
vs.SetObjectVariableInt(hSym, 101, 2)
vs.SetObjectVariableReal(hSym, 102, 10)
hDel=vs.HDuplicate(hSym,0,0)
vs.DelObject(hDel)

Unfortunately these two lines don't solve the problem inside the marionette-object.

Any help is very welcome.

Link to comment
  • 2 months later...
  • 1 year later...
  • 3 years later...

hello , 

 

thank you for this, this came in very helpful in my case. i have 2 questions though:

 

1) is there a way to specify a number of scattered symbols? 

2) after execution, is there a way to convert it back to independent symbols? in my case, I would like to export the used lighting symbols to MVR

 

Thank you DomC

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...