This commit is contained in:
2025-07-25 16:27:29 +08:00
parent 38b27cd481
commit b5cad3c171
1114 changed files with 68009 additions and 23981 deletions
@@ -150,7 +150,8 @@ Shows how to create and transform various geometry types including boxes, cylind
<h2 id="Sample_Geom_DemoBuildGeom_remarks">Remarks</h2>
<div class="markdown level0 remarks"><h3 id="source-code">Source Code</h3>
<pre><code class="lang-csharp" name="SampleCode">using System.Collections.Generic;
<pre><code class="lang-csharp" name="SampleCode">using System;
using System.Collections.Generic;
using Hi.Geom;
using Hi.Mech.Topo;
@@ -174,13 +175,10 @@ namespace Sample.Geom
public static List&lt;IGetStl&gt; GenGeoms()
{
Box3d box = new Box3d(0, 0, -50, 70, 50, 0);
Cylindroid cylindroid = new Cylindroid()
{
PairZrs = new List&lt;PairZr&gt;([ new PairZr(0,12),new PairZr(20,12),
new PairZr(20,16),new PairZr(30,16)]),
LongitudeNum = 30
};
Cylindroid cylindroid = new Cylindroid([ new PairZr(0,12),new PairZr(20,12),
new PairZr(20,16),new PairZr(30,16)]);
Stl stl = new Stl(&quot;geom.stl&quot;);
StlFile stlFile = new StlFile(&quot;geom.stl&quot;);
TransformationGeom transformationGeom = new TransformationGeom()
{
Transformer = new GeneralTransform(1,
@@ -188,9 +186,11 @@ namespace Sample.Geom
new StaticTranslation(new Vec3d(0, 0, 0))),
Geom = stl
};
return new List&lt;IGetStl&gt;([box, cylindroid, stl, transformationGeom]);
GeomCombination geomCombination = new GeomCombination(stlFile, transformationGeom);
return new List&lt;IGetStl&gt;([box, cylindroid, stl, stlFile, transformationGeom]);
}
}
}
</code></pre></div>