Surface.ByPatch problem

Hi everyone!

I was trying to create a surface by a closed polycurve, but I don’t understand why the command doesn’t recognize the zigzag line and creates a surface with a rectangular base curve, like in the pics.

right codes

I hope what someone can help me, I think it shouldn’t be so complicated :grimacing:

That’s strange, because I tried with the same code blocks on the other side of my structure, and it works!
I thought that was a problem due to the lines order, so I ordered better the lines in the first case, but it gives me the same error…

left codes

to escape from this joke … you might use your polycurve and thickened it to be solid and take the required face from the solid.

I tried with Curve.ExtrudAsSolid, but it gave me the same problem…

Hello @andreacolombo6596 - Which version of Dynamo are you in?

We have fixed many bugs with the Geometry library in the past series of releases. As a case in point, this should be working now in Revit 2022 and Dynamo 2.10.1 as shown below:

Hi Solamour,
I’m using Revit 2020 and Dynamo 2.1.0… do you think that aren’t the versions updated enough?

Hi Andrea,

Are you able to share the graph you have so that I can test on my end?

Upon deeper investigation, I may just have re-created a similar test case that passes. We have fixes in the works that resolve issues with Surface.ByPatch, Curve.ExtrudeAsSolid and Solid.ByLoft that are scheduled to release with Revit 2022.1

Sure! the whole script, as you can see is quite long, but the important part is this:

Basically I created several differents adaptative points, I joined them into a polycurve with a polygonal shape.

Finally I patched the polycurve but that’s the result.

If you need some graph more, ask me without any problem.
Thank you for your availability.

Hi @andreacolombo6596, thanks for sharing those. I’ve tried to re-create and reproduce the problem you have.

So far, it doesn’t appear to be an issue with the make-up of your PolyCurves (PolyCurve, Line, NurbsCurve, Line), so probably something bespoke to your set-up - I just mocked something up quickly as I don’t have access to your graph or project :slight_smile:

Did you try @ingenieroahmad 's suggestion to thicken the PolyCurve?

1 Like

Yeah, I already tried, but without good results.
I think that’s a problem due to my revit and dynamo version, I’ll download the most updated.

1 Like

Well, I downloaded Revit 2022 with Dynamo 2.10.1, but the problem persists!

Screenshot (795)

I’ve tried both with ExtrudeAsSolid and ThickenSurface…but that’s the result.
That’s terrible, I don’t know hot to solve

Hello @andreacolombo6596 - Are you able to send me your files so I can try on my end? Without your set-up, it’s difficult to reproduce to try and help :slight_smile: I’ll direct message you.

1 Like

Sure Sol Amour, I’ll send you the revit file, the script and some explications to start it.

Here you are the We Transfer files:
The script is organized in this way:

  • the first group contains the variables, is not necessary that you change them;
  • the second group contains the input data, that are the wall edges on the rvt file. You have toc use this 4 code blocks from top to bottom, selecting the revit walls in this order 1-2-3-4

-The grey groups contains the operations. The panel named “jolly dx: organizzazione dei punti adattivi e creazione superficie” is where there’s the problem.

  • I deactivated the orange groups that contains the exportations of the geometries.
  • The other groups, aren’t important, they are just attempts.

If you need some explication more, contact me without any problem.
Thanks again for your availability.
Best regards,

Andrea Colombo

Hi, I looked at your file.
I noticed that you have a nurbs curve and a polycurve with points in different planes all joined together in the curve to patch and My guess is the patching node can’t use them to trim the surface once it’s done. Surface.ByPatch has worked best in my experience with coplanar curves. I would like to see what Sol has to say.
In the meantime:

You can use the nurbs curve and the Polycurve and loft them together.

1 Like

I tested it a step further and used Curve.Approximate… on the nurb. This seems to solve the patching problem and in this case the nurbs is approximated with only 3 arcs


Hi Viktor! Finally I solved, thanks a lot for the suggests, the two ways are both good.


Glad it helped. The geometry is a bit different between the two.