Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge work by FrogsInSpace #4480

Open
wants to merge 68 commits into
base: v0.7.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 63 commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
6360edb
Fix compatiblity for 3ds Max 2022+ SDKs
FrogsInSpace Dec 22, 2021
0c1575c
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Jan 1, 2022
1330b18
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Jan 14, 2022
e813243
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Jan 21, 2022
2df26f3
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Feb 5, 2022
fe3b5dd
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Feb 10, 2022
1a5e39d
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Feb 11, 2022
cad6929
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Mar 9, 2022
b7955e5
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Apr 9, 2022
aa2bd88
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Apr 20, 2022
f48085c
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Apr 23, 2022
b85f914
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Apr 27, 2022
21e2cba
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace May 7, 2022
a901fc2
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace May 26, 2022
13abe4e
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Jun 2, 2022
fd27e8f
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Jun 13, 2022
69e6524
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Jun 17, 2022
17af91f
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Jun 25, 2022
c5c3251
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Jul 9, 2022
f57599a
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Jul 18, 2022
4f1aba9
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Jul 25, 2022
79b49cc
cmake tweaks
FrogsInSpace Aug 8, 2022
95c0c09
Merge branch 'upstream/v0.7.0' into merge/v0.7.0
FrogsInSpace Aug 8, 2022
a2ad4c9
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Aug 20, 2022
bbfa43e
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Aug 27, 2022
3d3ba86
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Aug 28, 2022
1041e4e
update outdated 3ds max plugin code incompatibilities
FrogsInSpace Aug 28, 2022
e6c8e42
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Sep 3, 2022
516287a
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Sep 7, 2022
497b739
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Sep 17, 2022
0cfd034
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Sep 20, 2022
6cc2448
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Sep 23, 2022
19fc76c
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Sep 27, 2022
8fb8caa
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Oct 1, 2022
dfc5df5
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Oct 2, 2022
cb2a9e2
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Oct 4, 2022
10bd70b
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Oct 5, 2022
05fc5e7
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Oct 7, 2022
43664f6
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Oct 14, 2022
f034ec0
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Oct 18, 2022
312918d
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Oct 22, 2022
877977c
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Oct 26, 2022
9c4e7d9
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Nov 7, 2022
bb728db
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Nov 12, 2022
4ed367d
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Nov 20, 2022
9a75c7b
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Nov 23, 2022
eb035bf
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Dec 5, 2022
f4b0285
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Dec 17, 2022
b2895a7
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Dec 20, 2022
d280b84
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Dec 28, 2022
c763f2c
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Jan 5, 2023
bec6dcf
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Jan 12, 2023
1bd3b8a
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Jan 17, 2023
1ec78ec
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Jan 21, 2023
a64923b
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Feb 4, 2023
d7fe91a
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Feb 9, 2023
bd26b8a
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Feb 17, 2023
d99b6d7
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace May 7, 2023
d2d101c
merge
FrogsInSpace Dec 29, 2022
80f9420
Merge branch 'v0.7.0' into upstream/merge/v0.7.0
FrogsInSpace Jun 28, 2023
48f7053
Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0
FrogsInSpace Jul 29, 2023
ed85d36
Merge branch 'v0.7.0' into merge/upstream/v0.7.0
FrogsInSpace Sep 2, 2023
15bace1
Merge branch 'v0.7.0' into upstream/v0.7.0
FrogsInSpace Oct 28, 2023
36046ba
Merge branch 'v0.7.0' into upstream/v0.7.0
FrogsInSpace Mar 29, 2024
52cbca9
Merge branch 'upstream/v0.7.0' into v0.7.0
FrogsInSpace Apr 19, 2024
2a398c4
enable BUILD_IFCMAX
FrogsInSpace May 8, 2024
4709e98
fix cmake 3ds Max SDK dedection
FrogsInSpace May 8, 2024
7433d3f
Merge branch 'up/v0.7.0' into v0.7.0
FrogsInSpace May 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
30 changes: 22 additions & 8 deletions src/ifcmax/IfcMax.cpp
Expand Up @@ -27,7 +27,7 @@

