Create parametric 3D room scans with RoomPlan

RSS for tag

Discuss the WWDC22 Session Create parametric 3D room scans with RoomPlan

Posts under wwdc2022-10127 tag

3 Posts
Sort by:
Post not yet marked as solved
3 Replies
1.8k Views
I am running the RoomPlan Demo app and keep getting the above error and when I try to find someplace to get the archive in the Metal Libraries my searches come up blank. There are no files that show up in a search that contain such identifiers. A number of messages are displayed about "deprecated" interfaces also. Is it normal to send out demo apps that are hobbled in this way?
Posted
by
Post not yet marked as solved
1 Replies
945 Views
Here is the current code I am using for it. When scanning my room, it is not identifying any door. And there are 2. Am I missing anything? import UIKit import RoomPlan import ARKit import RealityKit class RoomPlanViewController: UIViewController, RoomCaptureViewDelegate, UIViewControllerTransitioningDelegate { @IBOutlet weak var doneButton: UIButton! @IBOutlet weak var exportButton: UIButton! @IBOutlet weak var statusLabel: UILabel! var roomCaptureView: RoomCaptureView! let customDismissal = CustomSlideDownDismissal() var finalResults: CapturedRoom? override func viewDidLoad() { super.viewDidLoad() roomCaptureView = RoomCaptureView(frame: view.bounds) roomCaptureView.delegate = self view.insertSubview(roomCaptureView, at: 0) exportButton.isHidden = true statusLabel.isHidden = true self.transitioningDelegate = self } override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) roomCaptureView?.captureSession.run(configuration: RoomCaptureSession.Configuration()) } @IBAction func Back(_ sender: Any) { roomCaptureView?.captureSession.stop() self.dismiss(animated: true, completion: nil) } @IBAction func doneButtonPressed(_ sender: UIButton) { roomCaptureView?.captureSession.stop() doneButton.isHidden = true exportButton.isHidden = false } func captureView(didPresent: CapturedRoom, error: Error?) { statusLabel.isHidden = false statusLabel.text = error == nil ? "The scan was successfully completed" : "An error occurred during the scan: \(String(describing: error))" finalResults = didPresent print("DOOR HERE") print(finalResults?.doors.count as Any) exportButton.isHidden = false statusLabel.isHidden = false } @IBAction func exportButtonPressed(_ sender: UIButton) { let filename = "Room.usdz" let destinationURL = FileManager.default.temporaryDirectory.appending(path: filename) do { try finalResults?.export(to: destinationURL) let activityController = UIActivityViewController(activityItems: [destinationURL], applicationActivities: nil) }
Posted
by