/// <summary> /// This is the method that actually does the work. /// </summary> /// <param name="DA">The DA object is used to retrieve from inputs and store in outputs.</param> protected override void SolveInstance(IGH_DataAccess DA) { IGH_Goo goo = null; Image image = new Image(); if (!DA.GetData(0, ref goo)) { return; } if (!goo.TryGetImage(ref image)) { return; } Rectangle3d region = new Rectangle3d(); DA.GetData(1, ref region); bool original = false; DA.GetData(2, ref original); Color color = Color.Black; DA.GetData(3, ref color); Filter filter = new Af.Crop(original, color, region.ToDrawingRect(image.Bitmap.Height)); image.Filters.Add(new Af.Crop(original, color, region.ToDrawingRect(image.Bitmap.Height))); DA.SetData(0, image); DA.SetData(1, filter); }
public WorldMap(Rectangle3d _boundary, double _resolution, Mesh _m, List <Point3d> _waterSource, List <Point3d> _plantSource) { step = 0; resolution = _resolution; _boundary.RecenterPlane(0); boundary = _boundary; //register your map here terrainMap = new TerrainMap(this, _m); waterMap = new WaterMap(this, _waterSource); plantMap = new PlantMap(this, _plantSource); Random rnd = new Random(); for (int no_turtles = 0; no_turtles < _plantSource.Count(); no_turtles++) { int locX = (int)_plantSource[no_turtles].X; int locY = (int)_plantSource[no_turtles].Y; int Xmax = plantMap.xLen - 1; int Ymax = plantMap.yLen - 1; locX = locX <0 ? 0 : locX> Xmax ? Xmax : locX; locY = locY <0 ? 0 : locY> Ymax ? Ymax : locY; plant_turtles.Add(new Plant_Turtle(locX, locY, rnd.NextDouble() * 360.0, this)); } }
public static List <Point3d> CreateForLineFromRectangle(Rectangle3d rectangle, int position, CoverDimensions coverDimensions, RebarProperties props) { Point3d startPoint; Point3d endPoint; if (position == 0) { startPoint = new Point3d(rectangle.X.Min + coverDimensions.Left, rectangle.Y.Max - coverDimensions.Top - props.Radius, 0); endPoint = new Point3d(rectangle.X.Max - coverDimensions.Right, rectangle.Y.Max - coverDimensions.Top - props.Radius, 0); } else if (position == 1) { startPoint = new Point3d(rectangle.X.Max - coverDimensions.Right - props.Radius, rectangle.Y.Max - coverDimensions.Top, 0); endPoint = new Point3d(rectangle.X.Max - coverDimensions.Right - props.Radius, rectangle.Y.Min + coverDimensions.Bottom, 0); } else if (position == 2) { startPoint = new Point3d(rectangle.X.Min + coverDimensions.Left, rectangle.Y.Min + coverDimensions.Bottom + props.Radius, 0); endPoint = new Point3d(rectangle.X.Max - coverDimensions.Right, rectangle.Y.Min + coverDimensions.Bottom + props.Radius, 0); } else if (position == 3) { startPoint = new Point3d(rectangle.X.Min + coverDimensions.Left + props.Radius, rectangle.Y.Min + coverDimensions.Bottom, 0); endPoint = new Point3d(rectangle.X.Min + coverDimensions.Left + props.Radius, rectangle.Y.Max - coverDimensions.Top, 0); } else { throw new ArgumentException("Position should be between 0 and 3"); } return(new List <Point3d> { startPoint, endPoint }); }
public static List <Rectangle3d> HorizontalTiles(Rectangle3d B, List <double> R, double H, double WP, double HP, out Rectangle3d rest) { var m_tileSet = new List <Rectangle3d>(); Plane m_basePlane = new Plane(B.Corner(0), B.Plane.XAxis, B.Plane.YAxis); var m_available = B.Width - (WP * B.Width); double m_total = R.Sum(); double m_hPadding = (HP * B.Height) / 2; double m_wPadding = (WP * B.Width) / (R.Count + 1); double m_height = B.Height * H - (HP * B.Height) / 2; double m_xValue = 0; for (int i = 0; i < R.Count; i++) { m_xValue += m_wPadding; double m_nextX = m_xValue + (R[i] / m_total) * m_available; Rectangle3d relayRect = new Rectangle3d(m_basePlane, m_basePlane.PointAt(m_xValue, m_hPadding, 0), m_basePlane.PointAt(m_nextX, m_height, 0)); m_tileSet.Add(new Rectangle3d(new Plane(relayRect.Corner(0), relayRect.Plane.XAxis, relayRect.Plane.YAxis), relayRect.Width, relayRect.Height)); m_xValue = m_nextX; } rest = new Rectangle3d(m_basePlane, new Interval(0, B.Width), new Interval(B.Height * H, B.Height)); return(m_tileSet); }
// Start is called before the first frame update void Start() { var plane = new Rhino.Geometry.Plane(Point3d.Origin, Vector3d.ZAxis); var interval = new Interval(-0.5, 0.5); rect = new Rectangle3d(plane, interval, interval); var intervalR = new Interval(-5, 5); region = new Rectangle3d(plane, intervalR, intervalR); pts = RhinoWrapper.RandomPt(rect, numSphere); _relax = gameObject.AddComponent <Relax>(); spheres = new List <GameObject>(); var col = new Color(0.5f, 0, 0, 0.01f); for (int i = 0; i < pts.Count; i++) { var sphere = GameObject.CreatePrimitive(PrimitiveType.Quad); sphere.GetComponent <MeshRenderer>().material.color = Random.ColorHSV(1f, 1f, 1f, 1f, 0, 0); spheres.Add(sphere); } RhinoPreview.PolyLineShow(region.ToPolyline(), col, 0.3f); }
private static bool CheckDistanceFromBorder(Mesh buiding, Grid grid) { Plane planeWorldXY = Plane.WorldXY; List <Point3d> points = grid.GridXY(); Point3d pMin = points.Min(); Point3d pMax = points.Max(); Point3d ptMin = new Point3d(pMin.X + (grid.DimX * Grid.MIN_NUM_BORDER_CELLS), pMin.Y + (grid.DimY * Grid.MIN_NUM_BORDER_CELLS), 0); Point3d ptMax = new Point3d(pMax.X - (grid.DimX * Grid.MIN_NUM_BORDER_CELLS), pMax.Y - (grid.DimY * Grid.MIN_NUM_BORDER_CELLS), 0); NurbsCurve border = new Rectangle3d(planeWorldXY, ptMin, ptMax).ToNurbsCurve(); Brep bbox = buiding.GetBoundingBox(true).ToBrep(); Transform xprj = Transform.PlanarProjection(planeWorldXY); bbox.Transform(xprj); foreach (BrepVertex v in bbox.Vertices) { if (border.Contains(v.Location, planeWorldXY, tolerance: 0.01) == PointContainment.Outside) { return(false); } } return(true); }
private static List <Polyline> DrawCorridor(List <Point3d> anchors, List <Line> mainAxis) { List <Polyline> corridor = new List <Polyline>(); if (anchors.Count < 2) { return(null); } List <Rectangle3d> rectList = new List <Rectangle3d>(); for (int i = 0; i < anchors.Count - 1; i++) { Rectangle3d tempRect = RectangleTools.DrawP2PRect(anchors[i], anchors[i + 1], CorridorDimension.OneWayWidth); rectList.Add(tempRect); } if (rectList.Count > 1) { Curve intersected = rectList[0].ToNurbsCurve(); for (int i = 0; i < rectList.Count - 1; i++) { List <Curve> unionCurves = new List <Curve>(); unionCurves.Add(intersected); unionCurves.Add(rectList[i + 1].ToNurbsCurve()); intersected = Curve.CreateBooleanUnion(unionCurves)[0]; } corridor.Add(CurveTools.ToPolyline(intersected)); } return(corridor); }
public MyRectangle(Rectangle3d rect3d) { LowerLeft = rect3d.LowerLeft; LowerRight = rect3d.LowerRight; UpperLeft = rect3d.UpperLeft; UpperRight = rect3d.UpperRight; }
/// <summary> /// This is the method that actually does the work. /// </summary> /// <param name="DA">The DA object is used to retrieve from inputs and store in outputs.</param> protected override void SolveInstance(IGH_DataAccess DA) { Rectangle3d B = Rectangle3d.Unset; DA.GetData(0, ref B); List <double> XR = new List <double>(); DA.GetDataList(1, XR); List <double> YR = new List <double>(); DA.GetDataList(2, YR); double IP = 0.02; DA.GetData(3, ref IP); double EP = 0.02; DA.GetData(4, ref EP); int PA = 0; DA.GetData(5, ref PA); //Output DA.SetDataList(0, RectSolution.IrregularTiles(B, XR, YR, EP, IP, PA)); }
public override bool TryLoad(JObject data, Model model, RhinoDoc document) { if (!data.HasType(out int index, "Box2D", "Box3D")) { return(false); } var attributes = GetAttributes(document, data); if (index == 0) // 2D { var a = data["min"].AsPoint2d(); var b = data["max"].AsPoint2d(); var rectangle = new Rectangle3d(Plane.WorldXY, a.ToPoint3d(), b.ToPoint3d()); document.Objects.AddRectangle(rectangle, attributes); } else // 3D { var a = data["min"].AsPoint3d(); var b = data["max"].AsPoint3d(); var bbox = new BoundingBox(a, b); var box = new Box(bbox); document.Objects.AddBox(box, attributes); } return(true); }
public static List <Line> SegmentBounds(Polyline siteBound, Rectangle3d rectangle, int seed, double minAmount) //TODO: remove seed, not used { if (!Query.IsClockwise(siteBound, new Vector3d(0, 0, -1))) { siteBound.Reverse(); } List <double> lengths = new List <double>(); List <Line> segments = new List <Line>(); double segmentWidth = rectangle.Width; double segmentHeight = rectangle.Height; double shortestSegm = Math.Min(segmentWidth, segmentHeight); foreach (var segm in siteBound.GetSegments()) { if (segm.Length > shortestSegm * minAmount) { segments.Add(segm); } } List <Line> shuffledSegments = segments.OrderBy(x => x.Length).ToList(); return(shuffledSegments); }
/// <summary> /// This is the method that actually does the work. /// </summary> /// <param name="DA">The DA object is used to retrieve from inputs and store in outputs.</param> protected override void SolveInstance(IGH_DataAccess DA) { Bitmap sourceImage = null; DA.GetData(0, ref sourceImage); Rectangle3d rec1 = new Rectangle3d(); DA.GetData(1, ref rec1); List <Rectangle3d> rec2 = new List <Rectangle3d>(); DA.GetDataList(2, rec2); Bitmap clone = new Bitmap(sourceImage.Width, sourceImage.Height, sourceImage.PixelFormat); Graphics g = Graphics.FromImage(clone); Rectangle source = ShapeUtil.toRec2D(rec1); foreach (var r in rec2) { Rectangle dest = ShapeUtil.toRec2D(r); g.DrawImage(sourceImage, dest, source, GraphicsUnit.Pixel); } DA.SetData(0, clone); }
/// <summary> /// This is the method that actually does the work. /// </summary> /// <param name="DA">The DA object is used to retrieve from inputs and store in outputs.</param> protected override void SolveInstance(IGH_DataAccess DA) { Rectangle3d rec = new Rectangle3d(); //new Rectangle3d(new Plane(), sourceImage.Width, sourceImage.Height); DA.GetData(0, ref rec); Pen outline = null; DA.GetData(1, ref outline); Pen fill = null; DA.GetData(2, ref fill); RectangleShape shape = new RectangleShape(rec); if (outline != null) { shape.outline(outline); } if (fill != null) { shape.fill(fill); } DA.SetData(0, shape); }
/// <summary> /// This is the method that actually does the work. /// </summary> /// <param name="DA">The DA object is used to retrieve from inputs and store in outputs.</param> protected override void SolveInstance(IGH_DataAccess DA) { Rectangle3d B = Rectangle3d.Unset; DA.GetData(0, ref B); int C = 5; DA.GetData(1, ref C); int R = 5; DA.GetData(2, ref R); double IP = 0.02; DA.GetData(3, ref IP); double EP = 0.02; DA.GetData(4, ref EP); int PA = 0; DA.GetData(5, ref PA); //Output DA.SetDataList(0, RectSolution.GridTiles(B, IP, EP, C, R, PA)); }
protected override void OnDynamicDraw(GetPointDrawEventArgs e) { base.OnDynamicDraw(e); if (From == Point3d.Unset) { return; } var cPlane = e.RhinoDoc.Views.ActiveView.ActiveViewport.ConstructionPlane(); Line = new Line(From, e.CurrentPoint); var yAxis = Vector3d.CrossProduct(Line.Direction, cPlane.ZAxis); if (Flip.CurrentValue) { yAxis.Reverse(); } var plane = new Plane(From, Line.Direction, yAxis); yAxis.Unitize(); var sideLength = Area.CurrentValue / Line.Length; Rectangle = new Rectangle3d(plane, Line.Length, sideLength); var color = e.RhinoDoc.Layers.CurrentLayer.Color; e.Display.DrawPolyline(Rectangle.ToPolyline(), color); }
internal void AddPreviewItem(string bitmap, Curve c, Rectangle3d bounds) { var mesh = Mesh.CreateFromPlanarBoundary(c, MeshingParameters.FastRenderMesh, 0.1); TextureMapping tm = TextureMapping.CreatePlaneMapping(bounds.Plane, bounds.X, bounds.Y, new Interval(-1, 1)); mesh.SetTextureCoordinates(tm, Transform.Identity, true); var mat = new DisplayMaterial(System.Drawing.Color.White); ///Force bitmap to redraw //string docBitmapName = string.Empty; //var docBitmap = Rhino.RhinoDoc.ActiveDoc.Bitmaps.Find(bitmap, true, out docBitmapName); //mat.SetBitmapTexture(docBitmapName, true); mat.SetBitmapTexture(bitmap, true); _previewItems.Add(new HeronRasterPreviewItem() { mesh = mesh, mat = mat }); ///Use Wait to refresh images ///https://discourse.mcneel.com/t/wish-list-set-bitmap-texture-from-memory-stream/105158/5 ///https://mcneel.myjetbrains.com/youtrack/issue/RH-59416 Rhino.RhinoApp.Wait(); }
/// <summary> /// This is the method that actually does the work. /// </summary> /// <param name="DA">The DA object is used to retrieve from inputs and store in outputs.</param> protected override void SolveInstance(IGH_DataAccess DA) { Rectangle3d rec = new Rectangle3d(); DA.GetData(0, ref rec); Pen outline = null; DA.GetData(1, ref outline); Pen fill = null; DA.GetData(2, ref fill); EllipseShape shape = new EllipseShape(rec); if (outline != null) { shape.outline(outline); } if (fill != null) { shape.fill(fill); } DA.SetData(0, shape); }
public void BuildStirrupShape(Plane plane, double height, double width, BendingRoller bendingRoller, int hooksType, double hookLength) { Rectangle3d rectangle = new Rectangle3d(plane, width, height); CoverDimensions coverDimensions = new CoverDimensions(0.0, 0.0, 0.0, 0.0); BuildRectangleToStirrupShape(rectangle, bendingRoller, hooksType, coverDimensions, hookLength); }
/// <summary> /// This is the method that actually does the work. /// </summary> /// <param name="DA">The DA object can be used to retrieve data from input parameters and /// to store data in output parameters.</param> protected override void SolveInstance(IGH_DataAccess DA) { //Create class instances Rectangle3d gardenBound = new Rectangle3d(); Brep carportGeom = new Brep(); Point3d accessPoint = new Point3d(); //Get Data if (!DA.GetData(0, ref gardenBound)) { return; } if (!DA.GetData(1, ref carportGeom)) { return; } if (!DA.GetData(2, ref accessPoint)) { return; } //Set properties PlotPlanning.ObjectModel.Carport carport = new ObjectModel.Carport(); carport.AccessPoint = accessPoint; carport.CarportGeom = carportGeom; carport.GardenBound = gardenBound.ToPolyline(); //Set data DA.SetData(0, carport); }
public SvgDocument(Rectangle3d bounds) { Bounds = bounds; Curves = new List <Curve>(); Styles = new List <Style>(); }
protected RhinoList <Rectangle3d> generateNetRects(Vector3d widthHeightDepthVect, out Point3d bottomRightmostPoint, double thickness = 0) { RhinoList <Rectangle3d> rectList = new RhinoList <Rectangle3d>(); double xDist = widthHeightDepthVect.X; double yDist = widthHeightDepthVect.Y; double zDist = widthHeightDepthVect.Z; // Add thickness for fingering gaps Point3d origin1 = ORIGIN + new Vector3d(xDist + thickness, 0, 0); Point3d origin2 = origin1 + new Vector3d(yDist + thickness, 0, 0); Point3d origin3 = origin2 + new Vector3d(xDist + thickness, 0, 0); // Line 4 rectangles X, Y, X, Y; all Z tall Rectangle3d rect0 = MakeRect(ORIGIN, xDist, zDist, margin: BIRCH_CM); Rectangle3d rect1 = MakeRect(origin1, yDist, zDist, margin: BIRCH_CM); Rectangle3d rect2 = MakeRect(origin2, xDist, zDist, margin: BIRCH_CM); Rectangle3d rect3 = MakeRect(origin3, yDist, zDist, margin: BIRCH_CM); rectList.Add(rect0); rectList.Add(rect1); rectList.Add(rect2); rectList.Add(rect3); // Set the bottomRightmost point so caller function can keep drawing // where we leave off bottomRightmostPoint = origin3 + new Vector3d(rect3.Width, 0, 0); return(rectList); }
/// <summary> /// This is the method that actually does the work. /// </summary> /// <param name="DA">The DA object is used to retrieve from inputs and store in outputs.</param> protected override void SolveInstance(IGH_DataAccess DA) { Rectangle3d B = Rectangle3d.Unset; DA.GetData(0, ref B); List <double> R = new List <double>(); DA.GetDataList(1, R); double H = 0.25; DA.GetData(2, ref H); double WP = 0.02; DA.GetData(3, ref WP); double HP = 0.02; DA.GetData(4, ref HP); //Output Rectangle3d rest; DA.SetDataList(1, RectSolution.HorizontalTiles(B, R, H, WP, HP, out rest)); DA.SetData(0, rest); }
public static List <Rectangle3d> GridTiles(Rectangle3d B, double IP, double EP, int C, int R, int PA) { var m_tileSet = new List <Rectangle3d>(); Plane m_basePlane = new Plane(B.Corner(0), B.Plane.XAxis, B.Plane.YAxis); double m_padSource = (PA == 0 ? B.Width : B.Height); var m_iPadding = IP * m_padSource; var m_ePadding = EP * m_padSource; var m_cellWidth = (B.Width - (m_iPadding * (C - 1)) - (m_ePadding * 2)) / C; var m_cellHeight = (B.Height - (m_iPadding * (R - 1)) - (m_ePadding * 2)) / R; for (int i = 0; i < R; i++) { double m_llY = m_ePadding + m_cellHeight * i + m_iPadding * i; double m_urY = m_ePadding + (m_cellHeight * (i + 1)) + m_iPadding * i; for (int j = 0; j < C; j++) { double m_llX = m_ePadding + m_cellWidth * j + m_iPadding * j; double m_urX = m_ePadding + (m_cellWidth * (j + 1)) + m_iPadding * j; Rectangle3d relayRect = new Rectangle3d(m_basePlane, m_basePlane.PointAt(m_llX, m_llY, 0), m_basePlane.PointAt(m_urX, m_urY, 0)); m_tileSet.Add(new Rectangle3d(new Plane(relayRect.Corner(0), relayRect.Plane.XAxis, relayRect.Plane.YAxis), relayRect.Width, relayRect.Height)); } } return(m_tileSet); }
// <Custom additional code> private List <double> FindSpacing(Rectangle3d rect, double offset) { List <double> spacing = new List <double>(2); double dX = 0; double dY = 0; Vector3d v1 = rect.Plane.XAxis; Vector3d v2 = Plane.WorldXY.XAxis; Vector3d translationVector = new Vector3d(rect.Plane.XAxis.X, rect.Plane.YAxis.Y, 1); // translationVector.Unitize(); if (Vector3d.VectorAngle(v1, v2) < 0.5) { dX = (offset * 2 + rect.Width) * translationVector.X; dY = (offset * 2 + rect.Height) * translationVector.Y; } else { dX = (offset * 2 + rect.Height) * translationVector.Y; dY = (offset * 2 + rect.Width) * translationVector.X; } /* dX = (offset + rect.Width) * translationVector.X; * dY = (offset + rect.Height) * translationVector.Y; */ spacing.Add(dX); spacing.Add(dY); return(spacing); }
public static Curve GetBoundingBoxCurve(Brep region) { var curveBounds = region.GetBoundingBox(Plane.WorldXY); var rect = new Rectangle3d(Plane.WorldXY, curveBounds.Min, curveBounds.Max).ToNurbsCurve(); return(rect); }
/// <summary> /// This is the method that actually does the work. /// </summary> /// <param name="DA">The DA object can be used to retrieve data from input parameters and /// to store data in output parameters.</param> protected override void SolveInstance(IGH_DataAccess DA) { List <Curve> boundaries = new List <Curve>(); Rectangle3d fitRect = new Rectangle3d(); List <double> orientations = new List <double>(); bool bRotation = false; bool bAxisAligned = false; double searchSpacing = 1.0; double offset = 5.0; DA.GetData(0, ref boundaries); DA.GetData(1, ref fitRect); DA.GetData(2, ref orientations); DA.GetData(3, ref offset); DA.GetData(4, ref searchSpacing); DA.GetData(5, ref bRotation); DA.GetData(6, ref bAxisAligned); List <Rectangle3d> foundRects = new List <Rectangle3d>(); List <Point3d> pts = new List <Point3d>(); List <Vector3d> vs = new List <Vector3d>(); foreach (Curve boundary in boundaries) { if (fitRect.IsValid) { BoundingBox bx = boundary.GetBoundingBox(false); foundRects.AddRange(CheckFit(bx, fitRect, boundary, offset, bRotation, pts, searchSpacing, bAxisAligned, vs)); } } DA.SetData(0, foundRects); DA.SetData(1, pts); DA.SetData(2, vs); }
// Rectangles now and forever forward will become polylines public static SpecklePolyline ToSpeckle(this Rectangle3d rect) { return(new SpecklePolyline((new Point3d[] { rect.Corner(0), rect.Corner(1), rect.Corner(2), rect.Corner(3) }).ToFlatArray()) { Closed = true }); }
public static void drawText_section(Rectangle3d tempBoundingBox, Rhino.Display.Text3d textToDraw, double tempScaleFactor, System.Windows.Point tempOrigin, ref Canvas UnitPlanCanvas, double fontSize, System.Windows.Media.Brush foreGround) { System.Windows.Point tempTransformedPoint = pointConverter(tempBoundingBox, textToDraw.TextPlane.Origin, tempScaleFactor, tempOrigin); Border tempBorder = new Border(); tempBorder.Height = 200; tempBorder.Width = 200; Canvas.SetLeft(tempBorder, pointConverter(tempBoundingBox, textToDraw.TextPlane.Origin, tempScaleFactor, tempOrigin).X - 200 / 2); Canvas.SetTop(tempBorder, pointConverter(tempBoundingBox, textToDraw.TextPlane.Origin, tempScaleFactor, tempOrigin).Y - 200 / 2); TextBlock textBlockToDraw = new TextBlock(); textBlockToDraw.Text = textToDraw.Text; textBlockToDraw.Foreground = foreGround; textBlockToDraw.FontSize = fontSize; textBlockToDraw.VerticalAlignment = System.Windows.VerticalAlignment.Center; textBlockToDraw.HorizontalAlignment = System.Windows.HorizontalAlignment.Center; System.Windows.Media.RotateTransform tempRotater = new System.Windows.Media.RotateTransform(90); textBlockToDraw.RenderTransform = tempRotater; textBlockToDraw.RenderTransformOrigin = new System.Windows.Point(.5, .5); tempBorder.Child = textBlockToDraw; UnitPlanCanvas.Children.Add(tempBorder); }
private static Point3d _getAlignmentPoint(Rectangle3d rectg) { Vector3d vector = (rectg.UpperRight - rectg.LowerLeft); Point3d alignment = rectg.LowerLeft.Add(vector.MultiplyBy(0.5d)); return(alignment); }
private void createParkingspace(Plane parkingspacePlane, LocalRules localRules, Boolean Flip) { //Create Parking rectangle Box = new Rectangle3d(parkingspacePlane, localRules.BoothWidth, localRules.BoothDepth); //Create ManeuveringArea Vector3d reverseVector = parkingspacePlane.YAxis; reverseVector.Reverse(); parkingspacePlane = new Plane(parkingspacePlane.Origin, parkingspacePlane.XAxis, reverseVector); if (Flip) { reverseVector.Unitize(); reverseVector = Vector3d.Multiply(localRules.ManeuveringArea + localRules.BoothDepth, -parkingspacePlane.YAxis); parkingspacePlane.Translate(reverseVector); } ManeuveringBox = new Rectangle3d(parkingspacePlane, localRules.BoothWidth, localRules.ManeuveringArea); //Create Parking Curves Center = Box.Center; Polyline polylineBox = Box.ToPolyline(); List <Curve> boxSegments = new List <Curve>(); boxSegments.Add(polylineBox.SegmentAt(1).ToNurbsCurve()); boxSegments.Add(polylineBox.SegmentAt(3).ToNurbsCurve()); if (Flip) { boxSegments.Add(polylineBox.SegmentAt(0).ToNurbsCurve()); } else { boxSegments.Add(polylineBox.SegmentAt(2).ToNurbsCurve()); } Curves = Curve.JoinCurves(boxSegments)[0]; }