Syntax
- extension id --> operations
Parameters
- id—(identifier)Unique identifier for the extension rule.
- operationsA sequence of shape operations to execute.
Description
The extension keyword marks a rule as an extension point of the current ruleset (i.e. the cga file).
Similarly to attributes, extension rules can be redefined in an import statement. See the import page for detailed information (syntax 6) and examples.
If an extension point should not generate anything by default, just use one NIL operation:
extension Rule --> NIL
Extension rules cannot be defined in styles other than the Default style.
Related
Examples
Redefine an extension rule
// rule.cga
extension Roof(angle) --> roofHip(angle)
Init --> Roof(22)
// main.cga
import rule : "rule.cga"( Roof(angle) --> roofGable(angle) )
Lot --> rule.Init