Fix some casting logic

This commit is contained in:
Thomas Krijnen
2021-09-13 13:19:56 +02:00
parent 99a27fbfef
commit 1058dc7099
14 changed files with 2806 additions and 2807 deletions
+3 -3
View File
@@ -429,8 +429,8 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcObjectPlacement* l, gp_Trsf& t
for (;;) {
gp_Trsf trsf2;
IfcSchema::IfcAxis2Placement* relplacement = current->RelativePlacement();
if ( relplacement->declaration().is(IfcSchema::IfcAxis2Placement3D::Class()) ) {
IfcGeom::Kernel::convert((IfcSchema::IfcAxis2Placement3D*)relplacement,trsf2);
if (relplacement->as<IfcSchema::IfcAxis2Placement3D>()) {
IfcGeom::Kernel::convert(relplacement->as<IfcSchema::IfcAxis2Placement3D>(),trsf2);
trsf.PreMultiply(trsf2);
}
if ( current->PlacementRelTo() ) {
@@ -444,7 +444,7 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcObjectPlacement* l, gp_Trsf& t
if ( parentPlacesType ) break;
else if ( parent->declaration().is(IfcSchema::IfcLocalPlacement::Class()) )
current = (IfcSchema::IfcLocalPlacement*)current->PlacementRelTo();
current = current->PlacementRelTo()->as<IfcSchema::IfcLocalPlacement>();
else break;
} else break;
}