Trouble creating sweeps in grasshopper

I am trying to learn and implement grasshopper. I have a ghpython code which creates a list of polylines ( polylines_collection) and have an ellipse which is transformed to be in perpendicular plane with each polyline. The I created a sweep1 block and I am inputing the polylines_collection (list) as an input for rail and transformed ellipse as section as shown in the figure. I am trying to understand and solve the error " Sweep could not be created". Thank you in advance.

Post a grasshopper file with internalised geometry.


Hi @Nava_Khatri ,

Assuming the rest of your logic is correct… Right click graft on both your Rail input and Section input of the Sweep1 component.

If your data matching is good and your profiles are oriented at each sweep rail line (as they appear to be) you should be good.

The generic error, when sweeping multiple rails and sections simultaneously usually is resolved by grafting as this puts a section profile and rail in the same branch of a data tree, ensuring each profile is only being swept on its matching rail. The component gets confused if not grafted because it’s trying to sweep each profile on each rail otherwise and obviously most of those profiles and rails won’t be aligned.

Does that make sense?

TLDR, graft your inputs on the Sweep 1 component


Thank you very much, this worked great.

1 Like

Great! You’re welcome