Post

Replies

Boosts

Views

Activity

Add multiple Objekts to my Scene
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 fuck can i fix it?
1
0
670
Jul ’21
Share iCloud on Website XD
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
0
0
489
Apr ’22
CGRect Values append in Array
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......
2
0
2.8k
Jun ’21
Json decoder
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("fuck 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 😅.
2
0
659
Jun ’21
Add multiple Objekts to my Scene
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 fuck can i fix it?
Replies
1
Boosts
0
Views
670
Activity
Jul ’21
Share iCloud on Website XD
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
Replies
0
Boosts
0
Views
489
Activity
Apr ’22
CoreML Objekt Detection in macOS Application
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?
Replies
1
Boosts
0
Views
593
Activity
Jun ’21
CGRect Values append in Array
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......
Replies
2
Boosts
0
Views
2.8k
Activity
Jun ’21
Json decoder
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("fuck 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 😅.
Replies
2
Boosts
0
Views
659
Activity
Jun ’21