当前位置: 首页>>代码示例>>C#>>正文


C# Solid.DoesIntersect方法代码示例

本文整理汇总了C#中Solid.DoesIntersect方法的典型用法代码示例。如果您正苦于以下问题:C# Solid.DoesIntersect方法的具体用法?C# Solid.DoesIntersect怎么用?C# Solid.DoesIntersect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Solid的用法示例。


在下文中一共展示了Solid.DoesIntersect方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ByPlaneAndLines

 //**CREATE
 /// <summary>
 /// Construct an instance of slicer via a static method.
 /// This makes vertical stacks of given solid
 /// with each stack being of specified thickness
 /// and with given plane as the initial cutplane
 /// </summary>
 /// <param name="solid">Solid: geometry that is to be parsed</param>
 /// <param name="plane">Plane: primary cutplane</param>
 /// <param name="line1">Line1: (optional) defines secondary cutplane</param>
 /// <param name="line2">Line2: (optional) defines tertiary cutplane</param>
 /// <param name="thickness">Thickness: the thickness of the slices, or the thickness of the material to be used for the assembly</param>
 /// <param name="spacing">Spacing: the distance between each slice</param>
 /// <returns>A newly-constructed Slicer object</returns>
 public static Slicer ByPlaneAndLines(Solid solid, Plane plane, Line line1 = null, Line line2 = null, double thickness = 1, double spacing = 0)
 {
     if (!solid.DoesIntersect(plane)) throw new ArgumentException("plane does not intersection solid");
     if (line1.Direction.IsParallel(plane.Normal)) throw new ArgumentException("line is perpendicular to plane");
     if (line2.Direction.IsParallel(plane.Normal)) throw new ArgumentException("line is perpendicular to plane");
     return new Slicer(solid, plane, line1, line2, thickness, spacing);
 }
开发者ID:Hanxuelong,项目名称:BecauseWeDynamo,代码行数:21,代码来源:Slicer.cs


注:本文中的Solid.DoesIntersect方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。