Workspace error for merging multiple mehses

Dear ImFusion Team,

I would like to merge multiple meshes in .obj format into one mesh and then save this mesh with the help of a replay workspace. The steps that I followed were:

  1. Load the 3 meshes
  2. Select all meshes and select “Combine Meshes”
  3. Deactivate “Remesh” and click compute
  4. Save resulting mesh as obj file.
  5. Save workspace file with all of these algorithms.

Unfortunately I cannot further use this workspace file because of the error:

Could not dereference input data 3 for algorithm Mesh File
[Workspace] Skipping Algorithm "Mesh File" because of missing data
[Workspace] Could not restore algorithm Mesh File
Parent data of annotation Combined mesh is unknown, restoring as global annotation.

Below you can see my workspace file with 3 meshes to merge: I am using ImFusionSuite version 2.41.4

<?xml version="1.0" encoding="utf-8"?>
<propertyfile version="1.1" name="" comment="Written by ImFusionLib, 2023-01-04 15:01:30">
	<param name="workspaceVersion">20</param>
	<property name="Datasets">
		<property name="Data">
			<param name="uid">data0</param>
			<param name="name">sub-verse835_verLev20deformed_20_0</param>
			<param name="transformation">1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 </param>
		</property>
		<property name="Data">
			<param name="uid">data1</param>
			<param name="name">sub-verse835_verLev21deformed_20_0</param>
			<param name="transformation">1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 </param>
		</property>
		<property name="Data">
			<param name="uid">data2</param>
			<param name="name">sub-verse835_verLev22deformed_20_0</param>
			<param name="transformation">1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 </param>
		</property>
		<property name="Data">
			<param name="uid">data3</param>
			<param name="name">Combined mesh</param>
			<param name="transformation">1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 </param>
		</property>
	</property>
	<property name="Interface">
		<param name="outputUids">"data0" "data1" "data2" "data3" </param>
		<param name="inputUids"/>
	</property>
	<property name="Algorithms">
		<property name="Mesh File">
			<param name="location">../../vertebrae/train/sub-verse835_verLev20/sub-verse835_verLev20deformed_20_0.obj</param>
			<param name="applyMatrixBeforeSaving">1</param>
			<param name="saveTexture">1</param>
			<param name="loadScaling">1</param>
			<param name="mergeDuplicateVertices">1</param>
			<param name="forceNoChecks">0</param>
			<param name="execute">1</param>
			<param name="inputUids"/>
			<param name="outputUids">"data0" </param>
		</property>
		<property name="Mesh File">
			<param name="location">../../vertebrae/train/sub-verse835_verLev21/sub-verse835_verLev21deformed_20_0.obj</param>
			<param name="applyMatrixBeforeSaving">1</param>
			<param name="saveTexture">1</param>
			<param name="loadScaling">1</param>
			<param name="mergeDuplicateVertices">1</param>
			<param name="forceNoChecks">0</param>
			<param name="execute">1</param>
			<param name="inputUids"/>
			<param name="outputUids">"data1" </param>
		</property>
		<property name="Mesh File">
			<param name="location">../../vertebrae/train/sub-verse835_verLev22/sub-verse835_verLev22deformed_20_0.obj</param>
			<param name="applyMatrixBeforeSaving">1</param>
			<param name="saveTexture">1</param>
			<param name="loadScaling">1</param>
			<param name="mergeDuplicateVertices">1</param>
			<param name="forceNoChecks">0</param>
			<param name="execute">1</param>
			<param name="inputUids"/>
			<param name="outputUids">"data2" </param>
		</property>
		<property name="Mesh File">
			<param name="location">../../../../../saved.obj</param>
			<param name="applyMatrixBeforeSaving">1</param>
			<param name="saveTexture">1</param>
			<param name="loadScaling">1</param>
			<param name="mergeDuplicateVertices">1</param>
			<param name="forceNoChecks">0</param>
			<param name="execute">1</param>
			<param name="inputUids">"3" </param>
			<param name="outputUids">"data3" </param>
		</property>
		<property name="Combine Meshes">
			<param name="Remesh">0</param>
			<param name="Iso Level">8</param>
			<param name="Max distance">10</param>
			<param name="inputUids">"data0" "data1" "data2" </param>
			<param name="outputUids"/>
		</property>
	</property>
	<property name="Annotations">
		<property name="GlMesh">
			<param name="visible">0</param>
			<param name="alwaysVisible">0</param>
			<param name="editable">1</param>
			<param name="color">1 1 0 1 </param>
			<param name="lineWidth">1</param>
			<param name="labelVisible">1</param>
			<param name="labelBackgroundVisible">0</param>
			<param name="labelBackgroundColor">0.3 0.3 0.3 0.7 </param>
			<param name="labelBackgroundMargin">3</param>
			<param name="labelDepthTest">1</param>
			<param name="labelColor">0 1 1 </param>
			<param name="labelText"/>
			<param name="name">sub-verse835_verLev20deformed_20_0</param>
			<param name="renderCrossSection">0</param>
			<param name="crossSectionColor">1 0 0 0.5 </param>
			<param name="renderMode">0</param>
			<param name="materialModeFront">0</param>
			<param name="materialModeBack">0</param>
			<param name="lightingEnabled">1 1 </param>
			<param name="ambientFront">1 1 1 </param>
			<param name="diffuseFront">1 1 1 </param>
			<param name="specularFront">0.100000001490116 0.100000001490116 0.100000001490116 </param>
			<param name="shininessFront">50</param>
			<param name="ambientBack">1 1 1 </param>
			<param name="diffuseBack">1 1 1 </param>
			<param name="specularBack">0.100000001490116 0.100000001490116 0.100000001490116 </param>
			<param name="shininessBack">50</param>
			<param name="wireframeColor">0 0 1 1 </param>
			<param name="wireframeWidth">1</param>
			<param name="wireframeMaterialMode">0</param>
			<param name="lineColor">1 1 1 1 </param>
			<param name="projectiveFrontColor">0.800000011920929 0.300000011920929 0 1 </param>
			<param name="projectiveBackColor">0.100000001490116 0.300000011920929 0.600000023841858 0.5 </param>
			<param name="projectiveIntersectionTolerance">0</param>
			<param name="projectiveFadeoutRange">10</param>
			<param name="drawIn2D">0</param>
			<param name="drawNormals">0</param>
			<param name="useFaceNormals">0</param>
			<param name="poseLinked">0</param>
			<param name="referenceDataUid">data0</param>
		</property>
		<property name="GlMesh">
			<param name="visible">0</param>
			<param name="alwaysVisible">0</param>
			<param name="editable">1</param>
			<param name="color">1 1 0 1 </param>
			<param name="lineWidth">1</param>
			<param name="labelVisible">1</param>
			<param name="labelBackgroundVisible">0</param>
			<param name="labelBackgroundColor">0.3 0.3 0.3 0.7 </param>
			<param name="labelBackgroundMargin">3</param>
			<param name="labelDepthTest">1</param>
			<param name="labelColor">0 1 1 </param>
			<param name="labelText"/>
			<param name="name">sub-verse835_verLev21deformed_20_0</param>
			<param name="renderCrossSection">0</param>
			<param name="crossSectionColor">1 0 0 0.5 </param>
			<param name="renderMode">0</param>
			<param name="materialModeFront">0</param>
			<param name="materialModeBack">0</param>
			<param name="lightingEnabled">1 1 </param>
			<param name="ambientFront">1 1 1 </param>
			<param name="diffuseFront">1 1 1 </param>
			<param name="specularFront">0.100000001490116 0.100000001490116 0.100000001490116 </param>
			<param name="shininessFront">50</param>
			<param name="ambientBack">1 1 1 </param>
			<param name="diffuseBack">1 1 1 </param>
			<param name="specularBack">0.100000001490116 0.100000001490116 0.100000001490116 </param>
			<param name="shininessBack">50</param>
			<param name="wireframeColor">0 0 1 1 </param>
			<param name="wireframeWidth">1</param>
			<param name="wireframeMaterialMode">0</param>
			<param name="lineColor">1 1 1 1 </param>
			<param name="projectiveFrontColor">0.800000011920929 0.300000011920929 0 1 </param>
			<param name="projectiveBackColor">0.100000001490116 0.300000011920929 0.600000023841858 0.5 </param>
			<param name="projectiveIntersectionTolerance">0</param>
			<param name="projectiveFadeoutRange">10</param>
			<param name="drawIn2D">0</param>
			<param name="drawNormals">0</param>
			<param name="useFaceNormals">0</param>
			<param name="poseLinked">0</param>
			<param name="referenceDataUid">data1</param>
		</property>
		<property name="GlMesh">
			<param name="visible">0</param>
			<param name="alwaysVisible">0</param>
			<param name="editable">1</param>
			<param name="color">1 1 0 1 </param>
			<param name="lineWidth">1</param>
			<param name="labelVisible">1</param>
			<param name="labelBackgroundVisible">0</param>
			<param name="labelBackgroundColor">0.3 0.3 0.3 0.7 </param>
			<param name="labelBackgroundMargin">3</param>
			<param name="labelDepthTest">1</param>
			<param name="labelColor">0 1 1 </param>
			<param name="labelText"/>
			<param name="name">sub-verse835_verLev22deformed_20_0</param>
			<param name="renderCrossSection">0</param>
			<param name="crossSectionColor">1 0 0 0.5 </param>
			<param name="renderMode">0</param>
			<param name="materialModeFront">0</param>
			<param name="materialModeBack">0</param>
			<param name="lightingEnabled">1 1 </param>
			<param name="ambientFront">1 1 1 </param>
			<param name="diffuseFront">1 1 1 </param>
			<param name="specularFront">0.100000001490116 0.100000001490116 0.100000001490116 </param>
			<param name="shininessFront">50</param>
			<param name="ambientBack">1 1 1 </param>
			<param name="diffuseBack">1 1 1 </param>
			<param name="specularBack">0.100000001490116 0.100000001490116 0.100000001490116 </param>
			<param name="shininessBack">50</param>
			<param name="wireframeColor">0 0 1 1 </param>
			<param name="wireframeWidth">1</param>
			<param name="wireframeMaterialMode">0</param>
			<param name="lineColor">1 1 1 1 </param>
			<param name="projectiveFrontColor">0.800000011920929 0.300000011920929 0 1 </param>
			<param name="projectiveBackColor">0.100000001490116 0.300000011920929 0.600000023841858 0.5 </param>
			<param name="projectiveIntersectionTolerance">0</param>
			<param name="projectiveFadeoutRange">10</param>
			<param name="drawIn2D">0</param>
			<param name="drawNormals">0</param>
			<param name="useFaceNormals">0</param>
			<param name="poseLinked">0</param>
			<param name="referenceDataUid">data2</param>
		</property>
		<property name="GlMesh">
			<param name="visible">1</param>
			<param name="alwaysVisible">0</param>
			<param name="editable">1</param>
			<param name="color">1 1 0 1 </param>
			<param name="lineWidth">1</param>
			<param name="labelVisible">1</param>
			<param name="labelBackgroundVisible">0</param>
			<param name="labelBackgroundColor">0.3 0.3 0.3 0.7 </param>
			<param name="labelBackgroundMargin">3</param>
			<param name="labelDepthTest">1</param>
			<param name="labelColor">0 1 1 </param>
			<param name="labelText"/>
			<param name="name">Combined mesh</param>
			<param name="renderCrossSection">0</param>
			<param name="crossSectionColor">1 0 0 0.5 </param>
			<param name="renderMode">0</param>
			<param name="materialModeFront">0</param>
			<param name="materialModeBack">0</param>
			<param name="lightingEnabled">1 1 </param>
			<param name="ambientFront">1 1 1 </param>
			<param name="diffuseFront">1 1 1 </param>
			<param name="specularFront">0.100000001490116 0.100000001490116 0.100000001490116 </param>
			<param name="shininessFront">50</param>
			<param name="ambientBack">1 1 1 </param>
			<param name="diffuseBack">1 1 1 </param>
			<param name="specularBack">0.100000001490116 0.100000001490116 0.100000001490116 </param>
			<param name="shininessBack">50</param>
			<param name="wireframeColor">0 0 1 1 </param>
			<param name="wireframeWidth">1</param>
			<param name="wireframeMaterialMode">0</param>
			<param name="lineColor">1 1 1 1 </param>
			<param name="projectiveFrontColor">0.800000011920929 0.300000011920929 0 1 </param>
			<param name="projectiveBackColor">0.100000001490116 0.300000011920929 0.600000023841858 0.5 </param>
			<param name="projectiveIntersectionTolerance">0</param>
			<param name="projectiveFadeoutRange">10</param>
			<param name="drawIn2D">0</param>
			<param name="drawNormals">0</param>
			<param name="useFaceNormals">0</param>
			<param name="poseLinked">0</param>
			<param name="referenceDataUid">data3</param>
		</property>
	</property>
	<property name="Display">
		<param name="layoutMode">0</param>
		<param name="focusedView">0</param>
		<param name="viewOrder">0 1 2 3 4 </param>
		<property name="Views">
			<property name="0">
				<param name="isVisible">0</param>
				<param name="interpolation">1</param>
				<param name="flip">1</param>
				<param name="blendingMode">1</param>
				<param name="zoom">1</param>
				<param name="showZoom">1</param>
				<param name="showIn3D">1</param>
				<param name="viewMatrix">1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 </param>
				<param name="sliceMatrix">1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 </param>
				<param name="showOrientationMarkers">0</param>
				<param name="displayOptionsSource">1</param>
				<param name="sliceThickness">0</param>
			</property>
			<property name="1">
				<param name="isVisible">0</param>
				<param name="interpolation">1</param>
				<param name="flip">1</param>
				<param name="blendingMode">1</param>
				<param name="zoom">1</param>
				<param name="showZoom">1</param>
				<param name="showIn3D">1</param>
				<param name="viewMatrix">1 -0 0 9.19745063781738 -0 1 -0 -102.349153518677 0 0 1 -589.856506347656 -0 0 -0 1 </param>
				<param name="sliceMatrix">1 -0 0 9.19745063781738 -0 1 -0 -102.349153518677 0 0 1 -589.856506347656 -0 0 -0 1 </param>
				<param name="showOrientationMarkers">0</param>
				<param name="displayOptionsSource">1</param>
				<param name="sliceThickness">0</param>
			</property>
			<property name="2">
				<param name="isVisible">0</param>
				<param name="interpolation">1</param>
				<param name="flip">1</param>
				<param name="blendingMode">1</param>
				<param name="zoom">1</param>
				<param name="showZoom">1</param>
				<param name="showIn3D">1</param>
				<param name="viewMatrix">6.12323399573677e-17 -0 -1 9.19745063781738 1 6.12323399573677e-17 6.12323399573677e-17 -102.349153518677 6.12323399573677e-17 -1 3.74939945665464e-33 -589.856506347656 -0 -0 -0 1 </param>
				<param name="sliceMatrix">6.12323399573677e-17 -0 -1 9.19745063781738 1 6.12323399573677e-17 6.12323399573677e-17 -102.349153518677 6.12323399573677e-17 -1 3.74939945665464e-33 -589.856506347656 -0 -0 -0 1 </param>
				<param name="showOrientationMarkers">0</param>
				<param name="displayOptionsSource">1</param>
				<param name="sliceThickness">0</param>
			</property>
			<property name="3">
				<param name="isVisible">0</param>
				<param name="interpolation">1</param>
				<param name="flip">1</param>
				<param name="blendingMode">1</param>
				<param name="zoom">1</param>
				<param name="showZoom">1</param>
				<param name="showIn3D">1</param>
				<param name="viewMatrix">1 -0 -0 9.19745063781738 -0 5.0532154980743e-16 1 -102.349153518677 -0 -1 5.0532154980743e-16 -589.856506347656 0 0 -0 1 </param>
				<param name="sliceMatrix">1 -0 -0 9.19745063781738 -0 5.0532154980743e-16 1 -102.349153518677 -0 -1 5.0532154980743e-16 -589.856506347656 0 0 -0 1 </param>
				<param name="showOrientationMarkers">0</param>
				<param name="displayOptionsSource">1</param>
				<param name="sliceThickness">0</param>
			</property>
			<property name="4">
				<param name="isVisible">1</param>
				<param name="volumeRendererName">General Purpose Volume Renderer</param>
				<param name="sceneCenter">9.19745063781738 -102.349153518677 -589.856506347656 </param>
				<param name="displayOptionsSource">1</param>
				<param name="ssaoMode">0</param>
				<property name="Camera">
					<param name="poseMatrix">-1.60812264967664e-16 1 1.02587404238963e-16 102.349153518677 1 1.74690052775478e-16 -4.14639471429396e-17 -9.1974506378174 -8.32667268468867e-17 1.22464679914735e-16 -1 -731.202540829174 0 0 0 1 </param>
					<param name="mode">0</param>
					<param name="principalPoint">0.5 0.5 </param>
					<param name="focalLength">1.37373870972731 1.37373870972731 </param>
					<param name="frustumHeight">100</param>
				</property>
				<property name="VolumeRenderer">
					<param name="mode">4</param>
					<param name="showDeformations">0</param>
					<param name="ambientAttenuationDistance">0</param>
				</property>
			</property>
		</property>
		<property name="VisibleData">
			<property name="0">
				<param name="visible"/>
			</property>
			<property name="1">
				<param name="visible"/>
			</property>
			<property name="2">
				<param name="visible"/>
			</property>
			<property name="3">
				<param name="visible"/>
			</property>
			<property name="4">
				<param name="visible"/>
			</property>
		</property>
	</property>
