Skip to content

Commit

Permalink
Simplifies properties outer-dimension and mass [fix #10]
Browse files Browse the repository at this point in the history
  • Loading branch information
hoijui committed Jun 16, 2024
1 parent 9e0ffea commit 317fe32
Show file tree
Hide file tree
Showing 7 changed files with 101 additions and 67 deletions.
10 changes: 6 additions & 4 deletions res/sample_data/okh-LOSH-Dummy-A.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@
:OuterDimensionsLOSHdummyMOSHA
a okh:OuterDimensions ;
rdfs:label "outer dimensions of LOSH Dummy MOSH-A" ; # use rdfs:label of :LOSHdummyMOSHA
okh:openSCAD "cube(size = [300,300,300]" ;
okh:unit "mm"
okh:width "300"^^xsd:boolean ;
okh:depth "300"^^xsd:boolean ;
okh:height "300"^^xsd:boolean ;
.

:PubStethoscope
Expand Down Expand Up @@ -120,8 +121,9 @@
:OuterDimensionsClampRing
a okh:OuterDimensions ;
rdfs:label "outer dimensions of Clamp Ring" ;
okh:openSCAD "cylinder(h=30, r=28)" ;
okh:unit "mm"
okh:width "56"^^xsd:boolean ;
okh:depth "56"^^xsd:boolean ;
okh:height "30"^^xsd:boolean ;
.

:ClampRing_image
Expand Down
30 changes: 18 additions & 12 deletions res/sample_data/okh-OHLOOM.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@
:OuterDimensionsOHLOOM
a okh:OuterDimensions ;
rdfs:label "outer dimensions of OHLOOM" ;
okh:openSCAD "cube(size = [400,350,150])" ;
okh:unit "mm" ;
okh:width "400"^^xsd:boolean ;
okh:depth "350"^^xsd:boolean ;
okh:height "150"^^xsd:boolean ;
.

:fabricWidthMM
Expand Down Expand Up @@ -129,8 +130,9 @@
:OuterDimensionsClampRing
a okh:OuterDimensions ;
rdfs:label "outer dimensions of Clamp Ring" ;
okh:openSCAD "cylinder(h=30, r=28)" ;
okh:unit "mm"
okh:width "56"^^xsd:boolean ;
okh:depth "56"^^xsd:boolean ;
okh:height "30"^^xsd:boolean ;
.

:ClampRing_image
Expand Down Expand Up @@ -180,8 +182,9 @@
:OuterDimensionsCombModul
a okh:OuterDimensions ;
rdfs:label "outer dimensions of Comb Modul" ;
okh:openSCAD "cube(size = [120,100,3])" ;
okh:unit "mm"
okh:width "120"^^xsd:boolean ;
okh:depth "100"^^xsd:boolean ;
okh:height "3"^^xsd:boolean ;
.

:CombModul_image
Expand Down Expand Up @@ -230,8 +233,9 @@
:OuterDimensionsPoleBase
a okh:OuterDimensions ;
rdfs:label "outer dimensions of Pole Base" ;
okh:openSCAD "cube(size = [125,110,100])" ;
okh:unit "mm"
okh:width "125"^^xsd:boolean ;
okh:depth "110"^^xsd:boolean ;
okh:height "100"^^xsd:boolean ;
.

:PoleBase_source
Expand Down Expand Up @@ -274,8 +278,9 @@
:OuterDimensionsRatchetPawl
a okh:OuterDimensions ;
rdfs:label "outer dimensions of Ratchet Pawl" ;
okh:openSCAD "cube(size = [130,20,20])" ;
okh:unit "mm"
okh:width "130"^^xsd:boolean ;
okh:depth "20"^^xsd:boolean ;
okh:height "20"^^xsd:boolean ;
.

:RatchetPawl_image
Expand Down Expand Up @@ -325,8 +330,9 @@
:OuterDimensionsRatchetWheel
a okh:OuterDimensions ;
rdfs:label "outer dimensions of Ratchet Wheel" ;
okh:openSCAD "cylinder(h=45, r=45)" ;
okh:unit "mm"
okh:width "90"^^xsd:boolean ;
okh:depth "90"^^xsd:boolean ;
okh:height "45"^^xsd:boolean ;
.

:RatchetWheel_image
Expand Down
12 changes: 8 additions & 4 deletions res/sample_data/okh-TEMPLATE-HOWTO.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,11 @@ tsdc = "MEC" # defines the manufacturing processes involved for this project; mu
bom = "BoM.csv" # relative path from the root directory IF the manifest file is _in_ the project's repositoy; use an URL otherwise
manufacturing-instructions = "/Documentation/Assembly_Guide/AssemblyGuide.md" # relative path from the root directory IF the manifest file is _in_ the project's repositoy; use an URL otherwise
user-manual = "/Documentation/User_Guide/UserGuide.md" # relative path from the root directory IF the manifest file is _in_ the project's repositoy; use an URL otherwise
outer-dimension-dim = "mm" # dimension of `outer-dimension` below (e.g. millimeter)
outer-dimension = "cube(size = [400,350,150])" # OpenSCAD primitive describing the outer shape; cylinders and spheres also possible
[outer-dimensions]
width = "400"
depth = "350"
height = "150"
[[part]] # section to link essential files for each self-designed component of this project
name = "your-awesome-part"
Expand All @@ -88,8 +91,9 @@ export = [ # multiple entries possible; relative path from the root directory IF
material = "PLA" # multiple entries possible
[[part.outer-dimensions]]
openSCAD = "cube(size = [120,100,3])" # OpenSCAD primitive describing the outer shape; cylinders and spheres also possible
unit = "mm"
width = "120"
depth = "100"
height = "3"
[[software]]
release = "https://github.com/arduino/ArduinoCore-mbed/releases/tag/1.3.2"
Expand Down
20 changes: 8 additions & 12 deletions res/sample_data/okh-TEMPLATE.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,12 @@ tsdc = "MEC"
bom = "BoM.csv"
manufacturing-instructions = "/Documentation/Assembly_Guide/AssemblyGuide.md"
user-manual = "/Documentation/User_Guide/UserGuide.md"
mass= 50330.0

[outer-dimensions]
openSCAD = "cube(size = [400,350,150])"
unit = "mm"

[mass]
value = 50.33
unit = "kg"
width = "400"
depth = "350"
height = "150"

[[part]]
name = "your-awesome-part"
Expand All @@ -43,14 +41,12 @@ export = [
"xxx.pdf",
"xxx.stl"
]
mass = 330.0

[part.outer-dimensions]
openSCAD = "cube(size = [120,100,3])"
unit = "mm"

[part.mass]
value = 330
unit = "g"
width = "120"
depth = "100"
height = "3"

[[software]]
release = "https://github.com/arduino/ArduinoCore-mbed/releases/tag/1.3.2"
Expand Down
17 changes: 7 additions & 10 deletions src/schema/okh.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -502,21 +502,18 @@
]
},
"outerDimensions": {
"description": "OpenSCAD primitive describing shape and size of the module or part.\\\nSee the OpenSCAD documentation here for syntax <https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Primitive_Solids>",
"description": "Outer dimensions of the OSH module or part in mm, which completely encompass the product.",
"type": "object",
"properties": {
"openSCAD": { "type": "string" },
"unit": { "enum" : [ "mm", "m", "cm" ]}
"width": { "type": "float" },
"depth": { "type": "float" },
"height": { "type": "float" }
},
"required": [ "openSCAD", "unit" ]
"required": [ "width", "depth", "height" ]
},
"mass": {
"type": "object",
"properties": {
"value": { "type": "number" },
"unit": { "enum" : [ "g", "kg" ]}
},
"required": [ "value", "unit" ]
"description": "Mass of the part in g.",
"type": "number"
}
},
"required": [
Expand Down
23 changes: 7 additions & 16 deletions src/spec/okh.md
Original file line number Diff line number Diff line change
Expand Up @@ -427,11 +427,9 @@ general:
- e.g. `hard soldering`
- multiple inputs possible (with one entry each)
- `outer-dimensions` \[class\]
- `openSCAD` \[OpenSCAD primitive\]
- OpenSCAD primitive describing shape and size of the module
- e.g. `cube(size = [400,350,150])`
- `unit` \[string\]
- e.g. `mm`
- `width` in mm \[float\]
- `depth` in mm \[float\]
- `height` in mm \[float\]

#### PCB

Expand Down Expand Up @@ -507,17 +505,10 @@ general:
- reference of material used for this part
- e.g. `PLA`, `1.0715` (EN material number for free machining steel 11SMn30)
- `outer-dimensions` \[class\]
- `openSCAD` \[OpenSCAD primitive\]
- OpenSCAD primitive describing shape and size of the module
- e.g. `cube(size = [400,350,150])`
- `unit` \[string\]
- e.g. `mm`
- `mass` \[class\]
- `value` \[float\]
- mass of the part
- e.g. `120.5`
- `unit` \[string\]
- e.g. `g`
- `width` in mm \[float\]
- `depth` in mm \[float\]
- `height` in mm \[float\]
- `mass` of the part in g \[float\]
- `tsdc` \[TsDC-ID\] (multiple)
- manufacturing process for which this part has been designed
(= technology-specific documentation criteria applying for this part)
Expand Down
56 changes: 47 additions & 9 deletions src/spec/okh.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,9 @@ okh:Mass
a owl:Class ;
rdfs:label "mass"@en ;
rdfs:comment "…of a module or a part"@en ;
vs:term_status "unstable" ;
vs:term_status "deprecated" ;
owl:deprecated "true"^^xsd:boolean ;
cc:deprecatedOn "2024-06-16"^^xsd:date ;
.

okh:ComponentReference
Expand Down Expand Up @@ -583,25 +585,29 @@ okh:material

okh:hasOuterDimensions
a owl:ObjectProperty ;
rdfs:label "outer dimensions using OpenSCAD primitives" ;
rdfs:comment "https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Primitive_Solids" ;
rdfs:label "outer dimensions" ;
rdfs:comment "defined though widht, depth nad height in mm" ;
schema:rangeIncludes okh:OuterDimensions ;
rdfs:subPropertyOf okh:productionMetadata ;
vs:term_status "unstable" ;
.

okh:hasMass
a owl:ObjectProperty ;
rdfs:label "mass of the component" ;
a owl:DatatypeProperty ;
rdfs:label "mass [g]"@en ;
rdfs:comment "mass of the component in g"@en ;
rdfs:subPropertyOf okh:productionMetadata ;
vs:term_status "unstable" ;
schema:rangeIncludes okh:Mass ;
schema:rangeIncludes xsd:float ;
.

okh:openSCAD
a owl:DatatypeProperty ;
rdfs:label "OpenSCAD code defining a shape" ;
vs:term_status "unstable" ;
vs:term_status "deprecated" ;
owl:deprecated "true"^^xsd:boolean ;
cc:deprecatedOn "2024-06-16"^^xsd:date ;
schema:supersededBy okh:width, okh:depth, okh:height;
schema:domainIncludes okh:OuterDimensions ;
schema:rangeIncludes xsd:string ;
.
Expand All @@ -614,11 +620,40 @@ okh:openScad
owl:sameAs okh:openSCAD ;
.

okh:width
a owl:DatatypeProperty ;
rdfs:label "width [mm]"@en ;
rdfs:comment "The outter width of the product"@en ; # TODO Define whether this incldues or excludes packaging
vs:term_status "unstable" ;
schema:domainIncludes okh:OuterDimensions ;
schema:rangeIncludes xsd:float ; # TODO ... or should it be int?
.

okh:depth
a owl:DatatypeProperty ;
rdfs:label "depth [mm]"@en ;
rdfs:comment "The outter depth of the product"@en ; # TODO Define whether this incldues or excludes packaging
vs:term_status "unstable" ;
schema:domainIncludes okh:OuterDimensions ;
schema:rangeIncludes xsd:float ; # TODO ... or should it be int?
.

okh:height
a owl:DatatypeProperty ;
rdfs:label "height [mm]"@en ;
rdfs:comment "The outter height of the product"@en ; # TODO Define whether this incldues or excludes packaging
vs:term_status "unstable" ;
schema:domainIncludes okh:OuterDimensions ;
schema:rangeIncludes xsd:float ; # TODO ... or should it be int?
.

okh:unit
a owl:DatatypeProperty ;
rdfs:label "unit" ;
rdfs:comment "mm, cm, m, g, kg" ;
vs:term_status "unstable" ;
vs:term_status "deprecated" ;
owl:deprecated "true"^^xsd:boolean ;
cc:deprecatedOn "2024-06-16"^^xsd:date ;
schema:domainIncludes
okh:Mass,
okh:OuterDimensions ;
Expand All @@ -627,7 +662,10 @@ okh:unit
okh:value
a owl:DatatypeProperty ;
rdfs:label "value" ;
vs:term_status "unstable" ;
vs:term_status "deprecated" ;
owl:deprecated "true"^^xsd:boolean ;
cc:deprecatedOn "2024-06-16"^^xsd:date ;
schema:supersededBy okh:hasMass;
schema:domainIncludes okh:Mass ;
.

Expand Down

0 comments on commit 317fe32

Please sign in to comment.