Skip to content

Commit 55f3d9e

Browse files
committed
support elevator landing doors as family type door
1 parent c62eb33 commit 55f3d9e

2 files changed

Lines changed: 23 additions & 9 deletions

File tree

src/OpenCOVER/plugins/hlrs/Revit/Elevators.cpp

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,22 @@ Elevator::Elevator(int id, const char *Name, const std::string &evn)
3030
ID = id;
3131
name = Name;
3232
elevatorName = evn;
33+
cabin = nullptr;
3334
}
3435
bool Elevator::update(osg::Vec3 &viewerPosition)
3536
{
36-
37-
if ((cabin->isIdle()))
37+
if (cabin)
3838
{
39+
if ((cabin->isIdle()))
3940
{
40-
// tell it to move to next stop
41-
cabin->moveToNext();
41+
{
42+
// tell it to move to next stop
43+
cabin->moveToNext();
44+
}
45+
return false;
4246
}
43-
return false;
47+
cabin->update(viewerPosition);
4448
}
45-
cabin->update(viewerPosition);
4649
for (auto &landing : landings)
4750
{
4851
if (landing != NULL)

src/OpenCOVER/plugins/hlrs/Revit/RevitPlugin/OpenCOVERPlugin/COVER.cs

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2072,12 +2072,23 @@ private void SendElement(GeometryElement elementGeom, Element elem)
20722072
isGeometryInstance = true;
20732073

20742074
}
2075-
2076-
if (elem.Category != null && elem.Category.Id.Value == (int)BuiltInCategory.OST_SpecialityEquipment)
2075+
bool isElevatorDoor = false;
2076+
if ((fi != null) && elem.Category.Id.Value == (int)BuiltInCategory.OST_Doors && !isGeometryInstance)
20772077
{
2078+
ParameterSet para = fi.Parameters;
2079+
foreach (Parameter p in para)
2080+
{
2081+
if (p.Definition.Name == "elevatorName")
2082+
{
2083+
isElevatorDoor = true;
2084+
}
2085+
}
20782086

2087+
}
2088+
if (elem.Category != null && elem.Category.Id.Value == (int)BuiltInCategory.OST_SpecialityEquipment || isElevatorDoor)
2089+
{
20792090

2080-
string elevatorName = "noname";
2091+
String elevatorName = "noname";
20812092
ParameterSet para = fi.Parameters;
20822093
foreach (Parameter p in para)
20832094
{

0 commit comments

Comments
 (0)