solidworks_mcp.progress.svg¶
solidworks_mcp.progress.svg ¶
The README's progress image: two glossy, striped bars on a dark panel.
Hand-built SVG with no dependencies. It draws its own dark panel, so it reads the same in GitHub's light and dark themes. The stripes drift slowly (an SVG animation, which GitHub's image proxy keeps).
Attributes¶
CORE_INTERFACES
module-attribute
¶
CORE_INTERFACES = ('ISldWorks', 'IModelDoc2', 'IModelDocExtension', 'IPartDoc', 'IAssemblyDoc', 'IDrawingDoc', 'IFeatureManager', 'ISketchManager', 'ISelectionMgr', 'IComponent2', 'IFeature', 'ISketch')
LEVEL_COLOURS
module-attribute
¶
LEVEL_COLOURS: dict[SupportLevel, str] = {SupportLevel.STABLE: '#2ea043', SupportLevel.BETA: '#d29922', SupportLevel.EXPERIMENTAL: '#db6d28', SupportLevel.PLANNED: '#484f58'}
_DEFS
module-attribute
¶
_DEFS = '<defs>\n <linearGradient id="panel" x1="0" y1="0" x2="0" y2="1">\n <stop offset="0" stop-color="#161b22"/><stop offset="1" stop-color="#0d1117"/>\n </linearGradient>\n <linearGradient id="gloss" x1="0" y1="0" x2="0" y2="1">\n <stop offset="0" stop-color="#fff" stop-opacity=".45"/>\n <stop offset=".5" stop-color="#fff" stop-opacity=".08"/>\n <stop offset=".5" stop-color="#000" stop-opacity="0"/>\n <stop offset="1" stop-color="#000" stop-opacity=".18"/>\n </linearGradient>\n <linearGradient id="heat" gradientUnits="userSpaceOnUse" x1="{x0}" y1="0" x2="{x1}" y2="0">\n <stop offset="0" stop-color="#da3633"/><stop offset=".5" stop-color="#d29922"/>\n <stop offset="1" stop-color="#2ea043"/>\n </linearGradient>\n <pattern id="stripes" width="16" height="16" patternUnits="userSpaceOnUse" patternTransform="rotate(45)">\n <rect width="8" height="16" fill="#fff" fill-opacity=".14"/>\n <animateTransform attributeName="patternTransform" type="translate" additive="sum" from="0 0" to="16 0" dur="1.6s" repeatCount="indefinite"/>\n </pattern>\n <clipPath id="track-tools"><rect x="{x0}" y="{y1}" width="{w}" height="{h}" rx="{r}"/></clipPath>\n <clipPath id="track-com"><rect x="{x0}" y="{y2}" width="{w}" height="{h}" rx="{r}"/></clipPath>\n</defs>'
_FONT
module-attribute
¶
Classes¶
ComCoverage
dataclass
¶
ComCoverage(interfaces: tuple[InterfaceCoverage, ...], api_covered: int, api_total: int, type_library: str)
Coverage of the core interfaces and of the whole API.
Attributes:
| Name | Type | Description |
|---|---|---|
interfaces |
tuple[InterfaceCoverage, ...]
|
One entry per core interface, in |
api_covered |
int
|
Distinct method names called, across the whole API. |
api_total |
int
|
Distinct method names in the whole API. |
type_library |
str
|
The snapshot's source, which carries its version. |
SupportLevel ¶
Bases: StrEnum
The four support levels, most trusted first.
Functions:¶
_pct ¶
_text ¶
_text(x: float, y: float, body: str, size: int, fill: str, anchor: str = 'start', weight: str = '400') -> str
Source code in src/solidworks_mcp/progress/svg.py
_track ¶
One bar: track, coloured segments, stripes and gloss over the filled part.
Source code in src/solidworks_mcp/progress/svg.py
render ¶
The progress image.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
levels
|
Mapping[SupportLevel, int]
|
How many tools have each support level. |
required |
coverage
|
ComCoverage
|
COM coverage of the core interfaces and the whole API. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The SVG document. |
Source code in src/solidworks_mcp/progress/svg.py
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 | |