長穴の測定(6点指定)
Namespace: fvalgcliAssembly: fvalgcli (in fvalgcli.dll) Version: 3.1.0.0 (3.1.0.11)
Syntax
C# |
---|
public static int fnFIE_cg_calc_long_hole_6point( DPNT_T pnt1, DPNT_T pnt2, DPNT_T pnt3, DPNT_T pnt4, DPNT_T pnt5, DPNT_T pnt6, ref double long1, ref double short1, ref double long2, ref double short2, ref DPNT_T center ) |
Visual Basic |
---|
Public Shared Function fnFIE_cg_calc_long_hole_6point ( pnt1 As DPNT_T, pnt2 As DPNT_T, pnt3 As DPNT_T, pnt4 As DPNT_T, pnt5 As DPNT_T, pnt6 As DPNT_T, ByRef long1 As Double, ByRef short1 As Double, ByRef long2 As Double, ByRef short2 As Double, ByRef center As DPNT_T ) As Integer |
Parameters
- pnt1
- Type: fvalgcli..::..DPNT_T
座標点P1
- pnt2
- Type: fvalgcli..::..DPNT_T
座標点P2
- pnt3
- Type: fvalgcli..::..DPNT_T
座標点P3
- pnt4
- Type: fvalgcli..::..DPNT_T
座標点P4
- pnt5
- Type: fvalgcli..::..DPNT_T
座標点P5
- pnt6
- Type: fvalgcli..::..DPNT_T
座標点P6
- long1
- Type: System..::..Double%
長穴の作る四角形の長辺1
- short1
- Type: System..::..Double%
長穴の作る四角形の短辺2
- long2
- Type: System..::..Double%
長穴の作る四角形の長辺2
- short2
- Type: System..::..Double%
長穴の作る四角形の短辺2
- center
- Type: fvalgcli..::..DPNT_T%
長穴の作る四角形の中心座標Pc
Return Value
Type: Int32以下のエラーコードを返します。
エラーコード:
f_err | 内容 |
---|---|
F_ERR_NONE | 正常終了 |
F_ERR_INVALID_PARAM | 不正なパラメータが渡された |
F_ERR_CALC_IMPOSSIBLE | 計算不能エラー |
F_ERR_NO_LICENCE | ライセンスエラー、または未初期化エラー |
Remarks
Examples
C# | Copy |
---|---|
// $Revision: 1.1 $ using System; using System.Collections.Generic; using System.Text; using fvalgcli; namespace TC { public partial class FIE { [FvPluginExecute] public void fnFIE_cg_calc_long_hole_6point() { int status = (int)f_err.F_ERR_NONE; DPNT_T pts1 = new DPNT_T(); DPNT_T pts2 = new DPNT_T(); DPNT_T pts3 = new DPNT_T(); DPNT_T pts4 = new DPNT_T(); DPNT_T pts5 = new DPNT_T(); DPNT_T pts6 = new DPNT_T(); DPNT_T center = new DPNT_T(); double long_len1 = new double(); double long_len2 = new double(); double short_len1 = new double(); double short_len2 = new double(); DPNT_T ans_center = DPNT_T.init(150, 150); // 長穴を構成する6点の座標を設定. pts1.x = 100; pts1.y = 100; pts2.x = 200; pts2.y = 100; pts3.x = 250; pts3.y = 150; pts4.x = 200; pts4.y = 200; pts5.x = 100; pts5.y = 200; pts6.x = 50; pts6.y = 150; status = api.fnFIE_cg_calc_long_hole_6point( pts1, pts2, pts3, pts4, pts5, pts6, ref long_len1, ref short_len1, ref long_len2, ref short_len2, ref center); Assert.IsTrue(status == (int)f_err.F_ERR_NONE, "エラーが発生しました。({0})", (f_err)status); // 結果を出力する. ConsoleOut.WriteFunctionName(":\n"); Console.WriteLine("6point long_len1 = {0}", long_len1); Console.WriteLine("6point short_len1 = {0}", short_len1); Console.WriteLine("6point long_len2 = {0}", long_len2); Console.WriteLine("6point short_len2 = {0}", short_len2); Console.WriteLine("6point center.x = {0}", center.x); Console.WriteLine("6point center.y = {0}", center.y); Console.Write(" ..."); ConsoleOut.IsTrue(center.x == ans_center.x && center.y == ans_center.y); } } } |
Visual Basic | Copy |
---|---|
' $Revision: 1.1 $ Imports System.Collections.Generic Imports System.Text Imports fvalgcli Public Partial Class FIE <FvPluginExecute> _ Public Sub fnFIE_cg_calc_long_hole_6point() Dim status As Integer = CInt(f_err.F_ERR_NONE) Dim pts1 As New DPNT_T() Dim pts2 As New DPNT_T() Dim pts3 As New DPNT_T() Dim pts4 As New DPNT_T() Dim pts5 As New DPNT_T() Dim pts6 As New DPNT_T() Dim center As New DPNT_T() Dim long_len1 As New Double() Dim long_len2 As New Double() Dim short_len1 As New Double() Dim short_len2 As New Double() Dim ans_center As DPNT_T = DPNT_T.init(150, 150) ' 長穴を構成する6点の座標を設定. pts1.x = 100 pts1.y = 100 pts2.x = 200 pts2.y = 100 pts3.x = 250 pts3.y = 150 pts4.x = 200 pts4.y = 200 pts5.x = 100 pts5.y = 200 pts6.x = 50 pts6.y = 150 status = api.fnFIE_cg_calc_long_hole_6point(pts1, pts2, pts3, pts4, pts5, pts6, _ long_len1, short_len1, long_len2, short_len2, center) Assert.IsTrue(status = CInt(f_err.F_ERR_NONE), "エラーが発生しました。({0})", CType(status, f_err)) ' 結果を出力する. ConsoleOut.WriteFunctionName(":" & vbLf) Console.WriteLine("6point long_len1 = {0}", long_len1) Console.WriteLine("6point short_len1 = {0}", short_len1) Console.WriteLine("6point long_len2 = {0}", long_len2) Console.WriteLine("6point short_len2 = {0}", short_len2) Console.WriteLine("6point center.x = {0}", center.x) Console.WriteLine("6point center.y = {0}", center.y) Console.Write(" ...") ConsoleOut.IsTrue(center.x = ans_center.x AndAlso center.y = ans_center.y) End Sub End Class |