Hi,
I downloaded the github samples for Rhino Inside and tried the C# eto sample.
Trying to open a file, makes the viewport freeze 9 out of 10 times. Here is the sample file used
OneRectangle.3dm (19.8 KB) .
If I force load the file in the MainForm() constructor, the file is loaded without any problems.
Here is the code :
public MainForm() {
Title = "Rhino.Inside";
ClientSize = new Eto.Drawing.Size(400, 400);
_viewportControl = new Rhino.UI.Controls.ViewportControl();
Content = _viewportControl;
var viewMenu = new Eto.Forms.ButtonMenuItem { Text = "&View" };
BuildDisplayModesMenu(viewMenu.Items);
Menu = new Eto.Forms.MenuBar()
{
Items =
{
new Eto.Forms.ButtonMenuItem
{
Text = "&File",
Items =
{
new Eto.Forms.ButtonMenuItem(new Eto.Forms.Command((s,e)=>OpenFile())) { Text = "Open..." }
}
},
viewMenu
}
};
Rhino.RhinoDoc.Open(@"SiöpleRectqngle.3dm", out bool alreadyOpen);
_viewportControl.Viewport.ZoomExtents();
_viewportControl.Refresh();
}
I came by testing the eto sample because I had the same problem with WPF.
Rhino version : 7.1.20322.15001
Rhino Inside updated to version 0.2.0
Does anyone have an idea of what the root cause might be?