Shield Outline SVG Path Complexity Rater
Lexical command/numeric-token complexity of supplied shield path text, not rendered curvature, self-intersection or SVG grammar validity.
Description
SVG path text contains command letters and numeric parameters, but lexical counts do not establish geometric complexity.
SVG path text contains command letters and numeric parameters, but lexical counts do not establish geometric complexity.1
Parsing the characters of a path is different from validating or rendering it.
When to use Shield Outline SVG Path Complexity Rater
Use this tool to calculate or review the supplied observations under the stated rules. Establish the source tradition, viewing frame, coordinate units and independently annotated features.
How to use Shield Outline SVG Path Complexity Rater and understand its results
- Establish the source tradition, viewing frame, coordinate units and independently annotated features.
- Enter svgPathText, using the field meanings and rules below, then run the tool.
- Read result.lexicalCommandCount, result.numericLiteralCount, using the output meanings and calculation rules below.
- Correct any reported input issue and run again. Before using a successful result, check the stated units, signs, reference scope and observation coverage.
| Input field | Meaning | Value type | Requirement |
|---|---|---|---|
| svgPathText | Svg path text | string | Required |
Enter at most 8192 UTF-16 units of path text containing only SVG path command letters, numeric/scientific-notation characters, commas and whitespace. Count supported command letters and number tokens matching the numeric regular expression. Blank text returns zero counts.
commandCount=countMatches(/[MmLlHhVvCcSsQqTtAaZz]/); numberCount=countNumericRegexMatches(text) Use the matching field units and the exact boundary, ordering and reference rules above.
| Output field | Meaning | Value type |
|---|---|---|
| result | Calculated observation or reference | object |
| result.lexicalCommandCount | lexical Command Count | number |
| result.numericLiteralCount | numeric Literal Count | number |
{
"input": {
"svgPathText": "M0 0 L10 0 L10 10 Z"
},
"output": {
"result": {
"lexicalCommandCount": 4,
"numericLiteralCount": 6
}
}
} Limitations and assumptions
This is lexical counting, not SVG grammar validation. Command argument counts, arc flags, valid separators, geometry, rendering and visual complexity are not checked; incomplete path text can still be counted.
Missing required fields, unknown fields, wrong types and violated rules return input issues. Numeric values and outputs must be finite. Extremely large composite outputs are rejected.
Alternative or Complementary methods
For a related step, use Blazon Text Tokenizer to Structured Fields Parser: A blazon is a conventional verbal description of arms, while a restricted parser recognizes only an explicitly supported subset. For a complementary comparison, use Structured Fields to Blazon Sentence Serializer: A blazon orders a field description and charge descriptions according to an adopted convention.
References
-
Shield Outline SVG Path Complexity Rater — tool.io
Similar or alternative tools
- Blazon Text Tokenizer to Structured Fields Parser
A blazon is a conventional verbal description of arms, while a restricted parser recognizes only an explicitly supported subset.
- Structured Fields to Blazon Sentence Serializer
A blazon orders a field description and charge descriptions according to an adopted convention.