diff --git a/Disp/DemoDiscreteRgb.cs b/Disp/DemoDiscreteRgb.cs index 7ed8b02..89c89cd 100644 --- a/Disp/DemoDiscreteRgb.cs +++ b/Disp/DemoDiscreteRgb.cs @@ -31,8 +31,8 @@ namespace Sample.Disp /// public void ExpandToBox3d(Box3d dst) { - dst.Expand(new Vec3d(0, 0, 0)); - dst.Expand(new Vec3d(3, 1, 1)); + dst.Expand(new vec3d_t(0, 0, 0)); + dst.Expand(new vec3d_t(3, 1, 1)); } static void Main() diff --git a/Disp/DemoDrawing.cs b/Disp/DemoDrawing.cs index e2f1f34..315ad37 100644 --- a/Disp/DemoDrawing.cs +++ b/Disp/DemoDrawing.cs @@ -40,14 +40,14 @@ namespace Sample.Disp /// public static void DrawLines() { - List ps; + List ps; double[] vs; int n = 10; //vertex num ////create drawPoints - ps = new List(n); + ps = new List(n); for (int i = 0; i < n; i++) - ps.Add(new Vec3d(i, 0, 0)); + ps.Add(new vec3d_t(i, 0, 0)); vs = new double[ps.Count * 3]; for (int i = 0; i < ps.Count; i++) { @@ -125,8 +125,8 @@ namespace Sample.Disp for (int i = 0, k = 0; i < n; i++) { //the rgb values set as casual. - Vec3d rgb = ColorUtil.GetDiscreteRgb(i); - Tri3d tri = new Tri3d(new Vec3d(i, 0, 0), new Vec3d(i + 1, 0, 0), new Vec3d(i + 0.5, 0, 1)); + vec3d_t rgb = ColorUtil.GetDiscreteRgb(i); + Tri3d tri = new Tri3d(new vec3d_t(i, 0, 0), new vec3d_t(i + 1, 0, 0), new vec3d_t(i + 0.5, 0, 1)); for (int j = 0; j < 3; j++) { vs[k++] = rgb.x; @@ -146,9 +146,9 @@ namespace Sample.Disp for (int i = 0, k = 0; i < n; i++) { //the rgb values set as casual. - Vec3d rgb = ColorUtil.GetDiscreteRgb(i); - Tri3d tri = new Tri3d(new Vec3d(i, 0, 3), new Vec3d(i + 1, 0, 3), new Vec3d(i + 0.5, 0, 4)); - Vec3d nn = tri.GetNormal(); + vec3d_t rgb = ColorUtil.GetDiscreteRgb(i); + Tri3d tri = new Tri3d(new vec3d_t(i, 0, 3), new vec3d_t(i + 1, 0, 3), new vec3d_t(i + 0.5, 0, 4)); + vec3d_t nn = tri.GetNormal(); for (int j = 0; j < 3; j++) { vs[k++] = rgb.x; @@ -180,7 +180,7 @@ namespace Sample.Disp int n = 10; List tris = new List(n); for (int i = 0; i < n; i++) - tris.Add(new Tri3d(new Vec3d(i, 0, 0), new Vec3d(i + 1, 0, 0), new Vec3d(i + 0.5, 0, 1))); + tris.Add(new Tri3d(new vec3d_t(i, 0, 0), new vec3d_t(i + 1, 0, 0), new vec3d_t(i + 0.5, 0, 1))); Drawing faceDraw = tris.GetFaceDrawing(); Drawing linesDraw = tris.ToLineDrawing(); diff --git a/Disp/DemoPick1.cs b/Disp/DemoPick1.cs index daa5789..08d72be 100644 --- a/Disp/DemoPick1.cs +++ b/Disp/DemoPick1.cs @@ -20,15 +20,15 @@ namespace Sample.Disp public void Display(Bind bind) { bind.PickID = PickingID; - bind.Rgb = new Vec3d(isMouseOver ? 0 : 1, 1, 1); + bind.Rgb = new vec3d_t(isMouseOver ? 0 : 1, 1, 1); new Box3d(0, 0, 0, 1, 1, 1).DisplayFace(bind); bind.PickID = 0; } /// public void ExpandToBox3d(Box3d dst) { - dst.Expand(new Vec3d(0, 0, 0)); - dst.Expand(new Vec3d(1, 1, 1)); + dst.Expand(new vec3d_t(0, 0, 0)); + dst.Expand(new vec3d_t(1, 1, 1)); } /// public override void OnMouseEnter(ui_event_type e, DispEngine dispEngine) diff --git a/Disp/DemoPick2.cs b/Disp/DemoPick2.cs index f969a8d..8e1dc00 100644 --- a/Disp/DemoPick2.cs +++ b/Disp/DemoPick2.cs @@ -39,8 +39,8 @@ namespace Sample.Disp /// public void ExpandToBox3d(Box3d dst) { - dst.Expand(new Vec3d(0, 0, 0)); - dst.Expand(new Vec3d(1, 1, 3)); + dst.Expand(new vec3d_t(0, 0, 0)); + dst.Expand(new vec3d_t(1, 1, 3)); } #region IDisposable Support private bool disposedValue = false; // To detect redundant calls diff --git a/Disp/DemoSatellite.cs b/Disp/DemoSatellite.cs index e72b7a1..ebd13cc 100644 --- a/Disp/DemoSatellite.cs +++ b/Disp/DemoSatellite.cs @@ -30,12 +30,12 @@ namespace Sample.Disp { sun.Display(bind); bind.ModelMatStack.Push(); - bind.ModelMatStack.Mul(new Mat4d(new AxisAngle4d(new Vec3d(0, 0, 1), angle_earth += 0.03))); - bind.ModelMatStack.Mul(new Mat4d(new Vec3d(12, 0, 0))); + bind.ModelMatStack.Mul(new Mat4d(new AxisAngle4d(new vec3d_t(0, 0, 1), angle_earth += 0.03))); + bind.ModelMatStack.Mul(new Mat4d(new vec3d_t(12, 0, 0))); earth.Display(bind); bind.ModelMatStack.Push(); - bind.ModelMatStack.Mul(new Mat4d(new AxisAngle4d(new Vec3d(0, 0, 1), angle_moon += 0.02))); - bind.ModelMatStack.Mul(new Mat4d(new Vec3d(4, 0, 0))); + bind.ModelMatStack.Mul(new Mat4d(new AxisAngle4d(new vec3d_t(0, 0, 1), angle_moon += 0.02))); + bind.ModelMatStack.Mul(new Mat4d(new vec3d_t(4, 0, 0))); moon.Display(bind); bind.ModelMatStack.Pop(); bind.ModelMatStack.Pop(); @@ -43,8 +43,8 @@ namespace Sample.Disp /// public void ExpandToBox3d(Box3d dst) { - dst.Expand(new Vec3d(-14, -14, -2)); - dst.Expand(new Vec3d(14, 14, 2)); + dst.Expand(new vec3d_t(-14, -14, -2)); + dst.Expand(new vec3d_t(14, 14, 2)); } static void Main() diff --git a/Disp/HeidenhainCoordinateEntryDisplayee.cs b/Disp/HeidenhainCoordinateEntryDisplayee.cs index c8f353d..5da43b8 100644 --- a/Disp/HeidenhainCoordinateEntryDisplayee.cs +++ b/Disp/HeidenhainCoordinateEntryDisplayee.cs @@ -62,10 +62,10 @@ namespace Sample.Disp ////Console.WriteLine($"B: {CoordinateIndex}; {coordinateMove}"); IMachiningEquipment equipment = MillingEquipmentFunc?.Invoke(); if (equipment == null - || !equipment.TryGetMachinePositionAtTableMountZero(out Vec3d mcXyz_AttacherAtTableMountZero)) + || !equipment.TryGetMachinePositionAtTableMountZero(out vec3d_t mcXyz_AttacherAtTableMountZero)) return; - Vec3d coordinateMove; + vec3d_t coordinateMove; string text; if (HeidenhainCycleDef247Q339 == 0 && HeidenhainCycleDef7Arg == null) return; @@ -98,9 +98,9 @@ namespace Sample.Disp IMachiningEquipment equipment = MillingEquipmentFunc?.Invoke(); if (equipment == null - || !equipment.TryGetMachinePositionAtTableMountZero(out Vec3d mcXyz_AttacherAtTableMountZero)) + || !equipment.TryGetMachinePositionAtTableMountZero(out vec3d_t mcXyz_AttacherAtTableMountZero)) return; - Vec3d coordinateMove; + vec3d_t coordinateMove; if (HeidenhainCycleDef247Q339 == 0 && HeidenhainCycleDef7Arg == null) return; coordinateMove = NcFlagUtil.GetHeidenhainCoordinateOffset( diff --git a/Disp/IsoCoordinateEntryDisplayee.cs b/Disp/IsoCoordinateEntryDisplayee.cs index e7e1ba0..ffc8315 100644 --- a/Disp/IsoCoordinateEntryDisplayee.cs +++ b/Disp/IsoCoordinateEntryDisplayee.cs @@ -45,12 +45,12 @@ public class IsoCoordinateEntryDisplayee : IAnchoredDisplayee if (ncEnv == null) return; - if (ncEnv.IsoCoordinateTable?.TryGetValue(IsoCoordinateId, out Vec3d coordinateMove) != true) + if (ncEnv.IsoCoordinateTable?.TryGetValue(IsoCoordinateId, out vec3d_t coordinateMove) != true) return; string text = IsoCoordinateId ?? ""; IMachiningEquipment equipment = MillingEquipmentFunc?.Invoke(); - if (equipment == null || !equipment.TryGetIsoCoordinatePosition(coordinateMove, out Vec3d attacherPos)) + if (equipment == null || !equipment.TryGetIsoCoordinatePosition(coordinateMove, out vec3d_t attacherPos)) return; bind.ModelMatStack.Push(); @@ -64,11 +64,11 @@ public class IsoCoordinateEntryDisplayee : IAnchoredDisplayee HardNcEnv ncEnv = NcEnv; if (ncEnv == null) return; - if (ncEnv.IsoCoordinateTable?.TryGetValue(IsoCoordinateId, out Vec3d coordinateMove) != true) + if (ncEnv.IsoCoordinateTable?.TryGetValue(IsoCoordinateId, out vec3d_t coordinateMove) != true) return; IMachiningEquipment equipment = MillingEquipmentFunc?.Invoke(); - if (equipment == null || !equipment.TryGetIsoCoordinatePosition(coordinateMove, out Vec3d attacherPos)) + if (equipment == null || !equipment.TryGetIsoCoordinatePosition(coordinateMove, out vec3d_t attacherPos)) return; dst.Expand(attacherPos); } diff --git a/Geom/DemoBuildGeom.cs b/Geom/DemoBuildGeom.cs index 7822eeb..a77419f 100644 --- a/Geom/DemoBuildGeom.cs +++ b/Geom/DemoBuildGeom.cs @@ -30,8 +30,8 @@ public static class DemoBuildGeom TransformationGeom transformationGeom = new TransformationGeom() { Transformer = new GeneralTransform(1, - new StaticRotation(new Vec3d(0, 0, 1), MathUtil.ToRad(15), new Vec3d(0, 0, 0)), - new StaticTranslation(new Vec3d(0, 0, 0))), + new StaticRotation(new vec3d_t(0, 0, 1), MathUtil.ToRad(15), new vec3d_t(0, 0, 0)), + new StaticTranslation(new vec3d_t(0, 0, 0))), Geom = stl }; GeomCombination geomCombination = new GeomCombination(stlFile, transformationGeom); diff --git a/Geom/DemoIExpandToBox3d.cs b/Geom/DemoIExpandToBox3d.cs index fc792b5..abb99f0 100644 --- a/Geom/DemoIExpandToBox3d.cs +++ b/Geom/DemoIExpandToBox3d.cs @@ -18,7 +18,7 @@ public static class DemoIExpandToBox3d #region DocSite.CountBoundingBox Box3d objA = new Box3d(0, 0, 0, 1, 1, 1); Box3d objB = new Box3d(-1, -2, -3, 3, 2, 1); - Vec3d objC = new Vec3d(-2, 3, -5); + vec3d_t objC = new vec3d_t(-2, 3, -5); Box3d boundingbox = new Box3d(objA, objB, objC); Console.WriteLine("boundingbox: " + boundingbox); diff --git a/MachineTool/DemoBuildMachineTool.cs b/MachineTool/DemoBuildMachineTool.cs index 845d6be..6990d23 100644 --- a/MachineTool/DemoBuildMachineTool.cs +++ b/MachineTool/DemoBuildMachineTool.cs @@ -42,8 +42,8 @@ namespace Sample.MachineTool GeneralXyzabcMachineTool dst = GeneralXyzabcMachineTool.CreateFromChainCode( "[O][Y][X][C][w];[O][Z][B][S][t]"); if (dst.ToolMountTransformer is StaticTranslation st) - st.Trans = new Vec3d(-72.40, 72.40, 176.44); - dst.TransformerB.Pivot = new Vec3d(-72.4, -177.4, 225.94); + st.Trans = new vec3d_t(-72.40, 72.40, 176.44); + dst.TransformerB.Pivot = new vec3d_t(-72.4, -177.4, 225.94); Dictionary solidMap = new Dictionary() { ["O"] = new Solid(new Stl("MachineTool/base.stl")), diff --git a/MachineTool/DemoBuildMachineToolWithoutGeometrys.cs b/MachineTool/DemoBuildMachineToolWithoutGeometrys.cs index 5e47a25..779d92d 100644 --- a/MachineTool/DemoBuildMachineToolWithoutGeometrys.cs +++ b/MachineTool/DemoBuildMachineToolWithoutGeometrys.cs @@ -23,7 +23,7 @@ public static class DemoBuildMachineToolWithoutGeometrys GeneralXyzabcMachineTool xyzabcMachineTool = GeneralXyzabcMachineTool.CreateFromChainCode( "[O][C][w];[O][X][Y][Z][B][S][t]"); if (xyzabcMachineTool.ToolMountTransformer is StaticTranslation st) - st.Trans = new Vec3d(-200, 200, 400); + st.Trans = new vec3d_t(-200, 200, 400); return xyzabcMachineTool; } } diff --git a/Machining/DemoBuildGeomOnlyMachiningProject.cs b/Machining/DemoBuildGeomOnlyMachiningProject.cs index 86f4e19..ef584be 100644 --- a/Machining/DemoBuildGeomOnlyMachiningProject.cs +++ b/Machining/DemoBuildGeomOnlyMachiningProject.cs @@ -74,9 +74,9 @@ public static class DemoBuildGeomOnlyMachiningProject //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. Fixture fixture = Fixture.CreateDefault(); - fixture.Geom = new Box3d(new Vec3d(-40, -40, 0), new Vec3d(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 - = new StaticTranslation(new Vec3d(0, 0, 10)); + = new StaticTranslation(new vec3d_t(0, 0, 10)); localProjectService.Fixture = fixture; //The default shape already leads from the geometry anchor to the fixture diff --git a/Machining/DemoBuildMachiningProject.cs b/Machining/DemoBuildMachiningProject.cs index 0bd9ad0..7bf12bc 100644 --- a/Machining/DemoBuildMachiningProject.cs +++ b/Machining/DemoBuildMachiningProject.cs @@ -187,9 +187,9 @@ public static class DemoBuildMachiningProject //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. Fixture fixture = Fixture.CreateDefault(); - fixture.Geom = new Box3d(new Vec3d(-40, -40, 0), new Vec3d(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 - = new StaticTranslation(new Vec3d(0, 0, 10)); + = new StaticTranslation(new vec3d_t(0, 0, 10)); localProjectService.Fixture = fixture; #endregion diff --git a/Mech/DemoTopo1.cs b/Mech/DemoTopo1.cs index f067c0d..518020a 100644 --- a/Mech/DemoTopo1.cs +++ b/Mech/DemoTopo1.cs @@ -33,10 +33,10 @@ public static class DemoTopo1 Anchor B = new Anchor(asmb, "B"); //build kinematic link - Branch.Attach(O, O1, new StaticTranslation(new Vec3d(0, 0, 80))); - Branch brnX = Branch.Attach(O1, X, new DynamicTranslation(new Vec3d(1, 0, 0))); - Branch brnZ = Branch.Attach(X, Z, new DynamicTranslation(new Vec3d(0, 0, 1))); - Branch brnB = Branch.Attach(Z, B, new DynamicRotation(new Vec3d(0, 1, 0), 0, new Vec3d(-100, 0, 0))); + Branch.Attach(O, O1, new StaticTranslation(new vec3d_t(0, 0, 80))); + Branch brnX = Branch.Attach(O1, X, new DynamicTranslation(new vec3d_t(1, 0, 0))); + Branch brnZ = Branch.Attach(X, Z, new DynamicTranslation(new vec3d_t(0, 0, 1))); + Branch brnB = Branch.Attach(Z, B, new DynamicRotation(new vec3d_t(0, 1, 0), 0, new vec3d_t(-100, 0, 0))); //drive the dynamic transformation by single value for each branch. brnX.Step = 200;