I am trying to offset an imported line from a DWG. I have to use the PolyCurve.ByJoinedCurves to turn this into an Polycurve, or else I get many start and end points on the line since the line in the DWG gets read as multiple lines.
I have read a few other posts about how to minus offset an polyline, but haven’t gotten it to work. Does anyone know a solution for this? Any help will be greatly appreciated!
Try sweeping a profile along the path as a first thought. You may need a few profiles to keep orientation. Offsetting the rail vertically may help too.
Working directly in the DWG is also an option via Dynamo for Civil or the linkDWG package.
It may also help to move to a newer Dynamo (ie 2.14) as there are better offset nodes there.
Did you try with the DWG linked in? Doing it this way did not work for me.
you need points as imput ! can you extract the starpoints from the lines it should work @SeGra
I appreciate your help, but this isn’t working when using the DWG. Offsetting it one way works perfectly fine, but the other way causes all types of problem. In the main script I’m working on, I am able to offset it by 800mm, but any further than that and it won’t work.
Here’s another picture of it “almost” working up to -800mm. Any more than that and it won’t work.
You can see I am only getting only 1 curve back from the - offset, while I’m getting 21 curves back from the positive offset.
As you offset a curve the convex side starts to reduce; what you appear to have happening is that the convex side is producing a situation where the curve cannot be drawn; in a case like this forcing a sweep may be your best bet to get a result, but that can fail as well. Try segmenting the curve into two or three sets to ID which curves are failing, as that may help you resolve the geometry.
Thank you for all your guys help! I solved it by using Curve.StartPoint to Polycurve.ByPoints after offsetting the line. This isn’t ideal because I get more unrelevant points on the line, but works.
In this photo the centerline is Polycurve.ByJoinedCurves and the offset lines are Polycurves.ByPoints (+ some tangents to rotate the objects)