NuGet Response status code does not indicate success: 401 (Unauthorized).

Retrying 'FindPackagesByIdAsyncCore' for source 'https://nexus-cn/repository/nuget-group/FindPackagesById()?id='Moq'&semVerLevel=2.0.0'.
An error occurred while sending the request.
  The request was aborted: The request was canceled.
  The ServicePointManager does not support proxies with the https scheme.
Retrying 'FindPackagesByIdAsyncCore' for source 'https://nexus-cn/repository/nuget-group/FindPackagesById()?id='NLog.Web.AspNetCore'&semVerLevel=2.0.0'.
Response status code does not indicate success: 401 (Unauthorized). 

原因:登录用户的密码输错了,清理后重新输入就好了。

  在控制面板->凭据管理器->Windows Credentials->找到VS Credential 删除,再次Restore NuGet 后会再次提示输入机器登录名和密码,输入正确就解决了。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
首先,我们需要安装 HelixToolkit 包,以便在C# WPF应用程序中使用HelixToolkit进行3D渲染。可以通过NuGet包管理器来完成此操作。 接下来,我们可以使用 HelixToolkit 中的 TubeVisual3D 类来绘制管道。管道由一系列线段和曲线段组成,其中曲线段是在给定半径下的圆弧。 以下是一个简单的实现: ```csharp using HelixToolkit.Wpf; using System.Windows.Media.Media3D; // 定义一个 3D 管道类 public class Pipe { public Point3D StartPoint { get; set; } public Point3D EndPoint { get; set; } public double Radius { get; set; } // 构造函数 public Pipe(Point3D startPoint, Point3D endPoint, double radius) { StartPoint = startPoint; EndPoint = endPoint; Radius = radius; } // 获取管道的路径 public TubeVisual3D GetPath() { var path = new PipeVisual3D(); // 定义路径的起点和终点 path.Point1 = StartPoint; path.Point2 = EndPoint; // 定义管道的半径 path.Diameter = Radius * 2; // 绘制管道 path.Fill = Brushes.Silver; path.IsPathVisible = true; path.Path.Add(new Point3D(StartPoint.X, StartPoint.Y, StartPoint.Z)); path.Path.Add(new Point3D(EndPoint.X, EndPoint.Y, EndPoint.Z)); return path; } } ``` 然后,我们可以使用上面的代码来创建管道对象,并将它们添加到 HelixViewport3D 中: ```csharp using HelixToolkit.Wpf; using System.Windows.Media.Media3D; public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); // 创建管道 var pipe1 = new Pipe(new Point3D(-345.9870, 215.2380, 194.9740), new Point3D(-345.9870, 215.2380, 58.0000), 32); var pipe2 = new Pipe(new Point3D(-345.9870, 215.2380, 58.0000), new Point3D(202.0859, 240.6216, 58.0000), 64); var pipe3 = new Pipe(new Point3D(202.0859, 240.6216, 58.0000), new Point3D(202.0850, 210.6230, 133.0000), 0); // 添加管道到视口 viewport3D.Children.Add(pipe1.GetPath()); viewport3D.Children.Add(pipe2.GetPath()); viewport3D.Children.Add(pipe3.GetPath()); } } ``` 这将在 HelixViewport3D 中绘制出所需的管道。需要注意的是,我们还可以通过更改管道的材质和颜色来美化它们。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值