Foundation パターン

Implement three-layered geometric primitive traits in Rust.

1|Updated Sep 12, 2025
One-click install
npx skills add https://github.com/RedRing2020/RedRing --skill foundation-redring2020
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Foundation パターン
Source: https://github.com/RedRing2020/RedRing/tree/main/.github/skills/foundation-pattern
Command: npx skills add https://github.com/RedRing2020/RedRing --skill foundation-redring2020

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill defines and guides the implementation of a standardized, three-layered design pattern for all geometric primitives within the RedRing project, ensuring consistency and interoperability.

Core Features & Use Cases

  • Core Traits: Provides fundamental Constructor, Properties, and Measure traits for geometric shapes.
  • Extension Traits: Offers extended functionalities like bounding box calculations (Bounded) and spatial properties (SpatialExtension).
  • Transform Traits: Enables geometric transformations such as translation, rotation, and scaling (AnalysisTransform3D).
  • Use Case: When developing a new geometric primitive, like a Sphere, developers can follow the detailed guidelines in this Skill to implement the necessary traits, ensuring it seamlessly integrates with the existing geometry system.

Quick Start

Implement the LineSegment3DConstructor trait for the LineSegment3D struct in geo_primitives/src/line_segment_3d_foundation.rs.

Frequently Asked Questions about Foundation パターン

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement consistent geometric primitives in Rust?

Implement geometric primitives in Rust by adopting a three-layered design pattern that defines Core Traits, Extension Traits, and Transform Traits to ensure system consistency and interoperability.

What is the Foundation Pattern for geometric primitives?

The Foundation Pattern is a standardized three-layered design pattern for geometric primitives detailing Core Traits for construction, Extension Traits for spatial properties, and Transform Traits for geometric operations.

How do I add a new geometric primitive like a Sphere to a Rust architecture?

Add a new geometric primitive by following guidelines to implement necessary Constructor, Properties, Measure, Bounded, and AnalysisTransform3D traits within dedicated foundation files to integrate with the geometry system.

Does the Foundation Pattern support bounding box calculations and spatial extensions?

Yes, the Foundation Pattern supports bounding box calculations and spatial extensions through Extension Traits including Bounded, MeasurableExtension, and SpatialExtension for extended geometric functionality.

Can I handle geometric transformations like translation and rotation with this Rust design pattern?

Yes, you can handle geometric transformations like translation, rotation, and scaling using the AnalysisTransform3D trait provided within the Transform Traits layer of the design pattern.

What are the limitations of using a three-layered trait system for geometric primitives?

A limitation is the requirement to implement multiple trait layers including associated error handling, which demands strict adherence to specifications when creating any new geometric primitive.