/// <summary>
 /// Construct a BallonaBridgeInputs with default inputs.
 /// This should be used for testing only.
 /// </summary>
 public BallonaBridgeInputs() : base()
 {
     this.BridgeWidth  = 10;
     this.BridgeHeight = 10;
     this.Material     = Material.Wood;
     this.CenterLine   = new Elements.Geometry.Polyline(new [] { new Vector3(0, 0, 0), new Vector3(0, 1, 0), new Vector3(1, 1, 0) });
 }
 public BallonaBridgeInputs(double bridgewidth, double bridgeheight, Material material, Elements.Geometry.Polyline centerline, string bucketName, string uploadsBucket, Dictionary <string, string> modelInputKeys, string gltfKey, string elementsKey, string ifcKey) : base(bucketName, uploadsBucket, modelInputKeys, gltfKey, elementsKey, ifcKey)
 {
     this.BridgeWidth  = bridgewidth;
     this.BridgeHeight = bridgeheight;
     this.Material     = material;
     this.CenterLine   = centerline;
 }
示例#3
0
 public EnvelopeByCenterlineTestInputs(Elements.Geometry.Polyline centerline, double buildingheight, double barwidth, double foundationdepth, string bucketName, string uploadsBucket, Dictionary <string, string> modelInputKeys, string gltfKey, string elementsKey, string ifcKey) : base(bucketName, uploadsBucket, modelInputKeys, gltfKey, elementsKey, ifcKey)
 {
     this.Centerline      = centerline;
     this.BuildingHeight  = buildingheight;
     this.BarWidth        = barwidth;
     this.FoundationDepth = foundationdepth;
 }
示例#4
0
 /// <summary>
 /// Calculate a polygon from the 2d convex hull of a polyline or polygon's vertices.
 /// </summary>
 /// <param name="p">A polygon</param>
 /// <returns>A polygon representing the convex hull of the provided shape.</returns>
 public static Polygon FromPolyline(Polyline p)
 {
     return(FromPoints(p.Vertices));
 }
示例#5
0
 /// <summary>
 /// Find the shortest distance from this point to any point on the
 /// polyline, and output the location of the closest point on that polyline.
 /// </summary>
 /// <param name="polyline">The polyline for computing the distance.</param>
 public double DistanceTo(Polyline polyline)
 {
     return(this.DistanceTo(polyline, out _));
 }
示例#6
0
 /// <summary>
 /// Split a set of profiles with a collection of open polylines.
 /// </summary>
 /// <param name="profiles">The profiles to split</param>
 /// <param name="splitLine">The polyline defining the splits.</param>
 /// <param name="tolerance">An optional tolerance.</param>
 public static List <Profile> Split(IEnumerable <Profile> profiles, Polyline splitLine, double tolerance = Vector3.EPSILON)
 {
     return(Profile.Split(profiles, new[] { splitLine }, tolerance));
 }
示例#7
0
文件: Line.cs 项目: m-clare/Elements
 /// <summary>
 /// Extend this line to its (nearest, by default) intersection with a polyline.
 /// </summary>
 /// <param name="polyline">The polyline to intersect with</param>
 /// <param name="bothSides">Optional — if false, will only extend in the line's direction; if true will extend in both directions.</param>
 /// <param name="extendToFurthest">Optional — if true, will extend line as far as it will go, rather than stopping at the closest intersection.</param>
 public Line ExtendTo(Polyline polyline, bool bothSides = true, bool extendToFurthest = false)
 {
     return(ExtendTo(polyline.Segments(), bothSides, extendToFurthest));
 }