Skip to content

Svg - #1

Merged
DomCR merged 13 commits into
masterfrom
svg
Sep 15, 2026
Merged

Svg#1
DomCR merged 13 commits into
masterfrom
svg

Conversation

@DomCR

@DomCR DomCR commented Jul 6, 2026

Copy link
Copy Markdown
Owner

No description provided.

DomCR added 13 commits July 5, 2026 16:25
Refactored SVG export by splitting `SvgXmlWriter` into `SvgDocumentBuilder`, `SvgEntityWriter`, `SvgStyleWriter`, and `CadXmlWriter` for better separation of concerns. Updated `SvgExporter` to use the new builder. Simplified `SvgConfiguration` and removed inheritance. Added `AssemblyInfo.cs` with strong-naming and test visibility. Cleaned up test project references.
Refactored SVG export pipeline for improved structure and maintainability. Moved color handling to CadXmlWriter and centralized PaperSpace logic. Updated SvgDocumentBuilder to use XDocument for merging and wrap entities in <svg>. SvgStyleWriter now outputs CSS styles for layers and entities. Entities include id and class attributes for better SVG styling and identification. Cleaned up redundant code and improved attribute handling.
Refactored SVG writer classes to improve separation of concerns and code clarity. Moved color and line weight formatting to CadXmlWriter, updated SvgStyleWriter to delegate XML writing, and unified document writing in SvgDocumentBuilder. Cleaned up method names, removed unused usings, and improved CSS style generation. Updated all usages to match the new structure.
Refactored SvgEntityWriter to use composition over inheritance by delegating XML writing to a private CadXmlWriter instance. Moved SVG formatting utilities to CadXmlWriter and updated all usages. Updated SvgDocumentBuilder to pass the writer instance. Cleaned up obsolete code and improved separation of concerns for better maintainability.
Replaces separate "stroke" and "stroke-width" attributes with a single CSS "style" attribute for SVG entities. Uses StringBuilder to construct style rules, improving maintainability and centralizing SVG styling logic. Handles cases for disabling stroke, custom colors, and line weights.
Introduce DecimalPlaces to SvgConfiguration for controlling SVG number formatting. Refactor SvgConverter and related methods to support decimal precision. Update SvgEntityWriter to batch entities before writing. Remove obsolete methods and improve code organization and clarity.
@DomCR
DomCR merged commit db119a2 into master Sep 15, 2026
1 of 4 checks passed
@DomCR
DomCR deleted the svg branch September 15, 2026 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant