有人可以帮我解决这个问题吗?
编辑:路径是形成最后一个直线最后一行的2个点。
基本上我想在最后TubeConfig.OutsideColor
{0到profundidadePinca}时绘制蓝色,如果路径大于它的值,其余为profundidadePinca
。否则,如果它小于TubeConfig.OutsideColor
,则只需绘制TubeConfig.OutsideColor
;
问题:它在 Point3DCollection remaining = new Point3DCollection();
TubeVisual3D tubeRemain = new TubeVisual3D();
tubeRemain.Path = new Point3DCollection(finalPointsTube.ToList().GetRange(remain.idxStart, remain.idxEnd - remain.idxStart + 1));
if (profundidadePinca < (tubeRemain.Path[1].X - tubeRemain.Path[0].X))
{
remaining = tubeRemain.Path;
tubeRemain.Path[1] = new Point3D(profundidadePinca, tubeRemain.Path[1].Y, tubeRemain.Path[1].Z);
}
tubeRemain.Diameter = TubeConfig.Diameter;
tubeRemain.IsPathClosed = false;
tubeRemain.IsSectionClosed = false;
tubeRemain.Fill = new SolidColorBrush(TubeConfig.OutsideColor);
tubeRemain.Material = new DiffuseMaterial(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#1b74c2")));
Group.Children.Add(tubeRemain);
if (profundidadePinca < (remaining[1].X - remaining[0].X))
{
TubeVisual3D tubeRemainClamp = new TubeVisual3D();
var tubeEnding = finalPointsTube[remain.idxEnd].X;
tubeRemainClamp.Path = new Point3DCollection(finalPointsTube.ToList().GetRange(remain.idxStart, remain.idxEnd - remain.idxStart + 1));
tubeRemainClamp.Path[0] = new Point3D(profundidadePinca, tubeRemainClamp.Path[0].Y, tubeRemainClamp.Path[0].Z);
tubeRemainClamp.Diameter = TubeConfig.Diameter;
tubeRemainClamp.IsPathClosed = false;
tubeRemainClamp.IsSectionClosed = false;
tubeRemainClamp.Fill = new SolidColorBrush(TubeConfig.OutsideColor);
tubeRemainClamp.Material = new DiffuseMaterial(new SolidColorBrush(TubeConfig.OutsideColor));
Group.Children.Add(tubeRemainClamp);
}
remaining = tubeRemain.Path;
tubeRemain.Path[1] = new Point3D(profundidadePinca, tubeRemain.Path[1].Y, tubeRemain.Path[1].Z);
另一件我不明白的事情:
tubeRemain.Path
我在尝试更改remaining
之前尝试保存let clusterId = process.env.NODE_APP_INSTANCE
if (clusterId > 0) return app
//otherwise, do atttch the ws server
。它有效但let storyBoard = UIStoryboard(name: "Main", bundle: nil)
let mainTabBar = storyBoard.instantiateViewController(withIdentifier: "MainTabBar") as! UITabBarController
self.navigationController?.pushViewController(mainTabBar, animated: true)
在执行第二行时会更改值。怎么了?