SthavyaK Posted April 16, 2024 Share Posted April 16, 2024 Hello, I have hardscape area and want to randomly stagger the tiles (3-5 tile width but same height) along the hardscape. While working with Marionette and going through the library I cam across "Tiles by Computer Works" but that particular wrapper is still repeating an existing layout of the tiles. Is there any script or marionette link I could use to randomize the tiles? Attaching the snapshot to show a small patch with 4 tile sizes but I need this to come in random so that the joint between the tiles are not repeated. We have been doing this manually or using the Tiles by Computer works but it has been rejected by the main designer due to repetition of joints. TIA Quote Link to comment
michaelk Posted April 16, 2024 Share Posted April 16, 2024 I tried making a quick plug in object that will do something very close to what you are trying to do. Really interesting problem. Does this get close? Random Tile.vso 1 Quote Link to comment
SthavyaK Posted April 17, 2024 Author Share Posted April 17, 2024 Hi MickaelK, 13 hours ago, michaelk said: I tried making a quick plug in object that will do someone very close to what you are trying to do. Really interesting problem. Does this get close? Random Tile.vso 11.29 kB · 2 downloads Yes this looks good. Sorry how did you do it? I am relatively new to VW. Also is the .vso attachment consisting only the image? Quote Link to comment
michaelk Posted April 17, 2024 Share Posted April 17, 2024 The .vso attachment is a plug-in tool. You can install it in your workspace and it runs like any other tool. It lets you draw an area and it fills in with random rectangular tiles using the settings in the OIP for tile size and grout size. When you change the size of the area it just updates. In the image you can see the handles showing the adjustable size of the area to be filled and the settings in the OIP. My thinking was one could use it to get a pattern you liked then convert it to a group and trim away to make if fit the hardscape area. I'm sure there is a cooler way. Maybe draw the exact polygon, but then how do you set the angle of the tiles? This is just a quick test to see if I could generate random tile layouts using 2 to 5 tile widths. I like to do things like this on flights instead of actual work and I had a 2 hour flight yesterday. That's enough time to test this idea, but not enough to make a hardscape path that turns corners 🙂 To install the .vso: Vectorworks > Preferences > User Folders tab > Reveal in Finder This will open up your user folder in the finder. Look for the plug-in folder. Put the .vso file in the plug-ins folder. Restart Vectorworks. Tools > Workspaces > Workspaces… You will see a list of all the workspaces you have. One will be hightlighted and have a checkmark. Duplicate that one. Put the checkmark next to the new duplicate. Edit the duplicate. Give the workspace a meaningful name. I like to use the basic workspace it's based on followed by the date. So it might be Architect 24 1 2 or Landmark 24 5 6. Click on the Tools Tab. On the left side will be all the tools you could be using and many that you are using. On the right are tool palettes. You will see Basic and Tool Sets. Open up Tool Sets and you will see Dims/Notes and Building Shell and Site Planning, etc. Those correspond to the tool sets you are used to seeing in the tool palette. On the left column look for a folder called MK Commands. In there you will find Random Tiles. Drag Random Tile to be inside of one of your tool palettes on the right side. Be careful that you don't set it as a "Sub Tool". If the new tool is offset to the right in the list drag it up or down and move a little left so it lines up with all the other tools. Click OK Now Random Tiles will be a tool in whatever tool set you picked. Click on the tool and draw a rectangle. The first time it runs it will put up a dialog to confirm default settings. Ignore that. Now you have a rectangle with random tiles. Play around with the settings until you get something useful. Post back if you have any problems installing the .vso or using the tool 🙂 1 Quote Link to comment
SthavyaK Posted April 18, 2024 Author Share Posted April 18, 2024 20 hours ago, michaelk said: The .vso attachment is a plug-in tool. You can install it in your workspace and it runs like any other tool. It lets you draw an area and it fills in with random rectangular tiles using the settings in the OIP for tile size and grout size. When you change the size of the area it just updates. In the image you can see the handles showing the adjustable size of the area to be filled and the settings in the OIP. My thinking was one could use it to get a pattern you liked then convert it to a group and trim away to make if fit the hardscape area. I'm sure there is a cooler way. Maybe draw the exact polygon, but then how do you set the angle of the tiles? This is just a quick test to see if I could generate random tile layouts using 2 to 5 tile widths. I like to do things like this on flights instead of actual work and I had a 2 hour flight yesterday. That's enough time to test this idea, but not enough to make a hardscape path that turns corners 🙂 To install the .vso: Vectorworks > Preferences > User Folders tab > Reveal in Finder This will open up your user folder in the finder. Look for the plug-in folder. Put the .vso file in the plug-ins folder. Restart Vectorworks. Tools > Workspaces > Workspaces… You will see a list of all the workspaces you have. One will be hightlighted and have a checkmark. Duplicate that one. Put the checkmark next to the new duplicate. Edit the duplicate. Give the workspace a meaningful name. I like to use the basic workspace it's based on followed by the date. So it might be Architect 24 1 2 or Landmark 24 5 6. Click on the Tools Tab. On the left side will be all the tools you could be using and many that you are using. On the right are tool palettes. You will see Basic and Tool Sets. Open up Tool Sets and you will see Dims/Notes and Building Shell and Site Planning, etc. Those correspond to the tool sets you are used to seeing in the tool palette. On the left column look for a folder called MK Commands. In there you will find Random Tiles. Drag Random Tile to be inside of one of your tool palettes on the right side. Be careful that you don't set it as a "Sub Tool". If the new tool is offset to the right in the list drag it up or down and move a little left so it lines up with all the other tools. Click OK Now Random Tiles will be a tool in whatever tool set you picked. Click on the tool and draw a rectangle. The first time it runs it will put up a dialog to confirm default settings. Ignore that. Now you have a rectangle with random tiles. Play around with the settings until you get something useful. Post back if you have any problems installing the .vso or using the tool 🙂 @michaelk You are a genius. Thank you very much. This worked perfectly for me. The only issue I am facing is when there are bends along the path. I did try dividing the curves to smaller portion but the bricks don't stitch(excuse my laser scan-point cloud language) right. Do you think I can edit this .vso or if you could help me with that? My other option is to do manual work along the curves. What do you suggest? Quote Link to comment
michaelk Posted April 18, 2024 Share Posted April 18, 2024 2 hours ago, SthavyaK said: The only issue I am facing is when there are bends along the path. I did try dividing the curves to smaller portion but the bricks don't stitch(excuse my laser scan-point cloud language) right. Do you think I can edit this .vso or if you could help me with that? My other option is to do manual work along the curves. What do you suggest? Yeah, I was afraid of that :-). This plug-in is set up as a rectangular object. It could be set up as a path object, but the vector math gets much more complicated. And at every radius some tiles have to be drawn as non rectangles. But I think it can be done. I don't have time to do it at the moment. (And I have a bunch of plug-ins I'm making for my own work that are almost done and need some attention) I'll post the code here if you want to play around with it. Procedure RandomBricks; {Badly Scripted by Michael Klaers.} {April, 2024 Seattle WA} VAR objHd,recHd,wallHd : HANDLE; tempH1, tempH2 : HANDLE; boolResult, resultStatus : BOOLEAN; RowCounter : INTEGER; RandRectWidth, DrawHereX, DrawHereY, RowOffset : REAL; objName, RecName, FieldName, testClass, RadioButtonResult : STRING; {****************************** Pick A Brick Width *************} PROCEDURE PickABrick; VAR BrickNum,RandoI : INTEGER; RandoR : REAL; BEGIN BrickNum := TRUNC(Str2Num(pNumBrickSizes)); RandoR := Random; RandoI := TRUNC(RandoR*BrickNum)+1; CASE RandoI OF 1 : RandRectWidth := pBrickWidth1; 2 : RandRectWidth := pBrickWidth2; 3 : RandRectWidth := pBrickWidth3; 4 : RandRectWidth := pBrickWidth4; 5 : RandRectWidth := pBrickWidth5; END; {CASE} END; {****************************** Set an X Offset *******************} PROCEDURE OffsetX; BEGIN PickABrick; RowOffset := RandRectWidth/2; END; {****************************** Draw A Brick *******************} PROCEDURE DrawABrick; BEGIN RectangleN( DrawHereX,DrawHereY-pBoxWidth/2, 1,0, RandRectWidth,pBrickHeight); DrawHereX := DrawHereX + (pGroutwidth * 2) + RandRectWidth; END; {***** MAIN *****} {***** MAIN *****} {***** MAIN *****} BEGIN resultStatus := GetCustomObjectInfo(objName,objHd,recHd,wallHd); SetObjectVariableBoolean(objHd, 800, TRUE); {Makes text formattable} IF pUpdate THEN SetRField(objhd,GetName(recHd),'Update','FALSE'); OffsetX; RowCounter := 0; DrawHereX := pGroutwidth - RandRectWidth; DrawHereY := pGroutwidth; RectangleN( 0,(0-(pBoxWidth/2)), 1,0, pLineLength,pBoxWidth);} WHILE DrawHereY <= pBoxWidth DO BEGIN While DrawHereX - RandRectWidth <= pLineLength DO BEGIN PickABrick; DrawABrick; END; {X Loop} RowCounter := RowCounter + 1; DrawHereY := DrawHereY + pBrickHeight + pGroutwidth; OffsetX; DrawHereX := pGroutwidth - RandRectWidth; END; {Y Loop} END; RUN(RandomBricks); 1 Quote Link to comment
Recommended Posts
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.