diff --git a/App/Hi.WpfPlus.dll b/App/Hi.WpfPlus.dll
index 3d92e10..488c9ec 100644
Binary files a/App/Hi.WpfPlus.dll and b/App/Hi.WpfPlus.dll differ
diff --git a/App/HiCbtr.dll b/App/HiCbtr.dll
index 0119f37..f4ea778 100644
Binary files a/App/HiCbtr.dll and b/App/HiCbtr.dll differ
diff --git a/App/HiDisp.dll b/App/HiDisp.dll
index 140521f..a3f74cd 100644
Binary files a/App/HiDisp.dll and b/App/HiDisp.dll differ
diff --git a/App/HiGeom.dll b/App/HiGeom.dll
index f07fc9e..846e78b 100644
Binary files a/App/HiGeom.dll and b/App/HiGeom.dll differ
diff --git a/App/HiLicense.dll b/App/HiLicense.dll
index f8226ac..b93f2ca 100644
Binary files a/App/HiLicense.dll and b/App/HiLicense.dll differ
diff --git a/App/HiMech.dll b/App/HiMech.dll
index 287c708..b9e505f 100644
Binary files a/App/HiMech.dll and b/App/HiMech.dll differ
diff --git a/App/HiNC-2025-win-desktop.deps.json b/App/HiNC-2025-win-desktop.deps.json
index 7c59600..7bd45c6 100644
--- a/App/HiNC-2025-win-desktop.deps.json
+++ b/App/HiNC-2025-win-desktop.deps.json
@@ -11,9 +11,9 @@
"dependencies": {
"AvalonEdit": "6.3.0.90",
"FontAwesome.Sharp": "6.3.0",
- "Hi.WpfPlus": "3.1.88",
- "HiNc": "3.1.103",
- "HiNc-Resource": "3.1.3",
+ "Hi.WpfPlus": "3.1.89",
+ "HiNc": "3.1.104",
+ "HiNc-Resource": "3.1.4",
"runtimepack.Microsoft.NETCore.App.Runtime.win-x64": "10.0.1",
"runtimepack.Microsoft.WindowsDesktop.App.Runtime.win-x64": "10.0.1",
"runtimepack.Microsoft.AspNetCore.App.Runtime.win-x64": "10.0.1"
@@ -1673,36 +1673,36 @@
}
}
},
- "Hi.WpfPlus/3.1.88": {
+ "Hi.WpfPlus/3.1.89": {
"dependencies": {
- "HiDisp": "3.1.90"
+ "HiDisp": "3.1.91"
},
"runtime": {
"lib/net10.0-windows7.0/Hi.WpfPlus.dll": {
- "assemblyVersion": "3.1.88.0",
- "fileVersion": "3.1.88.0"
+ "assemblyVersion": "3.1.89.0",
+ "fileVersion": "3.1.89.0"
}
}
},
- "HiCbtr/3.1.88": {
+ "HiCbtr/3.1.89": {
"dependencies": {
- "HiDisp": "3.1.90"
+ "HiDisp": "3.1.91"
},
"runtime": {
"lib/net10.0/HiCbtr.dll": {
- "assemblyVersion": "3.1.88.0",
- "fileVersion": "3.1.88.0"
+ "assemblyVersion": "3.1.89.0",
+ "fileVersion": "3.1.89.0"
}
}
},
- "HiDisp/3.1.90": {
+ "HiDisp/3.1.91": {
"dependencies": {
- "HiGeom": "3.1.82"
+ "HiGeom": "3.1.83"
},
"runtime": {
"lib/net10.0/HiDisp.dll": {
- "assemblyVersion": "3.1.90.0",
- "fileVersion": "3.1.90.0"
+ "assemblyVersion": "3.1.91.0",
+ "fileVersion": "3.1.91.0"
}
},
"native": {
@@ -1720,7 +1720,7 @@
}
}
},
- "HiGeom/3.1.82": {
+ "HiGeom/3.1.83": {
"dependencies": {
"Google.Protobuf": "3.28.3",
"Grpc.AspNetCore": "2.66.0",
@@ -1731,8 +1731,8 @@
},
"runtime": {
"lib/net10.0/HiGeom.dll": {
- "assemblyVersion": "3.1.82.0",
- "fileVersion": "3.1.82.0"
+ "assemblyVersion": "3.1.83.0",
+ "fileVersion": "3.1.83.0"
}
},
"resources": {
@@ -1744,27 +1744,27 @@
}
}
},
- "HiLicense/3.1.82": {
+ "HiLicense/3.1.83": {
"dependencies": {
- "HiGeom": "3.1.82"
+ "HiGeom": "3.1.83"
},
"runtime": {
"lib/net10.0/HiLicense.dll": {
- "assemblyVersion": "3.1.82.0",
- "fileVersion": "3.1.82.0"
+ "assemblyVersion": "3.1.83.0",
+ "fileVersion": "3.1.83.0"
}
}
},
- "HiMech/3.1.95": {
+ "HiMech/3.1.96": {
"dependencies": {
"CommandLineParser": "2.9.1",
- "HiCbtr": "3.1.88",
+ "HiCbtr": "3.1.89",
"Microsoft.CodeAnalysis.CSharp.Scripting": "5.0.0"
},
"runtime": {
"lib/net10.0/HiMech.dll": {
- "assemblyVersion": "3.1.95.0",
- "fileVersion": "3.1.95.0"
+ "assemblyVersion": "3.1.96.0",
+ "fileVersion": "3.1.96.0"
}
},
"resources": {
@@ -1779,19 +1779,19 @@
}
}
},
- "HiNc/3.1.103": {
+ "HiNc/3.1.104": {
"dependencies": {
"Google.Protobuf": "3.28.3",
"Grpc.AspNetCore": "2.66.0",
"Grpc.Net.Client": "2.66.0",
- "HiLicense": "3.1.82",
- "HiMech": "3.1.95",
- "HiUniNc": "3.1.92"
+ "HiLicense": "3.1.83",
+ "HiMech": "3.1.96",
+ "HiUniNc": "3.1.93"
},
"runtime": {
"lib/net10.0/HiNc.dll": {
- "assemblyVersion": "3.1.103.0",
- "fileVersion": "3.1.103.0"
+ "assemblyVersion": "3.1.104.0",
+ "fileVersion": "3.1.104.0"
}
},
"resources": {
@@ -1803,22 +1803,22 @@
}
}
},
- "HiNc-Resource/3.1.3": {
+ "HiNc-Resource/3.1.4": {
"runtime": {
"lib/net10.0/HiNc-Resource.dll": {
- "assemblyVersion": "3.1.3.0",
- "fileVersion": "3.1.3.0"
+ "assemblyVersion": "3.1.4.0",
+ "fileVersion": "3.1.4.0"
}
}
},
- "HiUniNc/3.1.92": {
+ "HiUniNc/3.1.93": {
"dependencies": {
- "HiMech": "3.1.95"
+ "HiMech": "3.1.96"
},
"runtime": {
"lib/net10.0/HiUniNc.dll": {
- "assemblyVersion": "3.1.92.0",
- "fileVersion": "3.1.92.0"
+ "assemblyVersion": "3.1.93.0",
+ "fileVersion": "3.1.93.0"
}
}
},
@@ -2191,68 +2191,68 @@
"path": "grpc.net.common/2.66.0",
"hashPath": "grpc.net.common.2.66.0.nupkg.sha512"
},
- "Hi.WpfPlus/3.1.88": {
+ "Hi.WpfPlus/3.1.89": {
"type": "package",
"serviceable": true,
- "sha512": "sha512-+97MfLoNhnfpyEpPoV+eEhlAgqEj5eh9hpD3xj0TAT7vHiAt86KzNc6zeLxbScylUVtPdRz2Mj7yzHsYhaE8lw==",
- "path": "hi.wpfplus/3.1.88",
- "hashPath": "hi.wpfplus.3.1.88.nupkg.sha512"
+ "sha512": "sha512-9dQXs9vLtYwjNbawAiN3JNjY0TDFsQGX3k52HH+/Lj6gL1cxuJ7t/e4nzMW2iofOOxn+PMYavCHVVj1hP9GuPw==",
+ "path": "hi.wpfplus/3.1.89",
+ "hashPath": "hi.wpfplus.3.1.89.nupkg.sha512"
},
- "HiCbtr/3.1.88": {
+ "HiCbtr/3.1.89": {
"type": "package",
"serviceable": true,
- "sha512": "sha512-OqvXh1bRQFKvV+45+zbtPznlALQc3Kgf2cGjc/oV3Y5WPfz39XN4pebJemPZHRkeDxsgcDNDdfbWYI+5PYxGAg==",
- "path": "hicbtr/3.1.88",
- "hashPath": "hicbtr.3.1.88.nupkg.sha512"
+ "sha512": "sha512-yfAiY+SQrjEcx4GUbGTCz8DFridw2zkq8AlnOB6xKXKAW8Zutg2n7iTQ40WPAEwsTM6QbGR6wnxcYlq8je3wBQ==",
+ "path": "hicbtr/3.1.89",
+ "hashPath": "hicbtr.3.1.89.nupkg.sha512"
},
- "HiDisp/3.1.90": {
+ "HiDisp/3.1.91": {
"type": "package",
"serviceable": true,
- "sha512": "sha512-K5LkBHKZV58zFxpoXtlsQUe6/5FwFeSTuAkcqeNMgH1720zBSgbWcwqoc4tS+FNALK8984rFbqYYH+fS+yAKkg==",
- "path": "hidisp/3.1.90",
- "hashPath": "hidisp.3.1.90.nupkg.sha512"
+ "sha512": "sha512-O6M5Qj/I6Mh3Ha8UchwC/qNP65QDjQDVawdGLOQdXzJ9UcCnnNyj0RqxAwKDZ0/iI05W0I9TqO/leOSqKvLnNg==",
+ "path": "hidisp/3.1.91",
+ "hashPath": "hidisp.3.1.91.nupkg.sha512"
},
- "HiGeom/3.1.82": {
+ "HiGeom/3.1.83": {
"type": "package",
"serviceable": true,
- "sha512": "sha512-1qkL2iiltNC+VK7/RxzD7RpJWHCAZLoisCKvQZsmP1Ct5+WmFUeT8Wg8FMr4w6FITBpL5XTOUE71CGdF6Ov04g==",
- "path": "higeom/3.1.82",
- "hashPath": "higeom.3.1.82.nupkg.sha512"
+ "sha512": "sha512-rG3fHzMwmKV9JERk1iSDmMSHmn4qMfIL6UakCRVeK0RYKnKZSik/WtQbp8D92m2euw6QmG/8uowHchEWpCoqbw==",
+ "path": "higeom/3.1.83",
+ "hashPath": "higeom.3.1.83.nupkg.sha512"
},
- "HiLicense/3.1.82": {
+ "HiLicense/3.1.83": {
"type": "package",
"serviceable": true,
- "sha512": "sha512-jde/g6xvX3qCS+5OWdL8WQ6kE349dLkRpNbEgyil6pfvHe5QPfJAhtv2hfPQdgFla0lXmP7yntHO3n/AqvsB6g==",
- "path": "hilicense/3.1.82",
- "hashPath": "hilicense.3.1.82.nupkg.sha512"
+ "sha512": "sha512-Awy+W14oB4gFp940wAI8ezS9faWVNnnTU4TIddyWAbmHu/BDAbV+1n/+Y79wRC0MGTkaEu9VWF/JxpTuvzg2Ug==",
+ "path": "hilicense/3.1.83",
+ "hashPath": "hilicense.3.1.83.nupkg.sha512"
},
- "HiMech/3.1.95": {
+ "HiMech/3.1.96": {
"type": "package",
"serviceable": true,
- "sha512": "sha512-z6OTl1Edj+i12dF7Nr1XlW08a26MU4cSKAoxuqw7qFhmIdI76BQBZCowXONKyJaqJZWbYn6LC4fYJCHs76HKeA==",
- "path": "himech/3.1.95",
- "hashPath": "himech.3.1.95.nupkg.sha512"
+ "sha512": "sha512-GgSrKuIiiYWnTr8qFR5at8Pg8N8J+51om7djUh29T9azef8C2gpSXWfb/5noUcPWY4fX3fLfj0lEU/WEdpytAw==",
+ "path": "himech/3.1.96",
+ "hashPath": "himech.3.1.96.nupkg.sha512"
},
- "HiNc/3.1.103": {
+ "HiNc/3.1.104": {
"type": "package",
"serviceable": true,
- "sha512": "sha512-/nzPuZ8WBhVo14I6dISPdjFS/JHxL6H8y4SEBDmcwoy19nG/waBREPmE63XI6hl7k7lP6L6qFp/hyidAJ7gO2w==",
- "path": "hinc/3.1.103",
- "hashPath": "hinc.3.1.103.nupkg.sha512"
+ "sha512": "sha512-3OP2xL9Tf+PTfpP4W1BKxpscvJM86CNTTSEB7RV5G6KCyGJhWd+e3ZkSkDBRv0S4qfX5MexHDEDmLF9WXwXOAw==",
+ "path": "hinc/3.1.104",
+ "hashPath": "hinc.3.1.104.nupkg.sha512"
},
- "HiNc-Resource/3.1.3": {
+ "HiNc-Resource/3.1.4": {
"type": "package",
"serviceable": true,
- "sha512": "sha512-3fcZThGZggPPuimN7nYAin4PqkqGVHzT+i3gmaeHECuEOY1anDKctEkXbHl5IsM1Yed0SdacVbW3v66oyhsnNg==",
- "path": "hinc-resource/3.1.3",
- "hashPath": "hinc-resource.3.1.3.nupkg.sha512"
+ "sha512": "sha512-NN13r53qTmG3ilEtWsrGRPQ1byQ931JmOkUGwlNdxUKTXbP9EUH/56dMa8zLdXZtR26xOJe9VgvdxEJXbAz6GQ==",
+ "path": "hinc-resource/3.1.4",
+ "hashPath": "hinc-resource.3.1.4.nupkg.sha512"
},
- "HiUniNc/3.1.92": {
+ "HiUniNc/3.1.93": {
"type": "package",
"serviceable": true,
- "sha512": "sha512-Wpq6u3JCybO4uwddCQIdPzLnurZm2t8kdS1ezKUzt6o94FAGSgmCg9JwnJ44MQe2KzLxPFEzsrcQT3OBbnyDog==",
- "path": "hiuninc/3.1.92",
- "hashPath": "hiuninc.3.1.92.nupkg.sha512"
+ "sha512": "sha512-PLUDynjQbgo478pMKQ0VZAJc3lIV0ZwT4tS1JIpPvjDftpYGYF5QOSTV/qUMckBG8KGrdJPNTWQT9O8Hp/g+vw==",
+ "path": "hiuninc/3.1.93",
+ "hashPath": "hiuninc.3.1.93.nupkg.sha512"
},
"MathNet.Numerics/5.0.0": {
"type": "package",
diff --git a/App/HiNC-2025-win-desktop.dll b/App/HiNC-2025-win-desktop.dll
index 88d983b..ca574b7 100644
Binary files a/App/HiNC-2025-win-desktop.dll and b/App/HiNC-2025-win-desktop.dll differ
diff --git a/App/HiNC-2025-win-desktop.pdb b/App/HiNC-2025-win-desktop.pdb
index 5a3c068..133111c 100644
Binary files a/App/HiNC-2025-win-desktop.pdb and b/App/HiNC-2025-win-desktop.pdb differ
diff --git a/App/HiNc-Resource.dll b/App/HiNc-Resource.dll
index f9a8c9d..3f98a7c 100644
Binary files a/App/HiNc-Resource.dll and b/App/HiNc-Resource.dll differ
diff --git a/App/HiNc.dll b/App/HiNc.dll
index 2578d4b..5100df0 100644
Binary files a/App/HiNc.dll and b/App/HiNc.dll differ
diff --git a/App/HiUniNc.dll b/App/HiUniNc.dll
index 713e0bd..8456fd8 100644
Binary files a/App/HiUniNc.dll and b/App/HiUniNc.dll differ
diff --git a/App/en/HiGeom.resources.dll b/App/en/HiGeom.resources.dll
index b1e6bb7..7764f1e 100644
Binary files a/App/en/HiGeom.resources.dll and b/App/en/HiGeom.resources.dll differ
diff --git a/App/en/HiMech.resources.dll b/App/en/HiMech.resources.dll
index ff23a39..99689cd 100644
Binary files a/App/en/HiMech.resources.dll and b/App/en/HiMech.resources.dll differ
diff --git a/App/wwwroot/HiAPI-docsite/api/Hi.CutterLocations.ClStrips.ClStrip.html b/App/wwwroot/HiAPI-docsite/api/Hi.CutterLocations.ClStrips.ClStrip.html
index 5cb922b..0b20427 100644
--- a/App/wwwroot/HiAPI-docsite/api/Hi.CutterLocations.ClStrips.ClStrip.html
+++ b/App/wwwroot/HiAPI-docsite/api/Hi.CutterLocations.ClStrips.ClStrip.html
@@ -338,12 +338,13 @@ If the display end is set to -1, returns the total number of positions.
Synchoronized Chart Time Range.
-The value is possible to be null for the un-available status.
+Always not null.
+The members' value is possible to be null for the un-available status.
-
public Range<TimeSpan> ChartRange { get; set; }
+
public Range<TimeSpan?> ChartRange { get; }
@@ -352,7 +353,7 @@ The value is possible to be null for the un-available status.
Property Value
- - Range<TimeSpan>
+ - Range<TimeSpan?>
@@ -946,6 +947,37 @@ A value of -1 indicates that the display should follow the end of the strip.
+
+
+
+ LimitChartRange(bool)
+
+
+
+
+
+
+
+
public void LimitChartRange(bool isLocked)
+
+
+ Parameters
+
+ isLocked bool
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1080,8 +1112,8 @@ A value of -1 indicates that the display should follow the end of the strip.
-
- SetDispSegment(int, int, object, int)
+
+ SetDispSegment(int, int, object)
@@ -1091,7 +1123,7 @@ This method sets both the beginning and ending positions of the display range.
-
public void SetDispSegment(int beginIndex, int endIndex, object caller, int lowestLength = 2)
+
public void SetDispSegment(int beginIndex, int endIndex, object caller)
Parameters
@@ -1104,9 +1136,6 @@ This method sets both the beginning and ending positions of the display range.
caller object
The caller object that requests the display range change. Used for event notifications.
-
- lowestLength int
- The minimum length of the display range. Currently not used in the implementation. Default is 2.
@@ -1270,34 +1299,6 @@ This method sets both the beginning and ending positions of the display range.
-
-
-
- UpdateChartRangeByDispSegment()
-
-
-
- Update Chart Time Range By DispSegment.
-Internal Use Only.
-
-
-
-
-
public void UpdateChartRangeByDispSegment()
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/App/wwwroot/HiAPI-docsite/api/Hi.Geom.MathUtil.html b/App/wwwroot/HiAPI-docsite/api/Hi.Geom.MathUtil.html
index 9fb6e8a..c145479 100644
--- a/App/wwwroot/HiAPI-docsite/api/Hi.Geom.MathUtil.html
+++ b/App/wwwroot/HiAPI-docsite/api/Hi.Geom.MathUtil.html
@@ -2440,6 +2440,92 @@ Otherwise, interpolate by ratio.
+
+
+
+ Max<T>(T, T)
+
+
+
+
+
+
+
+
public static T Max<T>(T a, T b) where T : IComparable<T>
+
+
+ Parameters
+
+ a T
+
+ b T
+
+
+
+ Returns
+
+ - T
+
+
+
+ Type Parameters
+
+ T
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Min<T>(T, T)
+
+
+
+
+
+
+
+
public static T Min<T>(T a, T b) where T : IComparable<T>
+
+
+ Parameters
+
+ a T
+
+ b T
+
+
+
+ Returns
+
+ - T
+
+
+
+ Type Parameters
+
+ T
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/App/wwwroot/HiAPI-docsite/index.json b/App/wwwroot/HiAPI-docsite/index.json
index 568c8bc..7827f06 100644
--- a/App/wwwroot/HiAPI-docsite/index.json
+++ b/App/wwwroot/HiAPI-docsite/index.json
@@ -987,7 +987,7 @@
"api/Hi.CutterLocations.ClStrips.ClStrip.html": {
"href": "api/Hi.CutterLocations.ClStrips.ClStrip.html",
"title": "Class ClStrip | HiAPI-C# 2025",
- "summary": "Class ClStrip Namespace Hi.CutterLocations.ClStrips Assembly HiMech.dll Represents a CL (Cutter Location) strip for 3D display. This class manages the display and interaction of cutter location points and lines. public class ClStrip : IDisplayee, IExpandToBox3d, IDisposable Inheritance object ClStrip Implements IDisplayee IExpandToBox3d IDisposable Inherited Members object.Equals(object) object.Equals(object, object) object.GetHashCode() object.GetType() object.MemberwiseClone() object.ReferenceEquals(object, object) object.ToString() Extension Methods DuplicateUtil.TryDuplicate(TSelf, params object[]) InvokeUtil.SelfInvoke(TSrc, Action) InvokeUtil.SelfInvoke(TSrc, Func) BoundSelectorUtil.GetStepRange(ClStrip, BoundSelectorPair) DispUtil.Display(IDisplayee, Bind, Mat4d) ColorUtil.GetGloomyColor(object, double, double) NameUtil.GetSelectionName(object) StringUtil.GetPropertyStringIfToStringNotOverloaded(object, bool, bool) LockUtil.Lock(object) Constructors ClStrip(int) Initializes a new instance of the ClStrip class. public ClStrip(int cap = 2048) Parameters cap int The initial capacity of the strip Fields slice_distance The distance between slices for efficient rendering. public const int slice_distance = 8192 Field Value int Properties AbsDispEnd Gets the absolute display end position. If the display end is set to -1, returns the total number of positions. public int AbsDispEnd { get; } Property Value int CallRefreshDrawing internal use public bool CallRefreshDrawing { get; } Property Value bool ChartRange Synchoronized Chart Time Range. The value is possible to be null for the un-available status. public Range ChartRange { get; set; } Property Value Range IsKeepingDispAlive Keep the disp range to at least two dots while the stripe length enough. public bool IsKeepingDispAlive { get; set; } Property Value bool IsShowDot Gets or sets whether to display dots at each position. public bool IsShowDot { get; set; } Property Value bool StripPoses Gets the list of strip positions. Do not add or remove elements directly. public SynList StripPoses { get; } Property Value SynList StripPosesClearLock Gets the lock for thread-safe operations on strip positions. public ReaderWriterLockSlim StripPosesClearLock { get; } Property Value ReaderWriterLockSlim StripPosesCount Gets the thread-safe count of strip positions. public int StripPosesCount { get; } Property Value int Methods Add(object, DVec3d) Adds a new position to the strip. public ClStripPos Add(object state, DVec3d programCl) Parameters state object The state object associated with the position programCl DVec3d The cutter location Returns ClStripPos The newly created strip position Clear(object) Clears all strip positions and resets the display state. public void Clear(object sender) Parameters sender object The object that initiated this clear operation Display(Bind) Displays the strip. public void Display(Bind bind) Parameters bind Bind The binding context for display Dispose() Disposes of the resources used by this strip. public void Dispose() Dispose(bool) Disposes of the resources used by this strip. protected virtual void Dispose(bool disposing) Parameters disposing bool Whether this is being called from Dispose ExpandToBox3d(Box3d) Expands the given box to include all strip positions. public void ExpandToBox3d(Box3d dst) Parameters dst Box3d The box to expand GetDispBegin() Gets the current display begin position. public int GetDispBegin() Returns int The display begin position GetDispEnd() Gets the current display end position. A value of -1 indicates that the display should follow the end of the strip. public int GetDispEnd() Returns int The display end position GetEnteredPos() Gets the currently entered position. public ClStripPos GetEnteredPos() Returns ClStripPos The entered position GetFittingView(Mat4d, Mat4d) Gets a scaled fitting view based on the strip display range. public Mat4d GetFittingView(Mat4d sketchView, Mat4d clStripZeroToRoot = null) Parameters sketchView Mat4d The sketch view matrix clStripZeroToRoot Mat4d The transformation from strip zero to root Returns Mat4d The scaled fitting view matrix GetSelectedPos() Gets the currently selected position. public ClStripPos GetSelectedPos() Returns ClStripPos The selected position GetStripPos(int, bool) Gets a strip position by index. public ClStripPos GetStripPos(int index, bool isLocked = false) Parameters index int The index of the position isLocked bool Whether the strip positions are already locked Returns ClStripPos The strip position at the specified index RefreshDrawing() Marks the drawing for refresh. public void RefreshDrawing() RefreshDrawingInRendering(bool) internal use public void RefreshDrawingInRendering(bool isLocked) Parameters isLocked bool SetDispBegin(int, object) Sets the display begin position. public void SetDispBegin(int value, object caller) Parameters value int The new display begin position caller object The object that initiated this change SetDispEnd(int, object) Sets the display end position. A value of -1 indicates that the display should follow the end of the strip. public void SetDispEnd(int value, object caller) Parameters value int The new display end position caller object The object that initiated this change SetDispSegment(int, int, object, int) Sets the display range for the cutter location strip. This method sets both the beginning and ending positions of the display range. public void SetDispSegment(int beginIndex, int endIndex, object caller, int lowestLength = 2) Parameters beginIndex int The beginning index of the display range. Will be clamped to [0, StripPoses.Count - 1]. endIndex int The ending index of the display range. A value of -1 indicates that the display should follow the end of the strip. Values greater than or equal to StripPoses.Count will be converted to -1. Will be clamped to [-1, StripPoses.Count]. caller object The caller object that requests the display range change. Used for event notifications. lowestLength int The minimum length of the display range. Currently not used in the implementation. Default is 2. SetEnteredPos(ClStripPos, object) Sets the currently entered position. public void SetEnteredPos(ClStripPos value, object sender) Parameters value ClStripPos The new entered position sender object The object that initiated this change SetSelectedPos(ClStripPos, object) Sets the currently selected position. public void SetSelectedPos(ClStripPos value, object sender) Parameters value ClStripPos The new selected position sender object The object that initiated this change ShrinkAttachmentMemory(CancellationToken?) Shrinks the attachment memory for all positions. public void ShrinkAttachmentMemory(CancellationToken? cancellationToken = null) Parameters cancellationToken CancellationToken? StripPosesThreadSafeSelect(Func) Thread-safe selection of strip positions. public List StripPosesThreadSafeSelect(Func func) Parameters func Func The function to transform each strip position Returns List A list of transformed strip positions Type Parameters T The type of the selected data UpdateChartRangeByDispSegment() Update Chart Time Range By DispSegment. Internal Use Only. public void UpdateChartRangeByDispSegment() UpdateDispSegmentByChartRange(object) Updates the display segment based on the current chart range. public void UpdateDispSegmentByChartRange(object caller) Parameters caller object The caller object that triggered the update. Events AbsDispEndChanged Event raised when the absolute display end position changes. public event EventHandler AbsDispEndChanged Event Type EventHandler DispBeginChanged Event raised when the display begin position changes. public event EventHandler DispBeginChanged Event Type EventHandler DispEndChanged Event raised when the display end position changes. public event EventHandler DispEndChanged Event Type EventHandler DrawingRefreshing Event raised when the drawing is being refreshed. public event EventHandler DrawingRefreshing Event Type EventHandler MachiningStepSelected The same effecting position as PosSelected but with more convenient arguments for the end-user. public event Action MachiningStepSelected Event Type Action PosAdded Event raised when a new position is added to the strip. public event Action PosAdded Event Type Action PosEntered Event raised when the mouse enters a position. public event EventHandler PosEntered Event Type EventHandler PosSelected Event raised when a position is selected. public event EventHandler PosSelected Event Type EventHandler StaticPosSelected Static event raised when any position is selected. public static event EventHandler StaticPosSelected Event Type EventHandler"
+ "summary": "Class ClStrip Namespace Hi.CutterLocations.ClStrips Assembly HiMech.dll Represents a CL (Cutter Location) strip for 3D display. This class manages the display and interaction of cutter location points and lines. public class ClStrip : IDisplayee, IExpandToBox3d, IDisposable Inheritance object ClStrip Implements IDisplayee IExpandToBox3d IDisposable Inherited Members object.Equals(object) object.Equals(object, object) object.GetHashCode() object.GetType() object.MemberwiseClone() object.ReferenceEquals(object, object) object.ToString() Extension Methods DuplicateUtil.TryDuplicate(TSelf, params object[]) InvokeUtil.SelfInvoke(TSrc, Action) InvokeUtil.SelfInvoke(TSrc, Func) BoundSelectorUtil.GetStepRange(ClStrip, BoundSelectorPair) DispUtil.Display(IDisplayee, Bind, Mat4d) ColorUtil.GetGloomyColor(object, double, double) NameUtil.GetSelectionName(object) StringUtil.GetPropertyStringIfToStringNotOverloaded(object, bool, bool) LockUtil.Lock(object) Constructors ClStrip(int) Initializes a new instance of the ClStrip class. public ClStrip(int cap = 2048) Parameters cap int The initial capacity of the strip Fields slice_distance The distance between slices for efficient rendering. public const int slice_distance = 8192 Field Value int Properties AbsDispEnd Gets the absolute display end position. If the display end is set to -1, returns the total number of positions. public int AbsDispEnd { get; } Property Value int CallRefreshDrawing internal use public bool CallRefreshDrawing { get; } Property Value bool ChartRange Synchoronized Chart Time Range. Always not null. The members' value is possible to be null for the un-available status. public Range ChartRange { get; } Property Value Range IsKeepingDispAlive Keep the disp range to at least two dots while the stripe length enough. public bool IsKeepingDispAlive { get; set; } Property Value bool IsShowDot Gets or sets whether to display dots at each position. public bool IsShowDot { get; set; } Property Value bool StripPoses Gets the list of strip positions. Do not add or remove elements directly. public SynList StripPoses { get; } Property Value SynList StripPosesClearLock Gets the lock for thread-safe operations on strip positions. public ReaderWriterLockSlim StripPosesClearLock { get; } Property Value ReaderWriterLockSlim StripPosesCount Gets the thread-safe count of strip positions. public int StripPosesCount { get; } Property Value int Methods Add(object, DVec3d) Adds a new position to the strip. public ClStripPos Add(object state, DVec3d programCl) Parameters state object The state object associated with the position programCl DVec3d The cutter location Returns ClStripPos The newly created strip position Clear(object) Clears all strip positions and resets the display state. public void Clear(object sender) Parameters sender object The object that initiated this clear operation Display(Bind) Displays the strip. public void Display(Bind bind) Parameters bind Bind The binding context for display Dispose() Disposes of the resources used by this strip. public void Dispose() Dispose(bool) Disposes of the resources used by this strip. protected virtual void Dispose(bool disposing) Parameters disposing bool Whether this is being called from Dispose ExpandToBox3d(Box3d) Expands the given box to include all strip positions. public void ExpandToBox3d(Box3d dst) Parameters dst Box3d The box to expand GetDispBegin() Gets the current display begin position. public int GetDispBegin() Returns int The display begin position GetDispEnd() Gets the current display end position. A value of -1 indicates that the display should follow the end of the strip. public int GetDispEnd() Returns int The display end position GetEnteredPos() Gets the currently entered position. public ClStripPos GetEnteredPos() Returns ClStripPos The entered position GetFittingView(Mat4d, Mat4d) Gets a scaled fitting view based on the strip display range. public Mat4d GetFittingView(Mat4d sketchView, Mat4d clStripZeroToRoot = null) Parameters sketchView Mat4d The sketch view matrix clStripZeroToRoot Mat4d The transformation from strip zero to root Returns Mat4d The scaled fitting view matrix GetSelectedPos() Gets the currently selected position. public ClStripPos GetSelectedPos() Returns ClStripPos The selected position GetStripPos(int, bool) Gets a strip position by index. public ClStripPos GetStripPos(int index, bool isLocked = false) Parameters index int The index of the position isLocked bool Whether the strip positions are already locked Returns ClStripPos The strip position at the specified index LimitChartRange(bool) public void LimitChartRange(bool isLocked) Parameters isLocked bool RefreshDrawing() Marks the drawing for refresh. public void RefreshDrawing() RefreshDrawingInRendering(bool) internal use public void RefreshDrawingInRendering(bool isLocked) Parameters isLocked bool SetDispBegin(int, object) Sets the display begin position. public void SetDispBegin(int value, object caller) Parameters value int The new display begin position caller object The object that initiated this change SetDispEnd(int, object) Sets the display end position. A value of -1 indicates that the display should follow the end of the strip. public void SetDispEnd(int value, object caller) Parameters value int The new display end position caller object The object that initiated this change SetDispSegment(int, int, object) Sets the display range for the cutter location strip. This method sets both the beginning and ending positions of the display range. public void SetDispSegment(int beginIndex, int endIndex, object caller) Parameters beginIndex int The beginning index of the display range. Will be clamped to [0, StripPoses.Count - 1]. endIndex int The ending index of the display range. A value of -1 indicates that the display should follow the end of the strip. Values greater than or equal to StripPoses.Count will be converted to -1. Will be clamped to [-1, StripPoses.Count]. caller object The caller object that requests the display range change. Used for event notifications. SetEnteredPos(ClStripPos, object) Sets the currently entered position. public void SetEnteredPos(ClStripPos value, object sender) Parameters value ClStripPos The new entered position sender object The object that initiated this change SetSelectedPos(ClStripPos, object) Sets the currently selected position. public void SetSelectedPos(ClStripPos value, object sender) Parameters value ClStripPos The new selected position sender object The object that initiated this change ShrinkAttachmentMemory(CancellationToken?) Shrinks the attachment memory for all positions. public void ShrinkAttachmentMemory(CancellationToken? cancellationToken = null) Parameters cancellationToken CancellationToken? StripPosesThreadSafeSelect(Func) Thread-safe selection of strip positions. public List StripPosesThreadSafeSelect(Func func) Parameters func Func The function to transform each strip position Returns List A list of transformed strip positions Type Parameters T The type of the selected data UpdateDispSegmentByChartRange(object) Updates the display segment based on the current chart range. public void UpdateDispSegmentByChartRange(object caller) Parameters caller object The caller object that triggered the update. Events AbsDispEndChanged Event raised when the absolute display end position changes. public event EventHandler AbsDispEndChanged Event Type EventHandler DispBeginChanged Event raised when the display begin position changes. public event EventHandler DispBeginChanged Event Type EventHandler DispEndChanged Event raised when the display end position changes. public event EventHandler DispEndChanged Event Type EventHandler DrawingRefreshing Event raised when the drawing is being refreshed. public event EventHandler DrawingRefreshing Event Type EventHandler MachiningStepSelected The same effecting position as PosSelected but with more convenient arguments for the end-user. public event Action MachiningStepSelected Event Type Action PosAdded Event raised when a new position is added to the strip. public event Action PosAdded Event Type Action PosEntered Event raised when the mouse enters a position. public event EventHandler PosEntered Event Type EventHandler PosSelected Event raised when a position is selected. public event EventHandler PosSelected Event Type EventHandler StaticPosSelected Static event raised when any position is selected. public static event EventHandler StaticPosSelected Event Type EventHandler"
},
"api/Hi.CutterLocations.ClStrips.ClStripPos.html": {
"href": "api/Hi.CutterLocations.ClStrips.ClStripPos.html",
@@ -1402,7 +1402,7 @@
"api/Hi.Geom.MathUtil.html": {
"href": "api/Hi.Geom.MathUtil.html",
"title": "Class MathUtil | HiAPI-C# 2025",
- "summary": "Class MathUtil Namespace Hi.Geom Assembly HiGeom.dll Math Utility. public static class MathUtil Inheritance object MathUtil Inherited Members object.Equals(object) object.Equals(object, object) object.GetHashCode() object.GetType() object.MemberwiseClone() object.ReferenceEquals(object, object) object.ToString() Fields sqrt2 square root of 2. public const double sqrt2 = 1.4142135623730951 Field Value double sqrt3 square root of 3. public const double sqrt3 = 1.7320508075688772 Field Value double Methods AbsDiffAngle(double, double) Calculates the absolute difference between two angles in radians public static double AbsDiffAngle(double angleA_rad, double angleB_rad) Parameters angleA_rad double First angle in radians angleB_rad double Second angle in radians Returns double The absolute difference between the two angles Add(double[], double[]) Adds the elements of the second array to the corresponding elements of the first array in-place. public static double[] Add(this double[] src, double[] src2) Parameters src double[] The source array to which elements will be added. src2 double[] The array containing elements to add. Returns double[] The modified source array. AlterIfNan(double, double) public static double AlterIfNan(double primaryValue, double alteringValue) Parameters primaryValue double primary value alteringValue double the candidate value Returns double ApplyAlterIf(T, Func, T) Applies an alternative value if the source value meets a specified condition. public static T ApplyAlterIf(T src, Func isApplyingAlternateFunc, T alternative) Parameters src T The source value to check. isApplyingAlternateFunc Func Function that determines if the alternative should be applied. alternative T The alternative value to use if the condition is met. Returns T Either the original value or the alternative value based on the condition. Type Parameters T The type of the values. Average(IEnumerable) Average. public static Vec3d Average(this IEnumerable src) Parameters src IEnumerable src Returns Vec3d Average BilinearInterpolate(double, double, double, double, double, double) Performs bilinear interpolation between four double values public static double BilinearInterpolate(double v00, double v01, double v10, double v11, double u, double v) Parameters v00 double Value at (0,0) on normalized bilinear coordinate v01 double Value at (0,1) on normalized bilinear coordinate v10 double Value at (1,0) on normalized bilinear coordinate v11 double Value at (1,1) on normalized bilinear coordinate u double Ratio along v00 and v10, etc. v double Ratio along v00 and v01, etc. Returns double The interpolated value BilinearInterpolate(T, T, T, T, double, double) Bilinear interpolate. public static T BilinearInterpolate(T v00, T v01, T v10, T v11, double u, double v) where T : IAdditionOperators, IMultiplyOperators Parameters v00 T value at (0,0) on normalized bilinear coordinate v01 T value at (0,1) on normalized bilinear coordinate v10 T value at (1,0) on normalized bilinear coordinate v11 T value at (1,1) on normalized bilinear coordinate u double ratio along v00 and v10, etc. v double ratio along v00 and v01, etc. Returns T interpolated value Type Parameters T value type. BilinearInterpolate(T, T, T, T, double, double, Func, Func) Bilinear interpolate. public static T BilinearInterpolate(T v00, T v01, T v10, T v11, double u, double v, Func scalingFunc, Func addingFunc) Parameters v00 T value at (0,0) on normalized bilinear coordinate v01 T value at (0,1) on normalized bilinear coordinate v10 T value at (1,0) on normalized bilinear coordinate v11 T value at (1,1) on normalized bilinear coordinate u double ratio along v00 and v10, etc. v double ratio along v00 and v01, etc. scalingFunc Func scaling function addingFunc Func adding function Returns T interpolated value Type Parameters T value type. BinaryDividentSequence(int) Generates a value in a binary divident sequence based on the seed. public static double BinaryDividentSequence(int seed) Parameters seed int The seed value for the sequence. Returns double The value in the binary divident sequence. Cbrt(double) Calculates the cube root of a number. public static double Cbrt(double v) Parameters v double The value to calculate the cube root of. Returns double The cube root of the specified value. Clamp(T, T, T) Clamps a value within an inclusive range of minimum and maximum values. public static T Clamp(this T val, T min, T max) where T : IComparable Parameters val T min T max T Returns T Type Parameters T Convert_inchdmin_To_mmds(double) Converts inches per minute to millimeters per second. public static double Convert_inchdmin_To_mmds(double inchdmin) Parameters inchdmin double Value in inches per minute. Returns double Value in millimeters per second. Convert_mdmin_To_mmds(double) Converts meters per minute to millimeters per second. public static double Convert_mdmin_To_mmds(double mdmin) Parameters mdmin double Value in meters per minute. Returns double Value in millimeters per second. Convert_mmdmin_To_mmds(double) Converts millimeters per minute to millimeters per second. public static double Convert_mmdmin_To_mmds(double mmdmin) Parameters mmdmin double Value in millimeters per minute. Returns double Value in millimeters per second. Convert_mmds_To_mdmin(double) Converts millimeters per second to meters per minute. public static double Convert_mmds_To_mdmin(double mmds) Parameters mmds double Value in millimeters per second. Returns double Value in meters per minute. Convert_mmds_To_mmdmin(double) Converts millimeters per second to millimeters per minute. public static double Convert_mmds_To_mmdmin(double mmds) Parameters mmds double Value in millimeters per second. Returns double Value in millimeters per minute. Convert_radds_To_rpm(double) Converts radians per second to revolutions per minute (RPM). public static double Convert_radds_To_rpm(double radds) Parameters radds double Value in radians per second. Returns double Value in revolutions per minute. Convert_rpm_To_radds(double) Converts revolutions per minute (RPM) to radians per second. public static double Convert_rpm_To_radds(double rpm) Parameters rpm double Value in revolutions per minute. Returns double Value in radians per second. Cycle(double, double, double) If the value is within lowerBound and upperBound, return value. Otherwise, perform looped value according to the direction from lower to upper. ex. bound=(0,1), value=3.1, than return 0.1. public static double Cycle(double value, double lowerBound, double upperBound) Parameters value double value lowerBound double lower bound, inclusive upperBound double upper bound, exclusive Returns double cycled value Cycle(double, double, double, bool) Cycles a value to be within the specified range, with configurable bound inclusivity. public static double Cycle(double value, double lowerBound, double upperBound, bool isBothBoundInclusive) Parameters value double The value to cycle. lowerBound double The lower bound of the range. upperBound double The upper bound of the range. isBothBoundInclusive bool If true, both bounds are inclusive; otherwise, only the lower bound is inclusive. Returns double The cycled value within the specified range. Cycle2Pi_rad(double, double, bool) Get value by the cycle range transformation. The cycle is from anchor_rad-pi to anchor_rad+pi. public static double Cycle2Pi_rad(double target_rad, double anchor_rad = 0, bool isBothBoundInclusive = false) Parameters target_rad double target angle anchor_rad double anchor angle isBothBoundInclusive bool if true, both bounds are inclusive; otherwise, only the lower bound is inclusive Returns double adjusted target angle CycleUnit(double) Get the value locates on 0(inclusive) ~ 1(exclusive). The source code: return v - Math.Floor(v); public static double CycleUnit(double v) Parameters v double value Returns double 0 (inclusive) ~1 (exclusive) Decompose(double[,], out int[], out int) Performs LU decomposition with partial pivoting on a matrix. public static double[,] Decompose(double[,] matrix, out int[] perm, out int toggle) Parameters matrix double[,] The matrix to decompose. perm int[] Output parameter that holds row permutations. toggle int Output parameter that is +1 or -1 depending on whether the number of row exchanges is even or odd. Returns double[,] The LU decomposition of the matrix. Exceptions Exception Thrown when attempting to decompose a non-square matrix. Div(double[], double) Divides each element of the array by a scalar value in-place. public static double[] Div(this double[] src, double scale) Parameters src double[] The source array to be modified. scale double The scalar value to divide by. Returns double[] The modified source array. Erf(double) Calculates the error function (erf) for the specified value. public static double Erf(double x) Parameters x double The value to calculate the error function for Returns double The error function value Erfc(double) Calculates the complementary error function (erfc) for the specified value. public static double Erfc(double x) Parameters x double The value to calculate the complementary error function for Returns double The complementary error function value GetAbs(double[]) Creates a new array containing the absolute values of the elements in the source array. public static double[] GetAbs(this double[] src) Parameters src double[] The source array. Returns double[] A new array containing the absolute values of the elements in the source array. GetAdd(double[], double[]) Creates a new array by adding corresponding elements of two arrays. public static double[] GetAdd(this double[] src, double[] src2) Parameters src double[] The first array. src2 double[] The second array. Returns double[] A new array containing the sum of corresponding elements. GetCommonRatioFromGeometricSeries(double, double, double) Calculates the common ratio from a geometric series sum. public static double GetCommonRatioFromGeometricSeries(double geometricSeriesSum, double powIndex, double convergenceLimit = 0.001) Parameters geometricSeriesSum double The sum of the geometric series. powIndex double The power index in the series. convergenceLimit double The convergence limit for the calculation. Returns double The common ratio of the geometric series. GetDiv(double[], double) Creates a new array by dividing each element of the source array by a scalar value. public static double[] GetDiv(this double[] src, double scale) Parameters src double[] The source array. scale double The scalar value to divide by. Returns double[] A new array with each element divided by the scalar value. GetDot(double[], double[]) Creates a new array by multiplying corresponding elements of two arrays. public static double[] GetDot(this double[] a, double[] b) Parameters a double[] The first array. b double[] The second array. Returns double[] A new array containing the product of corresponding elements. GetInterpolationRatio(TimeSpan, TimeSpan, TimeSpan) Gets the interpolation ratio between two TimeSpan values public static double GetInterpolationRatio(TimeSpan begin, TimeSpan end, TimeSpan pos) Parameters begin TimeSpan The beginning TimeSpan end TimeSpan The ending TimeSpan pos TimeSpan The position TimeSpan to calculate the ratio for Returns double The interpolation ratio: (pos - begin) / (end - begin) GetInterpolationRatio(T, T, T) Get position ratio. (pos - begin) / (end - begin) . public static double GetInterpolationRatio(T begin, T end, T pos) where T : ISubtractionOperators, IDivisionOperators Parameters begin T range begin end T range end pos T key position Returns double position ratio Type Parameters T GetInterpolationRatio(T, T, T, Func, Func) Gets the interpolation ratio between two values using custom subtraction and division functions public static double GetInterpolationRatio(T begin, T end, T pos, Func minusFunc, Func divFunc) Parameters begin T The beginning value end T The ending value pos T The position value to calculate the ratio for minusFunc Func The function to use for subtraction divFunc Func The function to use for division Returns double The interpolation ratio: (pos - begin) / (end - begin) Type Parameters T The type of the values GetMul(double[], double) Creates a new array by multiplying each element of the source array by a scalar value. public static double[] GetMul(this double[] src, double s) Parameters src double[] The source array. s double The scalar value to multiply by. Returns double[] A new array with each element multiplied by the scalar value. GetSub(double[], double[]) Creates a new array by subtracting corresponding elements of the second array from the first array. public static double[] GetSub(this double[] a, double[] b) Parameters a double[] The first array. b double[] The second array to subtract. Returns double[] A new array containing the difference of corresponding elements. Idt(int) Creates an identity matrix of the specified size. public static double[,] Idt(int n) Parameters n int The size of the square identity matrix. Returns double[,] An n x n identity matrix. Interpolate(TimeSpan, TimeSpan, double) Interpolates between two TimeSpan values using the specified ratio public static TimeSpan Interpolate(TimeSpan a, TimeSpan b, double ratio) Parameters a TimeSpan The first TimeSpan value b TimeSpan The second TimeSpan value ratio double The interpolation ratio (0.0 to 1.0) Returns TimeSpan The interpolated TimeSpan value: a * (1 - ratio) + b * ratio InterpolateWithinBoundary(T, T, double) If ratio smaller or equal 0, return a. If ratio larger or equal 1, return b. Otherwise, interpolate by ratio. public static T InterpolateWithinBoundary(T a, T b, double ratio) where T : IEqualityOperators, IAdditionOperators, IMultiplyOperators Parameters a T b T ratio double Returns T Type Parameters T Interpolate(T, T, double) Interpolate from a to b with ratio alpha:(1-alpha). public static T Interpolate(T a, T b, double ratio) where T : IEqualityOperators, IAdditionOperators, IMultiplyOperators Parameters a T a b T b ratio double ratio Returns T a * (1 - ratio) + b * ratio Type Parameters T Interpolate(T, T, double, Func) Interpolates between two values based on a position using a position function. public static T Interpolate(T a, T b, double pos, Func posFunc) where T : INumber, IMultiplyOperators Parameters a T The first value b T The second value pos double The position to interpolate at posFunc Func Function to extract a position from a value Returns T The interpolated value Type Parameters T The type of the values Interpolate(TItem, TItem, double, Func, Func, Func) Interpolates between two items based on a key value using custom functions. public static TItem Interpolate(TItem a, TItem b, double key, Func keyFunc, Func addingFunc, Func scalingFunc) Parameters a TItem The first item b TItem The second item key double The key value to interpolate at (0.0 to 1.0) keyFunc Func Function to extract a double key from an item addingFunc Func Function to add two items scalingFunc Func Function to scale an item by a double Returns TItem The interpolated item Type Parameters TItem The type of the items Interpolate(T, T, double, Func, Func) Interpolates between two values using custom addition and scaling functions public static T Interpolate(T a, T b, double ratio, Func addingFunc, Func scalingFunc) Parameters a T The first value b T The second value ratio double The interpolation ratio (0.0 to 1.0) addingFunc Func The function to use for addition scalingFunc Func The function to use for scaling Returns T The interpolated value: a * (1 - ratio) + b * ratio Type Parameters T The type of the values Interpolate(T[], T[], double) Interpolates between two arrays of values using the specified ratio public static T[] Interpolate(T[] a, T[] b, double ratio) where T : INumber, IMultiplyOperators Parameters a T[] The first array b T[] The second array ratio double The interpolation ratio (0.0 to 1.0) Returns T[] A new array containing the interpolated values Type Parameters T The type of the array elements Interpolate(TItem, TItem, TKey, Func, Func, Func, Func, Func) Interpolates between two items using custom key extraction, key operations, and item operations public static TItem Interpolate(TItem a, TItem b, TKey key, Func keyFunc, Func keyMinusFunc, Func keyDivFunc, Func itemAddingFunc, Func itemScalingFunc) Parameters a TItem The first item b TItem The second item key TKey The key value to interpolate at keyFunc Func Function to extract a key from an item keyMinusFunc Func Function to subtract keys keyDivFunc Func Function to divide keys itemAddingFunc Func Function to add items itemScalingFunc Func Function to scale items Returns TItem The interpolated item Type Parameters TKey The type of the key used for interpolation TItem The type of the items being interpolated Inverse(double[,]) Computes the inverse of a matrix. public static double[,] Inverse(double[,] matrix) Parameters matrix double[,] The matrix to invert. Returns double[,] The inverse of the matrix. Exceptions Exception Thrown when the matrix cannot be inverted. Inverse2d(double[,], double[,]) Calculates the inverse of a 2x2 matrix public static void Inverse2d(double[,] src, double[,] dst) Parameters src double[,] The source 2x2 matrix dst double[,] The destination matrix to store the inverse Inverse3d(double[,], double[,]) Calculates the inverse of a 3x3 matrix public static void Inverse3d(double[,] src, double[,] dst) Parameters src double[,] The source 3x3 matrix dst double[,] The destination matrix to store the inverse IsFinite(double) Is v neither NaN nor infinity. public static bool IsFinite(double v) Parameters v double value Returns bool Is v neither NaN nor infinity. Mul(double[], double) Multiplies each element of the array by a scalar value in-place. public static double[] Mul(this double[] src, double scale) Parameters src double[] The source array to be modified. scale double The scalar value to multiply by. Returns double[] The modified source array. NoChanged(double) Do nothing. public static double NoChanged(double src) Parameters src double src Returns double src Norm2(double[]) Calculates the Euclidean norm (L2 norm) of a vector. public static double Norm2(this double[] src) Parameters src double[] The source vector as an array of doubles. Returns double The Euclidean norm of the vector. Normalized(double[]) Creates a new array by normalizing the source array to have a unit norm. public static double[] Normalized(this double[] src) Parameters src double[] The source array. Returns double[] A new array with the same direction as the source array but with unit norm. Pow3(double) Calculates the cube (power of 3) of a double value. public static double Pow3(this double src) Parameters src double The source double value Returns double The cube of the source value Pow3(int) Calculates the cube (power of 3) of an integer value. public static int Pow3(this int src) Parameters src int The source integer value Returns int The cube of the source value Pow4(double) Calculates the fourth power of a double value. public static double Pow4(this double src) Parameters src double The source double value Returns double The fourth power of the source value Pow4(int) Calculates the fourth power of an integer value. public static int Pow4(this int src) Parameters src int The source integer value Returns int The fourth power of the source value Product(double[,], double[,]) Multiplies two matrices. public static double[,] Product(double[,] matrixA, double[,] matrixB) Parameters matrixA double[,] The first matrix. matrixB double[,] The second matrix. Returns double[,] The product of the two matrices. Exceptions Exception Thrown when the matrices are not conformable for multiplication. SolveCubic(double, double, double, double) public static Complex[] SolveCubic(double c0, double c1, double c2, double c3) Parameters c0 double constant term. c1 double coefficient of power of 1 of x. c2 double coefficient of power of 2 of x. c3 double coefficient of power of 3 of x. Returns Complex[] SolveQuadratic(double, double, double, out double, out double) Solve quadratic equation. public static double SolveQuadratic(double c, double b, double a, out double x0, out double x1) Parameters c double coefficient of constant of x. b double coefficient of power of 1 of x. a double coefficient of power of 2 of x. x0 double lower root x1 double higher root Returns double determinent SqrtVariance(IList, out double) Standard deviation with n denominator (instead of n-1). public static double SqrtVariance(IList src, out double avg) Parameters src IList avg double Returns double STD Square(double) Calculates the square of a double value. public static double Square(this double src) Parameters src double The source double value Returns double The square of the source value Square(int) Calculates the square of an integer value. public static int Square(this int src) Parameters src int The source integer value Returns int The square of the source value Sum(IEnumerable) Sum. public static Vec3d Sum(this IEnumerable src) Parameters src IEnumerable src Returns Vec3d Sum ToDeg(double) Get degree from radian. public static double ToDeg(double rad) Parameters rad double radian Returns double degree ToRad(double) Get radian from degree. public static double ToRad(double deg) Parameters deg double degree Returns double radian ToString(double[,], string) Converts a 2D double array to a string representation using the specified format public static string ToString(this double[,] src, string format) Parameters src double[,] The source 2D double array format string The format string to use for each double value Returns string A string representation of the 2D array ToString(double[], string) Converts a double array to a string representation using the specified format public static string ToString(this double[] src, string format) Parameters src double[] The source double array format string The format string to use for each double value Returns string A string representation of the array ToStringWithoutCultureNum(double, string) To string function. The special number is formatted by XmlConvert. public static string ToStringWithoutCultureNum(this double src, string format) Parameters src double src format string format Returns string string Transpose(double[,]) Transposes a 2D matrix represented as a 2D array. public static double[,] Transpose(double[,] src) Parameters src double[,] The source matrix to transpose. Returns double[,] A new matrix that is the transpose of the source matrix."
+ "summary": "Class MathUtil Namespace Hi.Geom Assembly HiGeom.dll Math Utility. public static class MathUtil Inheritance object MathUtil Inherited Members object.Equals(object) object.Equals(object, object) object.GetHashCode() object.GetType() object.MemberwiseClone() object.ReferenceEquals(object, object) object.ToString() Fields sqrt2 square root of 2. public const double sqrt2 = 1.4142135623730951 Field Value double sqrt3 square root of 3. public const double sqrt3 = 1.7320508075688772 Field Value double Methods AbsDiffAngle(double, double) Calculates the absolute difference between two angles in radians public static double AbsDiffAngle(double angleA_rad, double angleB_rad) Parameters angleA_rad double First angle in radians angleB_rad double Second angle in radians Returns double The absolute difference between the two angles Add(double[], double[]) Adds the elements of the second array to the corresponding elements of the first array in-place. public static double[] Add(this double[] src, double[] src2) Parameters src double[] The source array to which elements will be added. src2 double[] The array containing elements to add. Returns double[] The modified source array. AlterIfNan(double, double) public static double AlterIfNan(double primaryValue, double alteringValue) Parameters primaryValue double primary value alteringValue double the candidate value Returns double ApplyAlterIf(T, Func, T) Applies an alternative value if the source value meets a specified condition. public static T ApplyAlterIf(T src, Func isApplyingAlternateFunc, T alternative) Parameters src T The source value to check. isApplyingAlternateFunc Func Function that determines if the alternative should be applied. alternative T The alternative value to use if the condition is met. Returns T Either the original value or the alternative value based on the condition. Type Parameters T The type of the values. Average(IEnumerable) Average. public static Vec3d Average(this IEnumerable src) Parameters src IEnumerable src Returns Vec3d Average BilinearInterpolate(double, double, double, double, double, double) Performs bilinear interpolation between four double values public static double BilinearInterpolate(double v00, double v01, double v10, double v11, double u, double v) Parameters v00 double Value at (0,0) on normalized bilinear coordinate v01 double Value at (0,1) on normalized bilinear coordinate v10 double Value at (1,0) on normalized bilinear coordinate v11 double Value at (1,1) on normalized bilinear coordinate u double Ratio along v00 and v10, etc. v double Ratio along v00 and v01, etc. Returns double The interpolated value BilinearInterpolate(T, T, T, T, double, double) Bilinear interpolate. public static T BilinearInterpolate(T v00, T v01, T v10, T v11, double u, double v) where T : IAdditionOperators, IMultiplyOperators Parameters v00 T value at (0,0) on normalized bilinear coordinate v01 T value at (0,1) on normalized bilinear coordinate v10 T value at (1,0) on normalized bilinear coordinate v11 T value at (1,1) on normalized bilinear coordinate u double ratio along v00 and v10, etc. v double ratio along v00 and v01, etc. Returns T interpolated value Type Parameters T value type. BilinearInterpolate(T, T, T, T, double, double, Func, Func) Bilinear interpolate. public static T BilinearInterpolate(T v00, T v01, T v10, T v11, double u, double v, Func scalingFunc, Func addingFunc) Parameters v00 T value at (0,0) on normalized bilinear coordinate v01 T value at (0,1) on normalized bilinear coordinate v10 T value at (1,0) on normalized bilinear coordinate v11 T value at (1,1) on normalized bilinear coordinate u double ratio along v00 and v10, etc. v double ratio along v00 and v01, etc. scalingFunc Func scaling function addingFunc Func adding function Returns T interpolated value Type Parameters T value type. BinaryDividentSequence(int) Generates a value in a binary divident sequence based on the seed. public static double BinaryDividentSequence(int seed) Parameters seed int The seed value for the sequence. Returns double The value in the binary divident sequence. Cbrt(double) Calculates the cube root of a number. public static double Cbrt(double v) Parameters v double The value to calculate the cube root of. Returns double The cube root of the specified value. Clamp(T, T, T) Clamps a value within an inclusive range of minimum and maximum values. public static T Clamp(this T val, T min, T max) where T : IComparable Parameters val T min T max T Returns T Type Parameters T Convert_inchdmin_To_mmds(double) Converts inches per minute to millimeters per second. public static double Convert_inchdmin_To_mmds(double inchdmin) Parameters inchdmin double Value in inches per minute. Returns double Value in millimeters per second. Convert_mdmin_To_mmds(double) Converts meters per minute to millimeters per second. public static double Convert_mdmin_To_mmds(double mdmin) Parameters mdmin double Value in meters per minute. Returns double Value in millimeters per second. Convert_mmdmin_To_mmds(double) Converts millimeters per minute to millimeters per second. public static double Convert_mmdmin_To_mmds(double mmdmin) Parameters mmdmin double Value in millimeters per minute. Returns double Value in millimeters per second. Convert_mmds_To_mdmin(double) Converts millimeters per second to meters per minute. public static double Convert_mmds_To_mdmin(double mmds) Parameters mmds double Value in millimeters per second. Returns double Value in meters per minute. Convert_mmds_To_mmdmin(double) Converts millimeters per second to millimeters per minute. public static double Convert_mmds_To_mmdmin(double mmds) Parameters mmds double Value in millimeters per second. Returns double Value in millimeters per minute. Convert_radds_To_rpm(double) Converts radians per second to revolutions per minute (RPM). public static double Convert_radds_To_rpm(double radds) Parameters radds double Value in radians per second. Returns double Value in revolutions per minute. Convert_rpm_To_radds(double) Converts revolutions per minute (RPM) to radians per second. public static double Convert_rpm_To_radds(double rpm) Parameters rpm double Value in revolutions per minute. Returns double Value in radians per second. Cycle(double, double, double) If the value is within lowerBound and upperBound, return value. Otherwise, perform looped value according to the direction from lower to upper. ex. bound=(0,1), value=3.1, than return 0.1. public static double Cycle(double value, double lowerBound, double upperBound) Parameters value double value lowerBound double lower bound, inclusive upperBound double upper bound, exclusive Returns double cycled value Cycle(double, double, double, bool) Cycles a value to be within the specified range, with configurable bound inclusivity. public static double Cycle(double value, double lowerBound, double upperBound, bool isBothBoundInclusive) Parameters value double The value to cycle. lowerBound double The lower bound of the range. upperBound double The upper bound of the range. isBothBoundInclusive bool If true, both bounds are inclusive; otherwise, only the lower bound is inclusive. Returns double The cycled value within the specified range. Cycle2Pi_rad(double, double, bool) Get value by the cycle range transformation. The cycle is from anchor_rad-pi to anchor_rad+pi. public static double Cycle2Pi_rad(double target_rad, double anchor_rad = 0, bool isBothBoundInclusive = false) Parameters target_rad double target angle anchor_rad double anchor angle isBothBoundInclusive bool if true, both bounds are inclusive; otherwise, only the lower bound is inclusive Returns double adjusted target angle CycleUnit(double) Get the value locates on 0(inclusive) ~ 1(exclusive). The source code: return v - Math.Floor(v); public static double CycleUnit(double v) Parameters v double value Returns double 0 (inclusive) ~1 (exclusive) Decompose(double[,], out int[], out int) Performs LU decomposition with partial pivoting on a matrix. public static double[,] Decompose(double[,] matrix, out int[] perm, out int toggle) Parameters matrix double[,] The matrix to decompose. perm int[] Output parameter that holds row permutations. toggle int Output parameter that is +1 or -1 depending on whether the number of row exchanges is even or odd. Returns double[,] The LU decomposition of the matrix. Exceptions Exception Thrown when attempting to decompose a non-square matrix. Div(double[], double) Divides each element of the array by a scalar value in-place. public static double[] Div(this double[] src, double scale) Parameters src double[] The source array to be modified. scale double The scalar value to divide by. Returns double[] The modified source array. Erf(double) Calculates the error function (erf) for the specified value. public static double Erf(double x) Parameters x double The value to calculate the error function for Returns double The error function value Erfc(double) Calculates the complementary error function (erfc) for the specified value. public static double Erfc(double x) Parameters x double The value to calculate the complementary error function for Returns double The complementary error function value GetAbs(double[]) Creates a new array containing the absolute values of the elements in the source array. public static double[] GetAbs(this double[] src) Parameters src double[] The source array. Returns double[] A new array containing the absolute values of the elements in the source array. GetAdd(double[], double[]) Creates a new array by adding corresponding elements of two arrays. public static double[] GetAdd(this double[] src, double[] src2) Parameters src double[] The first array. src2 double[] The second array. Returns double[] A new array containing the sum of corresponding elements. GetCommonRatioFromGeometricSeries(double, double, double) Calculates the common ratio from a geometric series sum. public static double GetCommonRatioFromGeometricSeries(double geometricSeriesSum, double powIndex, double convergenceLimit = 0.001) Parameters geometricSeriesSum double The sum of the geometric series. powIndex double The power index in the series. convergenceLimit double The convergence limit for the calculation. Returns double The common ratio of the geometric series. GetDiv(double[], double) Creates a new array by dividing each element of the source array by a scalar value. public static double[] GetDiv(this double[] src, double scale) Parameters src double[] The source array. scale double The scalar value to divide by. Returns double[] A new array with each element divided by the scalar value. GetDot(double[], double[]) Creates a new array by multiplying corresponding elements of two arrays. public static double[] GetDot(this double[] a, double[] b) Parameters a double[] The first array. b double[] The second array. Returns double[] A new array containing the product of corresponding elements. GetInterpolationRatio(TimeSpan, TimeSpan, TimeSpan) Gets the interpolation ratio between two TimeSpan values public static double GetInterpolationRatio(TimeSpan begin, TimeSpan end, TimeSpan pos) Parameters begin TimeSpan The beginning TimeSpan end TimeSpan The ending TimeSpan pos TimeSpan The position TimeSpan to calculate the ratio for Returns double The interpolation ratio: (pos - begin) / (end - begin) GetInterpolationRatio(T, T, T) Get position ratio. (pos - begin) / (end - begin) . public static double GetInterpolationRatio(T begin, T end, T pos) where T : ISubtractionOperators, IDivisionOperators Parameters begin T range begin end T range end pos T key position Returns double position ratio Type Parameters T GetInterpolationRatio(T, T, T, Func, Func) Gets the interpolation ratio between two values using custom subtraction and division functions public static double GetInterpolationRatio(T begin, T end, T pos, Func minusFunc, Func divFunc) Parameters begin T The beginning value end T The ending value pos T The position value to calculate the ratio for minusFunc Func The function to use for subtraction divFunc Func The function to use for division Returns double The interpolation ratio: (pos - begin) / (end - begin) Type Parameters T The type of the values GetMul(double[], double) Creates a new array by multiplying each element of the source array by a scalar value. public static double[] GetMul(this double[] src, double s) Parameters src double[] The source array. s double The scalar value to multiply by. Returns double[] A new array with each element multiplied by the scalar value. GetSub(double[], double[]) Creates a new array by subtracting corresponding elements of the second array from the first array. public static double[] GetSub(this double[] a, double[] b) Parameters a double[] The first array. b double[] The second array to subtract. Returns double[] A new array containing the difference of corresponding elements. Idt(int) Creates an identity matrix of the specified size. public static double[,] Idt(int n) Parameters n int The size of the square identity matrix. Returns double[,] An n x n identity matrix. Interpolate(TimeSpan, TimeSpan, double) Interpolates between two TimeSpan values using the specified ratio public static TimeSpan Interpolate(TimeSpan a, TimeSpan b, double ratio) Parameters a TimeSpan The first TimeSpan value b TimeSpan The second TimeSpan value ratio double The interpolation ratio (0.0 to 1.0) Returns TimeSpan The interpolated TimeSpan value: a * (1 - ratio) + b * ratio InterpolateWithinBoundary(T, T, double) If ratio smaller or equal 0, return a. If ratio larger or equal 1, return b. Otherwise, interpolate by ratio. public static T InterpolateWithinBoundary(T a, T b, double ratio) where T : IEqualityOperators, IAdditionOperators, IMultiplyOperators Parameters a T b T ratio double Returns T Type Parameters T Interpolate(T, T, double) Interpolate from a to b with ratio alpha:(1-alpha). public static T Interpolate(T a, T b, double ratio) where T : IEqualityOperators, IAdditionOperators, IMultiplyOperators Parameters a T a b T b ratio double ratio Returns T a * (1 - ratio) + b * ratio Type Parameters T Interpolate(T, T, double, Func) Interpolates between two values based on a position using a position function. public static T Interpolate(T a, T b, double pos, Func posFunc) where T : INumber, IMultiplyOperators Parameters a T The first value b T The second value pos double The position to interpolate at posFunc Func Function to extract a position from a value Returns T The interpolated value Type Parameters T The type of the values Interpolate(TItem, TItem, double, Func, Func, Func) Interpolates between two items based on a key value using custom functions. public static TItem Interpolate(TItem a, TItem b, double key, Func keyFunc, Func addingFunc, Func scalingFunc) Parameters a TItem The first item b TItem The second item key double The key value to interpolate at (0.0 to 1.0) keyFunc Func Function to extract a double key from an item addingFunc Func Function to add two items scalingFunc Func Function to scale an item by a double Returns TItem The interpolated item Type Parameters TItem The type of the items Interpolate(T, T, double, Func, Func) Interpolates between two values using custom addition and scaling functions public static T Interpolate(T a, T b, double ratio, Func addingFunc, Func scalingFunc) Parameters a T The first value b T The second value ratio double The interpolation ratio (0.0 to 1.0) addingFunc Func The function to use for addition scalingFunc Func The function to use for scaling Returns T The interpolated value: a * (1 - ratio) + b * ratio Type Parameters T The type of the values Interpolate(T[], T[], double) Interpolates between two arrays of values using the specified ratio public static T[] Interpolate(T[] a, T[] b, double ratio) where T : INumber, IMultiplyOperators Parameters a T[] The first array b T[] The second array ratio double The interpolation ratio (0.0 to 1.0) Returns T[] A new array containing the interpolated values Type Parameters T The type of the array elements Interpolate(TItem, TItem, TKey, Func, Func, Func, Func, Func) Interpolates between two items using custom key extraction, key operations, and item operations public static TItem Interpolate(TItem a, TItem b, TKey key, Func keyFunc, Func keyMinusFunc, Func keyDivFunc, Func itemAddingFunc, Func itemScalingFunc) Parameters a TItem The first item b TItem The second item key TKey The key value to interpolate at keyFunc Func Function to extract a key from an item keyMinusFunc Func Function to subtract keys keyDivFunc Func Function to divide keys itemAddingFunc Func Function to add items itemScalingFunc Func Function to scale items Returns TItem The interpolated item Type Parameters TKey The type of the key used for interpolation TItem The type of the items being interpolated Inverse(double[,]) Computes the inverse of a matrix. public static double[,] Inverse(double[,] matrix) Parameters matrix double[,] The matrix to invert. Returns double[,] The inverse of the matrix. Exceptions Exception Thrown when the matrix cannot be inverted. Inverse2d(double[,], double[,]) Calculates the inverse of a 2x2 matrix public static void Inverse2d(double[,] src, double[,] dst) Parameters src double[,] The source 2x2 matrix dst double[,] The destination matrix to store the inverse Inverse3d(double[,], double[,]) Calculates the inverse of a 3x3 matrix public static void Inverse3d(double[,] src, double[,] dst) Parameters src double[,] The source 3x3 matrix dst double[,] The destination matrix to store the inverse IsFinite(double) Is v neither NaN nor infinity. public static bool IsFinite(double v) Parameters v double value Returns bool Is v neither NaN nor infinity. Max(T, T) public static T Max(T a, T b) where T : IComparable Parameters a T b T Returns T Type Parameters T Min(T, T) public static T Min(T a, T b) where T : IComparable Parameters a T b T Returns T Type Parameters T Mul(double[], double) Multiplies each element of the array by a scalar value in-place. public static double[] Mul(this double[] src, double scale) Parameters src double[] The source array to be modified. scale double The scalar value to multiply by. Returns double[] The modified source array. NoChanged(double) Do nothing. public static double NoChanged(double src) Parameters src double src Returns double src Norm2(double[]) Calculates the Euclidean norm (L2 norm) of a vector. public static double Norm2(this double[] src) Parameters src double[] The source vector as an array of doubles. Returns double The Euclidean norm of the vector. Normalized(double[]) Creates a new array by normalizing the source array to have a unit norm. public static double[] Normalized(this double[] src) Parameters src double[] The source array. Returns double[] A new array with the same direction as the source array but with unit norm. Pow3(double) Calculates the cube (power of 3) of a double value. public static double Pow3(this double src) Parameters src double The source double value Returns double The cube of the source value Pow3(int) Calculates the cube (power of 3) of an integer value. public static int Pow3(this int src) Parameters src int The source integer value Returns int The cube of the source value Pow4(double) Calculates the fourth power of a double value. public static double Pow4(this double src) Parameters src double The source double value Returns double The fourth power of the source value Pow4(int) Calculates the fourth power of an integer value. public static int Pow4(this int src) Parameters src int The source integer value Returns int The fourth power of the source value Product(double[,], double[,]) Multiplies two matrices. public static double[,] Product(double[,] matrixA, double[,] matrixB) Parameters matrixA double[,] The first matrix. matrixB double[,] The second matrix. Returns double[,] The product of the two matrices. Exceptions Exception Thrown when the matrices are not conformable for multiplication. SolveCubic(double, double, double, double) public static Complex[] SolveCubic(double c0, double c1, double c2, double c3) Parameters c0 double constant term. c1 double coefficient of power of 1 of x. c2 double coefficient of power of 2 of x. c3 double coefficient of power of 3 of x. Returns Complex[] SolveQuadratic(double, double, double, out double, out double) Solve quadratic equation. public static double SolveQuadratic(double c, double b, double a, out double x0, out double x1) Parameters c double coefficient of constant of x. b double coefficient of power of 1 of x. a double coefficient of power of 2 of x. x0 double lower root x1 double higher root Returns double determinent SqrtVariance(IList, out double) Standard deviation with n denominator (instead of n-1). public static double SqrtVariance(IList src, out double avg) Parameters src IList avg double Returns double STD Square(double) Calculates the square of a double value. public static double Square(this double src) Parameters src double The source double value Returns double The square of the source value Square(int) Calculates the square of an integer value. public static int Square(this int src) Parameters src int The source integer value Returns int The square of the source value Sum(IEnumerable