Syntax
[H,N,S,Supp,Parts]=SGdesignMotorN20([LM])
Input Parameter
LM : | | [LengthofMotor gearbox/Supplement wall]; default is [26 9 2.0] |
Output Parameter
H : | | Head / Shaft subtraction solid (Red) |
N : | | Head / Mtor subtraction solid (Green) |
S : | | Shape of Motor N20 (Magenta) |
Supp : | | Supplement solid (Yellow) |
Parts : | | required parts for assembly |
Examples
[H,N,S,Supp,Parts]=SGdesignMotorN20
A=SGbox;A=SGsubtract(A,H,'alignT',{'C','B'}); A=SGcolorfaces(A,'y'); SGwriteSTL(A,'BoxN20-A');
B=SGbox; B=SGsubtract(B,N,'alignT',{'C','F'}); B=SGcolorfaces(B,'g'); SGwriteSTL(B,'BoxN20-B');
SGfigure(-12,5); SGplotalpha(A); SGplotalpha(B,'','','',A,'alignT',{'F','B'}); VLFLplotlight(1,0.5);
SGplotalpha(S,'m','','',A,'alignT',{'C','B'});
SGbox([50,50,2]);B=ans; B=SGunion(B,Supp,'alignT',{'C','F'}); cla; SGTplotalpha(B);
SGsubtract(B,N,'alignT',{'C','F'}); B=ans; SGwriteSTL(B,'PlateN20');
SGcylinder(9/2,15);A=ans; A=SGTsetBFsimple(A);
SGsubtract(A,H,'alignT',{'C','F'}); A=ans; SGwriteSTL(A,'PinN20');
[H,N,S,Supp,Parts]=SGdesignMotorN20([26 26]);
SGbox([5,5,2]);B=ans; B=SGunion(B,Supp,'alignT',{'C','F'}); cla; SGTplotalpha(B); SGsubtract(B,N,'alignT',{'C','F'}); B=ans; SGwriteSTL(B,'MiniN20');
Copyright 2022-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth
Last html export of this page out of FM database by TL: 2025-09-21