From 5e1bd8ca9ac0d485f02ebf956c541e5e2c6632e9 Mon Sep 17 00:00:00 2001 From: GG Z <903524121@qq.com> Date: Fri, 11 Jun 2021 15:42:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=91=BD=E5=90=8D=E8=A7=84=E8=8C=83=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- RookieStation/CmdArrangeShelfCards.cs | 23 +- RookieStation/CmdBrowserFamily.cs | 15 +- RookieStation/CmdNewDimension.cs | 2 +- RookieStation/CmdPlaceEntranceGate.cs | 45 +- RookieStation/CmdPlaceExitGate.cs | 76 +- RookieStation/CmdPlaceFloorFinishes.cs | 838 ++++++++--------- RookieStation/CmdPlaceLamps.cs | 349 ++++--- RookieStation/CmdPlaceReceptionArea.cs | 253 ++--- RookieStation/CmdPlaceShelves.cs | 154 ++-- RookieStation/CmdPlaceWallFinishes.cs | 336 +++++-- RookieStation/Custom/Enum.cs | 4 +- RookieStation/Custom/Shelf.cs | 10 +- RookieStation/RookieStation.csproj | 1 - RookieStation/RsApp.cs | 39 +- .../RsLibrary/Document/样板工程量清单.xlsx | Bin 132519 -> 133370 bytes RookieStation/ShelvesPlacementViewModel.cs | 34 +- RookieStation/TestCmd.cs | 52 -- RookieStation/Utils/DocumentExtension.cs | 4 +- RookieStation/Utils/RsRevitUtils.cs | 160 ++-- RookieStation/Utils/ViewPlanCmdEnabled.cs | 13 + RookieStation/WpfEntranceGate.xaml | 2 +- RookieStation/WpfEntranceGate.xaml.cs | 7 +- RookieStation/WpfExitGate.xaml | 2 +- RookieStation/WpfExitGate.xaml.cs | 12 +- RookieStation/WpfFloorFinishes.xaml | 6 +- RookieStation/WpfFloorFinishes.xaml.cs | 16 +- RookieStation/WpfLampsLayout.xaml.cs | 11 +- RookieStation/WpfReceptionArea.xaml | 187 ++-- RookieStation/WpfReceptionArea.xaml.cs | 48 +- RookieStation/WpfShelfCards.xaml | 10 +- RookieStation/WpfShelfCards.xaml.cs | 293 +++--- RookieStation/WpfShelvesLayout.xaml | 50 +- RookieStation/WpfShelvesLayout.xaml.cs | 30 +- RookieStation/WpfWallFinishes.xaml | 69 +- RookieStation/WpfWallFinishes.xaml.cs | 9 +- RookieStation/cmdExportWorkSchedule.cs | 350 ++++--- RookieStationSetup/RookieStationSetup.vdproj | 868 +++++++++--------- 37 files changed, 2288 insertions(+), 2090 deletions(-) delete mode 100644 RookieStation/TestCmd.cs diff --git a/RookieStation/CmdArrangeShelfCards.cs b/RookieStation/CmdArrangeShelfCards.cs index b966101..615628d 100644 --- a/RookieStation/CmdArrangeShelfCards.cs +++ b/RookieStation/CmdArrangeShelfCards.cs @@ -7,6 +7,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; using System.Windows; +using System.Windows.Controls; namespace RookieStation.PackAreaModule { @@ -17,22 +18,21 @@ namespace RookieStation.PackAreaModule public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) { UIApplication uiapp = commandData.Application; - UIDocument uidoc = uiapp.ActiveUIDocument; - string addin_path = typeof(RsApp).Assembly.Location; - string assembly_directory = System.IO.Path.GetDirectoryName(addin_path); - AssemblyLoader loader = new AssemblyLoader(assembly_directory); + string addinPath = typeof(RsApp).Assembly.Location; + string assemblyDirectory = System.IO.Path.GetDirectoryName(addinPath); + AssemblyLoader loader = new AssemblyLoader(assemblyDirectory); try { loader.HookAssemblyResolve(); - WpfShelfCards cards_number = new WpfShelfCards(uiapp); + WpfShelfCards shelfCards = new WpfShelfCards(uiapp); - System.Windows.Interop.WindowInteropHelper mainUI = new System.Windows.Interop.WindowInteropHelper(cards_number) + System.Windows.Interop.WindowInteropHelper mainui = new System.Windows.Interop.WindowInteropHelper(shelfCards) { Owner = System.Diagnostics.Process.GetCurrentProcess().MainWindowHandle }; - cards_number.ShowDialog(); + shelfCards.ShowDialog(); } catch (Exception ex) { @@ -43,7 +43,16 @@ namespace RookieStation.PackAreaModule { loader.UnhookAssemblyResolve(); } + //if (shelfcards.IsPlace) + //{ + // PlaceCards(shelfcards, uidoc); + //} + //else + //{ + // NumberCards(shelfcards, uidoc); + //} return Result.Succeeded; + //if (IsVisible("端牌编号")) //{ // WinIntPtr.ShowAndActive("端牌编号"); diff --git a/RookieStation/CmdBrowserFamily.cs b/RookieStation/CmdBrowserFamily.cs index a41fa1a..f9e7415 100644 --- a/RookieStation/CmdBrowserFamily.cs +++ b/RookieStation/CmdBrowserFamily.cs @@ -15,11 +15,18 @@ namespace RookieStation.CommonTools { public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) { - UIApplication uiapp = commandData.Application; - UIDocument uidoc = uiapp.ActiveUIDocument; //var dpid = new DockablePaneId(PaneIdentifiers.GetManagerPaneIdentifier()); - var library_directory = UserConstant.FamilyLibraryDirectory; - System.Diagnostics.Process.Start(library_directory); + try + { + var libraryDirectory = UserConstant.FamilyLibraryDirectory; + System.Diagnostics.Process.Start(libraryDirectory); + } + catch (Exception) + { + TaskDialog.Show("温馨提示", "路径不存在,无法浏览文件"); + return Result.Failed; + } + return Result.Succeeded; } } diff --git a/RookieStation/CmdNewDimension.cs b/RookieStation/CmdNewDimension.cs index 129edb9..85f93c2 100644 --- a/RookieStation/CmdNewDimension.cs +++ b/RookieStation/CmdNewDimension.cs @@ -28,7 +28,7 @@ namespace RookieStation List reffaces = new List(); var ins = instances.FirstOrDefault(); - var p = RsRevitUtils.GetXYZByElement(ins); + var p = RsRevitUtils.GetLocationPointByElement(ins); var v = ins.FacingOrientation; Line line = Line.CreateUnbound(p, v); //createoffest需要根据线的方向和参考方向进行叉乘 diff --git a/RookieStation/CmdPlaceEntranceGate.cs b/RookieStation/CmdPlaceEntranceGate.cs index c08590b..91a5c22 100644 --- a/RookieStation/CmdPlaceEntranceGate.cs +++ b/RookieStation/CmdPlaceEntranceGate.cs @@ -38,20 +38,19 @@ namespace RookieStation.PackAreaModule Document doc = uidoc.Document; revitWindow = uiapp.MainWindowHandle; - WpfEntranceGate entrancegateLayout = CommonUtils.GenerateWindow(); + WpfEntranceGate entranceGateLayout = CommonUtils.GenerateWindow(); + if (entranceGateLayout.DialogResult != true) + { + return Result.Cancelled; + } return doc.InvokeGroup(tg => { - if (entrancegateLayout.DialogResult != true) - { - return Result.Cancelled; - } - try { - FamilySymbol linesymbol = RsRevitUtils.GetGuideSymbol(doc); + FamilySymbol guideSymbol = RsRevitUtils.GetGuideSymbol(doc); eleIdsAdded.Clear(); uiapp.Application.DocumentChanged += Application_DocumentChanged; - uidoc.PromptForFamilyInstancePlacement(linesymbol); + uidoc.PromptForFamilyInstancePlacement(guideSymbol); uiapp.Application.DocumentChanged -= Application_DocumentChanged; } catch (Autodesk.Revit.Exceptions.OperationCanceledException) @@ -60,13 +59,13 @@ namespace RookieStation.PackAreaModule { return Result.Cancelled; } - Line refer_line = RsRevitUtils.GetGuideGeometryAndDeleteGuide(doc, eleIdsAdded); + Line line = RsRevitUtils.GetGuideGeometryAndDeleteGuide(doc, eleIdsAdded); uiapp.Application.DocumentChanged -= Application_DocumentChanged; - double interval = (330 + entrancegateLayout.passage_width) / 304.8; + double interval = (330 + entranceGateLayout.PassageWidth) / 304.8; double offest = 0.0; //布置闸机的数量 - List pts = GetInstancePointsByLine(refer_line, interval); + List pts = GetInstancePointsByLine(line, interval); List instances = new List(); doc.Invoke(ts => { @@ -74,43 +73,43 @@ namespace RookieStation.PackAreaModule }, "创建闸机位置"); doc.Invoke(ts => { - RsRevitUtils.AdjustInstances(doc, instances, refer_line, offest); + RsRevitUtils.AdjustInstances(doc, instances, line, offest); }, "调整闸机位置"); } return Result.Succeeded; }, "布置入口闸机"); } - private void CreateGates(UIDocument uidoc, List pts, out List fis, out double offest) + private void CreateGates(UIDocument uidoc, List points, out List fis, out double offest) { Document doc = uidoc.Document; fis = new List(); Level level = uidoc.ActiveView.GenLevel; - Family gate_family = RsRevitUtils.GetLoadedFamily(doc, UserConstant.FamilyLibraryDirectory + "Gate\\闸机.rfa"); - ElementId symbol_id = gate_family.GetFamilySymbolIds().FirstOrDefault(); - FamilySymbol gate_symbol = doc.GetElement(symbol_id) as FamilySymbol; - offest = gate_symbol.GetParameters("深度").FirstOrDefault().AsDouble() / 2; - gate_symbol.Activate(); - foreach (var pt in pts) + Family gateFamily = RsRevitUtils.GetLoadedFamily(doc, UserConstant.FamilyLibraryDirectory + "Gate\\闸机.rfa"); + ElementId symbolId = gateFamily.GetFamilySymbolIds().FirstOrDefault(); + FamilySymbol gateSymbol = doc.GetElement(symbolId) as FamilySymbol; + offest = gateSymbol.GetParameters("深度").FirstOrDefault().AsDouble() / 2; + gateSymbol.Activate(); + foreach (XYZ p in points) { - var instance = doc.Create.NewFamilyInstance(pt, gate_symbol, level, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); + var instance = doc.Create.NewFamilyInstance(p, gateSymbol, level, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); fis.Add(instance); } } - private List GetInstancePointsByLine(Line referline, double interval) + private List GetInstancePointsByLine(Line line, double interval) { int n = 50; List pts = new List(); for (int i = 0; i < n; i++) { double parameter = (i + 0.5) * interval; - if (!referline.IsInside(parameter + (interval / 2))) + if (!line.IsInside(parameter + (interval / 2))) { break; } - pts.Add(referline.Evaluate(parameter, false)); + pts.Add(line.Evaluate(parameter, false)); } return pts; diff --git a/RookieStation/CmdPlaceExitGate.cs b/RookieStation/CmdPlaceExitGate.cs index dcce812..1620f6a 100644 --- a/RookieStation/CmdPlaceExitGate.cs +++ b/RookieStation/CmdPlaceExitGate.cs @@ -44,18 +44,18 @@ namespace RookieStation.PackAreaModule Document doc = uidoc.Document; revitWindow = uiapp.MainWindowHandle; - WpfExitGate gate_layout = CommonUtils.GenerateWindow(); + WpfExitGate gateLayout = CommonUtils.GenerateWindow(); - if (gate_layout.DialogResult == true) + if (gateLayout.DialogResult == true) { - isPassageStart = gate_layout.isStartPassage; + isPassageStart = gateLayout.IsStartPassage; } else { return Result.Cancelled; } - double interval = (2 * (1030 + gate_layout.passage_width) + 100) / 304.8; - double gate_front_offest = 1630 / 304.8; + double interval = (2 * (1030 + gateLayout.PassageWidth) + 100) / 304.8; + double gateFrontOffest = 1630 / 304.8; List instances = new List(); using (TransactionGroup tg = new TransactionGroup(doc, "布置出口收检台")) @@ -63,11 +63,11 @@ namespace RookieStation.PackAreaModule tg.Start(); try { - FamilySymbol line_symbol = RsRevitUtils.GetGuideSymbol(doc); ; + FamilySymbol guideSymbol = RsRevitUtils.GetGuideSymbol(doc); ; eleIdsAdded.Clear(); uiapp.Application.DocumentChanged += Application_DocumentChanged; - uidoc.PromptForFamilyInstancePlacement(line_symbol); + uidoc.PromptForFamilyInstancePlacement(guideSymbol); uiapp.Application.DocumentChanged -= Application_DocumentChanged; } catch (Autodesk.Revit.Exceptions.OperationCanceledException) @@ -77,7 +77,7 @@ namespace RookieStation.PackAreaModule return Result.Cancelled; } //直线向量 - Line refer_line = RsRevitUtils.GetGuideGeometryAndDeleteGuide(doc, eleIdsAdded); + Line referline = RsRevitUtils.GetGuideGeometryAndDeleteGuide(doc, eleIdsAdded); uiapp.Application.DocumentChanged -= Application_DocumentChanged; int orders = UserConstant.Orders; @@ -89,46 +89,46 @@ namespace RookieStation.PackAreaModule } int m = isPassageStart - ? (int)Math.Floor((refer_line.Length * 304.8 / 1630) + 0.5) - : (int)Math.Floor(((refer_line.Length * 304.8) - 200) / 1630 + 0.5); + ? (int)Math.Floor((referline.Length * 304.8 / 1630) + 0.5) + : (int)Math.Floor(((referline.Length * 304.8) - 200) / 1630 + 0.5); if (m < n) { n = m; } - List pts = new List(); + List locationPoint = new List(); doc.Invoke(ts => { - Family gate_family = RsRevitUtils.GetLoadedFamily(doc, UserConstant.FamilyLibraryDirectory + "Gate\\L型收检台.rfa"); - IEnumerable left_symbolId = from id in gate_family.GetFamilySymbolIds() - where doc.GetElement(id).Name == "左" + Family gateFamily = RsRevitUtils.GetLoadedFamily(doc, UserConstant.FamilyLibraryDirectory + "Gate\\L型收检台.rfa"); + IEnumerable leftSymbolId = from id in gateFamily.GetFamilySymbolIds() + where doc.GetElement(id).Name == "左" + select id; + IEnumerable rightSymbolId = from id in gateFamily.GetFamilySymbolIds() + where doc.GetElement(id).Name == "右" select id; - IEnumerable right_symbolId = from id in gate_family.GetFamilySymbolIds() - where doc.GetElement(id).Name == "右" - select id; - FamilySymbol right_symbol = doc.GetElement(right_symbolId.FirstOrDefault()) as FamilySymbol; + FamilySymbol rightSymbol = doc.GetElement(rightSymbolId.FirstOrDefault()) as FamilySymbol; //ElementId symbolId = family.GetFamilySymbolIds().FirstOrDefault(); - FamilySymbol left_symbol = doc.GetElement(left_symbolId.FirstOrDefault()) as FamilySymbol; + FamilySymbol leftSymbol = doc.GetElement(leftSymbolId.FirstOrDefault()) as FamilySymbol; Level level = uidoc.ActiveView.GenLevel; if (isPassageStart)//起始是通道 { for (int i = 0; i < n; i++) { - XYZ p = refer_line.Evaluate(i * interval, false); - pts.Add(p); + XYZ p = referline.Evaluate(i * interval, false); + locationPoint.Add(p); } - foreach (XYZ location_XYZ in pts) + foreach (XYZ point in locationPoint) { - left_symbol.Activate(); - FamilyInstance left_instance = doc.Create.NewFamilyInstance(location_XYZ, left_symbol, level, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); - instances.Add(left_instance); + leftSymbol.Activate(); + FamilyInstance leftInstance = doc.Create.NewFamilyInstance(point, leftSymbol, level, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); + instances.Add(leftInstance); if (instances.Count() == n + 1) { break; } - right_symbol.Activate(); - FamilyInstance right_instance = doc.Create.NewFamilyInstance(location_XYZ, right_symbol, level, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); - instances.Add(right_instance); + rightSymbol.Activate(); + FamilyInstance rightInstance = doc.Create.NewFamilyInstance(point, rightSymbol, level, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); + instances.Add(rightInstance); if (instances.Count() == n + 1) { break; @@ -144,25 +144,25 @@ namespace RookieStation.PackAreaModule { for (int i = 0; i < n; i++) { - XYZ p = refer_line.Evaluate((i * interval) + 1830 / 304.8, false); + XYZ p = referline.Evaluate((i * interval) + 1830 / 304.8, false); - pts.Add(p); + locationPoint.Add(p); } - foreach (var pt in pts) + foreach (var pt in locationPoint) { - left_symbol.Activate(); - var left_instance = doc.Create.NewFamilyInstance(pt, left_symbol, level, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); + leftSymbol.Activate(); + var leftInstance = doc.Create.NewFamilyInstance(pt, leftSymbol, level, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); //offest = symbol.GetParameters("深度").FirstOrDefault().AsDouble() / 2; - instances.Add(left_instance); + instances.Add(leftInstance); if (instances.Count() == n) { break; } - right_symbol.Activate(); - var right_instance = doc.Create.NewFamilyInstance(pt, right_symbol, level, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); - instances.Add(right_instance); + rightSymbol.Activate(); + var rightInstance = doc.Create.NewFamilyInstance(pt, rightSymbol, level, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); + instances.Add(rightInstance); if (instances.Count() == n) { break; @@ -172,7 +172,7 @@ namespace RookieStation.PackAreaModule }, "加载并创建收检台"); doc.Invoke(ts => { - RsRevitUtils.AdjustInstances(doc, instances, refer_line, gate_front_offest); + RsRevitUtils.AdjustInstances(doc, instances, referline, gateFrontOffest); }, "调整收检台位置"); //if (tg.GetStatus() == TransactionStatus.Started) //{ diff --git a/RookieStation/CmdPlaceFloorFinishes.cs b/RookieStation/CmdPlaceFloorFinishes.cs index cb5690d..e4cfd4b 100644 --- a/RookieStation/CmdPlaceFloorFinishes.cs +++ b/RookieStation/CmdPlaceFloorFinishes.cs @@ -39,485 +39,457 @@ namespace RookieStation.Finishes if (floorCovering.DialogResult == true) { - length = floorCovering.cLength / 304.8; - width = floorCovering.cWidth / 304.8; - gap = floorCovering.cGap / 304.8; + length = floorCovering.PavementLength / 304.8; + width = floorCovering.PavementWidth / 304.8; + gap = floorCovering.PavementGap / 304.8; } else { return Result.Cancelled; } - using (TransactionGroup tg = new TransactionGroup(doc, "地面铺装")) - { - try - { - var v = new FilteredElementCollector(doc).OfClass(typeof(View)) - .Cast() - .FirstOrDefault(x => x.ViewType == ViewType.FloorPlan && x.GenLevel.Elevation == 0); + return doc.InvokeGroup(tg => + { + try + { + //var v = new FilteredElementCollector(doc).OfClass(typeof(View)) + // .Cast() + // .FirstOrDefault(x => x.ViewType == ViewType.FloorPlan && x.GenLevel.Elevation == 0); - var baselevel = new FilteredElementCollector(doc) - .OfClass(typeof(Level)) - .Cast() - .FirstOrDefault(x => x.Elevation == 0); + //if (uidoc.ActiveView.ViewType != ViewType.FloorPlan) + //{ + // uidoc.RequestViewChange(v); + //} + var baseLevel = doc.ActiveView.GenLevel; + List modelCurveIds = new List(); - List modelCurveIds = new List(); - tg.Start(); - if (uidoc.ActiveView.ViewType != ViewType.FloorPlan) - { - uidoc.RequestViewChange(v); - } + SelectFilter roomFilter = new SelectFilter(); + Reference roomReference = uidoc.Selection.PickObject(ObjectType.Element, roomFilter, "请选择房间"); + Room room = doc.GetElement(roomReference) as Room; - SelectFilter selfilter = new SelectFilter(); - Reference roomrefer = uidoc.Selection.PickObject(ObjectType.Element, selfilter, "请选择房间"); - Room room = doc.GetElement(roomrefer) as Room; + var roompoint = RsRevitUtils.GetLocationPointByElement(room); + var segments = room.GetBoundarySegments(new SpatialElementBoundaryOptions()).FirstOrDefault(); - var roompoint = RsRevitUtils.GetXYZByElement(room); - var segments = room.GetBoundarySegments(new SpatialElementBoundaryOptions()).FirstOrDefault(); + doc.Invoke(ts => + { + foreach (var seg in segments) + { + Curve cur = seg.GetCurve(); + Plane plane = Plane.CreateByNormalAndOrigin(XYZ.BasisZ, new XYZ()); + var mc = doc.Create.NewModelCurve(cur, SketchPlane.Create(doc, plane)); + modelCurveIds.Add(mc.Id); + } + }, "模型线创建"); - doc.Invoke(ts => - { - foreach (var seg in segments) - { - Curve cur = seg.GetCurve(); - Plane plane = Plane.CreateByNormalAndOrigin(XYZ.BasisZ, new XYZ()); - var mc = doc.Create.NewModelCurve(cur, SketchPlane.Create(doc, plane)); - modelCurveIds.Add(mc.Id); - } - }, "模型线创建"); + //Reference edge = uidoc.Selection.PickObject(ObjectType.Edge, "请选择边界"); + SelectFilter mlFilter = new SelectFilter(); + Reference refline = uidoc.Selection.PickObject(ObjectType.Element, mlFilter, "请选择基准边线"); + //模型线选取 + var ml = doc.GetElement(refline) as ModelLine; + Line referline = ml.GeometryCurve as Line; + Line longestLine = RsRevitUtils.GetLongestSegmentLine(segments, referline); + XYZ basePoint = uidoc.Selection.PickPoint(UserConstant.SnapAll, "请选择基准点(位于基准线上)"); + double lengthCount = basePoint.DistanceTo(referline.GetEndPoint(0)) + basePoint.DistanceTo(referline.GetEndPoint(1)); + if (referline.Length - lengthCount > 0.001) + { + MessageBox.Show("请选择基准线上的点", "温馨提示"); + return Result.Cancelled; + } + //if (basepoint.IsAlmostEqualTo(ml.GeometryCurve.GetEndPoint(0)) || basepoint.IsAlmostEqualTo(ml.GeometryCurve.GetEndPoint(1))) + //{ + //} + //基准线端点 + var endpoint1 = referline.GetEndPoint(0); + var endpoint2 = referline.GetEndPoint(1); + //基准点向端点的向量 + XYZ v1 = endpoint1 - basePoint; + XYZ v2 = endpoint2 - basePoint; + //用于确认布置方向 + var v0 = roompoint - basePoint; + List curves = new List(); + List instances = new List(); + //Curve currefer = null; + //Curve currefer1 = null; - //Reference edge = uidoc.Selection.PickObject(ObjectType.Edge, "请选择边界"); - SelectFilter mlfilter = new SelectFilter(); - Reference refline = uidoc.Selection.PickObject(ObjectType.Element, mlfilter, "请选择基准边线"); - //模型线选取 - var ml = doc.GetElement(refline) as ModelLine; - Line line = ml.GeometryCurve as Line; - Line line1 = RsRevitUtils.GetLongestSegmentLine(segments, line); - XYZ basepoint = uidoc.Selection.PickPoint(UserConstant.SnapAll, "请选择基准点(位于基准线上)"); - double alength = basepoint.DistanceTo(line.GetEndPoint(0)) + basepoint.DistanceTo(line.GetEndPoint(1)); - if (line.Length - alength > 0.001) - { - MessageBox.Show("请选择基准线上的点", "温馨提示"); - return Result.Cancelled; - } - //if (basepoint.IsAlmostEqualTo(ml.GeometryCurve.GetEndPoint(0)) || basepoint.IsAlmostEqualTo(ml.GeometryCurve.GetEndPoint(1))) - //{ - //} - //基准线端点 - var endp1 = line.GetEndPoint(0); - var endp2 = line.GetEndPoint(1); - //基准点向端点的向量 - XYZ v1 = endp1 - basepoint; - XYZ v2 = endp2 - basepoint; - //用于确认布置方向 - var v0 = roompoint - basepoint; - List curves = new List(); - List instances = new List(); - //Curve currefer = null; - //Curve currefer1 = null; + double interval = length + gap; + List pts = new List(); + List lastpoints = new List(); + XYZ zdir1 = null; + XYZ zdir2 = null; + XYZ offestVector = null; + double d1 = 0.0; + double d2 = 0.0; + //切分基准线后,两侧向量不为0 + if (!v1.IsAlmostEqualTo(XYZ.Zero)) + { + if (endpoint1.DistanceTo(basePoint) < length) + { + System.Windows.MessageBox.Show("基准点与基准线端点距离太近"); + return Result.Cancelled; + } + zdir1 = v1.CrossProduct(v0).Normalize(); + //偏移的方向,直线的侧方向 + offestVector = zdir1.CrossProduct(v1).Normalize(); + Line l1 = Line.CreateBound(basePoint, ml.GeometryCurve.GetEndPoint(0)); - double interval = length + gap; - List pts = new List(); - List lastps = new List(); - XYZ zdir1 = null; - XYZ zdir2 = null; - XYZ offestvector = null; - double d1 = 0.0; - double d2 = 0.0; - //切分基准线后,两侧向量不为0 - if (!v1.IsAlmostEqualTo(XYZ.Zero)) - { - if (endp1.DistanceTo(basepoint) < length) - { - System.Windows.MessageBox.Show("基准点与基准线端点距离太近"); - return Result.Cancelled; - } - zdir1 = v1.CrossProduct(v0).Normalize(); - //偏移的方向,直线的侧方向 - offestvector = zdir1.CrossProduct(v1).Normalize(); - Line l1 = Line.CreateBound(basepoint, ml.GeometryCurve.GetEndPoint(0)); + for (int i = 0; i < 10000; i++) + { + var parameter = i * interval; + if (!l1.IsInside(parameter + interval - gap / 2)) + { + var lastp1 = pts.Last() - offestVector * width / 2; - for (int i = 0; i < 10000; i++) - { - var parameter = i * interval; - if (!l1.IsInside(parameter + interval - gap / 2)) - { - var lastp1 = pts.Last() - offestvector * width / 2; + d1 = lastp1.DistanceTo(endpoint1) - length / 2 - gap; - d1 = lastp1.DistanceTo(endp1) - length / 2 - gap; + var lastfinalpoint = lastp1 + (l1.Direction * (d1 / 2 + length / 2 + gap)) + (offestVector * width / 2); - var lastfinalpoint = lastp1 + (l1.Direction * (d1 / 2 + length / 2 + gap)) + (offestvector * width / 2); + lastpoints.Add(lastfinalpoint); + break; + } + XYZ p = l1.Evaluate(parameter, false); + XYZ finalPoint = p + (l1.Direction * interval / 2) + (offestVector * width / 2); + //当选择的基准点为端点时 + if (v2.IsAlmostEqualTo(XYZ.Zero)) + { + finalPoint = p + (l1.Direction * (interval - gap) / 2) + (offestVector * width / 2); + } - lastps.Add(lastfinalpoint); - break; - } - XYZ p = l1.Evaluate(parameter, false); - XYZ finalpoint = p + (l1.Direction * interval / 2) + (offestvector * width / 2); - //当选择的基准点为端点时 - if (v2.IsAlmostEqualTo(XYZ.Zero)) - { - finalpoint = p + (l1.Direction * (interval - gap) / 2) + (offestvector * width / 2); - } + pts.Add(finalPoint); + } + } - pts.Add(finalpoint); - } - } + if (!v2.IsAlmostEqualTo(XYZ.Zero)) + { + if (endpoint2.DistanceTo(basePoint) < length) + { + System.Windows.MessageBox.Show("基准点与基准线端点距离太近"); + return Result.Cancelled; + } + zdir2 = v2.CrossProduct(v0).Normalize(); + offestVector = zdir2.CrossProduct(v2).Normalize(); + Line l2 = Line.CreateBound(basePoint, ml.GeometryCurve.GetEndPoint(1)); - if (!v2.IsAlmostEqualTo(XYZ.Zero)) - { - if (endp2.DistanceTo(basepoint) < length) - { - System.Windows.MessageBox.Show("基准点与基准线端点距离太近"); - return Result.Cancelled; - } - zdir2 = v2.CrossProduct(v0).Normalize(); - offestvector = zdir2.CrossProduct(v2).Normalize(); - Line l2 = Line.CreateBound(basepoint, ml.GeometryCurve.GetEndPoint(1)); + for (int i = 0; i < 10000; i++) + { + var parameter = i * interval; + if (!l2.IsInside(parameter + interval - gap / 2)) + { + //var lastdistance = pts.Last().DistanceTo(endp1) - interval / 2 - gap / 2; - for (int i = 0; i < 10000; i++) - { - var parameter = i * interval; - if (!l2.IsInside(parameter + interval - gap / 2)) - { - //var lastdistance = pts.Last().DistanceTo(endp1) - interval / 2 - gap / 2; + var lastp2 = pts.Last() - offestVector * width / 2; - var lastp2 = pts.Last() - offestvector * width / 2; + d2 = lastp2.DistanceTo(endpoint2) - length / 2 - gap; - d2 = lastp2.DistanceTo(endp2) - length / 2 - gap; + var lastFinalPoint = lastp2 + (l2.Direction * (d2 / 2 + length / 2 + gap)) + (offestVector * width / 2); - var lastfinalpoint = lastp2 + (l2.Direction * (d2 / 2 + length / 2 + gap)) + (offestvector * width / 2); + lastpoints.Add(lastFinalPoint); + break; + } + XYZ p = l2.Evaluate(parameter, false); + //附加的基准线的水平垂直偏移距离 + var finalpoint = p + (l2.Direction * interval / 2) + (offestVector * width / 2); + if (v1.IsAlmostEqualTo(XYZ.Zero)) + { + finalpoint = p + (l2.Direction * (interval - gap) / 2) + (offestVector * width / 2); + } - lastps.Add(lastfinalpoint); - break; - } - XYZ p = l2.Evaluate(parameter, false); - //附加的基准线的水平垂直偏移距离 - var finalpoint = p + (l2.Direction * interval / 2) + (offestvector * width / 2); - if (v1.IsAlmostEqualTo(XYZ.Zero)) - { - finalpoint = p + (l2.Direction * (interval - gap) / 2) + (offestvector * width / 2); - } + pts.Add(finalpoint); + } + //var lastl2 = pts.Last().DistanceTo(endp2); + } + doc.Invoke(ts => + { + //删除模型线 + doc.Delete(modelCurveIds); + family = RsRevitUtils.GetLoadedFamily(doc, UserConstant.FamilyLibraryDirectory + "FloorFinish\\地砖.rfa"); + ElementId symbolId = family.GetFamilySymbolIds().FirstOrDefault(); + symbol = doc.GetElement(symbolId) as FamilySymbol; + symbol.Activate(); + foreach (var p in pts) + { + var fi = doc.Create + .NewFamilyInstance(p, symbol, baseLevel, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); + instances.Add(fi); + } + foreach (var p in lastpoints) + { + var fi = doc.Create + .NewFamilyInstance(p, symbol, baseLevel, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); + instances.Add(fi); + } + }, "地面铺装"); - pts.Add(finalpoint); - } - //var lastl2 = pts.Last().DistanceTo(endp2); - } + doc.Invoke(ts => + { + XYZ veroffestdir = null; + if (zdir1 != null) + { + veroffestdir = zdir1.CrossProduct(referline.Direction).Normalize(); + } + if (zdir2 != null) + { + veroffestdir = zdir2.CrossProduct(referline.Direction).Normalize(); + } + //旋转角度 + double angle = XYZ.BasisY.AngleTo(veroffestdir); + //判断相对于Y轴是正向角度(逆时针)还是逆向角度(顺时针) + var z = veroffestdir.CrossProduct(XYZ.BasisY).Normalize(); + if (z.IsAlmostEqualTo(XYZ.BasisZ)) + { + //逆向旋转,角度取负值 + angle = -angle; + } + //单行调整地砖数量 + int n = 0; + if (v2.IsAlmostEqualTo(XYZ.Zero) || v1.IsAlmostEqualTo(XYZ.Zero)) + { + n = 1; + } + else + { + n = 2; + } + for (int i = 0; i < instances.Count; i++) + { + FamilyInstance fi = instances[i]; - using (Transaction trans = new Transaction(doc, "地面铺装")) - { - trans.Start(); - //删除模型线 - doc.Delete(modelCurveIds); - family = RsRevitUtils.GetLoadedFamily(doc, UserConstant.FamilyLibraryDirectory + "FloorFinish\\地砖.rfa"); - ElementId symbolId = family.GetFamilySymbolIds().FirstOrDefault(); - symbol = doc.GetElement(symbolId) as FamilySymbol; - symbol.Activate(); - foreach (var p in pts) - { - var fi = doc.Create - .NewFamilyInstance(p, symbol, baselevel, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); - instances.Add(fi); - } - foreach (var p in lastps) - { - var fi = doc.Create - .NewFamilyInstance(p, symbol, baselevel, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); - instances.Add(fi); - } - trans.Commit(); - } - using (Transaction trans = new Transaction(doc, "调整地砖")) - { - trans.Start(); - XYZ veroffestdir = null; - if (zdir1 != null) - { - veroffestdir = zdir1.CrossProduct(line.Direction).Normalize(); - } - if (zdir2 != null) - { - veroffestdir = zdir2.CrossProduct(line.Direction).Normalize(); - } - //旋转角度 - double angle = XYZ.BasisY.AngleTo(veroffestdir); - //判断相对于Y轴是正向角度(逆时针)还是逆向角度(顺时针) - var z = veroffestdir.CrossProduct(XYZ.BasisY).Normalize(); - if (z.IsAlmostEqualTo(XYZ.BasisZ)) - { - //逆向旋转,角度取负值 - angle = -angle; - } - //单行调整地砖数量 - int n = 0; - if (v2.IsAlmostEqualTo(XYZ.Zero) || v1.IsAlmostEqualTo(XYZ.Zero)) - { - n = 1; - } - else - { - n = 2; - } - for (int i = 0; i < instances.Count; i++) - { - FamilyInstance fi = instances[i]; + var filp = RsRevitUtils.GetLocationPointByElement(fi); + Line zaxis = Line.CreateUnbound(filp, XYZ.BasisZ); - var filp = RsRevitUtils.GetXYZByElement(fi); - Line zaxis = Line.CreateUnbound(filp, XYZ.BasisZ); + //旋转,移动 + ElementTransformUtils.RotateElement(doc, fi.Id, zaxis, angle); + fi.GetParameters("长").FirstOrDefault().Set(length); + fi.GetParameters("宽").FirstOrDefault().Set(width); - //旋转,移动 - ElementTransformUtils.RotateElement(doc, fi.Id, zaxis, angle); - fi.GetParameters("长").FirstOrDefault().Set(length); - fi.GetParameters("宽").FirstOrDefault().Set(width); + if (i >= instances.Count - n) + { + var loc = RsRevitUtils.GetLocationPointByElement(instances[i]); - if (i >= instances.Count - n) - { - var loc = RsRevitUtils.GetXYZByElement(instances[i]); + var dis1 = loc.DistanceTo(endpoint1); + var dis2 = loc.DistanceTo(endpoint2); - var dis1 = loc.DistanceTo(endp1); - var dis2 = loc.DistanceTo(endp2); + if (dis1 < interval) + { + fi.GetParameters("长").FirstOrDefault().Set(d1); + } + else if (dis2 < interval) + { + fi.GetParameters("长").FirstOrDefault().Set(d2); + } + } + //ElementTransformUtils.CopyElement(doc, fi.Id, offestvector * (width + gap)); + ////垂直基准线平移 + //ElementTransformUtils.MoveElement(doc, fi.Id, offestdir); - if (dis1 < interval) - { - fi.GetParameters("长").FirstOrDefault().Set(d1); - } - else if (dis2 < interval) - { - fi.GetParameters("长").FirstOrDefault().Set(d2); - } - } - //ElementTransformUtils.CopyElement(doc, fi.Id, offestvector * (width + gap)); - ////垂直基准线平移 - //ElementTransformUtils.MoveElement(doc, fi.Id, offestdir); + ////平行基准线平移 + //ElementTransformUtils.MoveElement(doc, fi.Id, line.Direction * w / 2); + //if (i >= 1) + //{ + // XYZ additionaldir = zdir.CrossProduct(line.Direction).Normalize() * i * (passagewidth + l); + // ElementTransformUtils.MoveElement(doc, fi.Id, additionaldir); + //} + //位于直线右侧时,需要进行左右翻转 + //if (OnLeft == false && fi.CanFlipHand) + //{ + // fi.flipHand(); + //} + } + }, "调整地砖"); - ////平行基准线平移 - //ElementTransformUtils.MoveElement(doc, fi.Id, line.Direction * w / 2); - //if (i >= 1) - //{ - // XYZ additionaldir = zdir.CrossProduct(line.Direction).Normalize() * i * (passagewidth + l); - // ElementTransformUtils.MoveElement(doc, fi.Id, additionaldir); - //} - //位于直线右侧时,需要进行左右翻转 - //if (OnLeft == false && fi.CanFlipHand) - //{ - // fi.flipHand(); - //} - } + doc.Invoke(ts => + { + List idsCopied = new List(); + for (int i = 0; i < instances.Count; i++) + { + FamilyInstance fi = instances[i]; + int num = (int)Math.Floor(longestLine.Length / (width + gap)); + double rem = longestLine.Length - num * (width + gap); + for (int j = 1; j <= num; j++) + { + ICollection eles; + if (j == num) + { + eles = ElementTransformUtils.CopyElement(doc, fi.Id, offestVector * ((rem / 2) + (width + gap) * (j - 0.5) + gap)); + FamilyInstance copyinstance = doc.GetElement(eles.FirstOrDefault()) as FamilyInstance; + copyinstance.GetParameters("宽").FirstOrDefault().Set(rem); - trans.Commit(); - } - using (Transaction trans = new Transaction(doc, "复制地砖")) - { - List copyids = new List(); - trans.Start(); - for (int i = 0; i < instances.Count; i++) - { - FamilyInstance fi = instances[i]; - int num = (int)Math.Floor(line1.Length / (width + gap)); - double rem = line1.Length - num * (width + gap); - for (int j = 1; j <= num; j++) - { - ICollection eles; - if (j == num) - { - eles = ElementTransformUtils.CopyElement(doc, fi.Id, offestvector * ((rem / 2) + (width + gap) * (j - 0.5) + gap)); - FamilyInstance copyinstance = doc.GetElement(eles.FirstOrDefault()) as FamilyInstance; - copyinstance.GetParameters("宽").FirstOrDefault().Set(rem); + idsCopied.AddRange(eles.ToList()); + break; + } + eles = ElementTransformUtils.CopyElement(doc, fi.Id, offestVector * (width + gap) * j); + idsCopied.AddRange(eles.ToList()); + } + } + foreach (var id in idsCopied) + { + FamilyInstance instanceCopied = doc.GetElement(id) as FamilyInstance; + if (instanceCopied.Room == null) + { + doc.Delete(id); + } + } + }, "复制地砖"); - copyids.AddRange(eles.ToList()); - break; - } - eles = ElementTransformUtils.CopyElement(doc, fi.Id, offestvector * (width + gap) * j); - copyids.AddRange(eles.ToList()); - } - } - foreach (var id in copyids) - { - FamilyInstance copyinstance = doc.GetElement(id) as FamilyInstance; - if (copyinstance.Room == null) - { - doc.Delete(id); - } - } - trans.Commit(); - } + #region MyRegion - #region MyRegion + //foreach (var seg in segments) + //{ + // Curve cur = seg.GetCurve(); + // if (cur.GetEndPoint(0).IsAlmostEqualTo(startP) || cur.GetEndPoint(1).IsAlmostEqualTo(startP)) + // { + // currefer = cur; + // } + // if (cur.GetEndPoint(1).IsAlmostEqualTo(startP)) + // { + // currefer1 = cur; + // } - //foreach (var seg in segments) - //{ - // Curve cur = seg.GetCurve(); - // if (cur.GetEndPoint(0).IsAlmostEqualTo(startP) || cur.GetEndPoint(1).IsAlmostEqualTo(startP)) - // { - // currefer = cur; - // } - // if (cur.GetEndPoint(1).IsAlmostEqualTo(startP)) - // { - // currefer1 = cur; - // } + // //XYZ p1 = cur.Evaluate(100 / 304.8, false); + // //XYZ p2 = cur.Evaluate(200 / 304.8, false); + //} - // //XYZ p1 = cur.Evaluate(100 / 304.8, false); - // //XYZ p2 = cur.Evaluate(200 / 304.8, false); - //} + //var n = Math.Floor(currefer1.Length / interval) + 1; + //var rem = currefer1.Length % interval / interval; - //var n = Math.Floor(currefer1.Length / interval) + 1; - //var rem = currefer1.Length % interval / interval; + //var x = 0.5; + //if (rem < 0.334) + //{ + // x = (1 + rem) / 4; + // for (int i = 0; i < n; i++) + // { + // Curve l = null; + // if (i == 0) + // { + // l = currefer.CreateOffset((i + x) * interval, -XYZ.BasisZ); + // } + // if (i >= 1) + // { + // l = currefer.CreateOffset((i - 0.5 + 2 * x) * interval, -XYZ.BasisZ); + // } + // if (i == n - 1) + // { + // l = currefer.CreateOffset((i - 1 + 3 * x) * interval, -XYZ.BasisZ); + // } - //var x = 0.5; - //if (rem < 0.334) - //{ - // x = (1 + rem) / 4; - // for (int i = 0; i < n; i++) - // { - // Curve l = null; - // if (i == 0) - // { - // l = currefer.CreateOffset((i + x) * interval, -XYZ.BasisZ); - // } - // if (i >= 1) - // { - // l = currefer.CreateOffset((i - 0.5 + 2 * x) * interval, -XYZ.BasisZ); - // } - // if (i == n - 1) - // { - // l = currefer.CreateOffset((i - 1 + 3 * x) * interval, -XYZ.BasisZ); - // } + // curves.Add(l); + // } + //} + //else + //{ + // for (int i = 0; i < n; i++) + // { + // //var v = cur.Direction.CrossProduct(XYZ.BasisZ); + // //createoffset的偏移方向由线方向 叉乘 自己给定的方向 - // curves.Add(l); - // } - //} - //else - //{ - // for (int i = 0; i < n; i++) - // { - // //var v = cur.Direction.CrossProduct(XYZ.BasisZ); - // //createoffset的偏移方向由线方向 叉乘 自己给定的方向 + // var l = currefer.CreateOffset((i + x) * interval, -XYZ.BasisZ); + // if (i == n - 1) + // { + // l = currefer.CreateOffset((i - 1 + x) * interval, -XYZ.BasisZ); + // } + // curves.Add(l); + // } + //} - // var l = currefer.CreateOffset((i + x) * interval, -XYZ.BasisZ); - // if (i == n - 1) - // { - // l = currefer.CreateOffset((i - 1 + x) * interval, -XYZ.BasisZ); - // } - // curves.Add(l); - // } - //} + //var m = Math.Floor(currefer.Length / interval) + 1; + //var rem1 = currefer.Length % interval / interval; + //x = 0.5; + //if (rem1 < 0.334) + //{ + // x = (1 + rem1) / 4; + // for (int i = 0; i < m; i++) + // { + // Curve l = null; + // if (i == 0) + // { + // l = currefer1.CreateOffset((i + x) * interval, -XYZ.BasisZ); + // } + // if (i >= 1) + // { + // l = currefer1.CreateOffset((i - 0.5 + 2 * x) * interval, -XYZ.BasisZ); + // } + // if (i == m - 1) + // { + // l = currefer1.CreateOffset((i - 1 + 3 * x) * interval, -XYZ.BasisZ); + // } - //var m = Math.Floor(currefer.Length / interval) + 1; - //var rem1 = currefer.Length % interval / interval; - //x = 0.5; - //if (rem1 < 0.334) - //{ - // x = (1 + rem1) / 4; - // for (int i = 0; i < m; i++) - // { - // Curve l = null; - // if (i == 0) - // { - // l = currefer1.CreateOffset((i + x) * interval, -XYZ.BasisZ); - // } - // if (i >= 1) - // { - // l = currefer1.CreateOffset((i - 0.5 + 2 * x) * interval, -XYZ.BasisZ); - // } - // if (i == m - 1) - // { - // l = currefer1.CreateOffset((i - 1 + 3 * x) * interval, -XYZ.BasisZ); - // } + // curves.Add(l); + // } + //} + //else + //{ + // for (int i = 0; i < m; i++) + // { + // var l = currefer1.CreateOffset((i + x) * interval, -XYZ.BasisZ); + // if (i == m - 1) + // { + // l = currefer.CreateOffset((i - 1 + x) * interval, -XYZ.BasisZ); + // } + // curves.Add(l); + // } + //} - // curves.Add(l); - // } - //} - //else - //{ - // for (int i = 0; i < m; i++) - // { - // var l = currefer1.CreateOffset((i + x) * interval, -XYZ.BasisZ); - // if (i == m - 1) - // { - // l = currefer.CreateOffset((i - 1 + x) * interval, -XYZ.BasisZ); - // } - // curves.Add(l); - // } - //} + //var pts = GetIntersectPoints(curves); + //Plane pl = Plane.CreateByNormalAndOrigin(XYZ.BasisZ, new XYZ()); + //foreach (var item in curves) + //{ + // ModelCurve model = doc.Create.NewModelCurve(item, SketchPlane.Create(doc, pl)); + //} - //var pts = GetIntersectPoints(curves); - //Plane pl = Plane.CreateByNormalAndOrigin(XYZ.BasisZ, new XYZ()); - //foreach (var item in curves) - //{ - // ModelCurve model = doc.Create.NewModelCurve(item, SketchPlane.Create(doc, pl)); - //} + //foreach (var p in pts) + //{ + // var fi = doc.Create + // .NewFamilyInstance(p, symbol, baselevel, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); + // instances.Add(fi); + //} + //foreach (var fi in instances) + //{ + // var lp = fi.Location as LocationPoint; + // var p = lp.Point; + // foreach (var seg in segments) + // { + // var l = seg.GetCurve() as Line; + // if (l.Distance(p) - ((1 + rem) / 4 * interval) < 0.001) + // { + // if (l.Direction.X < 0.001) + // { + // fi.GetParameters("长度").FirstOrDefault().Set((1 + rem) / 2 * (interval - halfgap)); + // } + // else if (l.Direction.Y < 0.001) + // { + // fi.GetParameters("宽度").FirstOrDefault().Set((1 + rem) / 2 * (interval - halfgap)); + // } + // } + // else if (l.Distance(p) - ((1 + rem1) / 4 * interval) < 0.001) + // { + // if (l.Direction.X < 0.001) + // { + // fi.GetParameters("长度").FirstOrDefault().Set((1 + rem1) / 2 * (interval - halfgap)); + // } + // else if (l.Direction.Y < 0.001) + // { + // fi.GetParameters("宽度").FirstOrDefault().Set((1 + rem1) / 2 * (interval - halfgap)); + // } + // } + // if (true) + // { + // } + // } + //} - //foreach (var p in pts) - //{ - // var fi = doc.Create - // .NewFamilyInstance(p, symbol, baselevel, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); - // instances.Add(fi); - //} - //foreach (var fi in instances) - //{ - // var lp = fi.Location as LocationPoint; - // var p = lp.Point; - // foreach (var seg in segments) - // { - // var l = seg.GetCurve() as Line; - // if (l.Distance(p) - ((1 + rem) / 4 * interval) < 0.001) - // { - // if (l.Direction.X < 0.001) - // { - // fi.GetParameters("长度").FirstOrDefault().Set((1 + rem) / 2 * (interval - halfgap)); - // } - // else if (l.Direction.Y < 0.001) - // { - // fi.GetParameters("宽度").FirstOrDefault().Set((1 + rem) / 2 * (interval - halfgap)); - // } - // } - // else if (l.Distance(p) - ((1 + rem1) / 4 * interval) < 0.001) - // { - // if (l.Direction.X < 0.001) - // { - // fi.GetParameters("长度").FirstOrDefault().Set((1 + rem1) / 2 * (interval - halfgap)); - // } - // else if (l.Direction.Y < 0.001) - // { - // fi.GetParameters("宽度").FirstOrDefault().Set((1 + rem1) / 2 * (interval - halfgap)); - // } - // } - // if (true) - // { - // } - // } - //} + //Do Something. - //ModelCurve mc = doc.Create.NewModelCurve(); - //var geoelem = room.get_Geometry(new Options()); - //foreach (var geomObj in geoelem) - //{ - // Solid geomSolid = geomObj as Solid; - // if (null != geomSolid) - // { - // foreach (Face geomFace in geomSolid.Faces) - // { - // break; - // } - // break; - // } - //} - - //Do Something. - - #endregion MyRegion - - tg.Assimilate(); - } - catch (Autodesk.Revit.Exceptions.OperationCanceledException) - { - if (tg.GetStatus() == TransactionStatus.Started) - { - tg.RollBack(); - } - return Result.Cancelled; - } - } - return Result.Succeeded; + #endregion MyRegion + } + catch (Autodesk.Revit.Exceptions.OperationCanceledException) + { + if (tg.GetStatus() == TransactionStatus.Started) + { + tg.RollBack(); + } + return Result.Succeeded; + } + return Result.Succeeded; + }, "地面铺装"); } private List GetIntersectPoints(List curves) diff --git a/RookieStation/CmdPlaceLamps.cs b/RookieStation/CmdPlaceLamps.cs index d623c5d..0cd79ba 100644 --- a/RookieStation/CmdPlaceLamps.cs +++ b/RookieStation/CmdPlaceLamps.cs @@ -27,11 +27,11 @@ namespace RookieStation.PackAreaModule DocumentSet docset = uiapp.Application.Documents; Family family = null; FamilySymbol symbol; - double lrdistance = 0.0; - double fbdistance = 0.0; + double leftRightDistance = 0.0; + double frontDistance = 0.0; - var roomcounts = new FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_Rooms).GetElementCount(); - if (roomcounts == 0) + var roomCount = new FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_Rooms).GetElementCount(); + if (roomCount == 0) { TaskDialog.Show("温馨提示", "项目中当前没有房间"); return Result.Cancelled; @@ -40,8 +40,8 @@ namespace RookieStation.PackAreaModule if (placeLamps.DialogResult == true) { - lrdistance = placeLamps.LRDistance / 304.8; - fbdistance = placeLamps.LRDistance / 304.8; + leftRightDistance = placeLamps.LeftRightDistance / 304.8; + frontDistance = placeLamps.FrontDistance / 304.8; } else { @@ -49,195 +49,186 @@ namespace RookieStation.PackAreaModule } double interval = 2000 / 304.8; - using (TransactionGroup tg = new TransactionGroup(doc, "布置灯具")) - { - try - { - var v = new FilteredElementCollector(doc).OfClass(typeof(View)) - .Cast() - .FirstOrDefault(x => x.ViewType == ViewType.FloorPlan && x.GenLevel.Elevation == 0); + return doc.InvokeGroup(tg => + { + try + { + var v = new FilteredElementCollector(doc).OfClass(typeof(View)) + .Cast() + .FirstOrDefault(x => x.ViewType == ViewType.FloorPlan && x.GenLevel.Elevation == 0); - var baselevel = new FilteredElementCollector(doc) - .OfClass(typeof(Level)) - .Cast() - .FirstOrDefault(x => x.Elevation == 0); + var baseLevel = new FilteredElementCollector(doc) + .OfClass(typeof(Level)) + .Cast() + .FirstOrDefault(x => x.Elevation == 0); - List modelCurveIds = new List(); - tg.Start(); - if (uidoc.ActiveView.ViewType != ViewType.FloorPlan) - { - uidoc.RequestViewChange(v); - } + List modelCurveIds = new List(); + if (uidoc.ActiveView.ViewType != ViewType.FloorPlan) + { + uidoc.RequestViewChange(v); + } - SelectFilter selfilter = new SelectFilter(); - Reference roomrefer = uidoc.Selection.PickObject(ObjectType.Element, selfilter, "请选择房间"); - Room room = doc.GetElement(roomrefer) as Room; + SelectFilter roomFilter = new SelectFilter(); + Reference roomReference = uidoc.Selection.PickObject(ObjectType.Element, roomFilter, "请选择房间"); + Room room = doc.GetElement(roomReference) as Room; - var roompoint = RsRevitUtils.GetXYZByElement(room); + var roomLocationPoint = RsRevitUtils.GetLocationPointByElement(room); - IList segments = room.GetBoundarySegments(new SpatialElementBoundaryOptions()).FirstOrDefault(); + IList segments = room.GetBoundarySegments(new SpatialElementBoundaryOptions()).FirstOrDefault(); - using (Transaction ts = new Transaction(doc, "模型线创建")) - { - ts.Start(); - foreach (var seg in segments) - { - Curve cur = seg.GetCurve(); - Plane plane = Plane.CreateByNormalAndOrigin(XYZ.BasisZ, new XYZ()); - var mc = doc.Create.NewModelCurve(cur, SketchPlane.Create(doc, plane)); - modelCurveIds.Add(mc.Id); - } + doc.Invoke(ts => + { + foreach (var segment in segments) + { + Curve curve = segment.GetCurve(); + Plane plane = Plane.CreateByNormalAndOrigin(XYZ.BasisZ, new XYZ()); + var mc = doc.Create.NewModelCurve(curve, SketchPlane.Create(doc, plane)); + modelCurveIds.Add(mc.Id); + } + }, "模型线创建"); - ts.Commit(); - } - //Reference edge = uidoc.Selection.PickObject(ObjectType.Edge, "请选择边界"); - SelectFilter mlfilter = new SelectFilter(); - Reference refline = uidoc.Selection.PickObject(ObjectType.Element, mlfilter, "请选择基准边线"); - //模型线选取 - var ml = doc.GetElement(refline) as ModelLine; - Line line = ml.GeometryCurve as Line; - Line line1 = RsRevitUtils.GetLongestSegmentLine(segments, line); - //var m = doc.GetElement(refer.ElementId); + //Reference edge = uidoc.Selection.PickObject(ObjectType.Edge, "请选择边界"); + SelectFilter mlfilter = new SelectFilter(); + Reference referline = uidoc.Selection.PickObject(ObjectType.Element, mlfilter, "请选择基准边线"); + //模型线选取 + var ml = doc.GetElement(referline) as ModelLine; + Line line = ml.GeometryCurve as Line; + Line line1 = RsRevitUtils.GetLongestSegmentLine(segments, line); + //var m = doc.GetElement(refer.ElementId); - XYZ basepoint = uidoc.Selection.PickPoint(UserConstant.SnapAll, "请选择基准点(位于基准线上)"); - double alength = basepoint.DistanceTo(line.GetEndPoint(0)) + basepoint.DistanceTo(line.GetEndPoint(1)); - if (line.Length - alength > 0.001) - { - System.Windows.MessageBox.Show("请选择基准线上的点", "温馨提示"); - return Result.Cancelled; - } - //if (basepoint.IsAlmostEqualTo(ml.GeometryCurve.GetEndPoint(0)) || basepoint.IsAlmostEqualTo(ml.GeometryCurve.GetEndPoint(1))) - //{ - //} - var endp1 = line.GetEndPoint(0); - var endp2 = line.GetEndPoint(1); - var v1 = endp1 - basepoint; - var v2 = endp2 - basepoint; - var v0 = roompoint - basepoint; - List curves = new List(); - List instances = new List(); - //Curve currefer = null; - //Curve currefer1 = null; + XYZ basePoint = uidoc.Selection.PickPoint(UserConstant.SnapAll, "请选择基准点(位于基准线上)"); + double lengthCount = basePoint.DistanceTo(line.GetEndPoint(0)) + basePoint.DistanceTo(line.GetEndPoint(1)); + if (line.Length - lengthCount > 0.001) + { + System.Windows.MessageBox.Show("请选择基准线上的点", "温馨提示"); + return Result.Cancelled; + } + //if (basepoint.IsAlmostEqualTo(ml.GeometryCurve.GetEndPoint(0)) || basepoint.IsAlmostEqualTo(ml.GeometryCurve.GetEndPoint(1))) + //{ + //} + var endpoint1 = line.GetEndPoint(0); + var endpoint2 = line.GetEndPoint(1); + var v1 = endpoint1 - basePoint; + var v2 = endpoint2 - basePoint; + var v0 = roomLocationPoint - basePoint; + List curves = new List(); + List instances = new List(); + //Curve currefer = null; + //Curve currefer1 = null; - List pts = new List(); - List lastps = new List(); - XYZ zdir1 = null; - XYZ zdir2 = null; - XYZ offestvector = null; + List pts = new List(); + List lastps = new List(); + XYZ zdir1 = null; + XYZ zdir2 = null; + XYZ offestVector = null; - if (!v1.IsAlmostEqualTo(XYZ.Zero) && endp1.DistanceTo(basepoint) > interval) - { - //if (endp1.DistanceTo(basepoint) < interval) - //{ - // System.Windows.MessageBox.Show("基准点与基准线端点距离太近"); - // return Result.Cancelled; - //} - zdir1 = v1.CrossProduct(v0).Normalize(); - //偏移的方向,直线的侧方向 - offestvector = zdir1.CrossProduct(v1).Normalize(); - Line l1 = Line.CreateBound(basepoint, line.GetEndPoint(0)); + if (!v1.IsAlmostEqualTo(XYZ.Zero) && endpoint1.DistanceTo(basePoint) > interval) + { + //if (endp1.DistanceTo(basepoint) < interval) + //{ + // System.Windows.MessageBox.Show("基准点与基准线端点距离太近"); + // return Result.Cancelled; + //} + zdir1 = v1.CrossProduct(v0).Normalize(); + //偏移的方向,直线的侧方向 + offestVector = zdir1.CrossProduct(v1).Normalize(); + Line l1 = Line.CreateBound(basePoint, line.GetEndPoint(0)); - for (int i = 0; i < 1000; i++) - { - var parameter = i * interval; - if (!l1.IsInside(parameter + lrdistance + interval / 2)) - { - break; - } - XYZ p = l1.Evaluate(parameter, false); - XYZ finalpoint = p + (l1.Direction * interval / 2) + (offestvector * fbdistance); - if (v2.IsAlmostEqualTo(XYZ.Zero)) - { - finalpoint = p + (l1.Direction * lrdistance) + (offestvector * fbdistance); - } + for (int i = 0; i < 1000; i++) + { + var parameter = i * interval; + if (!l1.IsInside(parameter + leftRightDistance + interval / 2)) + { + break; + } + XYZ p = l1.Evaluate(parameter, false); + XYZ finalPoint = p + (l1.Direction * interval / 2) + (offestVector * frontDistance); + if (v2.IsAlmostEqualTo(XYZ.Zero)) + { + finalPoint = p + (l1.Direction * leftRightDistance) + (offestVector * frontDistance); + } - pts.Add(finalpoint); - } - } + pts.Add(finalPoint); + } + } - if (!v2.IsAlmostEqualTo(XYZ.Zero) && endp2.DistanceTo(basepoint) > interval) - { - //if (endp2.DistanceTo(basepoint) < length) - //{ - // System.Windows.MessageBox.Show("基准点与基准线端点距离太近"); - // return Result.Cancelled; - //} - zdir2 = v2.CrossProduct(v0).Normalize(); - offestvector = zdir2.CrossProduct(v2).Normalize(); - var x = zdir2.CrossProduct(v2); - Line l2 = Line.CreateBound(basepoint, line.GetEndPoint(1)); + if (!v2.IsAlmostEqualTo(XYZ.Zero) && endpoint2.DistanceTo(basePoint) > interval) + { + //if (endp2.DistanceTo(basepoint) < length) + //{ + // System.Windows.MessageBox.Show("基准点与基准线端点距离太近"); + // return Result.Cancelled; + //} + zdir2 = v2.CrossProduct(v0).Normalize(); + offestVector = zdir2.CrossProduct(v2).Normalize(); + var x = zdir2.CrossProduct(v2); + Line l2 = Line.CreateBound(basePoint, line.GetEndPoint(1)); - for (int i = 0; i < 1000; i++) - { - var parameter = i * interval; - if (!l2.IsInside(parameter + lrdistance + interval / 2)) - { - break; - } - XYZ p = l2.Evaluate(parameter, false); - //附加的基准线的水平垂直偏移距离 - var finalpoint = p + (l2.Direction * interval / 2) + (offestvector * fbdistance); - if (v1.IsAlmostEqualTo(XYZ.Zero)) - { - finalpoint = p + (l2.Direction * lrdistance) + (offestvector * fbdistance); - } + for (int i = 0; i < 1000; i++) + { + var parameter = i * interval; + if (!l2.IsInside(parameter + leftRightDistance + interval / 2)) + { + break; + } + XYZ p = l2.Evaluate(parameter, false); + //附加的基准线的水平垂直偏移距离 + var finalpoint = p + (l2.Direction * interval / 2) + (offestVector * frontDistance); + if (v1.IsAlmostEqualTo(XYZ.Zero)) + { + finalpoint = p + (l2.Direction * leftRightDistance) + (offestVector * frontDistance); + } - pts.Add(finalpoint); - } - //var lastl2 = pts.Last().DistanceTo(endp2); - } + pts.Add(finalpoint); + } + //var lastl2 = pts.Last().DistanceTo(endp2); + } - using (Transaction trans = new Transaction(doc, "载入布置灯具")) - { - trans.Start(); - //删除模型线 - doc.Delete(modelCurveIds); - family = RsRevitUtils.GetLoadedFamily(doc, UserConstant.FamilyLibraryDirectory + "Lamp\\成品吊灯.rfa"); - ElementId symbolId = family.GetFamilySymbolIds().FirstOrDefault(); - symbol = doc.GetElement(symbolId) as FamilySymbol; - symbol.Activate(); - foreach (var p in pts) - { - var fi = doc.Create - .NewFamilyInstance(p, symbol, baselevel, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); - instances.Add(fi); - } - foreach (var p in lastps) - { - var fi = doc.Create - .NewFamilyInstance(p, symbol, baselevel, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); - instances.Add(fi); - } - trans.Commit(); - } - using (Transaction trans = new Transaction(doc, "复制灯具")) - { - trans.Start(); - for (int i = 0; i < instances.Count; i++) - { - FamilyInstance fi = instances[i]; - int num = (int)Math.Floor((line1.Length - 2 * fbdistance) / interval); - double rem = line1.Length - num * interval; - for (int j = 1; j <= num; j++) - { - ElementTransformUtils.CopyElement(doc, fi.Id, offestvector * interval * j); - } - } - trans.Commit(); - } - - tg.Assimilate(); - } - catch (Autodesk.Revit.Exceptions.OperationCanceledException) - { - if (tg.GetStatus() == TransactionStatus.Started) - { - tg.RollBack(); - } - return Result.Cancelled; - } - } - return Result.Succeeded; + doc.Invoke(ts => + { + //删除模型线 + doc.Delete(modelCurveIds); + family = RsRevitUtils.GetLoadedFamily(doc, UserConstant.FamilyLibraryDirectory + "Lamp\\成品吊灯.rfa"); + ElementId symbolId = family.GetFamilySymbolIds().FirstOrDefault(); + symbol = doc.GetElement(symbolId) as FamilySymbol; + symbol.Activate(); + foreach (var p in pts) + { + var fi = doc.Create + .NewFamilyInstance(p, symbol, baseLevel, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); + instances.Add(fi); + } + foreach (var p in lastps) + { + var fi = doc.Create + .NewFamilyInstance(p, symbol, baseLevel, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); + instances.Add(fi); + } + }, "载入布置灯具"); + doc.Invoke(ts => + { + for (int i = 0; i < instances.Count; i++) + { + FamilyInstance fi = instances[i]; + int num = (int)Math.Floor((line1.Length - 2 * frontDistance) / interval); + double rem = line1.Length - num * interval; + for (int j = 1; j <= num; j++) + { + ElementTransformUtils.CopyElement(doc, fi.Id, offestVector * interval * j); + } + } + }, "复制灯具"); + } + catch (Autodesk.Revit.Exceptions.OperationCanceledException) + { + //if (tg.GetStatus() == TransactionStatus.Started) + //{ + // tg.RollBack(); + //} + return Result.Succeeded; + } + return Result.Succeeded; + }, "布置灯具"); } } } \ No newline at end of file diff --git a/RookieStation/CmdPlaceReceptionArea.cs b/RookieStation/CmdPlaceReceptionArea.cs index 1b3130f..116ed0d 100644 --- a/RookieStation/CmdPlaceReceptionArea.cs +++ b/RookieStation/CmdPlaceReceptionArea.cs @@ -49,93 +49,96 @@ namespace RookieStation.ShippingAreaModule WpfReceptionArea receptionAreaPlacement = CommonUtils.GenerateWindow(); //初始值 //基层厚度 - double base_layer_thickness = 15 / 304.8; + double baseLayerThickness = 15 / 304.8; //踢脚线高度 - double Skirting_line_height = 50 / 304.8; + double skirtingLineHeight = 50 / 304.8; //踢脚线厚度 - double Skirting_line_thickness = 1.2 / 304.8; + double skirtingLineThickness = 1.2 / 304.8; //铝塑板长度 - double aluminum_plastic_panel_length = 1220 / 304.8; + double aluminumPlasticPanelLength = 0; //铝塑板高度 - double aluminum_plastic_panel_height = 2400 / 304.8; + double aluminumPlasticPanelHeight = 0; //铝塑板厚度 - double aluminum_plastic_panel_thickness = 3 / 304.8; + double aluminumPlasticPanelThickness = 3 / 304.8; //分缝 double gap = 2 / 304.8; //灰色乳胶漆厚度 - double grey_emulsion_paint_width = 1 / 304.8; + double greyEmulsionPaintWidth = 1 / 304.8; //发光字族类型 - string glow_text_symbol; + string glowTextSymbol; //墙间距 - double lamps_wall_distance = 900 / 304.8; + double lampsWallDistance = 0; //灯间距 - double lamps_interval = 900 / 304.8; + double lampsInterval = 0; + //灯高度 + double lampsHeight = 0; if (receptionAreaPlacement.DialogResult == true) { //铝塑板长度 - aluminum_plastic_panel_length = receptionAreaPlacement.aluminump_lastic_panel_length / 304.8; + aluminumPlasticPanelLength = receptionAreaPlacement.AluminumpLasticPanelLength / 304.8; //铝塑板高度 - aluminum_plastic_panel_height = receptionAreaPlacement.aluminump_lastic_panel_height / 304.8; + aluminumPlasticPanelHeight = receptionAreaPlacement.AluminumpLasticPanelHeight / 304.8; //分缝 - gap = receptionAreaPlacement.aluminump_lastic_panel_gap / 304.8; + gap = receptionAreaPlacement.AluminumpLasticPanelGgap / 304.8; - glow_text_symbol = receptionAreaPlacement.glow_text_symbol; + glowTextSymbol = receptionAreaPlacement.GlowTextSymbol; - lamps_wall_distance = receptionAreaPlacement.lamp_wall_distance / 304.8; - lamps_interval = receptionAreaPlacement.lamps_interval / 304.8; + lampsWallDistance = receptionAreaPlacement.LampWallDistance / 304.8; + lampsInterval = receptionAreaPlacement.LampsInterval / 304.8; + lampsHeight = receptionAreaPlacement.LampsHeight / 304.8; } else { return Result.Cancelled; } - Level baselevel = uidoc.ActiveView.GenLevel; + Level baseLevel = uidoc.ActiveView.GenLevel; Family family = null; FamilySymbol symbol; return doc.InvokeGroup(tg => { try { - FamilySymbol linesymbol = RsRevitUtils.GetGuideSymbol(doc); + FamilySymbol guideSymbol = RsRevitUtils.GetGuideSymbol(doc); eleIdsAdded.Clear(); uiapp.Application.DocumentChanged += Application_DocumentChanged; - uidoc.PromptForFamilyInstancePlacement(linesymbol); + uidoc.PromptForFamilyInstancePlacement(guideSymbol); uiapp.Application.DocumentChanged -= Application_DocumentChanged; //在此处无法取消订阅 //uiapp.Application.DocumentChanged -= Application_DocumentChanged; } catch (Autodesk.Revit.Exceptions.OperationCanceledException) { - var interval = gap + aluminum_plastic_panel_length; + var interval = gap + aluminumPlasticPanelLength; if (eleIdsAdded.Count == 0) { return Result.Cancelled; } - Line refer_line = RsRevitUtils.GetGuideGeometryAndDeleteGuide(doc, eleIdsAdded); + Line referline = RsRevitUtils.GetGuideGeometryAndDeleteGuide(doc, eleIdsAdded); uiapp.Application.DocumentChanged -= Application_DocumentChanged; - double backgroundwall_length = refer_line.Length; - if (backgroundwall_length < 1500 / 304.8) + double backgroundWallLength = referline.Length; + if (backgroundWallLength < 1500 / 304.8) { TaskDialog.Show("温馨提示", "距离太接"); return Result.Cancelled; } - List wallids = new List(); - WallType base_layer_type = null; - base_layer_thickness = RsRevitUtils.GetWallWidthByWallTypeName(doc, "阻燃板", out base_layer_type); + List wallIds = new List(); + WallType baseLayerType = null; + baseLayerThickness = RsRevitUtils.GetWallWidthByWallTypeName(doc, "阻燃板", out baseLayerType); - WallType grey_emulsion_paint_type = null; - grey_emulsion_paint_width = RsRevitUtils.GetWallWidthByWallTypeName(doc, "灰色乳胶漆", out grey_emulsion_paint_type); + WallType greyEmulsionPaintType = null; + greyEmulsionPaintWidth = RsRevitUtils.GetWallWidthByWallTypeName(doc, "灰色乳胶漆", out greyEmulsionPaintType); - WallType aluminum_plastic_panel_type = null; - aluminum_plastic_panel_thickness = RsRevitUtils.GetWallWidthByWallTypeName(doc, "铝塑板", out aluminum_plastic_panel_type); + WallType aluminumPlasticPanelType = null; + aluminumPlasticPanelThickness = RsRevitUtils.GetWallWidthByWallTypeName(doc, "铝塑板", out aluminumPlasticPanelType); - WallType Skirting_line_type = null; - Skirting_line_thickness = RsRevitUtils.GetWallWidthByWallTypeName(doc, "踢脚线", out Skirting_line_type); + WallType skirtingLineType = null; + skirtingLineThickness = RsRevitUtils.GetWallWidthByWallTypeName(doc, "踢脚线", out skirtingLineType); //铝塑板块数 - int n = (int)Math.Floor(refer_line.Length / interval); - double rem = refer_line.Length % (gap + aluminum_plastic_panel_length); - if (base_layer_type == null || aluminum_plastic_panel_type == null || Skirting_line_type == null || grey_emulsion_paint_type == null) + int n = (int)Math.Floor(referline.Length / interval); + double rem = referline.Length % (gap + aluminumPlasticPanelLength); + if (baseLayerType == null || aluminumPlasticPanelType == null || skirtingLineType == null || greyEmulsionPaintType == null) { TaskDialog.Show("温馨提示", "需要新建装饰所需的墙类型,类型名称需分别包含阻燃板,灰色乳胶漆,铝塑板,踢脚线"); return Result.Cancelled; @@ -145,76 +148,51 @@ namespace RookieStation.ShippingAreaModule //长度不满足设置的铝塑板长度时 if (n == 0) { - var offestline = refer_line.CreateOffset(aluminum_plastic_panel_thickness / 2 + base_layer_thickness, -XYZ.BasisZ); - var wall = Wall.Create(doc, offestline, aluminum_plastic_panel_type.Id, doc.ActiveView.GenLevel.Id, aluminum_plastic_panel_height, Skirting_line_height, false, false); - wallids.Add(wall.Id); + var offestline = referline.CreateOffset(aluminumPlasticPanelThickness / 2 + baseLayerThickness, -XYZ.BasisZ); + var wall = Wall.Create(doc, offestline, aluminumPlasticPanelType.Id, doc.ActiveView.GenLevel.Id, aluminumPlasticPanelHeight, skirtingLineHeight, false, false); + wallIds.Add(wall.Id); } else { for (int i = 0; i < n + 1; i++) { - var startpoint = refer_line.Evaluate(i * interval, false); - var endpoint = refer_line.Evaluate(((i + 1) * interval) - gap, false); + var startpoint = referline.Evaluate(i * interval, false); + var endpoint = referline.Evaluate(((i + 1) * interval) - gap, false); if (i == n) { - endpoint = refer_line.GetEndPoint(1); + endpoint = referline.GetEndPoint(1); } Line line = Line.CreateBound(startpoint, endpoint); - var offestline = line.CreateOffset(aluminum_plastic_panel_thickness / 2 + base_layer_thickness, -XYZ.BasisZ); - var wall = Wall.Create(doc, offestline, aluminum_plastic_panel_type.Id, doc.ActiveView.GenLevel.Id, aluminum_plastic_panel_height, Skirting_line_height, false, false); + var offestline = line.CreateOffset(aluminumPlasticPanelThickness / 2 + baseLayerThickness, -XYZ.BasisZ); + var wall = Wall.Create(doc, offestline, aluminumPlasticPanelType.Id, doc.ActiveView.GenLevel.Id, aluminumPlasticPanelHeight, skirtingLineHeight, false, false); //不允许连接 WallUtils.DisallowWallJoinAtEnd(wall, 0); //curves.Add() - wallids.Add(wall.Id); + wallIds.Add(wall.Id); } } - var skirting_offestline = refer_line.CreateOffset(Skirting_line_thickness / 2 + base_layer_thickness, -XYZ.BasisZ); - var skirtingwall = Wall.Create(doc, skirting_offestline, Skirting_line_type.Id, doc.ActiveView.GenLevel.Id, Skirting_line_height, 0, false, false); - wallids.Add(skirtingwall.Id); + var skirtingOffestLine = referline.CreateOffset(skirtingLineThickness / 2 + baseLayerThickness, -XYZ.BasisZ); + var skirtingwall = Wall.Create(doc, skirtingOffestLine, skirtingLineType.Id, doc.ActiveView.GenLevel.Id, skirtingLineHeight, 0, false, false); + wallIds.Add(skirtingwall.Id); - var base_layer_offestline = refer_line.CreateOffset(base_layer_thickness / 2, -XYZ.BasisZ); - var baselayerwall = Wall.Create(doc, base_layer_offestline, base_layer_type.Id, doc.ActiveView.GenLevel.Id, UserConstant.Height / 304.8, 0, false, false); - wallids.Add(baselayerwall.Id); + var baseLayerOffestLine = referline.CreateOffset(baseLayerThickness / 2, -XYZ.BasisZ); + var baseLayerWall = Wall.Create(doc, baseLayerOffestLine, baseLayerType.Id, doc.ActiveView.GenLevel.Id, UserConstant.Height / 304.8, 0, false, false); + wallIds.Add(baseLayerWall.Id); //高度大于3000才有灰色乳胶漆 if (UserConstant.Height > 3000) { - double baseheight = aluminum_plastic_panel_height + Skirting_line_height; - var grey_emulsion_paint_offestline = refer_line.CreateOffset(base_layer_thickness + grey_emulsion_paint_width / 2, -XYZ.BasisZ); - var greypaintwall = Wall.Create(doc, grey_emulsion_paint_offestline, grey_emulsion_paint_type.Id, doc.ActiveView.GenLevel.Id, UserConstant.Height / 304.8 - baseheight, baseheight, false, false); - wallids.Add(greypaintwall.Id); + double baseHeight = aluminumPlasticPanelHeight + skirtingLineHeight; + var greyEmulsionPaintOffestLine = referline.CreateOffset(baseLayerThickness + greyEmulsionPaintWidth / 2, -XYZ.BasisZ); + Wall greyPaintWall = Wall.Create(doc, greyEmulsionPaintOffestLine, greyEmulsionPaintType.Id, doc.ActiveView.GenLevel.Id, UserConstant.Height / 304.8 - baseHeight, baseHeight, false, false); + wallIds.Add(greyPaintWall.Id); } doc.Regenerate(); - doc.Create.NewGroup(wallids); + doc.Create.NewGroup(wallIds); }, "背景墙创建"); - //SelectFilter wallfilter = new SelectFilter(); - //var wallrefer = uidoc.Selection.PickObject(ObjectType.Element, wallfilter, "请选择作为背景墙的墙体"); - //var wall = doc.GetElement(wallrefer) as Wall; - - //WallFaceSelectionFilter selfilter = new WallFaceSelectionFilter(wall.Id); - //var facerefer = uidoc.Selection.PickObject(ObjectType.Face, selfilter, "请选择要装饰的墙面"); - - //PlanarFace pf = wall.GetGeometryObjectFromReference(facerefer) as PlanarFace; - - //XYZ normal = pf.FaceNormal; - //XYZ p1 = uidoc.Selection.PickObject(ObjectType.PointOnElement, selfilter, "请选取背景墙左侧端点").GlobalPoint; - - //XYZ p2 = uidoc.Selection.PickObject(ObjectType.PointOnElement, selfilter, "请选取背景墙右侧端点").GlobalPoint; - - //XYZ p1 = uidoc.Selection.PickPoint(UserConstant.SnapAll, "请选取背景墙左侧端点"); - //XYZ p2 = uidoc.Selection.PickPoint(UserConstant.SnapAll, "请选取背景墙右侧端点"); - - //两点的水平距离 - - //if (UserConstant.Height / 3 * 2 < 2200) - //{ - // TaskDialog.Show("温馨提示", "层高设置有误"); - // return Result.Cancelled; - //} - #region 菜鸟使命布置 FamilyInstance signage = null; @@ -225,27 +203,22 @@ namespace RookieStation.ShippingAreaModule symbol = doc.GetElement(symbolId) as FamilySymbol; symbol.Activate(); - //var x = family.FamilyPlacementType; - //signage = doc.Create.NewFamilyInstance(facerefer, p2 + new XYZ(0, 0, height + 100 / 304.8), symbol, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); + var endPoint = referline.GetEndPoint(0); - var endpoint = refer_line.GetEndPoint(0); - - endpoint += (Skirting_line_height + aluminum_plastic_panel_height) * XYZ.BasisZ; - signage = doc.Create.NewFamilyInstance(endpoint, symbol, StructuralType.NonStructural); + endPoint += (skirtingLineHeight + aluminumPlasticPanelHeight) * XYZ.BasisZ; + signage = doc.Create.NewFamilyInstance(endPoint, symbol, StructuralType.NonStructural); //标准面要朝上,族要面向背侧 - - //symbol.GetParameters("背景墙长度").FirstOrDefault().Set(distance); }, "菜鸟的使命"); doc.Invoke(ts => { //族的正面要超前 - RsRevitUtils.AdjustInstance(doc, signage, refer_line, grey_emulsion_paint_width + base_layer_thickness); + RsRevitUtils.AdjustInstance(doc, signage, referline, greyEmulsionPaintWidth + baseLayerThickness); }, "调整菜鸟使命"); #endregion 菜鸟使命布置 - double reception_length = refer_line.Length / 3 * 2; - double reception_wall_distance = 1000 / 304.8; + double receptionLength = referline.Length / 3 * 2; + double receptionWallDistance = 1000 / 304.8; FamilyInstance reception = null; doc.Invoke(ts => { @@ -253,48 +226,48 @@ namespace RookieStation.ShippingAreaModule ElementId symbolId = family.GetFamilySymbolIds().FirstOrDefault(); symbol = doc.GetElement(symbolId) as FamilySymbol; symbol.Activate(); - var wall_center_point = refer_line.Evaluate(0.5, true); + var wallCenterPoint = referline.Evaluate(0.5, true); - reception = doc.Create.NewFamilyInstance(wall_center_point, symbol, baselevel, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); + reception = doc.Create.NewFamilyInstance(wallCenterPoint, symbol, baseLevel, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); - symbol.GetParameters("台面长度").FirstOrDefault().Set(reception_length); + symbol.GetParameters("台面长度").FirstOrDefault().Set(receptionLength); //symbol.GetParameters("台面长度").FirstOrDefault().AsDouble(); }, "接待台布置"); doc.Invoke(ts => { - RsRevitUtils.AdjustInstance(doc, reception, refer_line, reception_wall_distance); + RsRevitUtils.AdjustInstance(doc, reception, referline, receptionWallDistance); }, "调整接待台"); FamilyInstance logo = null; doc.Invoke(ts => { family = RsRevitUtils.GetLoadedFamily(doc, UserConstant.FamilyLibraryDirectory + "Sign\\菜鸟LOGO.rfa"); - ElementId symbolId = family.GetFamilySymbolIds().FirstOrDefault(id => doc.GetElement(id).Name == glow_text_symbol); + ElementId symbolId = family.GetFamilySymbolIds().FirstOrDefault(id => doc.GetElement(id).Name == glowTextSymbol); symbol = doc.GetElement(symbolId) as FamilySymbol; symbol.Activate(); - var wall_center_point = refer_line.Evaluate(0.5, true); + var wallCenterPoint = referline.Evaluate(0.5, true); - logo = doc.Create.NewFamilyInstance(wall_center_point, symbol, baselevel, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); + logo = doc.Create.NewFamilyInstance(wallCenterPoint, symbol, baseLevel, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); //symbol.GetParameters("背景墙长度").FirstOrDefault().Set(reception_length); //width = symbol.GetParameters("台面宽度").FirstOrDefault().AsDouble(); }, "菜鸟LOG布置"); doc.Invoke(ts => { - RsRevitUtils.AdjustInstance(doc, logo, refer_line, aluminum_plastic_panel_thickness + base_layer_thickness); + RsRevitUtils.AdjustInstance(doc, logo, referline, aluminumPlasticPanelThickness + baseLayerThickness); }, "调整lOGO"); doc.Invoke(ts => { - family = RsRevitUtils.GetLoadedFamily(doc, UserConstant.FamilyLibraryDirectory + "Lamp\\圆形吊灯.rfa"); + family = RsRevitUtils.GetLoadedFamily(doc, UserConstant.FamilyLibraryDirectory + "Lamp\\吊灯.rfa"); ElementId symbolId = family.GetFamilySymbolIds().FirstOrDefault(); symbol = doc.GetElement(symbolId) as FamilySymbol; symbol.Activate(); - var normal_direction = refer_line.Direction; - List lamp_location_points = new List(); - var lamps_location_line = refer_line.CreateOffset(lamps_wall_distance, -XYZ.BasisZ); - var center_point = lamps_location_line.Evaluate(0.5, true); - n = (int)Math.Floor(backgroundwall_length / lamps_interval); + var referlineDirection = referline.Direction; + List lampLocationPoints = new List(); + var lampsLocationLine = referline.CreateOffset(lampsWallDistance, -XYZ.BasisZ); + var centerPoint = lampsLocationLine.Evaluate(0.5, true); + n = (int)Math.Floor(backgroundWallLength / lampsInterval); //单侧的数量 int m = (int)Math.Floor((n + 1.0) / 2); if ((n + 1) % 2 == 0) @@ -302,48 +275,34 @@ namespace RookieStation.ShippingAreaModule //开始间隔为0.5 for (int i = 0; i < m; i++) { - XYZ p = center_point.Add(normal_direction * (i + 0.5) * lamps_interval); - XYZ reversep = center_point.Add(-normal_direction * (i + 0.5) * lamps_interval); + XYZ p = centerPoint.Add(referlineDirection * (i + 0.5) * lampsInterval) + XYZ.BasisZ * lampsHeight; + XYZ reversePoint = centerPoint.Add(-referlineDirection * (i + 0.5) * lampsInterval) + XYZ.BasisZ * lampsHeight; - lamp_location_points.Add(p); - lamp_location_points.Add(reversep); + lampLocationPoints.Add(p); + lampLocationPoints.Add(reversePoint); } - foreach (XYZ p in lamp_location_points) + foreach (XYZ p in lampLocationPoints) { - doc.Create.NewFamilyInstance(p, symbol, baselevel, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); + doc.Create.NewFamilyInstance(p, symbol, baseLevel, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); } } else { - lamp_location_points.Add(center_point); + lampLocationPoints.Add(centerPoint); //i=0时居中,不在单侧,开始间隔为1 for (int i = 0; i < m; i++) { - XYZ p = center_point.Add(normal_direction * (i + 1) * lamps_interval); - XYZ reversep = center_point.Add(-normal_direction * (i + 1) * lamps_interval); - lamp_location_points.Add(p); - lamp_location_points.Add(reversep); + XYZ p = centerPoint.Add(referlineDirection * (i + 1) * lampsInterval); + XYZ reversePoint = centerPoint.Add(-referlineDirection * (i + 1) * lampsInterval); + lampLocationPoints.Add(p); + lampLocationPoints.Add(reversePoint); } - foreach (XYZ p in lamp_location_points) + foreach (XYZ p in lampLocationPoints) { - doc.Create.NewFamilyInstance(p, symbol, baselevel, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); + doc.Create.NewFamilyInstance(p, symbol, baseLevel, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); } } }, "吊灯布置"); - - //doc.Invoke(ts => - //{ - // if (backgroundwall.CanFlipFacing && backgroundwall.CanFlipHand && !backgroundwall.FacingOrientation.IsAlmostEqualTo(normal)) - // { - // backgroundwall.flipFacing(); - // backgroundwall.flipHand(); - // } - // if (frontdesk.CanFlipFacing && backgroundwall.CanFlipHand && !frontdesk.FacingOrientation.IsAlmostEqualTo(normal)) - // { - // frontdesk.flipFacing(); - // frontdesk.flipHand(); - // } - //}, "调整"); } return Result.Succeeded; @@ -392,37 +351,17 @@ namespace RookieStation.ShippingAreaModule private Reference GetWallSideFaceReference(Wall wall, XYZ normal) { - var facerefer = HostObjectUtils.GetSideFaces(wall, ShellLayerType.Interior).FirstOrDefault(); - var facerefer1 = HostObjectUtils.GetSideFaces(wall, ShellLayerType.Exterior).FirstOrDefault(); + var interFaceReference = HostObjectUtils.GetSideFaces(wall, ShellLayerType.Interior).FirstOrDefault(); + var exterFaceReference = HostObjectUtils.GetSideFaces(wall, ShellLayerType.Exterior).FirstOrDefault(); - PlanarFace pf = wall.GetGeometryObjectFromReference(facerefer) as PlanarFace; + PlanarFace pf = wall.GetGeometryObjectFromReference(interFaceReference) as PlanarFace; if (pf.FaceNormal.IsAlmostEqualTo(normal)) { - return facerefer; + return interFaceReference; } else { - return facerefer1; - } - } - - public class WallFaceSelectionFilter : ISelectionFilter - { - private ElementId eid = null; - - public WallFaceSelectionFilter(ElementId elementId) - { - eid = elementId; - } - - public bool AllowElement(Element element) - { - return element is Wall && eid == element.Id; - } - - public bool AllowReference(Reference refer, XYZ point) - { - return true; + return exterFaceReference; } } } diff --git a/RookieStation/CmdPlaceShelves.cs b/RookieStation/CmdPlaceShelves.cs index 6d7f209..b03451a 100644 --- a/RookieStation/CmdPlaceShelves.cs +++ b/RookieStation/CmdPlaceShelves.cs @@ -73,126 +73,126 @@ namespace RookieStation.PackAreaModule { return Result.Cancelled; } - Line refer_line = RsRevitUtils.GetGuideGeometryAndDeleteGuide(doc, eleIdsAdded); + Line referline = RsRevitUtils.GetGuideGeometryAndDeleteGuide(doc, eleIdsAdded); uiapp.Application.DocumentChanged -= Application_DocumentChanged; //始终位于左侧,Z轴朝上 - var zaxis = XYZ.BasisZ; - Family shelf_family = null; - FamilySymbol shelf_symbol = null; - double shelf_spacing = vm.Spacing / 304.8; + var zAxis = XYZ.BasisZ; + Family shelfFamily = null; + FamilySymbol shelfSymbol = null; + double shelfSpacing = vm.ShelfSpacing / 304.8; //通道宽度 - double passage_width = vm.PassageWidth / 304.8; - double parallel_referline_offest = vm.ParalelReferOffest / 304.8; - double vertical_referline_offest = vm.VerticalReferOffest / 304.8; + double passageWidth = vm.PassageWidth / 304.8; + double parallelReferlineOffest = vm.ParallelReferlineOffest / 304.8; + double verticalReferlineOffest = vm.VerticalReferlineOffest / 304.8; for (int i = 0; i < shelves.Count; i++) { //List all_points = new List(); - List first_row_points = new List(); + List firstRowPoints = new List(); Shelf shelf = shelves[i]; - double shelf_width = shelf.Width / 304.8; - double line_parameter = 0.0; + double shelfWidth = shelf.Width / 304.8; + double lineParameter = 0.0; int n = 100;//循环次数 - XYZ p = XYZ.Zero; + XYZ pointOnReferline = XYZ.Zero; - if (parallel_referline_offest < 0.001)//起点无间距 + if (parallelReferlineOffest < 0.001)//起点无间距 { for (int j = 0; j < n; j++) { - if (!refer_line.IsInside((line_parameter + shelf_width))) + if (!referline.IsInside((lineParameter + shelfWidth))) { break; } if (j % 2 == 0) { - p = refer_line.Evaluate(line_parameter, false); - line_parameter += shelf_spacing + shelf_width; + pointOnReferline = referline.Evaluate(lineParameter, false); + lineParameter += shelfSpacing + shelfWidth; } else { - p = refer_line.Evaluate(line_parameter, false); - line_parameter += shelf_width; + pointOnReferline = referline.Evaluate(lineParameter, false); + lineParameter += shelfWidth; } - first_row_points.Add(p); + firstRowPoints.Add(pointOnReferline); } } else//起点有距离 { - line_parameter = parallel_referline_offest; + lineParameter = parallelReferlineOffest; for (int j = 0; j < n; j++) { - if (!refer_line.IsInside(line_parameter + shelf_width)) + if (!referline.IsInside(lineParameter + shelfWidth)) { break; } if (j % 2 == 0) { - p = refer_line.Evaluate(line_parameter, false); - line_parameter += shelf_width; + pointOnReferline = referline.Evaluate(lineParameter, false); + lineParameter += shelfWidth; } else { - p = refer_line.Evaluate(line_parameter, false); - line_parameter += shelf_spacing + shelf_width; + pointOnReferline = referline.Evaluate(lineParameter, false); + lineParameter += shelfSpacing + shelfWidth; } - first_row_points.Add(p); + firstRowPoints.Add(pointOnReferline); } } double l = shelf.Length / 304.8; - XYZ normal_vertical_offest_vector = zaxis.CrossProduct(refer_line.Direction).Normalize(); + XYZ normalVerticalOffestVector = zAxis.CrossProduct(referline.Direction).Normalize(); List instances = new List(); - XYZ final_point = XYZ.Zero; + XYZ finalPoint = XYZ.Zero; doc.Invoke(ts => { - shelf_family = RsRevitUtils.GetLoadedFamily(doc, UserConstant.FamilyLibraryDirectory + "Shelf\\单联货架.rfa"); - var shelf_symbol_ids = shelf_family.GetFamilySymbolIds(); - foreach (var id in shelf_symbol_ids) + shelfFamily = RsRevitUtils.GetLoadedFamily(doc, UserConstant.FamilyLibraryDirectory + "Shelf\\单联货架.rfa"); + var shelfSymbolIds = shelfFamily.GetFamilySymbolIds(); + foreach (var id in shelfSymbolIds) { - FamilySymbol temp_symbol = doc.GetElement(id) as FamilySymbol; - if (temp_symbol.Name == shelf.SymbolName) + FamilySymbol tempSymbol = doc.GetElement(id) as FamilySymbol; + if (tempSymbol.Name == shelf.SymbolName) { - shelf_symbol = temp_symbol; + shelfSymbol = tempSymbol; break; } } - shelf_symbol.Activate(); + shelfSymbol.Activate(); }, "加载货架,激活类型"); switch (shelf.NumOfGroup) { case NumOfGroup.Single: - for (int j = 0; j < first_row_points.Count; j++) + for (int j = 0; j < firstRowPoints.Count; j++) { - XYZ pt = first_row_points[j]; - XYZ offest_direction = normal_vertical_offest_vector * (vertical_referline_offest + l / 2); + XYZ tempPoint = firstRowPoints[j]; + XYZ offestVector = normalVerticalOffestVector * (verticalReferlineOffest + l / 2); //垂直基准线平移 平行基准线平移 - final_point = pt + offest_direction + refer_line.Direction * shelf_width / 2; + finalPoint = tempPoint + offestVector + referline.Direction * shelfWidth / 2; //附加通道和(单联、多联)货架长度的偏移 if (i > 0) { - double total_length = GetTotalLength(shelves, i); + double totalLength = GetTotalLength(shelves, i); //附加排在前面通道和所有货架的长度 - XYZ additional_dir = normal_vertical_offest_vector * (i * passage_width + total_length); - final_point += additional_dir; + XYZ additional_dir = normalVerticalOffestVector * (i * passageWidth + totalLength); + finalPoint += additional_dir; } FamilyInstance instance = null; //all_points.Add(final_point); doc.Invoke(ts => { - instance = doc.Create.NewFamilyInstance(final_point, shelf_symbol, level, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); + instance = doc.Create.NewFamilyInstance(finalPoint, shelfSymbol, level, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); instances.Add(instance); }, "创建货架"); //位于直线右侧时,需要进行左右翻转 doc.Invoke(ts => { - if (parallel_referline_offest < 0.001) + if (parallelReferlineOffest < 0.001) { if (j % 2 != 0 && instance.CanFlipHand) { @@ -213,49 +213,49 @@ namespace RookieStation.PackAreaModule case NumOfGroup.Double: - for (int j = 0; j < first_row_points.Count; j++) + for (int j = 0; j < firstRowPoints.Count; j++) { - XYZ pt = first_row_points[j]; + XYZ tempPoint = firstRowPoints[j]; //偏移距离 - XYZ offest_direction = normal_vertical_offest_vector * (vertical_referline_offest + l); + XYZ offestVector = normalVerticalOffestVector * (verticalReferlineOffest + l); //基础偏移距离,移动半个长度到直线的一侧,垂直基准线平移 平行基准线平移 - final_point = pt + offest_direction + refer_line.Direction * shelf_width / 2; + finalPoint = tempPoint + offestVector + referline.Direction * shelfWidth / 2; //附加通道和(单联、多联)货架长度的偏移 if (i > 0) { double totallength = GetTotalLength(shelves, i); - XYZ additionaldir = normal_vertical_offest_vector * (i * passage_width + totallength); - final_point += additionaldir; + XYZ additionaldir = normalVerticalOffestVector * (i * passageWidth + totallength); + finalPoint += additionaldir; } - FamilyInstance end_instance = null; - FamilyInstance start_instance = null; + FamilyInstance endInstance = null; + FamilyInstance startInstance = null; doc.Invoke(ts => { - end_instance = doc.Create.NewFamilyInstance(final_point + l / 2 * normal_vertical_offest_vector, shelf_symbol, level, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); + endInstance = doc.Create.NewFamilyInstance(finalPoint + l / 2 * normalVerticalOffestVector, shelfSymbol, level, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); - start_instance = doc.Create.NewFamilyInstance(final_point - l / 2 * normal_vertical_offest_vector, shelf_symbol, level, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); + startInstance = doc.Create.NewFamilyInstance(finalPoint - l / 2 * normalVerticalOffestVector, shelfSymbol, level, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); - instances.Add(start_instance); + instances.Add(startInstance); - instances.Add(end_instance); + instances.Add(endInstance); }, "创建货架"); doc.Invoke(ts => { - if (parallel_referline_offest < 0.001) + if (parallelReferlineOffest < 0.001) { - if (j % 2 != 0 && start_instance.CanFlipHand && end_instance.CanFlipHand) + if (j % 2 != 0 && startInstance.CanFlipHand && endInstance.CanFlipHand) { - start_instance.flipHand(); - end_instance.flipHand(); + startInstance.flipHand(); + endInstance.flipHand(); } } else { - if (j % 2 == 0 && start_instance.CanFlipHand && end_instance.CanFlipHand) + if (j % 2 == 0 && startInstance.CanFlipHand && endInstance.CanFlipHand) { - start_instance.flipHand(); - end_instance.flipHand(); + startInstance.flipHand(); + endInstance.flipHand(); } } }, "翻转货架"); @@ -267,34 +267,34 @@ namespace RookieStation.PackAreaModule case NumOfGroup.Three: - for (int j = 0; j < first_row_points.Count; j++) + for (int j = 0; j < firstRowPoints.Count; j++) { - XYZ pt = first_row_points[j]; - XYZ offestdir = normal_vertical_offest_vector * (vertical_referline_offest + l * 3 / 2); + XYZ tempPoint = firstRowPoints[j]; + XYZ offestVector = normalVerticalOffestVector * (verticalReferlineOffest + l * 3 / 2); //垂直基准线平移 平行基准线平移 - final_point = pt + offestdir + refer_line.Direction * shelf_width / 2; + finalPoint = tempPoint + offestVector + referline.Direction * shelfWidth / 2; //附加通道和(单联、多联)货架长度的偏移 if (i > 0) { double totallength = GetTotalLength(shelves, i); - XYZ additionaldir = normal_vertical_offest_vector * (i * passage_width + totallength); - final_point += additionaldir; + XYZ additionaldir = normalVerticalOffestVector * (i * passageWidth + totallength); + finalPoint += additionaldir; } FamilyInstance end_instance = null; FamilyInstance center_instance = null; FamilyInstance start_instance = null; doc.Invoke(ts => { - center_instance = doc.Create.NewFamilyInstance(final_point, shelf_symbol, level, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); - end_instance = doc.Create.NewFamilyInstance(final_point + l * normal_vertical_offest_vector, shelf_symbol, level, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); - start_instance = doc.Create.NewFamilyInstance(final_point - l * normal_vertical_offest_vector, shelf_symbol, level, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); + center_instance = doc.Create.NewFamilyInstance(finalPoint, shelfSymbol, level, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); + end_instance = doc.Create.NewFamilyInstance(finalPoint + l * normalVerticalOffestVector, shelfSymbol, level, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); + start_instance = doc.Create.NewFamilyInstance(finalPoint - l * normalVerticalOffestVector, shelfSymbol, level, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); instances.Add(center_instance); instances.Add(end_instance); instances.Add(start_instance); }, "创建货架"); doc.Invoke(ts => { - if (parallel_referline_offest < 0.001) + if (parallelReferlineOffest < 0.001) { if (j % 2 != 0 && start_instance.CanFlipHand && center_instance.CanFlipHand && end_instance.CanFlipHand) { @@ -324,7 +324,7 @@ namespace RookieStation.PackAreaModule doc.Invoke(ts => { - XYZ veroffestdir = zaxis.CrossProduct(refer_line.Direction).Normalize(); + XYZ veroffestdir = zAxis.CrossProduct(referline.Direction).Normalize(); //旋转角度 double angle = XYZ.BasisY.AngleTo(veroffestdir); //判断相对于Y轴是正向角度(逆时针)还是逆向角度(顺时针) @@ -338,7 +338,7 @@ namespace RookieStation.PackAreaModule for (int j = 0; j < instances.Count; j++) { FamilyInstance instance = instances[j]; - var location_XYZ = RsRevitUtils.GetXYZByElement(instance); + var location_XYZ = RsRevitUtils.GetLocationPointByElement(instance); Line zline = Line.CreateUnbound(location_XYZ, XYZ.BasisZ); //旋转,移动 @@ -453,10 +453,10 @@ namespace RookieStation.PackAreaModule foreach (var ins in card_instances) { - var lp = RsRevitUtils.GetXYZByElement(ins); + var lp = RsRevitUtils.GetLocationPointByElement(ins); foreach (var card in card_instances) { - var lpt = RsRevitUtils.GetXYZByElement(card); + var lpt = RsRevitUtils.GetLocationPointByElement(card); if (!card.Id.Equals(ins.Id) && lp.IsAlmostEqualTo(lpt)) { ids_delete.Add(ins.Id); diff --git a/RookieStation/CmdPlaceWallFinishes.cs b/RookieStation/CmdPlaceWallFinishes.cs index 7bd4bcf..7287152 100644 --- a/RookieStation/CmdPlaceWallFinishes.cs +++ b/RookieStation/CmdPlaceWallFinishes.cs @@ -24,12 +24,6 @@ namespace RookieStation.Finishes Autodesk.Revit.ApplicationServices.Application app = uiapp.Application; Document doc = uidoc.Document; - var roomcounts = new FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_Rooms).GetElementCount(); - if (roomcounts == 0) - { - TaskDialog.Show("温馨提示", "项目中当前没有房间"); - return Result.Cancelled; - } ElementCategoryFilter ecf = new ElementCategoryFilter(BuiltInCategory.OST_Walls); ElementCategoryFilter ecf1 = new ElementCategoryFilter(BuiltInCategory.OST_StackedWalls); LogicalOrFilter lof = new LogicalOrFilter(ecf, ecf1); @@ -63,99 +57,187 @@ namespace RookieStation.Finishes { return Result.Cancelled; } - WallType walltype = finishes.WallType; - bool iscontinue = true; + WallType wallType = finishes.WallType; + double wallWidth = wallType.Width; + double wallHeight = finishes.WallHeight; + double wallBaseOffest = finishes.WallBaseOffest; + string placeType = finishes.PlaceType; + bool isContinue = true; + try { - while (iscontinue) + while (isContinue) { - Reference refer = uidoc.Selection.PickObject(ObjectType.Element, new SelectFilter(), "请选择布置的房间"); + if (placeType == "房间") + { + var roomCount = new FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_Rooms).GetElementCount(); + if (roomCount == 0) + { + TaskDialog.Show("温馨提示", "项目中当前没有房间"); + return Result.Failed; + } + Reference refer = uidoc.Selection.PickObject(ObjectType.Element, new SelectFilter(), "请选择布置的房间"); + Room room = uidoc.Document.GetElement(refer) as Room; + List curveLoopList = new List(); + List walltojoin = new List(); + List> wallToJoinList = new List>(); + var opts = new SpatialElementBoundaryOptions(); + //{ + // SpatialElementBoundaryLocation = SpatialElementBoundaryLocation.Finish + //}; + + //BuiltInCategory builtInCategory = (BuiltInCategory)walltype.Category.Id.IntegerValue; + //if (walltype.Kind == WallKind.Stacked) + //{ + // var li = walltype.GetSubelements(); + // walltype.get + //} + //if (walltype.Kind == WallKind.Basic) + //{ + // var compounds = walltype.GetCompoundStructure(); + // for (int i = 0; i < compounds.LayerCount; i++) + // { + // offest += compounds.GetWidth(); + // } + //} + + var segementsList = room.GetBoundarySegments(opts); + + if (segementsList != null) + { + foreach (var boundarySegments in segementsList) + { + CurveLoop curveLoop = new CurveLoop(); + foreach (var boundarySegment in boundarySegments) + { + curveLoop.Append(boundarySegment.GetCurve()); + walltojoin.Add(boundarySegment.ElementId); + } + wallToJoinList.Add(walltojoin); + curveLoopList.Add(curveLoop); + } + } + doc.Invoke(ts => + { + Plane plane = Plane.CreateByNormalAndOrigin(XYZ.BasisZ, new XYZ()); + //var mc = doc.Create.NewModelCurveArray(array, SketchPlane.Create(doc, plane)); + for (int i = 0; i < curveLoopList.Count; i++) + { + //切线方向叉乘参数中的向量,内侧叉乘-z + var offest_curveloop = CurveLoop.CreateViaOffset(curveLoopList[i], wallWidth / 2, -XYZ.BasisZ); + for (int j = 0; j < offest_curveloop.Count(); j++) + { + Curve curve = offest_curveloop.ElementAt(j); + ////c的方向叉乘参数中的向量,内侧叉乘-z + //var lc = c.CreateOffset(100 / 304.8, -XYZ.BasisZ); + + //var x = curve.ComputeDerivatives(0.5, true).BasisX.CrossProduct(-XYZ.BasisZ).Normalize() * 100 / 304.8; + //var mc = doc.Create.NewModelCurve(lc, SketchPlane.Create(doc, plane)); + //var mc = doc.Create.NewModelCurve(c, SketchPlane.Create(doc, plane)); + var wallCreated = Wall.Create(doc, curve, wallType.Id, doc.ActiveView.GenLevel.Id, wallHeight / 304.8, wallBaseOffest / 304.8, false, false); + wallCreated.get_Parameter(BuiltInParameter.WALL_ATTR_ROOM_BOUNDING).Set(0); + doc.Regenerate(); + //连接墙体让门窗可以剪切出来 + if (wallToJoinList[i][j].IntegerValue > 0) + { + Element elemToJoin = doc.GetElement(wallToJoinList[i][j]); + try + { + JoinGeometryUtils.JoinGeometry(doc, elemToJoin, wallCreated); + } + catch (Exception ex) + { + Log.WriteLog(ex.Message); + } + } + + //WallUtils.AllowWallJoinAtEnd(w, 0); + //offestcurves.Add(lc); + } + } + }, "创建房间饰面"); + } + else if (placeType == "墙面") + { + Reference referFace = uidoc.Selection.PickObject(ObjectType.Face, new SelectFilter(), "请选择布置的墙面"); + Wall wall = doc.GetElement(referFace) as Wall; + Face face = wall.GetGeometryObjectFromReference(referFace) as Face; + + var bottomFace = GetWallBottomFace(wall); + Curve instersectCurve = null; + face.Intersect(bottomFace, out instersectCurve); + doc.Invoke(ts => + { + Curve curve = instersectCurve.CreateOffset(wallWidth / 2, XYZ.BasisZ); + + var wallCreated = Wall.Create(doc, curve, wallType.Id, doc.ActiveView.GenLevel.Id, wallHeight / 304.8, wallBaseOffest / 304.8, false, false); + doc.Regenerate(); + try + { + JoinGeometryUtils.JoinGeometry(doc, wall, wallCreated); + } + catch (Exception ex) + { + Log.WriteLog(ex.Message); + } + }, "创建墙面饰面"); + //var loops = face.GetEdgesAsCurveLoops().OrderBy(x => x.GetExactLength()); + //// + //var cl = loops.LastOrDefault().GetEnumerator(); + ////face.Intersect(vp.SketchPlane.GetPlane()) + //while (cl.MoveNext()) + //{ + // var c = cl.Current; + //} + } + else if (placeType == "整墙") + { + Reference refer = uidoc.Selection.PickObject(ObjectType.Element, new SelectFilter(), "请选择布置的墙体"); + Wall wall = uidoc.Document.GetElement(refer) as Wall; + Face face = wall.GetGeometryObjectFromReference(refer) as Face; + + var bottomFace = GetWallBottomFace(wall); + var sideFaces = GetWallSideFaces(wall); + //CurveLoop loop = new CurveLoop(); + List curs = new List(); + Curve IntersectCurve = null; + foreach (var sideFace in sideFaces) + { + bottomFace.Intersect(sideFace, out IntersectCurve); + curs.Add(IntersectCurve); + //ModelCurve ml = doc.Create.NewModelCurve(cur, doc.ActiveView.SketchPlane); + + //loop.Append(cur); + } + //var loop = CurveLoop.Create(curs); + //var offestcurveloop = CurveLoop.CreateViaOffset(loop, wallwidth / 2, XYZ.BasisZ); + doc.Invoke(ts => + { + for (int i = 0; i < curs.Count(); i++) + { + Curve curve = curs.ElementAt(i).CreateOffset(wallWidth / 2, -XYZ.BasisZ); + var wallCreated = Wall.Create(doc, curve, wallType.Id, doc.ActiveView.GenLevel.Id, wallHeight / 304.8, wallBaseOffest / 304.8, false, false); + + doc.Regenerate(); + try + { + JoinGeometryUtils.JoinGeometry(doc, wall, wallCreated); + } + catch (Exception ex) + { + Log.WriteLog(ex.Message); + } + + //WallUtils.AllowWallJoinAtEnd(w, 0); + //offestcurves.Add(lc); + } + }, "创建墙体饰面"); + } //walltype包含了叠层墙和基本墙,属于不同族,如果出现名称一样,则会过滤出来两个 //var walltypes = new FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_Walls).OfClass(typeof(WallType)).WhereElementIsElementType(); //var walls = new FilteredElementCollector(doc).OfClass(typeof(Wall)); //var walltype = walltypes.Where(x => x.Name == "常规 - 200mm").FirstOrDefault() as WallType; - - Room room = uidoc.Document.GetElement(refer) as Room; - List curveLoopList = new List(); - List walltojoin = new List(); - List> walltojoinlist = new List>(); - var opts = new SpatialElementBoundaryOptions(); - //{ - // SpatialElementBoundaryLocation = SpatialElementBoundaryLocation.Finish - //}; - double wallwidth = walltype.Width; - double wallheight = finishes.WallHeight; - //BuiltInCategory builtInCategory = (BuiltInCategory)walltype.Category.Id.IntegerValue; - //if (walltype.Kind == WallKind.Stacked) - //{ - // var li = walltype.GetSubelements(); - // walltype.get - //} - //if (walltype.Kind == WallKind.Basic) - //{ - // var compounds = walltype.GetCompoundStructure(); - // for (int i = 0; i < compounds.LayerCount; i++) - // { - // offest += compounds.GetWidth(); - // } - //} - - var segementsList = room.GetBoundarySegments(opts); - - if (segementsList != null) - { - foreach (var boundarySegments in segementsList) - { - CurveLoop curveLoop = new CurveLoop(); - foreach (var boundarySegment in boundarySegments) - { - curveLoop.Append(boundarySegment.GetCurve()); - walltojoin.Add(boundarySegment.ElementId); - } - walltojoinlist.Add(walltojoin); - curveLoopList.Add(curveLoop); - } - } - - doc.Invoke(ts => - { - Plane plane = Plane.CreateByNormalAndOrigin(XYZ.BasisZ, new XYZ()); - //var mc = doc.Create.NewModelCurveArray(array, SketchPlane.Create(doc, plane)); - for (int i = 0; i < curveLoopList.Count; i++) - { - //切线方向叉乘参数中的向量,内侧叉乘-z - var offestcurveloop = CurveLoop.CreateViaOffset(curveLoopList[i], wallwidth / 2, -XYZ.BasisZ); - for (int j = 0; j < offestcurveloop.Count(); j++) - { - Curve curve = offestcurveloop.ElementAt(j); - ////c的方向叉乘参数中的向量,内侧叉乘-z - //var lc = c.CreateOffset(100 / 304.8, -XYZ.BasisZ); - - //var x = curve.ComputeDerivatives(0.5, true).BasisX.CrossProduct(-XYZ.BasisZ).Normalize() * 100 / 304.8; - //var mc = doc.Create.NewModelCurve(lc, SketchPlane.Create(doc, plane)); - //var mc = doc.Create.NewModelCurve(c, SketchPlane.Create(doc, plane)); - var w = Wall.Create(doc, curve, walltype.Id, doc.ActiveView.GenLevel.Id, wallheight / 304.8, 0 / 304.8, false, false); - w.get_Parameter(BuiltInParameter.WALL_ATTR_ROOM_BOUNDING).Set(0); - doc.Regenerate(); - //让门窗可以剪切出来 - if (walltojoinlist[i][j].IntegerValue > 0) - { - Element elemtojoin = doc.GetElement(walltojoinlist[i][j]); - try - { - JoinGeometryUtils.JoinGeometry(doc, elemtojoin, w); - } - catch (Exception) - { - } - } - - //WallUtils.AllowWallJoinAtEnd(w, 0); - //offestcurves.Add(lc); - } - } - }, "创建墙饰面"); } } catch (Autodesk.Revit.Exceptions.OperationCanceledException) @@ -165,5 +247,77 @@ namespace RookieStation.Finishes return Result.Succeeded; } + + public List GetWallSideFaces(Wall wall) + { + Options opt = new Options(); + opt.ComputeReferences = true; + opt.DetailLevel = ViewDetailLevel.Fine; + GeometryElement ge = wall.get_Geometry(opt); + List lstpf = new List(); + foreach (GeometryObject obj in ge) + { + Solid solid = obj as Solid; + if (solid != null) + { + foreach (Face face in solid.Faces) + { + PlanarFace pf = face as PlanarFace; + if (pf != null) + { + if (pf.FaceNormal.DotProduct(XYZ.BasisZ) == 0) + { + lstpf.Add(pf); + } + //if (pf.FaceNormal.CrossProduct(wall.Orientation).IsZeroLength()) + //{ + // lstpf.Add(pf); + //} + } + var cy = face as CylindricalFace; + if (cy != null) + { + lstpf.Add(cy); + } + } + return lstpf; + } + } + return null; + } + + public PlanarFace GetWallBottomFace(Wall wall) + { + Options opt = new Options(); + opt.ComputeReferences = true; + opt.DetailLevel = ViewDetailLevel.Fine; + GeometryElement ge = wall.get_Geometry(opt); + PlanarFace pf = null; + foreach (GeometryObject obj in ge) + { + Solid solid = obj as Solid; + if (solid != null) + { + foreach (Face face in solid.Faces) + { + PlanarFace temppf = face as PlanarFace; + if (temppf != null) + { + if (temppf.FaceNormal.IsAlmostEqualTo(-XYZ.BasisZ)) + { + pf = temppf; + break; + } + //if (pf.FaceNormal.CrossProduct(wall.Orientation).IsZeroLength()) + //{ + // lstpf.Add(pf); + //} + } + } + return pf; + } + } + return null; + } } } \ No newline at end of file diff --git a/RookieStation/Custom/Enum.cs b/RookieStation/Custom/Enum.cs index 7f4dd98..3570979 100644 --- a/RookieStation/Custom/Enum.cs +++ b/RookieStation/Custom/Enum.cs @@ -19,7 +19,7 @@ namespace RookieStation Three = 3, } - public enum LengthType + public enum ShelfLength { [Description("1000")] x1000 = 1, @@ -34,7 +34,7 @@ namespace RookieStation x2000 = 4, } - public enum WidthType + public enum ShelfWidth { [Description("400")] x400 = 1, diff --git a/RookieStation/Custom/Shelf.cs b/RookieStation/Custom/Shelf.cs index 4130ab7..9d40f6a 100644 --- a/RookieStation/Custom/Shelf.cs +++ b/RookieStation/Custom/Shelf.cs @@ -10,9 +10,9 @@ namespace RookieStation public class Shelf { //public bool IsSelected { get; set; } - public LengthType LengthType { get; set; } + public ShelfLength ShelfLength { get; set; } - public WidthType WidthType { get; set; } + public ShelfWidth ShelfWidth { get; set; } public NumOfGroup NumOfGroup { get; set; } //public int StartNumber { get; set; } //public int EndNumber { get; set; } @@ -21,7 +21,7 @@ namespace RookieStation { get { - string strlength = CommonUtils.GetEnumDescription(LengthType); + string strlength = CommonUtils.GetEnumDescription(ShelfLength); return Convert.ToDouble(strlength); } } @@ -30,11 +30,11 @@ namespace RookieStation { get { - string strwidth = CommonUtils.GetEnumDescription(WidthType); + string strwidth = CommonUtils.GetEnumDescription(ShelfWidth); return Convert.ToDouble(strwidth); } } - public string SymbolName => String.Format("{0}{1}{2}{3}", CommonUtils.GetEnumDescription(LengthType), "mmx", CommonUtils.GetEnumDescription(WidthType), "mm"); + public string SymbolName => String.Format("{0}{1}{2}{3}", CommonUtils.GetEnumDescription(ShelfLength), "mmx", CommonUtils.GetEnumDescription(ShelfWidth), "mm"); } } \ No newline at end of file diff --git a/RookieStation/RookieStation.csproj b/RookieStation/RookieStation.csproj index 1f4a383..87b79b6 100644 --- a/RookieStation/RookieStation.csproj +++ b/RookieStation/RookieStation.csproj @@ -92,7 +92,6 @@ - True True diff --git a/RookieStation/RsApp.cs b/RookieStation/RsApp.cs index b0ba1ae..8893467 100644 --- a/RookieStation/RsApp.cs +++ b/RookieStation/RsApp.cs @@ -55,7 +55,7 @@ namespace RookieStation LargeImage = ConvertFromBitmap(Properties.Resources.cainiao), Image = ConvertFromBitmap(Properties.Resources.cainiao) }; - var projectbtn = (PushButton)projectPanel.AddItem(projectPBD); + var projectBtn = (PushButton)projectPanel.AddItem(projectPBD); //前台布置 RibbonPanel receptionAreaPanel = application.CreateRibbonPanel(TabName, ReceptionPanelName); PushButtonData receptionLayoutPBD = new PushButtonData("寄件区布置", "前台布置", AddInPath, "RookieStation.ShippingAreaModule.CmdPlaceReceptionArea") @@ -63,8 +63,8 @@ namespace RookieStation LargeImage = ConvertFromBitmap(Properties.Resources.Reception), Image = ConvertFromBitmap(Properties.Resources.Reception) }; - var receptionbtn = (PushButton)receptionAreaPanel.AddItem(receptionLayoutPBD); - receptionbtn.AvailabilityClassName = "RookieStation.ViewPlanCmdEnabled"; + var receptionBtn = (PushButton)receptionAreaPanel.AddItem(receptionLayoutPBD); + receptionBtn.AvailabilityClassName = "RookieStation.ViewPlanCmdEnabled"; //出入口布置 RibbonPanel packAreaPanel = application.CreateRibbonPanel(TabName, EntranceAndExitGatePanelName); PushButtonData entrancegateLayoutPBD = new PushButtonData("入口布置", "入口闸机", AddInPath, "RookieStation.PackAreaModule.CmdPlaceEntranceGate") @@ -77,38 +77,38 @@ namespace RookieStation LargeImage = ConvertFromBitmap(Properties.Resources.ExitGate), Image = ConvertFromBitmap(Properties.Resources.ExitGate) }; - //var gatebtn = (PushButton)gatePanel.AddItem(exportGateLayoutPBD); + //var gateBtn = (PushButton)gatePanel.AddItem(exportGateLayoutPBD); //IList gateItemsStacked = packAreaPanel.AddStackedItems(entrancegateLayoutPBD, exitGateLayoutPBD); - //var entrancebtn = (PushButton)gateItemsStacked[0]; - //var exitbtn = (PushButton)gateItemsStacked[1]; - var entrancebtn = (PushButton)packAreaPanel.AddItem(entrancegateLayoutPBD); - var exitbtn = (PushButton)packAreaPanel.AddItem(exitGateLayoutPBD); - entrancebtn.AvailabilityClassName = "RookieStation.ViewPlanCmdEnabled"; - exitbtn.AvailabilityClassName = "RookieStation.ViewPlanCmdEnabled"; + //var entranceBtn = (PushButton)gateItemsStacked[0]; + //var exitBtn = (PushButton)gateItemsStacked[1]; + var entranceBtn = (PushButton)packAreaPanel.AddItem(entrancegateLayoutPBD); + var exitBtn = (PushButton)packAreaPanel.AddItem(exitGateLayoutPBD); + entranceBtn.AvailabilityClassName = "RookieStation.ViewPlanCmdEnabled"; + exitBtn.AvailabilityClassName = "RookieStation.ViewPlanCmdEnabled"; PushButtonData placeShelvesPBD = new PushButtonData("货架布置", "货架布置", AddInPath, "RookieStation.PackAreaModule.CmdPlaceShelves") { LargeImage = ConvertFromBitmap(Properties.Resources.Shelf), Image = ConvertFromBitmap(Properties.Resources.Shelf) }; - var placeShelvesbtn = (PushButton)packAreaPanel.AddItem(placeShelvesPBD); - placeShelvesbtn.AvailabilityClassName = "RookieStation.ViewPlanCmdEnabled"; + var placeShelvesBtn = (PushButton)packAreaPanel.AddItem(placeShelvesPBD); + placeShelvesBtn.AvailabilityClassName = "RookieStation.ViewPlanCmdEnabled"; PushButtonData placeShelveCardsPBD = new PushButtonData("货架端牌", "货架端牌", AddInPath, "RookieStation.PackAreaModule.CmdArrangeShelfCards") { LargeImage = ConvertFromBitmap(Properties.Resources.ShelfCard), Image = ConvertFromBitmap(Properties.Resources.ShelfCard) }; - var placeShelveCardsbtn = (PushButton)packAreaPanel.AddItem(placeShelveCardsPBD); + var placeShelveCardsBtn = (PushButton)packAreaPanel.AddItem(placeShelveCardsPBD); PushButtonData placeLampsPBD = new PushButtonData("灯具布置", "灯具布置", AddInPath, "RookieStation.PackAreaModule.CmdPlaceLamps") { LargeImage = ConvertFromBitmap(Properties.Resources.Lamp), Image = ConvertFromBitmap(Properties.Resources.Lamp) }; - var placeLampsbtn = (PushButton)packAreaPanel.AddItem(placeLampsPBD); - placeLampsbtn.AvailabilityClassName = "RookieStation.ViewPlanCmdEnabled"; + var placeLampsBtn = (PushButton)packAreaPanel.AddItem(placeLampsPBD); + placeLampsBtn.AvailabilityClassName = "RookieStation.ViewPlanCmdEnabled"; //饰面,完成面 RibbonPanel finishesPanel = application.CreateRibbonPanel(TabName, FinishesPanelName); @@ -117,16 +117,17 @@ namespace RookieStation LargeImage = ConvertFromBitmap(Properties.Resources.FloorFinishes), Image = ConvertFromBitmap(Properties.Resources.FloorFinishes) }; - var floorcoveringbtn = (PushButton)finishesPanel.AddItem(floorfinishesPBD); - floorcoveringbtn.AvailabilityClassName = "RookieStation.ViewPlanCmdEnabled"; + var floorcoveringBtn = (PushButton)finishesPanel.AddItem(floorfinishesPBD); + floorcoveringBtn.AvailabilityClassName = "RookieStation.ViewPlanCmdEnabled"; PushButtonData wallcoveringPBD = new PushButtonData("墙饰面", "墙饰面", AddInPath, "RookieStation.Finishes.CmdPlaceWallFinishes") { LargeImage = ConvertFromBitmap(Properties.Resources.WallFinishes), Image = ConvertFromBitmap(Properties.Resources.WallFinishes) }; - var wallcoveringbtn = (PushButton)finishesPanel.AddItem(wallcoveringPBD); - wallcoveringbtn.AvailabilityClassName = "RookieStation.ViewPlanCmdEnabled"; + + var wallcoveringBtn = (PushButton)finishesPanel.AddItem(wallcoveringPBD); + wallcoveringBtn.AvailabilityClassName = "RookieStation.ViewPlanCmdEnabled"; //统计面板 RibbonPanel statisticsPanel = application.CreateRibbonPanel(TabName, StatisticsPanelName); diff --git a/RookieStation/RsLibrary/Document/样板工程量清单.xlsx b/RookieStation/RsLibrary/Document/样板工程量清单.xlsx index be0f38e10f00c7fbe0fdfe5e5dcdfafb493764ff..2c854e7ba21a6d4cd77c6495ef012657085923bb 100644 GIT binary patch delta 21767 zcmZsCWl&yC(8xAUx zv*l|-rPFMFS%{MA+LM^-B*xe;|6hY{`M-!NwQ18M77=tJAI4e3h}2-s>2Nmuurd++%}j^$VS> zu?DQRVS8J?NcI}hj^IX;A70W{T`XuDLDnpRLBajd+C4~e1dE1z4p2Af&x+(WL>~hw zAU`|pOJ~TAsn-gjUkxy4sT$U$?&eYnS>OKtb27hEH8S~dS-vfUXKz|TG zAmaQut@z_-nZDOvJEU`S&O27pM7?nBSgNX{N4H!Vp`oc`!zxvIm$uH5T)9_dunvUk zx9oT#6f<$m{R*hEVhgkEaRx_*i?nE=x-(-r$1zirn7|6@b=8Bckey#mx*d>?w+x4J zGe528gK0WeCNAq-#=Tveigqhu0KY83VRM(xdJ{jC1&Nx70A~_Hb8Av2_b<8b$tvKj zi{}2DLsExv*5(>x>m<|+sV0GVaAabxD#gicqWke$Jal1 z*}zDf;g#WP7=6ZeCd&lAT@%VnvH$?&9y2dddeuEE%x`7l6pIO>_ZmA z8>}89FBAd~=|H$GL>ZW788eq)R>ZBy;T-ReG86eN*Tpy%pv06SreVpIyui$yu=A;mBpN0ndo-$TI*=()hOxPB637n`n5Y$$HM3j@s^jDHCG}7XB zY41iQmSZ??{vil&z(XR0eqTRha`d(>IDfR(xy@y5@%RJ-~3pRB($O za`@{*fqH-2m>+e%UDAg|)@xSkF=|mdJN;7XgJ2;EMJ&C&(=ghLECm+0hq-~|Z;fOF zUO6mQllyPUAFZ@oOWNsksTGQ-b+_fl^vV8w)6GWN^%L-Ew8>!iaaNB+SSKbN-I=pY z0YZ?W2&+SlB*|dky{$9?xRKzZ*M?7uNbaJu0C0$zG7MTJ_~p^MI{$fbycTM_cC(hZ zIk7k}3y7u4c)Q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ZAal+6Kr02)6;}sxupa8iZ1H7z%{z^q4DF25A0`XcMDnAA|&i=gu#0&3m_74pmXyF)O zOGyV$L;P^S2Ysy}bpYf^u?1O>jdnmvAgG4SasX1=K_#X;>A*=Cz&Sd&*o(U0?42DY zL_FM_p;7=8M9vQYNn$oE5S%PdLkB0w;^1#Y6@(KBoIO~8c_;(`&!40Z6l6;bQh<9O zpj;#?6 z27Ko`1yvA%3LxnxXpIPz2amr%!Y5M~obZsF|IO?HG0aSl2uAD{ej{*TWq_>VHwVKO zp /// 基于参考线的偏移(垂距) /// - public double VerticalReferOffest { get; set; } + public double VerticalReferlineOffest { get; set; } /// /// 通道宽度 @@ -23,12 +23,12 @@ namespace RookieStation /// /// 基于参考线的偏移(起点水平) /// - public double ParalelReferOffest { get; set; } + public double ParallelReferlineOffest { get; set; } /// /// 货架间距 /// - public double Spacing { get; set; } + public double ShelfSpacing { get; set; } public ShelvesPlacementViewModel() { @@ -44,32 +44,32 @@ namespace RookieStation for (int i = 0; i < sc.Count; i++) { Shelf shelf = new Shelf(); - string shelf_string = sc[i]; - string[] shelf_chars = shelf_string.Split(','); - foreach (NumOfGroup ng in Enum.GetValues(typeof(NumOfGroup))) + string shelfInfo = sc[i]; + string[] shelfChars = shelfInfo.Split(','); + foreach (NumOfGroup numDescription in Enum.GetValues(typeof(NumOfGroup))) { - string description = CommonUtils.GetEnumDescription(ng); - if (description == shelf_chars[0]) + string description = CommonUtils.GetEnumDescription(numDescription); + if (description == shelfChars[0]) { - shelf.NumOfGroup = ng; + shelf.NumOfGroup = numDescription; break; } } - foreach (LengthType lt in Enum.GetValues(typeof(LengthType))) + foreach (ShelfLength lengthDescription in Enum.GetValues(typeof(ShelfLength))) { - string description = CommonUtils.GetEnumDescription(lt); - if (description == shelf_chars[1]) + string description = CommonUtils.GetEnumDescription(lengthDescription); + if (description == shelfChars[1]) { - shelf.LengthType = lt; + shelf.ShelfLength = lengthDescription; break; } } - foreach (WidthType wt in Enum.GetValues(typeof(WidthType))) + foreach (ShelfWidth widthDescription in Enum.GetValues(typeof(ShelfWidth))) { - string description = CommonUtils.GetEnumDescription(wt); - if (description == shelf_chars[2]) + string description = CommonUtils.GetEnumDescription(widthDescription); + if (description == shelfChars[2]) { - shelf.WidthType = wt; + shelf.ShelfWidth = widthDescription; break; } } diff --git a/RookieStation/TestCmd.cs b/RookieStation/TestCmd.cs deleted file mode 100644 index cb89276..0000000 --- a/RookieStation/TestCmd.cs +++ /dev/null @@ -1,52 +0,0 @@ -using Autodesk.Revit.DB; -using Autodesk.Revit.UI; -using Autodesk.Revit.UI.Selection; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace RookieStation -{ - [Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)] - [Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)] - internal class TestCmd : IExternalCommand - { - public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) - { - UIApplication uiapp = commandData.Application; - UIDocument uidoc = uiapp.ActiveUIDocument; - Autodesk.Revit.ApplicationServices.Application app = uiapp.Application; - Document doc = uidoc.Document; - DocumentSet docset = uiapp.Application.Documents; - ICollection sys = new FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_FurnitureSystems).OfClass(typeof(FamilyInstance)).ToElements(); - foreach (FamilyInstance sy in sys) - { - if (sy.Symbol.FamilyName.Contains("亚克力")) - { - TaskDialog.Show("提示", "存在"); - } - } - using (Transaction trans = new Transaction(doc, "cmd")) - { - try - { - trans.Start(); - //Do Something. - trans.Commit(); - } - catch (Exception ex) - { - message = ex.Message; - if (trans.GetStatus() == TransactionStatus.Started) - { - trans.RollBack(); - } - return Result.Cancelled; - } - } - return Result.Succeeded; - } - } -} \ No newline at end of file diff --git a/RookieStation/Utils/DocumentExtension.cs b/RookieStation/Utils/DocumentExtension.cs index 200a7f4..be9a883 100644 --- a/RookieStation/Utils/DocumentExtension.cs +++ b/RookieStation/Utils/DocumentExtension.cs @@ -178,9 +178,9 @@ namespace RookieStation.Utils { tg.Start(); - var result = func(tg); + TResult result = func(tg); - var status = tg.GetStatus(); + TransactionStatus status = tg.GetStatus(); switch (status) { case TransactionStatus.Started: diff --git a/RookieStation/Utils/RsRevitUtils.cs b/RookieStation/Utils/RsRevitUtils.cs index 712a28e..a1e47ff 100644 --- a/RookieStation/Utils/RsRevitUtils.cs +++ b/RookieStation/Utils/RsRevitUtils.cs @@ -14,31 +14,31 @@ namespace RookieStation.Utils /// /// 英尺转米 /// - /// + /// /// - public static double FtConvertToM(double valuetoconvert) + public static double FtConvertToM(double valueToConvert) { - return UnitUtils.ConvertFromInternalUnits(valuetoconvert, DisplayUnitType.DUT_METERS); + return UnitUtils.ConvertFromInternalUnits(valueToConvert, DisplayUnitType.DUT_METERS); } /// /// 平方英尺转平方米 /// - /// + /// /// - public static double SFConvertToSM(double valuetoconvert) + public static double SFConvertToSM(double valueToConvert) { - return UnitUtils.ConvertFromInternalUnits(valuetoconvert, DisplayUnitType.DUT_SQUARE_METERS); + return UnitUtils.ConvertFromInternalUnits(valueToConvert, DisplayUnitType.DUT_SQUARE_METERS); } /// /// 英尺转换成毫米单位 /// - /// + /// /// - public static double FtConvertToMM(double valuetoconvert) + public static double FtConvertToMM(double valueToConvert) { - return UnitUtils.ConvertFromInternalUnits(valuetoconvert, DisplayUnitType.DUT_MILLIMETERS); + return UnitUtils.ConvertFromInternalUnits(valueToConvert, DisplayUnitType.DUT_MILLIMETERS); } /// @@ -46,14 +46,14 @@ namespace RookieStation.Utils /// /// 墙类型包含的字符串 /// - public static double GetWallWidthByWallTypeName(Document doc, string wallTypeName, out WallType walltype) + public static double GetWallWidthByWallTypeName(Document doc, string wallTypeName, out WallType wallType) { double thickness = 0.0; var walltypelist = new FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_Walls).OfClass(typeof(WallType)).Cast(); - walltype = walltypelist.FirstOrDefault(t => t.Name.Contains(wallTypeName)); - if (walltype != null) + wallType = walltypelist.FirstOrDefault(t => t.Name.Contains(wallTypeName)); + if (wallType != null) { - thickness = walltype.Width; + thickness = wallType.Width; //var compounds = walltype.GetCompoundStructure(); //for (int i = 0; i < compounds.LayerCount; i++) //{ @@ -68,7 +68,7 @@ namespace RookieStation.Utils /// /// /// - public static XYZ GetXYZByElement(Element instance) + public static XYZ GetLocationPointByElement(Element instance) { return instance.Location is LocationPoint lp ? lp.Point : null; } @@ -77,19 +77,19 @@ namespace RookieStation.Utils /// 调整族实例位置 /// /// - /// 需要偏移的族实例 - /// 用于调整偏移和角度的参考线 + /// 需要偏移的族实例 + /// 用于调整偏移和角度的参考线 /// 偏移量 - public static void AdjustInstances(Document doc, List fis, Line refer_line, double offest) + public static void AdjustInstances(Document doc, List instances, Line referLine, double offest) { - var zdir = XYZ.BasisZ; + XYZ zdir = XYZ.BasisZ; //通过第三点垂直于直线的单位向量(无论左右侧)*偏移距离(一半的闸机长度) - XYZ offestdir = zdir.CrossProduct(refer_line.Direction).Normalize() * offest; + XYZ offestVector = zdir.CrossProduct(referLine.Direction).Normalize() * offest; //旋转角度 - double angle = XYZ.BasisY.AngleTo(offestdir); + double angle = XYZ.BasisY.AngleTo(offestVector); //判断相对于Y轴是正向角度(逆时针)还是逆向角度(顺时针) - XYZ z = offestdir.CrossProduct(XYZ.BasisY).Normalize(); + XYZ z = offestVector.CrossProduct(XYZ.BasisY).Normalize(); if (z.IsAlmostEqualTo(XYZ.BasisZ)) { //逆向旋转,角度取负值 @@ -97,13 +97,13 @@ namespace RookieStation.Utils //var ml = doc.Create.NewModelCurve(Line.CreateBound(XYZ.Zero, re), SketchPlane.Create(doc, Plane.CreateByNormalAndOrigin(XYZ.BasisZ, new XYZ()))); } - foreach (var fi in fis) + foreach (FamilyInstance instance in instances) { - var p = GetXYZByElement(fi); + XYZ p = GetLocationPointByElement(instance); Line l = Line.CreateUnbound(p, XYZ.BasisZ); //旋转,移动 - ElementTransformUtils.RotateElement(doc, fi.Id, l, angle); - ElementTransformUtils.MoveElement(doc, fi.Id, offestdir); + ElementTransformUtils.RotateElement(doc, instance.Id, l, angle); + ElementTransformUtils.MoveElement(doc, instance.Id, offestVector); } } @@ -112,30 +112,30 @@ namespace RookieStation.Utils /// /// /// - /// + /// /// - public static void AdjustInstance(Document doc, FamilyInstance fi, Line refer_line, double offest) + public static void AdjustInstance(Document doc, FamilyInstance fi, Line referLine, double offest) { //朝着向量方向左侧偏移 - var zdir = XYZ.BasisZ; + XYZ zdir = XYZ.BasisZ; //通过第三点垂直于直线的单位向量(无论左右侧)*偏移距离(一半的闸机长度) - XYZ offest_direction = zdir.CrossProduct(refer_line.Direction).Normalize() * offest; + XYZ offestVector = zdir.CrossProduct(referLine.Direction).Normalize() * offest; //旋转角度 - double angle = XYZ.BasisY.AngleTo(offest_direction); + double angle = XYZ.BasisY.AngleTo(offestVector); //判断相对于Y轴是正向角度(逆时针)还是逆向角度(顺时针) - XYZ z = offest_direction.CrossProduct(XYZ.BasisY).Normalize(); + XYZ z = offestVector.CrossProduct(XYZ.BasisY).Normalize(); if (z.IsAlmostEqualTo(XYZ.BasisZ)) { //逆向旋转,角度取负值 angle = -angle; } - var p = GetXYZByElement(fi); + XYZ p = GetLocationPointByElement(fi); Line l = Line.CreateUnbound(p, XYZ.BasisZ); //旋转,移动 ElementTransformUtils.RotateElement(doc, fi.Id, l, angle + Math.PI); - ElementTransformUtils.MoveElement(doc, fi.Id, offest_direction); + ElementTransformUtils.MoveElement(doc, fi.Id, offestVector); } /// @@ -144,14 +144,14 @@ namespace RookieStation.Utils public static void AddProjectTemplate() { //Autodesk.Revit.ApplicationServices.Application.CurrentUsersDataFolderPath - string oriDatei = @"" + Environment.GetEnvironmentVariable("appdata") + @"\Autodesk\Revit\Autodesk Revit 2020\Revit.ini"; - string tmpDatei = UserConstant.FamilyLibraryDirectory + "\\Rs.ini"; + string oriDateFilePath = @"" + Environment.GetEnvironmentVariable("appdata") + @"\Autodesk\Revit\Autodesk Revit 2020\Revit.ini"; + string tmpDateFilePath = UserConstant.FamilyLibraryDirectory + "\\Rs.ini"; - if (System.IO.File.Exists(oriDatei)) + if (System.IO.File.Exists(oriDateFilePath)) { - using (StreamReader sr = new StreamReader(oriDatei, Encoding.Unicode)) + using (StreamReader sr = new StreamReader(oriDateFilePath, Encoding.Unicode)) { - StreamWriter sw = new StreamWriter(tmpDatei, false, Encoding.Unicode); + StreamWriter sw = new StreamWriter(tmpDateFilePath, false, Encoding.Unicode); string inputLine = ""; while ((inputLine = sr.ReadLine()) != null) @@ -172,34 +172,34 @@ namespace RookieStation.Utils sw.Close(); } - System.IO.File.Replace(tmpDatei, oriDatei, null); + System.IO.File.Replace(tmpDateFilePath, oriDateFilePath, null); } } public static FamilySymbol GetGuideSymbol(Document doc) { - FamilySymbol linesymbol = null; + FamilySymbol lineSymbol = null; doc.Invoke(ts => { - Family linefamily = GetLoadedFamily(doc, UserConstant.FamilyLibraryDirectory + "定位线.rfa"); - linesymbol = doc.GetElement(linefamily.GetFamilySymbolIds().FirstOrDefault()) as FamilySymbol; + Family lineFamily = GetLoadedFamily(doc, UserConstant.FamilyLibraryDirectory + "定位线.rfa"); + lineSymbol = doc.GetElement(lineFamily.GetFamilySymbolIds().FirstOrDefault()) as FamilySymbol; }, "载入定位线并布置"); - return linesymbol; + return lineSymbol; } public static Line GetGuideGeometryAndDeleteGuide(Document doc, List eleIdsAdded) { - ElementId referlineid = eleIdsAdded.FirstOrDefault(); - FamilyInstance referline = doc.GetElement(referlineid) as FamilyInstance; - LocationCurve lc = referline.Location as LocationCurve; - Line referlinegeom = lc.Curve as Line; + ElementId referLineId = eleIdsAdded.FirstOrDefault(); + FamilyInstance guideLine = doc.GetElement(referLineId) as FamilyInstance; + LocationCurve lc = guideLine.Location as LocationCurve; + Line line = lc.Curve as Line; doc.Invoke(ts => { - doc.Delete(referlineid); + doc.Delete(referLineId); }, "删除参考线"); - return referlinegeom; + return line; } /// @@ -210,7 +210,7 @@ namespace RookieStation.Utils /// 所有的面 public static List GetFaceByElement(Element item, Options options) { - List listFace = new List(); + List faces = new List(); //根据打开的方式得到几何信息 GeometryElement geometry = item.get_Geometry(options); foreach (GeometryObject geomObj in geometry) @@ -223,14 +223,14 @@ namespace RookieStation.Utils foreach (GeometryObject instObj in geomInstance.GetInstanceGeometry()) { //三维的实体 - Solid instsolid = instObj as Solid; - if (instsolid == null || instsolid.Faces.Size == 0 || instsolid.Edges.Size == 0) + Solid instSolid = instObj as Solid; + if (instSolid == null || instSolid.Faces.Size == 0 || instSolid.Edges.Size == 0) { continue; } - foreach (Face face in instsolid.Faces) + foreach (Face face in instSolid.Faces) { - listFace.Add(face); + faces.Add(face); } } } @@ -246,12 +246,12 @@ namespace RookieStation.Utils { foreach (Face face in solid.Faces) { - listFace.Add(face); + faces.Add(face); } } } } - return listFace; + return faces; } /// @@ -261,7 +261,7 @@ namespace RookieStation.Utils /// public static List GetFacesByFamilyInstance(FamilyInstance instance, Options options) { - List listFace = new List(); + List faces = new List(); //根据打开的方式得到几何信息 GeometryElement geometry = instance.get_Geometry(options); foreach (GeometryObject geomObj in geometry) @@ -280,14 +280,14 @@ namespace RookieStation.Utils foreach (GeometryObject instObj in instanceGeometry) { //三维的实体 - Solid instsolid = instObj as Solid; - if (instsolid == null || instsolid.Faces.Size == 0 || instsolid.Edges.Size == 0) + Solid instSolid = instObj as Solid; + if (instSolid == null || instSolid.Faces.Size == 0 || instSolid.Edges.Size == 0) { continue; } - foreach (Face face in instsolid.Faces) + foreach (Face face in instSolid.Faces) { - listFace.Add(face); + faces.Add(face); } } } @@ -303,12 +303,12 @@ namespace RookieStation.Utils { foreach (Face face in solid.Faces) { - listFace.Add(face); + faces.Add(face); } } } } - return listFace; + return faces; } /// @@ -318,7 +318,7 @@ namespace RookieStation.Utils /// public static List GetFamilyInstanceFaces(FamilyInstance instance, Options options) { - List listFace = new List(); + List faces = new List(); //根据打开的方式得到几何信息 GeometryElement geometry = instance.get_Geometry(options); @@ -334,14 +334,14 @@ namespace RookieStation.Utils foreach (GeometryObject instObj in geomInstance.GetInstanceGeometry()) { //三维的实体 - Solid instsolid = instObj as Solid; - if (instsolid == null || instsolid.Faces.Size == 0 || instsolid.Edges.Size == 0) + Solid instSolid = instObj as Solid; + if (instSolid == null || instSolid.Faces.Size == 0 || instSolid.Edges.Size == 0) { continue; } - foreach (Face face in instsolid.Faces) + foreach (Face face in instSolid.Faces) { - listFace.Add(face); + faces.Add(face); } } } @@ -357,12 +357,12 @@ namespace RookieStation.Utils { foreach (Face face in solid.Faces) { - listFace.Add(face); + faces.Add(face); } } } } - return listFace; + return faces; } /// @@ -399,20 +399,20 @@ namespace RookieStation.Utils /// 获取已载入同名族,若无,则载入 /// /// - /// + /// /// - internal static Family GetLoadedFamily(Document doc, string familyname) + internal static Family GetLoadedFamily(Document doc, string familyName) { Family family; family = new FilteredElementCollector(doc) .OfClass(typeof(Family)) .Cast() - .Where(f => f.Name == Path.GetFileNameWithoutExtension(familyname)) + .Where(f => f.Name == Path.GetFileNameWithoutExtension(familyName)) .FirstOrDefault(); if (family == null) { - doc.LoadFamily(familyname, new RsFamilyLoadOption(), out family); + doc.LoadFamily(familyName, new RsFamilyLoadOption(), out family); } return family; @@ -422,23 +422,23 @@ namespace RookieStation.Utils /// 获取垂直于基准线的最长边 /// /// - /// + /// /// - public static Line GetLongestSegmentLine(IList segments, Line baseline) + public static Line GetLongestSegmentLine(IList segments, Line baseLine) { Line line = null; //var m = doc.GetElement(refer.ElementId); foreach (var seg in segments) { - Line templine = seg.GetCurve() as Line; + Line tempLine = seg.GetCurve() as Line; //判断是否垂直 - double dotp = Math.Abs(templine.Direction.DotProduct(baseline.Direction)); + double dotp = Math.Abs(tempLine.Direction.DotProduct(baseLine.Direction)); if (dotp < 0.0001) { - if (line == null || line.Length < templine.Length) + if (line == null || line.Length < tempLine.Length) { - line = templine; + line = tempLine; } } } diff --git a/RookieStation/Utils/ViewPlanCmdEnabled.cs b/RookieStation/Utils/ViewPlanCmdEnabled.cs index 6756095..b1461f5 100644 --- a/RookieStation/Utils/ViewPlanCmdEnabled.cs +++ b/RookieStation/Utils/ViewPlanCmdEnabled.cs @@ -15,6 +15,19 @@ namespace RookieStation { public bool IsCommandAvailable(UIApplication applicationData, CategorySet selectedCategories) { + //Application revitApplication = applicationData.Application; + //ApplicationOptions options = ApplicationOptions.Get(); + + //switch (options.Availability) + //{ + // case ApplicationAvailablity.ArchitectureDiscipline: + // return revitApplication.IsArchitectureEnabled; + // case ApplicationAvailablity.StructuralAnalysis: + // return revitApplication.IsStructuralAnalysisEnabled; + // case ApplicationAvailablity.MEP: + // return revitApplication.IsSystemsEnabled; + //} + if (null != applicationData.ActiveUIDocument) { Autodesk.Revit.DB.View view = applicationData.ActiveUIDocument.Document.ActiveView; diff --git a/RookieStation/WpfEntranceGate.xaml b/RookieStation/WpfEntranceGate.xaml index 44f5b81..e341021 100644 --- a/RookieStation/WpfEntranceGate.xaml +++ b/RookieStation/WpfEntranceGate.xaml @@ -30,7 +30,7 @@ Margin="2" Header="通道宽度(mm)"> diff --git a/RookieStation/WpfEntranceGate.xaml.cs b/RookieStation/WpfEntranceGate.xaml.cs index c629bfb..ec86e2b 100644 --- a/RookieStation/WpfEntranceGate.xaml.cs +++ b/RookieStation/WpfEntranceGate.xaml.cs @@ -20,7 +20,7 @@ namespace RookieStation /// public partial class WpfEntranceGate { - public double passage_width = 0.0; + public double PassageWidth { get; set; } public WpfEntranceGate() { @@ -29,10 +29,11 @@ namespace RookieStation private void btnConfirm_Click(object sender, RoutedEventArgs e) { - bool a = double.TryParse(tbpassage_width.Text, out passage_width); - + double passageWidth; + bool a = double.TryParse(tbPassage_width.Text, out passageWidth); if (a) { + PassageWidth = passageWidth; DialogResult = true; } } diff --git a/RookieStation/WpfExitGate.xaml b/RookieStation/WpfExitGate.xaml index 9c85e8a..3d5eb44 100644 --- a/RookieStation/WpfExitGate.xaml +++ b/RookieStation/WpfExitGate.xaml @@ -55,7 +55,7 @@ Margin="2" Header="通道宽度(mm)"> diff --git a/RookieStation/WpfExitGate.xaml.cs b/RookieStation/WpfExitGate.xaml.cs index faf1525..6eab67b 100644 --- a/RookieStation/WpfExitGate.xaml.cs +++ b/RookieStation/WpfExitGate.xaml.cs @@ -20,9 +20,9 @@ namespace RookieStation /// public partial class WpfExitGate { - public bool isStartPassage = true; + public bool IsStartPassage { get; set; } - public double passage_width = 0.0; + public double PassageWidth { get; set; } public WpfExitGate() @@ -32,15 +32,17 @@ namespace RookieStation private void btnConfirm_Click(object sender, RoutedEventArgs e) { - bool a = double.TryParse(tbpassage_width.Text, out passage_width); + double passageWidth; + bool a = double.TryParse(tbPassagewidth.Text, out passageWidth); if (rbStartPassage.IsChecked == true) { - isStartPassage = true; + PassageWidth = passageWidth; + IsStartPassage = true; } else if (rbStartInspection.IsChecked == true) { - isStartPassage = false; + IsStartPassage = false; } if (a) { diff --git a/RookieStation/WpfFloorFinishes.xaml b/RookieStation/WpfFloorFinishes.xaml index e9a025f..e09f761 100644 --- a/RookieStation/WpfFloorFinishes.xaml +++ b/RookieStation/WpfFloorFinishes.xaml @@ -35,7 +35,7 @@ Margin="2" Header="砖长(mm)"> public partial class WpfFloorFinishes { - public double cLength; + public double PavementLength { get; set; } - public double cWidth; + public double PavementWidth { get; set; } - public double cGap; + public double PavementGap { get; set; } public WpfFloorFinishes() @@ -34,11 +34,15 @@ namespace RookieStation private void btnConfirm_Click(object sender, RoutedEventArgs e) { - var a = double.TryParse(tbLength.Text, out cLength); - var b = double.TryParse(tbWidth.Text, out cWidth); - var c = double.TryParse(tbGap.Text, out cGap); + double length, width, gap; + var a = double.TryParse(tbPavementLength.Text, out length); + var b = double.TryParse(tbPavementWidth.Text, out width); + var c = double.TryParse(tbPavementGap.Text, out gap); if (a && b && c) { + PavementLength = length; + PavementWidth = width; + PavementGap = gap; DialogResult = true; } else diff --git a/RookieStation/WpfLampsLayout.xaml.cs b/RookieStation/WpfLampsLayout.xaml.cs index 6eeee60..e0af2a5 100644 --- a/RookieStation/WpfLampsLayout.xaml.cs +++ b/RookieStation/WpfLampsLayout.xaml.cs @@ -20,8 +20,8 @@ namespace RookieStation /// public partial class WpfLampsLayout { - public double LRDistance; - public double FBDistance; + public double LeftRightDistance { get; set; } + public double FrontDistance { get; set; } public WpfLampsLayout() { @@ -30,10 +30,13 @@ namespace RookieStation private void btnConfirm_Click(object sender, RoutedEventArgs e) { - bool a = double.TryParse(tbDistanceLR.Text, out LRDistance); - bool b = double.TryParse(tbDistanceFB.Text, out FBDistance); + double lrDistance, fDistance; + bool a = double.TryParse(tbDistanceLR.Text, out lrDistance); + bool b = double.TryParse(tbDistanceFB.Text, out fDistance); if (a && b) { + LeftRightDistance = lrDistance; + FrontDistance = fDistance; DialogResult = true; } } diff --git a/RookieStation/WpfReceptionArea.xaml b/RookieStation/WpfReceptionArea.xaml index 4d1a15d..75a1209 100644 --- a/RookieStation/WpfReceptionArea.xaml +++ b/RookieStation/WpfReceptionArea.xaml @@ -3,12 +3,13 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:hc="https://handyorg.github.io/handycontrol" xmlns:local="clr-namespace:RookieStation" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - Width="485" - Height="220" - MinWidth="550" - MinHeight="250" + Width="126" + Height="338" + MinWidth="220" + MinHeight="480" mc:Ignorable="d"> @@ -20,68 +21,66 @@ - + + + - - - - - - - - - - - - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + +