Commit Graph

20863 Commits

Author SHA1 Message Date
Dion Moult 027e2406be Interface mockup 13 2026-05-25 16:34:18 +10:00
Dion Moult e864a961ee ifcviewer-full: per-patch area labels + skip redundant 2-pt perpendicular
Area mode now drops a label at every connected coplanar patch — a
BFS sweep over selected_ restricted to each mesh's edge adjacency
identifies the components, then each component gets one label at
its area-weighted centroid in world space.  Two clicks on
different walls now show two distinct numbers; a single BFS-grown
wall face stays one number across all its triangles.

The 2-pt length perpendicular line is now omitted when |perp|
matches any of ΔX/ΔY/ΔZ within 1mm — the surface-aligned-with-
axis case where the perpendicular is already shown by one of the
RGB legs.  Avoids redundant double-readout on axis-aligned walls.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-25 16:34:18 +10:00
Dion Moult d8f37b2376 ifcviewer-full: 1-pt laser, 2-pt XYZ + perpendicular, sharper visuals
Length tool's 1-pt laser is now hybrid:
  - On any surface, a coplanar BFS finds the connected face patch
    around the click and projects its vertices into the surface
    tangent basis to get an exact bounding-box extent.  Stops at
    the face edge by construction — no overshoot into adjacent
    geometry like the previous tangent-raycast did.
  - On near-horizontal surfaces (|n.z| > 0.85, i.e. floors and
    ceilings) it additionally fires one raycast in +n to the
    opposing surface — so a single floor click reports X extent +
    Y extent + ceiling height.
  - Bars are labelled by their dominant world axis (X/Y/Z) instead
    of "vertical/horizontal", which reads cleanly on either kind
    of surface.

The 2-pt readout now draws the world-space XYZ stair-step (red ΔX,
green ΔY, blue ΔZ) with each leg labelled, and a dashed
perpendicular line whenever the two picks landed on near-parallel
surfaces — useful for measuring across walls.

To support multiple line styles per frame, OverlayRenderer's
setOverlayLines takes std::vector<LineGroup> instead of a single
inline style; each group has its own color/halo/width and an
optional dash period.  The line shader gained v_along_px +
u_dash_period uniforms (screen-space dashes), and both line and
point shaders now use a sharp step() for the inner→stroke
transition with AA only on the outer halo edge — much crisper than
the previous soft band.  Default visual style trimmed: 1.5px lines
(0.5px halo), 6px dots (1px halo), opaque black halo.

Also adds ViewportWindow::raycast(origin, dir, RaycastHit&) — CPU
ray traversal of each model's per-instance BVH followed by
Möller-Trumbore against the candidate meshes' triangles (lazily
read back, cached per call).  Used by the floor/ceiling laser path
today and reusable for any future raycast-based feature.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-25 16:34:18 +10:00
Dion Moult acfcf6e14e Fix sidecar source loading
Treat .ifcview sources as geometry-only cache inputs, stop guessing sibling data paths, and only start data-source loading for real model sources after a sidecar hit.

Generated with the assistance of an AI coding tool.
2026-05-25 16:34:18 +10:00
Dion Moult 5bc7e4b98b ifcviewer-full: length tool (2/3/4+ point distance, angle, polygon area)
ViewportWindow trades the area_tool_active_ bool for an enum ToolMode
{None, Area, Length}; the existing surfacePickedInTool signal carries
both, the app dispatches on toolMode().  Esc exits any active tool;
Backspace/Delete in length mode emits toolBackspacePressed which the
length tool uses to remove the last point.

LengthMeasurement collects clicked world-space points and adapts the
readout: 2pt → distance + axis-aligned ΔX/ΔY/ΔZ, 3pt → angle at the
middle vertex + triangle area, 4+pt → best-fit-plane PCA + shoelace
when planar (RMS plane distance / bbox diag < 1e-3) else fan
triangulation, with the chosen method labelled in the readout.  Per-
segment lengths float at each midpoint.

OverlayRenderer grows three new pipelines to support this:
  - point sprite shader: gl_PointCoord-based outlined disc with
    fwidth-smoothed inner/stroke bands, a single draw call.
  - line shader: CPU-expand each segment to 6 verts carrying both
    endpoints + (side, along) corner index; vertex shader computes
    the screen-space perpendicular and offsets accordingly.  Real
    outlined lines independent of the driver's glLineWidth clamp.
  - screen-space rect shader: HUD + label backgrounds drawn as raw
    GL quads in NDC.  QPainter::fillRect on QOpenGLPaintDevice was
    silently dropping fills across drivers; bypassing it entirely
    via this shader makes backgrounds reliable.  Cull-face is also
    explicitly disabled here — GL_TRIANGLES respects it but the
    line/point primitives don't, so this was the one path needing
    the fix.

