Introduction
OpenPlans is built on a hierarchical architecture that organizes geometric entities into distinct categories. Understanding these core concepts will help you build effective 2D floor plans and architectural drawings.Architecture Hierarchy
The library is organized into four main categories:Primitives
Basic 2D geometric entities like lines, arcs, rectangles, and polylines
Elements
Architectural components such as doors, windows, slabs, and stairs
Shapes
3D geometric forms including cuboids and cylinders
Layouts
Drawing composition tools like paper frames for creating technical drawings
Design Philosophy
Property-Based Configuration
All entities in OpenPlans follow a consistent pattern:Three.js Integration
All OpenPlans entities extend Three.js objects:- Primitives & Elements extend Three.js geometric classes
- Shapes extend kernel geometric primitives
- All entities can be added to Three.js scenes using
scene.add()
OpenPlans automatically manages geometry updates when you modify properties through setters.
Common Patterns
Creating Entities
All entities follow a consistent creation pattern:Modifying Properties
Use property setters to modify entities dynamically:Managing Lifecycle
OpenPlans tracks all created entities:Working with the Kernel
OpenPlans is built on top of theOpenGeometry kernel, which provides the underlying geometric computation engine. The kernel handles:
- Geometric computations
- BREP (Boundary Representation) data
- Shape manipulation
- Boolean operations
You need to initialize the OpenGeometry kernel before using advanced features:
Next Steps
Learn about Primitives
Explore basic 2D geometric entities in the Primitives section
Understand Elements
Discover architectural components in the Elements section
Work with Shapes
Create 3D geometry in the Shapes section
Create Layouts
Compose technical drawings in the Layouts section
Code Organization
The source code follows this structure:- Configuration interface
- Property management
- Geometry generation
- Material handling