Geom.piece()
Description
Creates a motor detail from geometric form and material.
Syntax
JSGeom.piece(shp: Shape, material: ConductorMaterial|CustomMaterial|EmptyMaterial|EndturnMaterial|GeneralMaterial|IronMaterial|MagnetParallelMaterial|MagnetRadialMaterial) -> Piece
 
Parameters
| Parameter | Type | Mandatory | Description | 
| shp | Shape |  | Geometric shape of the detail. | 
| material | ConductorMaterial\|CustomMaterial\|EmptyMaterial\|EndturnMaterial\|GeneralMaterial\|IronMaterial\|MagnetParallelMaterial\|MagnetRadialMaterial |  | Material of the detail. | 
Return value
| Type | Description | 
| Piece | Object of type Piece, motor detail. | 
Example
| JS | 
|---|
|  | let shp = Geom.cylinder(100, 100)
let material = Material.general();
let piece = Geom.piece(shp, material)
console.info(piece) // output:
 |