New Extension Methods#2
Merged
Merged
Conversation
Removed width attribute from the logo image.
cf283ef to
806eb1b
Compare
DrawSession: - Add DrawSolid() — renders Solid faces as PositionNormal triangles with ambient/diffuse lighting, tessellates edges as lines. Supports transparency (0.0–1.0) with correct opaque/transparent pass handling. - Add DrawMesh() — renders Mesh as flat-shaded triangles with per-triangle normals computed from cross product. - Split GPU buffers into _lineBuffers (Position+LineList) and _triBuffers (PositionNormal+TriangleList) for independent pipeline paths. - UseInTransparentPass() returns true when any solid has transparency > 0. - RenderScene() handles both passes: opaque (lines + solid faces) and transparent (transparent faces only). - CanExecute() and ComputeOutline() account for all three primitive lists. - Clear() clears lines, solids and meshes. - Fix: Remove auto-registration from constructor — registration is now explicit via RegisterDrawSession() or Register(). - Fix: VertexBuffer/IndexBuffer.Map(0) → Map(actualSize) — Map() takes buffer size in floats/shorts, not an offset. Passing 0 wrote no data. UIControlledApplicationExtensions: - Add RegisterDrawSession() extension on UIControlledApplication. Encapsulates correct DirectContext3D registration order per Revit API docs: AddServer → GetActiveServerIds → Contains check → SetActiveServers. Replaces ~10 lines of boilerplate with a single call in OnStartup. Docs: - README: Add DrawSession and DrawExtensions usage sections with full examples. - CLAUDE.md: Add DrawSession section covering registration pattern, UIApplication lifecycle, fixed bugs, CanExecute conditions, threading model. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Fix black faces: pre-compute all triangle data (Triangulate, ComputeNormal) in DrawSolid/DrawMesh on the main thread instead of calling Revit geometry API from the render thread (where it silently fails, producing zero normals) - Replace _solids/_meshes raw storage with _triData (pre-computed tuples) - Add DrawBox(XYZ min, XYZ max), DrawBox(BoundingBoxXYZ), DrawBox(Outline): filled axis-aligned box with 12 wireframe edges, pure math triangulation - Add DrawSphere(XYZ center, double radius): UV sphere (16x32 rings) with 3 great-circle wireframe edges, pure math triangulation - Rename private DrawBox helper to DrawWireBox to avoid name conflict Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…DotNet - Replace stroke-font approach with GraphicsPath.AddString() → Flatten() → LibTessDotNet tessellation so any system font renders as filled triangles (handles holes in O, A, B, D, etc.) - Add _textCache static dict: normalised (height=1.0, Y-up) triangles cached per (text, fontFamily) - Add BuildTextTriangles / ExtractContours / GetFontFamily private helpers - Remove AppendThickSegment and _strokeFont dictionary (old stroke-font code) - Add DrawPoint(XYZ, string label, ...) overload: cross + DrawText label - Add DrawBox(min,max) / DrawBox(BoundingBoxXYZ) / DrawBox(Outline) — pure-math box triangulation - Add DrawSphere(center, radius) — UV-sphere 16×32 tessellation, no Revit geometry API calls - Add DrawSolid / DrawMesh with main-thread pre-computed triangles (fixes black faces on render thread) - Add LibTessDotNet v1.1.0 + System.Drawing.Common v8.0.0 (net8) / System.Drawing ref (net4x) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…uGet pack - Add DrawSolid, DrawMesh, DrawBox, DrawSphere, DrawText sections with code examples - Add full method reference table for DrawSession - Add color reference table - Drop Revit 2027 from supported versions list - Fix NU5019: icon.png path in csproj was pointing to repo root instead of project folder Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.