DynamoDS / DynamoRevit

Dynamo Libraries for Revit
https://dynamobim.org
328 stars 184 forks source link

Issues with retrieving element geometry from FaceWalls #1960

Open andydandy74 opened 6 years ago

andydandy74 commented 6 years ago

Dynamo version

2.0.0.4385 (Core) / 2.0.0.4386 (Revit)

Revit version

2017.2.3 / 2018.2

Operating system

Windows 7 / Windows 10

What did you do?

Try to retrieve the geometry from a couple of FaceWalls grafik

What did you expect to see?

Dynamo solids

What did you see instead?

No solids. Revit solids can't seem to be converted. grafik

andydandy74 commented 6 years ago

File here: https://www.dropbox.com/s/53l5hs5p1q1ng3k/1960_FaceWallGeometryIssues.zip?dl=0

mjkkirschner commented 6 years ago

do you happen to know what type of surfaces these are? do you have any luck selecting individual faces to find out which face causes the problem? I bet it's the curved one ;)

thanks for the upload.

andydandy74 commented 6 years ago

grafik I'd need to dig and see if I still have a file that has the masses. But if I recall correctly: 1 was a ruled surface based on two lines 2 was a blend of two arc profiles 3 was a simple extrusion of an arc profiles

andydandy74 commented 6 years ago

Only the two horizontal faces of wall 3 are okay. All other faces throw the following warning:

Warning: One or more geometries have failed to convert due to this error: trim_with_edge_loops requires all curves to touch surface
dimven commented 6 years ago

What I find annoying is that even if you go on rebuilding this face by face, tessellating the ones that fail, you'll still not be able to merge the resulting faces back into a solid: revit_2018-03-19_17-43-22

Rebuilding the geometry from scratch every time is both costly and finicky. There's been multiple issues reported over the years with little or no progress on remedying them:

https://github.com/DynamoDS/DynamoRevit/issues/1073 https://github.com/DynamoDS/DynamoRevit/issues/1437 https://github.com/DynamoDS/DynamoRevit/issues/1470 https://github.com/DynamoDS/Dynamo/issues/3679 https://github.com/DynamoDS/Dynamo/issues/6394

Whenever I need to handle geometry in Dynamo, I end up spending more time trying to think of workarounds than doing actual work. Going forward, what's the overall plan about the geometry exchange between Revit and Dynamo? Seems like you've hit the limit of what's currently possible, because the API doesn't provide sufficient information to rebuild the faces robustly.

Would it be possible to just get rid of the conversion processes and read/write the geometry natively? Apparently both Revit & Dynamo are on the same geometry kernel and the Revit team should be able to assist you with all kinds of internal hooks. If you'd prefer not to expose those to the public, wrap the exchange process in some obfuscated internal method and call it a day. Not doing anything will just cement people's opinion that Dynamo is just more trouble than it's worth for any complex geometric workflows.

andydandy74 commented 6 years ago

Here's an another example. The attached family contains four solids, yet only two of them make it into Dynamo. MissingSolids.zip

ksobon commented 6 years ago

@dimven I don't think that Revit and Dynamo are on the same geometry kernel. I was under the impression that Revit uses Solids and has it's own geometry engine that is different from Dynamo's. @kronz am I wrong here?

dimven commented 6 years ago

My humble understanding is that both use ASM (called libG, Alias or whatever internally) as the basis. I imagine each would have their own wrapper around the core classes of that library. But even if Dynamo adds newer extensions to that core library, it might still be able to unwrap to the internal base class, pass that on to Revit and let Revit handle it, or vice versa.

kronz commented 6 years ago

Dynamo uses a different Geometry kernel from the kernel for creation of "real" Revit element geometry. Revit's geometry tools are optimized around the particular things that Revit does well (handling tons of wall intersection events, making roof extrusions, etc). Dynamo uses a generalized Solids and surface modeling tool (ASM) that Revit uses for certain import/export operations, and is used by a bunch of other Autodesk products. When making Dynamo geometry out of Revit geometry, there is a conversion step, and there are still a few existing edge condition shapes that we have trouble rebuilding in Dynamo.