speckle-sharp
                                
                                 speckle-sharp copied to clipboard
                                
                                    speckle-sharp copied to clipboard
                            
                            
                            
                        Revit: RevitExtrusionRoof implementation is not complete
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 Planeas 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 Axisof the workplane the curve was drawn. As specified above, it should be aList<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 outlinebeing 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
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.
@connorivy let's check if this is still an issue. If not, this can be closed.
Closing for now, roof elements will be received as direct shapes