</propertyfile>

Would you please let me know what might be wrong with the workspace file?

Thank you,
Miruna

Hi Miruna,

I don’t know how it happened but I see two issues in the workspace file.

First the Combine Meshes algorithm does not seem to have the execute flag so it is created but not run. Since it produces a new mesh, we also need to give it an outputUids.

Second, the fourth Mesh File section is the one supposed to save the new mesh. It should therefore be placed after the Combine Mesh and its inputUid should also match the outputUids of the previous algorithm. The saving does not generate any new data so the outputUids field of Mesh File should be empty.

Can you try something like this:

		<property name="Combine Meshes">
			<param name="Remesh">0</param>
			<param name="Iso Level">8</param>
			<param name="Max distance">10</param>
			<param name="inputUids">"data0" "data1" "data2" </param>
			<param name="outputUids">"data3"</param>
			<param name="execute">1</param>
		</property>
		<property name="Mesh File">
			<param name="location">../../../../../saved.obj</param>
			<param name="applyMatrixBeforeSaving">1</param>
			<param name="saveTexture">1</param>
			<param name="loadScaling">1</param>
			<param name="mergeDuplicateVertices">1</param>
			<param name="forceNoChecks">0</param>
			<param name="execute">1</param>
			<param name="inputUids">"data3" </param>
			<param name="outputUids"></param>
		</property>

Hello Raphael,

Thank you very much! It works perfectly with the suggested corrections.