Skip to content

Commit cdbafac

Browse files
committed
Fix a bug in the order of applying the scaling of a IfcCartesianTransformationOperator3DnonUniform
Fix a bug in the formatting of IFC simple types Provide a way of iterating over all entities in the IFC file Added IFC test file by Ryan Schultz Added another IFC test file from AutoCAD Architecture 2010
1 parent 3bb008c commit cdbafac

File tree

7 files changed

+16321
-4
lines changed

7 files changed

+16321
-4
lines changed

src/ifcgeom/IfcGeomHelpers.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ bool IfcGeom::convert(const Ifc2x3::IfcCartesianTransformationOperator3DnonUnifo
186186
gtrsf.SetValue(1,1,scale1);
187187
gtrsf.SetValue(2,2,scale2);
188188
gtrsf.SetValue(3,3,scale3);
189-
gtrsf.Multiply(trsf);
189+
gtrsf.PreMultiply(trsf);
190190
CACHE(IfcCartesianTransformationOperator3DnonUniform,l,gtrsf)
191191
return true;
192192
}

src/ifcparse/IfcParse.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ ArgumentPtr EntityArgument::operator [] (unsigned int i) const { throw IfcExcept
444444
std::string EntityArgument::toString(bool upper) const {
445445
ArgumentPtr arg = entity->wrappedValue();
446446
IfcParse::TokenArgument* token_arg = dynamic_cast<IfcParse::TokenArgument*>(arg);
447-
std::string token_string = ( token_arg ) ? TokenFunc::asString(token_arg->token) : "";
447+
std::string token_string = ( token_arg ) ? TokenFunc::toString(token_arg->token) : "";
448448
std::string dt = Ifc2x3::Type::ToString(entity->type());
449449
if ( upper ) {
450450
for (std::string::iterator p = dt.begin(); p != dt.end(); ++p ) *p = toupper(*p);
@@ -807,6 +807,12 @@ void Ifc::LogMessage(const std::string& type, const std::string& message, const
807807
std::string Ifc::GetLog() {
808808
return log_stream.str();
809809
}
810+
MapEntityById::const_iterator Ifc::First() {
811+
return byid.begin();
812+
}
813+
MapEntityById::const_iterator Ifc::Last() {
814+
return byid.end();
815+
}
810816

811817
File* Ifc::file = 0;
812818
std::ostream* Ifc::log1 = 0;

src/ifcparse/IfcParse.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,8 @@ class Ifc {
228228
static std::ostream* log2;
229229
static std::stringstream log_stream;
230230
public:
231+
static MapEntityById::const_iterator First();
232+
static MapEntityById::const_iterator Last();
231233
static void SetOutput(std::ostream* l1, std::ostream* l2);
232234
static void LogMessage(const std::string& type, const std::string& message, const IfcAbstractEntityPtr entity=0);
233235
static IfcParse::File* file;

0 commit comments

Comments
 (0)