start

Syntax

  • start id --> operations

Parameters

  1. id—(identifier)
    Unique identifier for the start rule.
  2. operations
    A sequence of shape operations to execute.

Description

The start keyword marks a rule as the start rule of the current rule set (i.e. the cga file).

This rule can be used not only by its id but also conveniently via the generic start, see example below.

Start rules can be used in rule re-definitions of extension rules inside import statements. See the import page for detailed information (syntax 6) and examples.

Start rules cannot be defined in styles other than the Default style.

Related

Examples

Reference a start rule

// rule.cga

start Init --> start(20) // same as Init(20)
start Init(height) --> extrude(height)

// main.cga

import rule : "rule.cga"

Lot --> rule.start(10) // same as rule.Init(10)


In this topic