speckle-sharp icon indicating copy to clipboard operation
speckle-sharp copied to clipboard

Revit: RevitExtrusionRoof implementation is not complete

Open AlanRynne opened this issue 4 years ago • 1 comments

Currently we have 3 types of Roofs in the object model, but only one of them actually works as expected in Revit (RevitFootprintRoof). Also, the object model doesn't reflect all of the posibilities that Revit allows.

The RevitExtrusionRoof does have a conversion method for ToSpeckle and ToNative, but both of them have issues:

Proposed changes:

SpeckleExtrusionRoof: Revit allows for an extrusion roof's profile to be a polycurve composed of lines and arcs. Our object model just allows for a single line as the profile curve, ignoring the rest.

  • [ ] Add support for polycurve profiles and restrict object model to just arcs and lines
  • [ ] Possibly add the workplane's Plane as a property to not have to do any guesswork in ToNative().

ToSpeckle:

  • [ ] The profile curve that is being generated is wrong. We currently save as the profile a line representing the X Axis of the workplane the curve was drawn. As specified above, it should be a List<Curve> where we can restrict it to being only Line and Arc curves.

https://github.com/specklesystems/speckle-sharp/blob/745b3d9bb4694b88fec722be7d7d92859fc74459/Objects/Converters/ConverterRevit/ConverterRevitShared/Partial%20Classes/ConvertRoof.cs#L175-L176

To Native:

The entire RoofToNative implementation needs to be rethought as it has some logical weirdness.

  • [ ] RevitExtrusionRoof conversion has no way of being executed, as the first thing we do is check for the outline being null. And since this type of roof has no outline, execution stops there:

https://github.com/specklesystems/speckle-sharp/blob/745b3d9bb4694b88fec722be7d7d92859fc74459/Objects/Converters/ConverterRevit/ConverterRevitShared/Partial%20Classes/ConvertRoof.cs#L20-L22

AlanRynne avatar Oct 13 '21 07:10 AlanRynne

Adding this here as it's all Roof related, and I'll close #1127 👇🏼

Using the beloved Revit Sample House model:

Sending and receiving the top-roof causes the values for start and end of extrusion to be flipped.

It is unclear if the flip happens on sending or on receiving, as the displayMesh is actually correct I'm assuming it's a receiving problem.

AlanRynne avatar May 17 '22 10:05 AlanRynne

@connorivy let's check if this is still an issue. If not, this can be closed.

paloknapo avatar Jun 22 '23 08:06 paloknapo

Closing for now, roof elements will be received as direct shapes

teocomi avatar Jul 17 '23 12:07 teocomi