#include "../ifcgeom_schema_agnostic/IfcGeomIterator.h"
#include "../ifcgeom_schema_agnostic/IfcGeomMaterial.h"
#include "../ifcgeom/IfcGeomElement.h"
#include "../ifcgeom_schema_agnostic/IfcGeomElement.h"

static const int NUM_MATERIAL_SLOTS = 24;

Expand All @@ -46,6 +46,11 @@ static class IFCImpClassDesc :public ClassDesc {
void * Create(BOOL /*loading = FALSE*/) { return new IFCImp; }
// TODO Delete() function?
const TCHAR * ClassName() { return _T("IFCImp"); }

#if MAX_VERSION_MAJOR >= 24
const TCHAR * NonLocalizedClassName() { return ClassName(); }
#endif

SClass_ID SuperClassID() { return SCENE_IMPORT_CLASS_ID; }
Class_ID ClassID() { return Class_ID(0x3f230dbf, 0x5b3015c2); }
const TCHAR* Category() { return _T("Chrutilities"); }
Expand Down Expand Up @@ -230,9 +235,13 @@ int IFCImp::DoImport(const TCHAR *name, ImpInterface *impitfc, Interface *itfc,
#endif

IfcParse::IfcFile file(fn_mb);
IfcGeom::Iterator<float> iterator(settings, &file);

//IfcGeom::Iterator<float> iterator(settings, &file);

IfcGeom::Iterator* iterator = new IfcGeom::Iterator( settings, &file);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason why you changed this to a pointer?


delete fn_mb;
if (!iterator.initialize()) return false;
if (!iterator->initialize()) return false;

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

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

do{
const IfcGeom::TriangulationElement<float>* o = static_cast<const IfcGeom::TriangulationElement<float>*>(iterator.get());
const IfcGeom::Element* element = static_cast<const IfcGeom::Element*>(iterator->get());
const IfcGeom::TriangulationElement* o = static_cast<const IfcGeom::TriangulationElement*>(iterator->get());

TSTR o_type = S(o->type());
TSTR o_guid = S(o->guid());
TSTR o_name = S(o->name());

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

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

ImpNode* node = impitfc->CreateNode();
node->Reference(tri);
node->SetName(o_guid);

node->SetName( o_name );

node->GetINode()->Hide(o->type() == "IfcOpeningElement" || o->type() == "IfcSpace");
if (m) {
node->GetINode()->SetMtl(m);
}
const std::vector<float>& matrix_data = o->transformation().matrix().data();
const std::vector<double>& matrix_data = o->transformation().matrix().data();

node->SetTransform(0,Matrix3 ( Point3(matrix_data[0],matrix_data[1],matrix_data[2]),Point3(matrix_data[3],matrix_data[4],matrix_data[5]),
Point3(matrix_data[6],matrix_data[7],matrix_data[8]),Point3(matrix_data[9],matrix_data[10],matrix_data[11]) ));
impitfc->AddNodeToScene(node);

itfc->ProgressUpdate(iterator.progress(), true, _T(""));
itfc->ProgressUpdate(iterator->progress(), true, _T(""));

} while (iterator.next());
} while (iterator->next());

itfc->ProgressEnd();

Expand Down
2 changes: 1 addition & 1 deletion win/build-deps.cmd
Expand Up @@ -86,7 +86,7 @@ IF NOT EXIST "%INSTALL_DIR%". mkdir "%INSTALL_DIR%"
IF %VS_VER%==2008 set PATH=C:\Windows\Microsoft.NET\Framework\v3.5;%PATH%

:: User-configurable build options
IF NOT DEFINED IFCOS_INSTALL_PYTHON set IFCOS_INSTALL_PYTHON=TRUE
IF NOT DEFINED IFCOS_INSTALL_PYTHON set IFCOS_INSTALL_PYTHON=FALSE
IF NOT DEFINED IFCOS_NUM_BUILD_PROCS set IFCOS_NUM_BUILD_PROCS=%NUMBER_OF_PROCESSORS%

:: For subroutines
Expand Down