Posts

Post not yet marked as solved
0 Replies
176 Views
Hi I am trying to publish parts ore my hole iCloud on a Website. I am looking for days to finde a way to do that. I am hosting the Website from a Mac mini with macOS X Server. The easiest way I see is with CloudKit. Has anyone an idea? In the end something like https://www.icloud.com would be exactly what I want. But how? XD Ps: i am open for everything. Can be done over app (Xcode) can be done with server stuff what i have no idea about... Everything
Posted Last updated
.
Post not yet marked as solved
1 Replies
351 Views
i have a function that should create a Sphere. and that is working fine. But if i call this function multiple times i can just see the last created Objekt in the scene. var AllObjekts = [SCNNode]() func createSphere(X: Float, Y: Float, Z: Float, NumObj: Int, Color: NSColor){     let sceneView = BrainView           let scene = SCNScene(named: "Brain.scn")     sceneView?.scene = scene           let geometry:SCNGeometry = SCNSphere(radius: 0.1)     geometry.materials.first?.diffuse.contents = Color //NSColor.red           let geometryNode = SCNNode(geometry: geometry)     AllObjekts.append(geometryNode)     geometryNode.position = SCNVector3(x: CGFloat(X), y: CGFloat(Y), z: CGFloat(Z))     scene?.rootNode.addChildNode(AllObjekts[NumObj])   } createSphere(X: 0, Y: 0, Z: 0, NumObj: 0, Color: .green)     createSphere(X: 1, Y: 0, Z: 0, NumObj: 1, Color: .blue) how the **** can i fix it?
Posted Last updated
.
Post not yet marked as solved
2 Replies
392 Views
Hi, my Json file looks like that: {"Synapses": [["ID: 0", "XPosition: 387.8125", "YPosition: 502.96875", "Width: 187.375", "Height: 122.0625"],["ID: 16", "XPosition: 490.859375", "YPosition: 947.15625", "Width: 49.28125", "Height: 69.6875"]]} Ps: i deleted the arrays from 2 to 15. its nearly all the same. and thats my load function: func load(){//fileName: String) {           if let filemanger = Bundle.main.url(forResource: "Synapses", withExtension: "json"){               do{         let data = try Foundation.Data(contentsOf: filemanger)         let jsondecoder = JSONDecoder()         let datafromjson = try jsondecoder.decode([SynapsData].self, from: data)                   self.Data = datafromjson       }catch{         print("**** ey so ne scheisse\(error)")       }     }   } struct SynapsData: Codable {   var ID : Int   var SynapsX : CGFloat   var SynapsY : CGFloat   var SynapsWidth : CGFloat   var SynapsHeight : CGFloat } And my Output is just []. I just don't see the problem 😅.
Posted Last updated
.
Post marked as solved
2 Replies
1.6k Views
Hi I try to safe x, y, width and height values from a Objekt detection AI in a Array. rectangle = CGRect(x: boundingBox.minX*image.size.width, y: (1-boundingBox.minY-boundingBox.height)*image.size.height, width: boundingBox.width*image.size.width, height: boundingBox.height*image.size.height) var XPoitions: [Double] = Array() XPoitions.append(rectangle.origin.x) The Error say "No exact matches in call to instance method 'append'". And i am not sure how to fix it......
Posted Last updated
.
Post not yet marked as solved
1 Replies
373 Views
Hi, I've been looking for a way to get my CoreML object detection models into a macOS application for days now. PS: I am a complete beginner and the only thing I have managed to do is to get the models into an IOS app. But that just looks like crap when you run it for macOS. Does anyone have an idea where I could look? Or if it just doesn't work?
Posted Last updated
.