setOverlayLines / setOverlayPoints take an inner color, an outline
color, and an extra-pixels-per-side stroke amount.  Lines + points
draw with GL_ALWAYS so measurement annotations stay visible through
geometry; highlight tris stay depth-aware (GL_LEQUAL) so area
shading still tints the surface in place.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-25 16:34:18 +10:00
Thomas Krijnen c8d39cc481 At least make sure that hybrid-cgal-simple-opencascade processes the elements correctly #8052 2026-05-21 14:17:17 +02:00
Thomas Krijnen 1cf9373000 Add test_shape_stats #8054 2026-05-18 19:25:13 +02:00
Thomas Krijnen d8c9d1a47b submodule 2026-05-18 19:24:25 +02:00
Thomas Krijnen 0993c1b0f1 Submodule 2026-05-18 18:56:37 +02:00
Thomas Krijnen 22384e136f Fix manifold kernel halfspace direction #8054 2026-05-18 18:18:05 +02:00
Thomas Krijnen 6dea7a5110 Calculate normals in manifold kernel 2026-05-18 18:16:49 +02:00
Thomas Krijnen 424e70ac86 Remove svgfill test in pyodide wheel test 2026-05-10 20:57:46 +02:00
Thomas Krijnen fceb8911f6 Updates to workflow 2026-05-10 19:16:07 +02:00
Thomas Krijnen 94f4dbcf31 Add missing file 2026-05-10 17:01:11 +02:00
Thomas Krijnen 391f8363bb zip .so links (untested) 2026-05-10 16:54:50 +02:00
Thomas Krijnen 210861eda1 Strip to try and get back some file size increase 2026-05-10 16:54:30 +02:00
Thomas Krijnen a2012ace2e Proper svgfill isolation 2026-05-10 14:33:07 +02:00
Thomas Krijnen 05e328339f Try again with Qt install on Rocky 2026-05-10 13:44:58 +02:00
Thomas Krijnen cd612dc988 Add missing files 2026-05-09 22:00:46 +02:00
Thomas Krijnen 44ba6e8963 Untested build script updates for qt and viewer app 2026-05-09 21:59:58 +02:00
Thomas Krijnen c3a10694ba draw.py use settings instead of direct member methods 2026-05-09 21:19:55 +02:00
Thomas Krijnen da5ebf172e Delete 7za.exe from repo 2026-05-09 21:05:08 +02:00
Thomas Krijnen c1173dfc78 Additional plug-in host to try and fix arm64 build 2026-05-09 21:04:32 +02:00
Thomas Krijnen fde502daa1 svgfill as plug-in 2026-05-09 21:03:55 +02:00
Thomas Krijnen 2eb2d65710 Allow passing buffer to serializers that support it 2026-05-09 21:03:15 +02:00
Thomas Krijnen 0d8e9f0edc Explicit cast to make clang 21 happy 2026-05-09 20:28:27 +02:00
Thomas Krijnen 3c773d71d3 If it's an EMSCRIPTEN build, we're not done 2026-05-09 20:08:28 +02:00
Thomas Krijnen 43f5a79f99 Try with manifold on again 2026-05-08 20:47:16 +02:00
Thomas Krijnen 12935c83de Silent extraction 2026-05-08 20:31:29 +02:00
Thomas Krijnen e7249fe934 BUILD_IFCVIEWER=ON 2026-05-08 20:10:19 +02:00
Thomas Krijnen cf257aa20a check_installation for qt6 - was not aware of this bit 2026-05-08 19:08:08 +02:00
Thomas Krijnen 7d0b6f6fd8 Examples=Off for now 2026-05-08 17:59:38 +02:00
Thomas Krijnen 554c7174e3 Backspace everything regarding HDF5 2026-05-08 16:20:26 +02:00
Thomas Krijnen bd436765bf Win packaging changes 2026-05-08 14:05:17 +02:00
Thomas Krijnen 5270318570 Tweak Qt install handling 2026-05-08 13:40:21 +02:00
Thomas Krijnen 8fcaa18171 Tweak output names 2026-05-08 13:39:52 +02:00
Thomas Krijnen 8d0a6ecc16 Respect unicode setting for plugin debug info 2026-05-08 13:39:36 +02:00
Thomas Krijnen bfea57c617 Wire up serializer plug-ins in python 2026-05-08 10:58:09 +02:00
Thomas Krijnen 18b79a4360 Rocksdb streaming serializer connect to IfcConvert 2026-05-08 10:57:58 +02:00
Thomas Krijnen 05cd19592d Qt install (not working) 2026-05-08 10:56:41 +02:00
Thomas Krijnen a1efdccb4b Add back mutex 2026-05-08 10:07:34 +02:00
Thomas Krijnen 6ad5fbb27e Add qt6 to win build scripts using an 3rd party install script 2026-05-07 22:32:53 +02:00
Thomas Krijnen 884e7ba326 Make meshoptim optional 2026-05-07 22:31:15 +02:00
Thomas Krijnen 82f188fbe6 IfcViewer needs to be static because it does not export anything 2026-05-07 22:31:00 +02:00
Thomas Krijnen 31ddc0ecdb Respect plus-sign in versions in split_pyodide___.py 2026-05-07 22:09:00 +02:00
Thomas Krijnen 02198e3f56 Update wasm demo app for modular wheels 2026-05-07 22:08:19 +02:00
Thomas Krijnen b1899b1a8d Expand schema_plugin with schema name to eliminate symbol collisions 2026-05-07 21:10:35 +02:00
Thomas Krijnen 39d583a26a Merge remote-tracking branch 'origin/ifcviewer' into datamodel-v1.0 2026-05-07 21:01:56 +02:00
Thomas Krijnen 609b6959bc set_plugin_search_paths() inside test as well 2026-05-07 20:58:45 +02:00
Thomas Krijnen 2c7d25cffc Reorder .so files in wheel so that symbol dependencies do not trip up loading 2026-05-07 16:31:13 +02:00