Skip to content

Commit ed85d36

Browse files
committed
Merge branch 'v0.7.0' into merge/upstream/v0.7.0
# Conflicts: # cmake/CMakeLists.txt
2 parents f2097b9 + 48f7053 commit ed85d36

File tree

3 files changed

+24
-10
lines changed

3 files changed

+24
-10
lines changed

src/ifcmax/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ LINK_DIRECTORIES(${LINK_DIRECTORIES} ${IfcOpenShell_BINARY_DIR} ${OCC_LIBRARY_DI
3333
ADD_LIBRARY(IfcMax_${max_year} SHARED IfcMax.h IfcMax.cpp)
3434

3535
# TODO: find the minimal subset of 3dsmax libraries to reference
36-
TARGET_LINK_LIBRARIES(IfcMax_${max_year} ${IFCOPENSHELL_LIBRARIES} Comctl32.lib zlibdll.lib bmm.lib core.lib CustDlg.lib edmodel.lib expr.lib
36+
TARGET_LINK_LIBRARIES(IfcMax_${max_year} ${IFCOPENSHELL_LIBRARIES} Comctl32.lib bmm.lib core.lib CustDlg.lib edmodel.lib expr.lib
3737
flt.lib geom.lib gfx.lib gup.lib imageViewers.lib ManipSys.lib maxnet.lib Maxscrpt.lib
3838
maxutil.lib MenuMan.lib menus.lib mesh.lib MNMath.lib Paramblk2.lib particle.lib Poly.lib RenderUtil.lib
3939
tessint.lib viewfile.lib ${OPENCASCADE_LIBRARIES}

src/ifcmax/IfcMax.cpp

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
#include "../ifcgeom_schema_agnostic/IfcGeomIterator.h"
2929
#include "../ifcgeom_schema_agnostic/IfcGeomMaterial.h"
30-
#include "../ifcgeom/IfcGeomElement.h"
30+
#include "../ifcgeom_schema_agnostic/IfcGeomElement.h"
3131

3232
static const int NUM_MATERIAL_SLOTS = 24;
3333

@@ -46,6 +46,11 @@ static class IFCImpClassDesc :public ClassDesc {
4646
void * Create(BOOL /*loading = FALSE*/) { return new IFCImp; }
4747
// TODO Delete() function?
4848
const TCHAR * ClassName() { return _T("IFCImp"); }
49+
50+
#if MAX_VERSION_MAJOR >= 24
51+
const TCHAR * NonLocalizedClassName() { return ClassName(); }
52+
#endif
53+
4954
SClass_ID SuperClassID() { return SCENE_IMPORT_CLASS_ID; }
5055
Class_ID ClassID() { return Class_ID(0x3f230dbf, 0x5b3015c2); }
5156
const TCHAR* Category() { return _T("Chrutilities"); }
@@ -230,9 +235,13 @@ int IFCImp::DoImport(const TCHAR *name, ImpInterface *impitfc, Interface *itfc,
230235
#endif
231236

232237
IfcParse::IfcFile file(fn_mb);
233-
IfcGeom::Iterator<float> iterator(settings, &file);
238+
239+
//IfcGeom::Iterator<float> iterator(settings, &file);
240+
241+
IfcGeom::Iterator* iterator = new IfcGeom::Iterator( settings, &file);
242+
234243
delete fn_mb;
235-
if (!iterator.initialize()) return false;
244+
if (!iterator->initialize()) return false;
236245

237246
itfc->ProgressStart(_T("Importing file..."), TRUE, fn, NULL);
238247

@@ -242,10 +251,12 @@ int IFCImp::DoImport(const TCHAR *name, ImpInterface *impitfc, Interface *itfc,
242251
std::map<std::vector<std::string>, Mtl*> material_cache;
243252

244253
do{
245-
const IfcGeom::TriangulationElement<float>* o = static_cast<const IfcGeom::TriangulationElement<float>*>(iterator.get());
254+
const IfcGeom::Element* element = static_cast<const IfcGeom::Element*>(iterator->get());
255+
const IfcGeom::TriangulationElement* o = static_cast<const IfcGeom::TriangulationElement*>(iterator->get());
246256

247257
TSTR o_type = S(o->type());
248258
TSTR o_guid = S(o->guid());
259+
TSTR o_name = S(o->name());
249260

250261
Mtl *m = ComposeMultiMaterial(material_cache, mats, itfc, slot, o->geometry().materials(), o->type(), o->geometry().material_ids());
251262

@@ -307,19 +318,22 @@ int IFCImp::DoImport(const TCHAR *name, ImpInterface *impitfc, Interface *itfc,
307318

308319
ImpNode* node = impitfc->CreateNode();
309320
node->Reference(tri);
310-
node->SetName(o_guid);
321+
322+
node->SetName( o_name );
323+
311324
node->GetINode()->Hide(o->type() == "IfcOpeningElement" || o->type() == "IfcSpace");
312325
if (m) {
313326
node->GetINode()->SetMtl(m);
314327
}
315-
const std::vector<float>& matrix_data = o->transformation().matrix().data();
328+
const std::vector<double>& matrix_data = o->transformation().matrix().data();
329+
316330
node->SetTransform(0,Matrix3 ( Point3(matrix_data[0],matrix_data[1],matrix_data[2]),Point3(matrix_data[3],matrix_data[4],matrix_data[5]),
317331
Point3(matrix_data[6],matrix_data[7],matrix_data[8]),Point3(matrix_data[9],matrix_data[10],matrix_data[11]) ));
318332
impitfc->AddNodeToScene(node);
319333

320-
itfc->ProgressUpdate(iterator.progress(), true, _T(""));
334+
itfc->ProgressUpdate(iterator->progress(), true, _T(""));
321335

322-
} while (iterator.next());
336+
} while (iterator->next());
323337

324338
itfc->ProgressEnd();
325339

win/build-deps.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ IF NOT EXIST "%INSTALL_DIR%". mkdir "%INSTALL_DIR%"
8686
IF %VS_VER%==2008 set PATH=C:\Windows\Microsoft.NET\Framework\v3.5;%PATH%
8787

8888
:: User-configurable build options
89-
IF NOT DEFINED IFCOS_INSTALL_PYTHON set IFCOS_INSTALL_PYTHON=TRUE
89+
IF NOT DEFINED IFCOS_INSTALL_PYTHON set IFCOS_INSTALL_PYTHON=FALSE
9090
IF NOT DEFINED IFCOS_NUM_BUILD_PROCS set IFCOS_NUM_BUILD_PROCS=%NUMBER_OF_PROCESSORS%
9191

9292
:: For subroutines

0 commit comments

Comments
 (0)