Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
OpenActuator committed Aug 5, 2022
1 parent 0352bb4 commit 89ed372
Show file tree
Hide file tree
Showing 7 changed files with 103 additions and 93 deletions.
38 changes: 20 additions & 18 deletions Code/01_DoSA-3D/DoSA-3D/FormMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1778,7 +1778,7 @@ private void buttonTestForce_Click(object sender, EventArgs e)
try
{
// 해석 전에 전처리 조건을 확인한다.
if (false == isForceTestOK(forceTest))
if (false == isForceTestOK())
return;

if(m_design.RemainedShapeNameList.Count != 0)
Expand Down Expand Up @@ -2051,7 +2051,7 @@ public void threadProcForZeroCurrent()
if (m_startedForceTest == null) return;

// 해석 전에 전처리 조건을 확인한다.
if (false == isForceTestOK(m_startedForceTest))
if (false == isForceTestOK())
return;

m_bSolvingThread = true;
Expand Down Expand Up @@ -2091,7 +2091,7 @@ public void threadProcForCurrent()
if (m_startedForceTest == null) return;

// 해석 전에 전처리 조건을 확인한다.
if (false == isForceTestOK(m_startedForceTest))
if (false == isForceTestOK())
return;

m_bSolvingThread = true;
Expand Down Expand Up @@ -3339,7 +3339,7 @@ private void panelEmpty_Resize(object sender, EventArgs e)

#region----------------------- 가상시험 관련 -------------------------------

private bool isForceTestOK(CForceTest forceTest)
private bool isForceTestOK()
{
try
{
Expand Down Expand Up @@ -3367,7 +3367,7 @@ private bool isForceTestOK(CForceTest forceTest)


// 2. 코일은 하나만 지원한다.
if (m_design.getKindNodeSize(EMKind.COIL) == 0)
if (m_design.isExistCoil() == false)
{
if (CSettingData.m_emLanguage == EMLanguage.Korean)
CNotice.noticeWarning("코일 파트가 필요합니다.");
Expand All @@ -3387,25 +3387,28 @@ private bool isForceTestOK(CForceTest forceTest)
return false;
}

//----------------------------------------------------------------------------------
// 2022-08-05
// - 코일 설계치를 계산하지 않고 저항과 턴을 입력하는 경우를 인정하기 위해 동작을 제한한다.
//----------------------------------------------------------------------------------
//// 3. 코일형상 입력을 확인한다.
//if (m_design.isCoilAreaOK() == false)
//{
// if (CSettingData.m_emLanguage == EMLanguage.Korean)
// CNotice.noticeWarning("코일형상 입력이 필요합니다.");
// else
// CNotice.noticeWarning("You need to enter the coil geometry dimensions.");

// 3. 코일형상 입력을 확인한다.
if (m_design.isCoilAreaOK() == false)
{
if (CSettingData.m_emLanguage == EMLanguage.Korean)
CNotice.noticeWarning("코일형상 입력이 필요합니다.");
else
CNotice.noticeWarning("You need to enter the coil geometry dimensions.");

return false;
}
// return false;
//}

// 4. 코일사양 계산을 확인한다.
if (m_design.isCoilSpecificationOK() == false)
{
if (CSettingData.m_emLanguage == EMLanguage.Korean)
CNotice.noticeWarning("코일사양 계산이 필요합니다.");
CNotice.noticeWarning("코일사양 문제가 있습니다.");
else
CNotice.noticeWarning("You need to calculate the coil specification.");
CNotice.noticeWarning("There is a problem with the coil specification.");

return false;
}
Expand Down Expand Up @@ -4107,7 +4110,6 @@ private void addRawNode(EMKind emKind)

try
{

PopupAddNode popupNodeName = new PopupAddNode(emKind, m_design.RemainedShapeNameList);
popupNodeName.StartPosition = FormStartPosition.CenterParent;

Expand Down
54 changes: 24 additions & 30 deletions Code/01_DoSA-3D/DoSA-3D/Nodes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -346,16 +346,11 @@ public bool isExistNode(string nodeName)
{
int nNodeCount = m_listNode.Where(p => p.NodeName == nodeName).Count();

//foreach (CNode node in m_listNode)
//{
// if (node.NodeName == nodeName)
// return true;
//}

// 존재하지 않으면 false 를 리턴하고 존재하면 true 를 리턴한다.
if (nNodeCount == 0)
return true;
else
return false;
else
return true;
}

public bool deleteNode(string nodeName)
Expand Down Expand Up @@ -530,32 +525,33 @@ public bool isExistMagnet()
{
int nMagnetCount = m_listNode.Where(p => p.KindKey == EMKind.MAGNET).Count();

//foreach (CNode node in m_listNode)
//{
// if (node.KindKey == EMKind.MAGNET)
// return true;
//}

if (nMagnetCount > 0)
return true;
else
// 존재하지 않으면 false 를 리턴하고 존재하면 true 를 리턴한다.
if (nMagnetCount == 0)
return false;
else
return true;
}

public bool isExistSteel()
{
int nSteelCount = m_listNode.Where(p => p.KindKey == EMKind.STEEL).Count();

//foreach (CNode node in m_listNode)
//{
// if (node.KindKey == EMKind.STEEL)
// return true;
//}

if (nSteelCount > 0)
return true;
// 존재하지 않으면 false 를 리턴하고 존재하면 true 를 리턴한다.
if (nSteelCount == 0)
return false;
else
return true;
}

public bool isExistCoil()
{
int nCoilCount = m_listNode.Where(p => p.KindKey == EMKind.COIL).Count();

// 존재하지 않으면 false 를 리턴하고 존재하면 true 를 리턴한다.
if (nCoilCount == 0)
return false;
else
return true;
}

internal bool isCoilAreaOK()
Expand All @@ -577,18 +573,16 @@ internal bool isCoilAreaOK()

internal bool isCoilSpecificationOK()
{
bool ret = false;

foreach (CNode node in m_listNode)
{
if (node.KindKey == EMKind.COIL)
{
if (((CCoil)node).Resistance > 0 && ((CCoil)node).Turns > 0)
ret = true;
if (((CCoil)node).Resistance <= 0 || ((CCoil)node).Turns <= 0)
return false;
}
}

return ret;
return true;
}


Expand Down
78 changes: 45 additions & 33 deletions Code/01_DoSA-3D/DoSA-3D/PopupNewDesign.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 12 additions & 10 deletions Code/01_DoSA-3D/DoSA-3D/PopupNewDesign.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,22 @@ public PopupNewDesign()
groupBoxComment.Text = "기능 제한";
labelComment1.Text = "1. 형상 제한";
labelComment2.Text = "- 코일 중심축은 Y 축과 일치해야 합니다.";
labelComment3.Text = "- 전류는 다각 코일이라도 원통 형태로 인가됩니다.";
labelComment4.Text = "2. 파트 수 제한";
labelComment5.Text = "- 동작은 하나의 파트만 지원합니다.";
labelComment6.Text = "- 하나의 코일만 지원합니다.";
labelComment3.Text = "- STEP 파일의 파트명은 영문만 지원합니다.";
labelComment4.Text = "- 다각 코일도 전류는 원통코일처럼 인가됩니다.";
labelComment5.Text = "2. 파트 수 제한";
labelComment6.Text = "- 움직이는 파트는 하나만 지원합니다.";
labelComment7.Text = "- 하나의 코일만 지원합니다.";
}
else
{
groupBoxComment.Text = "Functional limitations";
groupBoxComment.Text = "Limitations";
labelComment1.Text = " 1. Shape constraint";
labelComment2.Text = "- Coil central axis must coincide with Y axis.";
labelComment3.Text = "- Current is always applied in cylindrical form.";
labelComment4.Text = "2. Limited number of parts";
labelComment5.Text = "- Actions only support one part.";
labelComment6.Text = "- Only one coil is supported.";
labelComment2.Text = "- The coil center axis must coincide with the Y axis.";
labelComment3.Text = "- The part name of the STEP file supports only English.";
labelComment4.Text = "- In polygonal coils, current is applied like a cylindrical coil.";
labelComment5.Text = "2. Limited number of parts";
labelComment6.Text = "- Only one moving part is supported.";
labelComment7.Text = "- Only one coil is supported.";
}
}

Expand Down
4 changes: 2 additions & 2 deletions Code/01_DoSA-3D/DoSA-3D/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
// 사용 버전
[assembly: AssemblyVersion("1.2.6.0")]
[assembly: AssemblyFileVersion("1.2.6.0")]
[assembly: AssemblyVersion("1.2.7.0")]
[assembly: AssemblyFileVersion("1.2.7.0")]
// 테스트 버전
//[assembly: AssemblyVersion("1.2.0.0")]
//[assembly: AssemblyFileVersion("1.2.0.0")]
Binary file modified Code/01_DoSA-3D/DoSA-3D/bin/Debug/DoSA-3D.exe
Binary file not shown.
Binary file modified Code/01_DoSA-3D/DoSA-3D/bin/Release/DoSA-3D.exe
Binary file not shown.

0 comments on commit 89ed372

Please sign in to comment.