RoomPlan

RSS for tag

Create parametric 3D scans of rooms and room-defining objects.

Posts under RoomPlan tag

90 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Xcode 15 will not connect to ios17 device via network
I'm unable to debug on iPhone 12 running iOS 17 beta 3 via network. I'm running Xcode 15 beta 6 Device shows in devices and simulators and I can debug when connected with cable. However the "Connect Via Network" option is frayed out, oddly however the checkbox is ticked I'm developing a app using RoomPlan so network connectivity is a must for debugging Anyone else encountered this and know how to get around this problem Other devices running iOS 16 connect via network just fine
5
3
3.4k
Oct ’23
RoomPlan export thumbnail as image
I need to generate a thumbnail from CapturedRoom, that is either a static frame of the PIP thumbnail that we see in the result after scanning. Ideally an image, but I could also use a simplified OBJ if that's a possibility. From documentation it looks like the only option is to export as USDZ. Is there a way to generate a static image file after room scan is processed? try finalResults?.export(to: destinationURL, exportOptions: .mesh)
0
0
514
Aug ’23
Override RoomPlan coaching prompts...
We want to be able to use our own prompt / coaching for RoomPlan I see that I can override the following method to see the RoomCaptureSession.Instruction and then add or our UI to coach the customer func captureSession(_ session: RoomCaptureSession, didProvide instruction: RoomCaptureSession.Instruction) { Logger.log(.info, category: .roomplan, message: "RoomCaptureSession.Instruction(\(instruction))") // Show coaching prompts } However, I don't know how to remove the coaching UI provided by the OS. If I disable coaching sessionConfig = RoomCaptureSession.Configuration() sessionConfig.isCoachingEnabled = false Then the callback above was not being called. I really want a willProvide method that I can return 'false' to say that I want to give my own UI instead of the UI provided by RoomPlan. Is there a way to provide my own ui for these RoomCaptureSession.Instructions? Thanks in advance
1
0
387
Aug ’23
Path must be an absolute path: <> cannotCreateNode(path: "")
We are trying to save usdz file in file manager some time its saved but some time we are getting the error. Like: path.absoluteURL file:///var/mobile/Containers/Data/Application/6D14A430-47B4-45F2-9D0D-6C31588A6A03/Documents/2896837C-C7E0-4FA8-BFE2-21A59B26D801.usdz Warning: in SdfPath at line 151 of sdf/path.cpp -- Ill-formed SdfPath &lt;/2896837CC7E04FA8BFE221A59B26D801&gt;: syntax error Coding Error: in _IsValidPathForCreatingPrim at line 3338 of usd/stage.cpp -- Path must be an absolute path: &lt;&gt; cannotCreateNode(path: "/2896837CC7E04FA8BFE221A59B26D801") func saveFileLocal() { if let finalResult { let fm = FileManager.default var path = fm.urls(for: .documentDirectory, in: .userDomainMask).first! let fileName = "(UUID().uuidString).usdz" path.appendPathComponent(fileName) do { try finalResult.export(to: path.absoluteURL) } catch{ print(error) } } } func removeFiles() { var filePath = "" let fm = FileManager.default let path = fm.urls(for: .documentDirectory, in: .userDomainMask).first! do{ let content = try fm.contentsOfDirectory(atPath: path.path) for c in content{ filePath = path.appendingPathComponent(c).absoluteString if let url = URL(string: filePath){ try fm.removeItem(at: url) } } } catch{ print(error) } }
8
0
818
Oct ’23
When we try to export CapturedRoom getting cannotCreateNode(path: "/9EE71ED0F8D6415496A7B9F0C3671DB0321") in
We are using the RoomPlan API to capture data, which is stored in the 'CapturedRoom' variable in our code (referred to as 'finalResult'). We then attempt to save a USDZ file in the file manager. Sometimes it works, but other times, we encounter issues like the one below Coding Error: in _IsValidPathForCreatingPrim at line 3338 of usd/stage.cpp -- Path must be an absolute path: <> cannotCreateNode(path: "/9EE71ED0F8D6415496A7B9F0C3671DB0321") This is that code we are using for shaving CapturedRoom data func saveFileLocal() { if let finalResult { let fm = FileManager.default let documentsURL = fm.urls(for: .documentDirectory, in: .userDomainMask).first! //let documentsURL = URL.documentsDirectory let fileName = "\(UUID().uuidString).usdz" let fileURL = documentsURL.appendingPathComponent(fileName) do { try finalResult.export(to: fileURL) } catch { print(error) } } } Please help us.
2
0
389
Oct ’23
Texture not appling on roomplan wall object (capturedata)
We are attempting to update the texture on a node. The code below works correctly when we use a color, but it encounters issues when we attempt to use an image. The image is available in the bundle, and it image correctly in other parts of our application. This texture is being applied to both the floor and the wall. Please assist us with this issue." for obj in Floor_grp[0].childNodes { let node = obj.flattenedClone() node.transform = obj.transform let imageMaterial = SCNMaterial() node.geometry?.materials = [imageMaterial] node.geometry?.firstMaterial?.diffuse.contents = UIColor.brown obj.removeFromParentNode() Floor_grp[0].addChildNode(node) }
0
0
443
Oct ’23
Unable to export a captured RoomPlan
Hi! I'm currently doing a simple RoomCaptureView-based room capture (iOS 17, iPhone 15 super mega ultra pro max), and I'm unable to export anything I capture, even though I have a dollhouse I can play with after the export. Attached is a screen grab of the doll-house expand/collapse view. (it always fails) My export code is in the RoomCaptureView delegate. The passed in error is nil. func captureView(didPresent processedResult: CapturedRoom, error: (Error)?) { let fm = FileManager() do { let documentDirectoryURL = try fm.url(for: .documentDirectory, in: .userDomainMask, appropriateFor: nil, create: true) let now = generateCurrentTimeStamp() // of the form 2023_10_02_09_45_58 let destinationURL = documentDirectoryURL.appendingPathComponent("\(now).usdz") try processedResult.export(to: destinationURL) } catch { print("oops no processed result? \(error)") } } The constructed URL is: file:///var/mobile/Containers/Data/Application/7DD98157-909A-40A1-9271-1AFCD5336E8B/Documents/2023_10_02_09_45_58.usdz The error in the catch is (not sure where the rest of my path went...): ▿ Error ▿ cannotCreateNode : 1 element - path : "/2023_10_02_09_45_58" And this is printed to the console: Warning: in SdfPath at line 151 of sdf/path.cpp -- Ill-formed SdfPath </2023_10_02_09_38_17>: syntax error Coding Error: in _IsValidPathForCreatingPrim at line 3338 of usd/stage.cpp -- Path must be an absolute path: <> The same sequence happens if I use any of the different export types (mesh-default, parametric, model). I'd attach my project but looks like zip files and dropbox links are forbidden here. If you want a small sample project, feel free to email me at markd at borkware dot com (since looks like emails are forbidden here too) Thanks in advance! I'd love to present this to my cocoaheads in a couple of weeks.
4
0
541
Oct ’23
Roompaln wall group objects apply texture
I am writing to seek assistance with a challenge I am facing while working on a 3D model rendering project. I believe your expertise in this area could be immensely helpful in resolving the issue. The problem I am encountering involves difficulties in displaying textures on both parent and child nodes within the 3D model. Here are the key details of the problem: This model contents wall_grp(doors, windows and wall) objects. We are using roomplan data in SCNView. This code dependent on scene kit and room plan apis When we are comment childnode code its working but in this case we don’t have windows and door on wall. func updateWallObjects() { if arch_grp.count > 0 { if !arch_grp.isEmpty { for obj in arch_grp[0].childNodes { let color = UIColor.init(red: 255/255, green: 229/255, blue: 204/255, alpha: 1.0) let parentNode = obj.flattenedClone() for childObj in obj.childNodes { let childNode = childObj.flattenedClone() let childMaterial = SCNMaterial() childNode.geometry?.materials = [childMaterial] if let name = childObj.name { if (removeNumbers(from: name) != "Wall") { childNode.geometry?.firstMaterial?.diffuse.contents = UIColor.white } else { childNode.geometry?.firstMaterial?.diffuse.contents = color } } childObj.removeFromParentNode() parentNode.addChildNode(childObj) } let material = SCNMaterial() parentNode.geometry?.materials = [material] parentNode.geometry?.firstMaterial?.diffuse.contents = color obj.removeFromParentNode() arch_grp[0].addChildNode(parentNode) } } } }``` Please suggest us
0
0
461
Oct ’23
CV3DSLAMAnchorUpdateCopySessionID
I got multiple crashes with the issue that the app has crashed in the SlamEngine during CV3DSLAMAnchorUpdateCopySessionID. There is no pattern when this occurs and I do not know how to reproduce this error but since it is occuring multiple times I thought i will ask in this forum if anyone has a similar issue or knows a fix for this.
3
1
815
Oct ’23
RoomPlan: How to track rooms across a CapturedStructure.init(from:) call?
I'd like to be able to associate some data with each CapturedRoom scan and maintain those associations when CapturedRooms are combined in a CapturedStructure. For example, in the delegate method captureView(didPresent:error:), I'd like to associate external data with the CapturedRoom. That's easy enough to do with a Swift dictionary, using the CapturedRoom's identifier as the key to the associated data. However, when I assemble a list of CapturedRooms into a CapturedStructure using StructureBuilder.init(from:), the rooms in the output CapturedStructure have different identifiers so their associations to the external data are lost. Is there any way to track or identify CapturedRoom objects that are input into a StructureBuilder to the rooms in the CapturedStructure output? I looked for something like a "userdata" property on a CapturedRoom that might be preserved, but couldn't find one. And since the room identifiers change when they are built into a CapturedStructure, I don't see an obvious way to do this.
3
0
462
Jun ’24