This commit is contained in:
2025-10-18 10:01:54 +08:00
parent 58fe57b9c6
commit 4303229724
27 changed files with 266 additions and 267 deletions
@@ -217,6 +217,43 @@ Interface IProjectService
<h2 class="section" id="methods">Methods
</h2>
<a id="Hi_MachiningProcs_IProjectService_GetLocalProjectService_" data-uid="Hi.MachiningProcs.IProjectService.GetLocalProjectService*"></a>
<h3 id="Hi_MachiningProcs_IProjectService_GetLocalProjectService" data-uid="Hi.MachiningProcs.IProjectService.GetLocalProjectService">
GetLocalProjectService()
</h3>
<div class="markdown level1 summary"><p>Get Local Project Service as base-service.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">LocalProjectService GetLocalProjectService()</code></pre>
</div>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="Hi.MachiningProcs.LocalProjectService.html">LocalProjectService</a></dt>
<dd><p>Local Project Service</p>
</dd>
</dl>
</article>
@@ -429,14 +429,41 @@ Apply absolute file path.</p>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Task CloseProject()</code></pre>
<pre><code class="lang-csharp hljs">public void CloseProject()</code></pre>
</div>
<a id="Hi_MachiningProcs_LocalProjectService_GetLocalProjectService_" data-uid="Hi.MachiningProcs.LocalProjectService.GetLocalProjectService*"></a>
<h3 id="Hi_MachiningProcs_LocalProjectService_GetLocalProjectService" data-uid="Hi.MachiningProcs.LocalProjectService.GetLocalProjectService">
GetLocalProjectService()
</h3>
<div class="markdown level1 summary"><p>Get Local Project Service as base-service.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public LocalProjectService GetLocalProjectService()</code></pre>
</div>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task">Task</a></dt>
<dd><p>A task representing the asynchronous operation</p>
<dt><a class="xref" href="Hi.MachiningProcs.LocalProjectService.html">LocalProjectService</a></dt>
<dd><p>Local Project Service</p>
</dd>
</dl>
@@ -434,14 +434,41 @@ Apply relative file path from <a class="xref" href="Hi.MachiningProcs.ProxyProje
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Task CloseProject()</code></pre>
<pre><code class="lang-csharp hljs">public void CloseProject()</code></pre>
</div>
<a id="Hi_MachiningProcs_ProxyProjectService_GetLocalProjectService_" data-uid="Hi.MachiningProcs.ProxyProjectService.GetLocalProjectService*"></a>
<h3 id="Hi_MachiningProcs_ProxyProjectService_GetLocalProjectService" data-uid="Hi.MachiningProcs.ProxyProjectService.GetLocalProjectService">
GetLocalProjectService()
</h3>
<div class="markdown level1 summary"><p>Get Local Project Service as base-service.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public LocalProjectService GetLocalProjectService()</code></pre>
</div>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task">Task</a></dt>
<dd><p>A task representing the asynchronous operation</p>
<dt><a class="xref" href="Hi.MachiningProcs.LocalProjectService.html">LocalProjectService</a></dt>
<dd><p>Local Project Service</p>
</dd>
</dl>
@@ -180,42 +180,6 @@ Class RuntimeApi
<h2 class="section" id="constructors">Constructors
</h2>
<a id="Hi_MachiningProcs_RuntimeApi__ctor_" data-uid="Hi.MachiningProcs.RuntimeApi.#ctor*"></a>
<h3 id="Hi_MachiningProcs_RuntimeApi__ctor_Hi_MachiningProcs_IMachiningProjectGetter_" data-uid="Hi.MachiningProcs.RuntimeApi.#ctor(Hi.MachiningProcs.IMachiningProjectGetter)">
RuntimeApi(IMachiningProjectGetter)
</h3>
<div class="markdown level1 summary"><p>Initializes a new instance.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public RuntimeApi(IMachiningProjectGetter machiningProjectGetter)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>machiningProjectGetter</code> <a class="xref" href="Hi.MachiningProcs.IMachiningProjectGetter.html">IMachiningProjectGetter</a></dt>
<dd></dd>
</dl>
<h2 class="section" id="properties">Properties
</h2>
@@ -707,38 +707,6 @@ public class RuntimeController : ControllerBase</code></pre>
</h2>
<a id="Hi_MachiningProcs_RuntimeController__ctor_" data-uid="Hi.MachiningProcs.RuntimeController.#ctor*"></a>
<h3 id="Hi_MachiningProcs_RuntimeController__ctor_Hi_MachiningProcs_IMachiningProjectGetter_" data-uid="Hi.MachiningProcs.RuntimeController.#ctor(Hi.MachiningProcs.IMachiningProjectGetter)">
RuntimeController(IMachiningProjectGetter)
</h3>
<div class="markdown level1 summary"><p>Initializes a new instance.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public RuntimeController(IMachiningProjectGetter machiningProjectGetter)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>machiningProjectGetter</code> <a class="xref" href="Hi.MachiningProcs.IMachiningProjectGetter.html">IMachiningProjectGetter</a></dt>
<dd></dd>
</dl>
<a id="Hi_MachiningProcs_RuntimeController__ctor_" data-uid="Hi.MachiningProcs.RuntimeController.#ctor*"></a>
<h3 id="Hi_MachiningProcs_RuntimeController__ctor_Hi_MachiningProcs_IProjectService_" data-uid="Hi.MachiningProcs.RuntimeController.#ctor(Hi.MachiningProcs.IProjectService)">
@@ -4075,74 +4043,6 @@ public void WriteStepFiles(string relFileTemplate = &quot;Output/[NcName].step.c
<h2 class="section" id="events">Events
</h2>
<h3 id="Hi_MachiningProcs_RuntimeController_MachiningStepBuilt" data-uid="Hi.MachiningProcs.RuntimeController.MachiningStepBuilt">
MachiningStepBuilt
</h3>
<div class="markdown level1 summary"><p>Gets or sets the action to configure steps during execution.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">[JsAce(Snippet = &quot;MachiningStepBuilt+=($1preStep,$2curStep)=&gt;{$3Command};&quot;, DocContentHtml = &quot;Runtime Step Configuration action. preStep is the Previous Milling Step; curStep is the Current Milling Step. preStep is null if no previous step existed.&quot;)]
public event MachiningActRunner.MachiningStepBuiltDelegate MachiningStepBuilt</code></pre>
</div>
<h4 class="section">Event Type</h4>
<dl class="parameters">
<dt><a class="xref" href="Hi.MachiningProcs.MachiningActRunner.html">MachiningActRunner</a>.<a class="xref" href="Hi.MachiningProcs.MachiningActRunner.MachiningStepBuiltDelegate.html">MachiningStepBuiltDelegate</a></dt>
<dd></dd>
</dl>
<h3 id="Hi_MachiningProcs_RuntimeController_MachiningStepSelected" data-uid="Hi.MachiningProcs.RuntimeController.MachiningStepSelected">
MachiningStepSelected
</h3>
<div class="markdown level1 summary"><p>Event that is triggered when a milling step is selected.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">[JsAce(Snippet = &quot;MachiningStepSelected+=($1millingStep)=&gt;{$2Command};&quot;)]
public event Action&lt;MachiningStep&gt; MachiningStepSelected</code></pre>
</div>
<h4 class="section">Event Type</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.action-1">Action</a>&lt;<a class="xref" href="Hi.MachiningSteps.MachiningStep.html">MachiningStep</a>&gt;</dt>
<dd></dd>
</dl>
</article>
@@ -153,6 +153,37 @@ Interface IMachiningStepHost
</h2>
<a id="Hi_MachiningSteps_IMachiningStepHost_ClStrip_" data-uid="Hi.MachiningSteps.IMachiningStepHost.ClStrip*"></a>
<h3 id="Hi_MachiningSteps_IMachiningStepHost_ClStrip" data-uid="Hi.MachiningSteps.IMachiningStepHost.ClStrip">
ClStrip
</h3>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">ClStrip ClStrip { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="Hi.CutterLocations.ClStrips.ClStrip.html">ClStrip</a></dt>
<dd></dd>
</dl>
<a id="Hi_MachiningSteps_IMachiningStepHost_DictionaryColorGuide_" data-uid="Hi.MachiningSteps.IMachiningStepHost.DictionaryColorGuide*"></a>
<h3 id="Hi_MachiningSteps_IMachiningStepHost_DictionaryColorGuide" data-uid="Hi.MachiningSteps.IMachiningStepHost.DictionaryColorGuide">
@@ -206,35 +206,35 @@ namespace Sample.Machining
project.Workpiece.IdealGeom = new StlFile(stlFile_CylinderR19, projectDir);
project.Workpiece.InitResolution = resolution_mm;
RuntimeApi runtimeApi = new RuntimeApi(localProjectService);
RuntimeApi runtimeApi = project.RuntimeApi;
runtimeApi.SetNcResolutionFixed(9999, 15);
runtimeApi.EnableCollisionDetection = false;
runtimeApi.EnablePhysics = false;
runtimeApi.MachiningResolution_mm = resolution_mm;
//RunConsole(project, projectDisplayee, resolution_mm);
RunWindow(project, projectDisplayee, resolution_mm);
RunWindow(localProjectService, projectDisplayee, resolution_mm);
}
static void RunConsole(MachiningProject project,
static void RunConsole(IProjectService projectService,
MachiningProjectDisplayee projectDisplayee, double resolution_mm)
{
RunSession(project, resolution_mm);
RunSession(projectService, resolution_mm);
DispEngine dispEngine = new DispEngine(projectDisplayee);
dispEngine.SetViewToIsometricView();
dispEngine.SketchView = project.ClStrip.GetFittingView(dispEngine.SketchView);
dispEngine.SketchView = projectService.MachiningProject.ClStrip.GetFittingView(dispEngine.SketchView);
dispEngine.SketchView = dispEngine.SketchView.Scale(0.5);
dispEngine.Snapshot($&quot;Cache/result.bmp&quot;, 1000, 1000);
project.Dispose();
projectService.GetLocalProjectService().CloseProject();
LocalApp.AppEnd();
Console.WriteLine($&quot;App exit.&quot;);
}
static void RunWindow(MachiningProject project,
static void RunWindow(IProjectService projectService,
MachiningProjectDisplayee projectDisplayee, double resolution_mm)
{
var task = Task.Run(() =&gt;
{
RunSession(project, resolution_mm);
RunSession(projectService, resolution_mm);
Console.WriteLine($&quot;task done.&quot;);
}).ShowIfCatched(null);
@@ -245,7 +245,7 @@ namespace Sample.Machining
};
app.Exit += (o, e) =&gt;
{
project.Dispose();
projectService.GetLocalProjectService().CloseProject();
LocalApp.AppEnd();
Console.WriteLine($&quot;App exit.&quot;);
};
@@ -256,9 +256,10 @@ namespace Sample.Machining
});
#endregion
}
static void RunSession(MachiningProject project, double resolution_mm)
static void RunSession(IProjectService projectService, double resolution_mm)
{
RuntimeApi runtimeApi = new RuntimeApi(project);
var project=projectService.MachiningProject;
RuntimeApi runtimeApi = project.RuntimeApi;
project.BeginSession();
double radius = 20;
File diff suppressed because one or more lines are too long
+52 -40
View File
@@ -76743,6 +76743,19 @@ references:
commentId: T:Hi.MachiningProcs.IProjectService
fullName: Hi.MachiningProcs.IProjectService
nameWithType: IProjectService
- uid: Hi.MachiningProcs.IProjectService.GetLocalProjectService
name: GetLocalProjectService()
href: api/Hi.MachiningProcs.IProjectService.html#Hi_MachiningProcs_IProjectService_GetLocalProjectService
commentId: M:Hi.MachiningProcs.IProjectService.GetLocalProjectService
fullName: Hi.MachiningProcs.IProjectService.GetLocalProjectService()
nameWithType: IProjectService.GetLocalProjectService()
- uid: Hi.MachiningProcs.IProjectService.GetLocalProjectService*
name: GetLocalProjectService
href: api/Hi.MachiningProcs.IProjectService.html#Hi_MachiningProcs_IProjectService_GetLocalProjectService_
commentId: Overload:Hi.MachiningProcs.IProjectService.GetLocalProjectService
isSpec: "True"
fullName: Hi.MachiningProcs.IProjectService.GetLocalProjectService
nameWithType: IProjectService.GetLocalProjectService
- uid: Hi.MachiningProcs.IProjectService.MachiningProject
name: MachiningProject
href: api/Hi.MachiningProcs.IProjectService.html#Hi_MachiningProcs_IProjectService_MachiningProject
@@ -76871,6 +76884,19 @@ references:
isSpec: "True"
fullName: Hi.MachiningProcs.LocalProjectService.CloseProject
nameWithType: LocalProjectService.CloseProject
- uid: Hi.MachiningProcs.LocalProjectService.GetLocalProjectService
name: GetLocalProjectService()
href: api/Hi.MachiningProcs.LocalProjectService.html#Hi_MachiningProcs_LocalProjectService_GetLocalProjectService
commentId: M:Hi.MachiningProcs.LocalProjectService.GetLocalProjectService
fullName: Hi.MachiningProcs.LocalProjectService.GetLocalProjectService()
nameWithType: LocalProjectService.GetLocalProjectService()
- uid: Hi.MachiningProcs.LocalProjectService.GetLocalProjectService*
name: GetLocalProjectService
href: api/Hi.MachiningProcs.LocalProjectService.html#Hi_MachiningProcs_LocalProjectService_GetLocalProjectService_
commentId: Overload:Hi.MachiningProcs.LocalProjectService.GetLocalProjectService
isSpec: "True"
fullName: Hi.MachiningProcs.LocalProjectService.GetLocalProjectService
nameWithType: LocalProjectService.GetLocalProjectService
- uid: Hi.MachiningProcs.LocalProjectService.GetMachiningProject
name: GetMachiningProject()
href: api/Hi.MachiningProcs.LocalProjectService.html#Hi_MachiningProcs_LocalProjectService_GetMachiningProject
@@ -78987,6 +79013,19 @@ references:
isSpec: "True"
fullName: Hi.MachiningProcs.ProxyProjectService.CloseProject
nameWithType: ProxyProjectService.CloseProject
- uid: Hi.MachiningProcs.ProxyProjectService.GetLocalProjectService
name: GetLocalProjectService()
href: api/Hi.MachiningProcs.ProxyProjectService.html#Hi_MachiningProcs_ProxyProjectService_GetLocalProjectService
commentId: M:Hi.MachiningProcs.ProxyProjectService.GetLocalProjectService
fullName: Hi.MachiningProcs.ProxyProjectService.GetLocalProjectService()
nameWithType: ProxyProjectService.GetLocalProjectService()
- uid: Hi.MachiningProcs.ProxyProjectService.GetLocalProjectService*
name: GetLocalProjectService
href: api/Hi.MachiningProcs.ProxyProjectService.html#Hi_MachiningProcs_ProxyProjectService_GetLocalProjectService_
commentId: Overload:Hi.MachiningProcs.ProxyProjectService.GetLocalProjectService
isSpec: "True"
fullName: Hi.MachiningProcs.ProxyProjectService.GetLocalProjectService
nameWithType: ProxyProjectService.GetLocalProjectService
- uid: Hi.MachiningProcs.ProxyProjectService.GetMachiningProject
name: GetMachiningProject()
href: api/Hi.MachiningProcs.ProxyProjectService.html#Hi_MachiningProcs_ProxyProjectService_GetMachiningProject
@@ -79217,25 +79256,6 @@ references:
commentId: T:Hi.MachiningProcs.RuntimeApi
fullName: Hi.MachiningProcs.RuntimeApi
nameWithType: RuntimeApi
- uid: Hi.MachiningProcs.RuntimeApi.#ctor(Hi.MachiningProcs.IMachiningProjectGetter)
name: RuntimeApi(IMachiningProjectGetter)
href: api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi__ctor_Hi_MachiningProcs_IMachiningProjectGetter_
commentId: M:Hi.MachiningProcs.RuntimeApi.#ctor(Hi.MachiningProcs.IMachiningProjectGetter)
name.vb: New(IMachiningProjectGetter)
fullName: Hi.MachiningProcs.RuntimeApi.RuntimeApi(Hi.MachiningProcs.IMachiningProjectGetter)
fullName.vb: Hi.MachiningProcs.RuntimeApi.New(Hi.MachiningProcs.IMachiningProjectGetter)
nameWithType: RuntimeApi.RuntimeApi(IMachiningProjectGetter)
nameWithType.vb: RuntimeApi.New(IMachiningProjectGetter)
- uid: Hi.MachiningProcs.RuntimeApi.#ctor*
name: RuntimeApi
href: api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi__ctor_
commentId: Overload:Hi.MachiningProcs.RuntimeApi.#ctor
isSpec: "True"
name.vb: New
fullName: Hi.MachiningProcs.RuntimeApi.RuntimeApi
fullName.vb: Hi.MachiningProcs.RuntimeApi.New
nameWithType: RuntimeApi.RuntimeApi
nameWithType.vb: RuntimeApi.New
- uid: Hi.MachiningProcs.RuntimeApi.AddTimeDataByFile(System.String,System.String,System.Double,System.Double)
name: AddTimeDataByFile(string, string, double, double)
href: api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_AddTimeDataByFile_System_String_System_String_System_Double_System_Double_
@@ -80605,15 +80625,6 @@ references:
commentId: T:Hi.MachiningProcs.RuntimeController
fullName: Hi.MachiningProcs.RuntimeController
nameWithType: RuntimeController
- uid: Hi.MachiningProcs.RuntimeController.#ctor(Hi.MachiningProcs.IMachiningProjectGetter)
name: RuntimeController(IMachiningProjectGetter)
href: api/Hi.MachiningProcs.RuntimeController.html#Hi_MachiningProcs_RuntimeController__ctor_Hi_MachiningProcs_IMachiningProjectGetter_
commentId: M:Hi.MachiningProcs.RuntimeController.#ctor(Hi.MachiningProcs.IMachiningProjectGetter)
name.vb: New(IMachiningProjectGetter)
fullName: Hi.MachiningProcs.RuntimeController.RuntimeController(Hi.MachiningProcs.IMachiningProjectGetter)
fullName.vb: Hi.MachiningProcs.RuntimeController.New(Hi.MachiningProcs.IMachiningProjectGetter)
nameWithType: RuntimeController.RuntimeController(IMachiningProjectGetter)
nameWithType.vb: RuntimeController.New(IMachiningProjectGetter)
- uid: Hi.MachiningProcs.RuntimeController.#ctor(Hi.MachiningProcs.IProjectService)
name: RuntimeController(IProjectService)
href: api/Hi.MachiningProcs.RuntimeController.html#Hi_MachiningProcs_RuntimeController__ctor_Hi_MachiningProcs_IProjectService_
@@ -81117,18 +81128,6 @@ references:
isSpec: "True"
fullName: Hi.MachiningProcs.RuntimeController.MachiningSession
nameWithType: RuntimeController.MachiningSession
- uid: Hi.MachiningProcs.RuntimeController.MachiningStepBuilt
name: MachiningStepBuilt
href: api/Hi.MachiningProcs.RuntimeController.html#Hi_MachiningProcs_RuntimeController_MachiningStepBuilt
commentId: E:Hi.MachiningProcs.RuntimeController.MachiningStepBuilt
fullName: Hi.MachiningProcs.RuntimeController.MachiningStepBuilt
nameWithType: RuntimeController.MachiningStepBuilt
- uid: Hi.MachiningProcs.RuntimeController.MachiningStepSelected
name: MachiningStepSelected
href: api/Hi.MachiningProcs.RuntimeController.html#Hi_MachiningProcs_RuntimeController_MachiningStepSelected
commentId: E:Hi.MachiningProcs.RuntimeController.MachiningStepSelected
fullName: Hi.MachiningProcs.RuntimeController.MachiningStepSelected
nameWithType: RuntimeController.MachiningStepSelected
- uid: Hi.MachiningProcs.RuntimeController.Map(System.String,Hi.Mappings.FileTimeSection,System.Nullable{Hi.Mapping.StepTimeShotUtil.CycleSamplingMode})
name: Map(string, FileTimeSection, CycleSamplingMode?)
href: api/Hi.MachiningProcs.RuntimeController.html#Hi_MachiningProcs_RuntimeController_Map_System_String_Hi_Mappings_FileTimeSection_System_Nullable_Hi_Mapping_StepTimeShotUtil_CycleSamplingMode__
@@ -82692,6 +82691,19 @@ references:
commentId: T:Hi.MachiningSteps.IMachiningStepHost
fullName: Hi.MachiningSteps.IMachiningStepHost
nameWithType: IMachiningStepHost
- uid: Hi.MachiningSteps.IMachiningStepHost.ClStrip
name: ClStrip
href: api/Hi.MachiningSteps.IMachiningStepHost.html#Hi_MachiningSteps_IMachiningStepHost_ClStrip
commentId: P:Hi.MachiningSteps.IMachiningStepHost.ClStrip
fullName: Hi.MachiningSteps.IMachiningStepHost.ClStrip
nameWithType: IMachiningStepHost.ClStrip
- uid: Hi.MachiningSteps.IMachiningStepHost.ClStrip*
name: ClStrip
href: api/Hi.MachiningSteps.IMachiningStepHost.html#Hi_MachiningSteps_IMachiningStepHost_ClStrip_
commentId: Overload:Hi.MachiningSteps.IMachiningStepHost.ClStrip
isSpec: "True"
fullName: Hi.MachiningSteps.IMachiningStepHost.ClStrip
nameWithType: IMachiningStepHost.ClStrip
- uid: Hi.MachiningSteps.IMachiningStepHost.DictionaryColorGuide
name: DictionaryColorGuide
href: api/Hi.MachiningSteps.IMachiningStepHost.html#Hi_MachiningSteps_IMachiningStepHost_DictionaryColorGuide