Skip to content

Commit

Permalink
Merge pull request #65 from ebocher/hatchStyle
Browse files Browse the repository at this point in the history
Add hatch element with distance, angle plus width to describe hatching
  • Loading branch information
ebocher committed Jul 11, 2024
2 parents e240d34 + 8b2c427 commit d7e9b23
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 23 deletions.
21 changes: 14 additions & 7 deletions 1-core/schemas/CartoSym-JSON.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@
"color": { "$ref": "#/$defs/color" },
"opacity": { "$ref": "#/$defs/zeroToOne" },
"pattern": { "$ref": "#/$defs/graphic" },
"dotpattern": { "$ref": "#/$defs/dotpattern" },
"hatchStyle": { "$ref": "#/$defs/hatchStyle" }
"hatch": { "$ref": "#/$defs/hatch" },
"dotpattern": { "$ref": "#/$defs/dotpattern" }
}
}
]
Expand Down Expand Up @@ -122,12 +122,19 @@
}
]
},
"hatchStyle":
"hatch":
{
"oneOf": [
{ "$ref": "#/$defs/idOrFnExpression" },
{ "type": "string", "enum": [ "forward", "backward", "xCross", "cross" ] }
]
"oneOf": [
{ "$ref": "#/$defs/idOrFnExpression" },
{
"type": "object",
"properties": {
"width": { "$ref": "#/$defs/unitValue" },
"angle": { "$ref": "#/$defs/numericExpression" },
"distance": { "$ref": "#/$defs/unitValue"}
}
}
]
},
"stroke":
{
Expand Down
27 changes: 11 additions & 16 deletions 1-core/sections/clause_12_advanced_fills.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,17 @@
=== Requirements Class "Hatch fills"
==== Overview

#TODO: Change the model to allow a full definition with 1 or 2 hatching line direction, spacing and thickness. However, define specific values corresponding to the current enums (and to classic legacy system capabilities) that should be used for maximum interoperability and would be tested by the ATS/ETS.#

[#img-uml-hatches]
.Hatches Fills UML Diagram
[plantuml, target=diagram-classes, format=png]
....
class Fill <<extended>>
Fill : hatchStyle: HatchStyle
Fill *-- HatchStyle
enum HatchStyle
HatchStyle : forward
HatchStyle : backward
HatchStyle : xCross
HatchStyle : cross
Fill : hatch: Hatch
Fill *-- Hatch
Hatch : width: float
Hatch : angle: float
Hatch : distance: float
....

This requirements class adds support for hatch fills. A hatch fill is a pattern of lines.
Expand All @@ -27,19 +23,18 @@ This requirements class adds support for hatch fills. A hatch fill is a pattern
[width="90%",options="header"]
|===
| Name | Definition | Type | Multiplicity
| hatchStyle | Hatch style | HatchStyle | 0..1
| hatch | Line-based hatch fill | Hatch | 0..1
|===

====== Hatches

.HatchStyle class
.Hatch class
[width="90%",options="header"]
|===
| Name | Definition | Data type and value | Multiplicity
| forward | Forward | float | 1
| backward | Backward | float | 1
| xCross | X-Cross | float | 1
| cross | Cross | float | 1
| width | Thickness of hatch | float | 0..1
| angle | Hatches orientation clockwise degree | float | 0..1
| distance | Distance between two consecutive hatches | float | 0..1
|===

==== Requirements
Expand Down

0 comments on commit d7e9b23

Please sign in to comment.