Skip to content

feat(working-with-geometry-section): add 36 compiler-validated C# examples - Working With Geometry Section [26.8.0/net8.0] - #90

Merged
amjad-sahi merged 43 commits into
mainfrom
feat/examples-working-with-geometry-section-20260828
Aug 28, 2026
Merged

feat(working-with-geometry-section): add 36 compiler-validated C# examples - Working With Geometry Section [26.8.0/net8.0]#90
amjad-sahi merged 43 commits into
mainfrom
feat/examples-working-with-geometry-section-20260828

Conversation

@agent-aspose-diagram-examples

Copy link
Copy Markdown
Collaborator

Working With Geometry Section — Compiler-Validated C# Examples

What this PR does

Adds 36 AI-generated, compiler-validated C# examples for the Working With Geometry Section category of Aspose.Diagram for .NET.

All examples were generated by the Aspose.Diagram Examples Generator Agent and passed the full three-attempt validation pipeline before being included.

Validation Summary

Check Result
dotnet build ✅ Passed — zero compiler errors
dotnet run ✅ Passed — clean execution
Aspose.Diagram Version 26.8.0
Target Framework net8.0
Examples Added 36

Pipeline

Each example was generated and validated through:

  1. Attempt 1 — MCP direct code retrieval and assembly
  2. Attempt 2 — MCP retrieval with injected API correction rules
  3. Attempt 3 — LLM repair pass with compiler errors and rules

Only examples that passed both dotnet build and dotnet run are included in this PR.

Examples Added

File Task Description
apply-a-gradient-fill-to-geometry-interiors-by-setting-appropriate-shapesheet-fill-properties-programmatically.cs Apply a gradient fill to geometry interiors by setting appropriate shapesheet fill properties programmatically
apply-a-scaling-transformation-to-all-vertices-in-a-geometry-to-uniformly-enlarge-the-shape.cs Apply a scaling transformation to all vertices in a geometry to uniformly enlarge the shape
apply-custom-line-caps-to-geometry-edges-to-enhance-visual-representation-of-diagram-connectors.cs Apply custom line caps to geometry edges to enhance visual representation of diagram connectors
batch-process-multiple-shapes-adding-a-standard-geometry-template-to-each-for-consistent-styling.cs Batch process multiple shapes adding a standard geometry template to each for consistent styling
calculate-the-total-length-of-all-line-segments-in-a-geometry-to-assess-diagram-complexity-metrics.cs Calculate the total length of all line segments in a geometry to assess diagram complexity metrics
clone-geometry-from-a-source-shape-and-apply-it-to-a-target-shape-to-duplicate-design-elements.cs Clone geometry from a source shape and apply it to a target shape to duplicate design elements
compare-geometry-vertex-lists-before-and-after-modification-to-ensure-intended-changes-were-applied-correctly.cs Compare geometry vertex lists before and after modification to ensure intended changes were applied correctly
copy-geometry-from-a-master-template-shape-to-multiple-target-shapes-to-ensure-uniform-design-standards.cs Copy geometry from a master template shape to multiple target shapes to ensure uniform design standards
create-a-new-geometry-instance-define-custom-vertices-and-add-it-to-the-target-shape.cs Create a new geometry instance define custom vertices and add it to the target shape
create-asynchronous-methods-to-add-geometries-to-shapes-improving-performance-for-large-diagram-processing.cs Create asynchronous methods to add geometries to shapes improving performance for large diagram processing
document-geometry-changes-by-adding-comments-to-shapesheet-cells-describing-the-modification-rationale.cs Document geometry changes by adding comments to shapesheet cells describing the modification rationale
edit-connector-geometry-entries-directly-in-the-shapesheet-to-improve-diagram-routing-clarity.cs Edit connector geometry entries directly in the shapesheet to improve diagram routing clarity
export-the-diagram-with-updated-geometries-to-svg-format-to-verify-vector-rendering-accuracy.cs Export the diagram with updated geometries to svg format to verify vector rendering accuracy
export-the-updated-diagram-to-pdf-format-to-verify-visual-appearance-after-geometry-adjustments.cs Export the updated diagram to pdf format to verify visual appearance after geometry adjustments
filter-geometries-by-line-type-processing-only-those-with-solid-lines-for-further-customization.cs Filter geometries by line type processing only those with solid lines for further customization
generate-unit-tests-that-verify-geometry-addition-removal-and-vertex-updates-produce-expected-shapesheet-values.cs Generate unit tests that verify geometry addition removal and vertex updates produce expected shapesheet values
handle-out-of-range-geometry-index-exceptions-by-logging-detailed-error-information-and-skipping-invalid-entries.cs Handle out of range geometry index exceptions by logging detailed error information and skipping invalid entries
implement-a-transaction-scope-that-commits-geometry-changes-only-if-all-modifications-succeed-without-errors.cs Implement a transaction scope that commits geometry changes only if all modifications succeed without errors
implement-conditional-logic-that-updates-geometry-vertices-only-when-shape-width-exceeds-a-defined-threshold.cs Implement conditional logic that updates geometry vertices only when shape width exceeds a defined threshold
integrate-geometry-manipulation-into-a-web-api-endpoint-allowing-remote-clients-to-modify-visio-shapes.cs Integrate geometry manipulation into a web api endpoint allowing remote clients to modify visio shapes
iterate-through-each-geometry-object-in-the-collection-and-log-vertex-coordinates-for-debugging.cs Iterate through each geometry object in the collection and log vertex coordinates for debugging
measure-the-bounding-box-of-a-geometry-and-log-width-and-height-for-layout-analysis.cs Measure the bounding box of a geometry and log width and height for layout analysis
merge-multiple-geometries-within-a-shape-into-a-single-geometry-to-simplify-the-shapesheet-structure.cs Merge multiple geometries within a shape into a single geometry to simplify the shapesheet structure
offset-geometry-coordinates-by-a-given-delta-to-reposition-the-shape-without-changing-its-size.cs Offset geometry coordinates by a given delta to reposition the shape without changing its size
remove-the-first-geometry-entry-from-a-connector-shape-using-the-linetocol-method.cs Remove the first geometry entry from a connector shape using the linetocol method
retrieve-a-shape-from-a-visio-diagram-and-obtain-its-geometry-collection-for-analysis.cs Retrieve a shape from a visio diagram and obtain its geometry collection for analysis
rollback-geometry-updates-within-a-transaction-when-an-exception-occurs-to-maintain-diagram-integrity.cs Rollback geometry updates within a transaction when an exception occurs to maintain diagram integrity
rotate-geometry-vertices-by-a-specified-angle-to-align-the-shape-with-diagram-orientation-requirements.cs Rotate geometry vertices by a specified angle to align the shape with diagram orientation requirements
save-the-modified-visio-diagram-to-the-original-file-path-persisting-all-geometry-changes.cs Save the modified visio diagram to the original file path persisting all geometry changes
schedule-periodic-geometry-validation-jobs-that-scan-diagrams-for-missing-or-corrupted-geometry-entries.cs Schedule periodic geometry validation jobs that scan diagrams for missing or corrupted geometry entries
set-geometry-fill-color-through-shapesheet-cells-to-highlight-specific-diagram-regions-programmatically.cs Set geometry fill color through shapesheet cells to highlight specific diagram regions programmatically
update-geometry-line-type-property-to-dashed-style-for-visual-distinction-of-connector-paths.cs Update geometry line type property to dashed style for visual distinction of connector paths
update-vertex-coordinates-of-an-existing-geometry-to-reshape-the-shape-according-to-new-dimensions.cs Update vertex coordinates of an existing geometry to reshape the shape according to new dimensions
use-a-configuration-file-to-specify-which-geometries-to-modify-enabling-flexible-runtime-behavior.cs Use a configuration file to specify which geometries to modify enabling flexible runtime behavior
use-shapesheet-formulas-to-dynamically-calculate-geometry-vertex-positions-based-on-shape-dimensions.cs Use shapesheet formulas to dynamically calculate geometry vertex positions based on shape dimensions
validate-that-the-geometry-section-contains-the-expected-number-of-geometries-after-modifications.cs Validate that the geometry section contains the expected number of geometries after modifications

