Skip to content

Commit a2e563f

Browse files
committed
Update dependencies and adapt to Nodal 1.0 API changes
Update Nodal to 1.0.0, Pelagos to 0.1.3, and ThreeMF to 0.2.3. Replace Bool(xmlStringValue:) with manual boolean parsing.
1 parent 59dfa27 commit a2e563f

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

Package.resolved

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ let package = Package(
99
],
1010
dependencies: [
1111
.package(url: "https://github.com/tomasf/manifold-swift.git", .upToNextMinor(from: "0.4.0")),
12-
.package(url: "https://github.com/tomasf/ThreeMF.git", .upToNextMinor(from: "0.2.0")),
12+
.package(url: "https://github.com/tomasf/ThreeMF.git", .upToNextMinor(from: "0.2.3")),
1313
.package(url: "https://github.com/tomasf/Apus.git", .upToNextMinor(from: "0.1.1")),
14-
.package(url: "https://github.com/tomasf/Pelagos.git", .upToNextMinor(from: "0.1.2")),
14+
.package(url: "https://github.com/tomasf/Pelagos.git", .upToNextMinor(from: "0.1.3")),
1515
],
1616
targets: [
1717
.target(

Sources/Cadova/Concrete Layer/Output Providers/3MF/ThreeMFDataProvider+Helpers.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,12 @@ fileprivate extension PartSemantic {
7777
extension ThreeMF.Item {
7878
var printable: Bool? {
7979
get {
80-
customAttributes[.printable].flatMap { try? Bool(xmlStringValue: $0) }
80+
guard let value = customAttributes[.printable] else { return nil }
81+
switch value {
82+
case "true", "1": return true
83+
case "false", "0": return false
84+
default: return nil
85+
}
8186
}
8287
set {
8388
customAttributes[.printable] = newValue.map { $0 ? "1" : "0" }

0 commit comments

Comments
 (0)