Hi All,
I’ve made custom commands to change the cameraposition but these arent able to interrupt other commands such as setting a dimension for example.
Steps in what I try to achieve:
1 Start dimension command.
2 click on cplane for first point.
3 change view (This doesnt work).
4 click on cplanefor second point.
I dont have a clue about what to modify to achieve this. Below the code for changing the view.
Hopefully you can help me.
BoundingBox bB = new BoundingBox();
if (RhinoDoc.ActiveDoc.Objects.Count > 0)
{
foreach (RhinoObject ro in RhinoDoc.ActiveDoc.Objects)
{
bB.Union(ro.Geometry.GetBoundingBox(false));
}
}
Rhino.Display.RhinoViewport viewport = RhinoDoc.ActiveDoc.Views.ActiveView.ActiveViewport;
viewport.SetCameraDirection((cameraViewDirection), false);
viewport.ZoomBoundingBox(bB);
viewport.CameraUp = cameraParallelToScreenUpDirection;
viewport.Name = name;
ConstructionPlane constructionPlane = new ConstructionPlane();
constructionPlane.Plane = cPlane;
viewport.PushConstructionPlane(constructionPlane);
RhinoDoc.ActiveDoc.Views.RedrawEnabled = true;
RhinoDoc.ActiveDoc.Views.ActiveView.Redraw();
7 posts - 5 participants