Validation Details


This PR was created automatically by the Aspose.Diagram Examples Generator Agent. Merge after reviewing the examples above.

…metry-interiors-by-setting-appropriate-shapesheet-fill-properties-programmatically

Task: Apply a gradient fill to geometry interiors by setting appropriate shapesheet fill properties programmatically

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…on-to-all-vertices-in-a-geometry-to-uniformly-enlarge-the-shape

Task: Apply a scaling transformation to all vertices in a geometry to uniformly enlarge the shape

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…ometry-edges-to-enhance-visual-representation-of-diagram-connectors

Task: Apply custom line caps to geometry edges to enhance visual representation of diagram connectors

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…s-adding-a-standard-geometry-template-to-each-for-consistent-styling

Task: Batch process multiple shapes adding a standard geometry template to each for consistent styling

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…f-all-line-segments-in-a-geometry-to-assess-diagram-complexity-metrics

Task: Calculate the total length of all line segments in a geometry to assess diagram complexity metrics

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…-shape-and-apply-it-to-a-target-shape-to-duplicate-design-elements

Task: Clone geometry from a source shape and apply it to a target shape to duplicate design elements

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…s-before-and-after-modification-to-ensure-intended-changes-were-applied-correctly

Task: Compare geometry vertex lists before and after modification to ensure intended changes were applied correctly

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…template-shape-to-multiple-target-shapes-to-ensure-uniform-design-standards

Task: Copy geometry from a master template shape to multiple target shapes to ensure uniform design standards

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…ce-define-custom-vertices-and-add-it-to-the-target-shape

