Dear all,
I hope you are all doing very well. I am trying to set the following using dynamo
I have a new DWG file with one polyline projected in the DWG as a square shape.
I tried to create a script in dynamo to offset the polyline to 5 polylines in the positive direction and 5 in the negative direction ( left and right). I was able to create this script with the node-number, but I was unable to create the same script with Slider ( I always get many overlapped polylines). Is there a solution to that?
I was also trying to give these offset polylines different elevations by creating another Dynamo script, I tried to use Objectextension.GetParameters node connected to Dictionary.ValueAtKey to collect all the polylines elevations and tried to use List.Chop to have each polylines elevation separately so that I can modify that, but unfortunately, I couldn’t find a suitable solution.
Any suggestion or help is very appreciated, and thankful for your tips and helps.
I wish you a nice day, and thanks for your support
Kindly regards
Salwan
OffsetPolyLineandAddPolylines ElevationsScript.dyn (47.2 KB)
Hi
I didn’t see the dynamo file can you look at this can help you
Dear Alaa,
Thank you for the quick replay I will check Paulos e-mail and see if that could help
Thanks a lot
Hi @S.Abbosh,
I would recommend a slightly different thought process. Instead of offsetting the polyline using the PolylineExtensions.Offset node and then trying to modify the elevations afterwards, I would do it like this:
- Get the Dynamo geometry from the polyline (Object.Geometry node)
- Offset and elevate the polycurves (Curve.Offset or PolyCurve.Offset and then Geometry.Transform might help)
- Output the polycurves as polylines in AutoCAD (PolylineExtensions.ObjectByGeometry node)
1 Like
@zachri.jensen,
Thank you so much for the quick reply. I will try what you described here above and will let you know. I very much appreciate your time and your tip.
@zachri.jensen
Dear Zach,
I hope you are doing fine. Thanks for your tips! I was able to realize in a simple way what I was looking for. I am sure there are many better ways to build such a script, but I am on my skills development path. If you have time, please look at the attached script, and I would be grateful if you could provide some feedback.
One point to add, I have created this script to learn how the polylines will interact when they add to the TIN-Surface as contours. The first thing that comes out is! As far as I change the axis-Slider of the offset polylines! The TIN Surface removes all these Polylines as contours and drops its elevation to zero. Is there any explanation for that?
23092022_C3D_Offset Polyline and Adjust ZAxis of each Polyline.dyn (70.6 KB)
I liked your webinar-29 very much with @jacob.small because it was precisely the answer to my questions about learning Python. Thanks again for everything, and I want to wish you a very nice day.
Kindly regards
Salwan
1 Like