Skip to content

Add GShape class for common 2D shape operations and future extensibility #22

@338rajesh

Description

@338rajesh

Introduce a new superclass GShape to provide a common interface for 2D shapes (such as Circle, Ellipse, etc.). The main purpose is to streamline type identification, code reuse, and maintenance by allowing all 2D shapes to inherit from this class. While the initial implementation is for 2D shapes, the design should also consider extensibility, so that GShape can be adapted or extended for future 3D shape support if needed.

Key goals:

  • Facilitate easy identification and handling of shape objects in the codebase.
  • Abstract common geometric operations for 2D shapes (e.g., area, perimeter, transformations).
  • Ensure the class is structured to allow possible future extension to 3D shapes, without making 3D support a primary goal.
  • Include documentation and usage examples for developers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions