Autodesk / civilconnection

CivilConnection enables the exchange of information between Civil 3D, Dynamo and Revit.
94 stars 43 forks source link

Pipe.ByCurve DocumentTotalTransform Failed Error #36

Closed JoelvanHerwaarden closed 4 years ago

JoelvanHerwaarden commented 4 years ago

Which version are you using? Revit 2020, Dynamo 2.3, Civil Connection 4.04

What did you do? (Steps to reproduce) Tried making pipes from a bunch of lines Got the Pipe Type (All PipeTypes in Revit doc, filtered By name) Got the Pipe System Type (All PipeSystemTypes in Revit doc, filtered By name) Got a Level

  1. Plugged everything in and the Pipe.ByCurve Failed.
  2. Looked in the Log file of Civil Connection to see what happend:

Result is a warning: Pipe.ByCurve operation Failed

  1. This looks odd, I didn't use this Node in Dynamo --> Checked Source Code. The Pipe.ByCurve function uses this function (why? the curves don't need Translation)
  2. Checked the RevitUtils.DocumentTotalTransform Node in Dynamo. This doens't return anything (not even null...) Also no warnings/errors

What did you expect to happen? To create a bunch of pipes.

  1. I tried it with a template file, (Basepoint and Survey point both 0,0,0)
  2. drew a line and used the nodes again, everything worked fine.

Suggested Solution Remove the DocumentTotalTransform function from the Pipe.ByCurve node, because it is not helpful if the lines don't come from Civil and are already translated to Revit Coordinate System.

Also check what went wrong in the Document Total Transform function and Log the Errors.

PipeBuCurve

paoloemilioserra commented 4 years ago

@JoelvanHerwaarden thanks for reaching out. The MEP part is under major review. What happened is that there was a wrong call to dispose of the total transform. The Curve input is supposed to be derived from a Corridor Featureline, therefore in World Coordinate System, that is why the Total Transform is necessary to create the pipes in the Revit project local coordinates. Can you please try to not transform the geometry of the curve before.

JoelvanHerwaarden commented 4 years ago

And what if, in this instance, the curves are not derived from a corridor feature line? I should translate them away from the origin first and then use the node?

As you can see in the screenshot of the topic, I tried that with the Inverse Document Total Transform, made with OOTB nodes, because the RevitUtils.DocumentTotalTransform kept returning nothing. Now we are hitting a roadblock with one node, because another node doens't return anything. I had to close Revit and Dynamo and restart again to make it work.

I understand that the lines should be in WCS, but the why is still unknown, since I am not deriving the lines from Civil for now.

paoloemilioserra commented 4 years ago

The reason is because it was designed to create MEP curves following Corridor Featurelines, they are in WCS and I'm not going to change that. If restarting solved the issue confirms my assumption that the TotalTransform was disposed before.