Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Usage of semicolon with Workbenches

test

use std::geo2d::Circle;
use std::ops::translate;

{ // op with body
    Circle(radius = 5mm);
}.translate(y=[-34mm/2 , 34mm/2]);

test

use std::geo2d::Circle;
use std::ops::translate;

 // op without body
Circle( radius = 5mm )
    .translate(y = [-34mm/2 , 34mm/2]);

test

use std::geo2d::Circle;
use std::ops::translate;

{
    Circle(radius = 5mm) // missing semicolon is ok.
}.translate(y=[-34mm/2 , 34mm/2]);

test

{}.std::ops::translate(x = 5mm) // warning: Calling operation on empty geometry

test

use std::geo2d::Circle;

Circle(radius = 2mm) { Circle(radius = 1mm); } // parse_error: sketch with body

test

std::ops::translate(x = 3.0mm); // error: Cannot call operation without workpiece. 
{}.std::ops::translate(x = 3.0mm);  // warning: Calling operation on empty geometry

test

use std::geo2d::Circle;
use std::ops::translate;

// group
{ 
    Circle(radius = 1mm); 
    Circle(radius = 2mm); 
}

test

use std::geo2d::Circle;
use std::ops::translate;

// assignment + group
a = { 
    Circle(radius = 1mm); 
    Circle(radius = 2mm); 
};