Skip to content

Conversation

@saumyashahi
Copy link
Contributor

@saumyashahi saumyashahi commented Jun 15, 2025

Description

This PR adds an index.ts file implementing the SVG path generation logic for rendering different brick types using dynamic path calculation functions in the masonry module.

Key Features

  • generatePath() main function to generate SVG path strings for different brick types:
    - Simple bricks (type1)
    - Expression bricks (type2)
    - Compound bricks (type3)

  • Support for edge-wise path construction:
    - Top: Includes optional notch and label width adjustment
    - Right: Dynamically handles multiple argument notches
    - Bottom: Adjusts based on label width and bricky type
    - Left: Includes optional connection notch

  • getBoundingBox() function added to calculate bBox for each brick

@meganindya
Copy link
Member

next PR onwards please follow the commit pattern: <type>(masonry): [scope inside masonry] <message>

@meganindya
Copy link
Member

Also move this file to src/masonry/brick/utils/path.ts. You'll be adding a spec/path.spec.ts within the same utils folder.

@saumyashahi saumyashahi force-pushed the gsoc-dmp-2025/week-1/saumya branch from b87d98a to 80c9cc4 Compare June 17, 2025 14:34
@saumyashahi
Copy link
Contributor Author

next PR onwards please follow the commit pattern: <type>(masonry): [scope inside masonry] <message>

I fixed it, I rebased the commits, to reword the commit messages itself keeping the history clean. I will keep in mind from the next commits.

@saumyashahi
Copy link
Contributor Author

Also move this file to src/masonry/brick/utils/path.ts. You'll be adding a spec/path.spec.ts within the same utils folder.

I have moved the path.ts file to /brick/utils/path.ts

@meganindya meganindya changed the title feat: add brick SVG path generation logic GSoC/DMP 2025 Week 1: feat: add brick SVG path generation logic Jun 18, 2025
@meganindya meganindya merged commit 476b055 into develop Jun 18, 2025
4 checks passed
@meganindya meganindya added the gsoc Prospective task for GSoC label Jun 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gsoc Prospective task for GSoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants