refactor(Hi.Sample): geometry slots take new Box3d(...) -- DemoBuildGeom's IGetStl list and the fixture and workpiece geometries of DemoBuildGeomOnlyMachiningProject and DemoBuildMachiningProject: box3d_t is the value only after HiGeom's box geometry split and no longer fits an IGetStl / IMakeXmlSource slot; the demos' value uses (bounds, ExpandToBox3d, drawings) stay box3d_t
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@@ -22,7 +22,7 @@ public static class DemoBuildGeom
|
|||||||
/// <returns>A list of geometries implementing the IGetStl interface</returns>
|
/// <returns>A list of geometries implementing the IGetStl interface</returns>
|
||||||
public static List<IGetStl> GenGeoms()
|
public static List<IGetStl> GenGeoms()
|
||||||
{
|
{
|
||||||
box3d_t box = new box3d_t(0, 0, -50, 70, 50, 0);
|
Box3d box = new Box3d(0, 0, -50, 70, 50, 0);
|
||||||
Cylindroid cylindroid = new Cylindroid([ new PairZr(0,12),new PairZr(20,12),
|
Cylindroid cylindroid = new Cylindroid([ new PairZr(0,12),new PairZr(20,12),
|
||||||
new PairZr(20,16),new PairZr(30,16)]);
|
new PairZr(20,16),new PairZr(30,16)]);
|
||||||
Stl stl = new Stl("geom.stl");
|
Stl stl = new Stl("geom.stl");
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ public static class DemoBuildGeomOnlyMachiningProject
|
|||||||
//geometry anchor to each mount, so the workpiece mount is placed by the
|
//geometry anchor to each mount, so the workpiece mount is placed by the
|
||||||
//transformer of the branch to it: on top of the 10 mm thick fixture geom.
|
//transformer of the branch to it: on top of the 10 mm thick fixture geom.
|
||||||
Fixture fixture = Fixture.CreateDefault();
|
Fixture fixture = Fixture.CreateDefault();
|
||||||
fixture.Geom = new box3d_t(new vec3d_t(-40, -40, 0), new vec3d_t(40, 40, 10));
|
fixture.Geom = new Box3d(new vec3d_t(-40, -40, 0), new vec3d_t(40, 40, 10));
|
||||||
Branch.Get(fixture.GeomAnchor, fixture.WorkpieceMount).Transformer
|
Branch.Get(fixture.GeomAnchor, fixture.WorkpieceMount).Transformer
|
||||||
= new StaticTranslation(new vec3d_t(0, 0, 10));
|
= new StaticTranslation(new vec3d_t(0, 0, 10));
|
||||||
localProjectService.Fixture = fixture;
|
localProjectService.Fixture = fixture;
|
||||||
@@ -83,7 +83,7 @@ public static class DemoBuildGeomOnlyMachiningProject
|
|||||||
//mount and to program zero by zero translations.
|
//mount and to program zero by zero translations.
|
||||||
Workpiece workpiece = Workpiece.CreateDefault();
|
Workpiece workpiece = Workpiece.CreateDefault();
|
||||||
workpiece.InitResolution = 0.25;
|
workpiece.InitResolution = 0.25;
|
||||||
workpiece.InitGeom = new box3d_t(0, 0, -50, 70, 50, 0);
|
workpiece.InitGeom = new Box3d(0, 0, -50, 70, 50, 0);
|
||||||
workpiece.IdealGeom = null;
|
workpiece.IdealGeom = null;
|
||||||
localProjectService.Workpiece = workpiece;
|
localProjectService.Workpiece = workpiece;
|
||||||
|
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ public static class DemoBuildMachiningProject
|
|||||||
//geometry anchor to each mount, so the workpiece mount is placed by the
|
//geometry anchor to each mount, so the workpiece mount is placed by the
|
||||||
//transformer of the branch to it: on top of the 10 mm thick fixture geom.
|
//transformer of the branch to it: on top of the 10 mm thick fixture geom.
|
||||||
Fixture fixture = Fixture.CreateDefault();
|
Fixture fixture = Fixture.CreateDefault();
|
||||||
fixture.Geom = new box3d_t(new vec3d_t(-40, -40, 0), new vec3d_t(40, 40, 10));
|
fixture.Geom = new Box3d(new vec3d_t(-40, -40, 0), new vec3d_t(40, 40, 10));
|
||||||
Branch.Get(fixture.GeomAnchor, fixture.WorkpieceMount).Transformer
|
Branch.Get(fixture.GeomAnchor, fixture.WorkpieceMount).Transformer
|
||||||
= new StaticTranslation(new vec3d_t(0, 0, 10));
|
= new StaticTranslation(new vec3d_t(0, 0, 10));
|
||||||
localProjectService.Fixture = fixture;
|
localProjectService.Fixture = fixture;
|
||||||
@@ -198,7 +198,7 @@ public static class DemoBuildMachiningProject
|
|||||||
//mount and to program zero by zero translations.
|
//mount and to program zero by zero translations.
|
||||||
Workpiece workpiece = Workpiece.CreateDefault();
|
Workpiece workpiece = Workpiece.CreateDefault();
|
||||||
workpiece.InitResolution = 0.25;
|
workpiece.InitResolution = 0.25;
|
||||||
workpiece.InitGeom = new box3d_t(0, 0, -50, 70, 50, 0);
|
workpiece.InitGeom = new Box3d(0, 0, -50, 70, 50, 0);
|
||||||
workpiece.IdealGeom = null;
|
workpiece.IdealGeom = null;
|
||||||
workpiece.CuttingPara = XFactory.GenByFile<ICuttingPara>(
|
workpiece.CuttingPara = XFactory.GenByFile<ICuttingPara>(
|
||||||
"Resource/CuttingParameter", "Al6061T6.default.mp", progress);
|
"Resource/CuttingParameter", "Al6061T6.default.mp", progress);
|
||||||
|
|||||||
Reference in New Issue
Block a user