forked from Severson-Group/eMach-matlab
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMotorCADGeometryInterface.m
More file actions
82 lines (63 loc) · 2.17 KB
/
Copy pathMotorCADGeometryInterface.m
File metadata and controls
82 lines (63 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
slot=72;
p=12;
drawModelGeomAngle=360/gcd(12,72)
drawModelSlotQuant=72/gcd(12,72)
angleOneSlot=drawModelGeomAngle/drawModelSlotQuant;
startAngle=drawModelGeomAngle/drawModelSlotQuant/2
%%
slotType = 1;
% Parallel Tooth
% Parallel Tooth Sqb
% Parallel Slot
% Slotless
% Form Wound
% Tapered Slot
statorDuct
p_Stator_Slots
%% Absoulute Input (left table)
p_Pole_Pair
p_Stator_Slots
i_Slot_Corner_Radius
p_Tooth_Tip_Depth
p_Tooth_Tip_Angle
%% Rotor Parameter
% Layer 1 - insider
L1_Magnet_Thickness
L1_Bridge_Thickness
L1_Pole_V_angle
L1_Magnet_Post
L1_Magnet_Separation
L1_Magnet_Segments
% # L1 Mag Gap Inner
% # L1 Mag Gap Outer
% Layer 2
%% Ratio - ParallelTooth
if slotType==1
i_Stator_OD=400
i_Split_Ratio =0.70 % constraints i_Stator_OD
statorBore=i_Stator_OD*i_Split_Ratio;
Ratio_SlotDepth_ParallelTooth=1;
Ratio_ToothWidth=0.6
Ratio_SlotOpening_ParallelTooth
slotDepth=(statorBore-statorThick)
i_YtoT =2.5 %ratio user defined YtoT
38.72/20.27
p_Airgap_Mecha
% scaled
%%
jv='210'
app = actxserver(strcat('designer.Application.',jv));
app.View().SetCurrentCase(1)
app.GetModel("HDEV_201019_LdLq_0").RestoreCadLink(1)
% geoApp=jmag.CreateGeometryEditor(1).GetDocument()
HDEV=JmagData(12)
app = designer.GetApplication()
geomApp = app.CreateGeometryEditor(1)
geomApp.GetDocument().GetSelection().Paste()
geomApp.GetDocument().GetAssembly().GetItem("so_009:so_009").OpenSketch()
geomApp.GetDocument().GetAssembly().GetItem("so_009:so_009").GetItem("Region Circler Pattern.2").SetProperty("Angle", angleOneSlot)
geomApp.GetDocument().GetAssembly().GetItem("so_009:so_009").GetItem("Region Circler Pattern").SetProperty("Angle", angleOneSlot)
geomApp.GetDocument().GetAssembly().GetItem("so_009:so_009").GetItem("Half of the Center Angle").SetProperty("Angle", startAngle)
%% Jmag Stator
geomApp.GetDocument().GetAssembly().GetItem("so_009:so_009").GetItem("SD1: Outside Diameter").SetProperty("Diameter", i_Stator_OD)
geomApp.GetDocument().GetAssembly().GetItem("so_009:so_009").GetItem("SD2: Inside Diameter").SetProperty("Diameter", 280)