Skip to content

Commit

Permalink
Cleanup in appbundle
Browse files Browse the repository at this point in the history
  • Loading branch information
adamenagy committed May 7, 2020
1 parent 0710a1b commit 6c62c3e
Showing 1 changed file with 0 additions and 44 deletions.
44 changes: 0 additions & 44 deletions UpdateIPTParam/SampleAutomation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,45 +114,10 @@ public void SendPicture(AssemblyComponentDefinition acd, JObject jParams)
Camera cam = m_server.TransientObjects.CreateCamera();
cam.SceneObject = acd;

//cam.ViewOrientationType = ViewOrientationTypeEnum.kArbitraryViewOrientation;
//JArray values = jParams["target"] as JArray;
//cam.Target = tg.CreatePoint(values[0].Value<double>(), values[0].Value<double>(), values[0].Value<double>());

cam.ViewOrientationType = ViewOrientationTypeEnum.kIsoTopRightViewOrientation;
cam.Fit();
cam.ApplyWithoutTransition();
cam.SaveAsBitmap("output.png", width, height, Type.Missing, Type.Missing);

/*
byte [] bytes = System.IO.File.ReadAllBytes("temp.png");
string base64 = Convert.ToBase64String(bytes);
Trace.WriteLine($"base64 = {base64}");
IList<string> parts = Split(base64, 500);
for (int counter = 0; counter < parts.Count; counter++)
{
//JObject jRoot = new JObject();
//jRoot.Add("png", png);
//string data = jRoot.ToString(Formatting.None).Replace("\"", "'");
//Trace.WriteLine($"data = {data}");
string part = parts[counter];
string prefix = "png";
if (counter == parts.Count - 1)
prefix += "end";
else
prefix += counter.ToString().PadLeft(3, '0');
GetOnDemandFile(
"onProgress",
"placeholder",
null,
"placeholder",
prefix + part);
}
*/
}

public void SendPositions(AssemblyComponentDefinition acd)
Expand Down Expand Up @@ -188,15 +153,6 @@ public void SendPositions(AssemblyComponentDefinition acd)
Trace.WriteLine($"data = {data}");

System.IO.File.WriteAllText("output.json", data);

/*
GetOnDemandFile(
"onProgress",
"placeholder",
null,
"placeholder",
data);
*/
}

public void ZipModelFiles(AssemblyDocument asm, string asmPath, string zipPath)
Expand Down

0 comments on commit 6c62c3e

Please sign in to comment.