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

[Bug]: Error writing RelatingObject: '#1 or 1.' #1227

Open
NeluQi opened this issue Jan 22, 2025 · 0 comments
Open

[Bug]: Error writing RelatingObject: '#1 or 1.' #1227

NeluQi opened this issue Jan 22, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@NeluQi
Copy link

NeluQi commented Jan 22, 2025

What happened?

I'm trying to create a small tree

And in IFC the hierarchy is not displayed, only the first element

The problem is in the IFCRELAGGREGATES entry


#3=IFCRELAGGREGATES('e478875b-2b07-4014-8bfa-46be03d73535',$,$,$,1.,(2.));

to

#3=IFCRELAGGREGATES('e478875b-2b07-4014-8bfa-46be03d73535',$,$,$,#1,(#2));

1.,(2.)) => ,#1,(#2)); and then it works
processNode(modelID: number, node: ExportIFCNode, parentID: number): void {
		debugger;

		const nodeProxy = {
			expressID: this.generateExpressID(),
			type: IFCBUILDINGELEMENTPROXY,
			GlobalId: this.generateGUID(),
			Name: node.nameObject,
		};

		this.ifcAPI.WriteLine(modelID, nodeProxy);

	
		if (parentID) {
			const relAggregates = {
				expressID: this.generateExpressID(),
				GlobalId: this.generateGUID(),
				type: IFCRELAGGREGATES,
				RelatingObject: parentID,
				RelatedObjects: [nodeProxy.expressID],
			};
			this.ifcAPI.WriteLine(modelID, relAggregates);
		}

		node.children?.forEach((child) => this.processNode(modelID, child, nodeProxy.expressID));
	}

No tree
Image

swap to #

Image

ISO-10303-21;

HEADER;
/******************************************************
* STEP Physical File produced by: That Open Engine WebIfc 0.0.59
* Module: web-ifc/IfcLoader
* Version: 0.0.59
* Source: https://github.com/ThatOpen/engine_web-ifc
* Issues: https://github.com/ThatOpen/engine_web-ifc/issues
******************************************************/
FILE_DESCRIPTION(('\X2\0432044B0430\X0\'),'2;1');
FILE_NAME('dsfdsf','2025-01-22T20:23:58',('\X2\0432044B0430044B0432\X0\'),('\X2\0432044B04300432044B0430\X0\'),'thatopen/web-ifc-api','thatopen/web-ifc-api','\X2\0432044B0430044B04320430\X0\');
FILE_SCHEMA(('IFC4'));
ENDSEC;
DATA;
#1=IFCPROJECT('3a855ad3-93a4-4c59-a815-4be70656a418',$,'Sample Project','Exported by Author Name',$,$,$,$,$);
#2=IFCBUILDINGELEMENTPROXY('5ba86049-d7e4-450c-9278-6087c38210bb',$,'\X2\041C043E04340443043B044C\X0\_',$,$,$,$,$,$);
#3=IFCRELAGGREGATES('e478875b-2b07-4014-8bfa-46be03d73535',$,$,$,1.,(2.));
#4=IFCBUILDINGELEMENTPROXY('eb5cff78-4b5f-4f72-83f9-52e72066bc72',$,'2.1 11',$,$,$,$,$,$);
#5=IFCRELAGGREGATES('aef95165-103a-4f1f-b441-0c9304f73456',$,$,$,2.,(4.));
#6=IFCBUILDINGELEMENTPROXY('db96bd6b-22fc-4dc3-901d-069cd305c165',$,'\X2\041F04400438043C04350440\X0\ 1',$,$,$,$,$,$);
#7=IFCRELAGGREGATES('66e71e3f-bfa8-476a-983e-36b6e36bff08',$,$,$,4.,(6.));
#8=IFCBUILDINGELEMENTPROXY('a171efc7-d78d-4a75-add2-985011f1d175',$,'\X2\041F04400438043C04350440\X0\ 2',$,$,$,$,$,$);
#9=IFCRELAGGREGATES('252731d9-5f79-4ffa-86bd-4d60ebfc5818',$,$,$,4.,(8.));
#10=IFCBUILDINGELEMENTPROXY('d554db20-8783-41a3-9565-222ba608da6a',$,'\X2\041F04400438043C04350440\X0\ 3',$,$,$,$,$,$);
#11=IFCRELAGGREGATES('4bedfab9-e3b9-45f0-8a49-e64fbe67ca7c',$,$,$,4.,(10.));
#12=IFCBUILDINGELEMENTPROXY('750b65da-037b-41c8-8f47-b255919f30a3',$,'\X2\041F04400438043C04350440\X0\ 4',$,$,$,$,$,$);
#13=IFCRELAGGREGATES('97b69d6e-e4ee-4472-b4fd-e29a398c31e9',$,$,$,4.,(12.));
#14=IFCBUILDINGELEMENTPROXY('820d3ad6-714f-4820-9541-cda7ab33ba88',$,'2.1.1 IfcSite|DefaultSite',$,$,$,$,$,$);
#15=IFCRELAGGREGATES('76360bcf-b11b-487a-af95-11554545ef66',$,$,$,4.,(14.));
#16=IFCBUILDINGELEMENTPROXY('0dd1bc8e-f848-4e1a-b40a-a1d0861178d4',$,'2.1.1.1 IfcBuilding|DefaultBuilding',$,$,$,$,$,$);
#17=IFCRELAGGREGATES('122fe0da-3680-4126-b57d-1687824ff390',$,$,$,14.,(16.));
#18=IFCBUILDINGELEMENTPROXY('8e8e8e99-4b88-4ad6-87a2-9eb85059abf8',$,'2.1.1.1.1 IfcBuildingStorey|DefaultStorey',$,$,$,$,$,$);
#19=IFCRELAGGREGATES('c9daaed4-2ad1-4121-a3a0-e291d2319e31',$,$,$,16.,(18.));
#20=IFCBUILDINGELEMENTPROXY('f451d110-d5f3-4d41-a3f2-0ae9722a1cd5',$,'1 \X2\041D043E04320430044F\X0\ \X2\043F0430043F043A0430\X0\',$,$,$,$,$,$);
#21=IFCRELAGGREGATES('bf8e23dd-6eda-4ec9-861e-38ba0cd75cab',$,$,$,2.,(20.));
ENDSEC;
END-ISO-10303-21;

Version

0.0.59

What browsers are you seeing the problem on?

No response

Relevant log output

Anything else?

No response

@NeluQi NeluQi added the bug Something isn't working label Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant