# Create a solid extrusion from a polyline self-intersecting errors

I cant seem to set my rectangle to loft to be on the edge of the line in like the picture in my original post. So I cannot loft like you suggest,because my rectangle is centered on the sweep path.

You could try to use Rectangle.ByCornerPoints with Curve.StartPoint for the first point or move the profile with a Translate node:
http://dictionary.dynamobim.com/#/Geometry/Geometry/Action/Translate(geometry_Geometry-xTranslation_double-yTranslation_double-zTranslation_double)

I tried this and get the error message which I cant create the rectangle and dont know why.Please advise.

it appears that my rectangle is failing because dynamo cant figure out which point is the corner points and is drawing the rectangle in the wrong sequence. they polygon node show this well. Any ideas how to fix this? thanks!

Try to sort the list of points using List.SortByKey + Point.X / Point.Y / Point.Z as keys

@Yna_Db,
Ok, that sounds perfectly reasonable, but you will have to forgive me because I am afraid you are over estimating my dynamo skills. I cant tell you how many times I re-read the List.SortByKeys node definintion in the dynamo dictionary, and I still dont understand it. Do you think you can explain it in plain english please? I also dont understand how you are sorting with the points,here is what I have so far:

Sorry, I did not think about mentioning that: Point.X / Point.Y / Point.Z are nodes, see here:
http://dictionary.dynamobim.com/#/Geometry/Point/Query/X
A List.GroupByKey node could also be useful in the process:

Im sorry, I still dont understand what you are hinting at. What are you trying do exactly? I did what you did, but I just got failing nodes: Please explain.

I cannot right now, but see if this helps better:

This node seems cool. However, it seems to be dumping out one of the points for no reason which turns my would be rectangle in to a triangle.

I have found a there is a Point.PruneDuplicates Function that isn’t essential within that node. Thanks for the additional debug @mix. This was probably to eliminate corner point overlaps, but that can be done post processing with another node.

Try this one. It allows for start point to be defined for sorting the points.
Sastrugi - Sort Points as Perimeter.dyf (12.6 KB)

Also, here is an example of how you could use it…
RED=Original RECT Location
GREEN= Translated RECT Location

1 Like

Thanks! can you use this to sweep along two rails too?
Edit:
@Ewan_Opie
It doesnt seem to order things properly

This should fix it.
The node now takes into account the plane created by the points for radial sorting.
Sastrugi - Sort Points as Perimeter.dyf (15.2 KB)

Are you able to upload your .dyn so I can take a look at why?

Sorry for the late reply @mix I have been well and truly snowed under with project work.
I see that you have been having some problems with indexing, sorting points and planes (other recent forum posts)

I hope I am correct in assuming your workflow is to create a solid lofted through “profiles” along a reference curve. To create a pipe insulation zone or no-go clearance corridor for services. (please correct me if I am wrong)
The initial error of larger “profiles” not working due to intersections leads me to my first piece of advice, the parameters you are using to create your reference curve may not allow for this to ever successfully be done with a uniform “profile” You may want to interrogate your minimum curve radius for the service runs you have created, or simplify the “corridor” curve to eliminate there choke points.

My second piece of advice is around script formatting. As you develop your workflows, for your own clarity and the clarity of others trying to assist, try to group processes into segments to clarify what different areas of your script are doing. The reference DYN you uploaded was a little tricky to follow…

Lastly, may I suggest an alternative workflow. Rather than lofting by more than one curve (as this works quite well for this workflow), perhaps you could just adjust the position of the “profiles” on their reference plane on curve, to achieve the differential offsets you require?

I have attached the DYN of this test script so you can have a look at what I am suggesting. (Try feeding the different input options (in blue group) into the input node opposite and see what you get)
(D1.3) Loft Rectange Along Conduit.dyn (46.1 KB)

Hope this was of some help.