Task: Create a new geometry instance define custom vertices and add it to the target shape

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…to-add-geometries-to-shapes-improving-performance-for-large-diagram-processing

Task: Create asynchronous methods to add geometries to shapes improving performance for large diagram processing

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…-adding-comments-to-shapesheet-cells-describing-the-modification-rationale

Task: Document geometry changes by adding comments to shapesheet cells describing the modification rationale

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…ies-directly-in-the-shapesheet-to-improve-diagram-routing-clarity

Task: Edit connector geometry entries directly in the shapesheet to improve diagram routing clarity

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…ted-geometries-to-svg-format-to-verify-vector-rendering-accuracy

Task: Export the diagram with updated geometries to svg format to verify vector rendering accuracy

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…o-pdf-format-to-verify-visual-appearance-after-geometry-adjustments

Task: Export the updated diagram to pdf format to verify visual appearance after geometry adjustments

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…pe-processing-only-those-with-solid-lines-for-further-customization

Task: Filter geometries by line type processing only those with solid lines for further customization

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…ify-geometry-addition-removal-and-vertex-updates-produce-expected-shapesheet-values

Task: Generate unit tests that verify geometry addition removal and vertex updates produce expected shapesheet values

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…-index-exceptions-by-logging-detailed-error-information-and-skipping-invalid-entries

Task: Handle out of range geometry index exceptions by logging detailed error information and skipping invalid entries

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…e-that-commits-geometry-changes-only-if-all-modifications-succeed-without-errors

Task: Implement a transaction scope that commits geometry changes only if all modifications succeed without errors

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…that-updates-geometry-vertices-only-when-shape-width-exceeds-a-defined-threshold

Task: Implement conditional logic that updates geometry vertices only when shape width exceeds a defined threshold

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…ion-into-a-web-api-endpoint-allowing-remote-clients-to-modify-visio-shapes

Task: Integrate geometry manipulation into a web api endpoint allowing remote clients to modify visio shapes

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…y-object-in-the-collection-and-log-vertex-coordinates-for-debugging

Task: Iterate through each geometry object in the collection and log vertex coordinates for debugging

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…a-geometry-and-log-width-and-height-for-layout-analysis

Task: Measure the bounding box of a geometry and log width and height for layout analysis

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…thin-a-shape-into-a-single-geometry-to-simplify-the-shapesheet-structure

Task: Merge multiple geometries within a shape into a single geometry to simplify the shapesheet structure

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…by-a-given-delta-to-reposition-the-shape-without-changing-its-size

Task: Offset geometry coordinates by a given delta to reposition the shape without changing its size

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…try-from-a-connector-shape-using-the-linetocol-method

Task: Remove the first geometry entry from a connector shape using the linetocol method

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…o-diagram-and-obtain-its-geometry-collection-for-analysis

Task: Retrieve a shape from a visio diagram and obtain its geometry collection for analysis

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…thin-a-transaction-when-an-exception-occurs-to-maintain-diagram-integrity

Task: Rollback geometry updates within a transaction when an exception occurs to maintain diagram integrity

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…a-specified-angle-to-align-the-shape-with-diagram-orientation-requirements

Task: Rotate geometry vertices by a specified angle to align the shape with diagram orientation requirements

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…ram-to-the-original-file-path-persisting-all-geometry-changes

Task: Save the modified visio diagram to the original file path persisting all geometry changes

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…alidation-jobs-that-scan-diagrams-for-missing-or-corrupted-geometry-entries

Task: Schedule periodic geometry validation jobs that scan diagrams for missing or corrupted geometry entries

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…ugh-shapesheet-cells-to-highlight-specific-diagram-regions-programmatically

Task: Set geometry fill color through shapesheet cells to highlight specific diagram regions programmatically

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…operty-to-dashed-style-for-visual-distinction-of-connector-paths

Task: Update geometry line type property to dashed style for visual distinction of connector paths

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…-an-existing-geometry-to-reshape-the-shape-according-to-new-dimensions

Task: Update vertex coordinates of an existing geometry to reshape the shape according to new dimensions

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…specify-which-geometries-to-modify-enabling-flexible-runtime-behavior

Task: Use a configuration file to specify which geometries to modify enabling flexible runtime behavior

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…ynamically-calculate-geometry-vertex-positions-based-on-shape-dimensions

Task: Use shapesheet formulas to dynamically calculate geometry vertex positions based on shape dimensions

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…ection-contains-the-expected-number-of-geometries-after-modifications

Task: Validate that the geometry section contains the expected number of geometries after modifications

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…e example catalogue for Working With Geometry Section category
@amjad-sahi
amjad-sahi merged commit 31785dd into main Aug 28, 2026
1 check passed
@amjad-sahi
amjad-sahi deleted the feat/examples-working-with-geometry-section-20260828 branch August 28, 2026 16:09
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.

2 participants