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

How can I use this code in ContentView with the default augmented reality template provided by Xcode
Hey guys, I hope you are all doing well! I am really stuck on a problem and I need help here. I am new to Swift but I need to use Swift to complete a project. I am trying to use this code https://github.com/jmousseau/RoomObjectReplicatorDemo/blob/main/RoomObjectReplicatorDemo/ViewController.swift with the RoomObjectReplicator library https://github.com/jmousseau/RoomObjectReplicator. However, the issue is that my app is currently using SwiftUI and not UIKit. Furthermore, I have ContentView and ARViewContainer. How can I implement the code but use ContentView and ARViewContainer along with SwiftUI? Thanks in advance!
0
0
355
Dec ’23
Structure Builder crashing with EXC_BAD_ACCESS
A case occured where the Structure Builder is crashing with EXC_BAD_ACCESS and the error cannot be handled without the app crashing. I have two minimalistic models, one even reduced to the minimum of the "coreModel" itself. (See attachment) Each model alone in the StructureBuilder works fine. Using both causes the crash. Has anyone found a way to handle this error without the app crashing? override func viewDidLoad() { super.viewDidLoad() let capturedRooms: [CapturedRoom] = [ loadCapturedRoom(fileName: "appleModel1"), loadCapturedRoom(fileName: "appleModel2") ] buildStructure(capturedRooms) } func buildStructure(_ capturedRooms: [CapturedRoom]) { let structureBuilder = StructureBuilder(options: []) Task { print("----- START BUILDING STRUCTURE -----") do { let capturedStructure = try await structureBuilder.capturedStructure(from: capturedRooms) } catch { print("----- FAILED BUILDING STRUCTURE -----") } // Crashing with: EXC_BAD_ACCESS // This part will never be reached print("----- FINISH BUILDING STRUCTURE -----") } } func loadCapturedRoom(fileName: String) -> CapturedRoom { do { guard let jsonFileURL = Bundle.main.url(forResource: fileName, withExtension: "json") else { fatalError("JSON file not found.") } let data = try Data(contentsOf: jsonFileURL) return try JSONDecoder().decode(CapturedRoom.self, from: data) } catch { fatalError(error.localizedDescription) } } appleModel1.json appleModel2.json
2
1
428
Dec ’23
Merging multiple scans into a single structure
I am currently working on a project involving the merging of multiple scans into a single structure using Room plan json file. I am facing an issue and would greatly appreciate your assistance in resolving it. The problem I am encountering is as follows: "Cannot process multiFloorPlan: Invalid room location in structure" Captured room json file paths: [https://mimesisfbs.s3.ap-south-1.amazonaws.com/project_3dfile_json/2088a003-5712-4e9f-91eb-601b145ca98e-project_3dfile_json_file.json) [https://mimesisfbs.s3.ap-south-1.amazonaws.com/project_3dfile_json/10ccd0d9-7843-41bd-a021-a57781231059-project_3dfile_json_file.json) We are using same code as in example. [https://developer.apple.com/documentation/RoomPlan/merging_multiple_scans_into_a_single_structure)
0
0
391
Nov ’23
Multiroom examples
Hi all. Can anyone show the code for multiroom on swiftUI? And another question, is it possible to change the parameters (dimensions) of walls, doors, windows in an already scanned room by entering real dimensions from a laser tape measure? Because the scanned object has dimensional errors of up to 3 cm. Thanks.
0
0
311
Nov ’23
RoomPlan error "Room size exceeded" during Lidar Scanning
Hello, we are using the RoomPlan API and our users are facing issues during scanning with more than 10% frequency rate. The errors are of different type but aren't really suiting the context. For example, the error message "Roomsize exceeded" (translated from German) is popping up even though the room is relatively small. Bigger rooms are not a problem. We would like to know what is triggering errors exactly so that we can reproduce it. We are going to build workarounds for it, like snapshotting the ARSession to continue later ideally. Unfortunately on errors the ARSession is ended and all data scanned is lost. Has anyone else encounters this?
3
1
578
Nov ’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
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
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