refactor(Hi.Sample): follow the Buckle to Mount rename -- the machine-tool and machining-project build demos and the coordinate-entry displayees use the ...Mount members
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@@ -60,9 +60,9 @@ namespace Sample.Disp
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
////Console.WriteLine($"B: {CoordinateIndex}; {coordinateMove}");
|
////Console.WriteLine($"B: {CoordinateIndex}; {coordinateMove}");
|
||||||
Vec3d mcXyz_AttacherAtTableBuckleZero = MillingEquipmentFunc?.Invoke()
|
Vec3d mcXyz_AttacherAtTableMountZero = MillingEquipmentFunc?.Invoke()
|
||||||
?.GetMachinePositionAtTableBuckleZero();
|
?.GetMachinePositionAtTableMountZero();
|
||||||
if (mcXyz_AttacherAtTableBuckleZero == null)
|
if (mcXyz_AttacherAtTableMountZero == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Vec3d coordinateMove;
|
Vec3d coordinateMove;
|
||||||
@@ -85,7 +85,7 @@ namespace Sample.Disp
|
|||||||
//Console.WriteLine($"text: [{text}]");
|
//Console.WriteLine($"text: [{text}]");
|
||||||
|
|
||||||
bind.ModelMatStack.Push();
|
bind.ModelMatStack.Push();
|
||||||
bind.ModelMatStack.Trans(coordinateMove - mcXyz_AttacherAtTableBuckleZero);
|
bind.ModelMatStack.Trans(coordinateMove - mcXyz_AttacherAtTableMountZero);
|
||||||
CoordinateDrawing.Display(bind, text);
|
CoordinateDrawing.Display(bind, text);
|
||||||
bind.ModelMatStack.Pop();
|
bind.ModelMatStack.Pop();
|
||||||
}
|
}
|
||||||
@@ -96,9 +96,9 @@ namespace Sample.Disp
|
|||||||
if (ncEnv == null || NcEnv.CncBrand != CncBrand.Heidenhain)
|
if (ncEnv == null || NcEnv.CncBrand != CncBrand.Heidenhain)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Vec3d mcXyz_AttacherAtTableBuckleZero = MillingEquipmentFunc?.Invoke()
|
Vec3d mcXyz_AttacherAtTableMountZero = MillingEquipmentFunc?.Invoke()
|
||||||
?.GetMachinePositionAtTableBuckleZero();
|
?.GetMachinePositionAtTableMountZero();
|
||||||
if (mcXyz_AttacherAtTableBuckleZero == null)
|
if (mcXyz_AttacherAtTableMountZero == null)
|
||||||
return;
|
return;
|
||||||
Vec3d coordinateMove;
|
Vec3d coordinateMove;
|
||||||
if (HeidenhainCycleDef247Q339 == 0 && HeidenhainCycleDef7Arg == null)
|
if (HeidenhainCycleDef247Q339 == 0 && HeidenhainCycleDef7Arg == null)
|
||||||
@@ -107,13 +107,13 @@ namespace Sample.Disp
|
|||||||
HeidenhainCycleDef247Q339, HeidenhainCycleDef7Arg, ncEnv);
|
HeidenhainCycleDef247Q339, HeidenhainCycleDef7Arg, ncEnv);
|
||||||
|
|
||||||
|
|
||||||
dst.Expand(-mcXyz_AttacherAtTableBuckleZero + coordinateMove);
|
dst.Expand(-mcXyz_AttacherAtTableMountZero + coordinateMove);
|
||||||
}
|
}
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public Anchor GetAnchor()
|
public Anchor GetAnchor()
|
||||||
{
|
{
|
||||||
return MillingEquipmentFunc?.Invoke()?.GetMachiningChain()
|
return MillingEquipmentFunc?.Invoke()?.GetMachiningChain()
|
||||||
?.GetTableBuckle()?.GetAnchor();
|
?.GetTableMount()?.GetAnchor();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ public class IsoCoordinateEntryDisplayee : IAnchoredDisplayee
|
|||||||
dst.Expand(attacherPos);
|
dst.Expand(attacherPos);
|
||||||
}
|
}
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
/// <returns>Table Buckle if existed; otherwise, return null.</returns>
|
/// <returns>Table Mount if existed; otherwise, return null.</returns>
|
||||||
public Anchor GetAnchor()
|
public Anchor GetAnchor()
|
||||||
{
|
{
|
||||||
return MillingEquipmentFunc?.Invoke()?.GetMachiningChain()?.GetAnchor();
|
return MillingEquipmentFunc?.Invoke()?.GetMachiningChain()?.GetAnchor();
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ namespace Sample.MachineTool
|
|||||||
{
|
{
|
||||||
GeneralXyzabcMachineTool dst = GeneralXyzabcMachineTool.CreateFromChainCode(
|
GeneralXyzabcMachineTool dst = GeneralXyzabcMachineTool.CreateFromChainCode(
|
||||||
"[O][Y][X][C][w];[O][Z][B][S][t]");
|
"[O][Y][X][C][w];[O][Z][B][S][t]");
|
||||||
if (dst.ToolBuckleTransformer is StaticTranslation st)
|
if (dst.ToolMountTransformer is StaticTranslation st)
|
||||||
st.Trans = new Vec3d(-72.40, 72.40, 176.44);
|
st.Trans = new Vec3d(-72.40, 72.40, 176.44);
|
||||||
dst.TransformerB.Pivot = new Vec3d(-72.4, -177.4, 225.94);
|
dst.TransformerB.Pivot = new Vec3d(-72.4, -177.4, 225.94);
|
||||||
Dictionary<string, Solid> solidMap = new Dictionary<string, Solid>()
|
Dictionary<string, Solid> solidMap = new Dictionary<string, Solid>()
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ public static class DemoBuildMachineToolWithoutGeometrys
|
|||||||
{
|
{
|
||||||
GeneralXyzabcMachineTool xyzabcMachineTool = GeneralXyzabcMachineTool.CreateFromChainCode(
|
GeneralXyzabcMachineTool xyzabcMachineTool = GeneralXyzabcMachineTool.CreateFromChainCode(
|
||||||
"[O][C][w];[O][X][Y][Z][B][S][t]");
|
"[O][C][w];[O][X][Y][Z][B][S][t]");
|
||||||
if (xyzabcMachineTool.ToolBuckleTransformer is StaticTranslation st)
|
if (xyzabcMachineTool.ToolMountTransformer is StaticTranslation st)
|
||||||
st.Trans = new Vec3d(-200, 200, 400);
|
st.Trans = new Vec3d(-200, 200, 400);
|
||||||
return xyzabcMachineTool;
|
return xyzabcMachineTool;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,16 +71,16 @@ public static class DemoBuildGeomOnlyMachiningProject
|
|||||||
};
|
};
|
||||||
|
|
||||||
//The fixture topology is free; the default shape has one branch from the
|
//The fixture topology is free; the default shape has one branch from the
|
||||||
//geometry anchor to each buckle, so the workpiece buckle 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(new Vec3d(-40, -40, 0), new Vec3d(40, 40, 10));
|
fixture.Geom = new Box3d(new Vec3d(-40, -40, 0), new Vec3d(40, 40, 10));
|
||||||
Branch.Get(fixture.GeomAnchor, fixture.WorkpieceBuckle).Transformer
|
Branch.Get(fixture.GeomAnchor, fixture.WorkpieceMount).Transformer
|
||||||
= new StaticTranslation(new Vec3d(0, 0, 10));
|
= new StaticTranslation(new Vec3d(0, 0, 10));
|
||||||
localProjectService.Fixture = fixture;
|
localProjectService.Fixture = fixture;
|
||||||
|
|
||||||
//The default shape already leads from the geometry anchor to the fixture
|
//The default shape already leads from the geometry anchor to the fixture
|
||||||
//buckle 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(0, 0, -50, 70, 50, 0);
|
workpiece.InitGeom = new Box3d(0, 0, -50, 70, 50, 0);
|
||||||
|
|||||||
@@ -184,18 +184,18 @@ public static class DemoBuildMachiningProject
|
|||||||
|
|
||||||
#region ConfigureFixture
|
#region ConfigureFixture
|
||||||
//The fixture topology is free; the default shape has one branch from the
|
//The fixture topology is free; the default shape has one branch from the
|
||||||
//geometry anchor to each buckle, so the workpiece buckle 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(new Vec3d(-40, -40, 0), new Vec3d(40, 40, 10));
|
fixture.Geom = new Box3d(new Vec3d(-40, -40, 0), new Vec3d(40, 40, 10));
|
||||||
Branch.Get(fixture.GeomAnchor, fixture.WorkpieceBuckle).Transformer
|
Branch.Get(fixture.GeomAnchor, fixture.WorkpieceMount).Transformer
|
||||||
= new StaticTranslation(new Vec3d(0, 0, 10));
|
= new StaticTranslation(new Vec3d(0, 0, 10));
|
||||||
localProjectService.Fixture = fixture;
|
localProjectService.Fixture = fixture;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region ConfigureWorkpiece
|
#region ConfigureWorkpiece
|
||||||
//The default shape already leads from the geometry anchor to the fixture
|
//The default shape already leads from the geometry anchor to the fixture
|
||||||
//buckle 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(0, 0, -50, 70, 50, 0);
|
workpiece.InitGeom = new Box3d(0, 0, -50, 70, 50, 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user