marting Posted May 20, 2022 Share Posted May 20, 2022 Hello! I am looking for a script that converts two parallel lines into a VWX wall. see attached file. Thx for reply. sample.vwx Quote Link to comment
Pat Stanford Posted May 20, 2022 Share Posted May 20, 2022 Based on your sample, case 1 would be relatively easy, the questions would be since the lines are different lengths, what do you want the wall to do for the end condition. Case 2 is going to be much much harder. Since the lines are not specifically "linked" to each other, how to you know which lines should represent each side of the wall. The best option might be to make polys and then use the DoMenuTextByName to call the Create Objects from Polys. But having to calculate and set different wall thicknesses is going to be a challenge. In my opinion, a general purpose script to do this is a hundreds to thousands of programming hours to make it work with all the edge cases. So unless you are going to be doing this a lot or are planning to sell it, it is not an easy task. 1 Quote Link to comment
marting Posted May 21, 2022 Author Share Posted May 21, 2022 Hi Pat, Thanks for your good answer! The case 1 would be already very helpful, because it could be executed with a shortcut, i suggest to define the wall lenght according the shorter line; that way it can be joined always to the next wall... can you tell me which nodes are helpful? Thank you. case 2: i completely agree with you, it was just a dream ... i will do the "step by step method. I dont want to sell, it would be for everybody who converts DWG into VWX parametric 3D models. Have a nice WE! m Quote Link to comment
Pat Stanford Posted May 22, 2022 Share Posted May 22, 2022 Here is a starting point. This marionette object creates a wall with one side parallel to every line in the document. I am not sure how useful this will actually be as the walls will be on the wrong side of the lines in a lot of cases. The trick to this is that the top part of the marionette draws a wall centered on each line. The bottom calculated the vector perpendicular to the line and 1/2 of the wall thickness and moved the wall down and right by that amount so that one edge of the wall is collinear with the line. Try it and see what you think. Walls from lines.vwx Quote Link to comment
marting Posted May 22, 2022 Author Share Posted May 22, 2022 Dear Pat! Your file is very inspiring, thank you for this! since i am an very beginner in marionette it is a great help to start. Actually i was looking for the wall thickness defined by two lines, the shorter line is equivalent to the wall lengh. It wouldbe useful when we import a DWG drawing where wall are made from lines. With a shortcut command i would like to convert two lines into a parametric wall, the wall thickness automatically set up. so we could save a lot of mouseclicks... all the best, m Walls from lines.vwx Quote Link to comment
Pat Stanford Posted May 24, 2022 Share Posted May 24, 2022 I am going to wish you good luck on that. I don't even want to think about how to dig through a VW file and find the lines that are parallel and associate them together so you could set the proper wall thickness. I guess that might make it slightly easier to determine which "side" of the short line the wall should be on. But I can't think of an easy way to do that even in Vectorscrpt or Python, and the limitations of Marionette will make it even more challenging. If I had to do it I would probably get all of the lines and calculate their angles. Compare the first line to each with the same angle. Then figure out which of the ones that matched was closest. Use the distance between was the wall thickness. Good luck. 1 Quote Link to comment
marting Posted May 29, 2022 Author Share Posted May 29, 2022 Thank you very much, Pat! I will work on the reommendation you gave. I will let you know as soon i have a result. take care , martin 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.