|
1 | | -using System; |
2 | | -using System.Collections.Generic; |
3 | | -using System.Linq; |
4 | 1 | using Autodesk.Revit.DB; |
5 | 2 | using Autodesk.Revit.DB.DirectContext3D; |
6 | 3 | using Autodesk.Revit.DB.ExternalService; |
@@ -116,17 +113,17 @@ public DrawSession Clear() |
116 | 113 | public ExternalServiceId GetServiceId() => |
117 | 114 | ExternalServices.BuiltInExternalServices.DirectContext3DService; |
118 | 115 |
|
119 | | - public string GetName() => "DrawSession"; |
| 116 | + public string GetName() => "DrawSession"; |
120 | 117 | public string GetDescription() => "Revit.Extensions transient geometry renderer"; |
121 | | - public string GetVendorId() => "Revit.Extensions"; |
| 118 | + public string GetVendorId() => "Revit.Extensions"; |
122 | 119 |
|
123 | 120 | public string GetApplicationId() => "Revit.Extensions.DrawSession"; |
124 | | - public string GetSourceId() => _serverId.ToString(); |
125 | | - public bool UsesHandles() => false; |
| 121 | + public string GetSourceId() => _serverId.ToString(); |
| 122 | + public bool UsesHandles() => false; |
126 | 123 |
|
127 | | - public bool CanExecute(View view) => !_disposed && _lines.Count > 0 && view is View3D; |
| 124 | + public bool CanExecute(View view) => !_disposed && _lines.Count > 0 && view is View3D; |
128 | 125 | public bool UseInTransparentPass(View view) => false; |
129 | | - public Outline? GetBoundingBox(View view) => null; |
| 126 | + public Outline? GetBoundingBox(View view) => null; |
130 | 127 |
|
131 | 128 | public void RenderScene(View view, DisplayStyle displayStyle) |
132 | 129 | { |
@@ -189,17 +186,17 @@ private void RebuildBuffers() |
189 | 186 |
|
190 | 187 | #if REVIT_2024 || REVIT_2023 || REVIT_2022 || REVIT_2021 || REVIT_2020 |
191 | 188 | foreach (var item in groups) |
192 | | - { |
| 189 | + { |
193 | 190 | var key = item.Key; |
194 | 191 | var lines = item.Value; |
195 | 192 | #else |
196 | 193 | foreach (var (key, lines) in groups) |
197 | 194 | { |
198 | 195 | #endif |
199 | 196 |
|
200 | | - int nVerts = lines.Count * 2; |
201 | | - int nPrims = lines.Count; |
202 | | - int ibSize = nPrims * IndexLine.GetSizeInShortInts(); |
| 197 | + int nVerts = lines.Count * 2; |
| 198 | + int nPrims = lines.Count; |
| 199 | + int ibSize = nPrims * IndexLine.GetSizeInShortInts(); |
203 | 200 |
|
204 | 201 | var vb = new VertexBuffer(nVerts * VertexPosition.GetSizeInFloats()); |
205 | 202 | vb.Map(nVerts * VertexPosition.GetSizeInFloats()); |
|
0 commit comments