Skip to content

The open source core of the open parametric design platform Archiyou

License

Notifications You must be signed in to change notification settings

ArchiyouApp/archiyou-core

Repository files navigation

archiyou

Project Screenshot

Archiyou is an online platform and Typescript/Javascript library to codify design and building know-how and publish it online. Use our editor and community platform for free at Archiyou.com.

License build and test Docs npm version

Example

This is a script on our platform:

// Parameters
WIDTH = 100;
DEPTH = 80; 
HEIGHT = 70;

legHeight = HEIGHT-TOP_THICKNESS;
leg = box(LEG_SIZE, LEG_SIZE, legHeight)
        .move(LEG_SIZE/2, LEG_SIZE/2,legHeight/2); // start position of leg
     
legs = leg.array([2,2],[WIDTH-LEG_SIZE,DEPTH-LEG_SIZE])
         .color('green');

top = boxbetween(
    [0,0,legHeight],
    [WIDTH, DEPTH, HEIGHT])
    .color('green');

top.fillet(1,'Face||top'); // finish table top

Library Features

  • Minimal object-orientated API that feels like describing your shape.
  • A lot of modeling techniques with our BREP and mesh kernel: CSG, 2D Sketch, surface modeling
  • Exports: BREP, STEP, GLTF/GLB, DXF, PDF, Excel etc
  • Generate documentation: spec sheets, plans, instructables
  • Connected CAD: Import assets (SVG, JPG) from the web and use for modeling
  • Assemble models by using scripts as components
  • More than a model: Manage data, pipelines, components and outputs
  • Publish your script as parametric model in a configurator and serve to the web

Platform Features

  • Free Editor
  • Open Design: Share scripts and build upon others
  • Project management [Coming]

Examples and use cases

Archiyou is focused on physical things to build - like furniture and constructions - but the Editor can do much more:

Where Archiyou really shines is handling documentation and output pipelines:

Developer Quickstart

To use Archiyou as a module to generate designs and documentation independently from our platform it's available as module on npm.

# install with any package manager
pnpm add archiyou 
# or
npm add archiyou
# or 
yarn add archiyou

Now run this script in Node or browser:

import { init, Brep, Doc } from 'archiyou'

await init();

const brep = new Brep();

const myModel = brep.Box(100)
    .subtract( // subtract a box from the main box
        brep.Box(50,50,100)
        .move(25,-25,50)
        .hide()
    ).fillet(5); // Give it round edges

await myModel.save('mybox.glb')

const myIso = myModel.iso([1,-1,1])
myIso.save('myboxiso.svg');  // export as SVG file

const myDoc = new Doc() // Doc module
                .create('myDoc') // start a new document (and first page)
                .page('myPage')
                .text('My design')  // place text
                .view('iso', myIso); // place view of myIso shapes

await myDoc.save('myboxdoc.pdf');

Development: Starter templates

For starter-templates for some popular frameworks and build stacks see /examples/templates.

It's easiest to clone this repo, navigate to the starter template directory (examples/templates) and use the npm install, dev etc commands.

If your framework is not present, just look at the others for inspiration. Modern ones work with the same methods. Contributions are welcome.

Notes on the WASM file

Archiyou is a TS/JS layer on top of a WASM build of OpenCascade. Your application needs to be able to find the WASM file for it to work. If you experience errors during import or execution this is most probably the cause! Check starter templates how to configure build systems like Vite for WASM.

Run scripts independently from Archiyou platform

If you want to locally execute scripts from our Editor and get certain outputs: use the Runner.

    import { Runner } from 'archiyou'
    // A runner executes Archiyou scripts
    const runner = new Runner()

    // First a Runner needs to load (because it uses WASM)
    runner.load().then(async (runner) => 
    {
         // Then you execute a script in the default scope
         const r = await runner.execute({ 
                     code: `b = box($SIZE)`, 
                     params: { SIZE: 100 } }, 
                     { formats: ['glb'] }
                  ); 
         const glb = r?.meshGLB; // The 3D model mesh in GLB format (default)
         console.log(`Generating a GLB box took: ${r.duration} ms`);
    });

Runner also offers easy ways to execute scripts in a Webworker which is the best way if you want create a larger online CAD application.

Roadmap 2026

Thanks to NLNET NG0 Commons Fund we can further develop the open source and open design community functionality of Archiyou.

This is a basic roadmap:

  • Open design user research, strategy and UX/UI
  • DevX: Archiyou as module, examples, templates
  • New high performance (mesh) geometry kernel: CSGRS and Meshup
  • Fully open source stack (including publishing)
  • New lightweight viewer/configurator: portability, extendability
  • New editor: more value for more users
  • New open design platform

Please reach out for more information, ideas or collaboration!

About

The open source core of the open parametric design platform Archiyou

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages