Compare commits

..
5688 Commits
Author SHA1 Message Date
Clifford Yapp 43ad5d4b97 Fix MSVC edit matrix warnings
Compare BOT face modes as booleans and use offsetof directly so the tests do not redefine the Windows FIELD_OFFSET macro.
2026-09-30 18:36:01 -04:00
Clifford Yapp 95fd44bbad Harden the Windows usage regression
Limit the command scan to executable files on Windows so DLL and debug artifacts are not invoked. Allow additional timeout headroom for the substantially larger and slower Windows executable set.
2026-09-30 18:36:00 -04:00
Clifford Yapp 86b93459a6 Preserve DB5 object sizes above 4 GB
Use size_t for encoded name and record byte counts so LLP64 Windows builds do not truncate large serialized objects through 32-bit long values.
2026-09-30 18:36:00 -04:00
Clifford Yapp 1bfaeba67b Validate BRep closest-point results
Evaluate the Newton gradient in release builds, reject invalid or non-finite projection results, and preserve trim-boundary points within tolerance. Add direct regression coverage for refined and midpoint projections.
2026-09-30 18:36:00 -04:00
Clifford Yapp 185559e373 Fix MSVC BRep build and linkage
Export topology healing entry points from libbrep and link the healing test to the library implementation instead of compiling it twice. Use the platform header wrapper and normalize the boolean XOR operand for MSVC.
2026-09-30 18:36:00 -04:00
Clifford Yapp a5659b38e8 check fixes 2026-09-30 18:36:00 -04:00
Clifford Yapp 4dcca4f4cf Bound pathological BRep repair fallbacks 2026-09-30 18:36:00 -04:00
Clifford Yapp d9005aaf8c Preserve source identities in full sphere repairs 2026-09-30 18:36:00 -04:00
Clifford Yapp bdc06aa8f9 Use valid storage for mesh point arrays 2026-09-30 18:36:00 -04:00
Clifford Yapp 285824cf58 Retry resource-limited BRep corpus tasks in isolation 2026-09-30 18:36:00 -04:00
Clifford Yapp 2918c80198 Preserve certified curved BRep repair patches 2026-09-30 18:36:00 -04:00
Clifford Yapp 8d21869426 Preserve shared boundaries in periodic BRep bands 2026-09-30 18:36:00 -04:00
Clifford Yapp a387959c93 Preserve BRep mesh vertices during export compaction 2026-09-30 18:36:00 -04:00
Clifford Yapp a9ff01b36a Apply shared geometry eligibility to BRep audit comparisons
Exclude no-face inputs from shaded and quality comparisons and documented
open surfaces from quality comparisons in both revisions. Retain raw totals
and evidence while applying the same eligibility to outcomes, failures, and
timings. Accept valid empty shading and wireframe-only quality records.

Validation: policy checks cover symmetric exclusions, retained repair
candidates, empty results, and invalid manifests. Matched trial comparisons
against main and the previous branch pass final preflight.
2026-09-30 18:36:00 -04:00
Clifford Yapp 813151775b Retain resource-limit history across BRep repair attempts
Accumulate time, memory, point, and refinement limits across nested repair
attempts, including failures preceding a successful retry. Distinguish mesh
repair allocation failures from geometric rejection and expose the retained
limit mask in audit output. Repair report layouts gain new fields.

Validation: tiny point and memory budgets retain their limit flags, and an
allocation-fault probe checks cleared outputs and reset on a later call.
The Steam Controller completes within 4 GiB while retaining prior limit
history. All 67 final preflight tests pass with matching rebuilt headers.
2026-09-30 18:36:00 -04:00
Clifford Yapp 3b448247d0 Report all solid mesh edge defects consistently
Collect unmatched, misoriented, and excess edges independently when a full
report is requested, retaining short-circuit checks for boolean callers.
Classify complete edge-use groups and fix the legacy wrapper's acceptance
of orientation-only or excess-only defects when bad edges are requested.

Validation: solid-diagnostics fixtures cover reversed tetrahedra and mixed
edge defects with and without reports. Existing mesh repair tests and all
67 final preflight tests pass.
2026-09-30 18:36:00 -04:00
Clifford Yapp e20de53e11 Reduce exact nearest-triangle query work during BRep repair
Expand the search cube progressively and prune strictly farther triangle
bounds with a roundoff guard. Avoid candidate-vector allocations while
preserving exact distances, acceptance limits, and traversal-order ties.

Validation: 2,400 queries match exhaustive distances and source identities
across scales, translations, duplicate triangles, and degenerate triangles.
An isolated benchmark confirms fewer distance evaluations. All 67 final
preflight tests pass.
2026-09-30 18:36:00 -04:00
Clifford Yapp 5aaf063f87 Correct interpolation of sampled surface lengths
Interpolate the lower, middle, and upper length measurements with their
proper adjacent weights. This removes a discontinuity in sampling estimates
on tapered surfaces while retaining independent measurements on each half.

Validation: rising and falling lengths, shifted domains, endpoints, quarter
points, and an interior maximum pass. The final combined tree passes all
67 preflight tests.
2026-09-30 18:36:00 -04:00
Clifford Yapp 49d2ff7fac Retain native chart samples for wide periodic mesh triangles
Preserve chart-derived centroid and edge-midpoint samples when seam welding
would lose a triangle's periodic image. Carry the sparse samples through
triangulation, atlas installation, edge splits, and flips so orientation
and surface-deviation checks evaluate the intended source region.

Validation: chart tests cover both windings, reversed faces, and cache
reset. All eight targeted solid regressions now pass native meshing and
solid validation without fallback repair. All 67 final preflight tests pass.
2026-09-30 18:36:00 -04:00
Clifford Yapp da30bd04cc Recover drawable BRep components with bounded topology healing
Retry failed trim boundaries on an owned, validated topology copy while
preserving face identities and unsupported empty faces. Use component-local
closure evidence, discard only empty inner loops on supported faces, and
honor drawing budgets and authoritative source-sample contracts.

Validation: healing fixtures preserve holes, reject unsafe references and
unsupported open components, and leave source CRCs unchanged. Targeted
checks recover three additional Garrett faces with no newly failed faces;
all 40 drawing controls and all 67 final preflight tests pass.
2026-09-30 18:36:00 -04:00
Clifford Yapp 624a18574a Select periodic drawing bands from directed boundary winding
Lift boundary walks continuously on doubly closed surfaces and select the
filled band from the outer boundary direction. Verify flattening against
model tolerance and existing edge agreement before accepting the chart.

Validation: eight band fixtures cover reversed winding, transposed charts,
and alternating periodic copies, checking both region and surface area.
The final combined tree passes all 67 preflight tests.
2026-09-30 18:36:00 -04:00
Clifford Yapp 6f0fc0e6e7 Normalize periodic surface evaluation and bound seam bridge sampling
Share periodic parameter normalization across drawing, edge normals, and
surface sampling. Sample seam bridges using model-space tolerances and
quarter-turn seeds so equivalent parameter copies produce the same curve.
Fail bounded sampling explicitly and keep bridge samples in owned storage.

Validation: periodic UV sampling and edge-normal regressions cover shifted
domains, equivalent copies, both parameter directions, and excessive
winding. The final combined tree passes all 67 preflight tests.
2026-09-30 18:36:00 -04:00
Clifford Yapp 4a17e43560 Preserve nested cutouts when decomposing touching polygon contours
Classify decomposed cycles by signed area and assign holes to their unique
smallest enclosing filled cycle. Preserve repeated boundary vertices so
reinserting authoritative samples cannot fill a cutout or lose an island.

Validation: contour-cleaning regressions cover both windings, every start
vertex, a touching hole, and a nested island with its own hole. The final
combined tree passes all 67 preflight tests.
2026-09-30 18:36:00 -04:00
Clifford Yapp 8fdba02189 Add missing header 2026-09-30 18:36:00 -04:00
Clifford Yapp 2fe4b2f08f Align shaded BRep triangle winding with its corner normals
Order chart triangles according to the source face orientation. After
resolving shared boundary vertices, replace opposing or invalid corner
normals with the realized facet normal while retaining compatible smooth
normals. Document the per-corner normal contract.

Validation: normal and reversed-face drawing tests pass. The Dreadnought
hull has no opposing normals on nondegenerate triangles, with unchanged
triangle geometry and face completion. Steam Controller and Product
watertight repair reports remain unchanged.
2026-09-30 18:36:00 -04:00
Clifford Yapp 3b53ca0093 Avoid folded fans when reconstructing concave BRep patches
Use a simple projected triangulation when a repair fan lies outside its
boundary kernel. Preserve exact boundary samples and valid existing fans;
split only new diagonals that conflict with retained mesh edges. Keep the
existing fidelity and thin-sheet intersection policies.

Validation: concave, convex, crossed, reversed, and conflicting-diagonal
fixtures pass. On Steam Controller, the reference/output area discrepancy
falls from 22.35% to 1.155% while retaining all rigorous triangles.
2026-09-30 18:36:00 -04:00
Clifford Yapp 324986134e Reduce mesh repair search costs and temporary storage
Index candidate hanging-boundary vertices spatially and score cap defects
over their complete affected neighborhoods. Avoid discarded Manifold
normalization copies, duplicate rigorous-triangle keys, and incidence
storage outside the requested boundary; release assembly scratch earlier.
Report allocation failures as memory limits in the audit tool.

Validation: mesh repair regressions and differential cap/boundary checks
preserve results across coordinate scales. The Steam Controller quality
case completes under a 4 GiB limit with the existing acceptance policy.
2026-09-30 18:36:00 -04:00
Clifford Yapp e4ee3b8362 Preserve periodic BRep charts and verify source coverage
Use topological seams to choose the closed direction of doubly periodic
faces and retain the required periodic support during conditioning.
Validate unwrapped polyline segments against their 3-D edges, sample full
periodic boundaries, and tolerate seam translation roundoff. Guard a
missing refinement neighbor after boundary collapse.

Reject face meshes outside their original support bounds. Independently
check repaired meshes against referenced source edges and proven full-face
interiors so an omitted surface cannot certify itself through an incomplete
reference mesh. Ignore unused construction edges.

Validation: transposed torus bands, wrapped strips, independent source
coverage, and local-defect regressions pass.
2026-09-30 18:36:00 -04:00
Clifford Yapp 7cfb2b58e1 Retain validated pullback samples for closed-source repair retries
Retry a small unmatched boundary residue from whole-display repair of a
valid closed BRep with pullback simplification disabled. Preserve the
existing solid, resource, and fidelity limits and report the retry path.

Stop rejected pullbacks at the first source mismatch instead of spending
the remaining budget on projections that cannot yield a usable candidate.

Validation: dense and simplified collapsed-pcurve fixtures both pass and
leave the source unchanged.
2026-09-30 18:36:00 -04:00
Clifford Yapp 5aa60a2c29 Heal bounded BRep topology defects on an owned copy
After ordinary repair fails, interpret supported planar boundaries,
loop roles, unused edges, and face orientations without changing the
source surfaces or curves. Bound work, storage, and time; retain original
topology identities and publish only a certified candidate mesh.

Add opt-in planar caps with disjoint conservative bounds and an aggregate
area ceiling. Require Manifold acceptance and preserve the requested
intersection and fidelity policies. Expose healing results and the cap
setting through the audit tools.

Validation: healing regressions cover source preservation, provenance,
resource limits, ambiguous boundaries, cap bounds, and rejected candidates.
2026-09-30 18:36:00 -04:00
Clifford Yapp c9ac27102d Treat no-face BReps as empty display geometry
Allow all-faces drawing requests to return empty success for BReps with
no faces, while retaining errors for nonexistent individual faces.
Exclude these wireframe-only objects from watertight quality checks and
report the exclusion explicitly in audit output.

Validation: empty-object drawing contracts, fast-drawing regressions,
and the audit classification checks pass.
2026-09-30 18:36:00 -04:00
Clifford Yapp 20206f696f Recover orphaned holes after polygon contour cleaning
Reattach a conditioned hole only to its unique smallest enclosing filled
contour. Require complete containment and reject ambiguous ownership so
overlapping input holes cannot silently become filled triangles.

Add a regression for the orphan-hole case with its expected filled area.
2026-09-30 18:36:00 -04:00
Clifford Yapp 0671152b75 Avoid shadowing lint options in the BRep shading check
Name the local fast-drawing settings explicitly so the shading check
builds with the repository's shadow warnings enabled.

Validation: the lint target builds and regress-ged_lint_brep passes.
2026-09-30 18:36:00 -04:00
Clifford Yapp 2509048c45 Report fast BRep shading failures from lint
Run the bounded display tessellator only when brep:fast_shading is
explicitly selected.  Record each failed face with its result, stage,
and diagnostic, while classifying resource-limited work separately as
inconclusive.

Exercise valid and invalid BReps in the lint regression and document
the command and its 30-second per-object budget.
2026-09-30 18:36:00 -04:00
Clifford Yapp 02f8a98ac9 Conservatively infer missing BRep boundaries
Recover all-inner open-chart faces only when winding and
containment define a complete alternating hierarchy.  Support disjoint
bounded roots through detria contour-role detection, but reject orphan
holes, conflicting nesting, and ambiguous closed-surface strips.

Treat faces whose every loop is provably zero-area as successful empty
display results, and ignore those loops when constructing an otherwise
well-defined periodic domain.  This recovers four corpus faces without
inventing support-surface geometry.
2026-09-30 18:36:00 -04:00
Clifford Yapp 7e6ebba263 Recover degenerate BRep loop assemblies
Treat an untrimmed periodic face domain as authoritative and seed it
from coordinate extents, not a particular corner ordering.  Ignore only
secondary outer loops proven to have no physical or parametric area.

Report surface evaluation and 3D degeneracy counts when all realized
chart triangles fail.  This recovers two MAZ faces and the untrimmed
Boat revolution, eliminating the focused boundary assembly failures.
2026-09-30 18:36:00 -04:00
Clifford Yapp 96a1a972c6 Decompose touching triangulation contours
Let Clipper first produce strictly simple boundaries, then restore
authoritative collinear samples.  Remove exact retrace spikes and split
any resulting nonadjacent vertex touches into independent closed walks.

Certify each triangulation and their combined chart area.  This recovers
eight residual display failures without perturbing UVs.
2026-09-30 18:36:00 -04:00
Clifford Yapp e43d741882 Recover collapsed periodic BRep caps
Interpret a one-turn trim as a band against the natural surface
boundary selected by its winding, even when that boundary is not
analytically singular.  Also collapse repeated seam and pole circuits
only when every closed-edge copy identifies the same boundary.

This recovers 19 previously failed corpus faces, including the repeated
Cutting-machine caps and single-edge Garrett periodic patches, while
retaining the cone, polar, cylinder, and NIST 6 regressions.
2026-09-30 18:36:00 -04:00
Clifford Yapp 36bdef78c5 Report display triangulation failure stages
Return structured diagnostics from cleaned polygon triangulation and
propagate per-face failure reasons through the fast B-Rep API.  Record
them in brep-audit so corpus failures identify the constraint, detria,
or realization stage without debugger-only logging.

Exercise both successful and failed report population in the libbg
clean triangulation test.
2026-09-30 18:36:00 -04:00
Clifford Yapp b6b2075c06 Canonicalize invalid BRep trim constraints
Keep sanitized polygons in Clipper's conditioned integer coordinates
through detria predicates so conversion back to ill-conditioned UV space
cannot reintroduce duplicate points or crossing constraints. Reinsert
only exactly collinear boundary vertices and treat rejected zero-area
hole paths as empty constraints.

Cover degenerate holes and edge-touching T-junctions. This recovers 38
additional unique archived face failures, including FarmBot face 987,
with no losses among the 21 earlier recoveries.
2026-09-30 18:36:00 -04:00
Clifford Yapp 78a24378dd Recover implicit periodic BRep domains
Interpret an all-inner face on a closed surface as the complete periodic
domain minus its loops only when every loop is contractible.  Select seam
locations outside the hole intervals so seam-straddling cutouts remain
intact in the universal cover.

Preserve all original loops as constrained holes.  This recovers eight
archived shared failures without accepting the non-contractible Garrett
cases or regressing existing periodic-strip handling.
2026-09-30 18:36:00 -04:00
Clifford Yapp 4e4b09fd2f Classify sub-tolerance BRep faces as complete
Distinguish exact zero-area faces from boundaries that collapse at the
requested display tolerance.  Retry coarse adaptive collapses at requested
quality before accepting an empty result.

Expose the outcome through the fast CDT report and brep-audit JSON.  This
turns ten archived shared failures, including HINO face 4, into successful
tolerance-tagged empty results.
2026-09-30 18:36:00 -04:00
Clifford Yapp 6ef47093b6 Recover failed coarse BRep faces directly
Display tessellation success is not monotonic with tolerance.  Coarse
sampling can collapse a narrow face even when the requested tolerance
resolves it, so retry missing faces at the requested setting instead of
walking through several known-insufficient intermediate passes.

Stop rescheduling faces once they have completed at requested quality.
This recovers HINO face 30 within the five-second object budget.
2026-09-30 18:36:00 -04:00
Clifford Yapp da39ca8ef4 Simplify repaired BRep trim boundaries
Pullback repair can expose every knot of an already approximated edge,
forcing the display CDT to process redundant boundary vertices.  Reduce
those polylines with model-space and surface-scaled UV chord bounds at
the declared repair tolerance.

Split closed boundaries into two arcs so coincident endpoints cannot
collapse a real loop.  This reduces OpenRC Rim face 94 from 196738 to
16218 vertices and from 24.84 to 1.30 seconds while preserving its
boundary envelope within tolerance.
2026-09-30 18:36:00 -04:00
Clifford Yapp fdf70af435 Confirm degenerate BRep loops in model space
Trim tolerances are not UV distances on arbitrarily scaled NURBS
surfaces.  Treat UV collinearity only as a candidate and require the
mapped deviation to remain within modeling tolerance before discarding
a loop.

This preserves tolerant zero-area slit handling while retaining narrow
drawable strips such as hAVYARD wheelhouse roof face 0.
2026-09-30 18:36:00 -04:00
Clifford Yapp ca0389d276 Add strict BRep audit comparison reporting
Validate the common main and branch result schema before reporting.
Match task coverage and run configuration.  Summarize outcomes and
timing, and identify failure categories so incomplete or incompatible
corpus runs cannot be mistaken for comparable data.
2026-09-30 18:36:00 -04:00
Clifford Yapp 1b750729e8 Harden the fast heap for arbitrary threads
The prior cache indexed storage with bu_parallel_id(), which is not a
unique identity for arbitrary C++ threads. Concurrent external workers
could race a page or free list, and retained pages grew without bound.

Use reusable thread-affine cache slots. Small exact-size operations are
lock-free after slot acquisition. Excess threads and full caches fall
back to the system allocator.

Bound the process cache charge at 64 MiB, account for allocator
metadata, and compact returned blocks without touching live storage.
Document the cross-thread, initialization, and size contracts.

Add cross-thread release, 80-thread oversubscription, live allocation,
and concurrent compaction coverage. ASan, LeakSanitizer, TSan, all 598
libbu tests, and all 745 focused BRep wireframe cases pass.
2026-09-30 18:36:00 -04:00
Clifford Yapp 29761eaa9a run nmg kill on failed return 2026-09-30 18:36:00 -04:00
Clifford Yapp df8f2890f1 Reuse released blocks in the fast heap
The fast heap never reused allocations returned by bu_heap_put.
Repeated BRep surface-tree construction therefore retained every
transient node, growing T-34 wireframe memory by more than 3 GiB
until its 4 GiB audit limit failed.

Maintain a per-worker free list for each eligible allocation size and
make the out-of-range fallback unconditional. Add tests for LIFO reuse
and fallback allocations. T-34 now renders at 1.5 GiB peak RSS with
pixel-identical output.
2026-09-30 18:36:00 -04:00
Clifford Yapp 7afeb57d5d Ensure corpus batches account for every selected task
Fall back to isolated per-object audits when a database batch cannot start, violates the protocol, or repeatedly exits without progress. Preserve flattened task indices and record the fallback cause so resume can continue without silently dropping the database tail.
2026-09-30 18:36:00 -04:00
Clifford Yapp d10ad36e1f Add lighting to shaded audit images
Apply deterministic directional and ambient lighting during shaded\nimage rasterization so curved surfaces expose their reconstructed\nnormals and depth instead of appearing as a flat constant fill.
2026-09-30 18:36:00 -04:00
Clifford Yapp 750566e77b Add resumable BRep display image capture
Render successful wireframe and shaded audit geometry to deterministic\n1024-pixel PPM files. Include a database-path hash and object name in\neach filename so corpus images remain traceable after archival. Keep\nimage generation optional and outside normal timing runs.
2026-09-30 18:36:00 -04:00
Clifford Yapp a265a0e4d0 Harden BRep corpus batch completion
Require an explicit end-of-batch marker and contiguous task indices
before a database batch is accepted as complete.  Retry interrupted or
malformed records and report selection count mismatches instead of
silently skipping objects.

This preserves complete corpus coverage when a geometry routine exits
the process successfully or writes diagnostics that corrupt a result
record.
2026-09-30 18:36:00 -04:00
Clifford Yapp f20ba0af07 Isolate bounded BRep display audits
Visualization corpus comparisons should measure drawing generators,
without repeating source validity and trimmed bounding-box analysis.
Add a display-only mode that skips those reference passes and rejects
incompatible quality filters.

Convert generator allocation failures into explicit resource-limit
reports and preserve whether deserialization itself succeeded, allowing
large capped runs to recover without losing the failing object identity.
2026-09-30 18:36:00 -04:00
Clifford Yapp 26652fc080 Make parallel BRep wire output deterministic
Workers previously admitted sampled points to the shared result budget
in completion order.  Near a point or byte limit, scheduler timing chose
different edge subsets and changed bounded results between runs.

Keep sampling parallel but commit results in edge order with checked
budget arithmetic and stop-path wakeups.  Let the caller finish
self-dispatched work if no child launches.  Verify repeated output and
serial-versus-parallel reports are identical.
2026-09-30 18:36:00 -04:00
Clifford Yapp dc6625dc45 Bound BRep wireframe worker address space
Each bu_parallel child reserves a stack and, on glibc, may also reserve
a large sparse malloc arena.  Under RLIMIT_AS those mappings made thread
creation depend on allocation order and left too little space for curve
sampling.

Scale workers to measured process headroom, account for their stacks in
the working budget, and use fixed curve probes for the display tolerance
instead of an allocation-heavy temporary NURBS bounding-box conversion.
2026-09-30 18:36:00 -04:00
Clifford Yapp 1fe49f5fff Reject incomplete OpenNURBS archive imports
Allocation pressure can make an archive read fail with an empty or
partial component manifest.  The importer previously ignored that result
and dereferenced the missing geometry item, turning a bounded resource
failure into SIGSEGV.

Validate every component lookup and catch conversion exceptions.  Leave
the partially initialized internal safe for normal cleanup, and add a
malformed-archive regression for the null-manifest case.
2026-09-30 18:36:00 -04:00
Clifford Yapp dbf732914a Document BRep resource and source identity APIs
Add Doxygen contracts for bounded CDT, curve-tree, surface-tree, and BRNode resource APIs. Clarify that BrepTrimPoint source identities are non-owning and part of the public C++ layout.
2026-09-30 18:36:00 -04:00
Clifford Yapp 99783e89b6 Complete BRep API documentation and source hygiene 2026-09-30 18:36:00 -04:00
Clifford Yapp 2cced67313 Bound BRep and mesh resource paths 2026-09-30 18:36:00 -04:00
Clifford Yapp 09b0760a0d Hide CDT test hooks from public BRep API 2026-09-30 18:36:00 -04:00
Clifford Yapp ca06b99b68 Centralize Manifold mesh certification in libbg
Route BoT checks and OpenVDB repair validation through the public
libbg certification API.  Preserve clockwise BoT handling, remove the
plugin direct dependency, and cover reversed winding and command use.
2026-09-30 18:36:00 -04:00
Clifford Yapp 1d0699a0f2 Name the advanced triangle repair API explicitly
Rename the branch-only numbered entry point to bg_trimesh_repair_ex.
Keep the established repair API as a compatibility-oriented convenience
wrapper while making advanced call sites self-describing.
2026-09-30 18:35:59 -04:00
Clifford Yapp b775ea9c1d Consolidate constrained polygon triangulation APIs
Use one strict and one cleaning entry point with optional interior
constraints.  Remove the experimental poly2tri test API and give
triangulation diagnostics a typed failure reason.
2026-09-30 18:35:59 -04:00
Clifford Yapp c951995a7c Reject empty degenerate repair meshes
Guard local degenerate-neighborhood repair before zero-size mesh
validation or allocation when every triangle belongs to a closed
collapsed island. Add a contract regression and make C17 invalid-input
cases fail normally instead of aborting.
2026-09-30 18:35:59 -04:00
Clifford Yapp 7b5f5198ac Retry only incomplete adaptive B-Rep faces
A coarse display pass can leave a few difficult faces incomplete under
host contention.  The adaptive scheduler estimated every retry as a
full-object refinement pass, so it declined useful work even when only a
handful of faces needed another attempt.

Add an incomplete-only recovery pass at the next finer tolerance before
ordinary refinement.  It skips all accepted faces, accounts retained
output with the existing hard byte and point guards, and checks the
absolute deadline before each remaining face instead of charging the
cost of the whole object.

All five corpus status changes now complete under parallel contention,
including the 13,234-face chess and 2,450-face tire models.  Existing
display geometry is left untouched and the focused 17-test gate passes.
2026-09-30 18:35:59 -04:00
Clifford Yapp ec8be4dc7f Reduce boundary guard cost on large B-Reps
Querying IsLinear on every proxy edge and revisiting every triangle
corner made the boundary-envelope guard consume too much of the display
deadline on models with thousands of faces.  Some initial face jobs then
had no time left to complete.

Treat degree-one spans structurally, sample only their endpoints, and
bound curved sampling to four points per span and 128 per edge.  Measure
the realized box from the compact output point array once rather than
from repeated triangle indices.

This preserves all three recovered corpus extents while restoring the
five large-model status changes.  KF-21 exterior now completes all
13,224 faces in 1.25 seconds instead of leaving two faces incomplete.
2026-09-30 18:35:59 -04:00
Clifford Yapp 0dd8a62358 Guard adaptive meshes with B-Rep boundary coverage
Unsigned area can stabilize while coarse surface sampling aliases an
entire curved extent.  A soft per-face triangle share could then
preserve a small but incomplete display mesh.

Sample the actual B-Rep edge proxy curves once, assemble a boundary
envelope for each face, and measure coverage using only vertices that
participate in output triangles.  Area convergence and soft triangle
limits now stop refinement only after the mesh covers that envelope.
Hard byte, point, and deadline limits remain authoritative.

Report residual incomplete envelopes as explicit approximation
provenance.  This restores the expected extents of all three corpus
regressions while preserving bounded display time and triangle counts.
2026-09-30 18:35:59 -04:00
Clifford Yapp 0a1a59147c Bound exact B-Rep surface cues by remaining time
Assign each optional surface cue a fair share of the remaining draw
deadline. Check it while finding trim tangents and subdividing the
CurveTree, then use the existing bounded untrimmed cue when exact trim
hierarchy construction cannot finish in its share.

Preserve the existing CurveTree and SurfaceTree constructor symbols.
Report time- and memory-driven approximations separately, avoid a false
edge timeout after the worker queue is empty, and let the audit accept a
complete tagged visual approximation while retaining its partial API
code.

The four prior wireframe timeouts now retain every exact edge and finish
all requested items in 2.7 to 4.6 seconds. Their optional approximated
cues remain identified by face for later inspection.
2026-09-30 18:35:59 -04:00
Clifford Yapp c40ef0a244 Adapt display tessellation to topology and time budgets
Generate a complete coarse whole-object mesh before walking toward the
requested tolerance. Give planar faces their requested boundary
tolerance immediately. Stop curved-face refinement after two stable
unsigned-area measurements or when a topology-weighted triangle share
is exhausted.

Reserve measured time for each new pass so optional refinement cannot
displace an already complete display result. Retain authoritative trim
boundaries even when they exceed a soft triangle target. Report coarse,
converged, budget-limited, and deadline-limited outcomes.

Keep rigorous repair fallbacks on their requested-tolerance path.
Expose adaptive controls and provenance through brep-audit and its
corpus driver. This reduces a 596k-triangle spring to 3k triangles in
0.07 seconds and a former 1.18M-triangle timeout to 23k in 0.59 seconds.
2026-09-30 18:35:59 -04:00
Clifford Yapp 705897a21d Budget concurrent B-Rep face tessellation
Reserve shared working memory for fast CDT face jobs according to the
trimmed NURBS control net and trim-span complexity.  The default is
capped at one GiB and one quarter of currently available memory, while
callers may set a lower hard allowance.

Check the deadline only after claiming real work so a worker leaving an
empty queue cannot report a false timeout.  Report the peak reservation
and expose the same working-memory control through brep-audit.

The prior 1.3 GiB corpus failure now completes near 271 MiB RSS.  The
former shaded timeout cases complete without limit flags, leaving only
actual face-generation failures.
2026-09-30 18:35:59 -04:00
Clifford Yapp e5aa5ed6cb Bound collapsed B-Rep face domains
Treat zero-width surface parameter intervals as line or point images
instead of passing them to two-dimensional surface trimming.  This
lets valid degenerate faces retain exact isocurve bounds.

Fall back to the complete supporting surface only when trim-envelope
bounding cannot produce a conservative result.  Focused tests cover
collapsed line, point, and face domains; previously failing corpus
faces now produce finite reference boxes.
2026-09-30 18:35:59 -04:00
Clifford Yapp ddb7c61234 Bound B-Rep display work by geometric significance
Stop trim subdivision when mapped features are below the requested
display tolerance or parameter subdivision cannot make progress.

Translate caller byte budgets into hierarchy work. Preserve exact edges
with a tagged bounded surface-cue fallback, and expose independent audit
controls and provenance.
2026-09-30 18:35:59 -04:00
Clifford Yapp c8772b24af Bound pathological B-Rep display cue trees
Limit optional trimmed surface cue construction so malformed p-curves cannot exhaust process memory. Retain completed edge wireframes when a cue tree exceeds its bounded display budget, while caching periodic shading state in the fast CDT path.
2026-09-30 18:35:59 -04:00
Clifford Yapp 05de8fb214 Retry final B-Rep repair with bounded hole area
Add a final-only candidate area ceiling for bounded open-edge
residues. Keep aggregate B-Rep area and surface-deviation checks
authoritative so larger local caps do not weaken accepted fidelity.
2026-09-30 18:35:59 -04:00
Clifford Yapp 299d8a7533 Validate overlapping mesh repair caps
Reject hole-fill faces that overuse or misorient existing edges and keep only added components that improve mesh topology.  Make non-manifold vertex splitting transactional and close exact touching three- and four-edge boundary cycles before their identity is lost.
2026-09-30 18:35:59 -04:00
Clifford Yapp 4906e40cf9 Bound large whole-display repair fallbacks
Route very large, nearly closed flat hybrids to an authorized display
fallback before generic repair.  Validate tagged whole-display results
against their existing display-mesh witness before constructing costly
trimmed-surface trees; retain coverage, area, solid, and Manifold gates.
2026-09-30 18:35:59 -04:00
Clifford Yapp c760669905 Split closed vertex links before flat removal
Separate disconnected fans while edge incidence is still closed.  Removing
flat triangles first can connect thousands of independent fans through
small holes and turn a topology-only operation into global repair.
2026-09-30 18:35:59 -04:00
Clifford Yapp ccd8e14af8 Skip repair for flat-dominated hybrid meshes
Route edge-closed hybrids whose flat-triangle population exceeds the
bounded local repair envelope directly to an authorized whole-display
fallback.  Preserve local repair for sparse defects and retain all final
solid, Manifold, and fidelity gates.
2026-09-30 18:35:59 -04:00
Clifford Yapp 1dc12d09d9 Repair rigorous degenerate mesh neighborhoods
Permit independently flat, source-attributed rigorous triangles to enter
the bounded local repair.  Traverse only incident edges, preserve directed
boundaries, and split weakly simple circuits into manifold patch fans.
Keep the operation transactional and tag every affected B-Rep face.
2026-09-30 18:35:59 -04:00
Clifford Yapp f47898d038 Certify B-Rep meshes with Manifold importer
Expose a read-only bundled Manifold acceptance check and report its
result from brep-audit.  Native rigorous meshes now avoid repair only
after the primary downstream consumer accepts them.
2026-09-30 18:35:59 -04:00
Clifford Yapp c4d35b7faa Skip disproportionate hybrid hole repair
Run transactional local reconstruction before deciding whether a hybrid
mesh is a viable generic hole-fill candidate. Route edge-closed hybrids
with flat triangles spanning disproportionately many invalid vertex fans
directly to the explicitly requested whole-display fallback.
2026-09-30 18:35:59 -04:00
Clifford Yapp 7c6569277c Accept bounded repaired mesh extent shortfalls
Keep the boundary bbox ratio guard for native and untagged meshes.
For a certified repair, allow a missing endpoint only when its absolute
shortfall is within the same strict or relaxed surface-deviation limit
that accepted the approximation.
2026-09-30 18:35:59 -04:00
Clifford Yapp 7c3f00d38e Bound difficult facets and repair collapsed fallbacks
Add opt-in per-face rigorous deadlines and avoid repeated full
self-intersection scans while tracking refinement progress.

Preserve fast-face provenance, normalize only locally resolvable
roundoff seams transactionally, and reuse degenerate-neighborhood
repair for edge-closed whole-display fallbacks.
2026-09-30 18:35:59 -04:00
Clifford Yapp d2a6e0b821 Make disconnected mesh repair scale linearly
Accumulate component volumes in one triangle pass instead of
rescanning every triangle for each disconnected component.

Use the bounded Steiner fan sooner for large holes when callers
explicitly accept self-intersections.
2026-09-30 18:35:59 -04:00
Clifford Yapp 0163af0684 Bound repair work for pathological hybrid meshes
Route explicitly self-intersection-tolerant holes above the validated
ear limit through the linear Steiner fan.

Preflight disproportionate large hybrid defects before a requested
whole-display fallback, preserving the object repair time budget.
2026-09-30 18:35:59 -04:00
Clifford Yapp 129f2ce3f0 Avoid full mesh rebuilds during crack pairing
Maintain edge incidence incrementally while welding approximate
patch boundaries, and use a spatial endpoint index to avoid scanning
every open-edge pair.

Add a multi-step boundary pairing regression.
2026-09-30 18:35:59 -04:00
Clifford Yapp 797539df2a Retry bounded final mesh repair for large holes 2026-09-30 18:35:59 -04:00
Clifford Yapp c2015d8548 Bound adaptive repair fidelity from chart samples 2026-09-30 18:35:59 -04:00
Clifford Yapp eb00217017 Reduce distant periodic images in constant time 2026-09-30 18:35:59 -04:00
Clifford Yapp a326edde2e Avoid full chart scans in boundary checks 2026-09-30 18:35:59 -04:00
Clifford Yapp 0e4a54d223 Avoid trimmed trees for untrimmed repair checks
Fidelity validation built a full trimmed SurfaceTree for every candidate
face even when the caller explicitly allowed matches to the underlying
untrimmed surface.  Pathological trim trees could dominate repair time.

Use the cached underlying-surface closest-point context directly in that
mode and conservatively tag every such result as untrimmed.  Keep the
trimmed-tree path unchanged when trimmed containment is required.

This reduces the EMBER 91290 repair from more than 180 seconds to about
10 seconds while preserving the manifold, area, deviation, and coverage
gates.
2026-09-30 18:35:59 -04:00
Clifford Yapp a64fce1cab Reconstruct holed periodic B-Rep side faces
A failed periodic side face exposes two winding boundary rings after
its artificial seam is removed. Treating that topology as one disk
misclassifies a rim as a hole and cannot form a manifold patch.

Cut both rigorous rims at a bounded common phase, retain all other
rings as holes, and triangulate a rectangular chart without moving
any shared 3-D vertex. Require exact boundary incidence and the
existing whole-mesh manifold, area, deviation, and coverage gates.

This certifies the FarmBot closed-pullback family as tagged tier-2
approximations when the caller explicitly permits their measured
display-reference area difference.
2026-09-30 18:35:59 -04:00
Clifford Yapp 4b50396d2a Subdivide closed B-Rep edges beyond two vertices
A closed NURBS curve can report linear when coincident endpoints
make its chord test degenerate.  Do not stop at two half-edge
samples, since they cannot form a triangulable boundary loop.

Apply the curved seed subdivision to every closed trim and preserve
the authoritative 3-D edge when one pullback agrees and the other
must be quarantined.
2026-09-30 18:35:59 -04:00
Clifford Yapp ce95c4b427 Admit bounded large-area B-Rep face repairs
A crossed multi-ring fast face can omit most of its intended region,
making it an unreliable local area reference.  Permit exact-boundary
candidates up to five times that area.

The complete mesh must still pass the caller area, deviation,
reverse-coverage, manifold, and solid-validation gates.  This recovers
both failed faces of the SteamController ButtonA solid at an explicit
6 percent whole-object area limit.
2026-09-30 18:35:59 -04:00
Clifford Yapp b764b824a3 Repair overlapping B-Rep face neighborhoods
Permit exact-boundary topology candidates to proceed when their local
area remains within a factor of two, leaving the caller area,
deviation, coverage, and solid gates authoritative.

Quarantine retained source faces that overlap earlier faces with exact,
equally oriented triangles.  Reconstruct the complete affected faces
transactionally with the other failed-face neighborhoods.

Add focused duplicate-quarantine coverage and more specific topology
repair diagnostics.
2026-09-30 18:35:59 -04:00
Clifford Yapp 87ca7a7f80 Reconstruct multiple failed B-Rep faces transactionally
Treat edges used only by one face as internal chart seams rather than
shared shell boundaries. Rebuild independent failed faces in a
dependency-aware transaction while deferring defects owned by pending
faces; require the final assembled mesh to pass all solid checks.
2026-09-30 18:35:59 -04:00
Clifford Yapp 9651eb0601 Merge numerically identical B-Rep chart samples
Detect collisions after the same conditioning used by detria. Merge
only samples with matching mesh identity or compatible topology and
sub-tolerance 3-D positions, then normalize affected constraints.
2026-09-30 18:35:59 -04:00
Clifford Yapp b81cf5303b Cancel exact retraced polygon whiskers
Weakly-simple trim loops may contain an exact A-B-A retrace that does
not change their filled region.  Cancel these zero-area whiskers after
coordinate deduplication so detria receives a simple ring.

Add a clean triangulation regression with a retraced hole boundary.
2026-09-30 18:35:59 -04:00
Clifford Yapp 20e68cc8ad Repair independent failed B-Rep faces transactionally
Track every fallback triangle's source face and prove each failed
face's complete sampled boundary against the retained rigorous mesh.
Rebuild nonadjacent faces one at a time, remapping later boundaries
after mesh compaction, but commit only when the final assembly is
manifold.

Reject inferred topology whose local area differs by more than one
percent from the available face approximation.
2026-09-30 18:35:59 -04:00
Clifford Yapp a7a4175636 Repair toleranced closed cylinder chart paths
Rebuild a closed edge periodic embedding from its exact 3D samples
when imported p-curves collapse or overshoot an endpoint.  Keep every
shared spatial sample unchanged and bound all chart movement by the
declared edge tolerance.
2026-09-30 18:35:59 -04:00
Clifford Yapp 7f3091de7b Broaden authoritative B-Rep disk recovery
Allow one-loop faces with complete shared-edge samples to use the
tagged topological-disk approximation after face or chart construction
failures.  Keep refinement and later failures on their existing paths.
2026-09-30 18:35:59 -04:00
Clifford Yapp a97c4f0d6e Reject malformed local B-Rep repair charts
Preserve CDT point identity when assembling repaired faces.
Reject cleaned charts whose open edges do not match a topology-defined
boundary, allowing the authoritative disk fallback to close the face.
2026-09-30 18:35:59 -04:00
Clifford Yapp 5a2ce89967 Normalize closed repair mesh topology
Synchronize inconsistent triangle winding before broader repair. When
Manifold accepts a candidate that libbg still rejects, round-trip its
topology and retain the result only after libbg certifies it.

Report both operations and cover winding-only repair with a regression.
2026-09-30 18:35:59 -04:00
Clifford Yapp 50009e543f Add bounded B-Rep geometry lint checks
Detect trim/edge disagreement, collapsed singular boundaries,
oversized stored tolerances, and sampled trim-loop crossings.
Bound work and JSON detail reporting, and cover tolerance-masked
geometry with a focused regression.
2026-09-30 18:35:59 -04:00
Clifford Yapp 941d8a61da Repair local B-Rep defects with tagged fidelity
Grow failed-face repair regions through approximate edge stars while
preserving rigorous boundaries and requiring a valid final solid.

Add an opt-in relaxed fidelity tier for already-Manifold repairs, with
face and edge provenance plus corpus audit controls.
2026-09-30 18:35:59 -04:00
Clifford Yapp 5bcf5ab9c3 Recover meshes past inconsistent shared edges 2026-09-30 18:35:59 -04:00
Clifford Yapp 5c646a2007 Contain rigorous tessellation allocation failures 2026-09-30 18:35:59 -04:00
Clifford Yapp a3b9639a27 Rebuild holed B-Rep faces from exact boundary rings
Recover all closed rings exposed by the retained rigorous mesh.

Use source, cleaned, inferred, and planar charts in bounded order.

Keep exact shared vertices and gate inferred topology by area.

Cover planar holes and twisted projections with focused tests.
2026-09-30 18:35:59 -04:00
Clifford Yapp c30ad5b0fb Rebuild failed B-Rep faces from rigorous boundaries
Discard broken single-face fallback meshes when retained neighbors
expose an exact closed boundary. Span that boundary without moving
certified vertices, then retain the existing fidelity and manifold
gates.

Add local neighborhood diagnostics and contracts for boundary identity
pairing and reconstruction.
2026-09-30 18:35:59 -04:00
Clifford Yapp 9992cda8f2 Preserve topology in local B-Rep repair
Track caller identities through constrained fast-face samples so
locally reconstructed boundaries join rigorous face vertices without
coordinate welding.

Interpret explicit seams on closed revolution surfaces with a bounded
synthetic strip, and split edge-closed pinched vertex fans before
geometric repair. Add focused contracts for both paths.
2026-09-30 18:35:59 -04:00
Clifford Yapp e28afd0185 Stitch reconstructed faces by CDT identity
Preserve authoritative shared-point identities when inserting local
patches. Reject nonorientable periodic correspondences and retry the
opposite traversal without changing its geometric phase.
2026-09-30 18:35:59 -04:00
Clifford Yapp 510eb27926 Propagate mesh winding by face adjacency
Solve orientation parity across every manifold edge and reject
contradictory nonorientable cycles. Preserve indexed solids that
Manifold already accepts without coordinate welding.
2026-09-30 18:35:59 -04:00
Clifford Yapp a5cd853e45 Span failed disk faces from shared boundaries
Preserve authoritative edge samples and span only a failed disk face.

Report its source topology and exercise unusable projected pullbacks.
2026-09-30 18:35:59 -04:00
Clifford Yapp fab9b4fe90 Lift revolution cylinder paths across chart cuts
Recognize the angular parameter of revolution-cylinder surfaces.

Use existing periodic ring lifting to remove false boundary chords.

Retain native samples and topology throughout the chart repair.
2026-09-30 18:35:59 -04:00
Clifford Yapp bcfe64e959 Refine accidental cross-face chords
Independent face CDTs can select the same interior chord between shared
B-Rep boundary samples. In a thin solid this gives the chord four
incident triangles and invalidates its endpoint links.

Detect only multi-face chords with more than two incident triangles and
split that exact chord on one source surface. Preserve authoritative
B-Rep boundaries and use the existing assembly refinement limits.

Add focused classification coverage. Mirage now certifies natively,
while Volvo passes explicit self-intersection-tolerant repair as a
closed manifold.
2026-09-30 18:35:59 -04:00
Clifford Yapp 8369bb7ef2 Repair sparse holes across periodic charts
Allow the bounded local repair chart to move an artificial cut to a
nearby exact boundary sample. Keep native surface sampling coherent
when a point has more than one periodic chart image.
2026-09-30 18:35:59 -04:00
Clifford Yapp 38f18e1acf Validate local repairs against constrained inputs
Permit small topology repairs to use their explicitly enabled local
mesh as a final fidelity reference after source-surface projection fails.
Retain the area and reverse-coverage gates.

Strengthen the constrained fallback contract to require a certified
Manifold solid and approximation provenance.
2026-09-30 18:35:59 -04:00
Clifford Yapp 5c6b86db6a Reconstruct malformed cylindrical seam strips
Recognize non-closed analytic cylinders with paired seam topology.
Join exact constrained isocircle samples in a synthetic local chart and
verify the patch against the cylinder.

Add a focused contract and retain face and edge approximation
provenance.
2026-09-30 18:35:59 -04:00
Clifford Yapp 5fa9c8cb6b Check constrained fallback against its source face
Use recorded face provenance to test constrained fallback triangles
against their source surface before searching the entire B-Rep.

Keep the global surface search as a fallback when the local match fails.
2026-09-30 18:35:59 -04:00
Clifford Yapp 28d0941e3d Open multiple holes across periodic seams
Process disjoint seam-crossing holes one at a time and splice each
exact boundary arc into its remaining artificial seam interval.

Use an existing edge sample as the chart cut when adaptive sampling
straddles the cut, without changing its authoritative 3-D point.

Add a focused two-hole cylinder regression.
2026-09-30 18:35:59 -04:00
Clifford Yapp 180dae1bad Reconstruct constrained spherical hemispheres
Join authoritative spherical edge samples across zero-length singular
trims without using the failed parameter chart.

Use exact great-circle loop orientation to select a hemisphere while
preserving every physical boundary point and recording its provenance.

Add a focused chart-free hemisphere regression.
2026-09-30 18:35:59 -04:00
Clifford Yapp bc1da81a02 Reconstruct pole-boundary spherical patches
Detect when an imported singular pole is duplicated on the physical
spherical boundary.

Use the exact boundary's oriented spherical area as an interior
direction, preserve axial boundary samples, and omit their undefined
longitude from the phase certificate.

Keep shared points unchanged and add a focused hemisphere regression.
2026-09-30 18:35:59 -04:00
Clifford Yapp c47c0fcf0c Open seam-coincident periodic holes
Recognize a contiguous hole boundary run on the artificial cut.

Splice its exact samples into the low chart side.

Move the complementary arc to the matching high side.

Preserve legacy two-point cut crossings.

Add a sampled-run triangulation and provenance regression.
2026-09-30 18:35:59 -04:00
Clifford Yapp ba1deee51b Reconstruct closed spheres across malformed seams
Recognize a closed spherical face with exactly one self-mated seam.

Replace that isolated face with two analytic caps.

Make both caps share an exact equator and preserve orientation.

Bound chord deviation and record the original face and seam edge.

Add full-mesh and topology-gate regressions.
2026-09-30 18:35:59 -04:00
Clifford Yapp 18297705b1 Triangulate unsampled spherical lunes
Accept two-pole sphere charts with a nonzero-area boundary.

Interior meridian samples are not required for a physical lune.

Continue to reject unpaired zero-area periodic cuts.

Add focused lune coverage without interior points.
2026-09-30 18:35:59 -04:00
Clifford Yapp 3d43ed4a01 Reconstruct pole-selected spherical patches
Recognize spherical rings with an artificial pole excursion.

Use the singular vertex to select the retained pole.

Preserve exact shared boundary samples and source provenance.

Reject malformed topology, phase reversals, and excess deviation.

Add a nonplanar pole-selected spherical patch regression.
2026-09-30 18:35:59 -04:00
Clifford Yapp 0832835dd2 Reconstruct malformed torus seam strips
Recognize imported torus faces whose paired seam trims define a strip
even when their NURBS surfaces do not advertise a closed direction.
Keep exact shared boundary samples and replace unreliable p-curve
coordinates with analytic torus angles.

Refine bounded rows until their measured chord error meets the repair
tolerance, preserve face and edge provenance, and reject ambiguous or
non-toroidal seam topology.

Exercise both major- and minor-isocircle strip orientations.
2026-09-30 18:35:59 -04:00
Clifford Yapp 8b7ec4660e Reconstruct constrained spherical cap faces
Keep exact shared boundary samples when a seam-only spherical face has
one fully constrained inner ring. Select the complementary cap from
the ring plane and sample bounded concentric rows on the source sphere.

Reject ambiguous or non-spherical inputs, measure every generated chord,
honor point and time limits, and retain existing face and edge
provenance.

Add a synthetic oblique spherical-cap regression.
2026-09-30 18:35:59 -04:00
Clifford Yapp 5f8b6442e5 Refine constrained periodic repair strips
Keep rigorous boundary samples fixed while adding bounded rows sampled
from the failed source surface. This avoids planar projection and
preserves exact neighboring-face incidence.

Measure every generated chord against its source parameters, stop at
configured work and time limits, and retain face and edge provenance
through the existing local repair tier.

Add a curved periodic strip regression and keep the boundary-only and
doubly periodic contracts.
2026-09-30 18:35:59 -04:00
Clifford Yapp c8fe72112c Open periodic chart holes across generic seams
Generalize the cylinder seam-hole transformation to periodic metric
charts. Split one hole at its seam samples and splice its arcs into
the two artificial outline sides while retaining native topology.

Add a toroidal metric-chart regression for the crossing-seam case.
2026-09-30 18:35:59 -04:00
Clifford Yapp 1fdb871c24 Reconstruct seam-only doubly periodic faces
Build a wrapped adaptive grid when a failed face covers a doubly
periodic surface and every explicit trim is a seam. Verify both
closures and source-surface deviation before admitting the result.

Preserve direct fidelity evidence and face/edge approximation
provenance through the existing repair report.
2026-09-30 18:35:59 -04:00
Clifford Yapp 139d94a231 Join segmented edge loops in periodic face repair
Assemble consecutive authoritative edge samples into closed boundary
rings before constructing a periodic repair strip.  This handles local
neighborhoods where one logical ring is represented by several B-Rep
edges while retaining every shared sample exactly.
2026-09-30 18:35:59 -04:00
Clifford Yapp 428ed6bf80 Reconstruct failed periodic faces from rigorous boundaries
Join two authoritative closed edge loops with a sparse local strip when
the intervening periodic face cannot be triangulated reliably.  Preserve
all shared boundary samples, support unequal loop densities, and report
the approximation and its source provenance separately.
2026-09-30 18:35:59 -04:00
Clifford Yapp 9c8ef43526 Defer empty mesh rejection until repair fallbacks
Let bounded best-effort, local chart, and constrained face recovery
supply repair geometry when no rigorous face completed.  Reject empty
input and enforce the automatic repair size limit only after enabled
local fallbacks have run.
2026-09-30 18:35:59 -04:00
Clifford Yapp b07c88e870 Retain bounded best-effort face meshes during repair
Use intersection-free stage-10 face meshes as explicitly approximate
repair input when their remaining folds are sparse.  Preserve the
certified prefix and report source faces, edges, folds, and fidelity.
2026-09-30 18:35:59 -04:00
Clifford Yapp 690911f337 Recover paired polar seams on faces with holes
Permit paired periodic seam recovery when unrelated inner loops are
present.  Refine polar chart cells that collapse only after their seam
copies are joined in model space.
2026-09-30 18:35:59 -04:00
Clifford Yapp 15b92dbb16 Report topology when Manifold rejects mesh repair
Classify unmatched, excess, misoriented, and invalid vertex-link
defects before returning from a failed Manifold postcondition.  This
keeps failed repair reports useful for selecting bounded follow-up work.
2026-09-30 18:35:59 -04:00
Clifford Yapp 4d82a3130d Recover bounded disagreements between B-Rep p-curves
Keep normal tessellation strict.  During explicit mesh repair, retry
edge initialization only when the midpoint shared by two disagreeing
p-curves remains within the requested fidelity bound of both faces and
the native edge curve.

Record affected edges, incident faces, and maximum discrepancy in
repair provenance and audit output.
2026-09-30 18:35:58 -04:00
Clifford Yapp 73e18a0083 Permit bounded local replacement of rigorous mesh patches
Allow mesh repair to replace only connected rigorous triangle
neighborhoods bounded by the explicit hole area and edge limits.

Require final solid and Manifold validation, area and surface deviation
checks, plus exhaustive coverage samples over every replaced triangle.
Report affected topology and replacement size as approximation
provenance.
2026-09-30 18:35:58 -04:00
Clifford Yapp 34df58327e Recognize bounded rigorous triangle subdivisions
Accept repair-created edge splits only when two output triangles
retain all original corners and their shared point lies within a tightly
bounded original chord.

Track affected B-Rep faces and expose the subdivision count in repair
reports. Actual rigorous geometry loss remains rejected.
2026-09-30 18:35:58 -04:00
Clifford Yapp 20faab5d64 Bound local B-Rep repair by edge tolerances
Allow approximate face refinement to retain residual discrepancies
only when source and mesh samples lie inside one incident edge
tolerance, capped relative to the requested tessellation tolerance.

Add focused coverage for the bounded tube rule and recover the
Smoke Box twins while preserving all rigorous triangles.
2026-09-30 18:35:58 -04:00
Clifford Yapp 0f893e1923 Reconstruct bounded local B-Rep surface patches
Allow repair to normalize weakly-simple failed-face charts only when
omitted retraces remain within declared B-Rep edge tolerances. Preserve
rigorous neighboring triangles and constrain reconstructed boundaries.

Validate local approximations against their underlying source surfaces,
retain face and edge provenance, and keep ordinary tessellation
fail-closed. Add an opt-in Engine Truck corpus regression.
2026-09-30 18:35:58 -04:00
Clifford Yapp aec310d6c7 Track provenance of local B-Rep repairs
Preserve every certified rigorous triangle during local repair and use
ordered full-domain trim samples for constrained fallback faces. Report
the original faces, edges, and approximation tier needed by accepted
meshes so conversion callers can attach provenance attributes.
2026-09-30 18:35:58 -04:00
Clifford Yapp 183bc2ef89 Close articulation holes before mesh splitting 2026-09-30 18:35:58 -04:00
Clifford Yapp 9b1763fb0d Preserve rigorous regions during B-Rep repair
Constrain fast fallback faces to rigorous edge subdivision.

Try relaxed rigorous tessellation for safe invalid B-Reps.

Report patch provenance and compact repair output.

Preserve NIST 6's native pole-seam result with a full-solid test.
2026-09-30 18:35:58 -04:00
Clifford Yapp f13c8c031f Add Manifold-targeted B-Rep mesh repair
Allow explicitly requested repairs to retain self-intersecting caps
while preserving topology, area, and bidirectional fidelity gates.

Add optional Manifold import certification and corpus audit controls.
Make duplicate-fan separation collision aware.
2026-09-30 18:35:58 -04:00
Clifford Yapp 64aa3efe26 Sample B-Rep edges for audit boundary extents
GetTightBoundingBox can retain distant NURBS control hull extents and
make correct meshes look undersized. Sample each proxy-curve span for
the boundary reference while retaining face bounds as the upper guard.

This clears 11 false failures while preserving closed-solid checks.
2026-09-30 18:35:58 -04:00
Clifford Yapp d6b6a7af8b Bound non-manifold vertex fan walks
Malformed facet adjacency can contain a directed cycle that does not
return to the starting face. Stop forward and backward fan walks when
they revisit a corner, preventing unbounded mesh repair.

Add a synthetic cyclic-adjacency regression.
2026-09-30 18:35:58 -04:00
Clifford Yapp 43332ce62e Use face surfaces for untrimmed tree estimates
Surface trees may omit their CurveTree when a face has no usable trim
boundary. Pass the owning face surface through closest-point queries
so invalid B-Reps cannot dereference missing trimming topology.

Cover the no-loop face case in the CDT contract.
2026-09-30 18:35:58 -04:00
Clifford Yapp cb32db1da4 Prefer local mesh repair before Poisson
Try bounded whole-display mesh repair before automatic Poisson
reconstruction. Use the tessellation minimum scale for seam welding and
repeat only defect-reducing welds before the next hole-fill pass.

Cap that opportunistic pass at 8192 triangles while leaving explicit
large local repairs available to callers.

Keep explicit Poisson scales as direct reconstruction requests and cover
both paths in the repair contract.
2026-09-30 18:35:58 -04:00
Clifford Yapp 36b876d111 Skip discarded rigorous repair refinement 2026-09-30 18:35:58 -04:00
Clifford Yapp 75be69c6a1 Preserve certified Poisson meshes during repair 2026-09-30 18:35:58 -04:00
Clifford Yapp 93276909a7 Add bounded Poisson closure fallback 2026-09-30 18:35:58 -04:00
Clifford Yapp 7a0882a220 Honor Screened Poisson boundary conditions 2026-09-30 18:35:58 -04:00
Clifford Yapp ae0e8ea47b Retry Poisson repairs after reference area failures 2026-09-30 18:35:58 -04:00
Clifford Yapp c15d780d96 Accept certified repairs with partial reference bounds
Invalid B-Reps can have individual trimmed-face bounding-box failures
while aggregate face and edge bounds remain usable. Once mesh repair
passes solid and bidirectional fidelity certification, retain the failed
face indices as diagnostics without overriding the successful result.
2026-09-30 18:35:58 -04:00
Clifford Yapp e4b3facbe9 Filter corpus selections by B-Rep validity
Add input-valid and input-invalid selection classes so repair surveys
can target the B-Rep validity flag independently of closed-solid
quality eligibility. Keep the existing valid and invalid filters
unchanged.
2026-09-30 18:35:58 -04:00
Clifford Yapp 5c80cc49e0 Measure repaired area against the B-Rep reference
When a display reference is available, enforce the configured area
change limit against that retained B-Rep tessellation instead of the
defective intermediate Poisson mesh. Preserve the intermediate-area
metric for diagnostics.

Forward deviation, reverse coverage, solid, and intersection checks
remain unchanged.
2026-09-30 18:35:58 -04:00
Clifford Yapp 75c4301477 Add bounded Steiner hole repair
When boundary-only triangulation cannot avoid surrounding geometry, try
one centroid fan and a fixed sequence of normal offsets capped at one
percent of the hole scale. Validate every candidate against existing
and accepted triangles, and roll back failed points and faces.

Retain final manifold, intersection, area, and fidelity gates. Cover
the offset retry with an oriented solid regression.
2026-09-30 18:35:58 -04:00
Clifford Yapp 428a9cdac4 Improve bounded mesh hole triangulation
Preserve concave planar outlines with a strict planar projection before
using LSCM. Gate bounded 3-D ear candidates against the existing mesh
and accepted cap triangles so an obstructed diagonal can be avoided.

Correct direct-ear winding to match the hole boundary. Add regressions
for concave caps and alternate valid diagonals.
2026-09-30 18:35:58 -04:00
Clifford Yapp 4af5726d4f Use paired p-curves when edge curves are corrupt
Fall back to matching trim midpoints when an imported edge curve cannot
produce usable pullback parameters. Require both surface evaluations to
agree within the declared edge tolerance before substituting their
shared point.

Report the exact edge that prevents initialization and cover the
fallback with a corrupt-edge contract.
2026-09-30 18:35:58 -04:00
Clifford Yapp d93271312f Use B-Rep surface normals for Poisson repair
Feed normalized Fast-CDT corner normals into reconstruction.

Do not infer orientation from face-local triangle winding.

Interpolate normals with area samples on curved surfaces.
2026-09-30 18:35:58 -04:00
Clifford Yapp 07e26730c1 Separate touching mesh components inward
Move duplicate-coordinate fans against their outward normals so tangent
shells separate instead of intersecting.  Report wider-search distances
and source faces for failed B-Rep repair samples.
2026-09-30 18:35:58 -04:00
Clifford Yapp 6d97c5bbb5 Retry Poisson repair with area-weighted samples
Keep centroid sampling as the primary reconstruction.

After both domain scales fail input coverage, retry with one bounded

area-weighted sample budget to preserve undersampled thin faces.

Report failed coverage distances, source faces, and reference area.
2026-09-30 18:35:58 -04:00
Clifford Yapp 34b4d2d60e Preserve disconnected solids in Poisson repair
Track display triangles by B-Rep face and reconstruct each closed

face component independently.

Bound component work and retain global reconstruction when invalid

topology cannot identify reliable closed components.
2026-09-30 18:35:58 -04:00
Clifford Yapp 62f1b14233 Honor configured Poisson point weights
Validate the public SPSR point weight and pass it to the solver so the documented option is no longer ignored.
2026-09-30 18:35:58 -04:00
Clifford Yapp 3f99e5a390 Strengthen bounded mesh repair certification
Retain safe hole caps when another independent cap intersects the mesh,
and report the residual topology that prevents a solid result.

Preserve the display mesh across Poisson reconstruction and require
bounded source-to-output coverage in addition to output deviation. Add
a fixed-scale audit option for controlled reconstruction experiments.
2026-09-30 18:35:58 -04:00
Clifford Yapp 4cf8291866 Retry Poisson repair with bounded domain padding
Honor the public SPSR scale option and preserve its prior effective
1.1 default.

Let B-Rep repair retry at scale 1.2 when a scale 1.1 reconstruction
cannot pass the existing solid and fidelity certificate.
2026-09-30 18:35:58 -04:00
Clifford Yapp 86b970ea35 Use display meshes as repair deviation references
Use the whole fast tessellation as a secondary distance reference when

direct B-Rep projection fails during explicit reconstruction.
2026-09-30 18:35:58 -04:00
Clifford Yapp b5376cc87c Reject intersecting mesh repair caps
Detect intersections introduced by each hole-fill pass with an R-tree.

Retry the 3-D ear triangulation and retain the open boundary when

neither patch is safe.
2026-09-30 18:35:58 -04:00
Clifford Yapp a9a239a5ad Allow repair fallback without rigorous face meshes
Reject empty mesh exports without zero-byte allocations.

When the explicit whole-B-Rep fallback is enabled, continue to the

display mesh if no usable rigorous mesh can be assembled.
2026-09-30 18:35:58 -04:00
Clifford Yapp f3166082f0 Apply audit resource bounds to repair fallback
Forward the audit point, result-size, and time limits to fast mesh
generation used by the repair path.
2026-09-30 18:35:58 -04:00
Clifford Yapp 2e66cb2dd8 Add filtered B-Rep repair corpus surveys
Allow brep-audit batch processes to restrict work to object names from
a file and express deviation policy relative to each trimmed boundary.

Teach the corpus runner to select prior JSONL failures, preserve one
process per database, and forward bounded repair and reconstruction
controls.
2026-09-30 18:35:58 -04:00
Clifford Yapp f1a16f34ce Add certified Poisson B-Rep repair fallback
Add an explicit whole-display-mesh reconstruction tier for cases where
rigorous CDT and conservative mesh repair cannot produce a solid.

Bound input, output, and depth; retain final manifold, intersection,
area, and sampled B-Rep deviation checks. Export certified meshes from
invalid B-Reps and report reconstruction provenance through brep-audit.
2026-09-30 18:35:58 -04:00
Clifford Yapp fde87ca24e Strengthen triangle repair and Poisson safety
Separate disconnected point-contact fans within a bounded tolerance.
Normalize Manifold union output and reject remaining degenerate faces.

Validate Screened Poisson inputs and outputs, serialize calls around its
global worker state, and honor explicit serial reconstruction requests.
2026-09-30 18:35:58 -04:00
Clifford Yapp 8be6fae2ff Improve B-Rep tessellation and repair recovery
Normalize periodic and singular charts, bound edge subdivision, and repair
sub-tolerance topology defects before CDT. Add an explicit post-CDT repair
fallback with rigorous manifold, intersection, area, and sampled B-Rep
deviation gates, plus brep-audit reporting and contract coverage.
2026-09-30 18:35:58 -04:00
Clifford Yapp 3b23ae1cf1 Extend triangle mesh repair for B-Rep recovery
Handle collinear hole boundaries and hanging boundary vertices. Add an
opt-in Manifold union for overlapping closed components, preserving its
exact merge topology, and cover the new paths with focused tests.
2026-09-30 18:35:58 -04:00
Clifford Yapp 942956127e Add conservative triangle mesh repair API
Expose explicit controls for component removal and hole filling.
Require solid output and report repair changes and mesh measures.
Keep the legacy repair interface behavior through a compatibility wrapper.
2026-09-30 18:35:58 -04:00
Clifford Yapp 0f22dd800c Preserve constraints through polygon cleanup
Track Clipper's filled-component hierarchy and triangulate each outline
with only its direct holes.  Retain certified noncrossing interior
constraints after coordinate cleanup, and cover touching and overlapping
holes plus an interior constraint in the regression.
2026-09-30 18:35:58 -04:00
Clifford Yapp f153244934 Split shared B-Rep edges at surface poles
Locate analytic surface poles on shared master curves before ordinary
edge subdivision.  Reuse the authoritative pole point and decompose
repeated-pole boundaries into chart disks so adjacent faces remain
watertight.
2026-09-30 18:35:58 -04:00
Clifford Yapp 9083367e5e Repair false cone seam closures
Lift one pole branch to an equivalent periodic image when a seam-copy
edge crosses the real boundary. Merge the coincident seam endpoints
only after the candidate chart proves simple.
2026-09-30 18:35:58 -04:00
Clifford Yapp 7ba91791ef Release CDT state before audit metrics
Discard face-local tessellation state once mesh export succeeds so
large corpus audits do not retain it beside independent topology data.
2026-09-30 18:35:58 -04:00
Clifford Yapp 19f4a3b12e Compact large CDT mesh assembly
Use dense and hashed point indexes during export. Discover mesh
components with packed edge sorting and union-find instead of per-edge
trees and neighbor vectors.
2026-09-30 18:35:58 -04:00
Clifford Yapp 70944341d7 Embed planar CDT charts from master curves
Project authoritative 3-D boundary samples into planar charts so
tolerance-separated STEP curves cannot overlap through imperfect UV
pullbacks.
2026-09-30 18:35:58 -04:00
Clifford Yapp e2db4288d8 Compact and cache certified B-Rep CDT meshes
Reduce shared-boundary bookkeeping overhead with compact hash maps
and drop unused normal provenance.

Retain certified exports and reconstruct optional normals on demand.
This avoids repeating million-triangle orientation and validation.
2026-09-30 18:35:58 -04:00
Clifford Yapp 3ffd1568a8 Repair incomplete corpus logs on resume
Trim only an invalid trailing JSONL record before computing batch
resume positions. Preserve a complete final record by restoring its
missing newline.
2026-09-30 18:35:58 -04:00
Clifford Yapp af1e161565 Index CDT polygon intersection candidates
Use an RTree broad phase to avoid quadratic projected boundary
segment comparisons while preserving the existing OpenNURBS
predicates and pair order.

Cover the high-edge-count path with a focused regression.
2026-09-30 18:35:58 -04:00
Clifford Yapp 0570937347 Require progress for shared edge splits
Reject subdivisions whose master point or either pullback cannot
advance beyond both child endpoints.

This prevents invalid edge mappings from inserting the same boundary
coordinate repeatedly, and retires stalled proximity refinements.
2026-09-30 18:35:58 -04:00
Clifford Yapp e8b2994111 Refine nearby shared edges for assembled CDT
Cross-face intersections may come from a coarse shared boundary even
when the reported triangles are one element inward.

Refine the authoritative shared edge within the local chord sag
scale, and leave remote intersections to interior recovery.
2026-09-30 18:35:58 -04:00
Clifford Yapp b2d927fcbe Tighten shared edge orientation refinement
Limit shared B-Rep segments to 22.5 degrees of adjacent surface
normal change even when no normal tolerance is requested. This keeps
coarse boundary chords from forcing folded triangles on narrow curved
bands.
2026-09-30 18:35:58 -04:00
Clifford Yapp 3579b9757a Preserve periodic chart boundary images
Do not reconstruct a full ring through its synthetic closing
point. This avoids replacing the opening seam image and creating a
period-long boundary constraint.

Clamp periodic offsets at domain bounds before wrapping so roundoff
cannot move polar seam samples to the opposite side.
2026-09-30 18:35:58 -04:00
Clifford Yapp 8d5141e37b Orient spherical cap seams from boundary continuity
Apply the existing pole-wedge seam-run continuity rule to periodic
spherical caps as well as cones. This avoids forcing native parameter
bounds onto the wrong chart side when a closed trim winds oppositely.

Add direct regressions for both boundary winding directions.
2026-09-30 18:35:58 -04:00
Clifford Yapp 55fb4bb908 Harden topology-aware B-Rep CDT recovery
Recover analytic cone, polar, and cylinder charts while preserving
source boundary identities. Retain only proven mesh components, honor
finite edge tolerances for bounded collapse, and normalize
weakly-simple developable charts behind exact topology checks.

Add focused regressions for each corpus-derived failure class.
2026-09-30 18:35:58 -04:00
Clifford Yapp 090b219a5a Partition disconnected CDT face charts
Build an even-odd containment forest for valid faces with disjoint or
nested boundary islands. Triangulate each filled disk independently and
merge it through the existing face-atlas identity and validation path.

Share atlas installation with cone charts and add focused coverage for
disconnected loops and hole-within-hole topology.
2026-09-30 18:35:58 -04:00
Clifford Yapp 97d972177d Repair inverted CDT chart nesting
Treat metric UV and unrolled cylinder charts as planar embeddings when mutual containment proves that an imported outer and hole are swapped.

Add focused curved-surface and cylinder regressions.
2026-09-30 18:35:58 -04:00
Clifford Yapp 246c2ed6c0 Refine periodic chart cells before seam stitching
Distinct chart triangles can collapse to the same three model vertices
when periodic seam copies are canonicalized.  Detect these quotient
collisions, seed each chart cell with an authoritative surface sample,
and retriangulate under existing point and attempt bounds before
geometric repair.

Cover the collision with matched cone seam samples.
2026-09-30 18:35:58 -04:00
Clifford Yapp fb8c715e83 Place analytic cone seams on native sides
Treat native periodic bounds as authoritative for cone seam copies.
Analytic closest-point projection may otherwise place both copies in the
same periodic image and create duplicate chart constraints.

Cover matching topology and non-topology seam samples in the cone chart
regression.
2026-09-30 18:35:58 -04:00
Clifford Yapp c24f37370f Include source UV in CDT failure dumps
Record the closed surface domain and each source point's native UV in
standalone constrained triangulation reproducers.  This makes periodic
image and seam-side mistakes diagnosable without reopening the database.
2026-09-30 18:35:58 -04:00
Clifford Yapp 6ed2a69a06 Recover weakly-simple planar face loops
Use the Clipper-based sanitizer only after strict CDT rejects an
ordinary planar chart.  Map every cleaned point back to an original
chart vertex and require the output triangle boundary to match every
original nonzero B-Rep constraint exactly.

Reject new points, missing samples, altered edges, periodic charts, and
charts with auxiliary constraints.  This preserves shared-edge identity
while allowing repeated topology vertices to be normalized.

Add a touching-hole regression.  The BUG light pipe and angle widget
now certify as closed solids without incidence, link, or area defects.
2026-09-30 18:35:58 -04:00
Clifford Yapp 21b32b0f69 Separate toleranced B-Rep endpoint samples
Some valid imports retain distinct master-edge samples whose p-curves
round to the same surface coordinate near a trim endpoint.  Redistribute
only non-topological samples along the existing chart chord when the
collapsed 3-D residual fits the effective edge tolerance.

Keep native UV and shared 3-D points authoritative, protect periodic,
singular, closed-surface, and topology vertices, and retain the
scale-aware modeling tolerance guard.

Add a focused regression and make Rocket 21D_v4 certify as a closed
mesh.
2026-09-30 18:35:58 -04:00
Clifford Yapp c13ae304f4 Report strict chart conflicts precisely
Identify duplicate chart coordinates, reused ring vertices, and
duplicate or intersecting constraints in strict PSLG diagnostics.

Include chart and source-point provenance in opt-in CDT failure
dumps so corpus failures can be diagnosed independently.
2026-09-30 18:35:58 -04:00
Clifford Yapp 5ce858cb7a Bound heuristic B-Rep edge refinement
Batch close-edge RTree updates by rebuilding each affected face once
per round. Avoid maintaining the unused 3-D index before finalization
and remove full-tree count diagnostics from the hot removal path.

Floor shape-only proximity and neighboring-curve refinement by the
requested minimum spacing and a per-source-curve subdivision scale.
Geometric curve and chord tolerance passes remain authoritative.
2026-09-30 18:35:58 -04:00
Clifford Yapp 3ce0e865c0 Release filtered CDT surface samples
Delete owned UV candidates when polygon and trim-edge filters
reject them. Previously those pointers were erased from their owning
sets and escaped the cdt_surf_info destructor.

Keep deletion opt-in at the generic polygon helper. Enable it only at
surface sampler call sites that pass owned candidates.
2026-09-30 18:35:58 -04:00
Clifford Yapp 80df3d1f98 Bound linear B-Rep edge subdivision
Floor inherited straight-edge spacing at the global and edge-local
requested resolution.  Stop when floating-point edge parameters have no
representable interior value, accepting only residuals covered by the
source edge tolerance.

Cap edge subdivision with actionable diagnostics.  This prevents the
FarmBot LED and Motor cable solids from exhausting memory while exposing
their later geometry failures.
2026-09-30 18:35:58 -04:00
Clifford Yapp e40e65b12c Collapse sub-tolerance B-Rep edges safely
Collapse only explicit edges whose full curve and bounded component fit
within the effective modeling tolerance.  Weld derived mesh state across
incident faces while retaining periodic seam provenance.

Add scale, transitivity, curve-shape, and ring regressions.  This lets
the Intermediate Nut twins produce certified closed meshes without
altering the source B-Rep.
2026-09-30 18:35:58 -04:00
Clifford Yapp 339a9f40f0 Lift seamless cylinder charts continuously
Unwrap each no-seam boundary ring through adjacent periodic images.
This prevents arbitrary analytic cuts from turning short boundary paths
into circumference-long constraint chords.

Reject nonzero winding that needs a real atlas cut, align holes and
interior samples with the lifted outline, and add a focused regression.
2026-09-30 18:35:58 -04:00
Clifford Yapp f10919d8a7 Repair periodic chart paths at native seams
Treat native periodic-domain bounds as authoritative seam copies even
when analytic surface fitting offsets their projected angle.

Normalize full-circle endpoints and propagate a single side along seam
trims. Add a cylinder regression with offset geometry and malformed
p-curves using equivalent bounds.
2026-09-30 18:35:58 -04:00
Clifford Yapp 620488965a Make RTree seed selection scale independent
Always accept the first candidate split pair before comparing waste.
This avoids duplicate seeds when large finite volumes make a numeric
sentinel round back to a tied candidate value.

Add a regression using the large, nearly identical boxes from BRep
facetization aborts.
2026-09-30 18:35:58 -04:00
Clifford Yapp 8c301eabd1 Refine assembled crossings along exact chords
Only split a shared B-Rep edge when both reported triangles are
incident to it.  Otherwise split the closest internal triangle edge in
its active chart and preserve native-to-3-D correspondence through
collapsed pole aliases.
2026-09-30 18:35:58 -04:00
Clifford Yapp 9744ca6b17 Refine folded faces in active CDT charts
Choose adaptive samples in topology charts for nonlinear polar maps.

Repair residual chords with transactional chart-certified flips.
2026-09-30 18:35:58 -04:00
Clifford Yapp 99ecf3beef Honor BRep tolerances at mesh boundaries
Shared edge points may lie off an adjacent surface within the source
edge or vertex tolerance.  Do not refine those boundary strips
indefinitely, while retaining strict checks for ordinary face folds and
final mesh geometry.
2026-09-30 18:35:58 -04:00
Clifford Yapp ce64ad5bcc Match closed edge splits by geometry
Closed edge curves and periodic p-curves may use different phase
origins, making m_bRev3d insufficient to pair their split halves.
Select each closed-edge child interval by model-space proximity and
retain native trim domains instead of rewriting unrelated trims.
2026-09-30 18:35:58 -04:00
Clifford Yapp 9afcf3f474 Filter rigorous corpus audits by input validity
Classify each BRep before realization and exclude inputs outside the
valid closed-solid topology contract.  Preserve the classification in
the JSON log and propagate the filter through database batch workers.
2026-09-30 18:35:58 -04:00
Clifford Yapp adbf34a7cc Refine certified CDT crossings structurally
Apply relative tessellation tolerance to shared edge chord error.

Feed certified cross-face intersections back into bounded refinement.
Split shared master edges for adjacent faces and refine native charts
for disjoint faces while preserving source triangle identity.
2026-09-30 18:35:58 -04:00
Clifford Yapp 0ca7c82d4b Repair generic periodic CDT face charts
Lift periodic boundaries from authoritative 3D edge samples and correct
stored pcurve winding before triangulation. Repair inverted planar loop
nesting and avoid uniform overrefinement of closed edges.

Add periodic and nesting regression coverage.
2026-09-30 18:35:58 -04:00
Clifford Yapp cfadf83b17 Repair periodic CDT charts for full seams
Lift spherical seam boundaries continuously and map full cylinders
from authoritative 3D samples.  Preserve valid refinement points and
tighten audit reference bounds.
2026-09-30 18:35:58 -04:00
Clifford Yapp 4f2e121ada Certify CDT mesh self-intersections
Reject nonadjacent triangle crossings in face charts and final meshes.

Refine defects in periodic-aware UV charts.

Retain source face provenance for deterministic diagnostics.
2026-09-30 18:35:58 -04:00
Clifford Yapp 8d88deec1f Decompose pinched cone face charts
Split weak cone outer walks into topology-preserving disk charts.
Recover damaged radial pcurve samples from shared 3-D edge points and
commit atlas boundaries only after every component is certified.
2026-09-30 18:35:58 -04:00
Clifford Yapp d24ca11f30 Add topology charts for trimmed conic faces
Preserve canonical B-Rep edge samples while improving trim pullbacks
and mapping final chart boundaries into the face mesh.

Unwrap partial cylinders in analytic coordinates, stabilize cone rays
at toleranced poles, and accept only orientation discrepancies covered
by declared boundary tolerances.
2026-09-30 18:35:58 -04:00
Clifford Yapp b435e292b2 Validate assembled mesh vertex links
Reject nonfinite or unused vertices, scale-aware zero-area faces, and
vertex links that are not one cycle before returning quality-path
success. Keep closed-edge incidence validation as the final topology
check.

Build each vertex link directly from incident triangle corners to keep
the certification pass linear in mesh size. Initialize standalone CDT
mesh state and cover valid, bow-tie, unused, and degenerate inputs.
2026-09-30 18:35:58 -04:00
Clifford Yapp 8fb43b8a81 Stop unproductive chart refinement
Track initial and best inconsistent-triangle counts across adaptive
rounds. Stop after four consecutive non-improving rounds and report
best and remaining counts, rather than allowing midpoint insertion to
amplify a failing triangulation through the full limit.
2026-09-30 18:35:58 -04:00
Clifford Yapp 6aa3a3fe99 Reject Steiner points outside face charts
Filter candidate interior samples against the chart outer loop before
passing them to detria. The existing boundary, hole, and duplicate
filters remain applied, so only samples in the represented trimmed
region can participate in triangulation.
2026-09-30 18:35:58 -04:00
Clifford Yapp df3597fbb1 Refine topology charts before failing
Retain adaptive points separately from initial surface samples so cone
charts can refine folded near-apex chords without reactivating
unsuitable native-UV samples. Evaluate face-local normals where native
UV is unambiguous.

Remove the boundary-sample triangle heuristic from mesh validity and
deduplicate roundoff-equivalent interior Steiner points. The actual
orientation, incidence, and geometric-degeneracy gates remain in force.
2026-09-30 18:35:58 -04:00
Clifford Yapp a1cdc7efbf Coordinate B-Rep edge normal refinement
Sample straight and curved shared edges against face-local normals.
Use a bounded orientation criterion when no normal tolerance is
requested. Both adjacent face charts now receive the samples needed
to avoid folded boundary triangles.

Record per-face failure diagnostics and make adaptive refinement
reports specific enough for corpus triage. Use deterministic reverse
UV mappings for regular-chart refinement and evaluate orientation
from face-local surface normals.
2026-09-30 18:35:58 -04:00
Clifford Yapp c45bdd9e12 Respect surface tessellation tolerances
Use the explicit face-scale tolerance for surface subdivision.

Keep shared-edge density from forcing excessive interior sampling.
2026-09-30 18:35:58 -04:00
Clifford Yapp e89653e374 Add topology-aware quality tessellation
Add topology-correct cone and polar charts and metric regular charts.

Make face orientation and refinement fail closed with bounded limits.

Extend quality audits and spatially index polygon preflight checks.
2026-09-30 18:35:57 -04:00
Clifford Yapp 54b41ac268 Introduce topology-correct cone charts
Map conical poles through explicit ruled wedge charts.
Constrain seam-safe fans and preserve B-Rep vertex identity.
Bound trim searches and cover transformed cones end to end.
2026-09-30 18:35:57 -04:00
Clifford Yapp ab4f5fff4d Harden constrained Delaunay triangulation
Compile detria under strict floating-point rules.

Validate and certify every constrained chart.

Propagate failure reasons and add adversarial numeric tests.
2026-09-30 18:35:57 -04:00
Clifford Yapp da414e23e1 Make quality B-Rep tessellation fail closed
Add structured diagnostics and transactional state reuse.

Make mesh export deterministic and conversion frontends fail closed.

Fix local trim, orientation, closest-point, and ownership defects.
2026-09-30 18:35:57 -04:00
Clifford Yapp 0f7fba5f8d Recover periodic B-Rep cut strips
Require repeated loop vertices to coincide in parameter space before
splitting touching subloops.  Stitch opposite-winding cuts on doubly
periodic surfaces in a universal cover before triangulation.

This completes every shaded face in the Leeuwenhoek corpus database.
2026-09-30 18:35:57 -04:00
Clifford Yapp 7d95ea711f Recover winding periodic B-Rep strips
Scale trim sampling from model-space edge extents and guarantee
angular samples for multi-turn periodic pcurves. Stitch matching
essential boundaries in the universal cover before triangulation.

This recovers the EMBER helical cylinder face.
2026-09-30 18:35:57 -04:00
Clifford Yapp 2abeb1d370 Recover bridged B-Rep inner loops
Split inner-loop Euler walks into simple hole cycles and discard their
zero-area connecting bridges. Accept declared-tolerance linear NURBS
pcurves when classifying degenerate slits.
2026-09-30 18:35:57 -04:00
Clifford Yapp 452a574d6a Ignore degenerate inner B-Rep loops
Factor zero-area classification down to individual loops and omit
degenerate inner constraints before triangulation. Preserve all outer
loop handling and add a face-with-slit regression.
2026-09-30 18:35:57 -04:00
Clifford Yapp dfc2a45d96 Recover untrimmed curved B-Rep faces
Build a domain boundary for any evaluable surface with one empty outer
loop, rather than limiting recovery to planar single-face databases.
Add a curved NURBS regression.
2026-09-30 18:35:57 -04:00
Clifford Yapp d3f4a8af77 Classify tolerant degenerate B-Rep loops
Check every span of piecewise-linear pcurves and honor bounded trim
tolerances when identifying zero-area slits. Treat faces with multiple
entirely empty loops as degenerate.

This clears the keycap and Spur Gear generation failures.
2026-09-30 18:35:57 -04:00
Clifford Yapp 9c3cf13748 Allow bounded periodic boundary backtracking
Accept one-turn periodic boundaries whose local converted-trim
excursions span up to 1.25 periods, while retaining a limit below a
second winding. Extend the split-boundary regression with an explicit
out-and-back subcycle.
2026-09-30 18:35:57 -04:00
Clifford Yapp dfd46f7807 Normalize split periodic B-Rep boundaries
Use trim topology to assign a consistent period to sampled pcurves
before closed-surface loop repair. Distinguish inter-trim seam jumps
from intentional full-period steps.

This recovers Rim face 98 and adds a split-boundary regression.
2026-09-30 18:35:57 -04:00
Clifford Yapp 4e088e4221 Skip zero-area closed B-Rep slits
Recognize reversed, coincident trim pairs on closed surfaces as true
zero-area slits while preserving shared-edge seams and full-period
boundaries. Add a cylindrical regression case.
2026-09-30 18:35:57 -04:00
Clifford Yapp c7ca85e6af Recover duplicate outer periodic B-Rep bands
Treat repeated outer-loop labels as recoverable metadata when periodic boundary geometry identifies a strip.  Keep the first declared outer as the reconstructed boundary.
2026-09-30 18:35:57 -04:00
Clifford Yapp a9263bcf0f Reject zero-area periodic B-Rep subloops
Require both sides of a touching-loop split to enclose meaningful parameter-space area.  This prevents periodic isocurves with roundoff area from being misclassified as holes.
2026-09-30 18:35:57 -04:00
Clifford Yapp c73d5d0107 Recover malformed periodic B-Rep strips
Repair periodic boundaries with corrupt winding, overlapping pcurves, or missing outer-loop labels.  Preserve exact period transitions and align cutouts with the reconstructed strip.

Keep non-owning surface proxy scratch scoped to its source B-Rep so batched drawing cannot retain freed geometry.
2026-09-30 18:35:57 -04:00
Clifford Yapp 5262ae183b Recover touching periodic B-Rep subloops
Preserve trim and edge identities on recursively sampled boundary
points. Initialize all trim point metadata to avoid indeterminate
topology fields.

Split periodic figure-eight loops at their shared topology vertex and
pass the smaller opposite-wound cycle to the Clipper sanitizer as a
hole.
2026-09-30 18:35:57 -04:00
Clifford Yapp 5fd66ec1f2 Recover missing B-Rep outer loop labels
Infer an outer loop only when no loop is labeled outer and the
largest nondegenerate UV polygon contains every other usable loop.
This recovers faces whose importer marked every loop as inner without
guessing across disconnected components.

Also rebuild a full periodic domain when one topologically closed
boundary is paired with an empty loop at the opposite surface limit.
Add planar, periodic, and empty-boundary regressions.

This restores all faces in both Big Boy gear-motor variants.
2026-09-30 18:35:57 -04:00
Clifford Yapp 194d277da7 Recover collapsed B-Rep hole pcurves
Detect closed singleton pcurves whose lifted spatial extent collapses
relative to their valid 3D edge. Pull the edge back before
triangulation and preserve its declared trim direction.

Unwrap noncontractible boundary pairs onto a common periodic seam.
Use those boundaries as the outer polygon even when imported loop
classification assigns a contractible cutout as the outer loop.

Add regressions for collapsed circular holes and misclassified
periodic boundaries. This recovers all 1,309 shaded faces in the SD40
cooler object.
2026-09-30 18:35:57 -04:00
Clifford Yapp b731d2c493 Recover multi-edge periodic B-Rep bands
Reconstruct periodic bands whose closed boundaries are divided across
one or more trims. Require connected topology and post-pullback
coverage of one complete period at both boundary isocurves.

Accept a mixed single/paired boundary only when two shared seam trims
join the same parameter levels. Add regression coverage for both
paired and mixed boundary encodings.

This eliminates the remaining shaded failures in the Woden database.
2026-09-30 18:35:57 -04:00
Clifford Yapp 278fe1027d Recover topologically closed B-Rep bands
Treat near-coincident loop endpoints as closed when their trims share
a B-Rep vertex and their UV and 3D gaps satisfy the model tolerances.
This removes microscopic closure edges that invalidate constraints.

Reconstruct periodic strips encoded as two complementary edge pairs
and a shared seam.  Require the post-pullback samples at both strip
boundaries to corroborate one complete surface period.

Add regressions for imprecise planar closure and paired periodic arcs.
This recovers the speaker face and all nine missing military-truck
faces without broadening recovery to arbitrary malformed loops.
2026-09-30 18:35:57 -04:00
Clifford Yapp 679085a233 Recover periodic B-Rep face domains
Reconstruct full closed-surface domains when imported trims collapse
onto seams or periodic isocurves.  Preserve ordinary holes, seed the
unwrapped domain, and limit repairs to corroborating topology.

Use bounded NURBS evaluations for revolution-surface audit boxes and
make face-index audits compare against the selected face.  Add
regressions for holes, singular domains, and collapsed annular trims.

This recovers all shaded faces in the 41-face Woden, 49-face KF-21,
and 94-face shell-pressing samples.
2026-09-30 18:35:57 -04:00
Clifford Yapp 7f302f2a36 Bound skinny B-Rep surface sampling
Refine surface interiors only when distance or normal error requires it.
Avoid filling geometrically flat strips with isotropic parameter cells.
This kept detria from processing hundreds of thousands of unnecessary
points.

Add a single-face audit selector and a regression for extreme planar
aspect ratios.
2026-09-30 18:35:57 -04:00
Clifford Yapp f900cff7ee Recover full-domain B-Rep faces
Reconstruct full periodic faces whose seam trims collapse in UV, seed
bounded interior samples, and preserve singular pole positions.

Use planar surface domains when a sole loop has no trims. Recognize
non-periodic collinear multi-trim loops as zero-area geometry.

Add focused regression coverage for each recovered topology.
2026-09-30 18:35:57 -04:00
Clifford Yapp e7c1634d69 Recover triangulation and batch process failures
Reject illegal Delaunay flips before evaluating the incircle predicate
and return recoverable detria invariant failures to callers.

Retry a died batch task once in a fresh process so accumulated heap
pressure does not skip otherwise valid geometry.
2026-09-30 18:35:57 -04:00
Clifford Yapp e02cbda1ba Batch B-Rep corpus audits by database
Open each database once while preserving per-object watchdogs,
restart points, and resource controls.

Report exact failed, skipped, and unprocessed face, edge, and surface
cue indices so corpus failures can be investigated directly.
2026-09-30 18:35:57 -04:00
Clifford Yapp ceea1de1a9 Recover malformed fast B-Rep face loops
Retain topology-minimum samples for thin nonlinear boundaries.
Rebuild outlier pcurves from validated 3-D edge pullbacks, then
reconstruct singular caps and periodic strips in a common UV cover.

Classify exact zero-area line faces as completed skips and expose
that count in audit reports. Add synthetic regression cases for each
recovery path.
2026-09-30 18:35:57 -04:00
Clifford Yapp 90ebcfb82f Recover malformed B-Rep trim triangulations 2026-09-30 18:35:57 -04:00
Clifford Yapp b1f96d992b Sanitize constrained polygon triangulation 2026-09-30 18:35:57 -04:00
Clifford Yapp 4698a1dbfa Cache B-Rep display sampling metrics
Hoist model bounds and surface scales out of face recursion.

This removes quadratic bounds work and allocator contention.
2026-09-30 18:35:57 -04:00
Clifford Yapp 82b1ad1ce7 Add isolated B-Rep corpus audit runner
Run each database object and drawing mode in a separate bounded process
and append JSONL results immediately.  Support resumable runs, wall and
address-space limits, temporary crash logs, and small sampling passes.
2026-09-30 18:35:57 -04:00
Clifford Yapp a73140d202 Use bounded CDT for shaded B-Rep plots
Route standard shaded VList generation through the deterministic fast
mesh core.  Guard seam and surface sampling progress, own all per-face
temporary data, catch allocation failures, and verify exact VList
assembly.
2026-09-30 18:35:57 -04:00
Clifford Yapp 3633954d6d Parallelize bounded B-Rep wireframes
Sample independent B-Rep edges in bounded worker jobs and assemble
VLists in topology order.  Add resource-aware surface cues,
diagnostics, loop guards, and deterministic regression coverage.
2026-09-30 18:35:57 -04:00
Clifford Yapp 61e0efc9b6 Bound parallel B-Rep display tessellation
Keep fast face sampling local to each worker and leave the input B-Rep
unchanged.  Add deterministic assembly, resource controls, per-face
diagnostics, audit options, and regression coverage.
2026-09-30 18:35:57 -04:00
Clifford Yapp dd7b4de256 Correct B-Rep drawing audit modes
Measure rt_brep_plot as wireframe generation and allow each drawing
path to be audited independently.  Keep sparse edge-only wireframes
from failing shaded-mesh extent checks.
2026-09-30 18:35:57 -04:00
Clifford Yapp d179622873 Update detria.hpp, add plan 2026-09-30 18:35:57 -04:00
Clifford Yapp 5d3a20f778 Extract logic specific to CDT work from old branch 2026-09-30 18:35:57 -04:00
Clifford Yapp 6e48ea9ddd Center README toplevel text 2026-09-30 06:44:36 -04:00
Clifford Yapp 488f538040 Update bext SHA1 to latest 2026-09-28 08:46:34 -04:00
Clifford Yapp 17cc9f3a5a List file for distcheck 2026-09-25 17:31:09 -04:00
Clifford Yapp bf2c508826 List cases.inc for distclean 2026-09-25 15:55:30 -04:00
Clifford Yapp f2e68b1a2a Initialize 2026-09-25 15:42:29 -04:00
Clifford Yapp 5e873e5081 Fix MGED live view panning and solid edit lookup
View-mode mouse panning now honors view coordinates even when MGED is
set to object coordinates. Correct the solid-edit lookup so live
geometry queries work during dragging.

Exercise numeric live and saved geometry for primitive, combination,
ARB, pipe, BoT, BREP, ARBN, and raster edits. Cover menu selection,
mode switching, repeated mouse edits, and BoT triangle picking under
Xmin.
2026-09-25 14:17:01 -04:00
Clifford Yapp 3beed70eb8 Fix MGED mouse edit modes and interactive feedback
Middle-click rotation and some Edit menu choices could move the view
or leave solid editing in a stale mode. Keep edit flags and modes
aligned so mouse actions change geometry, including snapped drags.

Defer button release while a pick is running to avoid a background
command-busy error. Extend MGED and Xmin regressions to verify
primitive mouse edits, live redraw, menu modes, and picking.
2026-09-25 17:00:00 +00:00
Clifford Yapp 73258d4264 Fix MGED interactive edit redraw and mouse routing
Object-edit transforms now update cached display matrices and mark
views dirty, so geometry moves visibly without a manual refresh.
Synchronize transient solid-edit flags with librt edit mode so mouse
and rate controls manipulate the solid instead of the view.

Add an Xmin mouse regression covering object and solid pan/spin,
direct transforms, redraws, and unchanged view state.
2026-09-25 17:00:00 +00:00
Clifford Yapp 8ae7482918 Gate librt rtcmp capture with runtime toggle 2026-09-25 12:25:44 -04:00
Clifford Yapp 917ce5554c Preserve primitive edits across failed saves and restores
A failed checkpoint could discard the last saved state, and a
failed revert could discard the current primitive. Restoring
selected pipe or NMG geometry could also leave stale handles.

Stage exports and imports before replacing live state, clear
selections and refresh the keypoint after restore, and preserve
SPH and REC types. Consume rejected edit input so a later command
cannot reuse it, and prevent view-update counts from accumulating.

Cover failed saves and restores, repeated revert, selected geometry,
and default and non-default database units.
2026-09-24 14:52:59 -04:00
Clifford Yapp 58ab0d5496 Prevent rejected primitive edits from changing geometry
Rejected height moves in TGC, CLINE, and EXTRUDE could replace
valid geometry; NMG edge moves could partly change faces while
reporting success. BOT edge splits could leave unused vertices, and
malformed parameter text could partly overwrite seven primitives.

Stage edits before applying them. Reject invalid REC and uniform
scale inputs without changing geometry, and report scale failures.
Cover these paths in default and non-default units, including CRLF
parameter text and NMG selection remapping.
2026-09-24 14:52:59 -04:00
Clifford Yapp 13b0699349 Prevent rejected ARB edits from corrupting geometry
Mouse face drags and several ARB edit helpers could change points or
planes before detecting invalid geometry. Subsequent edits then began
from inconsistent state and could produce unexpected shape changes.

Validate candidate geometry before committing it, restore state on
rejected edits, and cover repeated mouse drags with non-default units.
2026-09-24 14:52:59 -04:00
Clifford Yapp acd3a9800d Use bu_vls for capture records 2026-09-24 18:51:55 +00:00
Clifford Yapp 03b36c1b61 Restore MGED command prompt focus on GUI startup 2026-09-24 18:48:57 +00:00
Clifford Yapp b714d88185 See if we can optionally also write out pre-boolweave segment data for comparison. 2026-09-24 17:45:40 +00:00
Clifford Yapp eff3fea479 Add LIBRT level rtcmp debug printing option 2026-09-24 16:25:34 +00:00
Clifford Yapp 7358e90b54 Keep temporary files binary on Windows
Set binary mode on the temporary file descriptor before wrapping it
in a stream. This prevents newline translation from enlarging DSP
sample files, which otherwise makes DSP edits and raster operation
tests fail on Windows.

Add a byte-for-byte temporary-file regression test covering newline
and DOS EOF bytes.
2026-09-24 14:30:55 +00:00
Clifford Yapp 3c2b0de9d2 Fix unit-sensitive primitive edits and invalid edit reporting
Keep numeric edit values in database-local units while applying
geometry changes in base units. Correct parameter readers and edit
paths that could misplace solids or silently accept invalid changes,
including ARB, ARBN, BOT, pipe, sketch, metaball, and NMG.

Add mm/in operation matrices with exact-result checks across
primitive edits, parameter parsing, and repair paths.
2026-09-24 11:08:20 +00:00
Clifford Yapp a384f838fb Reject invalid BREP control-vertex edits and verify units
Propagate selection and CV edit errors through librt so callers do not
report rejected edits as successful. Validate indices and coordinates
before changing geometry, and mark selection indices as unitless.

Exercise persisted CV moves and sets in an inch-unit GED database,
and verify rejected commands leave stored geometry unchanged.
2026-09-24 02:03:12 +00:00
Clifford Yapp 1053594e9a Fix cursor state and BREP control-vertex mouse edits
Preserve cursor-relative translation knobs for ARB, BOT, CLINE,
extrusion, NMG, and TGC mouse edits, including in non-mm
databases. Prevent BREP control-vertex drags from moving the
whole solid. Report invalid ARB edit indices and geometry
failures to callers.

Add mouse and error-path regressions for the affected primitives.
2026-09-24 01:36:28 +00:00
Clifford Yapp 72cde263cc Fix ARB face rotation errors and endpoint drag state
ARB face rotation changed geometry but reported failure, causing GED
to reject the edit. Return success and let the shared edit path replot.

CLINE and extrusion mouse endpoint drags also reset translation
knob state. Keep endpoint moves separate from translation handling
and cover these workflows in primitive and GED edit tests.
2026-09-24 01:00:50 +00:00
Clifford Yapp b670a19aba Preserve local-unit inputs during primitive editing
Repeated edits in non-mm databases could compound unit conversions,
moving points and faces or resizing primitives unexpectedly. Mouse
coordinates could also be converted a second time.

Convert numeric values into temporary base-unit targets in librt
without rewriting the supplied parameters. Cover translation,
dimension changes, vertex and face moves, picks, and NMG extrusion
with non-mm and repeated-input tests.
2026-09-24 00:37:03 +00:00
Clifford Yapp 2d9fa5c033 Fix non-mm primitive edits and invalid scale handling
Numeric scale lengths now convert once in librt, so edits in
non-mm databases produce the requested geometry and repeated
inputs do not compound conversions. Cover torus, ellipsoid,
superellipsoid, particle, RPC, RHC, ETO, and TGC scaling,
plus TGC endpoint moves.

Reject impossible torus, ETO, and coupled TGC edits without
changing the solid. Add inch-unit, repeat-input, and rejection
coverage in librt and libged.
2026-09-23 23:59:19 +00:00
Clifford Yapp 8be0f0ae85 Fix EPA/EHY length edits and lock in ARB edit behavior
EPA and EHY length edits now convert local units without changing the
input, so repeating an edit cannot apply the conversion again. Invalid
semiaxis requests now fail visibly and leave the primitive unchanged;
empty parameter edits remain no-ops.

Add inch-unit MGED extrusion checks for both direct and interactive
editing, exercise ARB geometry helpers, and run multiline MGED tests
as sourced scripts so failures cannot be skipped.
2026-09-23 23:04:29 +00:00
Clifford Yapp 00ffa4bd80 Fix VOL edits with non-default database units
Convert voxel cell sizes to base units without modifying input
parameters, so repeated edits use the requested size. Keep file
sizes and density thresholds unitless, validate invalid dimensions,
and prevent threshold underflow and file-size overflow.

Cover direct librt edits and persisted GED edits in inch databases.
2026-09-23 22:27:58 +00:00
Clifford Yapp e5e0905d03 Fix pipe editing units, zero dimensions, and failures
Pipe point coordinates and dimensions entered in non-mm databases were
not consistently converted to base units. Some commands reconverted
their input on repeat, while invalid point operations could report
success without changing the pipe.

Convert numeric input once in librt, preserve base-unit mouse points,
and propagate operation failures. Reuse shared pipe point helpers and
allow all-zero pipe dimensions to receive an absolute value. Add
direct and GED tests for inch units, repeated edits, failures, and
database persistence.
2026-09-23 21:55:41 +00:00
Clifford Yapp 10d13793b0 Fix revolve sketch edits, error reporting, and ownership
Changing a revolve's sketch now loads the new geometry and rejects
missing or non-sketch references without persisting a broken object.
Invalid numeric edits report errors instead of appearing to succeed.

Transforms retain the start vector, angle, and sketch. Imported and
prepared objects own independent sketches and names, avoiding stale
geometry, leaks, and dangling references.

Cover inch-database edits, sketch replacement, transform ownership,
and prep/free lifecycles in edit tests.
2026-09-23 21:26:37 +00:00
Clifford Yapp 70d5180438 Fix sketch and extrusion edits and report invalid operations
Honor indexed sketch descriptor inputs and convert vertex and radius
lengths in non-mm databases. Replace extrusion sketch references only
after the new sketch is validated, so failed selections leave the
existing extrusion intact.

Return descriptor edit failures to GED instead of reporting success.
Remove two unimplemented TGC moves from advertised operations and
strengthen persisted sketch, extrusion, HRT, and pipe tests.
2026-09-23 20:55:57 +00:00
Clifford Yapp 50fe626694 Fix NMG edge deletion and strengthen edit operation checks
Deleting an NMG edge could also split another edge when stale edit
parameters were present. Stop after deletion and release temporary
extrusion loops on mode changes and reset.

Exercise NMG selection, traversal, edge edits, and extrusion using
non-mm input. Check that DSP file selection and sample counts are
independent of length units, sharing the filename test callback.
2026-09-23 20:11:14 +00:00
Clifford Yapp ca403c92ed Correct native primitive edits and broaden result coverage
Keep combination edit sessions valid after database writes, move BOT
plate thickness edits into librt, and repair ARS topology changes.
Correct unit-sensitive edits, malformed-input handling, and NMG
imports on unaligned data so geometry edits remain reliable.

Add primitive-operation inventory, outcome and inch-unit tests, and
bounded edit-sequence coverage. Use portable temporary data files
so DSP and EBM tests no longer require /tmp.
2026-09-23 19:49:07 +00:00
Clifford Yapp bab959474f Add Clang version of coverage tracking compilation flags 2026-09-23 19:49:07 +00:00
Clifford Yapp 27b522c155 Updates for OpenCV v5 2026-09-23 16:50:52 +00:00
Clifford Yapp 875231c335 Consolidate librt primitive edit tests into one executable
Run all 34 edit cases through a selectable rt_edit_test binary.
Register each case independently with CTest so failures remain
isolated and previously unregistered tests run routinely.
2026-09-23 16:01:04 +00:00
Clifford Yapp 89810b06ca Correct non-mm primitive edits and expand regression coverage
Keep MGED and gsh edits consistent in non-mm databases by fixing
length and dimensionless parameter handling in librt and libbrep.
Correct DSP absolute cell sizing and inverse transforms, preserve
rational BREP control-vertex weights, and retain NMG session units.

Add non-mm tests for affected primitives and update stale ARB8
descriptor and HRT translation assertions.
2026-09-23 16:01:04 +00:00
Clifford Yapp 90e512b5d6 Fix non-mm units across primitive edit commands
MGED tra moved primitives too far by passing a base-unit target
to handlers expecting local units. The libged edit commands used
by GSH mixed local numeric positions with base-unit keypoints.
This affected tra, absolute and relative translate, and rotation
and scale centers in non-mm databases.

Convert translation targets at the librt edit boundary and parse
numeric positions in base units. Keep scale reference factors
dimensionless and add inch-database regression coverage.
2026-09-23 16:01:04 +00:00
Clifford Yapp 19fe382208 Revert "Add opt-in forward parity shots for solid BoTs"
This was just an experiment - remove.

This reverts commit 90e5ede2b3.
2026-09-23 10:00:05 -04:00
Clifford Yapp 994c56b05f typo, ws 2026-09-23 09:34:21 -04:00
Christopher Sean Morrison db76164ea8 update docs with restored behavior and comparison with bwdiff 2026-09-23 07:36:04 -04:00
Christopher Sean Morrison 58c5ed3681 pixscale and bwscale improved 2026-09-23 07:35:28 -04:00
Christopher Sean Morrison 05bd5c7470 restored pixdiff 2026-09-23 07:34:02 -04:00
Christopher Sean Morrison 2276f4ef8c replaces seek-based scanline loading with a forward rolling buffer so large piped inputs behave like regular files. 2026-09-23 07:32:55 -04:00
Christopher Sean Morrison 188e72eb32 maps the first and last output pixels exactly onto source edges and clamps interpolation neighbors so enlargements retain every corner 2026-09-23 07:32:55 -04:00
Christopher Sean Morrison 03306043ea scaling test 2026-09-23 07:32:55 -04:00
Christopher Sean Morrison 28038fe0ea isolated pixdiff pix test 2026-09-23 07:32:55 -04:00
Christopher Sean Morrison 5b5cb8c538 now bw mode need -b option 2026-09-23 07:32:55 -04:00
Christopher Sean Morrison 1c20d18156 restore previous pixdiff behavior where we apply an ntsc-grayscaling damper on same pixels so differences are accentuated with color 2026-09-23 07:32:55 -04:00
Clifford Yapp 97920fbc90 license info 2026-09-21 22:07:58 -04:00
Clifford Yapp 37fb7d928a Not flipping these to const yet. 2026-09-21 22:06:05 -04:00
Clifford Yapp 2056b359bd Use EQUAL/ZERO 2026-09-21 22:05:39 -04:00
Clifford Yapp b4cf00292a ged_cmd_valid is deprecated, so don't need a test for it. 2026-09-21 20:08:03 -04:00
Clifford Yapp 6748dd37ab libged: restore ged_cmd_valid compatibility wrapper
The 2024 command API migration replaced its implementation with
ged_cmd_exists and ged_cmd_same, but retained the deprecated exported
ged_cmd_valid declaration.  This left source callers compiling against a
symbol that libged did not provide.

Restore the wrapper with its established status mapping and add regression
coverage for valid, alias, mismatch, invalid, and NULL command inputs.
2026-09-21 20:06:52 -04:00
Clifford Yapp ef35c1dca1 fix bu_scan_fastf_t delimiter parsing
Replace dynamically constructed scanf formats with direct numeric and
delimiter parsing.  The old implementation accepted only one literal
delimiter sequence, mishandled percent delimiters, and used an
uninitialized length when scans failed.

Define empty delimiter strings as invalid, reset optional consumed-count
outputs for invalid configurations, and document the delimiter and
destination-pointer contract.  Add regression coverage for repeated,
mixed, and percent delimiters, deterministic prefix counts, null
destinations, and invalid configurations.
2026-09-21 20:06:30 -04:00
Clifford Yapp 8cdedd8752 libbn: correct polynomial edge cases
Correct descending-order polynomial API documentation and make basic
arithmetic helpers safe when their output aliases an input.  Preserve
the output when multiplication exceeds the fixed degree limit.

Handle constant and higher-degree divisors without unsigned degree
underflow.  Normalize small nonzero leading coefficients before the
direct quadratic, cubic, and quartic solvers.

Repair the unreferenced bivariate polynomial implementation: expose its
API, add release support, preserve both dimensions while growing, and
correct its addition and convolution.  Add focused regressions for all
corrected cases.
2026-09-21 18:40:54 -04:00
Clifford Yapp e4ba0b166c libbn: correct matrix and quaternion edge cases
Use bn_tol's angular predicate in bn_mat_fromto instead of the
duplicated line-segment ratio test, which compared dimensionless
slopes against a distance tolerance.  Normalize inputs and return an
identity matrix when either cannot be normalized.

Make bn_mat_lookat support non-unit and Z-axis directions.  Correct
bn_wrt_point_direc's translation-back sign and replace its shared
scratch storage with local temporaries.

Define quaternion behavior for antipodal bisection and identity
logarithms.  Document related angle and input contracts, and add
regressions for the corrected cases.
2026-09-21 18:28:12 -04:00
Clifford Yapp 586ac06c7e libbg: correct geometry query contracts
Normalize point/normal planes without mutating caller input, and
correct coordinate frames for non-unit plane equations.

Support rank-deficient PCA input, correct 3D polygon centroids and
CCW ordering, honor polygon holes in view bounds, and gather every
mesh diagnostic while preserving the no-diagnostics fast path.

Fix Creo's inverted solidity result, make segment clipping reentrant,
and clarify geometry API contracts.  Add focused plane, PCA, polygon,
and trimesh regressions.
2026-09-21 18:17:12 -04:00
Clifford Yapp 0d745fca35 Use bu_vls for VFONT paths
The VFONT loader used a 128-byte buffer when constructing the bundled
font path. Odd-pathname distcheck directories exceeded that limit in CI
environments, causing fblabel to reject the default font and all
dependent rtwizard tests to fail. Use a bu_vls path so the installed
font can be opened regardless of build prefix length, and release it on
all loader exits.
2026-09-18 16:39:52 -04:00
Clifford Yapp 5270e67abe List files for distcheck 2026-09-18 15:47:02 -04:00
Clifford Yapp 14051845a3 facetize: add source-guided adaptive SPSR
Fixed-size point dumps make Poisson reconstruction unreliable as a
last-resort facetization method.  They can miss thin partitions while
oversampling surfaces that are already well resolved, and an arbitrary
point count does not show whether source characterization is complete.

Seed reconstruction with stabilized Crofton samples.  Retain paired
entry and exit normals, partition thickness, and ray identities so thin
geometry contributes explicit local information instead of unrelated
points.

Add a bounded adaptive libbg driver around the existing upstream
Poisson solver.  Each solve reports residual, density, normal, and
surface-variation hints to a caller callback.  Facetize responds with
exact source rays and validates partitions, endpoints, chord length,
area, volume, and closed-manifold topology before accepting a result.

Bound refinement by time, point, pass, and convergence limits.  Relax
only chord and thin-partition thresholds when the source BoT is already
known to be non-manifold.  Deprecate the fixed-array API, remove the
intermediate point-sampling path, adapt pnts callers, and add focused
coverage.  The vendored SPSR implementation remains unchanged.

Use configured method priority for perturbation variants so an MDC-only
run never invokes NMG.  Report finalization progress and retry counts
while the fallback hierarchy is evaluated.
2026-09-18 16:14:16 +00:00
Clifford Yapp d6fa937212 libanalyze: replace marching cubes with adaptive MDC
The legacy marching-cubes polygonizer sampled a uniform grid and could
miss thin or high-aspect features, merge undersampled tunnels, and emit
surfaces whose shared-edge winding was inconsistent.  Increasing the
global resolution made those failures prohibitively expensive rather
than addressing their local causes.

Add a ray-driven manifold dual contouring API built on an adaptive
octree.  Cache exact signs and Hermite edge crossings from librt
partitions, place feature-preserving vertices with bounded QEF solves,
and refine locally for thin walls, multiple crossings, interior
surfaces, and ambiguous topology.  Build faces from shared crossings
with deterministic winding and require closed manifold output.

Back analyze_polygonize with the new implementation, expose MDC as a
facetize method, and remove the obsolete polygonizer code, licensing,
continuation sampler, and CM default.  Keep NMG available when polygon
preservation is more important and it can successfully process the
input.

Document the Ju, Schaefer, and Warren algorithmic basis and the
bottom-up Euler-characteristic escalation path.  Add coverage for thin
walls, tunnels, overlapping CSG, toroidal cases, winding, resource
limits, and the compatibility polygonalize entry point.
2026-09-18 16:14:16 +00:00
Clifford Yapp 37aee260c1 facetize: retire the legacy pipeline and harden region results
The compatibility implementation duplicated command behavior and
retained unreliable paths that had been superseded by the planned
worker pipeline.  Keeping both implementations made option handling and
failure behavior needlessly difficult to reason about.

Remove the old facetize sources and MGED registration so all command
modes use the maintained orchestrator.  Preserve implicitly selected
region roots in the output database and keep region retries scoped to
validated perturbation inputs.

Tighten source and result validation, reject empty preparation results,
and suppress expected import or preparation diagnostics only inside a
scoped log hook.  Keep routine details out of the terminal summary and
write complete detail logs when concise reporting is not possible.

Extend regression and validation coverage for implicit roots, tolerated
failures, and malformed or unsupported inputs.
2026-09-18 16:14:16 +00:00
Clifford Yapp 56d64428ae facetize: separate orchestration and isolate NMG evaluation
The command implementation mixed option handling, mode selection,
database setup, scheduling, and result publication.  NMG Boolean work
also ran in the parent process, allowing known NMG failures to terminate
the overall conversion.

Introduce an explicit planning and orchestration layer so each command
mode follows one visible execution path.  Replace positional worker
arguments with typed request and result messages that are validated
before they can alter the working database.

Move NMG Boolean evaluation into the supervised subprocess framework.
Transfer trees and BoTs through the existing transaction protocol,
report failures without killing the parent, and reject primitives that
do not provide the required tessellation callback.

Update facetize regression and worker-protocol coverage for the new
boundaries and failure semantics.
2026-09-18 16:14:16 +00:00
Clifford Yapp 0f6db7016d facetize: add supervised parallel primitive workers
Primitive tessellation previously paid process and database setup
costs per object and left the parent with limited visibility into work
that timed out or died.  Large models consequently spent substantial
time outside the tessellation algorithms themselves.

Add long-lived supervised workers and a bounded scheduler for
independent objects.  Divide CPUs between worker processes and each
worker internal parallelism, reuse opened databases, and retain cache
state across requests.

Make result publication transactional.  A WRITE_STARTED acknowledgment
closes the READY and PROCEED race, while the parent detects timeouts and
abnormal exits, restarts workers, and records only completed object
results.  Reuse temporary result databases without leaking state between
requests.

Add process and database-transfer helpers together with worker,
recovery, and validation tests.  Document the parallel job control and
its resource behavior.
2026-09-18 16:14:15 +00:00
Clifford Yapp cbffc1171b libbu: support resource-aware worker processes
Large subprocess pools need to divide machine resources without allowing
each worker internal parallelism to consume every CPU.  Add a
process-local limit to bu_avail_cpus() and bu_parallel(), with atomic
updates and coverage for applying and removing the limit.

Make BU_MEM_AVAIL count FreeBSD reclaimable inactive and cache queues
in addition to immediately free pages.  This prevents idle systems from
appearing memory-starved to resource-aware algorithms and adds native
sysctl checks for the reported values.

Rename the private process.h to process_private.h.  This prevents the
source header from shadowing the MSVC CRT header used by std::thread,
which otherwise leaves _beginthreadex undeclared.
2026-09-18 16:14:15 +00:00
Clifford Yapp 21e034ee34 Rename so we don't end up conflicting with an MSVC header 2026-09-18 16:13:27 +00:00
Clifford Yapp 8f81f27d92 librt: correct winding for explicit DSP B-C cell cuts
The explicit ULlr permutation inverted both terrain triangle normals.
The cell intersection state machine uses normal direction to classify
entry and exit, so top-to-side rays could disappear.

An independent triangle mesh and the DSP received the same 500,000
Crofton chords. The mesh returned 3,689 hit rays, while DSP returned
3,463; the DSP surface estimate was 10.35% below the exact area.
Using the adaptive B-C permutation for explicit cuts preserves the
selected diagonal and restores outward top normals. DSP then returned
3,688 hit rays and the area error fell to 4.53%.

Add a fixed top-to-side ray that checks entry and exit distances plus
the top normal.
2026-09-18 15:45:52 +00:00
Clifford Yapp d729a7d3f2 librt: make Crofton sampling deterministic and reusable
Retain ordinary Monte Carlo chord sampling while making its stream
explicit and portable. Draw independent sphere endpoints from a
fixed-seed mt19937_64 generator so every setup is reproducible
without changing the estimator's statistical convergence model.

Convert the generator's high 53 bits explicitly to avoid library-
specific real-number conversions. Consume four values per ray so
ray offsets reproduce disjoint continuations of the same stream.

Reuse a bounded C++ worker pool and stop only after windowed area
estimates remain stable. This avoids repeated thread construction
while retaining the existing stopping criteria.

Add optional collection of ray identifiers, paired entry and exit
hit points, normals, and partition thickness. This gives
reconstruction callers structured source evidence while preserving
lightweight area and volume estimation. Link librt to the thread
target and extend the Crofton tests to verify that offset calls
exactly reproduce the uninterrupted stream.
2026-09-18 14:48:05 +00:00
Clifford Yapp 17601916f4 Use static diagonal transformation in IGES test 2026-09-18 14:02:22 +00:00
Clifford Yapp 90e5ede2b3 Add opt-in forward parity shots for solid BoTs
When LIBRT_BOT_PARITY_SHOT is enabled at prep, solid
BoTs and ARS conversions traverse from the current shot
origin. Discard hits behind that origin and use an odd
forward hit count to construct an interior entry at the
origin. Mark the entry with a dedicated surface number
and a normal opposite the ray. The option assumes a
closed mesh without self intersections; box backout
remains the default because stray exits on bad meshes
can become long segments and origin entries can change
rendering behavior.

Exercise scalar and packet shots for ARS and BoT, plus
composite scene shots, in both modes. With cameras
inside Generic_Twin meshes, median shot time fell 10.6%
for an isolated solid, 1.4% for the full scene from the
same view, and 6.0% for another full-scene inside view.
The isolated render matched, while the full-scene views
changed 173 of 1048576 and 507 of 65536 pixels,
respectively.
2026-09-18 00:30:10 +00:00
Clifford Yapp 72454757ec Add accelerated triangle mesh self-intersection check
Expose an early-exit libbg query for mesh self intersections
and use a BVH to keep candidate pair checks practical on large
meshes. Distinguish contact at shared indexed features from
crossing or overlap, and handle near-contact cases observed
in thin wing meshes.

Make strict hole-fill validation reject self intersections
when requested while preserving the permissive repair default.
Cover shared features, overlapping meshes, malformed input,
and thin wing fixtures. A clean 32768-face grid takes about
58 ms with the BVH, versus about 4 s with the prior pairwise
check.
2026-09-18 00:30:10 +00:00
Clifford Yapp 6e9e1975b8 Distcheck fixes 2026-09-17 19:52:47 -04:00
Clifford Yapp afedaa95bd Enable RPP tests for seven bounded primitives
Particle entered the function table with ft_use_rpp=0 in 1990
(b85ddfc9ff); RPC, RHC, EPA, and EHY did so in 1992
(16dc889cfb).  CLINE arrived with zero in 2000 (4a69d5ab3c).
ANNOT was a zero-flagged stub in 2012 (f31b27d992) and retained the
value when its callbacks arrived in 2017 (cb83958bf5).  The later
table moves and callback rewrites preserved these values.  The
inspected commits record no per-primitive correctness or performance
reason for choosing zero.

The finite shot geometry is enclosed by the prepared boxes: particle
uses its two end radii, CLINE includes its radius and beam expansion,
and RPC, RHC, EPA, and EHY use conservative profile envelopes.
Model-space ANNOT prep produces a BoT and uses its bounds; screen-space
ANNOT has no shot geometry.  Enable the solid RPP check for these seven.

Leave HALF at zero because it is infinite and SKETCH because it never
shoots.  HF computes its box from the maximum height but omits a
negative minimum, so its box can be too small.  ARB8 and ARBN already
clip rays against their faces or planes, and SPH has a cheap quadratic
shot; an added box test needs its own tolerance and performance case.
BoT uses a BVH and origin backout, so changing its RPP behavior needs
separate validation.  The remaining zero entries do not shoot rays.

Five deterministic 1024-square primitives.g renders averaged 1.222
seconds of shot time before and 1.166 after, with 178,709 fewer solid
shot calls and identical pixels.  Two other camera views also matched,
as did NIRT results for rays starting inside each of the six finite
solid types.  The annotation raytrace regression passes.
2026-09-17 21:35:11 +00:00
Clifford Yapp 5c8092b4e6 Use accurate PNTS bounds for ray box tests
PNTS shot uses each point's scale when the point type carries one,
but its bounding box used only the collection scale.  A larger point
could therefore lie outside the reported box and be missed by the RPP
test.  Share the effective scale calculation with prep and include
each rendered sphere in the box.  Reject empty or invalid point sets
instead of returning an unusable box.

Enable ft_use_rpp for PNTS once its box encloses the shot geometry.
Test a ray that hits a point larger than the collection scale and
check that empty point sets do not report usable bounds.
2026-09-17 21:21:43 +00:00
Clifford Yapp de09372b73 Fix BoT shots with origins inside mesh bounds
Commit 7376385fd2 backed the HLBVH traversal origin by twice the
soltab bounding radius to preserve entrance triangles.  Commit
1d75918492 replaced that conservative distance with max(0, -r_min),
assuming r_min reaches the solid boundary.  During rt_shootray,
however, r_min can describe the current spatial partition cell.  A
ray starting inside a BoT can enter that cell after entering the mesh.
BVH culling then drops the entrance triangles, and segment assembly
discards the exit hit without an entrance.  In an overlapping scene,
ARS and native BoT differ because the ARS RPP test refreshes r_min.

For origins inside the BoT BVH root box, move the traversal origin
just beyond the box's entry face.  This retains the entrance facets
without the excess traversal from a bounding radius backout.  Rays
originating outside the box need no backout.  Share the calculation
between scalar and vector shots, while keeping triangle intersections
relative to the original ray origin.

Five deterministic, single processor Generic_Twin.g renders per view
had identical pixels with both backout methods.  The box method cut
shot time by 3.5% from inside the flight deck console, 24.5% from
inside a main strut, and 5.9% from inside a tire.  An exterior view
differed by about 0.2% from the radius method.  Avoiding unnecessary BVH
traversal more than offsets the extra box backout arithmetic for
these interior views.

Test direct ARS and BoT shots whose origins are inside the mesh,
including vector shots, and an overlapping composite scene that
reproduces the failure through rt_shootray without setting r_min
manually.
2026-09-17 21:20:03 +00:00
Clifford Yapp bcfb8669c1 Revert "Add Windows GUI session probe"
This reverts commit 066ec0bc8e.
2026-09-17 20:59:30 +00:00
Clifford Yapp 066ec0bc8e Add Windows GUI session probe
Testing whether we can actually do GUI applcation testing on a
Github CI runner.
2026-09-17 16:48:59 +00:00
Clifford Yapp fa3822b8f8 Modularize GUI regression helpers and isolate Xmin backend 2026-09-17 16:35:48 +00:00
Clifford Yapp 4e20274455 Wait for MGED raytrace click before polling 2026-09-17 15:36:23 +00:00
Clifford Yapp c077b5f7f8 List updated dependencies 2026-09-17 09:48:37 -04:00
Clifford Yapp a98c3b6e21 Add libged dependency to arrange_test_masks 2026-09-17 07:40:31 -04:00
Clifford Yapp f4b51eb1ed Make a stab at adding missing NEWS entries 2026-09-17 11:39:28 +00:00
Clifford Yapp 9e3b83a2e5 Corrections to man pages 2026-09-17 11:34:59 +00:00
Clifford Yapp 070fd256f1 Update AUTHORS file 2026-09-17 11:34:13 +00:00
Clifford Yapp 544148d058 Correct detection of a system bullet3 install 2026-09-17 06:57:41 -04:00
Clifford Yapp 1b30244001 Xmin GUI regression coverage
This adds the tests we have been using to exercise the Tcl/Tk GUI apps
in BRL-CAD with the Xmin server.

Register Xmin GUI tests through a shared private-server runner. Exercise
Archer, embedded Archer, RtWizard, MGED, and qged with semantic Tcl
checks, X input, image oracles, background-error capture, and coverage
inventories.

Run the Itcl/Itk widget baseline through btclsh and bwish and check GUI
initialization in independent Tcl interpreters. MGED scenarios cover
editing, rendering, framebuffer contention, Build Pattern, and search
-exec drawing, reentry, and interruption.
2026-09-16 19:59:40 -04:00
Clifford Yapp e78d0530f3 Migrate Tcl code to Itcl and Itk 4
Require Tcl 8.6.18, Itcl 4.3.0, and Itk 4.2.3; update package
selection, class behavior, and bext dependency handling.

Fix MGED Build Pattern construction under Itcl 4. Repair Archer panel
callbacks and menu teardown, select the Iwidgets panedwindow explicitly,
and remove the redundant Toplevel replacement. Document compatibility
findings and migration results.
2026-09-16 19:59:39 -04:00
Clifford Yapp b98fe5e1fb librt: support writes to fileless databases
Convert a phony directory entry to memory storage when db5_realloc
writes to a fileless database. Initialize its pointer before setting
RT_DIR_INMEM so the existing wdb path keeps its ownership rules.

Cover internal and external writes, repeated size changes, readback,
directory reuse, and disk persistence in a registered test.

Fixes #161.
Uses the regression scenario from PR #233.
2026-09-16 23:54:19 +00:00
Clifford Yapp ef61c69eb6 nastran-g: use bu_vls for property names and test large IDs 2026-09-16 19:29:07 -04:00
rupes 17f6252325 conv/nastran-g.c: fix stack buffer overflow for large PIDs
Replace fixed-size char name[NAMESIZE+1] (17 bytes) buffers and
unsafe sprintf calls with 32-byte buffers and snprintf in the
pshell and pbar_group loops.

When a PID exceeds 6 digits (e.g. near INT_MAX), the old sprintf
would silently overflow the stack buffer. snprintf with sizeof(name)
bounds the write and prevents the overflow.

Fixes #211

(cherry picked from commit 89580b154d5176ac9c66530658ee16beffc8cfd6)
2026-09-16 19:29:07 -04:00
Clifford Yapp 75463d5a2f Update bext SHA1 2026-09-16 23:16:55 +00:00
Clifford Yapp f7a496a880 Make libtclcad initialization interpreter-local
Scope initialization, GED, display-manager, framebuffer, and
command-history state to each Tcl interpreter. Preserve idempotent core
initialization and allow a later GUI upgrade. Correct framebuffer
registry growth, enumeration, and deletion, with a native
multiple-interpreter regression.
2026-09-16 19:07:20 -04:00
Clifford Yapp df4e8c5e04 Run MGED clone progress callbacks on the GUI thread
Clone executes on a GED worker. Marshal its optional progress callback
to the GUI thread and pass count arguments as Tcl list elements so Build
Pattern can update Tk safely.
2026-09-16 19:07:20 -04:00
Clifford Yapp 416dbc2604 Serialize asynchronous MGED command execution
Since d6c1f9d5c5 added asynchronous GED command execution, the GUI
thread has pumped Tcl events while a worker owns shared GED, database,
view, and display-list state. Only stdin was guarded, so a timer or GUI
callback could start a second command concurrently.

The search -exec path made this failure more severe by keeping its
secondary interpreter in shared MGED state. A reentrant command could
access or delete that interpreter from the wrong thread. Control-C also
cleaned up the prompt without notifying the worker, after which another
command could abort in TclStackFree with an incorrect freePtr.

Route both Tcl spellings of every MGED command through one dispatcher
and permit only one active command per mged_state. Keep interrupt and
quit available while busy, and use execution-scoped atomic state for a
cooperative search interruption.

Create and delete the secondary search interpreter on the command
worker, using a snapshot captured on the main Tcl thread. Do not invoke
Tcl from a worker-side bomb hook.

Preserve the caller Tcl result across the nested event pump. This is
needed when an internal redraw follows a result-producing operation such
as db_glob. Treat a temporarily unavailable display manager as an
unsupported renderer probe rather than raising a background Tcl error.

Mark rejected nested commands with a specific Tcl error code.  Display
activation can then ignore that expected busy condition while still
surfacing unrelated failures.
2026-09-16 19:07:20 -04:00
Clifford Yapp 019f59ac15 Accelerate legacy display-list path drawing
The display-list design introduced by d7ef83f14c in July 2009 made each
requested draw path a display root. Subsequent changes added a linear
duplicate scan (3006fbdbd0), per-argument erase scans (2a1ac5bf00), and
hierarchy splitting with repeated path parsing (ace8abe3b5).

Together these made drawing N leaf paths O(N^2). Replacing paths below
an existing aggregate root incurred a second quadratic pass because each
new leaf replotted every scene object accumulated under the root.

Maintain lazy private indexes for ordinary display roots and canonical
scene paths. Endpoint sentinels detect callers using the legacy public
list interface; instance-qualified and malformed paths retain parser and
linked-list fallback behavior. Invalidate indexes on rename and clear.

Replot and publish only newly appended scene objects. Fall back to one
whole-root callback for clients lacking the per-scene callback.

Also make scene removal advance safely past objects without private data
and free the display-list ID belonging to each scene object.

On m35.g, separate draws of 1,293 TGC paths fall from roughly 92 seconds
to under one second, including repeated and aggregate-root replacement.

Tests: ged drawing suite, MGED draw regressions, and repository checks.
2026-09-16 19:07:20 -04:00
Clifford Yapp 344ea00e49 Retry interrupted external dependency post-processing
The external file inventories were written before RPATH and path
cleanup.  If plief failed fatally after files had been staged, their
fresh timestamps made the next configure treat the raw copies as current
and skip the failed work.

Persist the set awaiting post-processing, merge that set into the next
changed-file pass, and commit both inventories only after processing
succeeds.  A retry now recopies clean bext inputs before applying the
path transformations, while a successful pass removes the pending state.

Validated recovery by replaying all 187 staged ELF inputs: patched plief
updated 103 RPATHs, including the Tcl 8.6.18 launcher, and a subsequent
no-change configure performed no restaging.  The relocated launcher
loads Itcl 4.3.7 from the build tree.
2026-09-16 19:07:20 -04:00
Clifford Yapp fb3d03ae88 Replace ARB7 inside faceting with exact halfspaces
An ARB7 coincident V5/V8 is incident to four planes. Moving those planes
independently generally changes the local topology, so the result cannot
in general remain an ARB7 or be forced into the fixed ARB8 face layout.
Represent it directly as the intersection of its six translated
halfspaces using ARBN, preserving exact face offsets without NMG
tessellation or BOT approximation.

Validate all triple-plane intersections before writing the result.
Require each plane to remain active and require at least four
non-coplanar feasible vertices, rejecting thicknesses that eliminate a
face or collapse the volume.

This replaces a path introduced in 869b018d03 (1994), when the old
direct ARB point solver was changed to produce NMG topology. Commit
91d12a95d1 (2000) subsequently converted that NMG to a BOT, and
756081571e (2008) carried the implementation into libged. The path now
fails to match the default ARB7 top face. It also contains a latent
lifetime error from 5cf4f84357 (2021): nmg_extrude_cleanup() uses the
shell after nmg_km() frees its model. Removing the obsolete NMG route
eliminates both defects.

Expand the MGED ARB regression to check exact inward and outward plane
offsets, zero thickness, default and explicit small fixtures, ARBN
tessellation, and collapsed-solid rejection. Source the test as one Tcl
command so assertion failures cannot be hidden by MGED line-oriented
stdin handling. Document the ARBN result and add a NEWS entry.

Tests: rt_arb8_tests, regress-mged_3ptarb, regress-mged_arb, equal and
unequal ARBN raytraces, and regress-repository.
2026-09-16 19:07:20 -04:00
Clifford Yapp 3e4eac25ab Fix direct ARB face and edge-direction editing
The libged edarb commands added in May 2013 inherited several latent
argument-handling defects.  The two-angle edgedir form read the
subcommand and object arguments instead of its rotation and fallback
values.  Facedef retained an extrusion-derived type restriction despite
having cases for ARB5 and ARB7, wrote a fixed-point sentinel beyond the
caller argv array for the ARB7 side-face case, accepted out-of-range
vertex selectors, and reported the object name rather than an invalid
form.

The ARB7 fixed-vertex special originated in the 1986 facedef
implementation, where assigning cmd_args[5] was safe because cmd_args
was a separate command buffer.  The April 1996 Tcl conversion changed
that assignment to argv[5], making the five-argument ARB7 invocation an
out-of-bounds write.  That conversion also omitted the required null
terminators from two Tcl_AppendResult calls; the fixed-point message
could consequently crash instead of completing the edit.  The 2013
libged facedef copy preserved the unsafe sentinel technique.

Use local fixed-point arguments, validate named vertices and public
editing table indexes before array access, accept every recognized ARB4
through ARB8 type, parse edge indexes completely, and read the actual
angle arguments.  Centralize cleanup in the legacy MGED path so errors
and quit do not leak its transformed internal object.

Add regression coverage for both edgedir forms, every compact ARB type
in direct facedef, both legacy and direct ARB7 fixed-point cases,
malformed selectors, non-ARB input, and invalid public edit indexes.
2026-09-16 19:07:20 -04:00
Clifford Yapp 3b38bd6028 Initialize rtwizard framebuffer diagnostic state
FbPage may be loaded independently of the rtwizard launcher, but its
occupied-port retry path reads wizard_state(verbose), which only the
launcher initialized.  A real first-port collision could therefore fail
the render instead of advancing to another framebuffer port.

Give the independently loadable package a quiet default without
overriding launcher configuration.
2026-09-16 19:07:20 -04:00
Clifford Yapp bb94477f6c Dispatch TclCAD annotation lines through public GED APIs
The view-specific data_lines wrapper rewrote the command as a generic
view invocation and depended on libged private declarations.  With the
current command organization that path did not update Archer annotation
display state reliably and unnecessarily coupled libtclcad to libged
internals.

Select the requested view temporarily and call the public data_lines or
sdata_lines entry point directly after removing the view argument.
2026-09-16 19:07:20 -04:00
Clifford Yapp c187de0497 Preserve TclCAD unit conversion precision
The base2local and local2base wrappers formatted double-precision
database scale factors with the default six digits after the decimal
point.  Reusing those values during an editor update could therefore
introduce unit-conversion drift even when the user made no change.

Return enough significant digits for a binary double to round-trip.
2026-09-16 19:07:20 -04:00
Clifford Yapp a9af6ad0f5 Avoid Togglearrow callbacks during configuration
Applying -togglestate during construction or configure called the same
private methods as a pointer click, which invoked the user command
before the widget was ready and made programmatic state synchronization
produce action callbacks.

Let the configbody update the visual state without notification while
retaining callback behavior for interactive open and close actions.
2026-09-16 19:07:20 -04:00
Clifford Yapp 0b8b5d56fe Forward Tcl dialog arguments without re-evaluation
Stddlgs wrapped every value in literal braces inside eval, so multi-word
titles and messages were passed as the strings "$title" and "$message"
rather than their values.  Its optional arguments were also nested
inconsistently between the convenience procedures and messagedlg.

Use Tcl argument expansion to preserve value boundaries and accept both
normal trailing options and the legacy single-list form.
2026-09-16 19:07:20 -04:00
Clifford Yapp d019b81c48 Use the registered point-transform Tcl command
The Tcl command is registered as mat_xform_about_pnt, matching the
underlying libbn API, but TankWizard and the cadwidgets wrapper called
mat_xform_about_pt.  Tank generation therefore stopped when it attempted
to orient the gun barrel.

Use the registered spelling in TankWizard and expose the same working
name through cadwidgets::Ged, help data, documentation, and the libged
migration list.
2026-09-16 19:07:20 -04:00
Clifford Yapp a1498589be Fix sketch arc endpoint tangents
Both the Archer and MGED sketch arc classes compared an undefined vertex
variable when choosing endpoint-specific tangent behavior.  Under Itcl 4
this raises an error instead of returning the requested tangent,
affecting bounded arcs and full circles.

Compare the method index parameter to the segment endpoints in both
implementations.
2026-09-16 19:07:20 -04:00
Clifford Yapp eb2c91124c Fix Archer ARB4 point 3 editing
Two switch statements used the point-2 edit token twice, leaving the
point-3 token unmatched.  The duplicate labels date to the 2013
point-edit implementation and prevented Archer from initializing or
dispatching point 3 through its dedicated path.

Use the point-3 token in both switches and remove an obsolete
commented-out geometry write while touching the frame.
2026-09-16 19:07:20 -04:00
Clifford Yapp ffb4b9b777 Correct canonical ARB storage and centroid handling
BRL-CAD compact ARBs have a stable public eight-slot convention: ARB4
repeats V1 at V4 and its apex at V5-V8; ARB5 repeats V5 at V6-V8; ARB6
repeats V5 at V6 and V7 at V8; ARB7 repeats V5 at V8.  The first make
support for ARB4-ARB7 in 3b6c88b755 (February 1985) instead stored an
ARB4 with V4 equal to V3.  Numerical type-in in abf2c2a86e (June 1985)
used V4 equal to V1, so the two creation paths diverged at that point.
The new ARB editor in ea7423aa0b (July 1985) explicitly encoded the
convention above for every compact type.

The specialized mk_arb4 added by d40fb36531 in September 1987 copied the
make layout.  The 1993 import/export conversion in ade6618484, the 2008
move into libged in b586ade52b, and the 2026 move into librt in
70518d83e4 all preserved it.  Validator comments added by 56b03ac259 in
April 2026 consequently described the generator layout as canonical, but
the public contract, type-in path, repair mappings, and editing tables
said otherwise.  The June 2026 editor cleanup in bf4e603b00 and the
subsequent ARB point-edit repairs were not the source of the discrepancy
and use the public convention.

Make rt_arb_make and mk_arb4 produce the documented layout, and identify
standard ARB4 through ARB8 storage by its complete tolerance-aware
vertex-equivalence map.  Compute centroids from representative
geometrically distinct vertices instead of the first N storage slots;
the latter omitted a logical vertex for canonical ARB4 and ARB6.  With
centroid behavior corrected, remove the compensating slot reshuffles
from inside and remove the stale contradictory ARB6 mapping comment.

Database import intentionally preserves raw slot ordering so old
geometry round-trips without an implicit rewrite.  Geometrically valid
nonstandard layouts continue through the convex-hull tessellation
fallback, while the explicit repair operation canonicalizes them.  This
retains compatibility with ARB4s emitted by historical make and mk_arb4
implementations while keeping table-driven operations restricted to
layouts they understand.

Exercise default creation and libwdb factories for ARB4 through ARB8,
standard and nonstandard centroid calculations, validation, DB5 round
trips, repair canonicalization, canonical and fallback tessellation,
inside generation, and canonical storage after the MGED permutation,
mirror, extrusion, point, edge, face, and face-rotation edit paths.  The
corresponding audit found no analogous factory encoding defect in ARB5
through ARB8.
2026-09-16 19:07:20 -04:00
Clifford Yapp 0955bd15af Isolate concurrent MGED framebuffer sessions
A standalone rtwizard fbserv can claim IPv4 port 5559 while
Tcl_OpenTcpServer still reports success to MGED after binding only IPv6
on that port. MGED then records 5559, but its rt child connects over
IPv4 to rtwizard server and leaves MGED embedded framebuffer black.

Inspect Tcl listener addresses and advance to another port unless MGED
owns IPv4, retaining IPv6 whenever both families bind. Generate a token
for each display manager and expose the active token to child tools, so
a token-capable client reaching another BRL-CAD session is rejected.
Continue accepting tokenless clients for the public listener legacy
compatibility.
2026-09-16 19:07:20 -04:00
Clifford Yapp a5ff7ae144 Fix MGED ShotVis editing
ShotVis local atan2 implementation compared literal words instead of its
y argument, and vec_angle misspelled magnitude, omitted acos, and did
not clamp floating-point dot products. These failures broke common
editor and reload paths.

Correct the angle calculations and clamp the dot product before applying
acos.
2026-09-16 19:07:20 -04:00
Clifford Yapp 22aae961dc Fix retained Tcl widget behavior
Functional construction tests exposed several long-standing defects
unrelated to Itcl syntax: CellPlot used its width for vertical scaling,
GeometryIO could not parse or report unsupported output formats
correctly, Listdialog addressed a nonexistent component, and Selectlists
cleanup called component without an argument.

Correct those paths so the retained cadwidgets, Sdialogs, and Swidgets
implementations can be exercised as working components rather than
merely loaded.
2026-09-16 19:07:20 -04:00
Clifford Yapp b418349ec0 Namespace the rtwizard framework class
rtwizard and Archer both defined a global Wizard class.  The result
depended on package load order and prevented both applications from
sharing one Tcl interpreter safely.

Define the rtwizard class explicitly as RtWizard::Wizard, require its
namespaced package from RaytraceWizard, and clear the process-wide
wizard instance when the object is destroyed.  Retain the historical
Wizard package provide as a package-name compatibility alias without
recreating the conflicting global class.
2026-09-16 19:07:20 -04:00
Clifford Yapp aff012734e Remove deprecated Tcl Mged widget stack
The Mged, Database, Db, Dm, Drawable, Display, QuadDisplay, and View
classes were deprecated in 7.20 in favor of cadwidgets::Ged.  A
source-tree survey found that they now form a closed inheritance cluster
with no callers outside that cluster, satisfying the documented removal
policy.

Remove the implementations, build entries, and manuals, and move their
policy record from deprecated to obsolete.  Simplify the retained
model-axes, view-axes, and raytrace controls to validate and use their
actual cadwidgets::Ged dependency.
2026-09-16 19:07:20 -04:00
Clifford Yapp f4baadafff Fix MGED BoT editor property handling
The editor indexed its mode and orientation comboboxes by subtracting
one from bot get results. Commit 7e1875abc6 changed those results to
descriptive strings, leaving the editor unable to initialize its
property pane.

Map the public mode and orientation names explicitly, reject unsupported
values, and refresh both controls after Start Over.
2026-09-16 19:07:20 -04:00
Clifford Yapp 3bb07c2c2f Fix MGED render output and manual launch tools
The Plot dialog still called the removed _mged_pl compatibility name,
while the PostScript path requested a nonexistent postscript display
manager instead of the registered ps type. Restore both output paths
using their current command and display-manager names.

Resolve configured manual browsers before launch, preserve
command-prefix arguments, and fall back to the internal viewer when the
command is unavailable.
2026-09-16 19:07:20 -04:00
Clifford Yapp 2aaed1af29 Restore VDS-backed adaptive BoT wireframes
VDS vertex trees have not been finalized correctly since the 2020-2021
cleanup series. a6c2c7236a made node ID and depth assignment debug-only,
and f05668b3cd made moveTrisToNodes return NULL for internal nodes.
Later null checks prevented crashes but left adaptive BoT plotting
unable to build a usable tree.

Rebuild the complete tree while moving triangle storage, restore
unconditional node path and depth assignment, and add a direct topology,
proxy, traversal, and rendering regression. Also restore the view
point-scale contribution lost in 59dbc14461 so the LOD density setting
changes adaptive geometry.

Fix the MGED dialog to retain current scale values and consistently
enable or disable all dependent controls.
2026-09-16 19:07:20 -04:00
Clifford Yapp 353b669442 Fix redundant gchecker grid analysis
The 2020 C++ port in 8106d89cbd placed the view-independent 1 mm grid
analysis inside the four-azimuth by four-elevation loops. Unlike the
1024-square view sweep, the libanalyze grid pass shoots all three
orthogonal grids itself. This repeated the same scale-dependent work
sixteen times per object, whereas the original check.sh workflow invoked
gqa once per object.

Run the grid analysis once per requested object while retaining all
sixteen view-dependent checks. Also preserve multiple Overlap Tool
selections as distinct arguments, hand the generated result path
directly to Geometry Checker, and verify persistent marks against the
destination file.
2026-09-16 19:07:20 -04:00
Clifford Yapp bc94d9184a Fix Archer tree handling for object names with spaces
Archer's hierarchy member lookup used lt with a literal space delimiter.
That implementation, introduced by 04c4de70c6 on 2016-04-21, cannot
distinguish one object name containing spaces from several object names.
As a result the hierarchy constructed bogus children for a valid
combination.

Walk the combination's structured Boolean tree instead, validating each
operator while collecting leaves.  Also preserve leaf names as Tcl list
elements when combinations pass through Archer's editable tree format,
including matrix-bearing leaves.  This retains arbitrary legal database
names without flattening their word boundaries.
2026-09-16 19:07:19 -04:00
Clifford Yapp c9925010d5 Fix RtWizard multi-object edge occlusion
The list-safe command construction introduced in 595da0e9b2 stopped
passing literal quotes around rtedge's occlusion-object value.  Tcl
preserved the argument boundary, but bu_structparse still needed quotes
around its variable-length string value.  It consequently loaded only
the first object, logged parse errors for the remainder, and returned
success.

Restore the literal quotes, send the final rtedge diagnostics to the
caller-requested log, and add a moss.g type-F regression which verifies
that cone, light, and platform are all loaded as occluders.  This
addresses the long-standing obscured and fuzzy edge-overlay reports in
BUGS.
2026-09-16 19:07:19 -04:00
Clifford Yapp e5a23481c9 Finish RtWizard window and preference behavior
Expose a readiness state for deterministic GUI startup, identify the
open database in the window title, implement the About command, and
select one explicit configuration destination before opening it.

The previous preference update logic duplicated path selection, could
leave its channel undefined, and described the target through a separate
sentinel variable.
2026-09-16 19:07:19 -04:00
Clifford Yapp 4a6137adb7 dxf-g: validate polyface indices before conversion 2026-09-16 18:45:15 -04:00
Meghna45-code e149792d7c dxf-g: Fix heap-buffer-overflow in polyline face generation (issue #228) 2026-09-16 18:45:15 -04:00
Clifford Yapp ac9bfb74c8 Recognize only legacy set syntax in MGED startup files
The startup-file preflight warned whenever any line contained both set
and an equals sign, including valid Tcl values and comments.  Parse the
leading command and first variable token instead, use full-sized input
lines, and identify the actual startup file in the warning.
2026-09-16 18:27:29 -04:00
Clifford Yapp 5cc4992c99 Keep MGED saved-view menus synchronized
Search the actual menu bounds rather than an unrelated maximum-view
setting, update every collaborating player from a single target loop,
and reconcile current and previous selections against the IDs that
remain after deletion.

Stored view IDs are not renumbered, so resetting to numeric ID zero
could leave the radio-menu state pointing at an entry that no longer
exists.
2026-09-16 18:26:59 -04:00
Clifford Yapp 184cdc11a3 Fix MGED font preference application
Always read the configured font-scheme value, including the shared
all-font entry, and persist each applied setting in mged_default.  This
avoids trying to configure the nonexistent button_font name and makes
accepted font preferences survive later GUI creation.
2026-09-16 18:26:22 -04:00
Clifford Yapp 2be5c94ed0 Preserve Archer combination Boolean tree grouping
Archer displayed a flattened text form of a combination tree and always
rebuilt the stored tree from that form, even when the user changed only
color or another unrelated attribute.  packTree necessarily selected new
grouping for non-associative subtraction and intersection expressions.

Retain the exact database tree while its displayed text remains
unchanged, and update the saved baseline after an edit.  Explicit user
edits to the tree continue to be packed normally.
2026-09-16 18:25:41 -04:00
Clifford Yapp 0edab91067 Keep Archer argv storage owned by the caller
Pass the adjusted argument range to Tcl without mutating the original
argv pointer.  Advancing the local pointer caused the cleanup path to
free a non-base address, which made archer -h abort after printing help.
2026-09-16 18:25:00 -04:00
Clifford Yapp d53fe369bb Make the MGED Geometry Browser close cleanly
Install the previously disconnected File/Close menu, wire both it and
the window-manager close action to object destruction, and cancel the
actual polling callback rather than the literal string _updateHook.

Keep the Tk menu outside Itk component ownership.  Registering it as a
component causes Itk 4 to remove it during toplevel destruction before
the base destructor enumerates components, resulting in a background
error.  Geometry Browser construction errors are now propagated to
callers as well.
2026-09-16 18:24:42 -04:00
Clifford Yapp 8d450bb524 Fix MGED view unshare resource ownership
A 2012 Coverity cleanup (05b3ca2935) moved SHARE_RESOURCE ahead of the
saved view-state assignment.  The assignment consequently captured the
newly allocated private state, making the pointer comparison permanently
false.

Save the shared state before splitting its reference count and rebuild
the intrusive view ring in the private copy.  This prevents invalid ring
links and crashes when a collaborating MGED player leaves and closes.
2026-09-16 18:23:42 -04:00
Clifford Yapp 0db84a55a9 Document recent Archer user-visible changes
Record the embedded menu repair, preference file override, command-line
help, and documentation menu fix already present on main.
2026-09-16 18:23:05 -04:00
Clifford Yapp fb7e9dc109 Preserve qged command-line state during Qt startup
Keep the original executable argument vector for QApplication while
parsing BRL-CAD options through a separate view. Pass the resulting
geometry filename explicitly to QgEdApp so a normal qged model launch
does not present the model path as argv[0] to Qt.

Build qged as a position-independent executable where the linker
supports it. This keeps the executable compatible with the shared Qt
platform and rendering stack used by the Xmin launch fixture.
2026-09-16 15:42:27 -04:00
Clifford Yapp c0bc21ec0b Allow isolated Archer preference files 2026-09-16 15:42:07 -04:00
Clifford Yapp 4e9db18cbb Fix embedded Archer menu construction 2026-09-16 15:42:00 -04:00
Clifford Yapp 32cbdbbac5 Add support for bext content stamp 2026-09-16 15:40:13 -04:00
Clifford Yapp 62c8c52f8f Use shorter pathname for bext build 2026-09-16 15:40:06 -04:00
Clifford Yapp dbe951d2a4 Stabilize bundled package discovery
Resolve Zlib before packages that can import it, and defer OpenVDB
lookup until bext files have been staged.  Clear cached component and
variant paths when dependency providers change, and reset Bullet's
failed system lookup before selecting bundled libraries.

Link g-vdb through OpenVDB's imported target so its dependency usage
requirements are applied consistently.
2026-09-16 15:40:00 -04:00
Clifford Yapp aa76ac4476 Add optional Xmin build support
Xmin (https://github.com/starseeker/Xmin) is a small, self-contained X11 server
and basic client library harness intended for headless testing of X graphical
stacks.  It can display (with patching of the libraries in question to build
against its client support) the Tk and Qt graphical toolkits.

This is a testing only configuration, but it has proven useful on a couple
separate occasions now so it seems easier to set up our build system to support
using it than require hacking it in every time.

Accordingly, we add an explicit XMIN X11 provider without changing the default
system-X11 behavior.  Require Tk, OpenGL, Qt, display-manager, and TclCAD
consumers to use one consistent X11 ABI, and forward the selected Xmin SDK and
toolkit patch configuration into managed bext builds.

We also teach the X, GLX, Tk software-rendering, TclCAD, MGED, and Qt
dependency setup to consume the imported Xmin targets.
2026-09-16 15:28:30 -04:00
Clifford Yapp 509ef228c4 bump bext SHA1 2026-09-16 10:07:45 -04:00
Clifford Yapp f74335c301 regression fixes 2026-09-15 22:22:38 -04:00
Clifford Yapp 5b79ac536d Werror=float-equal fixes 2026-09-15 14:19:45 -04:00
Clifford Yapp 7f4fcb5ca2 Mention ZERO/EQUAL and regress-licenses in AGENTS.md - observed failure modes on multiple occasions, should be fairly straightforward to avoid/fix. 2026-09-15 14:06:58 -04:00
Christopher Sean Morrison a7907d0c34 fix pixdiff 2026-09-15 12:13:03 -04:00
Christopher Sean Morrison 8c97de10fe initial beginnings of a new 'arrange' command for geometry layout.
currently has just one arrangement mode for packing/nesting objects into a specified space.
2026-09-15 02:10:29 -04:00
Christopher Sean Morrison ed628ef725 fix mnual build dispatch. nix apt cache. don't ignore lcov rebuilds. 2026-09-15 04:56:35 +00:00
Christopher Sean Morrison 366a83f8ed not cmake, so set export as shell var instead 2026-09-15 04:56:35 +00:00
Christopher Sean Morrison c087ad6c23 typo on the build dir creation, but not needed. also removed the cache steps as they were also failing (root-owned files). 2026-09-15 04:56:35 +00:00
Christopher Sean Morrison 4e2c6edd34 pass install dirs to cmake so it applies destdir only once.
was getting set twice to DESTDIR/DESTDIR/... so the rpath and cleanup tools and rpm weren't working right (not an elf file message).  fail explicitly when the expected staged file is missing
2026-09-15 04:56:35 +00:00
Christopher Sean Morrison 3fda4849b6 removed the tmate sessions so failed distchecks terminate after outputting their logs instead of waiting.
they were basically waiting until the workflow timeout on failure. this now allows each check to contineu after a prior dep fails, and still stops if the job is explicitly cancelled.

also removed the apt archive caches that appeared to be broken.
2026-09-15 04:56:35 +00:00
Clifford Yapp 56157eb27d Update bext SHA1 2026-09-14 09:35:07 -04:00
Clifford Yapp 39cab50e45 Fix lcov build annot test crash
In src/librt/primitives/annot/annot.c:2058, this is unsafe:

VMOVE(polygon[polygon_count++], vp->pt[i]);

VMOVE is a macro that evaluates its destination three times—once for X,
Y, and Z. Consequently, polygon_count increments three times. Starting
at 1, it writes approximately:

polygon[1][X]
polygon[2][Y]
polygon[3][Z]  /* outside point_t polygon[3] */

The final write corrupts the stack. Under the coverage build, it
overwrites the return address of annot_segment_mesh(). The debugger
showed that address becoming 0x4042000000000000, the IEEE-754
representation of 36.0, confirming that a point coordinate was written
over it. The segfault then occurs as the function returns at line
2080.

This explains why lcov could fail while other configurations pass:
coverage instrumentation changes the stack layout enough for the
overflow to hit the saved return address.
2026-09-14 06:49:11 -04:00
Christopher Sean Morrison 93b5f01152 make the anticipated output explicit 2026-09-14 04:17:35 +00:00
Christopher Sean Morrison 5eabb821f0 keep track or more clean files 2026-09-14 04:16:49 +00:00
Christopher Sean Morrison e900b5cc17 capture the geometry worker stall timeout value 2026-09-14 04:15:27 +00:00
Christopher Sean Morrison 1b805c0751 don't just print, fail if we don't have rgb array to output into 2026-09-14 04:14:39 +00:00
Christopher Sean Morrison 11a8ac215d pull up the round-trip reporting (not a fix, just better diagnostic for the segfault cause 2026-09-14 04:13:18 +00:00
Christopher Sean Morrison 6feb50e16f move the magic numbers to the decl 2026-09-14 04:11:43 +00:00
Christopher Sean Morrison 20a7dfbac4 quote the quotes 2026-09-14 04:10:48 +00:00
Christopher Sean Morrison a17e4ce6a8 init proper 2026-09-14 04:10:13 +00:00
Christopher Sean Morrison cd31709988 make null vtk arrays a stopper 2026-09-14 04:09:25 +00:00
Christopher Sean Morrison d531e90514 more generated files to keep out of distcheck 2026-09-14 04:07:54 +00:00
Christopher Sean Morrison ca08b6d2d8 keep the generated files out of distcheck 2026-09-14 04:05:57 +00:00
Christopher Sean Morrison 8d66851472 include string.h for strerror 2026-09-14 04:04:44 +00:00
Clifford Yapp 2d23c2d55d Add WINSOCK_LIB 2026-09-10 20:56:10 -04:00
Clifford Yapp 9a075acdf6 Werror=float-equal 2026-09-10 20:52:21 -04:00
Clifford Yapp a50159c33e Update bext SHA1 2026-09-10 19:34:57 -04:00
Clifford Yapp f426985a39 Various build fixes
- Add missing thread dependency for gcv_iges_core

- Prevent rt_mk_binunif() from scanning a nonexistent
  backing file for in-memory databases
2026-09-10 17:57:21 +00:00
Clifford Yapp 51abddb656 Use TinyGLTF v3 for native glTF I/O
Migrate the native glTF readers and BoT exporter from TinyGLTF's v2 C++
interface to the v3 C API.  Share checked accessor handling between gltf-g
and the GCV plugin.

Constrain external asset reads to the source model's canonical directory,
including protection against symlink escapes.  Limit input files, individual
allocations, and parser memory, retain encoded images without decoding, and
avoid preserving unused extension data unless requested.

Rewrite BoT export using the v3 POD model and writer API.  Correct index
accessor counts, validate face indices and buffer sizes, align combined
buffer data, and initialize exporter state reliably.

TinyGLTF v3 validates accessor component types against the glTF 2.0
specification.  By default this removes support for BRL-CAD's non-standard
DOUBLE POSITION accessors: models written with `bot dump -F` are no longer
accepted by the native v3 readers.  We have patched our bext copy of
tinygltf to support reading back in old files written with the -F option,
but it is longer supported as an output mode since that formatting is
non-compliant (other readers do not support it - that problem has already
been seen in the wild - and tinygltf upstream no longer supports it either.
2026-09-10 17:15:17 +00:00
Clifford Yapp b1121cc111 Make a stab at reusing artifacts produced by bext CI builds for BRL-CAD. 2026-09-10 16:02:46 +00:00
Christopher Sean Morrison 4faa689bff add a simple regression tests for the building generator 2026-09-09 19:35:12 -04:00
Christopher Sean Morrison 5d7023b052 merged main 2026-09-08 13:39:18 -04:00
Christopher Sean Morrison 0d1986d48b fix network double conversions in cv
only treat network doubles as host data when the formats actually match, handle signed double cookies and cross-type output correctly, and respect output buffer limits
2026-09-07 23:34:09 -04:00
Christopher Sean Morrison efc31acf9f fix cv32 conversions on lp64 hosts
use int-sized host values throughout cookie conversions to avoid bad strides and buffer overruns, and add coverage for signed, unsigned, network, host, and double conversions
2026-09-07 23:19:04 -04:00
Christopher Sean Morrison 10242e2b5e Diagonal is deprecated, use DiagonalTransformation 2026-09-07 22:02:52 -04:00
Christopher Sean Morrison df12a2f042 fixed binunif inconsistency handling 2026-09-07 22:00:49 -04:00
Christopher Sean Morrison c3c72dd30c add tests for bo command and binunif object creation 2026-09-07 22:00:28 -04:00
Christopher Sean Morrison 393453dd07 this should take care of binunif and dsp read/writing consistency. bo command now takes a hint for network ordering (defaults to host) when making a binunif, and consistently/correctly converts it to network order going to disk and host order in memory.
the mk_binunif and rt_mk_binunif interaces also take a type hint that lets the caller indicate host/network.  while we're at it, binunif was expanded for 64bit support, and undid/fixed host-to-network flipping that gcv's gdal converter was doing prematurely.
2026-09-07 21:59:25 -04:00
Christopher Sean Morrison 700d21696e implement support for 64-bit conversions 2026-09-07 21:04:06 -04:00
Christopher Sean Morrison 35a3836b72 cv command improvements
now defaults to signed conversion.  actually converts 64bit data.  fixes an LP64 issue with 32-bit data.  and fixes network-to-host doubles on little-endian bug
2026-09-07 19:46:31 -04:00
Christopher Sean Morrison f7dfff8cb2 default behavior to signed by default so it'll preserve it when there is one 2026-09-07 19:33:40 -04:00
Christopher Sean Morrison 9790937086 now roof gap should be fixed for garage and bunkers also 2026-09-07 19:20:41 -04:00
Christopher Sean Morrison 4ed01c7d5c now roof gap should be fixed for garage and bunkers also 2026-09-07 19:20:31 -04:00
Christopher Sean Morrison f030786f40 more work towards closing the roof lines 2026-09-07 18:45:29 -04:00
Christopher Sean Morrison e7cb46844c fix more floating roofs that were offset from facades, pillars/beams, walls, etc 2026-09-07 18:30:45 -04:00
Christopher Sean Morrison 23fe438aa8 rtip unused 2026-09-07 17:22:25 -04:00
Christopher Sean Morrison c741dce11e formalize dpix files as big-endian IEEE 754 encoded doubles, instead of little-endian. wasn't defined previously, but let that be a distinguishing feature of dpix vs the various d-* tools that assuming host order doubles. 2026-09-07 17:08:29 -04:00
Christopher Sean Morrison c4f5391f80 initial manual page for the dpix file format 2026-09-07 17:08:02 -04:00
Christopher Sean Morrison 85a1958804 these dozen are now fixed or obe 2026-09-07 16:45:49 -04:00
Christopher Sean Morrison 12b876a97d couple more bug fixes, invalid bot xform and glb import 2026-09-07 16:45:28 -04:00
Christopher Sean Morrison e221a5b36c nmg are way faster most of the time 2026-09-07 14:03:20 -04:00
Christopher Sean Morrison 2b3f7320b9 mkbuilding promoted to shapes 2026-09-07 14:01:02 -04:00
Christopher Sean Morrison eb36d9e6bd make sure that getenv isn't null 2026-09-07 14:00:42 -04:00
Christopher Sean Morrison 3f5d860e1f include gltf in the regression test set now that it's importing better 2026-09-07 14:00:27 -04:00
Christopher Sean Morrison 5c6563e2e2 init the submodel matrix 2026-09-07 13:59:58 -04:00
Christopher Sean Morrison 3012aec103 make sure we don't print nulls from getenv 2026-09-07 13:59:34 -04:00
Christopher Sean Morrison f1bc53711a validation and cleanup to safely handle malformed or varied input, particularly 32-bit indices 2026-09-07 13:58:18 -04:00
Christopher Sean Morrison 9f585e045d protect against null env reads 2026-09-07 13:56:16 -04:00
Christopher Sean Morrison f6fbd14204 ahh, update the external callers to libnmg 2026-09-07 13:54:50 -04:00
Christopher Sean Morrison c45fb38aea track matrices, so they can be applied to the submodel 2026-09-07 13:52:44 -04:00
Christopher Sean Morrison 09c72d4820 major perf gain for nmg about 10-20x faster in testing, now using bot when the nmg is a 3-manifold closed planar surface. also uses new scratch space for hit tracking on the old code which is also about 25% faster.
this will certainly beg for more exhaustive release integration testing, but benefit of the hlbvh definitely showing.
2026-09-07 13:49:21 -04:00
Christopher Sean Morrison 76889cb30e promote rt_bot_shot_specific() for cross-primitive use... 2026-09-07 13:46:19 -04:00
Christopher Sean Morrison d064ac866b be more careful if env var set/get result in null 2026-09-07 13:45:39 -04:00
Christopher Sean Morrison 688b5bcfff include a test for trying to xform a bot with missing normals 2026-09-07 13:44:47 -04:00
Christopher Sean Morrison b08f3f68df reject if we attempt to xform a bad bot (e.g., missing normals it says it has) 2026-09-07 13:44:11 -04:00
Christopher Sean Morrison 6416096a4b optimization speed up giving about a 25-40% improvement by avoiding most dynamic allocs. now leveraging a local scratch space instead of relying on the re_nmgfree global freelist pool. this gets rid of nearly all dynamic memory allocation during nmg shot. 2026-09-07 13:33:25 -04:00
Christopher Sean Morrison f5077bca84 need some place to hang our scratch space data if we're not going to use the global pool 2026-09-07 13:30:38 -04:00
Christopher Sean Morrison 89425ef47c document root2leaf and the dbip context 2026-09-07 13:29:25 -04:00
Christopher Sean Morrison 2743435a71 declare some pooling structure API to help speed up some of the nmg processing. this will need to get revisited, but initial results showing 1.36x boost 2026-09-07 13:28:42 -04:00
Christopher Sean Morrison b8f3574f06 update docs now that rt -b can take a single pixel index value 2026-09-07 13:25:22 -04:00
Christopher Sean Morrison 4beb5d25d4 update building example 2026-09-07 13:24:51 -04:00
Christopher Sean Morrison c81b95b191 mkbuilding now does a lot more 2026-09-07 13:23:55 -04:00
Christopher Sean Morrison ce3f3f9ef3 dsp command and rt_mk_binunif() have an unresolved contradiction. docs say file is network, mk_binunif assumes host. 2026-09-07 13:22:24 -04:00
Christopher Sean Morrison 4d0e88f7f9 these are all fixed now 2026-09-07 13:18:29 -04:00
Christopher Sean Morrison 2cd2e5b749 add the submodel xform testing, changes to make it pass incoming. 2026-09-07 12:25:37 -04:00
Christopher Sean Morrison 631046b763 make sure the env vars are non-null before printing 2026-09-07 12:23:07 -04:00
Christopher Sean Morrison 70a5f42ce1 initial throws of a new geometry arrangement command, particularly for knapsack-style problems but generalizable to other patterns 2026-09-07 12:14:25 -04:00
Clifford Yapp 69de8cdd96 List file for distcheck 2026-09-07 11:04:49 -04:00
Clifford Yapp 805ccc28d5 Windows regress fixes 2026-09-07 11:02:15 -04:00
Christopher Sean Morrison 096f5d5449 add NMG_GET_HITMISS_RD and NMG_FREE_HITLIST_RD alternatives to the ones sans _RD that don't go through the global 2026-09-07 09:52:28 -04:00
Christopher Sean Morrison c8cd0f7645 env PKG_ADDR_ENVVAR var might be null 2026-09-07 09:48:57 -04:00
Christopher Sean Morrison d320c97eec add tests to assert whether submodel transforms are working (they are not yet) 2026-09-07 09:48:57 -04:00
Clifford Yapp 546b8d34fc regress-repository changes. See if we can have AIs do these checks as routine validation so the CI doesn't have to catch them. 2026-09-07 09:44:10 -04:00
Clifford Yapp ae9aed4d94 Replace legacy IGES converters with a shared C++17 libgcv core
Move IGES parsing, conversion, reporting, and writing into a private
shared core used by the libgcv plugin and thin iges-g and g-iges
executables. Remove the superseded converter implementations while
retaining NMG import and export support.

Reconstruct trimmed surfaces and solid topology with relative
tolerances, bounded recovery, reassembly, and orientation checks.
Preserve incomplete solid intent and emit connected open sheets
separately with color and provenance metadata.

Support native CSG, B-Rep, wire, and annotation conversion. Prefer
primitive B-Rep export when native CSG is unavailable and retain
explicit NMG export paths.

Modernize command-line parsing, allow positional destination files with
-o compatibility, stage outputs safely, and expose five-second progress
updates and structured conversion reports.

Add parser, recovery, orientation, plugin, I/O failure, and native
round-trip coverage. Relocate the regression models, update the
regression driver, and document the architecture and converter behavior.
2026-09-06 21:16:04 -04:00
Clifford Yapp 9153fe11d8 Preserve B-Rep attributes during in-place geometry edits
Write the loaded database internal back after B-Rep edits instead of
recreating the primitive with mk_brep. Reuse one write helper across
flip, shrink, geometry, and topology commands.

This retains source provenance, repair state, and incomplete solid
markers while changing the geometry.
2026-09-06 20:53:38 -04:00
Clifford Yapp 53b505abf1 Preserve incomplete solid intent in B-Rep validity checks
Define an attribute for B-Reps retained from unreconstructed solids.
Reject marked objects during validity checks, raytrace preparation, and
preparation serialization, and do not treat them as plate-mode sheets.

Keep incomplete geometry available for repair without silently assigning
it different solid semantics. Leave the existing handling of unmarked
B-Reps unchanged: IsValid() failures alone do not prevent raytrace
preparation.
2026-09-06 20:53:38 -04:00
Clifford Yapp 38438722c6 Only finalize initialized B-Rep diagnostic argument lists
Keep va_end in the same conditional scope as va_start in brep_log. A
null diagnostic destination must not finalize an uninitialized variadic
argument list.
2026-09-06 20:39:11 -04:00
Clifford Yapp 52287f9974 Use shared B-Rep assembly for primitive caps and sweeps
Replace private curve-matching, naked-edge merging, and face orientation
helpers with the libbrep assembly APIs.

Update cap construction, particle stitching, and pipe assembly to pass
their distance tolerances explicitly, removing the duplicate topology
repair implementations.
2026-09-06 20:39:11 -04:00
Clifford Yapp 3db1cac21b Add conservative B-Rep stitching and assembly helpers
Provide shared APIs for curve coincidence, naked-edge stitching,
endpoint tolerances, face orientation, and assembly validation. Report
repairs and unresolved topology without forcing ambiguous edge matches.

Use bounded curve comparison rather than fixed samples alone, support
reparameterized rational curves, and preserve existing edge tolerances
while accounting for endpoint distances.

Add regressions for false sampled matches, equivalent circle
parameterizations, detached box assembly, and tolerance preservation.
2026-09-06 20:39:11 -04:00
Clifford Yapp 32d8a7de23 Expose validated curve-to-surface pullbacks in libbrep
Add a surface-based pullback API and implement the face overload using
the shared projection context. Return structured failure reasons when
samples cannot form a usable parameter curve.

Join samples on a continuous periodic image, handle collapsed parameter
spans, and align singular endpoints only within the requested tolerance.
Validate the lifted polyline against the source curve before returning
it.

Extend pullback tests for periodic curves, collapsed spans, and singular
endpoint alignment.
2026-09-06 20:39:11 -04:00
Clifford Yapp 4436b92d7c Bound NURBS closest-point refinement to the selected bracket
Replace the Newton and binary fallback search with sampled chord
selection followed by bounded golden-section refinement. The old
fallback could report convergence at a bracket endpoint without finding
the closest point within it.

Validate the input and domain, skip unusable sampled segments, compare
interval endpoints, and retain the maximum-distance check used by
projection callers.
2026-09-06 20:39:11 -04:00
Clifford Yapp 19df3055bf Use shared database name sanitization in STEP converters
Normalize decoded STEP names with db_sanitize_name while retaining the
STEP-specific empty-name fallback. Remove the duplicate transliteration
table and unused wrapper cleanup methods.

Link the affected converter, plugin host, and test targets against librt
for the shared naming API.
2026-09-06 20:39:11 -04:00
Clifford Yapp 6987f9b843 Add shared UTF-8 database object name sanitization
Introduce db_sanitize_name for consistent ASCII database names across
importers. Decode UTF-8, transliterate common Latin characters, encode
other code points, and collapse punctuation into separators.

Leave empty-name fallbacks and collision handling to callers. Add
coverage for punctuation, accented names, non-Latin characters, and
names that normalize to an empty string.
2026-09-06 20:39:11 -04:00
Clifford Yapp 6bee6fd622 Handle NMG regions without outer shells safely
Return an empty shell list when decomposition finds no outer shells
instead of requesting a zero-sized allocation. Free the temporary
outer-shell table structure as well as its contents.

Document result ownership and topology changes, and add an empty-region
regression that checks the output pointer is cleared.
2026-09-06 20:39:11 -04:00
Clifford Yapp 051601f64d Keep positional values intact in gcv filter argument lists
Only remove option prefixes from tokens that actually begin with a dash.
Pass plain values and a lone dash through to the selected filter
unchanged.

This prevents a one-character value such as 0 from becoming an empty
top-level option during format argument parsing.
2026-09-06 20:39:10 -04:00
Clifford Yapp a9a024dca7 Respect argument bounds in option parse error reporting
Use the parser's current option and remaining argument count when
reporting a missing or invalid value. Do not read an argv slot outside
the caller's argc slice, and restore an equals-form argument before
returning an error.

Add a regression with a populated backing argv slot beyond argc to
verify that the missing-argument diagnostic stays bounded.
2026-09-06 20:39:10 -04:00
Clifford Yapp 5b8b368cab Honor primitive colors in shaded drawing
Share wireframe color-attribute parsing with shaded B-Rep, BoT, and polygon drawing. Preserve explicit draw overrides and inherited/default fallback behavior without modifying shared drawing state.

Add a headless B-Rep and BoT regression covering primitive and parent colors, inheritance, explicit overrides, invalid attributes, clamping, and differently colored siblings in wireframe and both shaded modes.
2026-09-06 19:14:01 -04:00
Clifford Yapp c98ff72c4a Use a vls for label 2026-09-06 15:13:45 -04:00
Christopher Sean Morrison ee7c279853 make rt's -b option take either x/y coordinates or a single index value. very useful for debugging and single-ray query. 2026-09-06 08:19:10 -04:00
Christopher Sean Morrison 617a31343b make rt's -b option take either x/y coordinates or a single index value. very useful for debugging and single-ray query. 2026-09-06 08:17:43 -04:00
Christopher Sean Morrison f89e04a16f make icv also format-aware that .dpix files are now encoded in network order. 2026-09-06 08:11:21 -04:00
Christopher Sean Morrison 1ac31323b4 init the matrix! 2026-09-06 08:09:02 -04:00
Christopher Sean Morrison a6b50687c5 .dpix files are now portable (previously written out host-order, now always network-order 2026-09-06 08:08:26 -04:00
Christopher Sean Morrison 521a6d3cfb make sure building walls meet up with the roof, gable is properly closed 2026-09-06 08:05:08 -04:00
Christopher Sean Morrison d985e5e111 significant change to DPIX file format to assume/require on-disk encoding to be network-order bytes.
this fixes a portability incompatibility bug where a little-endian system would write out host-order and another big-endian would read the DPIX flipped.

only able to take this liberty because there is not any published documentation on what the dpix file format is or what tools like dpix-pix are expecting.  does open a can of worms though on all the other signal processing tools that currently read/write host doubles -- probably should introduce a byte-swap option on all of them just as a safety net.
2026-09-06 07:59:12 -04:00
Christopher Sean Morrison 02abfa3e38 pixscale now reads stdin pix files just fine 2026-09-05 22:27:21 -04:00
Christopher Sean Morrison f739ee4436 reuse buffered scanlines so long, non-seekable stdin streams work correctly 2026-09-05 22:25:51 -04:00
Christopher Sean Morrison 4a5f86d4ff add a new procedural building generator.
it has configurable floors, footprints, roofs, walls, doors, windows, columns, beams, slabs, foundations, installations, materials, colors, underground/minimum levels, and recursive building parts.

imports OSM Simple 3D Buildings, OSM building attributes, GeoJSON, Overpass JSON, and OGC CityJSON.  saves lots of metadata as attributes (particularly stuff we're not doing anything with but might be useful later).

should be all solid geometry, but there are some issues to resolve like floating roofs that probably need implicit closure/attachment.
2026-09-05 19:31:34 -04:00
Christopher Sean Morrison f1794e6908 remove old mkbuilding proc that essentially just make a hollow box, replacing with something far more robust 2026-09-05 18:46:55 -04:00
Christopher Sean Morrison b551ceb770 docs for the new procedural building generator (mkbuilding) which needs a better name 2026-09-05 18:42:33 -04:00
Clifford Yapp 203bba3617 Keep MGED display-list callbacks on the GUI thread
Interactive GED commands run on a worker so long operations do not block
Tk, but their display-list callbacks inherited the worker thread. OpenGL
contexts are thread-affine, so glGenLists could crash when display lists
were enabled.

Record the GUI Tcl thread and synchronously marshal display-list and
refresh callbacks through its event queue. Continue servicing events
during staged shutdown so a worker cannot deadlock waiting for a queued
callback. Use each display manager context for list allocation,
compilation, and deletion instead of the globally current DMP.

This preserves asynchronous geometry work while keeping all GL access on
the owning thread.
2026-09-05 08:51:36 -04:00
Clifford Yapp a092d2b99d libbg: deduplicate polyhedron face vertices 2026-09-04 13:32:20 -04:00
Clifford Yapp cc51c56b0c libbg: sort 3D polygon vertices by angle 2026-09-04 13:32:09 -04:00
Clifford Yapp 259e20ac56 librt: defer missing VOL data diagnostics to prep 2026-09-04 09:52:47 -04:00
Clifford Yapp bb67c55eef analyze: use primitive metrics for ARBN totals 2026-09-04 09:42:26 -04:00
Clifford Yapp dd171575a5 librt: compute ARBN metrics without NMG 2026-09-04 09:42:18 -04:00
Clifford Yapp baefe7570b librt: reject empty BoT repair results 2026-09-04 09:41:49 -04:00
Clifford Yapp e2cdfa3a6a librt: reject unloaded VOL data during prep 2026-09-04 09:40:30 -04:00
Clifford Yapp 398337892a librt: correct HYP volume integration 2026-09-04 09:40:18 -04:00
Clifford Yapp 658a26c09a Put the new docs in the active list, mention https://brl-cad.github.io/doxygen/ in the api reference 2026-09-03 10:59:31 -04:00
Clifford Yapp ae9df61cbf distcheck-source_archive fixes 2026-09-03 08:49:50 -04:00
Clifford Yapp 5a88ce3994 Check both memsz and type 2026-09-03 08:30:32 -04:00
Clifford Yapp cf4c917d26 Missed an fgets 2026-09-03 06:56:10 -04:00
Clifford Yapp b45f61d419 Try to get some sense of available memory
This problem doesn't have a perfect solution even on one platform, much
less cross platform, but make a stab at adding some logic to give us
some sense of what our memory availability is.
2026-09-02 20:54:22 -04:00
Clifford Yapp 211ea836a8 See if pointing AGENTS.md to HACKING helps with regress-repository 2026-09-02 20:50:18 -04:00
Clifford Yapp 99b712f67f Use bu_fgets 2026-09-02 20:43:43 -04:00
Clifford Yapp c4b51eedad Update to latest bext SHA1 2026-09-02 16:58:18 -04:00
Clifford Yapp 08c56c000b Build fixes 2026-09-02 16:13:31 -04:00
Clifford Yapp 720463c10e facetize: supervise transactional persistent workers
The old facetize behavior sent batches of objects as command arguments and
binary searched for failure objects when encountered - the latter behavior is
extremely slow when there are lots of failures.  Instead, launch a subprocess
and pipe objects to it, managing and at need restarting that subprocess without
the hack of batching command line args to communiate what needs processing.
Use a communication protocol to make it clear what data is passing between
parent and child.

Use improved bu_process polling and termination APIs, allowing us to
remove the private vendored subprocess.h implementation.
2026-09-02 15:44:19 -04:00
Clifford Yapp a8d182dc49 librt: raytrace annotations as transient BOT geometry 2026-09-02 15:21:05 -04:00
Clifford Yapp 5c09639c72 libged: exclude annotations from region-id coloring 2026-09-02 15:21:05 -04:00
Christopher Sean Morrison b649cd8244 fit descriptions 2026-09-02 14:07:09 -04:00
Christopher Sean Morrison b80cecd498 Merge branch 'wip-7-46' 2026-09-02 13:51:19 -04:00
Christopher Sean Morrison 12e37dc7b5 another merge from main 2026-09-02 13:03:40 -04:00
Clifford Yapp 0d6cc34a13 Various adjustments to bu_process I/O handling and lifecycle 2026-09-02 10:41:15 -04:00
Christopher Sean Morrison 76b7fe6843 more merging of latest main 2026-09-02 09:32:38 -04:00
Christopher Sean Morrison 233fdbd5b8 Merge latest main into wip-7-46 and fix some of the integration (merge and deconflict overlapping work) 2026-09-02 09:09:33 -04:00
Clifford Yapp bcaebb24e1 libbu: preserve Windows subprocess arguments
Replace the path-and-whitespace quoting heuristic with Microsoft C runtime escaping for every argument.  This preserves empty arguments, embedded quotes, whitespace, and backslash runs when CreateProcess reconstructs argv.

Add binary-safe argument round-trip coverage with the subprocess fixture so Windows newline translation does not obscure quoting failures.
2026-09-01 18:39:05 -04:00
Clifford Yapp cbf06cf06c libbu: make process output readiness nonblocking
Use a zero-timeout select on POSIX and reject descriptors that cannot be checked safely.  Document bu_process_pending as a readiness hint, since EOF and errors are intentionally collapsed into its boolean result.

Exercise the nonblocking contract and wait for both output channels in the stream test without busy-spinning.
2026-09-01 18:39:05 -04:00
Clifford Yapp d4d218e86d libbu: harden subprocess creation and timed waits
Initialize pipe and process handles before setup, unwind partial creation failures, and close Windows thread handles once CreateProcess succeeds.  POSIX descriptor redirection now fails the child immediately rather than continuing with a broken channel.

Make bu_process_wait_n honor its millisecond contract without spinning, distinguish wait errors from timeouts, and reap only the direct child.  Timeout cleanup still targets the full process tree, falls back to the direct POSIX child when necessary, and reports forced termination consistently.
2026-09-01 18:39:05 -04:00
Clifford Yapp 8fbc36585b libbu: preserve subprocess status during supervision
Add process-aware poll and terminate operations without consuming the bu_process handle. Cache completion status for later waits, return normal POSIX exit codes, keep unread output available after polling, and continue terminating process descendants after the group leader exits.
2026-09-01 18:39:05 -04:00
Clifford Yapp f25c84cea7 Consoliate deprecated bu_process API at the bottom of the header. 2026-09-01 18:39:05 -04:00
Clifford Yapp 4864d412f9 Revert "Don't use region coloring for annotations"
Conflated with other work, back out for now.

This reverts commit ac4ebdd0f2.
2026-09-01 18:37:23 -04:00
Clifford Yapp ac4ebdd0f2 Don't use region coloring for annotations 2026-09-01 20:28:34 +00:00
Clifford Yapp ce402cbbc0 Group bot split outputs under a comb 2026-09-01 17:29:23 +00:00
Clifford Yapp 44a4502f49 Add bu_setprogname 2026-09-01 13:01:50 -04:00
Clifford Yapp fd9a263088 libged: preserve BOT data in split and decimate commands
Consolidate bot split and the deprecated bot_split command on a shared
rt_bot_split implementation.  Preserve BOT metadata and database
attributes, skip occupied output-name suffixes, and roll back partial
output when a write fails.

Update bot decimate to use face provenance and rt_bot_gc so plate data,
normals, texture UVs, flags, and object attributes survive compaction.
Improve cleanup of failed database writes.

Document the edge-connected split semantics and bot_split deprecation,
and add command-level regression coverage for both interfaces, naming
collisions, attributes, plate data, normals, UVs, and decimation.
2026-08-31 19:26:24 +00:00
Clifford Yapp b62ec823e9 librt: preserve BOT data through mesh operations
Add rt_bot_gc and rt_bot_subset to centralize compact BOT construction
while remapping plate thickness, face modes, normals, and texture UVs.
Use these helpers for splitting, patch extraction, plate cleanup, and
decimation.

Replace the legacy quadratic BOT splitter with bg_trimesh_separate and
preserve all source face and vertex data in the resulting components.

Retain face provenance through the simple, legacy, and GCT decimators.
Harden GCT decimation with validated input, guarded collapse positions,
working-copy updates, and an original-surface distance postcondition so
invalid output is rejected without modifying the input BOT.

Preserve normals and UVs during merge-only repairs, explicitly report
attribute loss for topology-changing repairs, and reject unsupported
non-solid repair inputs.  Add regression coverage for splitting,
attribute remapping, malformed data, and decimation preservation.
2026-08-31 19:25:04 +00:00
Clifford Yapp d4bfdae632 libbg: preserve face provenance in trimesh operations
Add bg_trimesh_separate, a union-find component separator that returns
grouped original face indices.  Correctly handle non-manifold edges,
provide deterministic ordering, and support compact component creation
with bg_trimesh_3d_gc.

Add bg_trimesh_run_decimater to return source face indices with the
decimated triangles.  Harden decimation against invalid references,
non-finite geometry, and unsafe coordinate scaling.

Retain the existing APIs as deprecated compatibility wrappers, document
the bot_split transition, and add regression coverage for topology edge
cases, provenance, invalid input, and the garbage-collection workflow.
2026-08-31 19:25:04 +00:00
Clifford Yapp 82aaff27aa Add a few more NEWS items 2026-08-31 11:43:39 -04:00
Clifford Yapp 0429872ee1 Mention the cutting plane animation feature in rtwizard 2026-08-31 11:16:53 -04:00
Clifford Yapp ad42839386 Mention Josh's work with the man page updates and corrections 2026-08-31 10:31:34 -04:00
Clifford Yapp a4a9ec3f78 Note the LBFGS++ improvements to average triangle quality in bot remesh 2026-08-31 10:29:59 -04:00
Clifford Yapp 02427b1ed1 Improve LTO testing 2026-08-31 01:10:43 -04:00
Clifford Yapp 880be2acfe Linux build fixes, add header/footer to test files 2026-08-28 22:21:02 -04:00
Clifford Yapp ada0725322 libbg: correct line and segment query contracts
Correct public argument order and documentation for line and segment
queries, including ray-versus-line behavior and parameter units.

Handle degenerate directions and segments consistently, correct parallel
closest-approach and 2D endpoint-tolerance logic, and restore the
documented parallel-segment return code.

Add focused regressions for these cases, AABB line behavior, triangle
closest points, segment closest points, and trimesh GC.

This started because of an incorrect behavior in the bot pick subcommand
- it was selecting the wrong vertex, which wasn't surprising when we
were feeding in the point and direction according to what the API said
rather than what the implementation was *actually* doing...

The API warrants a more thorough "what should this look like" design
pass - the idea here was to try and avoid "header is wrong" pitfalls
like the one bot pick hit.
2026-08-28 16:44:46 -04:00
Clifford Yapp 1691a8ba42 libbg: use GTE-backed triangle line intersection
libbg has a couple non-BoT-hot-path triangle intersection test
functions - use GTE's version rather than our older versions.
2026-08-28 14:54:31 -04:00
Clifford Yapp a635992820 Remove redundant USE_TCL_CHAN define 2026-08-28 13:34:50 -04:00
Clifford Yapp 2b1cf87dc0 Only try the MGED csg editing tests if we have Tk enabled 2026-08-28 12:44:13 -04:00
Clifford Yapp fc58919ab4 Add M_LIBRARY for g-scad 2026-08-28 10:15:08 -04:00
Clifford Yapp 72ec941830 libdm: fix X embedded framebuffer and font metric handling
Make the X24 embedded framebuffer follow the X display manager's current
backing pixmap rather than retaining a copy of its X resource
identifier.

The X display manager uses a pixmap as its back buffer.  Whenever its
Tk window is configured at a new size, X_configureWin_guts frees that
pixmap and creates a replacement.  The embedded X24 framebuffer,
however, received the pixmap identifier by value when it was opened
and retained that value in xi_win.  It was never notified when the
display manager replaced the pixmap.

Consequently, after a ConfigureNotify the two components could have
different views of the backing drawable:

    display manager: newly allocated pixmap
    X24 framebuffer: identifier of the freed pixmap

The next framebuffer refresh would issue XPutImage against the stale
identifier.  X protocol errors are asynchronous, so the invalid
request was generally reported later by XFlush, XSync, or event queue
processing.  Xlib's default error handler terminates the process with
exit status 1.  Since graphical MGED redirects its diagnostics through
the GUI, this appeared to users as an immediate, silent exit rather
than an ordinary crash or Tcl error.  A common reproducer was to draw
all.g and open the Raytrace Control Panel, which activates and refreshes
the embedded framebuffer after Tk geometry processing has replaced the
display manager pixmap.

This is a longstanding ownership bug rather than an operation that
suddenly became invalid with the upgrade to Tcl/Tk 8.6.

The embedded-existing-resource path dates to January 1998
(0b2e440288 and bf179a0e27).  It passed the display manager pixmap into
X24 by value, and that behavior was preserved when framebuffer
ownership was moved behind the display-manager API in 2014
(8a97c2184a).

Tk 8.5 happened to conceal the lifetime error.  Its Unix XID allocator
intercepted Xlib resource allocation and kept freed identifiers on a
LIFO stack.  X_configureWin_guts calls Tk_FreePixmap immediately before
Tk_GetPixmap, so the replacement pixmap would normally receive the
same numeric XID as the pixmap just freed.  Although X24 retained a
stale value, that value accidentally referred to the newly created
pixmap by the time it was used.

Tk 8.6 removed that private allocator and made Tk_FreeXId a no-op,
relying on the X server's XC-MISC resource management instead.  The
replacement pixmap was therefore no longer likely to receive the same
identifier.  This exposed the stale drawable retained by X24.  The
problem was observed immediately after the 8.6 migration and recorded
in 388a8afd6a on April 17, 2020 as an X error during fb_refresh and
X24_blit.

Pass X24 a const pointer to the display manager's pixmap slot and
resolve that pointer whenever X24 draws.  Embedded framebuffer blits,
region clears, and expose refreshes now always target the currently
owned display-manager back buffer.  Standalone X24 framebuffers
continue to use their own xi_win drawable.  The display manager remains
responsible for copying the completed back buffer to the Tk window.

Also centralize X11 font-width lookup for the X and OpenGL display
managers.  Xlib permits XFontStruct::per_char to be NULL when all
glyphs have identical bounds.  The previous configuration code
dereferenced per_char unconditionally while selecting a font size.
Use per_char->width when per-character metrics exist and
min_bounds.width otherwise, avoiding a legal NULL dereference and
keeping the two X11 backends consistent.

Verified by rebuilding MGED, drawing moss.g/all.g, repeatedly opening
the Raytrace Control Panel, resizing the graphics window before and
after framebuffer writes, and completing a full-window embedded
raytrace.  MGED remained running and framebuffer content followed the
resized display-manager pixmap correctly.
2026-08-27 23:17:02 -04:00
Clifford Yapp 929bbf65d7 Remove unnecessary hardcoding of dm types and fix tkmessageBox msgs in sketch editing 2026-08-27 23:05:54 -04:00
Clifford Yapp 1e6875bb1d Fixes for pipe and sketch editing 2026-08-27 23:04:39 -04:00
Clifford Yapp 7895648b08 rtarea: stabilize area accounting and reporting
Manage area results independently of region records and clear all references
when frame data is released, preventing stale pointers during cleanup and
multi-frame rendering.

Correct incremental and hypersample area scaling, include the base incremental
pass, and seed rtarea jitter per pixel so results do not depend on worker
scheduling. Ignore air when accumulating exposed-area totals.

Add serial, parallel, incremental, jitter, hypersample, multi-frame, and
analytic convergence tests using spheres, a cube, and occluded geometry.

Remove rtarea TODO - there have been multiple parallelism fixes that are
likely candidates for the intermittent failure issue on Windows in recent
libbu work, and a quick Windows test on a smaller model didn't exhibit missing
regions in the report.  If we run into more problems with a valid reproducer
we can reopen.
2026-08-27 20:38:41 +00:00
Clifford Yapp 01bf4761c2 Ajust our handling of WaitForSingleObject issues in bu_parallel 2026-08-27 20:36:16 +00:00
f4alt ce1897e90f add -f option for pnts write
support is currently ONLY for -f xyz
2026-08-27 15:41:20 -04:00
f4alt 1a6b534527 more obvious logging on root solver messages 2026-08-27 15:11:18 -04:00
Clifford Yapp 984e3f658b Don't need rt_uniresource here any more 2026-08-27 11:38:00 -04:00
Clifford Yapp 6d82c42723 Try harder to use the C++ std thread_local instead of __declspec(thread) with MSVC 2026-08-27 10:06:20 -04:00
Erik Greenwald e4c15824bc Add ARB6 and ARB7 detection to csg-g polyhedron import
ARB6 (triangular prism): 6 vertices, 5 faces (2 triangles + 3 quads).
Identifies opposing triangle faces and pairs vertices via shared
side quads.

ARB7 (arb8 with one collapsed corner): 7 vertices, 6 faces
(2 triangles + 4 quads).  Finds the bottom quad, identifies top
vertices, and pairs via face adjacency.

Previously these fell through to BOT.
2026-08-27 09:12:10 -04:00
Erik Greenwald 01c5ca661e Add man pages for csg-g and g-scad converters 2026-08-27 09:12:10 -04:00
Erik Greenwald dca76d4754 Add particle, pipe, and revolve export to g-scad
ID_PARTICLE: exported as hull() of two spheres at endpoints.
ID_PIPE: exported as union of cylinders for straight segments
  with spheres at joints for smooth connections.
ID_REVOLVE: exported as rotate_extrude(polygon()) by reading
  the referenced sketch's vertices and line segments.
2026-08-27 09:12:10 -04:00
Erik Greenwald 2806b15264 Add import() inlining and halfspace support
csg-g: import(file="foo.stl") now reads the referenced STL file
relative to the .csg file's directory and inlines it as a BOT.
Also adds render() as a pass-through wrapper.

g-scad: ID_HALF (halfspace) is exported as a 2e10mm cube positioned
on the correct side of the plane via multmatrix.  Not mathematically
exact but sufficient for any practical CSG subtraction.
2026-08-27 09:12:10 -04:00
Erik Greenwald da02b1003e Fix tessellation crash by re-reading primitives from database
ft_tessellate can corrupt the rt_db_internal structure, causing
heap corruption when rt_db_free_internal runs later.  Fix by
re-reading the primitive from the database for a fresh copy
before tessellating.

Note: EHY tessellation (rt_ehy_tess) has a pre-existing heap
corruption bug in BRL-CAD itself — not addressed here.
2026-08-27 09:12:10 -04:00
Erik Greenwald c35696166a Add sketch+extrude support for polygon extrusions (bidirectional)
csg-g: linear_extrude(polygon()) creates a BRL-CAD sketch from the
polygon vertices/paths, then extrudes it with mk_extrusion.  Also
handles rotate_extrude(circle()) as torus and linear_extrude with
circle/square children as cylinder/box.

g-scad: ID_EXTRUDE primitives are exported as linear_extrude(polygon())
by reading the referenced sketch's vertices and line segments.
ID_SKETCH primitives encountered standalone are silently skipped.
2026-08-27 09:12:10 -04:00
Erik Greenwald 66a9e67399 Add rotate_extrude and linear_extrude support to csg-g
rotate_extrude(circle()) maps to mk_tor (torus).  This recovers all
1145 previously-skipped solids across the test suite.

linear_extrude(square()) maps to mk_rpp (box).
linear_extrude(circle()) maps to mk_tgc (cylinder/cone).

Unsupported extrude children (polygon, etc.) warn and skip.
2026-08-27 09:12:10 -04:00
Erik Greenwald 0bb2b3b480 Add g-scad exporter for BRL-CAD to OpenSCAD conversion
Walks the CSG tree preserving boolean structure (union, difference,
intersection), transformation matrices, and primitive geometry.
Direct mappings: SPH/ELL to sphere(), TGC/REC to cylinder(), ARB to
polyhedron(), BOT to polyhedron(), TOR to rotate_extrude(circle()).
Unsupported primitives are tessellated via ft_tessellate/nmg_bot.
Combination colors are emitted as color() wrappers.
2026-08-27 09:12:10 -04:00
Erik Greenwald 675106e869 Store color attributes from OpenSCAD color() nodes
Parse color([r, g, b, a]) and store as BRL-CAD attributes:
  color = R/G/B (0-255 range)
  alpha = 0.NNN (only if < 1.0)
2026-08-27 09:12:10 -04:00
Erik Greenwald b63331b548 Add convexity check to polyhedron ARB detection
Non-convex polyhedra go straight to BOT since ARB primitives require
convexity for correct ray tracing.  The check verifies that for each
face, all other vertices lie on the same side of the face plane.
Tetrahedra (arb4) skip the check since they are always convex.
2026-08-27 09:12:10 -04:00
Erik Greenwald 4df6de9b9a Add polyhedron support to csg-g with ARB detection
Parse OpenSCAD polyhedron() nodes, attempting to match ARB primitives
before falling back to BOT (bag of triangles).  Detection order:
arb8 (8 verts, 6 quad faces), arb5 (5 verts, quad base + apex),
arb4 (4 verts, 4 tri faces).  Non-matching polyhedra are
fan-triangulated into BOT solids.
2026-08-27 09:12:10 -04:00
Erik Greenwald bc49e0e335 Add csg-g converter for OpenSCAD .csg format
Import OpenSCAD's evaluated CSG tree format (.csg) into BRL-CAD .g
files.  The .csg format is produced by: openscad -o file.csg input.scad

Supports cube, sphere, cylinder primitives, boolean operations
(difference, union, intersection, group), multmatrix transforms,
and color nodes.  Warns and skips unsupported nodes (linear_extrude,
rotate_extrude, hull, minkowski).
2026-08-27 09:12:10 -04:00
Keith Bowman 23dde1651d Update material default document references to 0
Update user-facing documentation to match the new default numeric material code for newly created regions.

Adjust STL and GCV converter documentation to describe material code 0 as the default for created regions, and update the gqa/check guidance to reflect that MGED now assigns 0 to new regions by default.

Add a NEWS entry noting the default new-region material code change from 1 to 0.
2026-08-27 09:11:23 -04:00
Keith Bowman 4dd9e99dd0 Add tests for new default region material code
Added a GED regression test covering regdef-backed region creation and the default numeric material code for new regions.

Added GCV regression tests plus a verifier utility to confirm STL, PLY, VRML, and assetimport-created BRL-CAD regions get material code 0 by default.
2026-08-27 09:11:23 -04:00
Keith Bowman 8323badb26 Default new region material codes to 0
Switch the core wdb new-region material default from 1 to 0 and update converter/importer code paths that still hardcoded non-zero material defaults for created regions. Also fix regress-red expectations for the new default material behavior.
2026-08-27 09:11:23 -04:00
Clifford Yapp c523397c03 libbu mapped_file needs to deal with drive letters 2026-08-27 02:40:38 +00:00
Clifford Yapp 3ea99fe4c9 Add more controls for LTO optimization 2026-08-26 19:06:38 +00:00
Clifford Yapp 7e9a762645 Add more extensive automated testing of MGED csg editing and make some behavior adjustments 2026-08-26 17:59:43 +00:00
Clifford Yapp 6c092182a6 Make another stab at fixing ARB5 point editing 2026-08-25 20:10:36 +00:00
Clifford Yapp d983d340bf Use setsid to prevent the bu_bomb message from escaping CTest's capture 2026-08-25 15:38:44 -04:00
Clifford Yapp 75ef43ac37 Add some more tests for gqa and rtcheck plotting 2026-08-25 15:32:10 -04:00
Clifford Yapp fa687de934 Fix std::vector use-after-free error in tree.cpp 2026-08-25 14:42:07 -04:00
Clifford Yapp a0281a0c95 Cleanup for BrlcadBugs logic 2026-08-25 14:48:20 +00:00
Clifford Yapp b772bb19dd Handle setting up stepcode outputs at configure time
The build time generation trick was neat, but it was basically redoing
the build system mid-stream.  That shouldn't be necessary and feels like
risky surgery mid-flight, so switch to doing the staging work for
the source files we need during configure time.
2026-08-25 14:38:36 +00:00
Clifford Yapp fb84d63d0f Update bext SHA1 2026-08-25 14:05:03 +00:00
Clifford Yapp ee127c71fe Fix double-listing of BRLCAD_EXT_DIR in apple logic 2026-08-25 13:58:13 +00:00
Christopher Sean Morrison eeb8d89cdf fix two semaphore issues.
first, don't set the magic until we're actually done.  second, don't init with SEMAPHORE_INIT or we're in UB territory on some platforms (e.g., linux) when semphore[0] is re-initializaed.
2026-08-25 01:07:32 -04:00
Clifford Yapp caba09e058 Was too aggressive about setting build type for distcheck tests 2026-08-24 23:08:14 +00:00
Clifford Yapp 5a294d3928 Use GENERATED property rather than dir location
When doing an in-src-dir build, the header generation for
libged commands wasn't working correctly.  Everythig was
"in the binary directory" so the generated header was useless.
2026-08-24 22:55:25 +00:00
Clifford Yapp 506e88cdd6 Fix generation of distcheck yml file 2026-08-24 21:49:05 +00:00
Clifford Yapp 51837d933f Use the bext manifest if available - avoids characterization work. 2026-08-24 21:40:54 +00:00
Clifford Yapp 8d49601452 Add distcheck configurations for non-unity building
Most of the time we do unity builds for performance reasons, but sometimes that
can mean we end up missing includes we need in individual files.  Add non-unity
building to distcheck to be sure we check that case.
2026-08-24 17:29:09 -04:00
Clifford Yapp 6e0ad05827 update setup-msbuild to v3 2026-08-24 16:23:03 -04:00
Clifford Yapp fb052d5a14 Fix odd_pathnames path quoting 2026-08-24 20:20:28 +00:00
Clifford Yapp 1f080637fe Update CMake yml instances of actions/cache 2026-08-24 15:34:51 -04:00
Clifford Yapp ae9a997bf5 Update actions/cache to v6 2026-08-24 15:23:55 -04:00
Clifford Yapp 2a9e37bc13 Try to avoid OSX failure where it rejects applying a limit below the already-mapped address space 2026-08-24 18:01:03 +00:00
Clifford Yapp 8baf77c9fb Missed a distclean 2026-08-24 13:43:12 -04:00
Clifford Yapp eb8f8919b8 Add step test outputs to disclean 2026-08-24 16:59:44 +00:00
Clifford Yapp be97d86e4e Fix bug in how librt knob adapters handled edit_flag.
edit_flag identifies the exact primitive operation, while
edit_mode identifies the interaction class.

rt_knob_edit_rot/tran/sca() incorrectly replaced a
primitive-specific flag with the generic operation before
dispatching.

Fixed in src/librt/edit.cpp:811:

- Preserve primitive-specific edit_flag when edit_mode matches.
- Fall back to generic operations otherwise.
- Covers translation, rotation, and scale paths.

The MGED faceplate and constrained-axis handlers already
preserve the flag correctly; they route through these adapters.

Added regressions in src/librt/tests/edit/arb8.cpp:312 for:

- ARB5 point 5 direct editing.
- ARB5 point 5 knob dragging.
- ARB face rotation through the knob path.
2026-08-24 16:27:01 +00:00
Clifford Yapp f0a946cf1d Clean up env2c skip_regex 2026-08-24 15:57:44 +00:00
Clifford Yapp 5b5b1fddda MSVC didn't like __VA_ARGS__ 2026-08-24 14:58:02 +00:00
Clifford Yapp eb2549f4a5 Have repocheck validate its exclusion patterns 2026-08-24 14:53:53 +00:00
Clifford Yapp ef5363c1ba Update regress-licenses checker
Make it easier to specify exemptions for specific files.  Also have
the program error out if exclusion patterns are specified that don't
match anything so we know to clean out old patterns.
2026-08-24 14:53:53 +00:00
Jordi Sayol 04c91a04cf Update dependency for crudini to Pre-Depends
Changed dependency from Depends to Pre-Depends for crudini.
2026-08-24 10:48:12 -04:00
Clifford Yapp 2c15270a0a Revert public domain data hack
As expected, too fragile to be useful.

This reverts commit c7a2e3a28a.
2026-08-24 10:21:26 -04:00
Christopher Sean Morrison fee67ac743 add day/dusk/night texturing 2026-08-22 15:47:14 -04:00
Clifford Yapp 6d3a57642f Make near-equal annotate placement candidates resolve in stable generation order across floating-point environments. 2026-08-22 08:00:51 -04:00
Clifford Yapp 18ff49865d Try to get more insight into what's failing 2026-08-21 23:45:33 -04:00
Clifford Yapp d86ae40da5 Take a stab at the annotate libged command
This replaces the stub annotate libged command with an attempt at
a functional version that can actually make annotations.

Motivation initially was to replace the AI generated autodim command
experiment with a more proper annotate audodim subcommand, but to do
that we actually needed an annotate command.  A more proper autodim
implementation is part of this, but the scope of this is much larger.
This effort too is largely AI driven (GPT 5.6) but with more back and
forth than the original autodim effort.
2026-08-21 23:29:11 -04:00
Clifford Yapp e1dddf72ff Better bu_mem reporting on failure 2026-08-21 22:08:18 -04:00
Clifford Yapp 6b5fe0082e mapped is too generic to safely #define 2026-08-21 16:45:37 -04:00
Clifford Yapp 2f33582593 Use Cauchy-Crofton to back -t bb option, support combs with -o
Taught the -o option to walk comb trees and support more than just BoTs.

Replaced the earlier basic 128 ray grid bb "-t" tight option with a denser
pseudo-randomly sampled point set from our Cauchy-Crofton logic.  Also uses
that same ability to flesh out our -o obb support with -t -o combined support -
a "tight" obb based on point sampling bounds.
2026-08-21 16:17:01 -04:00
Clifford Yapp 66068dc14c Wire up the GTE oriented bbox logic behind bg_3d_obb 2026-08-21 16:00:04 -04:00
Clifford Yapp bd98843c66 GTE should be a system include 2026-08-21 15:57:17 -04:00
Christopher Sean Morrison a24ee333f4 update to remove unicode and include instructions on git behavior, given we don't want to pollute history with tooling info 2026-08-21 13:48:00 -04:00
Clifford Yapp 53d334962b More bu_mem adjustments 2026-08-21 15:34:56 +00:00
Clifford Yapp 2defba8498 Fixes for bu_mem tests on FreeBSD 2026-08-21 15:27:32 +00:00
Clifford Yapp ef4e678d9e Report finite process address-space headroom
Wireframe workers need to distinguish physical memory from the virtual
address space remaining under a process cap.  Add a portable bu_mem
query for Windows, Linux, macOS, and the BSD implementations, using
project wrapper headers.

Exercise ordinary and finite-limit reporting so rendering code can
scale concurrency before thread stacks or allocator arenas exhaust the
process.
2026-08-21 10:38:55 -04:00
Clifford Yapp 625964a583 Make sure we have the targets we need before defining step tests 2026-08-21 10:36:14 -04:00
Jordi Sayol a1edda80cc Add crudini to brlcad package dependencies
Added 'crudini' as a dependency for the brlcad package.
2026-08-21 09:55:18 -04:00
Jordi Sayol 88c5a95db6 Add brlcad.prerm to installation files 2026-08-21 09:55:18 -04:00
Jordi Sayol 722ffd57ea Add script 2026-08-21 09:55:18 -04:00
Jordi Sayol 2b9e7c9398 Clean up brlcad.postrm
Removed code for handling mimeapps.list file.
2026-08-21 09:55:18 -04:00
Jordi Sayol 9e70b336dd Refactor brlcad.postinst for MIME type associations
Updated the post-install script to modify default applications for BRL-CAD MIME types and changed the file path for mimeapps.list.
2026-08-21 09:55:18 -04:00
Clifford Yapp 7b7c0cb4d0 Improve OpenNURBS I/O robustness
OpenNURBS has two concrete concurrency hazards:

- ON::Begin() uses unsynchronized global initialization state.
- Model reads reach Unix localtime(), which uses process-wide state.

Added a mutex-based protection into a shared transactional archive reader
in src/librt/primitives/brep/ brep.cpp:2352, while improving the
branch’s version to:

- Check ONX_Model::Read() and every recovered component.
- Publish an internal BREP only after complete success.
- Protect both database imports and base64 adjust reads.
- Preserve the old BREP when adjustment fails.
- Free decoded base64 buffers correctly.
- Fix backward seeking and overflow handling in the in-memory archive.

The existing tests did not directly cover BREP archive I/O. Added
src/librt/tests/brep_io.cpp:1, covering round trips, concurrent imports,
base64 adjustment, truncated archives, and arbitrary invalid data.
2026-08-20 20:56:45 -04:00
Clifford Yapp 3859405b15 We need to respect BUILD_TESTING - it can be set to OFF 2026-08-20 20:41:28 -04:00
Clifford Yapp 6c94ae71d2 Add support for -h/--help to Archer
On Windows (where Archer is built as a GUI application) this won't print
help in the console, but it will exit without launching the GUI.
Otherwise, it should print help and exit.
2026-08-20 16:59:46 -04:00
Clifford Yapp bcf4103133 Add regression test for asc2g/g2asc datum support 2026-08-20 16:42:40 -04:00
Clifford Yapp f19f822e95 Add autodim cmd for annotating dimensions
This isn't where we would want it to be - the annotations it produces
aren't what I'd expect for this use case, and it probably belongs as a
subcommand of the annotate command rather than being a top level
command.  However, once wired into MGED it does produce in-scene
annotations so stashing it as a starting point for follow-on work.
2026-08-20 16:30:21 -04:00
Clifford Yapp 3178510a3b Avoid guaranteed miss shot, improve error message 2026-08-20 16:02:00 -04:00
Clifford Yapp b477f665ab Imlement -a (az) and e (el) options in gqa 2026-08-20 15:55:53 -04:00
Clifford Yapp f6c0e60e29 Add a tight" -t raytracing based bbox to bb cmd
This is currently a coarse sampling only, but it does function so
adding it as a useful starting point.

Makes me wonder if there's a Cauchy-Crofton convergence criteria we
could define here that would be better than a coarse grid sample,
but that's follow-on work.
2026-08-20 12:54:30 -04:00
Clifford Yapp 1e939c7de3 Add center command support for object specifier
Resolve the object's bounding box (RPP) via `_ged_get_obj_bounds2'. For
non-solid directory entries, fall back to `rt_obj_bounds`, mirroring the
`ocenter.c` pattern.  Once bbox center point is known, center the view
there.
2026-08-20 12:29:27 -04:00
Clifford Yapp df19156341 Work on fixing ARB5 moving point 5 editing
User report was that moving point 5 on an arb5 also moves point 1.

Root cause analysis from AI was that ARB point-move menu handlers
(`arb5_edge`, `arb6_edge`, `arb7_edge`) pre-remapped the menu-arg value
(8 = pt5, 9 = pt6, 11 = pt5 on ARB7) into the point storage location
(4/6) BEFORE `rt_arb_edit()` ran its dispatch.  `rt_arb_edit()`'s
ARB5/6/7 case tests `edit_type` against the `RT_ARB{5,6,7}_MOVE_POINT_*`
constants (values 8/9/11). With the menu value clobbered to 4, the POINT
branch never fired and control fell through to the EDGE path (`earb5[4]`
= edge 15), dragging pt1 along with pt5.

Interactive testing doesn't result in the arb5 point 5 moving at all in
MGED, but it's not clear if that's a side effect of this change or other
breakage tied to the shift to librt editing. Go ahead and apply the
suggested change, since even if it's not fully sufficient itself it's
likely the logic in question is involved.

Add a follow-on TODO item to investigate and fix ARB5 point 5 moving not
being responsive.  Also make a more general note that we need to test
the shift to librt-based primitive editing extensively for the next
release.
2026-08-20 12:09:18 -04:00
Clifford Yapp 01c4a39932 Try using getchar() for redirected input and keep getch() for interactive input on Windows 2026-08-20 07:21:23 -04:00
Christopher Sean Morrison 9039d0998a Fix post-merge build and runtime integration 2026-08-20 03:33:12 -04:00
Christopher Sean Morrison 52494047ca Merge remote-tracking branch 'origin/main' into wip-7-46
# Conflicts:
#	BUGS
#	CMakeLists.txt
#	NEWS
#	README
#	TODO
#	doc/asciidoc/articles/CMakeLists.txt
#	doc/asciidoc/articles/adrt_gallery/generate_adrt_gallery.cmake
#	doc/asciidoc/articles/adrt_pathtrace.adoc
#	doc/asciidoc/articles/images/adrt_castle_path.png
#	doc/asciidoc/articles/images/adrt_castle_rt.png
#	doc/asciidoc/articles/images/adrt_castle_rt_ao.png
#	doc/asciidoc/articles/images/adrt_chess_path.png
#	doc/asciidoc/articles/images/adrt_chess_rt.png
#	doc/asciidoc/articles/images/adrt_chess_rt_ao.png
#	doc/asciidoc/articles/images/adrt_cornell_path.png
#	doc/asciidoc/articles/images/adrt_toyjeep_depth.png
#	doc/asciidoc/articles/images/adrt_toyjeep_normal.png
#	doc/asciidoc/articles/images/adrt_toyjeep_path.png
#	doc/asciidoc/articles/images/adrt_toyjeep_phong.png
#	doc/asciidoc/articles/images/adrt_toyjeep_rt.png
#	doc/asciidoc/articles/images/adrt_toyjeep_rt_ao.png
#	doc/asciidoc/articles/mged.adoc
#	doc/asciidoc/articles/oed.adoc
#	doc/asciidoc/devguides/CMakeLists.txt
#	doc/asciidoc/system/mann/remove.adoc
#	doc/asciidoc/system/mann/rm.adoc
#	doc/changes/changes_api_baseline.adoc
#	doc/changes/changes_generate_rules.cmake
#	doc/changes/deprecated.adoc
#	doc/changes/minimally-impacting.rules
#	doc/changes/obsoleted.adoc
#	doc/notes/struct_resource_removal.txt
#	include/brlcad_version.h.in
#	include/bu/color.h
#	regress/rtwizard/CMakeLists.txt
#	src/art/art.cpp
#	src/conv/iges/iges_types.c
#	src/conv/step/BRLCADWrapper.h
#	src/conv/step/CMakeLists.txt
#	src/conv/step/STEPWrapper.cpp
#	src/conv/step/STEPWrapper.h
#	src/conv/step/step-g/BoundaryCurve.cpp
#	src/conv/step/step-g/CMakeLists.txt
#	src/conv/step/step-g/ConnectedFaceSet.cpp
#	src/conv/step/step-g/ConnectedFaceSet.h
#	src/conv/step/step-g/CurveReplica.cpp
#	src/conv/step/step-g/Face.h
#	src/conv/step/step-g/FacetedBrep.cpp
#	src/conv/step/step-g/FacetedBrep.h
#	src/conv/step/step-g/FacetedBrepShapeRepresentation.cpp
#	src/conv/step/step-g/FacetedBrepShapeRepresentation.h
#	src/conv/step/step-g/Factory.cpp
#	src/conv/step/step-g/GeometricSet.cpp
#	src/conv/step/step-g/MappedItem.cpp
#	src/conv/step/step-g/MappedItem.h
#	src/conv/step/step-g/OffsetCurve3D.cpp
#	src/conv/step/step-g/OffsetSurface.cpp
#	src/conv/step/step-g/OpenNurbsInterfaces.cpp
#	src/conv/step/step-g/PolyLoop.cpp
#	src/conv/step/step-g/PolyLoop.h
#	src/conv/step/step-g/Polyline.cpp
#	src/conv/step/step-g/ProductDefinitionWithAssociatedDocuments.cpp
#	src/conv/step/step-g/RectangularTrimmedSurface.cpp
#	src/conv/step/step-g/RepresentationMap.cpp
#	src/conv/step/step-g/RepresentationMap.h
#	src/conv/step/step-g/SeamCurve.cpp
#	src/conv/step/step-g/TrimmingSelect.cpp
#	src/libbu/color.cpp
#	src/libbu/tests/CMakeLists.txt
#	src/libbu/tests/test_color.c
#	src/libgcv/plugins/jt/CMakeLists.txt
#	src/libgcv/plugins/jt/jt_parser.cpp
#	src/libgcv/plugins/jt/jt_parser.h
#	src/libgcv/plugins/jt/jt_read.cpp
#	src/libgcv/plugins/jt/jt_topology.cpp
#	src/libgcv/plugins/jt/test_jt_parser.cpp
#	src/libgcv/plugins/jt/test_jt_topology.cpp
#	src/libged/rm/rm.c
#	src/libged/tests/ged_test_rm.c
#	src/libicv/anim.cpp
#	src/librt/primitives/submodel/submodel.c
#	src/rt/worker.c
#	src/tclscripts/man_browser.tcl
#	src/tclscripts/mged/openw.tcl
2026-08-20 02:24:35 -04:00
Christopher Sean Morrison ab9658501f tag the title with the terrain, dimension, and scaling factor info 2026-08-20 01:22:54 -04:00
Clifford Yapp ac661d4bd5 Normally we prefer using bu_file_delete for file removal 2026-08-20 00:47:47 -04:00
Clifford Yapp 0a491e28c2 Add bu_setprogname 2026-08-20 00:45:03 -04:00
Clifford Yapp c7a2e3a28a This is tricky, but see if we can avoid discussions of public domain data triggering our guard. 2026-08-20 00:37:06 -04:00
Clifford Yapp 1173625034 Build fixes for Linux gcc 2026-08-19 23:58:51 -04:00
Clifford Yapp 1d4c1013f5 Fix filename 2026-08-19 23:31:01 -04:00
Christopher Sean Morrison 926569f86a add a parashot proc that demonstrates creating a path affected by gravity.
this has significant potential for turning into librt or libged api, but for now it's a geometry path generator that is potentially useful for creating gravity trajectories as pipes.
2026-08-19 22:34:13 -04:00
Christopher Sean Morrison b1878e1738 need a proper metaball command 2026-08-19 22:02:32 -04:00
Christopher Sean Morrison f4a27a38df add metaball scaling, from workflow.
not loving the hook on metaball_move_pnt, but it's technically forward progress with some minor justification (scaling a set does move the points).  begs for a proper metaball command with subcommands.
2026-08-19 22:00:12 -04:00
Christopher Sean Morrison 6b0a14955b significant change to all librt apps to now report when it's been asked to prep something that does not exist.
this historically presented itself as a vague 'no primitives left to prep' message from rt and friends, but now will throw an error.  we may want to make it a warning, but giving the more aggressive halt a trial.  this should also help downstream apps that would error out (tree walk failure) without saying what object had a problem.
2026-08-19 21:01:52 -04:00
Christopher Sean Morrison 9b2130e5d9 add a low-res eartch 512x512x6 depiction at 48x as a sample 2026-08-19 20:08:23 -04:00
Christopher Sean Morrison ca138bcbdf update references from earthgen to gaia 2026-08-19 19:45:53 -04:00
Christopher Sean Morrison 9e10743773 rename earthgen to gaia 2026-08-19 19:44:35 -04:00
Christopher Sean Morrison 0aa5b772b5 document how to get and process the terrain dataset from noaa 2026-08-19 19:08:36 -04:00
Christopher Sean Morrison e993bc5091 adjust the water scale 2026-08-19 17:50:07 -04:00
Christopher Sean Morrison 408c766ddf add a preliminary AGENTS.md file that spells out general best practices expected of everyone working on BRL-CAD, ai or otherwise. 2026-08-19 17:49:20 -04:00
Christopher Sean Morrison 8c70ac858c do not manually convert to network byte order as mk_binunif does it for us. 2026-08-19 17:47:35 -04:00
Clifford Yapp 2439d9966a Air codes, like region ids, should be zero or positive integers 2026-08-19 16:59:01 -04:00
Clifford Yapp f1c4f4f03b Use info from parent Tcl interp
The info complete command checks if a string is a syntactically complete
Tcl command (i.e. if the string has balanced braces, brackets, and
quotes.)  Use the info command from the parent interp in case info gets
aliased as something else in the other. "info complete" operates
strictly as a lexical parser rule check, so it doesn't matter which Tcl
interp makes the validity determination.

Report was an 'expected boolean value but got ""' error from an
integrating application - a user redefinition of the info command in the
lower level interp is a possible source of that message.
2026-08-19 16:30:41 -04:00
Clifford Yapp ccf3067b9f Warn if fast4-g needs to change a name, fix memory cleanup for vls string 2026-08-19 16:02:45 -04:00
Clifford Yapp 4b9d908b47 Add an explicit dependency on the faa Business_Jet.g target 2026-08-19 15:53:27 -04:00
Clifford Yapp fd5d0062ad fast4-g bounds hardening, regression test w/ included Business_Jet model
The unguarded pre-decrement loop `while (isspace((int)s->line[--s_len]))
 s->line[s_len]='\0';` could underflow the unsigned `s_len` (index wrap)
 on an all-blank line and walk off the buffer. Replaced with an
 underflow-safe form - no change for well-formed input.

 Also added a regression test exercising the smaller of the included
 faa generic twin models.
2026-08-19 15:43:52 -04:00
Clifford Yapp 1829178147 Make it explicit that bot->face_mode should start off as NULL 2026-08-19 15:23:25 -04:00
Clifford Yapp 1456bf7d03 avoid bu_bomb in g-vrml for plate mode, check face_mode is non-null before freeing. 2026-08-19 15:19:30 -04:00
Clifford Yapp 97021230b3 Add support for drawing ticks along MGED in-scene model axis 2026-08-19 10:49:37 -04:00
Christopher Sean Morrison 8e247dc1d8 added -j option to patch-g for component thickness when zero 2026-08-18 14:42:55 -04:00
Christopher Sean Morrison bdf3fc7b06 document the new -j option for specifying component thickness 2026-08-18 14:08:09 -04:00
Christopher Sean Morrison 8a79c28b90 added a -j 'jtype.file' option to externally specify component thicknesses in a sidecar file for patch-g 2026-08-18 14:00:55 -04:00
Christopher Sean Morrison a1a7dea39e improve the diagnostic output on bad rays when debug is set, include checks for inf 2026-08-18 13:41:40 -04:00
Christopher Sean Morrison 2307575ef1 improve bwhist reporting of the median calculation (was wrong) 2026-08-18 00:30:01 -04:00
Christopher Sean Morrison 743178e15b fixed an fbcolor bug where off-by-1 wasn't drawing the last bar 2026-08-18 00:26:11 -04:00
Christopher Sean Morrison bf7b3ed80c don't forget the test 2026-08-18 00:22:12 -04:00
Christopher Sean Morrison 4078fbc9ed open() returns non-negative on success, so include zero 2026-08-18 00:14:06 -04:00
Christopher Sean Morrison bdb968092e fix several off-by-1 bugs that was causing the last color bar to not get drawn 2026-08-18 00:10:07 -04:00
Christopher Sean Morrison d90c10a5ca with the pixcmp off-by-one fixed, exposed a return val mixup in the runners. now tracking better and returns non-zero only when off-by-many. 2026-08-17 19:48:22 -04:00
Clifford Yapp a8499d216c Stash some notes about kigumi 2026-08-17 16:54:40 -04:00
Jordi Sayol 6561a0ea03 Add timezone info to changelog timestamps
Updated timestamps in changelog to include timezone information.
2026-08-17 15:22:16 -04:00
Jordi Sayol 7503e71196 Simplify Exec command in rtwizard.desktop 2026-08-17 15:22:16 -04:00
Jordi Sayol 1a6e823e4c Update Exec command in mged.desktop file
Simplified the Exec command to directly call mged.
2026-08-17 15:22:16 -04:00
Jordi Sayol 6478a406fb Update desktop entry categories for BRL-CAD documentation 2026-08-17 15:22:16 -04:00
Jordi Sayol e1c8b2c7f9 Update Categories in brlcad-doc.desktop 2026-08-17 15:22:16 -04:00
Jordi Sayol 846a7beed2 Update desktop entry categories for brlcad-db 2026-08-17 15:22:16 -04:00
Jordi Sayol dc755c1053 Simplify Exec command and update Categories 2026-08-17 15:22:16 -04:00
Jordi Sayol 4c1523d6e5 Refactor BRL-CAD menu structure for clarity 2026-08-17 15:22:16 -04:00
Jordi Sayol 30554f0413 Add generic icons for BRL-CAD v4 and v5 2026-08-17 15:22:16 -04:00
Jordi Sayol 28e1a6fc72 Update Build-Depends to use debhelper-compat 2026-08-17 15:22:16 -04:00
Jordi Sayol 41228cc599 Delete misc/debian/compat 2026-08-17 15:22:16 -04:00
Jordi Sayol dd029d2680 Remove 'compat' from CMakeLists.txt
Removed 'compat' from the list of files in CMakeLists.txt.
2026-08-17 15:22:16 -04:00
Jordi Sayol 7bad0a373e add git as deb build dependency 2026-08-17 15:22:16 -04:00
Jordi Sayol 275bc1b1b4 workarround for make install DESTDIR var wrong behavior 2026-08-17 15:22:16 -04:00
Christopher Sean Morrison 41634f29ca er, HZERO, no criteria on the tol 2026-08-17 13:26:46 -04:00
Christopher Sean Morrison 92cac10f49 turn off the filesize debugging 2026-08-17 13:25:20 -04:00
Christopher Sean Morrison b7df69637b gist previews actually work now. renders images at 128 with all the analytic checks off. 2026-08-17 13:23:41 -04:00
Christopher Sean Morrison 011434b839 eliminate direct floating point checks 2026-08-17 13:05:42 -04:00
Christopher Sean Morrison 53abdfbbea of course there was some code assuming HDIVIDE gives a point. inject a VMOVE to extract it. 2026-08-17 00:51:12 -04:00
Christopher Sean Morrison fdc32ea3d5 of course there was some code assuming HDIVIDE gives a point. inject a VMOVE to extract it. 2026-08-17 00:51:03 -04:00
Christopher Sean Morrison e028f9cf10 viewpath isn't on yet 2026-08-17 00:38:21 -04:00
Christopher Sean Morrison b998c36c79 we already assuming input is h, assume out is too 2026-08-17 00:29:15 -04:00
Christopher Sean Morrison 9bc8149576 update for vmath adjusted to maintain hvect on hcross 2026-08-17 00:28:53 -04:00
Christopher Sean Morrison d0075b873b now the eye_pt command works all by itself in rt scripts 2026-08-17 00:05:17 -04:00
Christopher Sean Morrison b9a57cc45e keep track of orientation and eye getting set by user or script.
either must be accommodated separately, otherwise the automatic view setup in do_ae() overwrites a set eye.
2026-08-17 00:02:26 -04:00
Christopher Sean Morrison a986a05efd add tdd system test to ensure we can edit view via rt scripting to set eye point, dir, size, etc 2026-08-16 23:58:27 -04:00
Christopher Sean Morrison 59e1e9a816 orientflag is unused 2026-08-16 23:55:01 -04:00
Christopher Sean Morrison f05303f243 still wildly wrong 2026-08-16 23:51:42 -04:00
Christopher Sean Morrison 8b1fdb6f59 simplify HCROSS() and make the output also an hvect_t, not a vect_t. they can get that with HDIVIDE. 2026-08-16 23:48:41 -04:00
Christopher Sean Morrison 810ff02b03 add a basic vmath unit test 2026-08-16 23:08:07 -04:00
Christopher Sean Morrison 8713b98ca4 spelling mistake, scalar 2026-08-16 22:59:48 -04:00
Christopher Sean Morrison 20d3f3f80a add HINIT_IDN for homogeneous vector init 2026-08-16 22:57:20 -04:00
Christopher Sean Morrison 24714bd6d6 add ELEMENTS_PER_QUAT for completeness 2026-08-16 22:53:03 -04:00
Christopher Sean Morrison e2e7766eeb need to reconcile some vmath join inconsistency but the choices ripple and require documenting MIC 2026-08-16 22:26:22 -04:00
Christopher Sean Morrison bb77aa2a7d cleanup some doxy 2026-08-16 22:13:40 -04:00
Christopher Sean Morrison 9d9f3a0975 make sure HDIVIDE is zero-safe, and leverage NEAR_ZERO() more for consistency 2026-08-16 22:05:59 -04:00
Christopher Sean Morrison 73fe674eb6 add protection when b is a zero vector (projection is zero degen) 2026-08-16 21:50:43 -04:00
Christopher Sean Morrison b3d01b218b probably good time to undo this after a healthy dose of testing, but for now document the fact that VINVDIR() sets the dir vect components to zero when they are near zero. behavior isn't new, introduced back in 1993. 2026-08-16 21:39:53 -04:00
Christopher Sean Morrison 680f3e01c7 remove trailing semicolon from print macros so caller's doesn't leave one dangling 2026-08-16 21:28:32 -04:00
Christopher Sean Morrison d4d73c0b78 macro oversight, wrap epsilon in parens so macro calls support expressions 2026-08-16 19:30:49 -04:00
Christopher Sean Morrison 0c265a8ef9 wrap the distance macros so using them in math doesn't result in ops applying to only one component 2026-08-16 19:26:16 -04:00
Christopher Sean Morrison 454f6d87f7 switch from size_t to int so callers aren't forced to include stddef.h and we don't have to presume and include prematurely 2026-08-16 19:05:13 -04:00
Christopher Sean Morrison bca419f838 fix copy-paste bug in V2INITALL 2026-08-16 18:53:44 -04:00
Christopher Sean Morrison 3b97d8d4fe initial implementation of HCROSS for two homogeneous vectors 2026-08-16 18:52:56 -04:00
Christopher Sean Morrison 12a6369dbc not exhaustive, but make sure params match usage (and indicate the vectors more consistently) 2026-08-16 18:34:46 -04:00
Christopher Sean Morrison 9925a41dd4 fix the vector inputs to VCOMB*N() 2026-08-16 18:25:31 -04:00
Christopher Sean Morrison c3b2acf5cc tweak the exaggeration 2026-08-16 17:38:08 -04:00
Christopher Sean Morrison a8b23815fe no longer trailing ws in the output lines 2026-08-16 17:36:46 -04:00
Christopher Sean Morrison 730b448973 remove trailing spaces from the predefined nirt output formats 2026-08-16 17:36:12 -04:00
Christopher Sean Morrison 8a2cd18ccc handful of items completed or out-of-date 2026-08-16 17:34:49 -04:00
Christopher Sean Morrison 8f4b809a32 gqa manpage now documents centroid and moments of inertia 2026-08-16 17:32:27 -04:00
Christopher Sean Morrison b65be3d55b add vector range clamping in addition to single value 2026-08-16 16:12:34 -04:00
Christopher Sean Morrison c7a5bc5b74 add num.h to compilation 2026-08-16 15:53:14 -04:00
Christopher Sean Morrison a1129e3b38 include a couple I/O examples 2026-08-16 15:52:59 -04:00
Christopher Sean Morrison 1fea4c9ed0 include new num.h header 2026-08-16 15:52:13 -04:00
Christopher Sean Morrison a4bb6ad6b1 close a couple math gaps, add VCOMB3() and VCOMB3N() to combine three vectors 2026-08-16 15:48:24 -04:00
Christopher Sean Morrison 6649e5cf08 add new test file that was missing and enable 2026-08-16 15:12:19 -04:00
Christopher Sean Morrison 5960236d10 clean up the mged version of gqa's manpage with more essential info, letting the main gqa(1) cover the rest. still intentionally cover the density file format and importing it since this is often how most users encounter gqa for the first time. 2026-08-16 15:08:40 -04:00
Christopher Sean Morrison d5c6214ca4 make the system testing consistent with other testing, clean up after ourselves, use more consistent names 2026-08-16 15:05:08 -04:00
Christopher Sean Morrison d524125ef5 update instructions on how densities are set or loaded, fix issues introduced with automatic formatting 2026-08-16 14:58:35 -04:00
Christopher Sean Morrison 4d529c9ac0 get gist preview actually working.
instead of trying to dynamic figure out new font sizes, dynamic layout mismatching, and other problems, we now stick to a fixed large (high-res) pallete to draw on.  we still skill gqa/weight/etc on preview, but we now render at 256x256 and scale up in preview mode, or 1024x1024 in non-preview.  simiarly we do a minimum of amb on preview and much higher quality otherwise.
2026-08-16 14:49:51 -04:00
Christopher Sean Morrison b5e03710eb fix old nirt trailing whitespace to-do, tested with and without attrs 2026-08-16 14:42:17 -04:00
Christopher Sean Morrison 2f5be2c414 wip new proc that aims to generate earth, enabled when we got gdal since we use that to warp dsp into geo. 2026-08-16 14:39:40 -04:00
Christopher Sean Morrison ac1797cded renamed it to HEXA for consistency, update test 2026-08-16 14:35:43 -04:00
Christopher Sean Morrison 51b17db52d bump bext to 0f1eac972cd81b0e47c1a05acb00eb35da9fe336 2026-08-16 14:14:02 -04:00
Christopher Sean Morrison 4e232c8e9c stub in a search gui placeholder 2026-08-16 14:12:26 -04:00
Christopher Sean Morrison 68b97eb8d2 note edge caveat 2026-08-16 14:08:37 -04:00
Christopher Sean Morrison cb85440fc2 adding a -Q quick preview option that kesp the layout but renders low-res and doesn't compute analytics 2026-08-16 14:07:15 -04:00
Christopher Sean Morrison 565006ec6d document centroids and moments of inertia 2026-08-16 13:53:43 -04:00
Christopher Sean Morrison 9e85d166a6 document the degenerate output dimensionality 2026-08-16 13:52:24 -04:00
Christopher Sean Morrison 2f5b96fea3 expand docs on brep status 2026-08-16 13:49:45 -04:00
Christopher Sean Morrison 1192a30a88 add tinycolor license 2026-08-16 13:47:05 -04:00
Christopher Sean Morrison 4453d76cbc break up the tests, clean up turds, fix naming inconsistencies 2026-08-16 13:25:55 -04:00
Christopher Sean Morrison 31b4a86ea6 graduate to the pattern, move util testing into a tests subdir 2026-08-16 13:17:52 -04:00
Christopher Sean Morrison b80cf7a20b gah, typo 2026-08-16 13:15:55 -04:00
Christopher Sean Morrison 5d210b31f8 remove mat_print() uncalled/dead code 2026-08-16 13:13:14 -04:00
Christopher Sean Morrison 2ccbedf43f add a bwcrop/pixembed set of tests 2026-08-16 13:10:01 -04:00
Christopher Sean Morrison 38acc3e58e add a bwcrop/pixembed set of tests 2026-08-16 13:09:43 -04:00
Christopher Sean Morrison 480f7ef8c5 fix bwcrop single axis behavior 2026-08-16 13:07:45 -04:00
Christopher Sean Morrison 03bfbee686 fix pixembed edge replication 2026-08-16 13:07:11 -04:00
Christopher Sean Morrison f0d29b326d put bu_num_print() to use 2026-08-16 12:54:34 -04:00
Christopher Sean Morrison 731b0be145 three more tests 2026-08-16 12:52:02 -04:00
Christopher Sean Morrison 7bf55b08c5 add more tests for the new color API. still need to update the old. 2026-08-16 12:51:53 -04:00
Christopher Sean Morrison 8a64dd1961 replace memset() with HMOVE(), let optimizer figure it out 2026-08-16 12:47:38 -04:00
Christopher Sean Morrison d034de0ce2 right now, sticking with CSS compatibility but they annoyingly chose to make 'green' not be ff green 2026-08-16 12:41:48 -04:00
Christopher Sean Morrison b5af10e547 implement support for reading/writing/converting colors using a richer syntax.
this lets us define colors using traditional rgb 0-255 values, color names, html-style hex, hsl/hsv values, and more.  very very loosely based on tinycolor js, but go ahead and credit them for the inspiration.
2026-08-16 12:40:24 -04:00
Christopher Sean Morrison 3cb5bf3b66 declare for export 2026-08-16 12:36:27 -04:00
Christopher Sean Morrison 7070d27876 flesh out new color API that is more expressive.
this will shift the API to needing just three funcs: bu_color_parse() to read from a string, bu_color_format() to write, and bu_color_convert() to get diff numeric representations
2026-08-16 12:35:49 -04:00
Christopher Sean Morrison 1ebc17df15 declare bu_num_print() for use 2026-08-16 12:28:51 -04:00
Christopher Sean Morrison 9e8afbb757 longstanding gap, introduce users to the tops command 2026-08-16 00:09:26 -04:00
Clifford Yapp b738440242 Add a small bext + BRLCAD_COMPONENTS test
Our normal push workflow doesn't exercise the bext build as part of configure,
but that is a standard (in fact, the most default) configuration.  We also have
the BRLCAD_COMPONENTS mechanism that let's us specify a small subset of the
BRL-CAD system to build - combine both concerns into a "build a subset of bext
and BRL-CAD" test.
2026-08-14 10:55:35 -04:00
Clifford Yapp c8b6a32fb7 Match yml filename 2026-08-14 10:38:46 -04:00
Clifford Yapp cb632e1c4e Persist the key bext variables beyond setup function
On the first run through of a configure, if we're building our own bext, the
setup functions weren't passing variables needed by find_package up to the
parent (global) context.  A subsequent run worked because then it was pulling
them from cache, but the very first run through would fail with find_package
failures (unless it happened to get luckyand find things elsewhere.)

Fix is simple - let the parent context know the key values.
2026-08-14 10:34:04 -04:00
Clifford Yapp a853167528 rt_metaball_add_point wants a const point_t (pedantic GCC compiler warning) 2026-08-13 09:44:49 -04:00
Christopher Sean Morrison 4f902079dc add pixcmp validation to help avoid drift from happening again 2026-08-12 20:58:59 -04:00
Christopher Sean Morrison 8ae3505866 fixed metaball adjust and pixdiff reporting 2026-08-12 20:58:59 -04:00
Christopher Sean Morrison da5cc44504 pixdiff compares bw files correctly now 2026-08-12 20:58:59 -04:00
Christopher Sean Morrison bca1a82a67 update docs now that pixdiff works on bw files 2026-08-12 20:58:59 -04:00
Christopher Sean Morrison 078b69f503 clarify that off-by-one is across all pixel channels, not cumulative 2026-08-12 20:58:59 -04:00
Christopher Sean Morrison 8dcbf1ebcd mention pixcmp+pixdiff since they're related here 2026-08-12 20:58:59 -04:00
Christopher Sean Morrison 72361da816 mention pixcmp+pixdiff since they're related here 2026-08-12 20:58:59 -04:00
Christopher Sean Morrison 7302be2be4 expand note to include pixcmp since it's related.
benchmark now won't always report correct when grep succeeds, and will be back to being more tolerant to rgb 1-value fluctuation in all three channels.
2026-08-12 20:58:59 -04:00
Christopher Sean Morrison ced189fdf0 make pixcmp report off-by-one if any/all channels are off by at most one value.
pixcmp changed behavior (back in 2007) to have it report if the rgb value is off by more than 1 in only one channel, which contradicted the documented intent that it's more than 1 in any channel, not across channels cumulatively.
2026-08-12 20:58:59 -04:00
Christopher Sean Morrison d2b21fec5f benchmark was essentially hardwired to report CORRECT by accident, bug introduced in 4c7519fd51 in oct 2020, but now back to validating 2026-08-12 20:58:59 -04:00
Christopher Sean Morrison 6d9142c094 make it work with different cmp tools, even if it doesn't output a pixels line 2026-08-12 20:58:59 -04:00
Christopher Sean Morrison 47d0665e5a fix bug I introduced in 4c7519fd51 where we're testing grep result instead of pixcmp result.
effectively broken the validation since benchmark would only fail validation if the output failed to include the word 'pixels'.  this restores behavior so we may see more benchmark validation diversity.
2026-08-12 20:58:58 -04:00
Christopher Sean Morrison 4bd9991a5c add a regression test for diffing bw 2026-08-12 20:58:58 -04:00
Christopher Sean Morrison cbfd29b0c9 make pixdiff support bw or pix inputs.
this did require changing the default half-intensity mapping it was doing to not go monochromatic-half-intensity and instead just halving each color channel (i.e., dim the matching).  might want to restore back to grayscale on matching, but will need options and/or inference from file suffix to handle both.
2026-08-12 20:58:58 -04:00
Christopher Sean Morrison 4ec1de3575 make sure to actually commit the new metaball adjust unit test. 2026-08-12 20:58:58 -04:00
Christopher Sean Morrison 45862c50ea made metaball adjust transactional. an adjust 1 1 1 no longer wipes out all values. 2026-08-12 20:58:58 -04:00
Christopher Sean Morrison bd0d82d454 example is 1 chunk (and encoded with 1 byte) 2026-08-12 20:58:58 -04:00
Christopher Sean Morrison 2fe68911cd fix the example 2026-08-12 20:58:58 -04:00
f4alt 2d73aab8e3 fix mged startup windows race
race condition on mged GUI where window sizing and positioning would not
always land at the desired default (from mgedrc). Stabilize startup
sequence so we begin withdrawn, flush layout, and then deiconify.
2026-08-12 11:24:38 -04:00
Christopher Sean Morrison 0c312a84c3 phrasing clarification -- we encode in 8-byte chunks, not arbitrary bytes 2026-08-12 03:01:12 -04:00
Christopher Sean Morrison e16dc62fdd fix docbook to asciidoc table conversion mistakes 2026-08-12 02:48:52 -04:00
Christopher Sean Morrison 8a19e30960 add an adjust unit test for metaball given breakage 2026-08-11 23:05:32 -04:00
Clifford Yapp 7a86db051f Use bu_dir once up front 2026-08-12 02:48:59 +00:00
Clifford Yapp 11e6344e24 Make sure CMP0053 is set to NEW so placeholder replacement works correctly 2026-08-12 01:52:09 +00:00
Clifford Yapp 350a1cb862 Drain and validate the merged output streams before waiting 2026-08-12 01:51:08 +00:00
Clifford Yapp 11b2b8776f If these structs are static, concurrent pkg_send, pkg_2send, and pkg_stream calls can corrupt them. 2026-08-12 01:47:30 +00:00
f4alt 24135b9e63 dbversion is deprecated - use db version 2026-08-11 10:36:57 -04:00
f4alt bfd0c0adc4 fix merged out+err creation
bookkeeping was broken - we were orphaning pipes on linux and double
closing on windows. Everywhere we touch stdout is now verified for
process_create
2026-08-11 10:14:21 -04:00
f4alt 58b3c9c9c0 fix hierarchy overflow name
fix a bug where trailing space in subcomponent list would error rtghost.
and, if it's just one more name print name instead of "1 more"
2026-08-11 08:24:06 -04:00
Clifford Yapp f95516a05b Fix nose direction 2026-08-10 12:29:49 -04:00
Clifford Yapp 23d22a4f4f Add option to naca456 to create pairs of wings 2026-08-10 16:20:57 +00:00
Clifford Yapp 4c98c4ae6a More non-unity include fixes 2026-08-10 11:41:57 -04:00
Clifford Yapp 84a7f49c2f Fix includes for non-unity building 2026-08-10 11:30:29 -04:00
Clifford Yapp 06ad2c1d93 Fix test building with clang 2026-08-10 15:28:39 +00:00
joshbaker22 e3d8383366 Update dbupgrade.tcl dbversion -> db version 2026-08-10 09:00:09 -04:00
Clifford Yapp 90f1d0e307 Make sure OLD_FRAMES matches something before calling REMOVE 2026-08-08 21:51:46 -04:00
Clifford Yapp 6d8efc0d44 add bu_setprogname 2026-08-08 21:41:52 -04:00
Clifford Yapp e501bee8c4 Make some adjustments to the conversion.sh script 2026-08-08 21:32:02 -04:00
Clifford Yapp 6f0a6a0281 Fix an infinite loop case in the mesh repair logic 2026-08-08 19:46:46 -04:00
Clifford Yapp edd3614106 Fix bounds traversal after subtractor tree shaking
Observed symptoms were rt_bound_internal: rt_bound_tree() failed
messages during facetize of havoc - investigation traced it to an
unintended side effect of the subtraction-pruning optimization commit
7f165d038a.  That same commit also introduced several lifecycle
problems.  We're addressing those here, as well as a few other issues
the audit also uncovered that were older defects.

Issues directly attributable to subtraction pruning:

 - Disjoint RHS soltabs were freed while other code still assumed
   every database leaf had a prepared soltab.
 - Newly created soltabs could remain in rti_new_solids after
   pruning freed them.
 - Callbacks and reg_all_unions were processed before pruning
   finalized the tree.
 - Piece/model metadata was calculated before pruning.
 - Touching and near-touching AABBs were pruned too aggressively.

Pre-existing defects exposed or discovered during the work:

 - Dynamic path discovery stopped at region boundaries, so primitive
   edits below regions were already unsupported.
 - rt_find_paths had a header/implementation mismatch from 667998ce6d.
 - Re-prep could retain freed pointers in per-type acceleration tables.
 - Region/solid pointer arrays had incomplete or incorrect clearing.
 - Path allocations leaked.
 - Repeated piece-state numbering was an old known issue—the source
   contained a comment describing it since 2011.

In more detail:

rt_gettree may prune a disjoint subtraction operand and release its
soltab, while rt_bound_internal subsequently traverses the original
database tree.  The bounds walker unnecessarily visited that right
operand even though subtraction bounds are determined entirely by the
left operand, producing primitive-as-combination lookup warnings and
failed bounds on models such as havoc.g.  Limit OP_SUBTRACT bounds
traversal to the minuend and add an in-memory regression covering a
region with a disjoint subtractor.

We also make AABB pruning conservative at touching and near-touching
boundaries by applying the ray distance tolerance.  Defer gettree
callbacks until pruning has finalized each region tree, then rebuild
union flags, model bounds, and piece-state indices from surviving
geometry.  Also remove pruned soltabs from the dynamic-reprep pending
list before freeing them.

Find edited descendants through region combinations using cycle-safe
database paths, invalidate affected prepared regions without relying on
pruned soltabs, and rebuild complete region expressions.  Release
prepared trees safely, compact region and solid arrays, restore reverse
region associations and per-type acceleration tables, clean pending
state on failures, and align rt_find_paths with the resource-free public
API.

Added testing to cover tolerance-separated, near-touching, touching, and
overlapping subtractors; verify callbacks and derived metadata observe
finalized trees; exercise repeated piece indexing; and confirm a
previously pruned subtractor can be edited, fully re-prepped, and ray
traced without stale soltab metadata.
2026-08-08 18:55:25 -04:00
Clifford Yapp 0ea9e5d6bf Use module suffix for plugin names when loading step schemas 2026-08-08 12:50:52 -04:00
Clifford Yapp d60340fa64 Comment out references to missing file 2026-08-08 12:45:26 -04:00
Christopher Sean Morrison 69f0c7aa29 clear out some of the recently closed bugs 2026-08-08 02:31:32 -04:00
Christopher Sean Morrison 5f1d849fcf note the fbhelp change to output to stdout or stderr 2026-08-08 02:31:13 -04:00
Christopher Sean Morrison e49e145d0b all fbtools can now -F to /dev/stdout and /dev/stderr 2026-08-08 02:27:35 -04:00
Christopher Sean Morrison aba501c7d6 ugh, BRLCAD_API example in comments had version logic reversed. fixed. 2026-08-08 02:26:56 -04:00
Christopher Sean Morrison bb806df22c make fbhelp send output to stdout and debug to stderr, less confusing to people seeking help 2026-08-08 02:24:03 -04:00
Christopher Sean Morrison 468a546518 support standard output/error /dev devices 2026-08-08 02:18:49 -04:00
Christopher Sean Morrison 328f5f2c79 make sure the mged gqa command -p option pattern keeps working 2026-08-08 02:11:41 -04:00
Christopher Sean Morrison b533b8a4ac rtxray and background test hooks 2026-08-08 02:10:13 -04:00
Christopher Sean Morrison df5415ec7b fbhelp test hook 2026-08-08 02:09:41 -04:00
Christopher Sean Morrison 94a38ed68b add preliminary preview mode.
in preview, default resolution is way reduced.  will need to fix the up/down scaling and layout to appropriately do preview mode, but step in the right dir
2026-08-08 02:00:44 -04:00
Christopher Sean Morrison 0441d8becd add a preview option 2026-08-08 01:59:15 -04:00
Christopher Sean Morrison eb12e4874f in preview mode, skip rtarea/gqa 2026-08-08 01:58:23 -04:00
Christopher Sean Morrison ef498a1aff rt -C + -o now works, was previously not writing the background color when going to a -o file 2026-08-08 01:57:19 -04:00
Christopher Sean Morrison da430b14d8 fix option handling when running gqa command in mged.
this replaces the custom handling with getopt consistency, so now -pprefix should work
2026-08-08 01:51:54 -04:00
Christopher Sean Morrison d3412fb56a add rtsil and rtxray tests to make sure bw keeps working 2026-08-08 01:44:48 -04:00
Christopher Sean Morrison f9055f240e rtxray needs do.c to ouptut bw when going to files so signal it with RT_RAW_OUTPUT 2026-08-08 01:42:46 -04:00
Christopher Sean Morrison 1b581d1b9b fixed rt -C255/0/0 -o file.pix bug where background wasn't getting written to file (to framebuf worked) 2026-08-08 01:40:27 -04:00
Christopher Sean Morrison abd114c048 fix rt outputting background color to a file.
since we're going through icv_writepixel, it must be 0-1 normalized which a_color was but background was written into the rgb vars (0-255) so we have to renormalize as we write.
2026-08-08 01:39:26 -04:00
Christopher Sean Morrison 4de4e42c6a add foreground and background set options to rtsil 2026-08-08 01:24:48 -04:00
Christopher Sean Morrison 4608347774 let rtxray's buffer be 1-channel instead of 3 so it can be written out as-is by the front end, but upconvert to RGB when going to the fb 2026-08-08 01:21:36 -04:00
Christopher Sean Morrison 8ebf84c5dd replaced unreliable pathname stat() checks with pixel-aware stream comparison, reads stdin, and detects truncated/ mismatched inputs 2026-08-08 00:32:20 -04:00
Clifford Yapp b246b8b9e0 ru_maxrss wasn't happy on OSX - try adding _DARWIN_C_SOURCE 2026-08-07 21:47:19 -04:00
Clifford Yapp d4b902c599 Windows drive paths need to be recognized, otherwise they get misinterpreted. 2026-08-07 18:45:54 -04:00
Clifford Yapp 8e54dc96af Use bu_file_delete 2026-08-07 18:36:56 -04:00
Clifford Yapp 90faec5470 NSIG on MacOSX again. Use bu/interrupt.h, adapted to also handle the C++ style include 2026-08-07 15:57:11 -04:00
Clifford Yapp 15cd9873d7 fix example placement 2026-08-07 15:42:03 -04:00
Clifford Yapp 2b02b85c27 Patch bext stepcode for Windows 2026-08-07 15:30:33 -04:00
Clifford Yapp 44de8fe4ba Teach rtwizard to generate cutting plane animations using the new APNG/MJPG libicv support 2026-08-07 18:46:59 +00:00
Clifford Yapp c1ffabae98 Update to latest bext SHA1 2026-08-07 13:52:33 -04:00
Clifford Yapp fb70b1ec7a Fix macOS bext cache logic
Need to use shasum -a 1 rather than sha1sum
2026-08-07 17:44:31 +00:00
Clifford Yapp d331abbf8c MSVC didn't like the previous lambda setup - try this. 2026-08-07 17:44:24 +00:00
Clifford Yapp df5b493b87 Various build fixes for Clang 2026-08-07 14:49:08 +00:00
Clifford Yapp 2d34974bf0 Don't try monkeying with the soname unless the copy is in our build tree 2026-08-07 09:59:18 -04:00
Clifford Yapp 38554e7252 CMake empty lists strikes again - adjust how we assemble test inputs 2026-08-07 08:42:17 -04:00
Clifford Yapp 0ea74b6092 Other schemas are no longer experimental, add header 2026-08-07 08:41:17 -04:00
Clifford Yapp 5eb1780289 docs: consolidate STEP conversion guidance
Replace obsolete schema-specific converter manual pages with
documentation for the unified step-g and g-step interfaces.  Put concise
defaults and task-oriented options immediately after each synopsis, then
move policy, schema, representation, metadata, and diagnostic detail to
later sections.

Centralize shared format coverage in STEP(5).  Organize it around
supported application protocols, FILE_SCHEMA selection, geometry,
assemblies, native CSG, AP242 PMI, metadata round trips, validation, and
schema provenance.  Remove repeated entity-by-entity explanations where
target-schema validation and reporting policy communicate the same
contract more clearly.

Document permissive import and export defaults together with strict,
exact, no-repair, invalid-rejection, shell-filtering, reporting,
work-budget, and native-CSG controls.  Retain the essential limitations:
content is never silently approximated, native CSG is opt-in, evaluated
BREP export is not yet available, and PMI export remains future work.

Correct the retained-graph description: scalable metadata lives in the
versioned _STEP_METADATA binary object, while _GLOBAL carries locators
and only mirrors modest graphs for compatibility.  Continue to document
the ISO and STEPmod schema sources, Recommended Practice 8 assembly
patterns, and redistribution constraints.

Update the object type reference for enhanced datum and annotation
records.
2026-08-06 22:05:29 -04:00
Clifford Yapp 5f0547cc70 STEP: Add support for AP203e2, AP214 and AP242
This is a major rework of the step import and export framework in
BRL-CAD (with corresponding changes on the upstream stepcode libraries
and tooling as well.)  AP203 basic should also see improvements in
success rates.

The biggest user-facing changes:

- add support for AP203e2, AP214, and AP242 editions 1 through 4
- replace schema-specific tools with unified step-g and g-step hosts
- add optional native CSG export and boolean-tree round trips
- import AP242 PMI as native datum and annotation objects
- add permissive bounded repair with strict and exact audit modes
- import shells, wireframes, sweeps, tessellations, and geometric sets
- implement Recommended Practice 8 assembly and hierarchy patterns

Replace the schema-specific converter executables with one step-g
importer and one g-step exporter.  Both hosts discover edition-specific
modules through a stable plugin boundary and use STEPcode's compact
generated API.  AP203, AP203e2, AP214, and AP242 editions 1 through 4
share conversion machinery without repeatedly compiling large schema
bindings.  Uses the new stepcode v2 API for more compact, faster
building.

Keep common import, export, product, geometry, unit, presentation, and
reporting logic at the top level.  Isolate genuinely schema-dependent
adapters under ap203, ap203e2, ap214, and ap242, and dispatch from
normalized Part 21 FILE_SCHEMA identifiers and aliases.  Remove the
obsolete directional schema converters and their duplicated EXPRESS
sources.

Make ordinary import permissive and repair-oriented.  Validate the
supplied topology first, apply only bounded and measured repairs, and
publish a clearly tagged invalid BREP when source contradictions prevent
valid geometry from being constructed.  Retain strict, exact, no-repair,
and reject-invalid modes for auditing workflows where accepting repaired
or invalid data is unwanted.

Strengthen BREP construction for periodic and singular surfaces, pcurve
regeneration, coherent branch selection, seam relocation, collapsed
poles, keyhole loops, shell topology, and locally inconsistent
tolerances.  Add bounded work budgets, nested face scheduling,
memory-aware spooling, cancellation, progress snapshots, selected-entity
retries, and deterministic database writes so difficult geometry remains
diagnosable and contained.

Import faceted and advanced BREP solids, open shells and surface models,
geometric sets and wireframes, swept solids, tessellated geometry,
mapped items, replicas, transformations, and repeated representation
content.  Allow users to omit shell-only geometry when an exchange file
mixes construction surfaces with its intended solid model.

Implement the applicable assembly and product practices from Recommended
Practice 8, including the AP203 hierarchy forms, product-definition
graphs, NAUO/CDSR relationships, mapped representations, and Part 21
SCOPE handling.  Preserve product identity, configuration relationships,
document metadata, materials, presentation styles, and validated unit
assignments.

Map applicable AP242 semantic and graphical PMI into native datum and
annotation objects.  Preserve datum references and systems, dimensional
and geometric tolerances, semantic labels, presentation geometry, text
runs, styles, and associations with the represented product instead of
reducing all PMI to unstructured database attributes.

Extend g-step with shared assembly, configuration, material, style,
unit, and metadata emitters.  Add opt-in native CSG export for exact
AP203e2, AP214, and AP242 primitive and boolean mappings BRL-CAD can
represent, including rectangular pyramids, while retaining BREP
fallback for unsupported primitives.  Import supported native CSG trees
back into BRL-CAD combinations so optional CSG round trips preserve
boolean structure.

We keep the entity-type census in the unified importer and add
concise diagnostic aggregation, machine-readable reports, repair
provenance, partial success exit states, and scalable metadata storage.
Sample database builds accept useful partial STEP output only when the
expected database was actually written.

Add focused, topic-specific testing inputs for schema dispatch and
assembly alternatives, CSG round trips, PMI, geometric sets, mapped
items, units, periodic and singular topology, repair policy, invalid
preservation, and bounded-work regressions.  These issues cropped up in
real-world testing (usually of GrabCAD models) so our test fixtures are
representative distillations of specific types of problem cases.  This
helps us avoid regressing conversion behavior when we make other
changes.
2026-08-06 22:05:29 -04:00
Clifford Yapp 18c436de37 librt: extend annotation records for imported PMI
Add what is hopefully the last of the missed pieces...

These changes are for the purpose of preserving presentation semantics
that STEP AP242 may attach to text and graphical annotations.  We add
native roles for masks, center marks, placeholders, and text
decorations, together with style flags for fill, scale, emphasis, and
decoration.

Also supports per-segment affine text transforms and filled polygon loop
topology.  This lets rich PMI be flattened into BRL-CAD annotation
objects without embedding a foreign annotation container, while
retaining compatibility outline segments for older consumers.
2026-08-06 22:03:53 -04:00
Clifford Yapp 9d85c26dbb Whoops - helps to commit the header too 2026-08-06 20:28:20 -04:00
Clifford Yapp 1d58405227 More annot updates and tests 2026-08-06 19:08:27 -04:00
Clifford Yapp b24780a5cd Forgot libbu magic update 2026-08-06 19:06:51 -04:00
Clifford Yapp 23eabb2c05 Add libbrep changes from STEP work
Lots of work to the pullback logic, but also needed a change to
SurfaceTree::hasSplit.  The latter needs careful checking to see if it has
raytracing implications - my vague recollection there is that we were trying to
reuse memory for performance efficiencies, so it may need revisiting.
2026-08-06 16:50:51 -04:00
Clifford Yapp 985e679f71 Font is present - enable test 2026-08-06 16:33:18 -04:00
Clifford Yapp 7290e490ae Add current state of annotation/datum changes
Working on STEP conversion, it became desirable to expand the data our annot
and datum primitives can handle.  This is the extraction of the initial cut
at it from the branch work, isolated into a single commit for easier study.
This likely needs design work before being considered "final form."
2026-08-06 16:10:24 -04:00
Clifford Yapp 7e04c8330e Stage the osifont for annotation character display 2026-08-06 15:52:54 -04:00
Clifford Yapp a6956062a5 Look for lazy step library in FindSTEPCODE.cmake 2026-08-06 14:26:05 -04:00
Clifford Yapp 086ddec5c9 CMake adjustments from step work
More sanitizer CMake setup, make sure we can operate on 3rd party
libraries copied into our tree.
2026-08-06 14:24:41 -04:00
Clifford Yapp f563428ede Add in the prefixes to run tools with sanitizer setup if enabled 2026-08-06 14:19:30 -04:00
Clifford Yapp ed38b6a9d9 Adjust how env2c regexes are set up 2026-08-06 14:14:46 -04:00
Clifford Yapp cd7910c372 Adjustments to sanitizer configure options
While working on step, ended up making some adjustments to how CMake sets up
the Address and Thread sanitizers.  Pull in the main toplevel changes.
2026-08-06 14:08:51 -04:00
f4alt 441d6b1a36 have to guard - shared_library_suffix can be empty string (thanks windows) 2026-08-06 13:52:43 -04:00
Clifford Yapp e4ef077f5f Update to latest bext SHA1 2026-08-06 15:07:38 +00:00
Clifford Yapp 8c4ae99dd6 Work on improving our OpenNURBS find_package logic 2026-08-06 14:43:08 +00:00
Clifford Yapp cdaa0b805f Adjustments to MMESH and OPENNURBS find_package modules 2026-08-06 14:06:47 +00:00
Clifford Yapp 6da2df2ab4 Do we need to check for mach_cpu_time first on OSX? 2026-08-06 09:53:19 -04:00
Clifford Yapp 9c38df52e6 Make sure rtsil is there for check 2026-08-06 07:20:38 -04:00
Clifford Yapp 401862893d Need bio.h 2026-08-06 07:09:17 -04:00
Clifford Yapp fa5eaa56c6 List libbg static target 2026-08-05 22:45:49 -04:00
Clifford Yapp 4f701d4b48 Wfloat-equal warning avoidance 2026-08-05 18:52:24 -04:00
Clifford Yapp 96158056c1 Remove stb_truetype.h listing 2026-08-05 18:48:53 -04:00
Clifford Yapp 7070a87bcf Various fixes for brep CSG solid routines
While working on STEP export, we ended up doing validity checking on our CSG
outputs.  A number of them weren't producing outputs that met the validity
criteria of OpenNURBS - we need to fix that to have valid exports.
2026-08-05 16:26:35 -04:00
Clifford Yapp a63a311abc Fix various 'make check' failures
- Generalized cubic/quartic solvers to normalize non-monic polynomials in src/libbn/poly.c:261.
- Corrected reversed/incorrect polynomial references and documented NumPy 2.4.6 as the independent control in src/libbn/tests/test_poly.c:337.
- Fixed exact-equality test helpers, complex references, and polynomial fixture selection.
- Fixed the dormant HNEAR_ZERO argument typo in include/vmath.h:482.
- Implemented MGED’s documented one-path oed behavior, correct arc selection, aggregate bounding-box keypoints, and apply/reset preservation in src/mged/chgtree.c:186 and src/mged/edsol.c:973.
- Corrected repository-policy omissions and added narrowly scoped exceptions for the disabled vendored example and intentional destructor-time abort.

Polynomial roots were independently checked with NumPy and direct residual evaluation.
2026-08-05 20:24:16 +00:00
Clifford Yapp 76254f3d32 build fixes, disable dm test for font that isn't in repo yet 2026-08-05 15:34:46 -04:00
Clifford Yapp d970c8f131 Use explicit number sizes for htons/ntolh/etc. operations 2026-08-05 15:15:57 -04:00
Clifford Yapp 6e952a3ef4 Ignore python cache directories 2026-08-05 15:07:28 -04:00
Clifford Yapp 19df473618 Switch our stb_truetype copy to the hardened struetype fork 2026-08-05 15:05:24 -04:00
Clifford Yapp ad4864b412 convert adjustments, ptbl test, stage struetype.h 2026-08-05 14:59:12 -04:00
Clifford Yapp 4769217d72 Make sure we have buffer before doing the memset 2026-08-05 14:56:41 -04:00
Clifford Yapp 1eeed6db17 Add inside/outside test function for ON_Brep 2026-08-05 14:51:51 -04:00
Clifford Yapp 1afd80eb5a Fix trimesh split in case where non-manifold mesh edge has more than two incident faces 2026-08-05 14:48:58 -04:00
Clifford Yapp d5ba39fb22 gsh adjustments for swrast dm 2026-08-05 14:44:51 -04:00
Christopher Sean Morrison 0b5d519fcc fixed pixborder bug.
pixborder didn't account for an edge case where the right edge of an image was expected to be colored (except for one pixel on the top edge).  Example: pixborder -b "255 0 0" -t "255 255 255" < pix/moss.pix | pix-fb
2026-08-05 01:08:08 -04:00
Christopher Sean Morrison e5fcf88304 fix wavelet on windows.
looks like a flawed edit in 6eae5bd81b where setmode was added in the wrong place.  promoted up to main and seems to be behaving.
2026-08-05 00:58:54 -04:00
Christopher Sean Morrison 22bd333eb2 renamed time header 2026-08-05 00:52:28 -04:00
Christopher Sean Morrison 01ea66c468 fix internal old name refs 2026-08-05 00:47:44 -04:00
Christopher Sean Morrison 409010639f time.h renamed to datetime.h 2026-08-05 00:47:04 -04:00
Christopher Sean Morrison debcbfe9db time.h renamed to datetime.h 2026-08-05 00:38:29 -04:00
Christopher Sean Morrison d5ae954828 knocked out these three bugs 2026-08-04 00:31:34 -04:00
Christopher Sean Morrison 12cbd5c8bf add regression test to make sure killtree doesn't spew lookup failure messages when it encounters the same object name again (after having killed it earlier). 2026-08-04 00:31:19 -04:00
Christopher Sean Morrison 0667fd4b3d fixed an issue with the killtree command where it'd spew db_lookup failures.
it woudl say objects don't exist because it wasn't tracking what all
was deleted.  now it keeps track and keeps the output free of the
spurious messages.
2026-08-04 00:27:25 -04:00
Christopher Sean Morrison aa7f93a8aa speed up heavy-CSG rendering (10-20%) with a bit-test filter.
this is a bloom-style filter meaning it's not conclusive when a bit is
set (so we keep scanning as before), but a missing bit proves the
solid is absent (so we can stop early).  no false negatives or
semantic changes to tracing, just a nifty speed up when models get
complex.

on small models with less than 64 solids, it's actulaly exact, but
then the gain is expected to be minimal.

in testing benchmark was relativley unchanged, but havoc improved more
than 12%.
2026-08-04 00:13:34 -04:00
Christopher Sean Morrison 0ff6b79d26 only insert unique regions, big speed-up on heavy CSG trees.
by only inserting unique we no longer end up inserting and iterating
over duplicate st_regions during prep, once per solid leaf.  by
eliminating this during prep, we speed up ray trace shot time during
region traversals (e.g., during boolean weaving).

this prep-time region dedupe doesn't make a difference on benchmark
models, but is another 5% improvement on havoc.
2026-08-04 00:07:32 -04:00
Christopher Sean Morrison afe944e15a fixed bug rendering small images to fb disk devices (e.g., rt -s20 -F file.pix).
this didn't affect -o outputs, only -F but was a consequence of interactive framebuffer windows wanting a 512x512 min so they remain visible.  now when a disk device is specified, it outputs that size.
2026-08-04 00:05:42 -04:00
Christopher Sean Morrison 87c0072076 the bu_ptbl_cat_uniq optimization improves the performance of some CSG models (region heavy ones, e.g., havoc). 2026-08-03 23:51:10 -04:00
Christopher Sean Morrison 15a4ee2c14 optimize bu_ptbl_cat_uniq, reduce its runtime about in half.
avoids calling bu_ptbl_ins_unique as it does another scan to repeat
validation, capacity checks, and a func call before doing the
uniqueness scan.

doesn't really make any impact on low-count intersections like the
benchmark (doesn't change vgr) but does reduce region-heavy renders
like havoc by 3-5%.
2026-08-03 23:42:54 -04:00
Christopher Sean Morrison 9223d46263 obj files with unnamed groups previously crashed.
the spec is unclear whether that's valid, but we did encounter one in the wild.  so now it's supported.
2026-08-03 20:00:35 -04:00
Christopher Sean Morrison 59b7bf6dbd remove libfb-dummy.c, stub added long time ago no longer needed 2026-08-03 19:56:38 -04:00
Christopher Sean Morrison 3ef1bbcff5 ran into this case where unset ended up scanning whole hard drive overnight 2026-08-03 19:56:38 -04:00
Christopher Sean Morrison 5006ef94cf make sure we persist the EXT dir setting harder, persist it if set, but then repromote also 2026-08-03 19:56:38 -04:00
Christopher Sean Morrison b597a3f681 don't let build silently ignore bad BRLCAD_EXT_DIR setting as it leads to unexpected automatic re-downloading. tell the user to unset for auto or fix it. 2026-08-03 19:56:38 -04:00
Christopher Sean Morrison fe01de0d15 renamed bu/time.h to bu/gettime.h to match impl 2026-08-03 19:56:38 -04:00
Christopher Sean Morrison 8cd92bd31b renamed time.h to datetime.h to match source 2026-08-03 19:56:37 -04:00
Christopher Sean Morrison b8c083a974 renamed header 2026-08-03 19:56:37 -04:00
Christopher Sean Morrison e123bdc8ec rename bu/time.h to bu/datetime.h to match source 2026-08-03 19:56:37 -04:00
joshbaker22 266a094b3e Update isize.c fix units translation
This was attempting to multiple by base2local units but we need inverse so dividing makes sense here. Previously isize was giving correct answer in mm only.
2026-08-03 15:52:37 -04:00
Christopher Sean Morrison 5741d04c0e test file moved 2026-08-03 12:26:08 -04:00
Christopher Sean Morrison 750d155c80 fold in the remaining tests (eigen, mat, sobol, tabdata) so all are consistent with the rest.
will probably want to revisit the target reduction approach if there's a way we can do that better, low maintenance.
2026-08-03 12:25:53 -04:00
Christopher Sean Morrison d85d2cea50 fold old tests into the new ones so we maintain same original cases.
this unifies the entire testing set and expands overall coverage.
2026-08-03 11:28:16 -04:00
Christopher Sean Morrison c2b0dcc923 merge in qmath tests including all the distance checks 2026-08-03 11:28:16 -04:00
Christopher Sean Morrison 717adb34ba merge in sobol.c tests 2026-08-03 11:28:16 -04:00
Christopher Sean Morrison e882d117f1 merge in the old poly tests as a legacy case 2026-08-03 11:28:16 -04:00
Christopher Sean Morrison 06fe97270d merge in more of the existing mat test cases 2026-08-03 11:28:16 -04:00
Christopher Sean Morrison f47183588c merge in the other test cases 2026-08-03 11:28:16 -04:00
Christopher Sean Morrison 5545d1ac24 make sure we get a repeatable sequence as expected with a predefined seed 2026-08-03 11:28:16 -04:00
Christopher Sean Morrison 5fb57e4759 add new unit testing for complex, mat, poly, qmath, randsph, and mt19937ar.
will reconcile duplication in following.
2026-08-03 11:28:16 -04:00
Christopher Sean Morrison 1ca08d8c97 expand noise unit testing to include large coordinates, concurrency, perlin noise, and other cases 2026-08-03 11:28:16 -04:00
joshbaker22 8a1e2c5161 Update sv.adoc update description/examples
Update description/examples to show that sv coordinates on the screen are -1 to 1 for x and then potentially more or less depending on shape of graphics window (if square then onscreen y would also be -1 to 1).
2026-08-03 10:54:41 -04:00
Clifford Yapp b6d65eca6b libbg: enable LBFGS++ optimization for Geogram remeshing
Add an MIT-licensed LBFGS++ adapter for Geogram's CVT optimizer,
replacing the upstream HLBFGS implementation (which we cannot use due to
licensing issues.)  This restores the intended quasi-Newton phase, which
previously fell back to additional Lloyd iterations because no usable
optimizer was available.

Generic_Twin testing with an example Generic_Twin mesh shows a modest
improvement in average triangle quality at roughly 30% higher runtime
and memory use.  The overall timings remain comparable, making the
tradeoff appropriate for a quality-oriented remeshing operation.

Preserved fixed-iteration and progress-callback behavior, added focused
optimizer tests, and recorded the exact upstream revision and license.

Removed the unused legacy C/Fortran liblbfgs vendor tree.
2026-08-02 04:44:53 -04:00
Clifford Yapp faf383e1f6 Add notes about brep csg/boolean logic and relevant experimental work 2026-08-01 19:08:58 -04:00
Clifford Yapp 7fbe7eeaa6 Stash some notes on what a proper bot2nurbs would take 2026-08-01 18:07:36 -04:00
Clifford Yapp e2f4e2c95e old root3 test is OBE 2026-08-01 17:21:05 -04:00
Clifford Yapp a36e15719d libbu: make lazy semaphore publication and parallel bookkeeping race-free
bu_semaphore_acquire() and bu_semaphore_release() invoke
bu_semaphore_init() on every operation.  The lazy-initialization design
introduced in 2014 therefore deliberately used an unlocked
bu_nsemaphores check as its normal fast path, avoiding acquisition of
the global initialization mutex for every semaphore operation.

That fast path was operationally useful but was not valid under the C
memory model.  It read bu_nsemaphores without synchronization while
initializing threads wrote the same ordinary object under bu_init_lock.
A lock held only by writers does not synchronize unlocked readers, so
this was a data race and undefined behavior.

The count is also more than a range bound: it is the publication marker
that tells a caller that the corresponding native mutexes and their
magic values are ready for use.  Without acquire/release ordering, a
reader could observe the enlarged count without being guaranteed to
observe all of the initialization writes that preceded it on a weakly
ordered architecture.

The March 2026 monotonic-count fix prevented a late initialization
request from lowering bu_nsemaphores and causing already-live mutexes
to be reinitialized.  That addressed the observed FreeBSD EPERM
failure, but it did not remove the underlying C data race or establish
a happens-before relationship for fast-path readers.

Make bu_nsemaphores an atomic publication counter:

* Use an acquire load for the unlocked already-initialized fast path.
* Re-read the count after acquiring bu_init_lock.
* Initialize only the range above that serialized value.
* Release-store the new count only after every mutex and magic value in
  the range has been initialized.
* Use Windows Interlocked operations on native Windows for compatibility
  with MSVC versions lacking complete C11 stdatomic support.
* Snapshot and reset the count atomically in the explicitly quiescent
  bu_semaphore_free() path.

The initialization mutex continues to serialize writers.  If a reader
observes an older, smaller count, it only enters the slow path and
rechecks under that mutex.  If it observes a sufficient count, the
acquire load guarantees visibility of the initialization writes
published by the release store.  Consequently, no mutex can be used
before initialization or initialized twice while the pool is live.

This preserves the original performance design.  An already-initialized
semaphore operation performs one atomic integer load and comparison and
does not acquire the initialization mutex.  On x86-64 the acquire load
compiles to an ordinary load instruction.  The extra serialized work is
confined to the rare pool-growth path.  Windows Interlocked loads are
stronger than strictly necessary but retain the lock-free fast path.

ThreadSanitizer testing of this path exposed additional libbu races:

* parallel_wait_for_slot() polled worker counters without the
  BU_SEM_THREAD lock used by writers.
* parallel mapping slots were initialized and cleared partly outside
  the lock used by slot allocation.
* unrelated top-level bu_parallel() callers shared mapping slot zero.
* the ncpu == 1 shortcut released its caller's still-live worker ID.
* failed native thread creation leaked reserved mapping IDs.
* malloc's first-use bomb-failsafe flag was read and written by
  concurrent callers without synchronization.

Synchronize mapping allocation, initialization, and release under
BU_SEM_THREAD, take locked snapshots in the throttled wait path, and
give each top-level bu_parallel() invocation its own parent context.
Do not release a worker mapping from the single-thread shortcut, and
return mappings when native thread creation fails.  Protect the
bomb-failsafe initialization with the existing malloc semaphore, adding
no new allocation fast-path lock.

Also serialize the Solaris concurrency hint and replace the Windows
WaitForMultipleObjects join with individual waits.  This removes the
Windows handle-count limit and keeps successfully created handles
contiguous when a CreateThread call fails.

Add regression coverage that repeatedly frees and concurrently rebuilds
the native semaphore range, starts concurrent top-level bu_parallel()
calls, and deterministically checks that recursive single-thread calls
cannot make a live worker ID available for reuse.  Clean an unrelated
race from the existing semaphore test so sanitizer results describe
library behavior rather than test bookkeeping.

Document why the earlier monotonic counter change was necessary but
insufficient, and record the acquire/release publication contract.

bu_semaphore_free() remains explicitly quiescent-only.  Supporting
concurrent destruction would require a separate lifetime protocol in
which every acquisition participates and teardown waits for all users;
it is outside the current numeric-ID API contract.
2026-08-01 17:10:16 -04:00
Clifford Yapp d4914fbf2d Make another try at getting core semaphore behavior to be robust with static libs 2026-08-01 14:10:27 -04:00
joshbaker22 e22f10fde6 Update bb.adoc remove see also (pointing to invalid command)
remove see also pointing to invalid command
2026-07-31 15:54:34 -04:00
joshbaker22 20bc4cc106 Update zap.adoc example syntax 2026-07-31 15:51:50 -04:00
joshbaker22 177b6dc875 Update t.adoc example syntax 2026-07-31 15:44:09 -04:00
joshbaker22 f7b8ca59bb Update ted.adoc this doesn't take options so remove empty [] 2026-07-31 14:58:09 -04:00
joshbaker22 bbb5e7a3f9 Update 3ptarb.adoc example syntax 2026-07-31 14:52:29 -04:00
joshbaker22 6817522f07 Update B.adoc example syntax 2026-07-31 14:50:00 -04:00
joshbaker22 19eb064610 Update M.adoc example syntax 2026-07-31 14:47:27 -04:00
joshbaker22 93234de2a8 Update Z.adoc example syntax 2026-07-31 14:45:57 -04:00
joshbaker22 74a2f61580 Update adc.adoc fix example syntax 2026-07-31 14:44:47 -04:00
joshbaker22 186c6ac93f Update adjust.adoc fix example syntax 2026-07-31 14:37:45 -04:00
joshbaker22 dee0256eb1 Update mater.adoc a note about the shader/oshader attrs 2026-07-31 14:22:39 -04:00
joshbaker22 b70a2ba8eb Update mater.adoc a note on color attributes 2026-07-31 14:18:26 -04:00
joshbaker22 063b95148a Update comb_color.adoc see also and a note about attributes 2026-07-31 14:14:31 -04:00
joshbaker22 4214d8ac56 Update copyeval.adoc syntax was backwards 2026-07-31 14:02:31 -04:00
joshbaker22 30dd728de8 Update cp.adoc add description in name field 2026-07-31 13:59:01 -04:00
joshbaker22 d5d9848ef1 Update dump.adoc see also keep, garbage_collect 2026-07-31 13:47:36 -04:00
joshbaker22 df58c35dc1 Update echo.adoc fix legacy unicode quotes 2026-07-31 13:45:10 -04:00
joshbaker22 d3ac28c896 Update screengrab.adoc see also png 2026-07-31 13:41:17 -04:00
joshbaker22 1b6f71d033 Update ev.adoc remove legacy unicode 2026-07-31 13:02:10 -04:00
joshbaker22 d02e76f369 Update i.adoc this is America! 2026-07-31 12:47:25 -04:00
joshbaker22 1507c4d851 Update fracture.adoc remove legacy unicode quotes 2026-07-31 12:45:28 -04:00
joshbaker22 8f4c9f58b8 Update gui.adoc fix legacy unicode characters 2026-07-31 12:38:54 -04:00
joshbaker22 c1b5d3f9a4 Update idents.adoc See also 2026-07-31 12:26:49 -04:00
joshbaker22 250843e290 Update keep.adoc see also dump 2026-07-31 11:28:07 -04:00
joshbaker22 b2895424e7 Update killall.adoc see also 2026-07-31 11:25:20 -04:00
joshbaker22 39f85ae83e Update killrefs.adoc see also 2026-07-31 11:24:42 -04:00
joshbaker22 d8ff300e35 Update killtree.adoc see also 2026-07-31 11:23:27 -04:00
joshbaker22 126892dc5b Update lookat.adoc add see also view 2026-07-31 11:11:44 -04:00
joshbaker22 1615502b39 Update mv.adoc fix legacy unicode apostrophe 2026-07-31 11:00:42 -04:00
joshbaker22 1771f36f30 Update mvall.adoc dbfind -> db find, fix see also 2026-07-31 10:53:14 -04:00
joshbaker22 a5eee97a89 Update prefix.adoc replace legacy unicode codes 2026-07-31 10:39:06 -04:00
joshbaker22 1e11d3e885 Update xpush.adoc see also pull 2026-07-31 10:31:02 -04:00
joshbaker22 05b74edf15 Update push.adoc see also pull 2026-07-31 10:30:37 -04:00
joshbaker22 101c9a9116 Update npush.adoc add footer
This page didn't have the author or other stuff at bottom. Added that and also see also section
2026-07-31 10:29:56 -04:00
joshbaker22 c330fdd31b Update push.adoc add see also section 2026-07-31 10:25:54 -04:00
joshbaker22 597f4b03de Update r.adoc fix legacy unicode quotes 2026-07-31 10:21:26 -04:00
joshbaker22 4c6b44aa1f Update rpp-cap.adoc fix legacy unicode quotes 2026-07-31 10:06:34 -04:00
joshbaker22 b4da9ebdb0 Update tra.adoc fix unicode single quote 2026-07-31 09:33:02 -04:00
joshbaker22 b6c22e2eed Update wcodes.adoc add attr to see also section 2026-07-31 09:12:10 -04:00
joshbaker22 46eac380df Update whatid.adoc add lc to see also 2026-07-31 09:11:03 -04:00
joshbaker22 bd67b02c6a Update which_shader.adoc add search to see also section 2026-07-31 09:08:07 -04:00
joshbaker22 2213f4079f Update whichair.adoc see also search 2026-07-31 09:07:30 -04:00
joshbaker22 47f1c6f0bb Update whichid.adoc see also search 2026-07-31 09:06:49 -04:00
joshbaker22 9d81f1daae Update xpush.adoc fix unicode quotes, add see also 2026-07-31 08:58:12 -04:00
joshbaker22 618275aa7a Update dbversion.adoc see also (remove version (not a command) and add db) 2026-07-31 08:44:24 -04:00
joshbaker22 66283434e4 Update dbfindtree.adoc see also search 2026-07-31 08:42:20 -04:00
joshbaker22 ec05b21444 Update dbfind.adoc see also db, search 2026-07-31 08:41:39 -04:00
joshbaker22 ffcd7bbda1 Update db.adoc have enough subcommands to reorder in alphabetical order 2026-07-31 08:40:04 -04:00
joshbaker22 45511641b0 Update db.adoc add subcommands
Added version, find, and concat. Concat will have to be expanded a bit but I wasn't sure how to do that or if we want to make concat it's own page (just change dbconcat to db_concat?)
2026-07-31 08:19:29 -04:00
joshbaker22 dcfbd62873 Update autoview.adoc see also view 2026-07-31 07:26:38 -04:00
joshbaker22 14d34de729 Update Introduction.adoc capitalization Asciidoc -> AsciiDoc 2026-07-31 07:08:18 -04:00
joshbaker22 45eb87849d Update status.adoc move unicode curly quotes to regular quotes
these old quotes were showing as a ? in both preview and the manual. Changed to standard quotes.
2026-07-31 07:03:46 -04:00
joshbaker22 bcb8ae513b Update viewdir.adoc add see also section 2026-07-30 15:57:52 -04:00
joshbaker22 ae18cfeaf2 Update viewsize.adoc see also view 2026-07-30 15:56:52 -04:00
joshbaker22 0fc39c1090 Update sv.adoc add see also view 2026-07-30 15:52:38 -04:00
Christopher McGregor c22c68885a fix parser broken list expectation after dash
test commit before mass doing this with the rest of the commands
2026-07-30 15:47:21 -04:00
joshbaker22 4cb05f248a Update slew.adoc add see-also view 2026-07-30 15:46:16 -04:00
joshbaker22 bf5c2bd400 Update saveview.adoc add see also view 2026-07-30 15:44:57 -04:00
joshbaker22 eae5c947a1 Update qvrot.adoc add see also view 2026-07-30 15:42:19 -04:00
joshbaker22 a5e6cec4e7 Update quat.adoc add see also view 2026-07-30 15:41:44 -04:00
joshbaker22 72978c6e24 Update orient.adoc add see also view 2026-07-30 15:39:04 -04:00
joshbaker22 f3f10ac8fd Update orientation.adoc add see also view 2026-07-30 15:38:39 -04:00
Christopher McGregor 33be268e1c missed a spot + looks like the intent was quotes 2026-07-30 15:33:39 -04:00
f4alt d8b5509d22 get rid of hidden unicode 2026-07-30 15:28:37 -04:00
joshbaker22 a25c8b9c21 Update eye_pt.adoc add see also view 2026-07-30 15:07:14 -04:00
joshbaker22 b4438c88ed Update eye_pos.adoc add view to see-also list 2026-07-30 15:06:29 -04:00
joshbaker22 30edde49e4 Update eye.adoc add see also view 2026-07-30 15:05:33 -04:00
joshbaker22 29661c751f Update center.adoc add see also section 2026-07-30 14:55:54 -04:00
joshbaker22 b43982b939 Update dir2ae.adoc add see also section
Add see also section and point it to view
2026-07-30 14:45:24 -04:00
joshbaker22 9bb14d0ccc Update aet.adoc - see also view
see also the view command
2026-07-30 14:25:17 -04:00
joshbaker22 74120be40f Update ae2dir.adoc -> see also view
Move see also to its own section and note view
2026-07-30 14:23:50 -04:00
joshbaker22 5ff807eb83 Update ae.adoc - see also: view
Move "see also" part to new section.
2026-07-30 14:21:23 -04:00
f4alt e7ef2db911 gate on empty and null 2026-07-30 09:50:40 -04:00
f4alt 91b81058a5 define in priority order set by bu_timer_cpu() so none are left unused 2026-07-30 09:32:01 -04:00
f4alt d30df5b720 strcmp -> bu_strcmp 2026-07-30 09:16:41 -04:00
f4alt dc9dd4c07e return -1 on errors 2026-07-30 09:04:30 -04:00
f4alt 4623990bae looks like these were renamed 2026-07-30 08:44:14 -04:00
f4alt dbbdbddae7 close comment 2026-07-30 08:39:04 -04:00
f4alt 39ec25c26f fix warning messages 2026-07-30 08:35:56 -04:00
Christopher Sean Morrison eee1fd4de8 track cputime instead of wallclock time for measurements 2026-07-30 01:17:17 -04:00
Christopher Sean Morrison 18919b158e two more timers to test 2026-07-30 01:14:39 -04:00
Christopher Sean Morrison 2145d05faf add some keypoint oed regression testing 2026-07-30 01:14:12 -04:00
Christopher Sean Morrison ab19d73403 test the new cpu timers 2026-07-30 01:12:10 -04:00
Christopher Sean Morrison 583de63e93 update naming convention, better but not great 2026-07-30 01:08:59 -04:00
Christopher Sean Morrison c92cc23cc2 trying a diff naming convention, still yucky tho 2026-07-30 01:08:17 -04:00
Christopher Sean Morrison a5e03750a3 rework preprocessor logic to reduce nesting, simplify and warn 2026-07-29 23:58:55 -04:00
Christopher Sean Morrison b69350d5a9 implement high-precision timers for cputime, per process and per thread 2026-07-29 23:41:38 -04:00
Christopher Sean Morrison 42ffd3f553 declare two new API timers for getting cputime akin to bu_gettime(), per process and per thread. 2026-07-29 23:28:40 -04:00
Christopher Sean Morrison 456c7059da add testing for high-performance cpu timer api (win and mac threading) 2026-07-29 23:27:05 -04:00
Christopher Sean Morrison b7ba663fd6 looks like submodel fix might not have completely made it in, so pull it forward just in case 2026-07-29 23:23:41 -04:00
Christopher Sean Morrison 9111ab3a1c added new reference documentation, a visual ref of all BRL-CAD objects 2026-07-29 23:21:20 -04:00
Christopher Sean Morrison 3f46a5ff2c add a vrml 1.0 regress test to go with the 2.0 test 2026-07-29 23:15:49 -04:00
Christopher Sean Morrison 488a07b961 update oed docs+examples to note that the rhs is now optional, that it'll use the bounding box center when a keypoint rhs path is not specified 2026-07-29 23:14:15 -04:00
Christopher Sean Morrison 0883cab92d need to include the decl so icv_rot() is exported when visibility=hidden 2026-07-29 23:05:43 -04:00
Christopher Sean Morrison 935c19f455 another missing header, for memcpy 2026-07-29 23:05:43 -04:00
Christopher Sean Morrison db676e652b side-effect of unity builds, not detecting missing includes 2026-07-29 23:05:43 -04:00
Christopher Sean Morrison 0a2909b786 initial guide to all the primitives and their params with visual examples.
still needs more work and several object types clearly need some tlc, but this finally leaps over the mged appendix in terms of completeness and usefulness.  showcases the variety of entity types, examples of the main types, coverage across all objects.

the images including labels and annotations were completely comprised of existing BRL-CAD tools (some model-space, some image-space).
2026-07-29 19:58:40 -04:00
Christopher Sean Morrison 4d5b342d56 submodels still need path work, but this addresses a windows-specific failure. assume relative is relative to .g for now, and non-pathed is rel to cur dir. ultimately this begs for more attention to get .g submodel refs consistently portable. 2026-07-29 19:54:57 -04:00
Christopher Sean Morrison 05074ccc0a global hitmiss freelist appears to have been mucked unsafely, triage.
we need to make sure the lists are initialized here before we try to add to them otherwise we'll get corruption and crashes (or asserts if we're lucky).
2026-07-29 19:51:49 -04:00
Christopher Sean Morrison 1b31143bf6 now all objects have a vshot callback defined, though some are stubbed miss or shot() in a loop. 2026-07-29 18:32:55 -04:00
Christopher Sean Morrison 7c12c85469 the rest of these prims aren't ready for vshot yet, so stubbing in shot() in a loop. 2026-07-29 18:32:55 -04:00
Christopher Sean Morrison 6871f8cfd3 grips don't raytrace, so stub vshot 2026-07-29 18:32:54 -04:00
Christopher Sean Morrison ff4c4ed4ad preliminary vshot implementations. most are showing a 20-50% speedup from coherency performance testing. 2026-07-29 18:32:54 -04:00
Christopher Sean Morrison b9783192d8 annot also stubbed, doesn't raytrace (yet) 2026-07-29 18:32:54 -04:00
Christopher Sean Morrison 24349a1332 stubs for datum, joint, and sketch since they're not solid 2026-07-29 18:32:54 -04:00
Christopher Sean Morrison fe7035e6b6 helper for testing vshot. not great that it only handles the outer span, but good enough for testing. 2026-07-29 18:32:54 -04:00
Christopher Sean Morrison 9d73e74b94 need to export rt_vshootray(). still might want to change the shape of ap to be an array. 2026-07-29 18:32:53 -04:00
Christopher Sean Morrison 51fdd77732 testing harness for comparing vshot against shot 2026-07-29 18:32:53 -04:00
Christopher Sean Morrison a2fb9faa11 steps towards vshot working at scale 2026-07-29 18:32:53 -04:00
f4alt eee753c967 update cases after libged/make refac 2026-07-29 16:42:19 -04:00
f4alt 3e0d11e3a4 don't treat GED_HELP as an error 2026-07-29 16:42:19 -04:00
f4alt 5f9b897880 default scale 1.0 so it's visible 2026-07-29 16:23:57 -04:00
f4alt f9f8d8230b use origin for joint's location 2026-07-29 16:23:56 -04:00
f4alt 29cc4cfedf match old make behavior 2026-07-29 16:23:56 -04:00
f4alt 3a31cb3820 update denylist
remove the types that have a valid ft_make. The rest of these are truly
not makeable (ft_make stubs or non-geometry).
2026-07-29 16:23:56 -04:00
f4alt d3511f4650 shrink manual deny checking
- leaving hf + poly checks in for now since they're deprecated mappings
  although they can/should go away for a fully clean decouple.
- intentionally moving the checks 1:1 into the obj_make.c denylist
  eventhough some ARE supported now to keep the history linear. but this
  should be addressed in commit to follow.
2026-07-29 16:23:55 -04:00
f4alt c3c9866baf use bu_opt for option handling
dynamically list the types with rt_obj_make_labels() (and expose a -t
for printing them)
2026-07-29 16:23:55 -04:00
f4alt a67d4051d6 expose a way to list make-able labels 2026-07-29 16:23:55 -04:00
f4alt f01bd88473 cleanup dead vars 2026-07-29 16:23:55 -04:00
f4alt 9149c79f30 brep ft_make already does this 2026-07-29 16:23:55 -04:00
f4alt c18b053856 datum ft_make 2026-07-29 16:23:55 -04:00
f4alt 8b654fd4a4 update metaball ft_make 2026-07-29 16:23:55 -04:00
f4alt 03f4d8a7ee cline ft_make 2026-07-29 16:23:55 -04:00
f4alt fbac93149c superell ft_make 2026-07-29 16:23:55 -04:00
f4alt 63e55d7d1d sketch ft_make 2026-07-29 16:23:55 -04:00
f4alt ed3a6a0fa1 update extrude ft_make 2026-07-29 16:23:54 -04:00
f4alt 4245b99ebc bot ft_make 2026-07-29 16:23:54 -04:00
f4alt f5aa0abea3 pnts ft_make 2026-07-29 16:23:48 -04:00
f4alt a0fd59d284 update pipe ft_make 2026-07-29 16:20:58 -04:00
f4alt dc7f9ecff5 update nmg ft_make 2026-07-29 16:20:57 -04:00
f4alt ecd1635c16 part ft_make 2026-07-29 16:20:57 -04:00
f4alt e541f15ec0 hyp ft_make 2026-07-29 16:20:57 -04:00
f4alt 0267262173 update eto ft_make 2026-07-29 16:20:57 -04:00
f4alt d8fcbfb45b update ehy ft_make 2026-07-29 16:20:57 -04:00
f4alt d1a2ad5c89 update epa ft_make 2026-07-29 16:20:57 -04:00
f4alt 27678cff6c update rhc ft_make 2026-07-29 16:20:57 -04:00
f4alt a048dadfd1 update rpc ft_make 2026-07-29 16:20:56 -04:00
f4alt 65e3b9dbc0 half ft_make 2026-07-29 16:20:52 -04:00
f4alt eb7e3e741c tgc ft_make 2026-07-29 16:20:51 -04:00
f4alt bbe94c26e8 tor ft_make 2026-07-29 16:20:51 -04:00
f4alt e6629d3f52 grip ft_make 2026-07-29 16:20:51 -04:00
f4alt 4c9b220eb9 ell ft_make 2026-07-29 16:20:51 -04:00
f4alt 083e08f2e3 ars ft_make 2026-07-29 16:20:51 -04:00
f4alt 72b58a7aa5 arbn ft_make 2026-07-29 16:20:50 -04:00
f4alt 70518d83e4 first candidate: arb8
libged/make arb8 logic -> librt/arb8.c ft_make
2026-07-29 16:20:50 -04:00
f4alt cebe7916cd flesh out rt_obj_make
add resolvers for 'aliased' types and 'skip' types that align with the
current libged/make usage.
2026-07-29 16:20:50 -04:00
f4alt 919ed0ce52 update ft_make signature
work towards ft_make becoming the canonical "make" - this signature
makes it a candidate to absorb all the functionality that libged/make
currently impelments. ie
- pass in a bounding sphere (pt+scale) for the primitive sizing
- take an optional 'variant' label so we can accommodate our alias types
  (sph->ell, arb4,5,6,7->arb8, etc.)
2026-07-29 16:20:50 -04:00
f4alt 546b3d4da0 add some 'in' tests 2026-07-29 16:20:49 -04:00
f4alt c8567287cb simple 'make' libged tests 2026-07-29 16:20:49 -04:00
Christopher Sean Morrison d37b0adf71 needs malloc.h for BU_PAGE_SIZE 2026-07-29 01:51:24 -04:00
Clifford Yapp b4e71f4d25 Avoid float-equal warnings 2026-07-28 15:41:18 -04:00
f4alt 11c4035edd dead define. run assuming we have a full .g 2026-07-28 10:30:17 -04:00
f4alt 01dc272e67 make runners happy 2026-07-28 10:30:17 -04:00
f4alt 969e618622 big update to primitives.g
Now has an example of all currently raytrace-able brlcad objects
(raytraceable being defined as having prep+shot functions in
rt_functab). Not quite "everything" in the functab (missing description
objects like binunif, materials, etc.).

BIG thanks to Josh for cleaning up the file. All the geometry has been
added to the overview 'grid', given various interesting colors, and
scaled similarly. Plus fixed the recursive region nesting and a few
other nits.

File still isn't perfect though:
- 'heart' with a matrix is completely broken
- some geometry still blather warnings and errors
2026-07-28 10:30:16 -04:00
f4alt be1af260fa update status' with recent fixes 2026-07-28 10:30:15 -04:00
f4alt 03adc7faea we want to gate zero hits; it probably means something is broken 2026-07-28 10:30:15 -04:00
f4alt c0059383e0 fix rt_generic_get putting optional items
found with testing submodel asc<->g with the optional 'file' item. If
the submodel is using an internal component (file="") generic would
put an empty space, which the import will skip over and fail. Optional
items need an explicit empty brace set {}
2026-07-28 10:30:15 -04:00
f4alt 71cbe6ed71 pnts refac + import/export support
this commit conflates two major changes (I know. but at this point it's
too tangled)

1)  implement get/adjust/form for pnts and register in rt_functab so they
    can import and export asc<->g

2)  refactoring of pnts into helper functions that internally handle the
    type switching instead of each rt_pnts_x function handling its own
    switch ladder. This should just be a copy/paste move - no new logic

TODO: we should be able to expose (2) and use them in libged instead of
ged having to roll it's own src/libged/pnts_util
2026-07-28 10:30:15 -04:00
f4alt e3ced7ee06 make rt_nmg_shot() thread safe
There's surely a more efficient and elegant way to do this rather than
just wrapping semaphores but this atleast gets nmg's raytracing again
2026-07-28 10:30:15 -04:00
f4alt 604be9f454 fix annot asc2g
primary fix is rt_annot_get was using "annotation" when the ft_label is "annot"
secondary fix is the get/adjust format string was malformed (using old naming convention?)

While we're in here, fix some AI-caught smells:
- memory leaks
- missing 'S' and 'A' options for "txt"
2026-07-28 10:30:15 -04:00
f4alt f026349f48 implement bare-bones script primitive functions
script is not implemented more than being a documented 'stub' (see
ISSUES). However, we expose it in rt_functab and it's creatable with
'in', so we should atleast be able to view and roundtrip the stub.

- import/export5 was writing the buffer before allocation (so was
  writing garbage). Simplify the unnecessary pointer math to just write
  the string.
- get/adjust/form now actually use the s_type
- use bu_vls_printf instead of sprintf
2026-07-28 10:30:15 -04:00
f4alt b7c55c2562 clarifying comment 2026-07-28 10:30:03 -04:00
f4alt 641a1fea5e fix vol data file sourcing
reading the vol filename assumes it is a full path. In practice it's not
and as such requires the file.bw to be in the current running directory.
Instead, have it try cwd and if it's not there search the directory with
the parent .g (where it more likely is).

Also while we're in here swap to using bu_mapped_files rather than raw
reads.
2026-07-28 10:08:15 -04:00
f4alt ea67c19f9c working on an rt regress tool
tool is expected to consolidate and test what's currently registered in
rt_functab against an exhaustive sample database.

Couple of current known issues:
ID_SCRIPT, ID_ANNOT: don't survive asc roundtrip
ID_NMG: bombs on BU_ASSERT's
ID_VOL: file pathing doesn't successfully source if .bw is alongside .g
but running from another dir
2026-07-28 10:08:15 -04:00
Christopher Sean Morrison 16f6e9f670 give rtsil a way to bypass the .pix assumption from rtuif (restart logic) 2026-07-28 03:28:17 -04:00
Christopher Sean Morrison 74876eb300 add a -o bw option 2026-07-28 03:21:54 -04:00
Christopher Sean Morrison 9bd3924b04 now supporting vrml (.wrl/.vrml) 1.0 in addition to the existing 2.0 support 2026-07-28 03:13:37 -04:00
Christopher Sean Morrison 0a0059ebc7 expand to all combs. mk_lcomb was failing on large combs due to mk_tree_pure() building a left-heavy tree and wdb_put_internal() then recursively making lookup and put calls. now it builds a balanced tree going from O(N) to O(logN) - thus wildly faster. 2026-07-28 03:07:47 -04:00
Christopher Sean Morrison 0f83a10b11 when writing out very large combs, avoid making them O(n) deep. this makes them balanced, which is log-n crazy faster 2026-07-28 02:56:58 -04:00
Christopher Sean Morrison 7f7de3078c add a test for writing out a huge comb without blowing out a stack-depth failure in the serializer 2026-07-28 02:22:00 -04:00
Christopher Sean Morrison fb58e48f6f expand out the boolweave testing with 8 cases that we process against all ops. compares what the weaved result should be against the actual return. 2026-07-28 02:20:41 -04:00
Christopher Sean Morrison 9f2b9fe406 add an rtsil test since it's a little different 2026-07-28 01:29:19 -04:00
Christopher Sean Morrison cd155f0d19 now v1.0 support also 2026-07-28 01:17:30 -04:00
Christopher Sean Morrison 6561b1438b document the new vrml 1.0 support. reads in nearly all geometric entities including meshes, prims, and colors, but not everything of course 2026-07-28 01:13:05 -04:00
Christopher Sean Morrison c7dfe29fa9 fix headers and footers 2026-07-28 00:26:04 -04:00
Christopher Sean Morrison 9d5411aca6 inital vrml 1.0 support 2026-07-28 00:12:31 -04:00
Christopher Sean Morrison 2fb8ec2672 rtsil output opts fixed 2026-07-28 00:05:55 -04:00
joshbaker22 765338099a Update dbfindtree.tcl dbfind -> db find
have it call new db find rather than deprecated dbfind
2026-07-27 11:44:40 -04:00
Clifford Yapp 331797a8b3 Add some notes and TODOs to HACKING 2026-07-24 19:22:10 -04:00
Clifford Yapp 59a50a35ef Add note from Sean about a way to avoid having to do work in the BRL-CAD configure bext could do for us instead. 2026-07-24 19:08:55 -04:00
Christopher Sean Morrison 6daf77d608 Revert "fix the expressions to not gobble up all the other matches"
This reverts commit 3bc6bf6128.
2026-07-24 14:35:57 -04:00
Christopher Sean Morrison 3bc6bf6128 fix the expressions to not gobble up all the other matches 2026-07-24 14:30:33 -04:00
Christopher Sean Morrison 263625ce28 final release throngs, update bext for mac build 2026-07-24 13:54:00 -04:00
Christopher Sean Morrison 50662472fa coincidentally did a first pass redesign of comb with new subcommand structure for rm. did not do -o. 2026-07-24 13:54:00 -04:00
Clifford Yapp be538462a0 Add option to try alternate faster linker (lld/gold)
Usually we want lld, but lld + lto is not happy with gcc - fall back to gold in
that specific case.

This is not well tested and usually not a huge performance win, so we guard it
behind an "off by default, nonpublicized" if guard.
2026-07-24 13:37:13 -04:00
Clifford Yapp f5078b84ec Apply 516a942b adjustments to the scheduled workflow as well 2026-07-24 11:12:36 -04:00
Clifford Yapp 12b410f91d Add validate/repair functabs for librt and libged repair cmd
Up until now we've not been systematic about validation and repair across the
primitives - there have been a couple that demanded the majority of our
attention, so they tended to grow primitive specific logic.  However, there are
reasonable validity and repair interpretations for a number of primitives - in
order to organize those ideas, we add ft_validate and ft_repair functab entires
as well as a libged level repair command to systematically expose the repair
functionality (lint is already a logic place to put validation.)
2026-07-24 10:42:13 -04:00
Clifford Yapp 02eef384e5 Go ahead and report missing man pages
Our coverage is now almost complete, so report what is left. We'll
go ahead and remove the old Tcl/Tk test executables.
2026-07-24 13:35:00 +00:00
Clifford Yapp 269e313603 Enable librt geometry editing in MGED
This is the cut-over of MGED's geometry editing from in-MGED
logic to the refactored logic we have been working on in libged
and librt.  The idea is to graduate CSG editing operations from
MGED-only to being available to any libged/librt using software.

There may still be some corner cases to shake out, since there
are a lot of cases to deal with, but one of the major advantages
of this refactor is we can now add automated primitive editing
testing to our librt and libged suites.  We have already added
a fair number of such tests, and we can expand them as needed.

Conceptually reverts commit 71776518c5, but has many changes
that adapt to more recent changes in MGED and add new features.
2026-07-23 22:02:29 -04:00
Clifford Yapp 8c1bda67d8 Be more aggressive about fixing permissions on bext inputs. 2026-07-23 19:57:44 -04:00
Clifford Yapp d9cc66ad3b Faster CMake logic should be ready.
This work is an attempt to dramatically speed up BRL-CAD's configure
process.  There are many pieces to that puzzle, but among them is
parallel processing of the BRL-CAD bext dependency files - for that we
need the new versions of plief and strclear.

This is a major change to our configure process, so it will likely need
some shakedown, but testing so far has shown configure times dropping
from multiple minutes to around a minute or a little less in standard
build configurations with a pre-existing bext build to stage.
2026-07-23 19:41:30 -04:00
Clifford Yapp a3761ca446 else, not elseif 2026-07-23 21:14:26 +00:00
Clifford Yapp b3450423f6 Fix rebase error in QgConsoleListener.h 2026-07-23 17:02:10 -04:00
Clifford Yapp 516a942bd4 Tweak 2026-07-23 16:51:32 -04:00
Clifford Yapp 1d76d80471 see if we can understand what's going on with MSVC 2026-07-23 16:51:32 -04:00
Clifford Yapp baeb23445a Multiconfig vars 2026-07-23 16:51:32 -04:00
Clifford Yapp ed353c4bd7 don't use std::system 2026-07-23 16:51:32 -04:00
Clifford Yapp b74dc603e3 More MSVC optimizations, add in first cut at validator
When testing with MSVC, it's far faster to us the ninja generator than to write
out full projects for each test.  However, the obvious concern in that case is
whether or not the test is actually representative of what the compile
enviornment set up by the MSVC project would see.

We need two things - env setup so we match the MSVC environment, and a way to
check that we are in fact getting the test results we should be getting. That
means a comparator for different CMake run outputs - the "probe_validation"
portion of this commit.
2026-07-23 16:51:32 -04:00
Clifford Yapp c0fe9c6238 Consolidate and modernize our OpenGL CMake
The X11 OpenGL path on the Mac is currently (07/2026) not reliably working, so
until the situation improves we won't try to build OpenGL there.  Mixing in the
Aqua OpenGL with X11 won't work, and we don't want to end up detecting that and
enabling OpenGL incorrectly.

Also switching to having one top level OpenGL find_package handle everything,
as well as using the modern target definitions in our targets in lieu of
specifiying headers and libraries manually.
2026-07-23 16:51:26 -04:00
Clifford Yapp a8f18ae530 Adjustment for flag testing on MSVC 2026-07-23 16:50:47 -04:00
Clifford Yapp 15d54413f9 Correct fix for loop seems to be to avoid roping in generated sources in the wrong place 2026-07-23 16:50:47 -04:00
Clifford Yapp 2678bbca61 Don't count CMake matches in comment lines 2026-07-23 16:50:47 -04:00
Clifford Yapp 393a13ad29 Reset test directory for re-run 2026-07-23 16:50:47 -04:00
Clifford Yapp ac19d7f596 Improve probe inputs to better match serial behavior 2026-07-23 16:50:47 -04:00
Clifford Yapp 094446872b Exclude moc_QgConsoleListener.cpp from UNITY for Windows, quiet some CMake warnings. 2026-07-23 16:50:46 -04:00
Clifford Yapp a604fedadd Optimize plief/strclear logic for MSVC case 2026-07-23 16:50:46 -04:00
Clifford Yapp fbc12a6bec Adjust layout for unity builds 2026-07-23 16:50:44 -04:00
Clifford Yapp 2eb5a44f83 Improved configure-time batching and bext postprocessing
Reduce configure-time overhead by batching more CMake status output and
third-party dependency processing work.

Key changes include:

- Batch compiler/probe result reporting instead of emitting one message
  sequence per check.
- Summarize missing executable man pages once at the end of configure,
  with the full list available in verbose output.
- Add path-form handling for bundled third-party cleanup so symlinked
  and real bext paths are both scrubbed reliably.
- Use plief change reporting and selective RPATH updates when available,
  preserving useful existing $ORIGIN entries while replacing stale build
  paths.
- Keep strclear as a separate residual stale-path cleanup pass and label
  its output/log entries accordingly.
- Batch strclear processing for binary, data, and text file groups and
  write detailed per-configure and cumulative logs under CMakeFiles.
- Reduce per-file configure chatter for third-party staging and install
  rule setup, replacing it with counts and detailed logs where needed.

On the tested Linux configuration configure time dropped to less than 50
seconds with these changes. The staged bext binary set remains the same,
with unchanged NEEDED and SONAME metadata; RPATH/RUNPATH differences are
limited to the intended preservation of valid $ORIGIN entries and
removal of stale bext install paths.
2026-07-23 16:49:48 -04:00
Clifford Yapp d369740f70 Adjust libged dependency setup for GED_CMD_HDR to try and avoid circular dependencies 2026-07-23 16:49:47 -04:00
Clifford Yapp 74703b25fe Move ged scanner to a build-time configuration 2026-07-23 16:49:47 -04:00
Clifford Yapp 6c008b5923 Make librt scanner a build time operation 2026-07-23 16:49:47 -04:00
Clifford Yapp 517d05163c More incremental CMake performance improvements
- Stopped manually collecting/re-adding dependency include dirs for BRL-CAD targets. Linked targets now carry their
  own usage requirements.

- Batched target_include_directories calls in misc/CMake/BRLCAD_Targets.cmake:266, grouping local, system, and
  external-system dirs.

- Added include-dir classification helper in misc/CMake/BRLCAD_Targets.cmake:240.
- Memoized is_subpath in misc/CMake/TrackFiles.cmake:81, with the fallback copy updated too.
- Made managed-file symlink setup idempotent and limited stale-link scans to once per target directory in misc/CMake/
  BRLCAD_Targets.cmake:1349.
- Net improvement on Linux Ninja CMake: about 3.8s

Relevant profile deltas:

- brlcad_include_dirs: 1844.8ms -> 104.5ms
- brlcad_sort_include_dirs: 889.9ms -> 42.0ms
- is_subpath: 983.9ms -> 75.7ms
- add_subdirectory inclusive: 47.6s -> 43.1s
2026-07-23 16:49:47 -04:00
Clifford Yapp dc2a758f5c Batch compiler flags 2026-07-23 16:49:47 -04:00
Clifford Yapp 128dc2147b parallel probes 2026-07-23 16:49:47 -04:00
Clifford Yapp 10d0b89b5f need writable file for soname 2026-07-23 16:49:47 -04:00
Clifford Yapp 94f5cb475f Make deferred config header output for simple feature-test defines - allows more stable config.h output. 2026-07-23 16:49:47 -04:00
Clifford Yapp 3e3ea5fce9 Get set for some strclear/plief improvements 2026-07-23 16:49:47 -04:00
Clifford Yapp d54adb085b Couple more minor adjustments to CMake logic 2026-07-23 16:49:47 -04:00
Clifford Yapp c35b4f1263 Address hot spots via CMake run time profiling
Changed:

- Replaced per-file cmake -E create_symlink process spawning with native file(CREATE_LINK ... SYMBOLIC) in misc/CMake/
  BRLCAD_Targets.cmake:1328.

- Replaced fallback copy-script string concatenation with a template: misc/CMake/BRLCAD_Copy_Files.cmake.in:1, tracked
  in misc/CMake/CMakeLists.txt:9.

- Converted third-party file classification accumulation from growing parent-scope lists to global properties/counters
  in misc/CMake/BRLCAD_ExternalDeps.cmake:203.

- Fixed directory list registry property naming/get behavior in misc/CMake/BRLCAD_Util.cmake:334.
- Simplified package-call registry append paths in misc/CMake/BRLCAD_Find_Package.cmake:128 and src/libged/
  CMakeLists.txt:199.

Measured with cmake --fresh --profiling-format=google-trace:

- Configure time: 146.9s before, 112.5s after.
- BRLCAD_Targets.cmake self time: 23.224s to 2.746s.
- BRLCAD_ExternalDeps.cmake self time: 71.183s to 60.861s.
- External-deps list self time: 7.191s to 0.015s.
- External-deps set self time: 5.904s to 0.198s.
2026-07-23 16:49:42 -04:00
Clifford Yapp a889d991a7 Bump to next development revision after tagging the 7.44.0 release 2026-07-23 16:40:51 -04:00
Clifford Yapp d144fa0927 Update log with commits being incorporated into rel-7-44-0 2026-07-23 16:35:20 -04:00
Clifford Yapp 64a49088ee Update version number to 7.44.0 2026-07-23 16:25:15 -04:00
Clifford Yapp e74b2fc1dd TODO items addressed 2026-07-23 16:01:41 -04:00
Christopher Sean Morrison fa6028fca6 extensive expansion of jt support, more than 193 distinct changes/improvements 2026-07-23 15:37:54 -04:00
Christopher Sean Morrison 396253afb2 fix a couple prxoimity bugs; switch off osl shading for the time being, using plastic brdf 2026-07-23 15:35:21 -04:00
Clifford Yapp 9463f18d6b A few fixes for more obscure build configs 2026-07-23 18:12:27 +00:00
Clifford Yapp 96ec562a9a Make a stab at fixing MGED Windows I/O setup
Recent changes introduced a problem on Windows.  Based on some work by Chris,
prior state was causing a double close that intermittently corrupted whatever
handle Windows has since recycled into that slot, trashing the stdout stream
when we quit.  See if we can set things up to behave correctly.
2026-07-23 12:32:41 -04:00
Clifford Yapp 542aae6500 Update distclean logic for Windows build
We build with debug enabled, so we produce pdb/exp files in our build tree that
distclean needs to know about if it's actually going to scrub back to a clean
directory.
2026-07-23 12:04:26 -04:00
Clifford Yapp 544e3e2bf5 Odd pathname hardening for Tcl tests 2026-07-23 07:21:36 -04:00
Clifford Yapp 8178117c34 Rename owner var to avoid X11 conflict when not including tk.h 2026-07-22 23:14:56 -04:00
Clifford Yapp 6a9608a95b Use cmake --build rather than raw ninja 2026-07-22 21:59:22 -04:00
Clifford Yapp a79dcd6f8e if we're going to run this on windows we need to match the parent build type 2026-07-22 21:47:43 -04:00
Clifford Yapp 65beec7321 list more files for disclean 2026-07-23 01:30:38 +00:00
Christopher Sean Morrison 2e9926c97c get rid of debugging (alloc mismatch solved); track regions and have a fallback color 2026-07-22 21:16:03 -04:00
Christopher Sean Morrison 3fea47ae60 done with debugging, issue was allocator mismatch 2026-07-22 21:15:16 -04:00
Clifford Yapp bd3373bb70 Make more use of prebuilt bext 2026-07-23 01:08:14 +00:00
Christopher Sean Morrison df2aadf987 a little more clarity on the rm change since there's now three paths 2026-07-22 16:28:51 -04:00
Christopher Sean Morrison 59fd276543 replace remove with comb rm 2026-07-22 16:18:51 -04:00
Christopher Sean Morrison def9f14b9a remove is no more, replaced with rm and comb rm 2026-07-22 16:18:16 -04:00
Christopher Sean Morrison 57cdf57685 update the man page with the new comb command usage. three forms that bring it more in alignment with the other object commands. 2026-07-22 16:17:11 -04:00
Christopher Sean Morrison b12ab3d90b update rm refs to new call pattern 2026-07-22 16:11:50 -04:00
Christopher Sean Morrison 15e26dc113 redundant 2026-07-22 16:11:25 -04:00
Christopher Sean Morrison cf4ee10116 update the rm references. actually good examples of the rm obj/mem and comb obj rm mem1 mem2 forms 2026-07-22 16:05:44 -04:00
Christopher Sean Morrison c79316f946 fix mged kicking open a browser on the docs 2026-07-22 15:57:11 -04:00
Christopher Sean Morrison 2a8532e078 switch to the right var for rm (and leak oed preview) 2026-07-22 15:55:58 -04:00
Christopher Sean Morrison 1e37d74699 update archer's help also for rm 2026-07-22 15:54:38 -04:00
Christopher Sean Morrison 0debfc5150 update the old tcl help 2026-07-22 15:54:07 -04:00
Christopher Sean Morrison 90015ace24 update pattern coverage on rm 2026-07-22 15:51:46 -04:00
Christopher Sean Morrison 7f38eee854 update to the latest calling pattern 'comb obj rm' 2026-07-22 15:51:46 -04:00
Christopher Sean Morrison b45699446c update usage to simplify the three common patterns, and de-emphasize all the command switches. 2026-07-22 15:51:46 -04:00
Clifford Yapp 5c68be60db remove command is no more - yank from MGED's setup.c 2026-07-22 12:58:08 -04:00
Christopher Sean Morrison 39becc26f3 few more rm tests, make sure it works in all three forms 2026-07-22 12:02:20 -04:00
Christopher Sean Morrison 3ece9553ee instead of hard-coded strings, lets switch to a proper command table since it looks like nearly all the options are actually commands 2026-07-22 12:02:20 -04:00
Clifford Yapp 050f49246e Don't extern C something returning a C++ type 2026-07-22 10:25:14 -04:00
Christopher Sean Morrison 83b3405b9f reference comb rm instead of remove as alternative 2026-07-22 09:42:15 -04:00
Christopher Sean Morrison d03868d1da update tests to make sure comb rm works as intended, even if obj is named 'u' 2026-07-22 09:41:31 -04:00
Christopher Sean Morrison a49321891b add subcommands to comb including the backwards-compatible 'rm' for deleting member(s) but also wrap, flatten, and lift 2026-07-22 09:40:59 -04:00
Christopher Sean Morrison e4c46de92b remove the remove command, replacing with comb 2026-07-22 09:36:18 -04:00
Christopher Sean Morrison fe88cc6fc7 taxonomy doc added 2026-07-22 09:35:11 -04:00
Christopher Sean Morrison 1874b7ea68 add a taxonomy doc to the repo that combines elements of the quick card ref, but enough to get to port regardless. 2026-07-22 01:17:16 -04:00
Christopher Sean Morrison 0f7b9dc1e5 mged manual is fixed (commit incoming) 2026-07-22 00:03:00 -04:00
f4alt aa0a9e89e7 document cf5c1237f5 2026-07-21 17:16:55 -04:00
f4alt cf5c1237f5 fix infinite looping in search
corner case where if we create a child of a matched filter, we'll
recursively create the child.
2026-07-21 16:45:58 -04:00
f4alt 735ea54b1f remove mged async commnads running via polling
Instead, use tcl events. This avoids the 10ms polling penalty
introduced.

NOTE: the SIGINT suppression is not strictly defensive. For instance,
the 'inside' (cmd_ged_inside) and '3ptarb' (cmd_ged_more_wrapper)
handlers arm SIGINT->sig3 via setjmp, then call cmd_draw -> edit_com ->
run_ged_async. A SIGINT during the pump would longjmp to the outer
frame (skipping thread.join() and the dtor - bad).
2026-07-21 16:45:58 -04:00
Clifford Yapp a2faeeb923 Call out RT_BOT_PLATE_NOCOS bot creation crash fix 2026-07-21 11:36:34 -04:00
Christopher Sean Morrison 57bbca41a9 fix search -exec multithreaded bug where rt/rtcheck/lint style execs would hang mged due to thread contention on Tcl printing. 2026-07-21 11:33:52 -04:00
Christopher Sean Morrison ae941f0698 consolidate all bext updates to the end since they're lessor-impact, and include from/to versioning. 2026-07-21 11:33:52 -04:00
Clifford Yapp f45bda7e9a search -exec behaviors fixed 2026-07-21 11:27:24 -04:00
Christopher Sean Morrison 2f635f8802 nix the older bugs section 2026-07-21 01:20:44 -04:00
Christopher Sean Morrison 30b2870d44 fixed locally, close enough 2026-07-21 01:20:10 -04:00
Christopher Sean Morrison fab5edd619 bump the deferred 2026-07-21 00:12:24 -04:00
Christopher Sean Morrison ecf04b7959 wrote notes, reviewed bullets 2026-07-21 00:11:49 -04:00
Christopher Sean Morrison ff2d2990f9 not technically bugs and todo already has an entry to improve oed 2026-07-20 23:54:50 -04:00
Christopher Sean Morrison 4f016ea121 after commit review, found ~15 user-visible changes that were missed including submodel, jt, gcv appends, rt auto-obj, metadata, rt pnts, g2asc of more obj, all the proc-db additions+changes, tire tread, fbserv/rtsrv IPC/TLS, bot exterior, and better area/vol/lint validation 2026-07-20 23:48:07 -04:00
Christopher Sean Morrison 633398b040 over 220 new man 2026-07-20 22:52:11 -04:00
Christopher Sean Morrison 410bb7e8ff add some release prose summary highlights for 7.44 2026-07-20 22:31:01 -04:00
Clifford Yapp 2394081300 Update bext SHA1 to latest
Whoops, should have put that in a branch.  bext state should match
the update to latest (working) patch version
2026-07-20 20:14:02 -04:00
Clifford Yapp 00a01dce26 Stand up a libged "db" command
Well, that was more complicated than expected. The Tcl
db "object" was actually filling a lot of the role of
a db command, so a lot of its logic shifted to the libged
source as pass-throughs to other libged commands.
2026-07-20 21:07:34 +00:00
Clifford Yapp 9f72c86436 Merge pull request #247 from Meghna45-code/fix-bot-nocos-only
libwdb, libged: fix mk_bot crash in RT_BOT_PLATE_NOCOS mode
2026-07-20 12:37:48 -04:00
joshbaker22 2de691836a Update search.adoc fix table
add some escape characters to table (pipes were screwing things up)
2026-07-20 11:07:16 -04:00
Clifford Yapp 1e0b74a630 Back out the bext ap214 stepcode changes for now. 2026-07-20 09:45:45 -04:00
Meghna45-code 12edeac6e2 libwdb, libged: fix mk_bot crash in RT_BOT_PLATE_NOCOS mode 2026-07-20 17:32:15 +05:30
Clifford Yapp 34e2546b77 Need to change how we're validating a bext checkout 2026-07-20 07:56:22 -04:00
Clifford Yapp ccda8b67ad Unexpectedly, updating shannonbooth patch (apparently) caused breakage running on the CI - back it up for now. 2026-07-20 00:33:31 -04:00
Clifford Yapp e366225907 fix for stepcode patches 2026-07-20 00:20:57 -04:00
Clifford Yapp 0e76d9b4d9 Bump to latest bext sha1 2026-07-19 21:07:10 -04:00
Clifford Yapp 7ef25d6492 Bump to latest bext SHA1 2026-07-19 20:02:24 -04:00
Clifford Yapp f1a465c45d Make sure we're ready for group process termination
Timeout termination raced with child process-group creation and
returned before reaping the killed child.  We now establish
groups from both parent and child.
2026-07-19 16:56:17 -04:00
Clifford Yapp 1634bc6b80 More Windows robustness work 2026-07-18 21:23:04 -04:00
Clifford Yapp 42b0cc8245 regress-remrt was still hanging sometimes on Windows 2026-07-18 15:38:00 -04:00
Clifford Yapp 29c14c3006 Need to stop subprocesses before resources get taken away. 2026-07-18 13:50:21 -04:00
Clifford Yapp d53f005a89 Add a Windows backend for bu_backtrace 2026-07-17 17:02:14 -04:00
Clifford Yapp fee80b4922 Don't bu_bomb when log fails
Logging failure is a function of enviornment (observed with qged during
shutdown - hooks are unregistered and no stdout/stderr available.)
2026-07-17 16:21:14 -04:00
f4alt 58365e3453 fix helpcomm path sourcing
need to guard the source with an existance check first. Depending on
ordering during the build, [bu_dir data] can/does return empty "" - which
collapses the path to a relative tclscripts/helpcomm.tcl. Instead,
verify the file was found (bu_dir succeeded) before sourcing; if it's
not, this keeps the file sourceable at index time where we're guaranteed
to resolve [bu_dir data]
2026-07-17 14:00:39 -04:00
Clifford Yapp 42322a692a Make asc2g faster for large input reads 2026-07-17 10:29:00 -04:00
Clifford Yapp 795fafb9bb Our teardown process for MGED had some issues (a few of which were libbu/libged level.) Make a stab at cleanup. 2026-07-17 08:39:09 -04:00
Clifford Yapp 8fe203adb0 Put back the other view subcommands 2026-07-17 12:12:14 +00:00
Clifford Yapp 5951e33636 List file for CMake 2026-07-17 07:04:53 -04:00
Clifford Yapp a48e2027eb Fix regression tests
Looks like list is a no-go for MGED, and concat and glob have similar
theoretical problems.
2026-07-17 01:25:24 -04:00
Clifford Yapp 0bebd04d7e Try some MGED memory cleanups
MGED valgrind exits are usually noisy - try a few cleanups.

Part of the noise is due to how Tcl is normally built. Finalization
removes allocator roots without returning the arenas, causing Valgrind
to reclassify memory from “reachable” to “possibly lost.” Tcl documents
that freeing all memory for leak-checking requires TCL_FINALIZE_ON_EXIT;
it is not the normal allocator behavior. Tcl finalization documentation
(https://www.tcl-lang.org/man/tcl9.0/TclLib/Exit.html), Tcl source
discussion (https://core.tcl-lang.org/tcl/wiki?name=%28Initi%2FFin%29alize).
2026-07-16 23:10:14 -04:00
Clifford Yapp e90ef9cd96 Make a note that the mapping[MAX_PSW*MAX_PSW] array is what's triggering valgrind large range warnings when it loads 2026-07-16 23:08:40 -04:00
Clifford Yapp a71ddcd0a8 Correct and optimize search hierarchy evaluation
Tighten up when we can use the optimized -above/-below paths - some
of them were problematic.  Any -exec specifier currently disables
the fast paths because the database could be altered and invalidate
the caches.

Derive -maxdepth pruning only where the boolean plan guarantees a
traversal bound, and fall back when depth constraints or -exec prevent
safe reuse.

Other changes:

Preserve DFS callback ordering and cyclic path results, fix relative
-below depths, nested hierarchy parsing, regex compilation, unique
result collection, -exec cleanup, and several predicate error paths.

Batch libged local roots, preserve plan arguments exactly, propagate
search errors correctly, and expand librt, libged, and MGED regression
coverage.

Document hierarchy depth semantics and plan forms that may require
quadratic evaluation.
2026-07-16 22:34:59 -04:00
Clifford Yapp bc97bf3e21 Use the sub-interp only for -exec searches
Since there is a fixed cost to search Tcl interp setup, see if we can
avoid paying it if we don't really need it.

In principle, for non -exec searches, the async thread running should
suffice for what we need.
2026-07-16 21:05:27 -04:00
Christopher Sean Morrison c4ac4d37d5 commit some temp working notes to pick up where left off 2026-07-16 20:37:16 -04:00
Christopher Sean Morrison fe21ee4e2b add the 53 missing ged commands that 'should' just work through the plain wrapper. also added 21 of the approx 30-40 other commands missing that are essentially aliases (copy -> cp). left the rest that affected the display (zap, clear, etc). 2026-07-16 20:37:15 -04:00
Clifford Yapp fa36187f1c search performance optimizations, sorting optimizations
Looks like 53563dcc39 was incomplete (either not done or I missed saving
some changes at some point, not sure which - either way needs fixing.)

- src/librt/search.cpp:506 now carries match state parent-to-child,
  reducing the common case from O(N·depth) to O(N).
- Mixed -above/-below searches receive the same optimization.
- Depth-constrained and side-effecting -exec/-print expressions retain
  the correct ancestor-walk fallback.

While we're in here, fix a second hot path - we now render every path
once into pre-sized shared storage for final sorting. Comparisons no
longer reconstruct paths or allocate strings, which showed up in
profiling for larger outputs.

Compared to the previous 7.42.2 release, in MGED we are setting up,
syncing and tearing down a separate Tcl interp per command run, as well
as launching search in a separate thread and managing I/O between the
threads.  The overhead is real, but seems to be in the
less-than-a-second range (depending on platform.)  For very large
numbers of search calls in a script that may add up to an observable
runtime slowdown.
2026-07-16 20:27:51 -04:00
Christopher Sean Morrison a50e7d833c staging for more debugging 2026-07-16 17:23:59 -04:00
Clifford Yapp 08e39fbee0 Make sure search's Tcl is shut down win or lose
The Tcl Inteprp used by search is created by the thread that runs it async, so
it must be shut down by that thread.  Leaving it up and a pointer to it in
search_interp resulted in a crash on Windows when a failed command didn't
clean it up and a subsequent initialization tried to clear it out.  Tcl prints
a message about an async delete from the wrong thread and wipes out.
2026-07-16 16:30:25 -04:00
Christopher Sean Morrison bd53790f69 final release actions 2026-07-16 12:21:23 -04:00
Clifford Yapp 26777a1832 More qged work 2026-07-16 00:37:16 -04:00
Clifford Yapp 67d7fa2d39 Make a stab at fixing/improving some QGED behaviors 2026-07-16 00:20:18 -04:00
Clifford Yapp 091ed7f9c0 New bext SHA1 - get latest FreeBSD updates and fixes 2026-07-15 13:06:12 -04:00
Clifford Yapp 07b9fe1573 Add the find_package_zlib for the gcv jt plugin 2026-07-15 12:26:02 -04:00
Clifford Yapp e51b4817a9 Make MGED aliases available without Tk
Provide the alias and unalias Tcl helpers independently of Tkcon and load
them during MGED's base interpreter setup.  Aliases defined in .mgedrc now
work in classic and headless MGED sessions without attempting to initialize
Tk or requiring an available display.

Have Tkcon use the shared implementation so its existing alias behavior is
preserved without duplicating the helper procedures.  This also allows user
aliases to be captured and replayed cleanly in the Tcl interpreter used by
search -exec.

Expand the search -exec regression coverage to exercise the public alias
command, global and namespaced aliases, aliases targeting Tcl procs and GED
commands, fixed and dynamic arguments, and worker-side alias queries.
2026-07-15 14:35:55 +00:00
Clifford Yapp 9377758032 Pull in the latest FindZLIB.cmake from bext
Will need to see if BRL-CAD's usage needs updating, but as a rule we need to
keep our Find modules in sync between bext and brlcad so find_package calls in
each do the same thing.  bext has the more modern one, so we should be using
it.
2026-07-15 10:04:45 -04:00
Clifford Yapp b4d072dd51 For brledit print usage if -h or -? is supplied. 2026-07-15 07:01:07 -04:00
Clifford Yapp f81a81e72c Fix header 2026-07-14 22:52:05 -04:00
Christopher Sean Morrison 6255afe0be sf mailing list is still there, but need to consider if we still want to point folks there. update ver to 7.43 in anticipation of release 2026-07-14 19:43:36 -04:00
Christopher Sean Morrison faa9738e26 cmake bumped to 3.26, update doc refs and sf/gh refs 2026-07-14 19:42:18 -04:00
Christopher Sean Morrison 72fa2adbc1 stop installing solaris and vax 2026-07-14 19:40:51 -04:00
Christopher Sean Morrison df17b7f666 update docbook to asciidoc refs 2026-07-14 19:40:16 -04:00
Christopher Sean Morrison caaecf6ac7 asciidoc now 2026-07-14 19:39:31 -04:00
Christopher Sean Morrison d1d6821ff3 update links sf -> gh 2026-07-14 19:38:48 -04:00
Christopher Sean Morrison 9fdf8ea9aa update cmake req, replace docbook and friends with asciidoc 2026-07-14 19:38:03 -04:00
Christopher Sean Morrison 0b8ff14777 leave a note that these are archived information 2026-07-14 19:36:51 -04:00
Christopher Sean Morrison f8605ad6f5 link in all the new docs 2026-07-14 19:35:43 -04:00
Christopher Sean Morrison 5cd6ffccb3 add the new docs 2026-07-14 19:34:02 -04:00
Christopher Sean Morrison d7a88560bc explain the raytracing pipeline 2026-07-14 19:33:43 -04:00
Christopher Sean Morrison 421eee57fd already wanting to change it but document current status of libged commands as well since they're an easy onboarding path 2026-07-14 19:33:29 -04:00
Christopher Sean Morrison cc4bcad986 basic onboarding as a page 2026-07-14 19:33:13 -04:00
Christopher Sean Morrison 38fe924ba7 an overview of our doxygen api docs 2026-07-14 19:32:59 -04:00
Christopher Sean Morrison 6a98e54114 remove out-of-date sf refs 2026-07-14 19:28:56 -04:00
Christopher Sean Morrison 7cf50d09a4 mostly typo fixes and other mistakes, some tightening of the prose 2026-07-14 19:27:45 -04:00
Christopher Sean Morrison 648becb020 broad updates needed, more detail on compliance, and replace the lengthy docbook explanations with asciidoc.
coincidentally took 70 fewer lines to explain asciidoc (223 -> 148).
2026-07-14 19:25:51 -04:00
Christopher Sean Morrison 3a03d9382a mostly minor ref updates 2026-07-14 19:22:35 -04:00
Christopher Sean Morrison bf814aab72 include build_patern and build_region by reference to not duplicate them and let them stand as their own articles 2026-07-14 19:21:12 -04:00
Christopher Sean Morrison d3b7cf4256 lets not ref all the way back to 7.12 2026-07-14 19:19:05 -04:00
Christopher Sean Morrison 80bbb6a5ee remove all the hotlinking and kiss. it's already a monster page that could be simplified even more, but these are mostly description cleanup 2026-07-14 19:18:09 -04:00
Christopher Sean Morrison 6acd30f7be very likely to change, but go ahead and document how to embed gcv into apps with / without facetization 2026-07-14 19:15:03 -04:00
Christopher Sean Morrison ff1b1cfd03 english description instead of image since we don't have one 2026-07-14 19:14:04 -04:00
Christopher Sean Morrison 8258be5912 update adrt doc renders, mention the spall cone vis mode 2026-07-14 19:12:40 -04:00
Christopher Sean Morrison 819919eb57 no longer docbook, ref the asciidoc ref 2026-07-14 19:08:13 -04:00
Christopher Sean Morrison dd9a9b963d doxygen already feels like ancient history, but update and note the build option to get more 2026-07-14 19:06:50 -04:00
Christopher Sean Morrison 35adac9217 more cross-link ref updates (and removals in cases where not helpful) 2026-07-14 19:05:06 -04:00
Christopher Sean Morrison fb4bd65a24 converse note on g2asc, not deprecated but purpose has shifted 2026-07-14 19:04:11 -04:00
Christopher Sean Morrison 35289f3f5a proper see also links 2026-07-14 19:03:49 -04:00
Christopher Sean Morrison 67cecce6ef note d-a is also deprecated for cv 2026-07-14 19:03:12 -04:00
Christopher Sean Morrison 1a0b51f269 switch to brlcad page ref 2026-07-14 19:02:59 -04:00
Christopher Sean Morrison 196a71f42d general updates and faq-style clarifications 2026-07-14 19:02:18 -04:00
Christopher Sean Morrison 05f9c302ef note asc2g is not deprecated but narrower purpose 2026-07-14 19:01:56 -04:00
Christopher Sean Morrison f9705698bb note a-d is deprecated, use cv 2026-07-14 19:01:38 -04:00
Christopher Sean Morrison 164ad519e1 add man1 pages for other installed binaries including beset, g4-g5, g5-g4, ganalyze, gtransfer, and walk_example 2026-07-14 18:59:53 -04:00
Christopher Sean Morrison ede5a020ec add manual pages for all of BRL-CAD's remaining libs, giving basic overviews of their scope and purpose 2026-07-14 18:55:35 -04:00
Christopher Sean Morrison 9617052442 expand on current doc status 2026-07-14 18:51:50 -04:00
Christopher Sean Morrison 64ef13b556 point to where the library is, include better cross-refs 2026-07-14 18:51:19 -04:00
Christopher Sean Morrison 15e345a084 replace the massive tcl-centric blather with excessive detail with a proper concise overview of libdm 2026-07-14 18:50:23 -04:00
Christopher Sean Morrison 2a63654fe0 wow, libbu manpage was just wrong. now properly updated with contemporary refs and basic overview. 2026-07-14 18:48:32 -04:00
Clifford Yapp 1bf5eb9d6b Add/restore view dir subcommand 2026-07-14 18:36:33 -04:00
Christopher Sean Morrison 820680af4c temporary debugging to try and find a really obscure heap corruption.
corruption appears to be happening inside the appleseed.dll render() call after material slots but before any ray tracing.  in testing, looks like it's not osl material/shaders, not librt resources, not abi mismatch the crt.  probably needs interactive debugging and full symbols through bext deps.
2026-07-14 18:29:48 -04:00
Christopher Sean Morrison 125637a897 progress towards re-enabling spall cone and cut vis modes (-m) and -b/-A shader args 2026-07-14 18:25:20 -04:00
Christopher Sean Morrison a68488fc2a slew of step ap203 changes that need additional direct testing, deferred to 7.46 2026-07-14 18:23:21 -04:00
Christopher Sean Morrison 8c8c7a593b more import features added 2026-07-14 18:21:03 -04:00
Christopher Sean Morrison ed32d79152 instead of exiting, keep going 2026-07-14 18:20:22 -04:00
Christopher Sean Morrison edcd515e2e see if we have any surfaces we can export 2026-07-14 18:19:36 -04:00
Christopher Sean Morrison 308f582e95 read circular arc entities 2026-07-14 18:17:20 -04:00
Christopher Sean Morrison ca37357252 more brep robustness tickling 2026-07-14 18:16:52 -04:00
Christopher Sean Morrison 81c6b33408 much more work needed here, but bring manifold brep in untrimmed for stability 2026-07-14 18:15:49 -04:00
Christopher Sean Morrison 80834c8ea2 if loop fails, drop the rest instead of keeping partial corruption 2026-07-14 18:15:06 -04:00
Christopher Sean Morrison 17d7ee1e86 add a basic jt exporter and some more parsing improvements. todo - separate the writer into its own file. 2026-07-14 18:12:37 -04:00
Clifford Yapp d25579a6ba Robustness fixes for non-GUI MGED I/O
commit 24a4603b39 set classic MGED stdin nonblocking. With a PTY,
stdin/stdout/stderr can share status flags, so large ordinary search
output hit EAGAIN; bu_log treated it as fatal and bombed. This is
unrelated to search -exec or the secondary Tcl interpreter.

Changes:

- Classic cbreak input now stays blocking, reads one guaranteed-ready
  byte, then drains only Tcl-buffered bytes— avoiding both event-loop
  stalls and paste inefficiency. Non-cbreak pipe input remains
  nonblocking. src/mged/mged.c:1763

- bu_log/bu_putchar now use raw standard-stream writes, retrying EINTR,
  EAGAIN, and EWOULDBLOCK under the existing serialization lock. It uses
  write on POSIX and _write on Windows. GUI hooks and threaded
  search -exec handling are unchanged. src/libbu/log.c:65

- Added a nonblocking-output regression test that verifies a 128 KiB log
  message is complete and uncorrupted. src/libbu/tests/test_log.cpp:142
2026-07-14 17:19:46 -04:00
Clifford Yapp 515819a7f5 Try to make MGED bu_log behaviors more robust
- src/libbu/hook.c:71 moved one hook too many, causing
    out-of-bounds memory access. A delayed, platform-dependent
    failure in a later bu_log is consistent with this.
  - The global log hook list was mutated without synchronization.
    It now uses a dedicated semaphore, with a thread-local
    recursion guard in src/libbu/log.c:62.
  - An invalid output_hook replacement removed the functioning
    MGED hook before validation. src/mged/cmd.cpp:1427 now preserves it.
  - Worker output is drained after join(), ensuring no output can
    arrive after the final drain.
  - GUI stream redirection now uses dup2() rather than assuming
    close() followed by dup() reuses descriptors in src/mged/mged.c:3219.
  - Pipe data is passed to Tcl using Tcl_DStringAppendElement, handling
    braces and other Tcl-sensitive output safely.

Added concurrent hook mutation, parallel logging, recursion, hook deletion,
and invalid MGED output-hook tests. The sourced-proc search regression now
exercises the preserved-hook path.
2026-07-14 18:44:22 +00:00
Clifford Yapp f110978fe8 Update to Qt 6.11.1 2026-07-14 13:56:48 -04:00
Clifford Yapp 5d596a2ddf Remove completed TODO item 2026-07-14 15:47:07 +00:00
Clifford Yapp 0308de3f25 Trying to make the search -exec Tcl sync more robust 2026-07-14 14:49:29 +00:00
Clifford Yapp 1e851ac6cc Use older strclear/plief until the main CMake updates drop 2026-07-14 10:43:52 -04:00
joshbaker22 488afd0092 Update search.adoc Add examples to mimic dbfind and dbfindtree
Add 2 examples that specifically mimic behavior or soon to be removed commands dbfind and dbfindtree.
2026-07-14 10:19:23 -04:00
Christopher Sean Morrison 5e4db6b0b2 more jt encoding updates; quite an optimized encoding format 2026-07-14 00:06:37 -04:00
Christopher Sean Morrison 47d80a1ca7 load surfacecurves 2026-07-14 00:05:06 -04:00
Christopher Sean Morrison bd2aa5d8d0 hammering it with more test cases 2026-07-14 00:04:26 -04:00
Christopher Sean Morrison 57b26a2361 address some compression/buffer/tiling issues 2026-07-14 00:03:38 -04:00
Christopher Sean Morrison fb3769e29e lots of fixes including out-of-bounds pixel writes spread out across many files. fixed an info loop in camera. fixed perlin inefficiency. and other bugs.. 2026-07-13 23:19:54 -04:00
Christopher Sean Morrison 80f38db379 more spline surface import work 2026-07-13 23:04:34 -04:00
Christopher Sean Morrison 9fc82423b5 unused headers 2026-07-13 22:52:55 -04:00
Christopher Sean Morrison c3f522680f update the review, fixed product name collisions and unique names 2026-07-13 22:52:13 -04:00
Christopher Sean Morrison ce4a33812e fixed min[] index bug, now axis-aligned 2026-07-13 22:51:18 -04:00
Christopher Sean Morrison 8aa07e15f6 don't clobber when we're over a surfel 2026-07-13 22:49:37 -04:00
Christopher Sean Morrison 32fe2f5ab6 add support for reading spline surfaces 2026-07-13 22:48:14 -04:00
Christopher Sean Morrison 26b6d17616 step names can be shared, so make sure we get unique names for each object 2026-07-13 22:00:45 -04:00
Christopher Sean Morrison 728f443463 need set 2026-07-13 21:59:58 -04:00
Christopher Sean Morrison 8c3b778e80 prefer the inherited color (should be using the other rt path color api) from treewalk 2026-07-13 21:58:47 -04:00
Christopher Sean Morrison 30e6ba2741 import light intensity. this will likely need some adjustment, but should be better than defaults. 2026-07-13 21:56:44 -04:00
Christopher Sean Morrison a261ef78ac import lights (but not all their settings) from .g file, otherwise fall back to what we were doing 2026-07-13 21:35:03 -04:00
Christopher Sean Morrison 735c6ea009 launcher is a dir.. need to fix 2026-07-13 21:33:29 -04:00
Christopher Sean Morrison 3decb3d1e7 use the macro 2026-07-13 21:33:04 -04:00
Christopher Sean Morrison 7ca1b22924 update review 2026-07-13 21:32:39 -04:00
Christopher Sean Morrison f92dab0137 make art respect the -o output option, still using appleseed's writers for png and exr, but icv for anything else. no more output folder. 2026-07-13 20:44:17 -04:00
Christopher Sean Morrison bfba7462a9 consistency cleanup, stray spaces before eol commas, unnecessary casts 2026-07-13 20:40:13 -04:00
Christopher Sean Morrison 4f7986c33c some general code and comment cleanup, no functional changes, some dead code culling. few corrections noticed here and there. 2026-07-13 20:26:33 -04:00
Christopher Sean Morrison 52fcdde223 wot. 2026-07-13 20:20:23 -04:00
Christopher Sean Morrison f11bafc314 document what these files have 2026-07-13 20:19:22 -04:00
Christopher Sean Morrison 9f7ea52e0b if art can't do it, let the user know. it's going through the rtuif but a dozen or so options have no logical meaning to a path tracer. 2026-07-13 20:18:40 -04:00
Christopher Sean Morrison 65b952a413 reorganize, clean up, and include nearly all docs.
confirmed 18 articles, 5 books, 3 dev guides, 16 lessons (vol2), 4 presentations, 2 specs (v5/v6), 268 man1, 7 man3, 10 man5, 401 mann.  replaced toc with main_menu.
2026-07-13 20:17:25 -04:00
Christopher Sean Morrison 0e6419bbf3 also switch to main menu 2026-07-13 20:11:54 -04:00
Christopher Sean Morrison 189423ab43 lots of dead code removal, debuggging print statements yanked, and start to figure out the axisplacement (not done) 2026-07-13 20:11:31 -04:00
Christopher Sean Morrison b300ed24e9 link to the main menu now 2026-07-13 20:08:22 -04:00
Christopher Sean Morrison c2fbf882fc more code quality cleanup, should be no functional changes 2026-07-13 20:08:00 -04:00
Christopher Sean Morrison 9bf50f2c51 lots of 'safe' updates to the code, comments, and mechanical changes that shouldn't change any behavior. 2026-07-13 19:46:48 -04:00
Christopher Sean Morrison f42f479a01 fix the output formatting, needs a newline to separate them 2026-07-13 19:22:05 -04:00
Christopher Sean Morrison 0c69035819 now covers brep import, csg, brep/nurbs export 2026-07-13 18:49:14 -04:00
Christopher Sean Morrison f15fbde580 comment on the partial conversion failure 2026-07-13 18:46:30 -04:00
Christopher Sean Morrison fd5bd4b093 newline before release number 2026-07-13 18:45:37 -04:00
Christopher Sean Morrison e8a401b3b0 consistent whitespace so the generated result is consistently formatted 2026-07-13 18:23:03 -04:00
Clifford Yapp 2ad69070af Various cleanup details related to recent logic changes
Haven't tried distcheck itself yet, but distclean should do better now.
2026-07-13 17:37:38 -04:00
Christopher Sean Morrison 4bd1be3af7 one char nudge for symmetry and so we're not under the logo 2026-07-13 17:37:38 -04:00
Christopher Sean Morrison 2ecdf8ef24 enable existing boolweave test even if it's inadequate 2026-07-13 17:37:38 -04:00
Christopher Sean Morrison df3d33c946 oops, add main change providing mirror support to brep objects 2026-07-13 17:37:37 -04:00
Christopher Sean Morrison 50a8f37be2 improve rendering performance with lights, minimizing malloc/free calls a whole lot more (128 -> 8192). timing issue exposed in new rt heat map outputs. 2026-07-13 17:37:37 -04:00
Christopher Sean Morrison 2194c770bd gist pages now include the file size 2026-07-13 17:37:34 -04:00
Christopher Sean Morrison c927b252eb add a test for icv's file handling 2026-07-13 17:37:22 -04:00
Christopher Sean Morrison 1503c863e7 added ability to mirror brep, minimally tested but looking good. 2026-07-13 17:37:19 -04:00
Christopher Sean Morrison 2279b2375a related to the mirror bug, need to flip some transformed comb leaves 2026-07-13 17:37:09 -04:00
Christopher Sean Morrison 127863e6b5 fixed corruption of rhc entity upgrading. was a 1-char typo causing it to read the wrong field. technically was likely a v4 import failure on any RHC. 2026-07-13 17:37:07 -04:00
Christopher Sean Morrison 7f359886e7 fixed a really old bug in archer if you tried to open a database named the same as a command. issue was an ' ls' call. 2026-07-13 17:36:44 -04:00
Christopher Sean Morrison 7694dfe9f9 more keyword search guts 2026-07-13 17:36:19 -04:00
Christopher Sean Morrison 604b351c98 fix a bug in file tracking (typo) 2026-07-13 17:36:18 -04:00
Christopher Sean Morrison 95a1cf0d15 add search to the man browser gui too. 2026-07-13 17:36:18 -04:00
Christopher Sean Morrison cf9a61d18d if they want keyword searching, route it a little differently 2026-07-13 17:36:18 -04:00
Christopher Sean Morrison 9efe7a5c3a more keyword searching guts and passthrough 2026-07-13 17:36:18 -04:00
Christopher Sean Morrison f899d48bb8 oops, add the new helper proc for searching man pages 2026-07-13 17:36:18 -04:00
Christopher Sean Morrison 4eb0322ee3 add searching of the manual pages to the mged GUI 2026-07-13 17:36:18 -04:00
Christopher Sean Morrison 87d7876f91 fixed an mged ancient bug where pasted text would sometime get captured underneath the yellow cursor box 2026-07-13 17:36:12 -04:00
Christopher Sean Morrison b9586e5873 baseline affirmation, jt mesh successfully imported 2026-07-13 17:35:45 -04:00
Christopher Sean Morrison 7cca26cbc9 add full text keyword searching of manual pages.
added to brlman, man, and apropos, with -k and -K options that saerch synopsis+options+description and entire manpage respectively.
2026-07-13 17:35:36 -04:00
Christopher Sean Morrison daad656da1 add full text keyword searching of manual pages 2026-07-13 17:35:17 -04:00
Christopher Sean Morrison 07ad475943 make sure we can v4 export rhc 2026-07-13 17:35:17 -04:00
Christopher Sean Morrison 298e2caa08 make sure sphere case works 2026-07-13 17:35:17 -04:00
Christopher Sean Morrison 53efcc1a6a add jt file format 2026-07-13 17:35:17 -04:00
Christopher Sean Morrison 4a0f1d5124 KISS. lets not pollute API w/ inconsistently long names just because of some minor detail on the clean one that got their first. just icv_create().
others introduced at some point have the same problem, but they can get cleaned later.  immediate issue is not halting our own builds because of deprecation labels.  removed deprecation labels as unnecessary (MI, icv isn't published/documented) and actively messy.
2026-07-13 17:35:16 -04:00
Christopher Sean Morrison 45b7390d7f fix indent 2026-07-13 17:35:16 -04:00
Christopher Sean Morrison 093cf671ce todo fulfilled, but migrate the common cases to the manpage 2026-07-13 17:35:16 -04:00
Christopher Sean Morrison 85f29c4b9f add a deeper unit test that captures much of the new behavior including the safety exclusions 2026-07-13 17:35:16 -04:00
Christopher Sean Morrison ad9936d6d4 rm has a safeguard 2026-07-13 17:35:16 -04:00
Christopher Sean Morrison 7d5133da54 ged rm is a big deviation from the old behavior to the point of needing multiple protections, but ultimately landing more secure and expected for those familiar with linux/posix/unix/bsd/etc. it now kills but only when not externally referenced (unless forcing). see manpage for details. 2026-07-13 17:35:14 -04:00
Christopher Sean Morrison 764549b127 update rm command with the documented changes.
now rm is effectively kill or killtree but also still sometimes just removing a recipe instance.  to get the prior 'rm comb foo' one must insert the slash: 'rm comb/foo'.  if someone new really does want to kill comb and foo, they'll have to force it rm -f.  if a comb or member are referenced elsewhere in the db, rm aborts (unless it's forced).  only controversial dec was to not allow rm -rf to kill more than the comb specified when referenced externally, but not the underlying children also -- justification is they weren't named, so we're doing the safe action especially considering they could literally be any assembly easily (intentinoally or not).
2026-07-13 17:35:00 -04:00
Christopher Sean Morrison 571529a698 no longer a bug, but still needs more work to go faster. 2026-07-13 17:35:00 -04:00
Christopher Sean Morrison b2c504a142 fixed a bug in gqa where perfectly symmetric objects (like a simple sphere) reported wrong volume.
gqa was terminating iterative volume estimation early because all three ortho views are in perfect agreement no matter the resolution.  Now it checks against the previous volume to determine whether we were also in agreement with the previous iteration.
2026-07-13 17:34:58 -04:00
Christopher Sean Morrison b1237828ab verified an old infinite loop bug was not actually inf, just wildly quadratic time.
this partially improves the situation though still not performant beyond about 200k cloned entities.  the test case originally documented is 1M and still takes several minutes:

make sph sph
  clone -i 1 -t 1000 0 0 -n 100 sph
  kill sph
  g line sph*
  clone -i 1 -t 0 1000 0 -n 100 line
  kill line
  g square line*
  clone -i 1 -t 0 0 1000 -n 100 square
  ... never returns ...

Still, this is a good checkpoint and fixes a secondary issue introduced recently where sph cyl and such are recognized keywords which made the above test case not work.
2026-07-13 17:34:45 -04:00
Christopher Sean Morrison 453d988231 stub in the command, just a placeholder 2026-07-13 17:34:45 -04:00
Christopher Sean Morrison b55ec1acad Revert "stub in the command, just a placeholder"
This reverts commit 6c43a295c7.
2026-07-13 17:34:45 -04:00
Christopher Sean Morrison d7019586b8 stub in the command, just a placeholder 2026-07-13 17:34:45 -04:00
Christopher Sean Morrison 6ef7bf6bc0 implemented support for perspective rendering in rtedge.
refactored into a function since the old code merely shifted the view ray orthogonally as needed for neighboring cells, the ray logic now takes the camera plane into consideration to properly do perspective warping.  opens up a lot of interesting possibilities...
2026-07-13 17:34:42 -04:00
Christopher Sean Morrison 1e085d16b9 switch back to a simple linear interpolation so we minimize accentuating minor fluctuations near zero 2026-07-13 17:34:29 -04:00
Christopher Sean Morrison 26dc3611ee avoid assertion failure later, needs to be associated with this rtip 2026-07-13 17:34:29 -04:00
Christopher Sean Morrison 78705dc935 apply a work-in-progress patch from nearly 3 years ago that fixes submodel path references taking into account absolute and relative paths (now taken as relative to the parent .g instead of current working dir). fixed export, prep, and plot, but more still needed. 2026-07-13 17:34:29 -04:00
Christopher Sean Morrison f56076e7d9 finally parsing topology correctly, we have bots! not yet correct,b ut progress! 2026-07-13 17:34:29 -04:00
Christopher Sean Morrison 72b8f428d0 fix end of elements parsing and jt 10 packet framing. topology reconstruction 2026-07-13 17:34:29 -04:00
Christopher Sean Morrison 16c0f7452f more mesh coordinate types 2026-07-13 17:34:29 -04:00
Christopher Sean Morrison d7089cf1b9 preliminary support for some of the .jt file format using the publicly available spec.
imports triangle strips, meshes (with colors and uvs coords), compressed data, int-encoded, big and little endian -- all to bot format.  doesn't yet do hierarchy, brep, metadata, etc.
2026-07-13 17:34:29 -04:00
Christopher Sean Morrison 415c93e40f basic test of context 2026-07-13 17:34:28 -04:00
Christopher Sean Morrison 4cc61032b1 close the dbip before releasing the context internal 2026-07-13 17:34:28 -04:00
Clifford Yapp 9c943989bc formatting 2026-07-13 17:34:28 -04:00
laithaldaeef 754f05e3ea Fix missing *3 stride in BoT normal array indexing in k-g converter 2026-07-13 17:34:28 -04:00
Christopher Sean Morrison 21f2c5c51d include file size on the sheet, use the International Electrotechnical Commission (IEC) standard to avoid 1000 vs 1024 ambiguity. 2026-07-13 17:34:28 -04:00
Clifford Yapp 2fe7ec11db Satisfy gcc14 Werror=calloc-transposed-args warning
Per the man page the signature is calloc(size_t nmemb, size_t size) where the
number of members comes first and the size of the member comes second.  It
looks like newer GCC is spotting a sizeof() in the first position now, so we'll
go ahead and swap them.  Addresses #243 reported by rezahousseini.
2026-07-13 17:34:28 -04:00
Rupesh 94cfde0bc8 Fix minor bugs and code quality issues in art/appleseed renderer
- brlcadplugin.cpp: Fix incorrect header comment (ARTPLUGIN -> BRLCADPLUGIN)
- brlcadplugin.cpp: Fix char loop variable overflow in get_objects() for
  object counts > 127 (char is signed), changed to int
- art.cpp: Fix float literal (200.0) assigned to size_t variable
  light_intensity, changed to integer literal (200)
- art.cpp: Fix grammar 'a orthographic' -> 'an orthographic' in comment
- art.cpp: Fix missing apostrophe in error messages ('Dont' -> 'Don''t')
  across 5 bu_bomb() calls
2026-07-13 17:34:28 -04:00
Clifford Yapp f80fe7961c Remove old CMake find module, update bext SHA1 2026-07-13 17:34:28 -04:00
Christopher Sean Morrison 230b3135ee update to rt -l8 being cputime 2026-07-13 17:34:28 -04:00
Christopher Sean Morrison d9dce25634 add a preliminary dev doc on how to add a new primitive to BRL-CAD using superellipsoid as the example. 2026-07-13 17:34:28 -04:00
Christopher Sean Morrison 940b6b065c now using cputime for rt l8 2026-07-13 17:34:28 -04:00
Christopher Sean Morrison 07b4ea4b4f updated to cpu time 2026-07-13 17:34:28 -04:00
Christopher Sean Morrison 20f11f45bd update the reference image for l8 after switching to linear 2026-07-13 17:34:27 -04:00
Christopher Sean Morrison d35b3f8d39 update the -l8 gallery render for heat graph 2026-07-13 17:34:27 -04:00
Clifford Yapp ddff1a84c2 Remove bu_bomb/bu_exit behaviors from libicv
The library shouldn't bring down the application - it's up the caller
what to do with error states.

- Added/kept new non-terminating APIs: icv_image_create, icv_crop_rect,
  icv_render_info_destroy, icv_image_take_render_info.

- Kept deprecated wrappers preserving old disruptive behavior:
  icv_create still bombs, icv_rect still exits on invalid
  crop.

- Updated internal users to call the new APIs and handle failures in rt,
  framebuffer ICV paths, crop utilities, animation CLI paths, tests, and
  render metadata ownership.

- Fixed icv_image_create so its documented NULL failure behavior is real
  for invalid size, overflow, and allocation failure. Added private
  ownership tracking so stdlib-allocated image buffers do not corrupt
  libbu allocation/free accounting.
2026-07-13 17:34:27 -04:00
Clifford Yapp 94d1e0a99d Harden libicv processing and image comparisons
Improve image-processing correctness, robustness, and test coverage across
the library. Specific changes include:

- tighten bounds and edge-case handling for cropping, resizing, rotation,
  filtering, pixel operations, color conversion, image metadata, and image
  statistics;
- handle empty, undersized, boundary-aligned, malformed, truncated, and
  unusually sized image data more predictably;
- improve channel-count, allocation, format, and parameter validation across
  image creation, file I/O, and animation operations;
- improve perceptual image-difference support, including fixed-size DCT hashing
  for consistent image signatures;
- replace perceptual-hash-based drawing comparisons with Structural Similarity
  (SSIM), evaluating local luminance, contrast, and structural patterns so
  harmless rendering variation is tolerated while meaningful visual changes
  remain detectable;
- consolidate libicv tests into broader behavioral coverage and add APNG,
  PImgHash, RLE, robustness, and developer-example tests.

These changes reduce unexpected behavior for invalid or degenerate inputs while
providing more representative image comparisons and broader regression
coverage.
2026-07-13 17:34:27 -04:00
Clifford Yapp daf71cafb1 Typo 2026-07-13 17:34:27 -04:00
Clifford Yapp 35cf44d312 Right, these aren't floats - use >= 2026-07-13 17:34:27 -04:00
Clifford Yapp a2aa4b2e96 Stash a gdb usage note from a branch 2026-07-13 17:34:27 -04:00
Clifford Yapp 7fe92ccfd5 Adjust key max length checks for libbu cache 2026-07-13 17:34:27 -04:00
Christopher Sean Morrison a61230dbcf document the new rm behavior in detail since this is a stark change to an old command.
by default, the old pattern 'rm comb obj' will be rejected unless -f is specified, or a dash is added to get the prior behavior 'rm comb/obj'.  for now, taking a safe approach on a forced recursive delete, only applying the forcing on the object specified, but we may want to change that to be recursive.
2026-07-13 17:34:27 -04:00
Christopher Sean Morrison 4085cc1c0c mention the old rm command behavior since it's finally changing 2026-07-13 17:34:27 -04:00
Christopher Sean Morrison 4e460a21bc include an -l8 heat mode example since that can help with debugging geometry 2026-07-13 17:34:27 -04:00
Christopher Sean Morrison 2e6cbbe4f9 mention new -k/-K searching options on man command also 2026-07-13 17:34:27 -04:00
Christopher Sean Morrison 00e12c77c0 adding -k/-K synopsis and full-text keyword searching to apropos as well 2026-07-13 17:34:26 -04:00
Christopher Sean Morrison cf9f934c5c adding -k/-K synopsis and full-text keyword searching to brlman 2026-07-13 17:34:26 -04:00
Christopher Sean Morrison 5a3758eca7 document the newly working -l8 heat graph option 2026-07-13 17:34:26 -04:00
Christopher Sean Morrison 3eb13e2d13 document remainder of rtuif apps via reference to rt's manpage to minimize duplicating some of the method detail, but say the gist that it gonna pick a def obj. 2026-07-13 17:34:26 -04:00
Christopher Sean Morrison 95a1f41ca0 document the new automatic object selection method being used given rtshot doesn't go through rtuif 2026-07-13 17:34:26 -04:00
Christopher Sean Morrison 1cbe74c65b document the default object behavior in reshoot as well 2026-07-13 17:34:26 -04:00
Christopher Sean Morrison 541d779ef4 document the new default object behavior 2026-07-13 17:34:26 -04:00
Christopher Sean Morrison 55afb1ffd1 document rt -l8 heat graphs.
technically started back in 2010 by Stephen Kennedy, but unfinished work.  recently made properly working with dynamic logarithmic range so we can see a proper scaled result.  also fixed output bugs/assumptions now that we're going through icv, and using better timing.
2026-07-13 17:34:23 -04:00
Christopher Sean Morrison 8ae0a0c349 fix rt heatgraphs so they actually work.
was using the global librt timer, which was nfg, now bu_gettime() precision.  was also doing linear scaling which pretty much resulted in a nearly black image most of the time, now logarithmic through the range so we can more easily see the variation.  also fixed a bug where heatgraph was assumedly outputting as pix, now going through icv as a proper second draw pass
2026-07-13 17:34:08 -04:00
Clifford Yapp b71401c8ca bu_bitv_to_hex - round the logical byte count up rather than down
Generic_Twin.g is generated by fast4-g (build/build.ninja:76817). Some
plate-mode BoTs in that model have face_mode bitvectors shorter than 8
bits.
bu_bitv_to_hex() was computing the serialized length with floor
division by 8, so a 1..7 bit vector serialized as the empty string.
When gsh later read that database, bu_hex_to_bitv("") emitted:

  ERROR: bitv length is not a multiple of two.
  Illegal hex bitv: []

fixed by rounding the logical byte count up instead of down:

  - src/libbu/bitv.c:398
  - added a regression test for a 3-bit vector in src/libbu/tests/test_bitv.c:330

Context against rel-7-42-2:

  - The serializer bug itself is old; rel-7-42-2 also used full-byte
    truncation in bu_bitv_to_hex.
  - The behavior changed later in commit cfacbff01e, which changed bu_bitv_new()
    to preserve the exact requested nbits instead of rounding bv->nbits up to the
    storage word size. That was the right semantic change, but it exposed the
    stale assumption in bu_bitv_to_hex().

  - Before that commit, short vectors often looked like 64-bit vectors
    internally, so the bug stayed masked on 64-bit builds.
2026-07-13 17:34:08 -04:00
Christopher Sean Morrison 4839a74bfe new docs on adrt rendering 2026-07-13 17:34:08 -04:00
Christopher Sean Morrison 2b0abf78b2 added a new proc-db that generates seashells/snailshells as demo 2026-07-13 17:34:08 -04:00
Christopher Sean Morrison e7de3cdde3 make gcv appending work. was checking wrong pointer, and need a dirbuild to actually resolve the lookups correctly in wdb_dbopen() 2026-07-13 17:34:08 -04:00
Christopher Sean Morrison 0229c7cdd6 restore and improve checks for appending.
check all the append flags, and make sure there's an existing _GLOBAL, so we only skip _GLOBAL in that case.
2026-07-13 17:34:08 -04:00
Christopher Sean Morrison 628f759990 prevent segfault if no more args 2026-07-13 17:34:08 -04:00
Clifford Yapp 37714fa05d adjust wording 2026-07-13 17:34:08 -04:00
Clifford Yapp e7eaff7872 Add compression optimization for APNG images 2026-07-13 17:34:08 -04:00
Clifford Yapp 1b4587c017 ws 2026-07-13 17:34:07 -04:00
Clifford Yapp 0e2fd8db5e Get us compiling with Clang21 on FreeBSD 2026-07-13 17:34:07 -04:00
Clifford Yapp 8cfa8a5c05 ged_exec main doesn't need extern 2026-07-13 17:34:07 -04:00
Clifford Yapp 013027b6d1 use snprintf for sun_path 2026-07-13 17:34:07 -04:00
Clifford Yapp 82cf7b9445 extern cleanup in liboptical for Clang 21 2026-07-13 17:34:07 -04:00
Clifford Yapp b8e1482d96 Threads::Threads needed on ged draw tests 2026-07-13 17:34:07 -04:00
Clifford Yapp 2dee677832 iges converter build adjustments for Clang 21 2026-07-13 17:34:07 -04:00
Clifford Yapp 0e19d04378 Varous rt extern adjustments for Clang 21 2026-07-13 17:34:07 -04:00
Clifford Yapp ef3d5808e0 Clang 21 build fixes for date.h 2026-07-13 17:34:07 -04:00
Clifford Yapp 08d991b27e Clang 21 build fixes for libfort 2026-07-13 17:34:06 -04:00
Clifford Yapp 47a217a9e4 Use APNG images to hold libged draw ctrl imgs
We have a lot of PNG images serving as control images, but we may need a
lot more in the future as we check more behaviors.  To allow for
expansion without growing the file counts beyond reason, use APNG images
(which can store pixel-accurate images) to pack sets of images into
per-test containers.

This ability may be useful for more than this one use case, so to do it
properly we added support to libicv for generating APNG images.  While
we're at it, also consolidated the simulate command's MJPG writing into
the same framework.  To do the latter without lots of temp images we
needed in-memory JPEG support, so added that for both JPEG and our other
formats.
2026-07-13 17:34:03 -04:00
Christopher Sean Morrison f2a02ac0b7 delay automatic default-object loading when commands are piped to rt since they may include geometry load instructions 2026-07-13 17:33:35 -04:00
Christopher Sean Morrison 2aa6395e0e if reshoot doesn't have an object listed, this avoids crashing. also means we may not shoot our last reshoot shot if it's supposed to be a miss but crashing is the worse real symptom to address. 2026-07-13 17:33:35 -04:00
Christopher Sean Morrison 383ae6fb6b add some initial support for importing x3d nurbs 2026-07-13 17:33:30 -04:00
Christopher Sean Morrison 45c9efd129 add preliminary brep/nurbs import support for x3d files coming in via assetimport. assimp explicitly skips them, so we directly use pugixml on the x3d dom to bring them in as brep. 2026-07-13 17:31:40 -04:00
Christopher Sean Morrison 5218e2ae21 include a nurbs regression test case for x3d import. will require adaptations in gcv. 2026-07-13 17:31:39 -04:00
Christopher Sean Morrison cab2ddd8c4 update changes ref 2026-07-13 17:31:39 -04:00
Christopher Sean Morrison 02336e6afb updated changes refs 2026-07-13 17:31:39 -04:00
Christopher Sean Morrison 81293f6edb reword for simplicity and hopefully clarity on the BRLCAD_API() macro and how it pertains to compatibility testing 2026-07-13 17:31:39 -04:00
Christopher Sean Morrison 2b4d73f42f don't need to ref CHANGES any more 2026-07-13 17:31:38 -04:00
Christopher Sean Morrison e089c9c35a update is in doc/changes now 2026-07-13 17:31:37 -04:00
Christopher Sean Morrison 6e3850f831 update CHANGES ref 2026-07-13 17:31:37 -04:00
Christopher Sean Morrison 0f179b0554 preliminary conversion of api/ui change tracking.
we were using a CHANGES file that encompassed four concepts (policy, minimally-impacting listing, deprecations, and obsoletions) which are now broken into four separate files.  policy remains at the top-level, but the other working files now live in doc/changes along with helper logic that publishes them and automaticlaly turns them into update scripts.
2026-07-13 17:31:36 -04:00
Christopher Sean Morrison 41489fa598 replace CHANGES with CHANGES.adoc + doc/changes 2026-07-13 17:31:35 -04:00
Christopher Sean Morrison ce21204606 initial change policy update that spells out where the deprecations, obsoletions, and minimally-impacting changes get described (now three separate files) 2026-07-13 17:31:34 -04:00
Christopher Sean Morrison 3b11d7b35d deprecations are a standing thing, not a to-do 2026-07-13 17:31:33 -04:00
Christopher Sean Morrison 5af486da3b new location of deprecations and obsoletions incoming 2026-07-13 17:31:33 -04:00
Christopher Sean Morrison fb806092e6 prep for CHANGES asciidoc migration 2026-07-13 17:31:32 -04:00
Clifford Yapp ea913b060f Fix names to avoid collisions with our own definitions
Ah, right, we use those strings to denote full colors not just indices.  Call
out that they are index positions rather than full-fledged bu_color entities.
2026-07-13 17:31:31 -04:00
Clifford Yapp 37609505db List other similar constants in bu/color.h Removal will have to wait, but we can set up the definitions to use now - go ahead and do so. 2026-07-13 17:31:31 -04:00
Clifford Yapp 9f1148a001 List libbu color.h RED/GRN/BLU for eventual renaming
These are so short and generic I'm not sure a proper CHANGES regex could be set
up, so I'm just going to list the rename in the deprecation set.
2026-07-13 17:31:29 -04:00
Clifford Yapp 3d6c1635a6 Various cleanup details related to recent logic changes
Haven't tried distcheck itself yet, but distclean should do better now.
2026-07-13 10:40:48 -04:00
Christopher Sean Morrison 8d9f87202e one char nudge for symmetry and so we're not under the logo 2026-07-13 04:45:51 -04:00
Christopher Sean Morrison 47d6480afa enable existing boolweave test even if it's inadequate 2026-07-13 04:38:57 -04:00
Christopher Sean Morrison e315010cce oops, add main change providing mirror support to brep objects 2026-07-13 04:37:58 -04:00
Christopher Sean Morrison 5f3b8397fc improve rendering performance with lights, minimizing malloc/free calls a whole lot more (128 -> 8192). timing issue exposed in new rt heat map outputs. 2026-07-13 04:36:19 -04:00
Christopher Sean Morrison 1d306bde6b gist pages now include the file size 2026-07-13 04:32:50 -04:00
Christopher Sean Morrison b09e44a847 add a test for icv's file handling 2026-07-13 04:28:53 -04:00
Christopher Sean Morrison 22cfd4833b added ability to mirror brep, minimally tested but looking good. 2026-07-13 04:22:50 -04:00
Christopher Sean Morrison e442c6be47 related to the mirror bug, need to flip some transformed comb leaves 2026-07-13 04:20:09 -04:00
Christopher Sean Morrison ab1e29ec80 fixed corruption of rhc entity upgrading. was a 1-char typo causing it to read the wrong field. technically was likely a v4 import failure on any RHC. 2026-07-13 04:18:22 -04:00
Christopher Sean Morrison 118e45cdda fixed a really old bug in archer if you tried to open a database named the same as a command. issue was an ' ls' call. 2026-07-13 04:14:24 -04:00
Christopher Sean Morrison 329d436946 more keyword search guts 2026-07-13 04:10:48 -04:00
Christopher Sean Morrison 4c5e4f8eb6 fix a bug in file tracking (typo) 2026-07-13 04:10:17 -04:00
Christopher Sean Morrison 70c3824d85 add search to the man browser gui too. 2026-07-13 04:07:36 -04:00
Christopher Sean Morrison 469337f06d if they want keyword searching, route it a little differently 2026-07-13 04:04:57 -04:00
Christopher Sean Morrison b4b907949c more keyword searching guts and passthrough 2026-07-13 04:03:55 -04:00
Christopher Sean Morrison ebf81d3744 oops, add the new helper proc for searching man pages 2026-07-13 04:03:11 -04:00
Christopher Sean Morrison f15efb0228 add searching of the manual pages to the mged GUI 2026-07-13 04:02:08 -04:00
Christopher Sean Morrison 3d07ce6e97 fixed an mged ancient bug where pasted text would sometime get captured underneath the yellow cursor box 2026-07-13 04:01:06 -04:00
Christopher Sean Morrison 29f862276c baseline affirmation, jt mesh successfully imported 2026-07-13 03:50:17 -04:00
Christopher Sean Morrison f739f74d48 add full text keyword searching of manual pages.
added to brlman, man, and apropos, with -k and -K options that saerch synopsis+options+description and entire manpage respectively.
2026-07-13 03:47:03 -04:00
Christopher Sean Morrison 93d3ed01e2 add full text keyword searching of manual pages 2026-07-13 03:41:36 -04:00
Christopher Sean Morrison 2f454bf4c7 make sure we can v4 export rhc 2026-07-13 03:39:26 -04:00
Christopher Sean Morrison 982e9abe5d make sure sphere case works 2026-07-13 03:38:20 -04:00
Christopher Sean Morrison 1392565954 add jt file format 2026-07-13 03:36:53 -04:00
Christopher Sean Morrison 6a1f0ab73d KISS. lets not pollute API w/ inconsistently long names just because of some minor detail on the clean one that got their first. just icv_create().
others introduced at some point have the same problem, but they can get cleaned later.  immediate issue is not halting our own builds because of deprecation labels.  removed deprecation labels as unnecessary (MI, icv isn't published/documented) and actively messy.
2026-07-13 03:36:23 -04:00
Christopher Sean Morrison c63ef36885 fix indent 2026-07-13 03:26:50 -04:00
Christopher Sean Morrison aedf574e55 todo fulfilled, but migrate the common cases to the manpage 2026-07-13 03:07:50 -04:00
Christopher Sean Morrison 71c6e324e0 add a deeper unit test that captures much of the new behavior including the safety exclusions 2026-07-13 03:06:02 -04:00
Christopher Sean Morrison e1749fa9e7 rm has a safeguard 2026-07-13 03:04:40 -04:00
Christopher Sean Morrison bd84801d5e ged rm is a big deviation from the old behavior to the point of needing multiple protections, but ultimately landing more secure and expected for those familiar with linux/posix/unix/bsd/etc. it now kills but only when not externally referenced (unless forcing). see manpage for details. 2026-07-13 03:00:30 -04:00
Christopher Sean Morrison 3cd7cf7c7d update rm command with the documented changes.
now rm is effectively kill or killtree but also still sometimes just removing a recipe instance.  to get the prior 'rm comb foo' one must insert the slash: 'rm comb/foo'.  if someone new really does want to kill comb and foo, they'll have to force it rm -f.  if a comb or member are referenced elsewhere in the db, rm aborts (unless it's forced).  only controversial dec was to not allow rm -rf to kill more than the comb specified when referenced externally, but not the underlying children also -- justification is they weren't named, so we're doing the safe action especially considering they could literally be any assembly easily (intentinoally or not).
2026-07-13 02:52:24 -04:00
Christopher Sean Morrison 9ce51a97f9 no longer a bug, but still needs more work to go faster. 2026-07-13 02:40:31 -04:00
Christopher Sean Morrison ab6523e871 fixed a bug in gqa where perfectly symmetric objects (like a simple sphere) reported wrong volume.
gqa was terminating iterative volume estimation early because all three ortho views are in perfect agreement no matter the resolution.  Now it checks against the previous volume to determine whether we were also in agreement with the previous iteration.
2026-07-13 02:37:02 -04:00
Christopher Sean Morrison 20c86177d1 verified an old infinite loop bug was not actually inf, just wildly quadratic time.
this partially improves the situation though still not performant beyond about 200k cloned entities.  the test case originally documented is 1M and still takes several minutes:

make sph sph
  clone -i 1 -t 1000 0 0 -n 100 sph
  kill sph
  g line sph*
  clone -i 1 -t 0 1000 0 -n 100 line
  kill line
  g square line*
  clone -i 1 -t 0 0 1000 -n 100 square
  ... never returns ...

Still, this is a good checkpoint and fixes a secondary issue introduced recently where sph cyl and such are recognized keywords which made the above test case not work.
2026-07-13 02:29:27 -04:00
Christopher Sean Morrison 9eb195d751 stub in the command, just a placeholder 2026-07-13 02:17:15 -04:00
Christopher Sean Morrison 38d622a2ab Revert "stub in the command, just a placeholder"
This reverts commit 6c43a295c7.
2026-07-13 02:11:48 -04:00
Christopher Sean Morrison 6c43a295c7 stub in the command, just a placeholder 2026-07-13 02:10:24 -04:00
Christopher Sean Morrison 9912455bab implemented support for perspective rendering in rtedge.
refactored into a function since the old code merely shifted the view ray orthogonally as needed for neighboring cells, the ray logic now takes the camera plane into consideration to properly do perspective warping.  opens up a lot of interesting possibilities...
2026-07-13 02:06:49 -04:00
Christopher Sean Morrison 83130df65e switch back to a simple linear interpolation so we minimize accentuating minor fluctuations near zero 2026-07-13 01:55:13 -04:00
Christopher Sean Morrison 15bedc60ee avoid assertion failure later, needs to be associated with this rtip 2026-07-13 01:16:54 -04:00
Christopher Sean Morrison a1597470cc apply a work-in-progress patch from nearly 3 years ago that fixes submodel path references taking into account absolute and relative paths (now taken as relative to the parent .g instead of current working dir). fixed export, prep, and plot, but more still needed. 2026-07-13 00:54:51 -04:00
Christopher Sean Morrison 5a64a8f90f finally parsing topology correctly, we have bots! not yet correct,b ut progress! 2026-07-13 00:43:09 -04:00
Christopher Sean Morrison 243fd91c91 fix end of elements parsing and jt 10 packet framing. topology reconstruction 2026-07-12 22:29:21 -04:00
Christopher Sean Morrison d3bc8ae8c0 more mesh coordinate types 2026-07-12 21:29:52 -04:00
Christopher Sean Morrison 701a336c51 preliminary support for some of the .jt file format using the publicly available spec.
imports triangle strips, meshes (with colors and uvs coords), compressed data, int-encoded, big and little endian -- all to bot format.  doesn't yet do hierarchy, brep, metadata, etc.
2026-07-12 19:48:30 -04:00
Christopher Sean Morrison 232631ed43 basic test of context 2026-07-12 19:48:30 -04:00
Christopher Sean Morrison 96dff58ba3 close the dbip before releasing the context internal 2026-07-12 19:48:30 -04:00
Clifford Yapp 101b4dee4f formatting 2026-07-12 13:48:01 -04:00
Clifford Yapp 69a7c32f83 Merge pull request #231 from laithaldaeef/main
Fix missing *3 stride in BoT normal array indexing in k-g converter
2026-07-12 13:46:10 -04:00
Christopher Sean Morrison d46d178a18 include file size on the sheet, use the International Electrotechnical Commission (IEC) standard to avoid 1000 vs 1024 ambiguity. 2026-07-11 18:51:38 -04:00
Clifford Yapp c363f3206e Satisfy gcc14 Werror=calloc-transposed-args warning
Per the man page the signature is calloc(size_t nmemb, size_t size) where the
number of members comes first and the size of the member comes second.  It
looks like newer GCC is spotting a sizeof() in the first position now, so we'll
go ahead and swap them.  Addresses #243 reported by rezahousseini.
2026-07-10 10:22:36 -04:00
Clifford Yapp 53f4f2f702 Merge pull request #225 from rupeshca007/fix/art-code-quality-improvements
Fix minor bugs and code quality issues in art/appleseed renderer
2026-07-10 10:10:10 -04:00
Clifford Yapp 2174d72627 Remove old CMake find module, update bext SHA1 2026-07-10 09:35:36 -04:00
Christopher Sean Morrison 58ad660f08 update to rt -l8 being cputime 2026-07-10 02:12:02 -04:00
Christopher Sean Morrison 47b3f0360e add a preliminary dev doc on how to add a new primitive to BRL-CAD using superellipsoid as the example. 2026-07-10 02:12:02 -04:00
Christopher Sean Morrison a66d687606 now using cputime for rt l8 2026-07-10 02:12:02 -04:00
Christopher Sean Morrison df11ddf5de updated to cpu time 2026-07-10 02:12:02 -04:00
Christopher Sean Morrison 9fbee2925a update the reference image for l8 after switching to linear 2026-07-10 02:12:02 -04:00
Christopher Sean Morrison 3d80f1eb59 update the -l8 gallery render for heat graph 2026-07-10 02:12:02 -04:00
Clifford Yapp 2ce1935564 Remove bu_bomb/bu_exit behaviors from libicv
The library shouldn't bring down the application - it's up the caller
what to do with error states.

- Added/kept new non-terminating APIs: icv_image_create, icv_crop_rect,
  icv_render_info_destroy, icv_image_take_render_info.

- Kept deprecated wrappers preserving old disruptive behavior:
  icv_create still bombs, icv_rect still exits on invalid
  crop.

- Updated internal users to call the new APIs and handle failures in rt,
  framebuffer ICV paths, crop utilities, animation CLI paths, tests, and
  render metadata ownership.

- Fixed icv_image_create so its documented NULL failure behavior is real
  for invalid size, overflow, and allocation failure. Added private
  ownership tracking so stdlib-allocated image buffers do not corrupt
  libbu allocation/free accounting.
2026-07-09 23:15:54 -04:00
Clifford Yapp 17d9a82b28 Harden libicv processing and image comparisons
Improve image-processing correctness, robustness, and test coverage across
the library. Specific changes include:

- tighten bounds and edge-case handling for cropping, resizing, rotation,
  filtering, pixel operations, color conversion, image metadata, and image
  statistics;
- handle empty, undersized, boundary-aligned, malformed, truncated, and
  unusually sized image data more predictably;
- improve channel-count, allocation, format, and parameter validation across
  image creation, file I/O, and animation operations;
- improve perceptual image-difference support, including fixed-size DCT hashing
  for consistent image signatures;
- replace perceptual-hash-based drawing comparisons with Structural Similarity
  (SSIM), evaluating local luminance, contrast, and structural patterns so
  harmless rendering variation is tolerated while meaningful visual changes
  remain detectable;
- consolidate libicv tests into broader behavioral coverage and add APNG,
  PImgHash, RLE, robustness, and developer-example tests.

These changes reduce unexpected behavior for invalid or degenerate inputs while
providing more representative image comparisons and broader regression
coverage.
2026-07-09 23:15:54 -04:00
Clifford Yapp 0e032dd95e Typo 2026-07-09 20:21:12 -04:00
Clifford Yapp 6def8bbd41 Right, these aren't floats - use >= 2026-07-09 18:50:37 -04:00
Clifford Yapp ebab661fa1 Stash a gdb usage note from a branch 2026-07-09 14:39:28 -04:00
Clifford Yapp a58a7c4932 Adjust key max length checks for libbu cache 2026-07-09 13:38:11 -04:00
Christopher Sean Morrison f4b3c6b4af document the new rm behavior in detail since this is a stark change to an old command.
by default, the old pattern 'rm comb obj' will be rejected unless -f is specified, or a dash is added to get the prior behavior 'rm comb/obj'.  for now, taking a safe approach on a forced recursive delete, only applying the forcing on the object specified, but we may want to change that to be recursive.
2026-07-08 14:00:42 -04:00
Christopher Sean Morrison bedb86220a mention the old rm command behavior since it's finally changing 2026-07-08 13:48:58 -04:00
Christopher Sean Morrison 90cf06138b include an -l8 heat mode example since that can help with debugging geometry 2026-07-08 13:43:50 -04:00
Christopher Sean Morrison 651aff7f24 mention new -k/-K searching options on man command also 2026-07-08 13:42:28 -04:00
Christopher Sean Morrison 694418116e adding -k/-K synopsis and full-text keyword searching to apropos as well 2026-07-08 13:41:19 -04:00
Christopher Sean Morrison dc871a9b7d adding -k/-K synopsis and full-text keyword searching to brlman 2026-07-08 13:40:42 -04:00
Christopher Sean Morrison b48dd68bed document the newly working -l8 heat graph option 2026-07-08 13:38:54 -04:00
Christopher Sean Morrison 9107a5c25f document remainder of rtuif apps via reference to rt's manpage to minimize duplicating some of the method detail, but say the gist that it gonna pick a def obj. 2026-07-08 13:37:09 -04:00
Christopher Sean Morrison a394e0ffad document the new automatic object selection method being used given rtshot doesn't go through rtuif 2026-07-08 13:35:22 -04:00
Christopher Sean Morrison f7e08af31f document the default object behavior in reshoot as well 2026-07-08 13:28:49 -04:00
Christopher Sean Morrison 488313fa6f document the new default object behavior 2026-07-08 13:26:06 -04:00
Christopher Sean Morrison 67d3016fc8 document rt -l8 heat graphs.
technically started back in 2010 by Stephen Kennedy, but unfinished work.  recently made properly working with dynamic logarithmic range so we can see a proper scaled result.  also fixed output bugs/assumptions now that we're going through icv, and using better timing.
2026-07-08 12:55:47 -04:00
Christopher Sean Morrison 53c4638d9c fix rt heatgraphs so they actually work.
was using the global librt timer, which was nfg, now bu_gettime() precision.  was also doing linear scaling which pretty much resulted in a nearly black image most of the time, now logarithmic through the range so we can more easily see the variation.  also fixed a bug where heatgraph was assumedly outputting as pix, now going through icv as a proper second draw pass
2026-07-08 12:49:04 -04:00
Clifford Yapp 4f82c74f93 bu_bitv_to_hex - round the logical byte count up rather than down
Generic_Twin.g is generated by fast4-g (build/build.ninja:76817). Some
plate-mode BoTs in that model have face_mode bitvectors shorter than 8
bits.
bu_bitv_to_hex() was computing the serialized length with floor
division by 8, so a 1..7 bit vector serialized as the empty string.
When gsh later read that database, bu_hex_to_bitv("") emitted:

  ERROR: bitv length is not a multiple of two.
  Illegal hex bitv: []

fixed by rounding the logical byte count up instead of down:

  - src/libbu/bitv.c:398
  - added a regression test for a 3-bit vector in src/libbu/tests/test_bitv.c:330

Context against rel-7-42-2:

  - The serializer bug itself is old; rel-7-42-2 also used full-byte
    truncation in bu_bitv_to_hex.
  - The behavior changed later in commit cfacbff01e, which changed bu_bitv_new()
    to preserve the exact requested nbits instead of rounding bv->nbits up to the
    storage word size. That was the right semantic change, but it exposed the
    stale assumption in bu_bitv_to_hex().

  - Before that commit, short vectors often looked like 64-bit vectors
    internally, so the bug stayed masked on 64-bit builds.
2026-07-08 16:02:00 +00:00
Christopher Sean Morrison a176d48244 new docs on adrt rendering 2026-07-08 09:59:21 -04:00
Christopher Sean Morrison cb86b280e4 add a new article that overviews and compares adrt with rt 2026-07-08 09:58:46 -04:00
Christopher Sean Morrison d1926cf8e2 added a new proc-db that generates seashells/snailshells as demo 2026-07-08 09:58:12 -04:00
Christopher Sean Morrison 2f2387ff68 add seashell to our proc-db gallery 2026-07-08 09:57:06 -04:00
Christopher Sean Morrison 06f65ebd60 add another interesting new procedural database for making snail/sea shells.
creates them as bots, which is a first for proc-db also, and nice variety addition.
2026-07-08 09:56:57 -04:00
Christopher Sean Morrison 7a99a7e8f6 make gcv appending work. was checking wrong pointer, and need a dirbuild to actually resolve the lookups correctly in wdb_dbopen() 2026-07-08 08:23:14 -04:00
Christopher Sean Morrison 667da3eb21 restore and improve checks for appending.
check all the append flags, and make sure there's an existing _GLOBAL, so we only skip _GLOBAL in that case.
2026-07-08 08:21:37 -04:00
Christopher Sean Morrison bff57eb4c9 prevent segfault if no more args 2026-07-07 22:04:03 -04:00
Clifford Yapp 8347b29f65 adjust wording 2026-07-06 09:05:59 -04:00
Clifford Yapp 3e108eee97 Add compression optimization for APNG images 2026-07-06 02:11:40 +00:00
Clifford Yapp 5d7ce4a21a ws 2026-07-06 02:07:43 +00:00
Clifford Yapp 6dcc7b2b72 Get us compiling with Clang21 on FreeBSD 2026-07-05 21:17:36 +00:00
Clifford Yapp 10c845d42b ged_exec main doesn't need extern 2026-07-05 21:16:48 +00:00
Clifford Yapp 9495a9e72f use snprintf for sun_path 2026-07-05 21:15:53 +00:00
Clifford Yapp ec730e46c8 extern cleanup in liboptical for Clang 21 2026-07-05 21:15:01 +00:00
Clifford Yapp 31710846e2 Threads::Threads needed on ged draw tests 2026-07-05 21:13:48 +00:00
Clifford Yapp 8614c10c82 iges converter build adjustments for Clang 21 2026-07-05 21:12:55 +00:00
Clifford Yapp 97c7d6efdd Varous rt extern adjustments for Clang 21 2026-07-05 21:12:13 +00:00
Clifford Yapp b0597fd8ba Clang 21 build fixes for date.h 2026-07-05 21:07:17 +00:00
Clifford Yapp 4b8054a5ee Clang 21 build fixes for libfort 2026-07-05 21:03:46 +00:00
Clifford Yapp f96784b8b3 Use APNG images to hold libged draw ctrl imgs
We have a lot of PNG images serving as control images, but we may need a
lot more in the future as we check more behaviors.  To allow for
expansion without growing the file counts beyond reason, use APNG images
(which can store pixel-accurate images) to pack sets of images into
per-test containers.

This ability may be useful for more than this one use case, so to do it
properly we added support to libicv for generating APNG images.  While
we're at it, also consolidated the simulate command's MJPG writing into
the same framework.  To do the latter without lots of temp images we
needed in-memory JPEG support, so added that for both JPEG and our other
formats.
2026-07-02 23:59:37 -04:00
Christopher Sean Morrison 2adbc49f9b delay automatic default-object loading when commands are piped to rt since they may include geometry load instructions 2026-07-02 23:32:51 -04:00
Christopher Sean Morrison 958aed46d2 if reshoot doesn't have an object listed, this avoids crashing. also means we may not shoot our last reshoot shot if it's supposed to be a miss but crashing is the worse real symptom to address. 2026-07-02 23:17:23 -04:00
Christopher Sean Morrison e58f47366f add some initial support for importing x3d nurbs 2026-07-02 23:05:37 -04:00
Christopher Sean Morrison 23b6a19fdf add preliminary brep/nurbs import support for x3d files coming in via assetimport. assimp explicitly skips them, so we directly use pugixml on the x3d dom to bring them in as brep. 2026-07-02 23:03:23 -04:00
Christopher Sean Morrison adee625c07 include a nurbs regression test case for x3d import. will require adaptations in gcv. 2026-07-02 22:44:19 -04:00
Christopher Sean Morrison 5c0e772621 update changes ref 2026-07-02 22:41:59 -04:00
Christopher Sean Morrison 8aa45ee666 updated changes refs 2026-07-02 22:40:20 -04:00
Christopher Sean Morrison 165e619a40 reword for simplicity and hopefully clarity on the BRLCAD_API() macro and how it pertains to compatibility testing 2026-07-02 17:35:57 -04:00
Christopher Sean Morrison 649370d334 don't need to ref CHANGES any more 2026-07-02 17:28:48 -04:00
Christopher Sean Morrison 6a4daa1153 update is in doc/changes now 2026-07-02 17:27:07 -04:00
Christopher Sean Morrison 85a360da09 update CHANGES ref 2026-07-02 17:26:10 -04:00
Christopher Sean Morrison d29ac5a796 preliminary conversion of api/ui change tracking.
we were using a CHANGES file that encompassed four concepts (policy, minimally-impacting listing, deprecations, and obsoletions) which are now broken into four separate files.  policy remains at the top-level, but the other working files now live in doc/changes along with helper logic that publishes them and automaticlaly turns them into update scripts.
2026-07-02 17:23:40 -04:00
Christopher Sean Morrison 253954556d replace CHANGES with CHANGES.adoc + doc/changes 2026-07-02 17:19:35 -04:00
Christopher Sean Morrison 3af05d5263 initial change policy update that spells out where the deprecations, obsoletions, and minimally-impacting changes get described (now three separate files) 2026-07-02 17:18:09 -04:00
Christopher Sean Morrison 44d8d4f476 deprecations are a standing thing, not a to-do 2026-07-02 17:15:09 -04:00
Christopher Sean Morrison 7aa9fea919 new location of deprecations and obsoletions incoming 2026-07-02 17:13:55 -04:00
Christopher Sean Morrison cd818b21a1 prep for CHANGES asciidoc migration 2026-07-02 17:11:52 -04:00
Clifford Yapp fe01fb86a7 Fix names to avoid collisions with our own definitions
Ah, right, we use those strings to denote full colors not just indices.  Call
out that they are index positions rather than full-fledged bu_color entities.
2026-07-02 16:39:02 -04:00
Clifford Yapp 9db0656ab5 List other similar constants in bu/color.h Removal will have to wait, but we can set up the definitions to use now - go ahead and do so. 2026-07-02 16:29:22 -04:00
Clifford Yapp 961621735c List libbu color.h RED/GRN/BLU for eventual renaming
These are so short and generic I'm not sure a proper CHANGES regex could be set
up, so I'm just going to list the rename in the deprecation set.
2026-07-02 16:23:57 -04:00
Christopher Sean Morrison b14faadd27 recognize scad files 2026-07-02 13:57:19 -04:00
Christopher Sean Morrison 2b7094d26b refactor previous/recent input/atoi refactorings to go through new bu_opt api.
this eliminates the egregious duplication of helper functions (at least mostly) but still needs to be reviewed in detail to ensure values are getting mapped to the right validation range.  there are also some parse*() funcs that still need to be purged, possibly need more libbu work too.
2026-07-02 13:56:50 -04:00
Christopher Sean Morrison 7f011d8b61 note launcher needs dm and icv 2026-07-02 13:53:25 -04:00
Christopher Sean Morrison f3cbb2a424 implement support for very basic event management. libfb already had the hooks and events being processed, but this lets them get registered and responded to by a caller. currently only implemented for X and wgl, wip testing. 2026-07-02 13:52:48 -04:00
Christopher Sean Morrison d5c51f6906 add some unit tests for the new color api 2026-07-02 13:50:51 -04:00
Christopher Sean Morrison 72a4de1687 for refactoring all the utils that need bounded range checks, handful of option parse helpers 2026-07-02 13:50:30 -04:00
Christopher Sean Morrison 4fa4e424a1 elaborate on new color API so we can improve UX allowing more flexible color specs. wip. 2026-07-02 13:49:49 -04:00
Christopher Sean Morrison dcc372615e elaborate on new color API so we can improve UX allowing more flexible color specs. leave a note about hdr. 2026-07-02 13:49:17 -04:00
Christopher Sean Morrison f94a7867d3 add option parser helpers for common input modalities with range checking 2026-07-02 13:48:36 -04:00
Christopher Sean Morrison c9e3728dc4 add in very rudimentary event support 2026-07-02 13:47:47 -04:00
Christopher Sean Morrison c1eecd5971 make sure the new iges brep conversions work 2026-07-02 13:45:28 -04:00
Christopher Sean Morrison f643af6262 add a scad importer regression test 2026-07-02 13:45:09 -04:00
Christopher Sean Morrison f440e286f7 render a nice environment background by default to differentiate it a bit 2026-07-02 13:44:20 -04:00
Christopher Sean Morrison 1d7b66e040 fix bug with initial material attributes, set to something sane 2026-07-02 13:43:44 -04:00
Christopher Sean Morrison 1ab863cb5a new standalone front-end to adrt that is mostly compatible with rt 2026-07-02 13:42:01 -04:00
Christopher Sean Morrison 77789d3c8d include launcher, but not yet enabling compilation 2026-07-02 13:40:57 -04:00
Christopher Sean Morrison 432df2b7bd experimental test using libfb as a launcher GUI. basically works, but needs a lot of work. 2026-07-02 13:39:41 -04:00
Christopher Sean Morrison b96c7c1030 unreviewed expansion of ap203 import support, including faceted breps 2026-07-02 13:38:14 -04:00
Christopher Sean Morrison 72b25c6f05 preliminary unreviewed updates to IGES conv greatly expanding nurbs in/out support 2026-07-02 13:36:36 -04:00
Christopher Sean Morrison 98ce81ffb4 add preliminary support for the OpenSCAD .scad file format 2026-07-02 13:34:27 -04:00
Christopher Sean Morrison 11960dc6fc new docs on adrt rendering 2026-07-02 13:31:19 -04:00
Christopher Sean Morrison 0a038319bd add a new article that overviews and compares adrt with rt 2026-07-02 13:30:34 -04:00
Christopher Sean Morrison a70c8fef42 added a new proc-db that generates seashells/snailshells as demo 2026-07-02 01:38:15 -04:00
Christopher Sean Morrison 736e8681a2 add seashell to our proc-db gallery 2026-07-02 01:36:44 -04:00
Christopher Sean Morrison 39fdda06a7 add another interesting new procedural database for making snail/sea shells.
creates them as bots, which is a first for proc-db also, and nice variety addition.
2026-07-02 01:36:44 -04:00
Clifford Yapp edc5820129 Update checkout version in Distcheck distcheck.yml template 2026-07-02 00:06:43 -04:00
Christopher Sean Morrison edfa99510d update all the remaining rt* docs similarly with cleaned up synopsis and descriptions, all options listed, and good examples 2026-07-01 20:25:13 -04:00
Christopher Sean Morrison 7519ca0f46 improve the image type table, clean up docs, conciseness, and easier to nav. 2026-07-01 20:25:13 -04:00
Christopher Sean Morrison a5ed359341 less technical irrelevance-to-user info like protocol, and stick to the UI. 2026-07-01 20:25:13 -04:00
Christopher Sean Morrison 4ef7bfaec4 big description expansion and examples added 2026-07-01 20:25:11 -04:00
Christopher Sean Morrison 464431727d tighten up the docs for rtedge with more consistent opt descriptions 2026-07-01 20:25:11 -04:00
Christopher Sean Morrison a70536414b big doc expansion with description and examples 2026-07-01 20:25:11 -04:00
Christopher Sean Morrison 7d217bb7ed elaborae rtcheck docs, especially description 2026-07-01 20:25:11 -04:00
Christopher Sean Morrison ff4688a92e big cleanup of rtarea doc now with new diagrams 2026-07-01 20:25:11 -04:00
Christopher Sean Morrison 052e2ae6b9 cleaned up rt doc text and restored the token/tls example 2026-07-01 20:25:10 -04:00
Christopher Sean Morrison 76c24f5ef9 fill out more detail on the old fastegen file format 2026-07-01 20:25:10 -04:00
Christopher Sean Morrison ecb9bf6100 elaborate on how reshoot works 2026-07-01 20:25:10 -04:00
Christopher Sean Morrison 9d25b1c6e7 elaborate on how rtshot works 2026-07-01 20:25:10 -04:00
Christopher Sean Morrison 491479b32d massive reduction for readability as it had way too much example output included (which is all subject to change) 2026-07-01 20:25:10 -04:00
Christopher Sean Morrison b206344b4a include some examples 2026-07-01 20:25:10 -04:00
Christopher Sean Morrison a419b64711 general doc cleanup, synopsis consistency, descriptions, options, and examples. unverified but preliminarily reviewed. 2026-07-01 20:25:10 -04:00
Christopher Sean Morrison cabee2ad53 looks like the waypoints are needed regardless 2026-07-01 20:25:10 -04:00
Christopher Sean Morrison b61fb17aab reduction and cleanup for readability 2026-07-01 20:25:10 -04:00
Christopher Sean Morrison aba72b417f elaborate all the options, and include examples 2026-07-01 20:25:09 -04:00
Christopher Sean Morrison b5604b85e5 make the example focus on cli opt usage instead of interactive since latter is discoverable 2026-07-01 20:25:09 -04:00
Christopher Sean Morrison 73e298600b note the help opts, elaborate on what it does 2026-07-01 20:25:09 -04:00
Christopher Sean Morrison 00f78f7012 update all the d* tools with cleaned up docs, better examples 2026-07-01 20:25:09 -04:00
Christopher Sean Morrison 6afe886e0f didn't even realize this command existed, updated docs 2026-07-01 20:25:09 -04:00
Christopher Sean Morrison 6064ca09a3 update png docs with better functional examples and all opts described 2026-07-01 20:25:09 -04:00
Christopher Sean Morrison ce8aaf44f3 update terrain doc with better examples 2026-07-01 20:25:09 -04:00
Christopher Sean Morrison baf6ace8ed tighten up tire text, note opt modality added for tread 2026-07-01 20:25:09 -04:00
Christopher Sean Morrison 3277e83c2f cleanup all the g* tools with cleaned up descriptions, short and long opts, and more 2026-07-01 20:25:09 -04:00
Christopher Sean Morrison b84e2fed53 show some auto tool examples 2026-07-01 20:25:09 -04:00
Christopher Sean Morrison ec3b8265ec clean up all the importers with consistent options and better examples, albeit unverified 2026-07-01 20:25:09 -04:00
Christopher Sean Morrison 58abc5a4ef cleanup all the stats docs, include examples 2026-07-01 20:25:03 -04:00
Christopher Sean Morrison 7e754f1a08 general cleanup of gif cmds 2026-07-01 20:25:03 -04:00
Christopher Sean Morrison 697aa73e17 expand docs on all options 2026-07-01 20:25:02 -04:00
Christopher Sean Morrison 4faf51aac4 expand synopsis with actual options, add better examples 2026-07-01 20:25:02 -04:00
Christopher Sean Morrison 59c6a12db4 unverified cleanup, but significant 2026-07-01 20:25:02 -04:00
Christopher Sean Morrison e060dc4321 one of the first I worked, updated with improved description, includes nice descriptions 2026-07-01 20:25:02 -04:00
Christopher Sean Morrison 2b5d0c41e7 super similar to window_frame, but they appear to work together. gen updates. 2026-07-01 20:25:02 -04:00
Christopher Sean Morrison f748afb191 focus on options since interactive mode is discoverable and more likely to change 2026-07-01 20:25:02 -04:00
Christopher Sean Morrison 5e47939fe4 improve description 2026-07-01 20:25:02 -04:00
Christopher Sean Morrison 35e383b698 general consistency updates to opts and synopsis across all the bw tools 2026-07-01 20:25:01 -04:00
Christopher Sean Morrison 1ef7de45e1 elaborate the docs all around, improved writeup.
not fully vetted, but looking much better on the whole.  WIP.
2026-07-01 20:25:01 -04:00
Christopher Sean Morrison 866f78133e consistent synopsis and description text, more examples 2026-07-01 20:25:01 -04:00
Christopher Sean Morrison db879c958f cleanup on all the pix pages.
elaborate on all the options, clean up the text, lots of better examples, but will need to validate them later more carefully.
2026-07-01 20:25:01 -04:00
Christopher Sean Morrison 6bf6e5ffc7 elaborate all the plot3 tools with better desc and loads of examples 2026-07-01 20:25:00 -04:00
Christopher Sean Morrison 41a4c1cf7f elaborate the opts and desc on the procedural generators. focus on cli since interactive mode outputs may change 2026-07-01 20:25:00 -04:00
Christopher Sean Morrison a0d2414f79 elaborate the opts and desc on the procedural generators. focus on cli since interactive mode outputs may change 2026-07-01 20:25:00 -04:00
Christopher Sean Morrison 4bc016eb91 clean up the example and explanations 2026-07-01 20:25:00 -04:00
Christopher Sean Morrison 4b1e1c022f minor cleanup 2026-07-01 20:25:00 -04:00
Christopher Sean Morrison 4cbb3b8fea unverified, but more involved example 2026-07-01 20:25:00 -04:00
Christopher Sean Morrison 8903962e7b improved description and synopsis 2026-07-01 20:25:00 -04:00
Christopher Sean Morrison 15bfdfaa3f fixed usage, not just .g files 2026-07-01 20:25:00 -04:00
Christopher Sean Morrison 0ddab42399 better description, but what a weird format 2026-07-01 20:25:00 -04:00
Christopher Sean Morrison 7b80d1398b better description and explanations 2026-07-01 20:25:00 -04:00
Christopher Sean Morrison 4e9d7872f5 clean up 3dm-g page, include -v option, better example 2026-07-01 20:24:59 -04:00
Christopher Sean Morrison 0725f33475 add 52 new manual pages for commands that are installed.
pages were generated from their sources, and reviewd both systematically and manually but not with a fine comb.  each has synopsis, description, options, and one or more examples.

Added commands include:  a-d adrt_master adrt_slave ap203e2-g ap214-g ap242-g art brledit bw-a bw-d c-d d-a d-bw d-f d-i d-u d2-c dm_ogl_probe double-asc f-d f-i g-ap203e2 g-ap214 g-ap242 g-jack g-off g-vdb gchecker gex gltf-g gsh i-a i-d i-f ifc-g imgdiff jack-g off-g pix-spm plot3-dm qisst raw-g rtsurf shp-g spm-fb tgf-g tree ttcp u-a u-bw u-d u-f
2026-07-01 20:24:59 -04:00
Clifford Yapp e5027501f2 Bump to checkout v6 for github actions 2026-07-01 19:57:30 -04:00
Clifford Yapp 65ed3ba43e Capture tclindex build output to log file 2026-07-01 08:35:31 -04:00
Clifford Yapp 49c8017fcd Set up to be more strict, but don't turn it on yet 2026-06-30 14:13:36 -04:00
Clifford Yapp 6c59756ea4 Check for 'didn't work but returned success' cases 2026-06-30 10:03:23 -04:00
Clifford Yapp 40e6a0d93d strncmp -> bu_strncmp 2026-06-30 07:40:39 -04:00
Christopher Sean Morrison a8815160e9 add the earth world model by cliff yapp contributed long ago, migrated from sf tracker 2026-06-30 03:59:06 -04:00
Christopher Sean Morrison 98dd8b05a8 rename to earth.png to match 2026-06-30 03:25:48 -04:00
Christopher Sean Morrison cc36a0324b rename to earth.png to match 2026-06-30 03:25:39 -04:00
Christopher Sean Morrison 8c9012b88a add the earth world model by cliff yapp contributed long ago, migrated from sf tracker 2026-06-30 03:20:46 -04:00
Christopher Sean Morrison 9a2bd24b4f migrated bicyclce wheel and photo frame from sf.net geometry tracker 2026-06-30 02:33:41 -04:00
Christopher Sean Morrison fffb384d8d csayni contributed a nice picture frame model back in 2010, now included. 2026-06-30 02:32:27 -04:00
Christopher Sean Morrison 77db7b8da7 add a bicycle wheel demo model made and contributed long ago by lee butler (migrated from sf geometry tracker) 2026-06-30 02:17:35 -04:00
Christopher Sean Morrison 12f01d680f add a photo holder demo model made and contributed long ago by csanyi_pal (migrated from sf geometry tracker) 2026-06-30 02:15:13 -04:00
Christopher Sean Morrison aa250cf0de update reshoot/rtshot/rtsurf to indicate object param is now technically optional also 2026-06-30 02:12:49 -04:00
Christopher Sean Morrison 97e63c14e0 def_tree now takes an obj, which can/may be NULL and results in automatic behavior 2026-06-30 02:08:40 -04:00
Christopher Sean Morrison 39b3b421a6 update sig to match 2026-06-30 02:06:11 -04:00
Christopher Sean Morrison 176c56fb2d set the stage for making specification of objects optional, using the new db_default_object() api 2026-06-30 02:05:58 -04:00
Christopher Sean Morrison 79d9de26df undo coupling to specific output printing 2026-06-30 01:28:05 -04:00
Christopher Sean Morrison f0b3a0526e fixed bug - set mode on the input stream, not just stdin, and messaging when just one file arg specified. 2026-06-30 01:28:05 -04:00
Christopher Sean Morrison 0f106f5796 more atoi() to str conversion with input validation 2026-06-30 01:28:05 -04:00
Christopher Sean Morrison f0e5d02e13 replace atoi hack for identifying a numeric host with an actual numeric host check 2026-06-30 01:28:05 -04:00
Christopher Sean Morrison d61ab7bb82 about to make this leap 2026-06-30 01:28:05 -04:00
Christopher Sean Morrison eaaed552c6 tighten up the wording 2026-06-30 01:28:05 -04:00
Christopher Sean Morrison d571dde9a1 more atoi conversion with input-bounded checks. pixborder no longer ignores trailing and terrain no longer fails onto defaults. 2026-06-30 01:28:05 -04:00
Clifford Yapp 112e0aa3ac -Werror=format-truncation= error 2026-06-28 14:52:36 -04:00
f4alt 82533ae662 fix mged voxelize creating duplicate solids
when voxelizing a comb with overlaps, each overlap is added n times to
the output region (as a duplicate solid) due to libanalyze/voxels.c
calling once per-region instead of per-voxel.

NOTE: it would be much more performant to collapse the linked list
rather than do a db_lookup but we intentionally do the guard at the
libged layer since other consumers of libanalyze/voxels.c rely on the
per-region behavior (specifically g-voxel). de-duping the return there
would be much more invasive and break expected behavior.
2026-06-23 15:38:47 -04:00
f4alt ad1291cc49 restore crash-on-exit fix
looks like e4d2604fa7 squashed
6f3c978d0f to reintroduce the crash.
Don't restore Tcl_Finalize() from the original commit since we're
manually handling that now with mged_request_shutdown +
shutting_down + quiesce_tcl ?

I'm not convinced the state management is quite right since in theory we
shouldn't be getting invalid handles in the final exit (or maybe we
don't need a final exit?) - but this atleast resolves the crash.
2026-06-23 13:56:51 -04:00
f4alt d19144d3ac fix hrt matrix application
need to use the right macro (MAT3x4PNT -> MAT3x4VEC) and apply the
translation to the top half
2026-06-22 16:07:28 -04:00
f4alt 313dbf2af1 use the right macro - these are vecs not points 2026-06-22 15:11:37 -04:00
f4alt ffc39678be fix non-ascii characters
somehow non-ascii "0-" got into the descriptions and were doing weird
things
2026-06-22 11:35:52 -04:00
Clifford Yapp 0b49d7a864 Make a note of Manifold's new Contains API 2026-06-21 08:17:42 -04:00
Clifford Yapp f4fca22899 Add a note about meshoptimizer 2026-06-21 07:35:51 -04:00
Clifford Yapp 1b5dd70f31 Wchar-subscripts warning in clang on OSX 2026-06-19 16:59:24 -04:00
Clifford Yapp 51b68c5498 Add a couple missing bu includes 2026-06-19 00:15:56 -04:00
Clifford Yapp 832c8ea6cb Fix problem with removing missing key from bu_hash
Fixed src/libbu/hash.c so removing a missing key from a populated bucket
advances through the chain and is a no-op instead of looping on the same
entry. It also now decrements the entry count after successful removal.
Added coverage in src/libbu/tests/test_hash.cpp:133 using a missing key
that hashes into the same bucket as an existing key.
2026-06-18 23:57:57 -04:00
Clifford Yapp cc6fc01b35 Consolidate vectfont/tig logic into plot3.h
We consolidate the old (and little used) logic from vectfont.h and
tig.h, which are plot routines, into plot3.h.  Functions are renamed
into plot3.h style, and plot3.h is substituted in for vectfont.h or
tig.h.  CHANGES is updated with the include and rename search/replace
expressions.
2026-06-18 23:39:30 -04:00
Clifford Yapp 0c5f423273 Windows build warnings 2026-06-18 09:54:36 -04:00
Clifford Yapp f79c2f559d Taking a stab at a portable Tk osmesa based dm backend
The idea here is to use the osmesa software rasterization of OpenGL
rendering and Tk's native TkPhoto widget to provide a portable, feature
rich alternative to the X dm that works reliably.  So far only tried on
Linux, but going ahead with the commit so it doesn't fall out of sync
with main.

Theoretically this could work with Aqua Tk, but we're not wired up to
test that and it will likely need some adjustments to handle that
environment.
2026-06-17 20:45:06 -04:00
Clifford Yapp b140f2bbfa Restore the remrt/rtsrv changes, this time assigning the ht_path to the right temp variable for processing. 2026-06-17 15:45:32 -04:00
Clifford Yapp ef51ff6287 Revert "get remrt and rtsrv building as C++"
This appears to break the regress-remrt test, at least when building in the
regular C mode.

This reverts commit f424a19bd0.
2026-06-17 15:34:17 -04:00
Clifford Yapp 452476d199 Fix ordering 2026-06-17 14:30:34 -04:00
Clifford Yapp 8d85701b7f These strings can be treated as const 2026-06-17 14:29:36 -04:00
Clifford Yapp 9503e305b3 Remove the NO_CXX flag from libnmg and MGED
We're not usually building C++ only, and if we leave these it will incorrectly
look like full success when we do a full C++ build.
2026-06-17 14:16:11 -04:00
Clifford Yapp bb40c260c2 More C++ compile fixes
This gets us pretty close except for libnmg and MGED.  libnmg has some thorny
elements to it - it exposes char * pointers in the API where static strings are
used - and MGED has a lot of pending simplification with the switch to librt
editing so I don't want to complicate that merge right now.
2026-06-17 14:13:26 -04:00
Clifford Yapp f424a19bd0 get remrt and rtsrv building as C++ 2026-06-17 13:32:14 -04:00
Clifford Yapp 42d3bffb55 Get tclcad building as C++ 2026-06-17 13:15:12 -04:00
Clifford Yapp 4860ca7369 Updates to librt et. al. to compile as both C and C++
This gets us as far as rt building as C++
2026-06-17 12:36:48 -04:00
Christopher Sean Morrison 2eebafd876 when a title text just slighly overflows, dynamically adjust the size down, but only a few notches to see if we can get it to fit -- at least fit for cases where it only partilal overflows. right now using about a 10% overflow metric. 2026-06-17 02:19:07 -04:00
Christopher Sean Morrison 5c137a4f83 more atoi to str conversion for proper bounds checking. these are a bit more complex but the basic pattern is holding. 2026-06-17 01:53:36 -04:00
Christopher Sean Morrison 1d90ab39cc link in the two new galleries somewhere so they're at least discoverable 2026-06-17 01:43:20 -04:00
Clifford Yapp 672488ed06 remove externs - causing issues on OSX 2026-06-16 23:38:50 -04:00
Clifford Yapp be408ace9f Revert "See if we can handle the title extern via ext.h"
This reverts commit b2e97836bc.
2026-06-16 23:36:02 -04:00
Clifford Yapp b2e97836bc See if we can handle the title extern via ext.h 2026-06-16 21:22:12 -04:00
Clifford Yapp 99f05d9ad0 Simplify - malloc doesn't seem to be using these, appear to be just labeling strings 2026-06-16 19:51:39 -04:00
Clifford Yapp 846b794d89 List file for CMake 2026-06-16 19:45:36 -04:00
Clifford Yapp 2b6e91f72e List EXTERNVARINT in CHANGES 2026-06-16 16:53:45 -04:00
Clifford Yapp dd52929609 vtk plugin was matching any xml file, resulting in our regress failures - tighten check 2026-06-16 16:19:58 -04:00
Clifford Yapp f16afe512f Work around some gcc linking issues with <filesystem> on Redhat 2026-06-16 16:00:14 -04:00
Clifford Yapp 331c848a51 More C++ building changes 2026-06-16 14:35:53 -04:00
Clifford Yapp f4556d1743 Just use extern rather than defining EXTERNVARINIT - extern is legal in C too 2026-06-16 13:56:19 -04:00
Clifford Yapp c32af58f94 C++ only build fixes to get us as far as libbg 2026-06-16 12:57:13 -04:00
Clifford Yapp fd36b6b61f Adjust C/C++ CMake language setup 2026-06-16 12:20:40 -04:00
Clifford Yapp d528862905 more C++ compile fixes 2026-06-16 10:03:00 -04:00
Clifford Yapp ab2532f5ae get iges-g and step-g building in C++ 2026-06-16 10:03:00 -04:00
Clifford Yapp b4aaaf738c Various tool C++ fixes 2026-06-16 10:02:57 -04:00
Clifford Yapp a9bcd64254 More libged test, libicv test and bwish C++ build adjustments 2026-06-16 10:01:53 -04:00
Clifford Yapp 7284adc4bb C++ fixes for librt tests and benchmark 2026-06-16 10:01:53 -04:00
Clifford Yapp c0c1c23441 List libnmg pr functions using char * in CHANGES for VLS switch
C++ building shows we're playing fast and loose with char * vs const char *
in libnmg - let's get set up so we can be cleaner about this and leverage
bu_vls.

Made a couple of minor C++ adjustments, but more work will be needed for libnmg
to build properly in the mode.

Also set up the brlcad_addexec and brlcad_addlib functions so we can disable
C++ for one library even when we're otherwise enabling C++ for everything -
basically a per-level version of the turn-off-C++-for-this-file feature
2026-06-16 10:01:53 -04:00
Clifford Yapp 88a88deb2d Another C only uuid file 2026-06-16 10:01:53 -04:00
Clifford Yapp 79d23fcd21 libpkg C++ compile tweak. libpkg is supposed to be independent, so we're explicit here rather than using __BEGIN_DECL 2026-06-16 10:01:53 -04:00
Clifford Yapp 146e5f3423 Use const string in libdm struct 2026-06-16 10:01:53 -04:00
Clifford Yapp 7a81200a55 C++ build fixes for libbg 2026-06-16 10:01:53 -04:00
Clifford Yapp fedd8c366d Don't want to decl isnan or isinf if we're building C++ 2026-06-16 10:01:53 -04:00
Christopher Sean Morrison f4067a6590 add a render style gallery to the docs, showcasing (nearly) all the major renderers or render settings that result in a different image. need to add a few more. 2026-06-15 12:57:23 -04:00
Christopher Sean Morrison 9c474bbefc almost there, more atoi to str conversion with range checking 2026-06-15 12:18:01 -04:00
Christopher Sean Morrison 40ef6b2fcf add new API to auto-identify default geometry, or auto-report tops.
new db_default_object() API identifies what single object can serve as a default iff it's not a disabled feature on this database, or iif there's only one top-level, or iff there's only one comb, or iff only one comb matches db name, or iff only one object has a name matching an all*/scene* convention.
2026-06-15 12:14:55 -04:00
Christopher Sean Morrison 15d970ffc8 use stderr for output like everything else 2026-06-15 11:14:21 -04:00
Christopher Sean Morrison c6f1fe137c more atoi replacement with safer str method and range checking. 2026-06-15 02:40:25 -04:00
Christopher Sean Morrison 98d3bdc80f more atoi elimination in favor of more robust str input and range checking 2026-06-15 02:22:36 -04:00
Christopher Sean Morrison 9561919a97 fixed subcombs that have a matrix in the hierarchy view.
if the top-level object's subobjects have matrices over them, they were not displaying in the hierarchy preview correctly.  this is because they were being tracked by name, not by path, as we passed to rtwizard.  now tracks that path but still displays just the obj on the page.  this was a user-reported issue.
2026-06-15 02:07:36 -04:00
Christopher Sean Morrison 3236184942 more atoi cleanup with better validation and range checking 2026-06-15 01:37:30 -04:00
Christopher Sean Morrison 7c3de88818 match the manpage per exporting to file or redirect, and make sure we cleanly handle all the entry points (manual and automated) 2026-06-15 00:38:33 -04:00
Christopher Sean Morrison 63154b19ae match the manpage per exporting to file or redirect, and make sure we cleanly handle all the entry points (manual and automated) 2026-06-15 00:38:23 -04:00
Christopher Sean Morrison a8348bff6e significant cleanup, rewrite of prose, lots of examples 2026-06-15 00:32:33 -04:00
Christopher Sean Morrison 571bc3da0a correct manual section, improve the writing also, and options where we had something handy 2026-06-15 00:31:58 -04:00
Christopher Sean Morrison 1185f94980 reorder opts for clarity, clean up writing as well 2026-06-15 00:30:25 -04:00
Christopher Sean Morrison db7f6403d7 same with icv, wrong section, and a substantial rewrite of the options 2026-06-15 00:28:40 -04:00
Christopher Sean Morrison 3a0305eb37 Wrong manzmanual section, but elaborated on the options also 2026-06-15 00:27:37 -04:00
Christopher Sean Morrison 5bd872c2b8 ditto spell out all the options 2026-06-15 00:26:12 -04:00
Christopher Sean Morrison 63f20224bd spell out all the dang options, not just punt with 'options ...' 2026-06-15 00:25:07 -04:00
Christopher Sean Morrison 807239ef4d cleanup the output 2026-06-15 00:24:34 -04:00
Christopher Sean Morrison 77eac601bb drop the commentary, rewrite for focus on options and examples 2026-06-15 00:23:15 -04:00
Christopher Sean Morrison 6544d3a188 big doc rewrite, spell out all the options 2026-06-15 00:22:00 -04:00
Christopher Sean Morrison 712b010c5a pretty big rewrite, call out the historic bits less 2026-06-15 00:21:02 -04:00
Christopher Sean Morrison bec3c7cbb2 clean up all the converters' descriptions, options, amd examples 2026-06-15 00:18:24 -04:00
Christopher Sean Morrison 2b69291d89 big cleanup of the description and options, without all the distraction. 2026-06-15 00:15:36 -04:00
Christopher Sean Morrison 8b210af2e8 add help 2026-06-15 00:14:47 -04:00
Christopher Sean Morrison ac5a1672cb cleanup opts 2026-06-15 00:14:31 -04:00
Christopher Sean Morrison cd82ecfc9f spell out dbupgrade's options, instead of relying on word of mouth discovery. 2026-06-15 00:13:25 -04:00
Christopher Sean Morrison 78febaee4c elaborate the description, options, and example with sync'd information 2026-06-15 00:11:19 -04:00
Christopher Sean Morrison 47cfa7b332 wrong section 2026-06-15 00:03:13 -04:00
Christopher Sean Morrison a502f5e172 clarify it'll write to file as well as redirect 2026-06-15 00:02:49 -04:00
Christopher Sean Morrison 5d97690779 note pixrect can go to file or redirect 2026-06-15 00:01:01 -04:00
Christopher Sean Morrison b9698fadbd lots of general cleanup and examples added 2026-06-14 23:59:02 -04:00
Christopher Sean Morrison 1b3e948a4a funny, still says v4 is 'current'. updated with an example. 2026-06-14 23:43:58 -04:00
Christopher Sean Morrison 2f02d6b9af document comgeom importer better, more clearly 2026-06-14 23:42:14 -04:00
Christopher Sean Morrison bbd9c275b7 wildly expand input options documentation and loads of examples. 2026-06-14 23:39:20 -04:00
Christopher Sean Morrison 85af6141f2 document options and usage+examples more clearly 2026-06-14 23:35:36 -04:00
Christopher Sean Morrison 0328f7c42f document the options 2026-06-14 23:31:49 -04:00
Christopher Sean Morrison 608357f367 note these commands can also go to file or pipe. expand opts in detail, and examples. 2026-06-14 23:30:48 -04:00
Christopher Sean Morrison 9f1949e0a8 massive doc cleanup to make it more clear what all the opts do.
separate the commentary into concrete detailed examples.
2026-06-14 23:26:05 -04:00
Christopher Sean Morrison 0be2dbf3c7 simple cleanup, add an example 2026-06-14 23:25:07 -04:00
Christopher Sean Morrison c233050cca note output can be redirected and/or specified 2026-06-14 23:24:42 -04:00
Christopher Sean Morrison 991359e61e even bwish gets an example and cleanup 2026-06-14 22:12:09 -04:00
Christopher Sean Morrison 46b03496b5 doc cleanup 2026-06-14 22:11:22 -04:00
Christopher Sean Morrison d93ef26cd4 bwfilter now does indeed support both -o and redirection output (optionally, it was implicitly required previously due to a bug) 2026-06-14 22:10:50 -04:00
Christopher Sean Morrison e2622d3ad7 cleanup more atoi option handling to use str* handling instead and range checking 2026-06-14 22:07:28 -04:00
Christopher Sean Morrison 3134923f14 make bwfilter do what the docs and usage said, namely that -o and redirection both work 2026-06-14 22:06:54 -04:00
Christopher Sean Morrison 4622f61bbf more parsing updates to avoid atoi instability 2026-06-14 21:47:10 -04:00
Christopher Sean Morrison d64e8b5194 fix usage; more clear which are exclusive. include a couple good examples 2026-06-14 21:39:28 -04:00
Christopher Sean Morrison 7328041011 significant rewrite with arguments called out separate from narrative 2026-06-14 21:37:32 -04:00
Christopher Sean Morrison 2ecbf72843 document help option and all opts more clearly 2026-06-14 21:36:45 -04:00
Christopher Sean Morrison 334fac13f3 more atoi elimination, and input type checking for robustness 2026-06-14 21:34:52 -04:00
Christopher Sean Morrison 8150a789c6 turn the light brightness down, turn checker repeat down, move the light up 2026-06-14 20:02:04 -04:00
Christopher Sean Morrison 3f87cba5c7 add all the irregular arb test cases to the db samples, set colors and arranged into a scene. 2026-06-14 14:49:28 -04:00
Christopher Sean Morrison 3833123e25 show usage and quit instead of pretending all is fine 2026-06-14 13:55:29 -04:00
Christopher Sean Morrison e182fb9d5d gist should no longer be displaying black boxes when the render is 'empty', which happens by default on air objects. 2026-06-14 13:43:18 -04:00
Christopher Sean Morrison 28c4e5a46f no more black boxes in hierarchy view.
take more active steps to ensure when rt produces a background-only image (or fails to render or there is really any other issue), that it skips the empty ones.
2026-06-14 13:41:30 -04:00
Christopher Sean Morrison 0b9627d07d gqa test wasn't enabled? 2026-06-14 13:35:17 -04:00
Christopher Sean Morrison 6cbc5a6c78 expand test coverage of -Aw vs -Am on pure modeled air and mixed solid+air cases. there was a report they didn't match, but appears to be thus far. 2026-06-14 13:34:34 -04:00
Christopher Sean Morrison b5bf42b959 document all the options, provide better examples 2026-06-14 13:31:17 -04:00
Christopher Sean Morrison f6f008f6ae elaborate docs, examples especially. explain the init files. 2026-06-14 13:31:17 -04:00
Christopher Sean Morrison 0339ac9bea Expand examples and clean up opts writeup 2026-06-14 13:31:17 -04:00
Christopher Sean Morrison 5dc581998d document -F and include examples, clean up options 2026-06-14 13:31:17 -04:00
Christopher Sean Morrison 46395830dc document the help options, improve the text 2026-06-14 13:31:17 -04:00
Christopher Sean Morrison 9e5e802dd9 add missing -F full precision option, gltf/glb support, and all the long opts 2026-06-14 13:31:17 -04:00
Christopher Sean Morrison 91da56912a reformat and clean up, already comprehensive 2026-06-14 13:31:17 -04:00
Christopher Sean Morrison 5feec88c32 five more atoi conversions with bounded validity checking. definitely begs for refactoring, but still better 2026-06-14 13:31:17 -04:00
Christopher Sean Morrison ec05fe749e update atoi-to-str handling on five more (fbframe, fbcbars, fbclear, fbline, fbgrid), clear refactor pattern emerging 2026-06-14 13:31:17 -04:00
Christopher Sean Morrison d0ea22c7bf reorder to avoid forward decl 2026-06-14 13:31:17 -04:00
Christopher Sean Morrison a5f98868fb confirmed a bug in fbgamma when specifying all three r/g/b gamma vlues (off-by-one on bu_optind usage. there was a workaround, namely to specify a dummy 4th value, but still a bug and now fixed. 2026-06-14 13:31:17 -04:00
Clifford Yapp 73600799eb Add in a first cut at a procedural tree generator.
There were old TODO notes about looking into ngPlant, but
for a basic start with AI assist it proved more straightforward
to implement what we need rather than pull in a dependency or
fork external code.

The trees produced are very basic - no photorealism here, but
it's a start.
2026-06-14 03:29:20 +00:00
Christopher Sean Morrison 00b40c634d fixed bug in fbgrid where -o wasn't right -- the old grid mode was using fbp which wasn't initialized (so would have just opened a default fb or crashed) and wouldn't have been even usable unless FBFILE was set. 2026-06-13 22:17:06 -04:00
Christopher Sean Morrison 072583f423 fix bot_dump and dbot_dump usage with full list of types supproted (missing gltf formats) 2026-06-13 21:52:34 -04:00
Christopher Sean Morrison 81f67a93fc another small incremental, swap atoi for strtol with bounds checking, and let user know when options conflict 2026-06-13 21:50:27 -04:00
Christopher Sean Morrison 73fc51ed03 more atoi to strtol conversion for improved/fixed opt parsing (particularly on bad input) 2026-06-13 21:43:38 -04:00
Christopher Sean Morrison c9c1c01c0f expand with a good example and full synopsis 2026-06-13 21:14:29 -04:00
Christopher Sean Morrison 3748dcb1df improve fbzoom arg parsing to not use atoi() since it's non-deterministic on bad inputs. fix usage statement while we're at it. 2026-06-13 21:07:08 -04:00
Christopher Sean Morrison c2e6e0fde9 implemented preliminary import support for vtk's file format (at least their non-xml ascii format) to gcv as an import plugin 2026-06-13 21:04:25 -04:00
Clifford Yapp 7422f7817c Use different commenting style so interior doesn't trigger gcc warning 2026-06-12 17:04:05 -04:00
Christopher Sean Morrison 4c749f0dd9 missed one 2026-06-12 15:43:49 -04:00
Christopher Sean Morrison a73171eed4 add a procedural geometry generation doc with examples for all of them. the gallery can be generated on-demand during the build when BRLCAD_GENERATE_GALLERY is set in case images are being updated. 2026-06-12 15:42:27 -04:00
Christopher Sean Morrison ec913235dc add all the image prerenderings for the 60 procedural database generator output types 2026-06-12 15:35:44 -04:00
Christopher Sean Morrison d75b0a8570 insert instead of push 2026-06-12 15:32:24 -04:00
Christopher Sean Morrison 1c592ef42e implement a preliminary vtk importer.
suports pretty diverse mapping of VTK entities to BRL-CAD entities including:

 *   POLYDATA (POINTS only)         -> a single pnts object (mk_pnts)
 *   POLYDATA (VERTICES)            -> pnts/sph/datum (--vertices)
 *   POLYDATA (LINES)               -> datum/pipe/rcc (--lines)
 *   POLYDATA (POLYGONS/STRIPS)     -> a single bot (mk_bot)
 *   UNSTRUCTURED_GRID              -> arbN cells and/or a bot (--cells)
 *   STRUCTURED_POINTS              -> vol, or dsp/ebm for 2D (--grid)
 *   RECTILINEAR_GRID               -> rpp cells or a bot (--grid/--cell-max)
 *   STRUCTURED_GRID                -> arb8 hex cells (--cell-max)

Only supports the legacy ASCII format, not binary nor the newer XML.
2026-06-12 15:31:13 -04:00
Christopher Sean Morrison 2a387e0461 lets get some initial testing in place for vtk import support 2026-06-12 15:24:19 -04:00
Christopher Sean Morrison ab314129c7 add recognition of vtk files 2026-06-12 15:21:05 -04:00
Christopher Sean Morrison 49e8eaad47 declare our new wdb funcs for mk_pnts, mk_datums, mk_dsp_obj, and mk_ebm_obj 2026-06-12 15:20:28 -04:00
Christopher Sean Morrison b6a8ecc825 implement very basic O(n) ray tracing of point clouds, linearly just treating them as spheres. probably only good for a few hundred points. 2026-06-12 15:19:22 -04:00
Christopher Sean Morrison 8987ce0a56 make sure ged_exec_human gets the right command name. probably a more systemic issue we can address. 2026-06-12 15:15:32 -04:00
Christopher Sean Morrison 9cf3337a5b do the same for ebm, allow use of an existing ebm. 2026-06-12 15:14:10 -04:00
Christopher Sean Morrison 2d5f1bc881 implement a sister function to set a DSP's datafile to an existing BINUNIF 2026-06-12 15:13:47 -04:00
Christopher Sean Morrison 5254dc492a implement a mk_datums() that creates a chain of datums 2026-06-12 15:12:55 -04:00
Christopher Sean Morrison 120469e965 implement mk_pnts for creating PNTS via libwdb 2026-06-12 15:11:29 -04:00
Clifford Yapp 4974c81ade Make sure we've got targets before trying to work with them - minimalist builds may not define them. 2026-06-12 09:32:23 -04:00
Clifford Yapp f76215fd0c Make bu_log happy, update bext SHA1 2026-06-12 06:28:58 -04:00
f4alt d330708313 implement rt_pattern RT_PATTERN_SPH_QRAND 2026-06-12 02:15:51 -04:00
Christopher Sean Morrison 6860637b1b minor enhancementavoid using atoi() for safety, using strtol() and full bounds check instead. 2026-06-12 00:54:30 -04:00
Clifford Yapp 1c1042666d Various corrections to tire logic 2026-06-11 22:06:10 -04:00
Clifford Yapp 8bd6e80a92 Tweak man pages 2026-06-11 20:30:22 -04:00
Clifford Yapp a1a35dc15f list file for CMake 2026-06-11 19:59:27 -04:00
Clifford Yapp 2d62025184 Correct source location 2026-06-11 19:16:08 -04:00
Clifford Yapp df54e5cf28 Add TODO for option handling on selected shapes tools 2026-06-11 17:10:03 -04:00
Clifford Yapp a536ed8ece Checkpoint work on improving tire tool 2026-06-11 20:45:53 +00:00
Christopher Sean Morrison ad0566c40f rm command needs a visit before release to avoid unintended data loss 2026-06-11 16:39:42 -04:00
Clifford Yapp fa6e71f4e4 First cut at a propeller shape generator. 2026-06-11 19:00:14 +00:00
Clifford Yapp 9cb7c9f1de Make a note as to the intended (and NOT intended) purpose of naca456 geometry 2026-06-11 14:27:15 -04:00
Clifford Yapp a64866a4c3 Remove the naca456 readme file 2026-06-11 16:50:47 +00:00
Clifford Yapp fa09d9a075 Move naca456 to shapes 2026-06-11 12:27:27 -04:00
Clifford Yapp 923304537d Our minimum standard is C++17 now - no need to conditionalize 2026-06-11 07:33:40 -04:00
Clifford Yapp 9d1a6b0a04 fix CHANGES entry 2026-06-11 07:32:33 -04:00
Clifford Yapp 5c7cdc7f69 Add some more wing tip options. naca456 is a procdb, so it needs to be a NO_INSTALL. 2026-06-11 07:23:56 -04:00
Christopher Sean Morrison e0b153c8ce er, no don't commit the merge, commit this one 2026-06-11 01:27:12 -04:00
Christopher Sean Morrison f8602d49c6 add refs for color 2026-06-11 01:24:50 -04:00
Christopher Sean Morrison 7d7082990f add missing ref geom 2026-06-11 01:24:45 -04:00
Clifford Yapp 9a337fa49f Round the wing tips for naca456 outputs by default 2026-06-10 23:28:56 -04:00
Clifford Yapp bec28f2cfc List ISSUES.adoc for CMake 2026-06-10 22:56:41 -04:00
Clifford Yapp 1be4a2d0c6 Add C++ only per-target option to the brlacd_addlib/brlcad_addexec CMake functions
Instead of setting ENABLE_ALL_CXX_COMPILE, which is an all or nothing
proposition, this lets us add an ALL_CXX flag to individual targets so
we can try out C++ only building on more focused subsets of the code.

Tested on libbu - found a few legit issues, and a couple more source
files that are legitimately C only.  (At least as implemented currently,
anything using bu/uuid.h is relying on C99 syntax that is a no-go in
C++.)
2026-06-10 22:51:13 -04:00
Clifford Yapp c2211e5507 Add ability to designate C-only sources for ENABLE_ALL_CXX_COMPILE
Previous attempt went haywire, but this is something we'll want to be
able to do so add back in the ability to flag a file that legitimately
can't be built as C++.

Also add back the -Dregister= property assignment for the build-as-C++
case as well - the reverted patch had mistakes from an earlier attempt
that damaged comments/text and didn't get fixed correctly, but that
experiment was unrelated to the -D approach.  The -Dregister= method
worked in testing, so it appears to be the proper answer for the
register keyword not being usable in C++ mode.  (We don't want to just
delete the register keyword because testing has previously shown there
are places in the code where it still helps performance.  We're not
actually planning to convert all our sources to C++ - we just want to be
able to build as many of them as we can in that mode so they're ready
if we do have a legitimate reason to convert one to C++.)

The other piece that should be worth saving from the mess is probably
the use of const for a bunch of strings that don't need to be mutable,
but extracting that from the patch while avoiding the incorrect parts
will be delicate - leaving it for later.
2026-06-10 21:54:29 -04:00
Christopher Sean Morrison 30a934351e improved the performance of ray tracing on objects without shaders, transparency, or air set. testing indicated about a 15% boost on models like moss. 2026-06-10 21:21:55 -04:00
Christopher Sean Morrison b8095164a8 nice little performance optimization giving about 15% boost on some scenes.
if there are lights but only opaque surfaces, we don't need to compute all hits on rays for the secondary rays.  we can just stop on that hit so long as there's not a shader set, not air, not transmissive/glass/etc.
2026-06-10 21:17:57 -04:00
Christopher Sean Morrison ea0ab59842 autoview requires a -s option for scale now 2026-06-10 21:03:32 -04:00
Christopher Sean Morrison 2b40a669bb add support for specifying objects to the autoview command.
this implements the same support we added to the rt -c autoview script command, and discover I added scale support to the autoview command a decade ago.  since that wasn't exactly published proper, treating it as minimally impacting and documenting the new behavior in the manpage (namely that -s # specifies a scale).  otherwise we'd have a conflict with objects using numeric names.
2026-06-10 21:00:40 -04:00
Christopher Sean Morrison 4e2b79364c add a prelim ISSUES.adoc file for review and discussion that combines BUGS and TODO. not convinced adoc buys us much here, but worth testing. 2026-06-10 20:54:12 -04:00
Christopher Sean Morrison 5d66359e76 Revert "Updates for building C files as C++"
This reverts commit e09b768258.

already stated in the revert message for 3a9d6607dd but looks like this
is the actual destructive commit, the other just patched over one of the
issues.  basically, this commit conflated a lot of legit c-as-c++ build
fixes with a lot of low quality changes and mistakes.  seems to have
blindly deleted the word register throughout comments by mistake
(probably undid the code changes but after too aggressively deleting the
word from mention).  replaced safe {0} with unsafe memset (better to
quell the warning).  made a real mess of the export decls, and picked
some atrocious new names to inconsistently sprinkle throughout.
2026-06-10 20:26:27 -04:00
Christopher Sean Morrison d9a0b685ce Revert "C++ and C do this differently - fix C build."
This reverts commit 3a9d6607dd.

while it did break the build in a minor way, reverting because this
patch is riddled with mistakes and inconsistencies.  it erroneously
deletes register from comments all throughout the code leaving the text
in a bad state (all the places we talk about registering something
especially).  it defines a new set of preprocessor symbols to block out
extern "C" despite there already are a couple defined, and then
inconsistently proceeds to use both all throughout the code.  it also
got rid of {0} init, which is a C thing but technically still valid C++
but strangely promoting memset as being a suitable alternative (not at
all equiv, more brittle, more crashy).

on the whole, the changeset is low-quality and not a good base to fix.
still worth doing, but needs to be redone to get C-as-C++ working.
2026-06-10 20:19:48 -04:00
Clifford Yapp 64581bce02 Do some input validation for tire parameters 2026-06-10 20:38:09 +00:00
Clifford Yapp 3a9d6607dd C++ and C do this differently - fix C build. 2026-06-10 20:10:54 +00:00
Clifford Yapp e09b768258 Updates for building C files as C++ 2026-06-10 19:51:37 +00:00
Christopher Sean Morrison 783678a124 try to bypass gcc warning about format being non-literal as it's very much intentional here, but really don't want the mess of a compiler-specific pragma if we can avoid it 2026-06-10 11:42:25 -04:00
Christopher Sean Morrison aad0565349 quell bad-function-cast warning, make a helper return the quantized value 2026-06-10 11:10:18 -04:00
Christopher Sean Morrison 168cf1a66a resolve conflict, use the tracking var 2026-06-10 11:10:12 -04:00
Christopher Sean Morrison 39ae9c79aa completely rewrite the sscanf unit test. previous was wholesale wrong as it attempted to compare against system sscanf instead of just asserting its own behavior, not match whatever libc is doing. 2026-06-10 11:08:10 -04:00
Clifford Yapp 109dde31aa Fix Wfloat-equal waring in loftwing 2026-06-10 10:54:34 -04:00
Clifford Yapp 60ac96450d BSD build fixes 2026-06-10 13:33:49 +00:00
Clifford Yapp a7711ca6d3 Improvements to naca456 proc-db
Improvements to robustness, regression testing.  Need to see if we
should fold loftwing ARS generation into this as a 3rd primitive output
option.
2026-06-10 07:37:43 -04:00
Clifford Yapp e4ca74595b Fixes for procdb building 2026-06-10 07:37:18 -04:00
Clifford Yapp 07e8ea81da improve brep output options 2026-06-10 07:16:53 -04:00
Clifford Yapp e2a12a92a5 Put back the naca license info 2026-06-10 07:16:38 -04:00
Clifford Yapp ea772f59a7 Add naca456 wing geometry generator
Back in commit 5b84dba472 we removed our first attempt at translating
the PDAS naca456 code into BRL-CAD.  Took another AI-powered stab at it
and got considerably further.  More work to do, but wanted to checkpoint
current progress as it can already produce geometry.
2026-06-10 00:47:30 -04:00
Clifford Yapp 8db14dbb7d See if we can wire in some more regression tests 2026-06-09 23:27:06 -04:00
Clifford Yapp 47d41d27c2 Get dsp, iges and red tests running on Windows
While we're at it, have red test exercise brledit (added a simple
programmatic mode so it can drive the red test.)
2026-06-09 23:27:06 -04:00
Christopher Sean Morrison b58d123cbc lets make this more interesting, chainmail woven torii 2026-06-09 22:41:33 -04:00
Christopher Sean Morrison 0e121f2424 the molecule proc is expecting an undocumented data file as input, so supply a sample 2026-06-09 22:28:20 -04:00
Christopher Sean Morrison 70d480f3e0 enable our new procs: gears, helicoil, lattice, loftwing, specimen, terragen, and voxelize 2026-06-09 22:26:44 -04:00
Christopher Sean Morrison 2af39c090e a more proper terrain demo with water, sky environment, and procedurally generated terrain. impressive result that will be generally usable in demos 2026-06-09 22:24:45 -04:00
Christopher Sean Morrison 5c61f067a6 demonstrate vol and ebm with a satisfying triple-periodic gyroid shape generator (for vol). 2026-06-09 22:22:49 -04:00
Christopher Sean Morrison a235079d7a another platter of primitives demo, this focusing on and exercising all the minorities 2026-06-09 22:20:32 -04:00
Christopher Sean Morrison 18c542f649 put ARS to use with a proc that can make wings and propeller blades around hubs 2026-06-09 22:14:35 -04:00
Christopher Sean Morrison 093aef3beb added one of the coolest new additions since sphflake, a geodesic-spherical shape with layered patterns and cavities. serious stress test for tessellation and boolean eval. also the first proc that'll let us exercise cline vs rcc. 2026-06-09 22:12:29 -04:00
Christopher Sean Morrison 9409c23ad1 default to 3 levels 2026-06-09 22:03:14 -04:00
Christopher Sean Morrison 1d7d0ce0f8 another helical pipe demo, similar to coil and wire, but a little different construction 2026-06-09 22:03:01 -04:00
Christopher Sean Morrison 322ecd92aa lets add some showcase procedures. this one is a new gears proc that makes an involute spur-gear train using sketch/extrudes. need to attach the teeth, but pretty cool. 2026-06-09 21:58:26 -04:00
Christopher Sean Morrison 7f0fc6c83e needs more work, but another interesting recursion pattern 2026-06-09 21:54:32 -04:00
Christopher Sean Morrison b8b8b122fc some bug because interior isn't cutting through the co-planar face I think, so switching to exterior for default 2026-06-09 21:54:32 -04:00
Christopher Sean Morrison 284fe1d62e make this proc resilient by default, creating two intersecting brep surfaces. we put that into a nice scene for vis. if user specifies a -x/--intersect option, it'll be debug-ready 2026-06-09 21:54:32 -04:00
Christopher Sean Morrison c17faac3bc while nmg-nurbs are on their way out, this shouldn't be bombing.. needs a quick study to make sure it's not a regression. 2026-06-09 21:54:32 -04:00
Christopher Sean Morrison a16cba539f need to investigate more how this is doing anything at all, but does render something (just not what it is supposed to). 2026-06-09 21:54:32 -04:00
Christopher Sean Morrison 4047c83892 while it is a sketch demo, we wanna see it so make an extrude to go with it. 2026-06-09 21:54:32 -04:00
Christopher Sean Morrison 5d5428748e more evidence of horrible regression, but keeping for debugging 2026-06-09 21:54:31 -04:00
Christopher Sean Morrison fc3d7204ba not a keeper, but make it actually be a doorless windowless building for a hot sec 2026-06-09 21:54:31 -04:00
Christopher Sean Morrison 36e9e4f49a set the title based on the wall type, and auto-out to a .g same as the progname base 2026-06-09 21:54:31 -04:00
Christopher Sean Morrison d491f03209 assemble the objects into a scene so we can view this. some arb8-to-nmg regression was introduced because this basic box case used to work, now commented out. 2026-06-09 21:54:31 -04:00
Christopher Sean Morrison 05eb37f71e looks like kurt is still incomplete, but now at least renders the surface of evaluated points. TODO: use the normals that were computed. 2026-06-09 21:54:31 -04:00
Christopher Sean Morrison 3fc0b905ab make default actually be a typical brick, actually a wall, with mortar 2026-06-09 21:54:31 -04:00
Christopher Sean Morrison 3bcd8bd277 allow the output name to be specified, do better with help opts 2026-06-09 21:54:31 -04:00
Clifford Yapp 5d61a1ccc0 Centralize platform wrapping of NUL vs. /dev/null handling 2026-06-09 21:37:08 -04:00
Clifford Yapp 0cf4835bb5 See if we can do some testing of our new aggregate libbrlcad lib 2026-06-09 21:26:56 -04:00
Clifford Yapp 28a69148ff null device is platform specific 2026-06-09 21:18:45 -04:00
Clifford Yapp 595da0e9b2 Testing remrt and rtwizard in a Windows context, more fixes popped out. A few other Windows adjustments. 2026-06-09 20:57:17 -04:00
Christopher Sean Morrison a72fd0f6b8 make sure we emit a relative path 2026-06-09 19:47:32 -04:00
Christopher Sean Morrison 5df825f1c8 guick hack to get us to passing, but this test is bogus as-is and needs rework 2026-06-09 19:46:05 -04:00
Christopher Sean Morrison 989d531d8b after hours of exhaustive profiling and study, writing down thoughts on the primary optimization avenues we have on tap. the assessment was purely based on the benchmark render call patterns, and the resulting prioritized list of candidate actions based on those numbers, so some things would shift around if we were to target cases not consistent with the benchmark (e.g., nurbs or complex csg or pbr or ...). still, captured most of my intuitions and priorities. 2026-06-09 19:44:17 -04:00
Christopher Sean Morrison 1b6674a01b implement a new -c "autoview obj1 obj2" option so we can automatically center the view on something other than the object(s) listed for rendering. this is very helpful for scene rendering where there is ground, sky, lights, etc, and a common source of frustration/confusion. not a substitute for proper camera/view objects, but a very simple customization option that fits the ecosystem. 2026-06-09 19:44:17 -04:00
Christopher Sean Morrison aed49eb8ca document the new autoview script command and include a more basic but common example to be the first listed 2026-06-09 19:44:17 -04:00
Christopher Sean Morrison 5f49dd84f3 initial vshot test! 2026-06-09 19:44:17 -04:00
Christopher Sean Morrison b3c0d135c4 performed a deep analysis of what appeared to be 20 of the hardest TODO/BUGS entries, and these were the resulting notes. mostly all reasonable, all annotated with a [HARD] label so they're easier to find. also includes an assessment of how parallelizable the issue is, whether we might be able to brute through the solution space.
actual assessment also included a score of open research problem / no known-correct solution, concurrency heisenberg, numberical/geometry kernel robustness with no ground truth, cross-cutting change, backwards-incompatible format/protocol needing migration+revalidation, but those notes mostly weren't included other than commentary.

unsurprisingly brep/nurbs bool eval was #1 :)
2026-06-09 19:44:16 -04:00
Christopher Sean Morrison 2b5f1ebc3e replace the hard-coded temp file with a bu_temp_file() construct instead. should consequently improve or help fix the tables command on windows. 2026-06-09 19:44:16 -04:00
Christopher Sean Morrison 6116bf2f02 rotobj was deprecated back in 7.18 but be more actively vocal now. users still have orot and rot and edit. 2026-06-09 19:44:16 -04:00
Christopher Sean Morrison 8af19b8e0d report what went wrong if we encounter an unexpected attribute, instead of failing silently. 2026-06-09 19:44:16 -04:00
Christopher Sean Morrison 109419ce9d if we get to the end of the list, emit a message on what went wrong usage-wise 2026-06-09 19:44:16 -04:00
Christopher Sean Morrison 0973fcfd57 dbfind was deprecated in 7.18 but now blathers loudly at runtime. giving more visible notice given its prevalence. 2026-06-09 19:44:16 -04:00
Christopher Sean Morrison 5aa02ba89f killall no longer blathers lookup failures when object are referenced but don't exist (at least not any longer) 2026-06-09 19:44:16 -04:00
Christopher Sean Morrison 3fb1e67798 give notice that dbfind is deprecated, should be using search instead 2026-06-09 19:44:16 -04:00
Clifford Yapp 8ccb919f79 Whoops, got a preliminary state of the test_dir.c change in the last commit. Update. 2026-06-09 15:32:13 -04:00
Clifford Yapp dce87786f4 More IPC libpkg/remrt/rtwizard work
Testing in an AI sandbox with limited networking revealed some
additional limitations/incompleteness in the non-TCP routes for remrt
and rtwizard.  This takes a stab at resolving them, although it needs a
lot more testing.
2026-06-09 15:23:22 -04:00
Clifford Yapp b447cdd5dc dsp fixes 2026-06-09 13:56:56 -04:00
Clifford Yapp 78bdfaca64 libged test fixes 2026-06-09 13:56:29 -04:00
Clifford Yapp c395453bde libbu test fixes 2026-06-09 13:01:19 -04:00
Christopher Sean Morrison 8ad3084a6f add help opts and clean up writeup on what its good for 2026-06-09 10:21:04 -04:00
Christopher Sean Morrison bee3d34371 tighten up the writeup, include help opt 2026-06-09 10:21:04 -04:00
Christopher Sean Morrison 7045b3403b correction, doesn't take a .asc file contrary to the command name. add help opts 2026-06-09 10:21:04 -04:00
Christopher Sean Morrison eedacb1f60 somehow both args are optional.. 2026-06-09 10:21:04 -04:00
Christopher Sean Morrison 586644076d include an example, fix typo 2026-06-09 10:21:04 -04:00
Christopher Sean Morrison dd01da9b62 synopsis wrong, annoying requires redireciton 2026-06-09 10:21:04 -04:00
Christopher Sean Morrison fe2c930b28 synopsis wasn't right on output forms (supports both before and after), and note the long-opts 2026-06-09 10:21:04 -04:00
Christopher Sean Morrison 9d2afc6421 document the new materials and no-materials opts 2026-06-09 10:21:04 -04:00
f4alt 3c50f50c0d cleanup code duplication 2026-06-09 09:48:19 -04:00
f4alt 3fc79bed1f create dsp surf area & vol functions
Use calculations based on the primitive itself rather than Crofton
sampling for more accurate values.
2026-06-09 09:48:19 -04:00
Christopher Sean Morrison a8c5aa1c7d add a couple tests to make sure the materials and no-materials options are working on obj bot dump 2026-06-09 07:09:11 -04:00
Christopher Sean Morrison 13ef62bf62 add color export support to glb/gltf as well as expand color export support for obj. now consistently applies color if path is specified, respecting inherit flag when set. 2026-06-09 07:08:41 -04:00
Christopher Sean Morrison f4fe4ec5b8 make hierarchy labels not overlap, inject ... ellipses 2026-06-09 06:53:51 -04:00
Clifford Yapp 4e4959f9ce check target fixes 2026-06-08 18:50:40 +00:00
Clifford Yapp e0e5d27f9c Windows tweak for brlcad lib building 2026-06-08 14:55:29 -04:00
Clifford Yapp cae6a65e7d Add an option to tolerate facetize component failures and keep going. 2026-06-08 18:13:53 +00:00
Clifford Yapp 2414479fec Adjust OpenSSL linking in libdm 2026-06-08 18:12:56 +00:00
Clifford Yapp 3111d0d95f Improve facetize error reporting 2026-06-08 16:35:58 +00:00
Clifford Yapp 2b97a5f6ad Fix function signature 2026-06-08 12:29:44 -04:00
Clifford Yapp 5c09fc74e2 Update facetize sampling to focus on potentially positive volumes more tightly. 2026-06-08 15:52:04 +00:00
Clifford Yapp 90bfc9b100 Fix FreeBSD - link in execinfo if present 2026-06-08 15:32:18 +00:00
Clifford Yapp 846cf87fd6 Set the non-cache USE_OBJECT_LIBS 2026-06-08 11:38:55 -04:00
joshbaker22 5c59f6f74f Add new version of Havoc
fix holes in front skin, file is now v5 instead of v4
2026-06-08 10:39:02 -04:00
Clifford Yapp a92edfe8a6 After discussion with Sean, we'll use rt_shootray_context for the name here. 2026-06-08 10:00:34 -04:00
Clifford Yapp fd19df27f2 See if we can turn the BRLCAD_ENABLE_BRLCAD_LIBRARY option into a working feature. 2026-06-08 07:50:14 -04:00
Christopher Sean Morrison 80794600fd try aligning to the left of the ambient area when all the images are over it 2026-06-08 03:30:14 -04:00
Christopher Sean Morrison 4741efddec work on fixing windows backtracing, export appropriately 2026-06-08 02:32:43 -04:00
Christopher Sean Morrison 474d08ad66 more de-null-casting 2026-06-08 02:26:39 -04:00
Christopher Sean Morrison d49f57acdb lets not cast null 2026-06-08 02:23:06 -04:00
Christopher Sean Morrison b05c80edce address another user-requested gist change. maximally fit long titles. we loop until it fits. 2026-06-08 02:11:11 -04:00
Christopher Sean Morrison e2138d437a just pass NULL 2026-06-08 01:57:21 -04:00
Christopher Sean Morrison 3befc3ff3a Restore test_backtrace.c fixes 2026-06-08 01:51:24 -04:00
Christopher Sean Morrison 49853dd18c Revert accidental dirty tree commit 2026-06-08 01:50:53 -04:00
Christopher Sean Morrison 4b287348f9 Fix MSVC build failures: bypass bu_sscanf %%n stack behavior and fix variadic NULL arg to bu_dir 2026-06-08 01:39:56 -04:00
Christopher Sean Morrison fadf84ab57 fix c++ compat warnings in tests 2026-06-08 01:21:22 -04:00
Christopher Sean Morrison 153fe501c9 up to about 31 new man1 manual pages 2026-06-08 01:21:10 -04:00
Christopher Sean Morrison 6a03057ec4 add man1 pages for gcv, ihist, imod, isst, istats, lowp, pix3filter, pixcount, pixelswap, pixembed, plot3stat, rtsil, smod, step-g, umod, and ustats 2026-06-08 01:18:17 -04:00
Christopher Sean Morrison 5f6fcbdb86 init to null 2026-06-08 01:09:54 -04:00
Christopher Sean Morrison ca2d908284 add unit tests for anim, msr, noise, rand, sobol, str, tabdata, ulp, version, and wavelet 2026-06-08 00:41:43 -04:00
Christopher Sean Morrison fa0ab0496b some improvements to use existing funcs to get consistent behavior 2026-06-08 00:41:43 -04:00
Christopher Sean Morrison 929fd989ef fix bn_read_table_and_tabdata() which was not reconstructing serialized object correctly, and fix other bugs like incorrectly throwing away parsed values we' processed arleady. 2026-06-08 00:41:43 -04:00
Christopher Sean Morrison c43a0e2d31 fix sobol iteration so repeated calls to bn_sobol_next() land on the same as bn_sobol_skip(.., #) 2026-06-08 00:41:42 -04:00
Christopher Sean Morrison 034ba634af no longer conditional, require double-precision Bullet for consistency 2026-06-08 00:41:42 -04:00
Christopher Sean Morrison 400fdf4927 address broken opengl dm on mac, now auto-detecting.
for a long while now, the ogl interface has been busted on Mac M-series arm64 systems due to a combination of factors including bugs in the xquartz/x11 implementation and apple's shipped support for rosetta emulation changing.  the issue being essentially that opengl support remains broken (though sounds like a proper upstream fix may be in the works.

there is online mentions that x11 on mac works via ports and it should still work on intel x86_64 systems.  as such, our solution here is to test at runtime whether ogl initializes, even taking precautions to be resilient to crashes/aborts/etc but running in a new libbu subprocess encapsulation.  if it doesn't work, we can now actually gracefully fall back to the older non-ogl x11 interface.  this essentially fixes mged, rt, and friends on mac so that defaults work once again without having to manually specify x11 dm/fb.
2026-06-08 00:41:42 -04:00
Christopher Sean Morrison 1bf201c098 gist prints summary counts in hiearachy view now instead of generic '...' 2026-06-08 00:41:42 -04:00
Christopher Sean Morrison 5fb0ec4ecb instead of just printing '...' in the hierarchy summary, enumerrate how many objects instead so it's useful context 2026-06-08 00:41:42 -04:00
Christopher Sean Morrison 50526fb666 obj export now also spits out an mtl file 2026-06-08 00:41:42 -04:00
Christopher Sean Morrison 87eb971380 force our build to only use double-precision Bullet. did a pretty broad survey of all the major distros and looks like Bullet is usually compiled with 64bit as a sidecar lib (usually with a suffix), so we look for those specific conventions they use. specifically fixed for homebrew on mac. 2026-06-08 00:41:42 -04:00
Christopher Sean Morrison c412d139cd interesting way to undo bu_list aliasing 2026-06-08 00:41:42 -04:00
Christopher Sean Morrison ef7fe3c084 implement basic get/put/adjust support for datums 2026-06-08 00:41:42 -04:00
Christopher Sean Morrison 884fe09094 form synopsis was lazy/wrong, now expanded proper. 2026-06-08 00:41:42 -04:00
Christopher Sean Morrison 5a7deb39e8 added support for datum get/put/adjust, which enables export to/from .asc format files. 2026-06-08 00:41:42 -04:00
Christopher Sean Morrison 96b0135b81 implement basic get/put/adjust support for datums 2026-06-08 00:41:42 -04:00
Clifford Yapp 602b661662 g-obj needs M_LIBRARY 2026-06-07 23:02:27 -04:00
Clifford Yapp 2553cc8f32 Avoid Werror=unused-result complaints with gcc 2026-06-07 22:53:28 -04:00
Clifford Yapp b1a45185a1 no such target 2026-06-07 22:51:38 -04:00
Christopher Sean Morrison d392802b32 clean up the man page with clear options and improved prose 2026-06-07 21:40:55 -04:00
Christopher Sean Morrison 3967dca11b loadview is covered by later entry that summarized over 110 new pages 2026-06-07 21:27:57 -04:00
Christopher Sean Morrison c6739a0ea9 elaborate a smidge to fix the CL typo, DSP got better tessellation, raytracing, and more. 2026-06-07 21:26:46 -04:00
Christopher Sean Morrison c032eeaa40 add color support to obj export.
writes out a mtl file named same as the output file, referencing the color information contained in the mtl.  the material name has the rgb embedded and adding the -m option makes it also write out the aircode, los, and material_id as well (into the mtl name).
2026-06-07 21:23:27 -04:00
Christopher Sean Morrison dce9e3de38 refactor, use bu_bitv_count_set() instead of manually iterating 2026-06-07 21:22:12 -04:00
Christopher Sean Morrison 5a06bc7583 document the new color export support 2026-06-07 21:18:03 -04:00
Christopher Sean Morrison e925a81615 add color support to obj export.
writes out a mtl file named same as the output file, referencing the color information contained in the mtl.  the material name has the rgb embedded and adding the -m option makes it also write out the aircode, los, and material_id as well (into the mtl name).
2026-06-07 21:17:17 -04:00
Christopher Sean Morrison 88e75bb860 quell doc warnings 2026-06-07 19:41:24 -04:00
Christopher Sean Morrison 5e922a9e20 old test was defunct, now actually invokes backtrace and checks for symbols. also checks bomb separately.
now fires off a 3-chain frame, gets output, and checks it.  we do actually check that symbols are in the report, which is will fail if stripped.
2026-06-07 19:07:37 -04:00
Christopher Sean Morrison 1dc12366c3 add unit tests for argv, backtrace, dir, list, sscanf, gethostname, and fchmod 2026-06-07 19:07:37 -04:00
Christopher Sean Morrison 4de37beeb6 shift from testing c++17 to testing bu_fchmod, since that's notionally what needs to work std::(permissions is the current sausage) 2026-06-07 19:07:37 -04:00
Christopher Sean Morrison 14e1b799db fix masking of failures and subtle path assumptions 2026-06-07 19:07:36 -04:00
Christopher Sean Morrison 7f8dc7bf04 zero means success 2026-06-07 19:07:36 -04:00
Christopher Sean Morrison 11c4f99959 one more ref 2026-06-07 19:07:36 -04:00
Christopher Sean Morrison 66975de10a rename bu_process_create_opts to bu_process_opts since we can reuse it in bu_process_func() 2026-06-07 19:07:36 -04:00
Christopher Sean Morrison 96984159fc include second trace path using execinfo for backtrace() instead, now distinguished from the debugger method 2026-06-07 19:07:36 -04:00
Clifford Yapp 08b9ef2d0f List files for CMake 2026-06-07 09:30:26 -04:00
Christopher Sean Morrison 7f56565fe9 create a renderer showcase script that demonstrates nearly all of the visualization modes, lighting styles, and output formats available. work in progress but intent is dual - high level integration test as well as visual summary for docs. 2026-06-07 08:33:58 -04:00
Christopher Sean Morrison 76eae87e18 renaming bu_process_create_opts to bu_process_opts so we can reuse on bu_process_func() 2026-06-07 08:30:14 -04:00
Christopher Sean Morrison 574773576b these manpages exist, out of date entries 2026-06-07 08:24:22 -04:00
Christopher Sean Morrison 56f4f0b4f0 gqa manpage has been updated repeatedly since this. several manpages missing is too vague, but they're being audited and fixed. 2026-06-07 08:24:01 -04:00
Christopher Sean Morrison ae0f55601e make sure we can get info back from bu_process_func() 2026-06-07 08:08:19 -04:00
Christopher Sean Morrison 58bfc15553 initial implementation of bu_process_func() for running functions in safe isolation 2026-06-07 08:08:19 -04:00
Christopher Sean Morrison c5954e5f51 plan out new API for running a function in a forked subprocess.
several potential uses, but motivating use is testing whether facilities that might otherwise abort/crash/exit are successful or not, like testing X11 or SIMD.  bu_process_func() captures stdout/stderr if requested as well as reports the manner of termination (including signal or exit, or timeout).
2026-06-07 08:08:19 -04:00
Christopher Sean Morrison 04164be4a7 note the sausage is not guaranteed 2026-06-07 08:08:19 -04:00
Clifford Yapp 199edb3983 Update the regress solids.pix reference image for new DSP raytracing. 2026-06-07 07:41:27 -04:00
Clifford Yapp 8e2d40e104 Avoid CMP007 warnings 2026-06-07 07:38:36 -04:00
Clifford Yapp 1a47a2682f Adjustments to properly enable new find_package support. 2026-06-06 22:35:54 -04:00
Clifford Yapp 714673a425 Simplify 2026-06-06 21:48:43 -04:00
Clifford Yapp 334689cbb0 Adjustments to dsp testing 2026-06-06 21:40:52 -04:00
Clifford Yapp eed80114ff Add m library 2026-06-06 14:01:09 -04:00
Clifford Yapp 1c9bdf0283 Build fixes 2026-06-05 20:36:34 -04:00
Clifford Yapp 1ed131d974 Improve DSP raytracing robustness and simplify tessellation pipeline
Rework DSP ray/terrain intersection handling to produce more reliable
segment ordering and more consistent results with tessellated output.
The cell-top intersection logic now uses an explicit in/out state machine
driven by triangle hit order and hit normal orientation, rather than the
older fixed-slot hit assembly.  This makes leaf-cell traversal more
robust in the presence of diagonal split artifacts, incomplete segment
cases, and upward-ray traversal through the foundation and terrain zones.

Adjust segment accounting so a_onehit only limits traversal when
positive, allowing all-hit modes such as Crofton and compositing to
collect complete results.  Add a safety swap for inside-out segments in
rt_dsp_shot, reorder foundation vs. terrain-zone processing based on ray
direction, and expose DSP terrain buffer/transform metadata for testing.

On the tessellation side, replace the simplified TerraScape path with a
decimation-based pipeline for reduced meshes.  The new approach builds an
initial surface mesh, collapses coplanar regions, decimates with mmesh,
extracts boundary loops, triangulates bottoms with detria plus Steiner
points, and assembles the final NMG directly from a temporary BOT using
a fast hash-based edge join.  Supporting changes also improve boundary
vertex handling, bottom-face manifoldness, hole detection, and Steiner
point generation performance through RTree-backed proximity indexing and
O(1) active/visited lookups.

Additional DSP cleanup fixes include:
- avoid double byte-swapping binunif uint16 height data
- avoid mutating dsp_stom during export
- update bbox/HBB terminology comments
- remove obsolete cell-top plotting debug code

Add a new rt_dsp_raytrace_check regression test covering synthetic and
real DSP cases, comparing HBB/DDA Crofton raytracing against exact
height-grid reference area/volume calculations and checking direct ray
behavior, normals, and timing.

Together these changes improve agreement between DSP CSG raytracing and
DSP tessellation, reduce pathological tessellation costs on large or flat
regions, and provide regression coverage for future DSP intersection and
meshing work.

This came out of the comparison work done while testing the facetize
command's output - we wanted volume and surface area to agree between
CSG and tess mesh outputs with reasonable tolerance, and that exposed
weaknesses in our DSP methodology.
2026-06-05 15:17:00 -04:00
Clifford Yapp db350f8da6 Expose arb8 repair abilities through an "arb repair" cmd
This should allow us to correct certain categories of non-standard or
"almost but not quite valid" ARB8 shapes.  There are some in our
share/db .g examples that can be found with lint to use as test inputs.
2026-06-04 23:03:54 -04:00
Clifford Yapp c5600c622a Add a TODO note for manifold's Hull() 2026-06-04 22:59:08 -04:00
Clifford Yapp 620ce6bebf Fix integration of QuickHull with BRL-CAD tolerance
There was an API impedance mismatch between BRL-CAD and QuickHull:

BRL-CAD relies on BN_TOL_DIST (0.005 mm) acting as an absolute precision
tolerance in world coordinates, but QuickHull treats the epsilon
parameter as a relative multiplier, multiplying it internally by the
maximum coordinate (bounding box scale) of the shape.  This resulted in
thin shapes being considered coplanar and collapsed their hulls.

Modified src/libbg/chull3d.cpp to correctly pre-normalize BRL-CAD's
absolute BN_TOL_DIST tolerance before passing it into QuickHull.
bg_3d_chull and bg_3d_chull2 now compute max_coord = MAX(|x|,|y|,|z|) of
all input points, and pass BN_TOL_DIST / max_coord into
qh.getConvexHull().  This ensures QuickHull uses exactly 0.005 mm as its
internal epsilon.
2026-06-04 22:40:20 -04:00
Clifford Yapp 1280aa41b1 Remove a few obsolete TODO entries 2026-06-04 20:07:49 -04:00
Clifford Yapp ee1e2a33bc Squelch Wshadow as well for geogram srcs 2026-06-04 19:43:53 -04:00
Clifford Yapp efdef5eb7c Suppress geogram float-equal warnings rather than just preventing them from being errors 2026-06-04 19:50:01 +00:00
Clifford Yapp bf4e603b00 Do some cleanup on the arb8 editing code. 2026-06-04 19:32:20 +00:00
Christopher Sean Morrison d283164a0a fixed vdeck truncation 2026-06-04 15:18:31 -04:00
Christopher Sean Morrison 400873e6aa no longer truncates 2026-06-04 15:17:56 -04:00
Christopher Sean Morrison 5289e60724 make sure mv and mvall don't try to target an object with slashes since that makes them unusable afterwards. common copy-paste issue since tops/ls print obj/R often enough. 2026-06-04 15:17:32 -04:00
Christopher Sean Morrison 1c3e265f74 wrap fileno in extern C 2026-06-04 15:16:16 -04:00
Christopher Sean Morrison 771309c286 bunch completed already 2026-06-04 15:14:33 -04:00
Christopher Sean Morrison eeab9a61c2 fix truncation of region names.
while vdeck is allegedly a fixed column format, which will result in truncation by design, the region name is being written into the last 'comment' field and the last item on the line.  let the reader truncate instead of the writer.
2026-06-04 14:11:30 -04:00
Christopher Sean Morrison 5c66207e43 rtweight avoids printing NaN better when density/mass/vol/centroids are zero 2026-06-04 14:11:29 -04:00
Christopher Sean Morrison 805341fea1 if densities are zero and/or resulting total weight is zero, print zero instead of NaN due to base2local conversion. 2026-06-04 14:11:29 -04:00
Clifford Yapp 683668f4a2 Clean up the flag names 2026-06-04 14:40:19 +00:00
Clifford Yapp 780f33f5ce Fix syntax, typos 2026-06-04 07:48:35 -04:00
Clifford Yapp 4e1f4c207e Add method for specifying specific subtype to use in librt editing
arb, tgc and ell have specializations, but we may not always want to
handle those specializations as their subtypes - we may want to handle
an arb4 as an arb8, for example.
2026-06-04 07:41:34 -04:00
Clifford Yapp 1b9d87bb07 Canonicalize edited arbs in librt arb edit code
Try using our validity detection and repair routines on proposed arb
edit changes to immediately catch invalid inputs.
2026-06-04 07:39:45 -04:00
Clifford Yapp bc9841315d Use Eigen to improve bg_make_pnt_3planes robustness
Try falling back on SVD-based computation in small numerical ranges.

While we're at it, see if we can improve our compile flag testing
in the libbg CMakeLists.txt
2026-06-04 07:39:09 -04:00
Clifford Yapp c85ad141dd Add work on arb8 repair
Attempt to repair an invalid or non-canonical ARB by reassembling its
input points into a standard ARB4-ARB8 vertex ordering.
2026-06-04 07:38:57 -04:00
Clifford Yapp ab615c543e bg_fit_plane triggers the same pedantic warning 2026-06-04 00:49:30 -04:00
Clifford Yapp a33f9540c8 List a few rt/geom.h structs for renaming 2026-06-03 23:31:47 -04:00
Clifford Yapp fade3d924e Make some libbg read-only function parameters const
Also list a couple in CHANGES where we would need to update callers to avoid
pedantic compiler warnings.
2026-06-03 19:05:07 -04:00
Clifford Yapp 7250d7a260 Improve lint checking for invalid ARB primitives 2026-06-03 18:36:31 -04:00
Clifford Yapp c81147e9f5 Validate b before dereferencing 2026-06-03 18:36:31 -04:00
Christopher Sean Morrison f5fb69e169 photonmapping is finally be working again 2026-06-03 17:54:22 -04:00
Christopher Sean Morrison d64fbd31fb fixed photon mapping in rt. was struct application and resource corruption that seems to go back all the way. 2026-06-03 17:41:48 -04:00
Clifford Yapp 065d7d9939 Looks like we've slimmed down our bext patches 2026-06-03 11:47:02 -04:00
Clifford Yapp 6e11e82ff3 Remove file - wrong branch 2026-06-03 15:22:05 +00:00
Clifford Yapp 9d5e529244 stash notes 2026-06-03 15:21:15 +00:00
Christopher Sean Morrison ca7af0adee fix photonmapping (rt -l7) which has been throwing a crash for quite a long time. it was reusing the app struct for secondary rays resulting in spatial partition corruption. also was a second set of corruption bugs loading from cache. also changed resource struct to reuse the already-allocated set from parent instead of re-allocating another set. 2026-06-03 03:33:04 -04:00
Clifford Yapp f31cefe58e Use a local resource struct for rt_prep_parallel
We don't actually need to use an rti_resources struct here, and using a
local container helps further reduce our dependence on the rti_resources
container.

The bigger change needed to get us off of rti_resources is updating
callers to do their own cleanup rather than having rt_i_destroy do it.
That will ultimately be a cleaner/clearer resource ownership model, but
will require client side code changes so it goes in CHANGES for
deprecation announcement.
2026-06-02 19:52:48 -04:00
Clifford Yapp ede762f51e Remove obsolete pieces code and make submodel resource management self contained 2026-06-02 16:46:43 -04:00
Clifford Yapp b9d32957de Remove rt_i/resource TODO
rt_i API is added.

With the rt_init_resource() contract already documented, we shouldn't
need to add create/destroy API even if we do make an rt_resource_internal
struct - rt_init_resource() gives us a place to do that setup.
2026-06-02 09:33:55 -04:00
Clifford Yapp 826671d4c0 We'll go with current gist behavior for 7.44 2026-06-02 09:17:05 -04:00
Clifford Yapp 23344567c3 List the struct resource related librt function updates in CHANGES
Two categories, broadly speaking - the last parameter removals (ultimately
judged minimal) and non-last-parameter changes.  The latter are deprecated and
have alternatives (except when we're just making something non-public as an
implementation detail.)
2026-06-02 09:14:34 -04:00
Clifford Yapp 37c2b45ee6 Mention struct resource in CHANGES
Not clear yet how hidden we'll be able to make this, but at the very
least let's make it clear most of the struct entries should be
officially considered non-public for API purposes.  Hopefully we can
Pimpl them, but that'll need to be carefully benchmarked to check for
performance issues before we'll know if we can get away with it.
2026-06-02 00:08:13 -04:00
Clifford Yapp 8573f5fa06 Fix memory management issues with gcv_region_end and assimp gcv plugin 2026-06-01 20:43:47 +00:00
Clifford Yapp 82022df5dd Add rt_i_create and rt_i_destroy, as well as rt_i_init and rt_i_clear. 2026-06-01 15:27:28 -04:00
Clifford Yapp 63d869f8e5 No need to stage this resource lookup through BU_PTBL_GET and rti_resources 2026-06-01 15:13:14 -04:00
Clifford Yapp d37ee011ca Note we will be retiring the rt_nurb_internal type in favor of rt_brep_internal when we remove nmg nurbs support. 2026-06-01 12:29:56 -04:00
Clifford Yapp e38b879b70 Note to set the stage for further librt improvments 2026-05-31 23:23:25 -04:00
Clifford Yapp b9bc08134f More static analyzer cleanup 2026-05-31 22:49:17 -04:00
Clifford Yapp e0d7f06c82 More static analyzer warnings 2026-05-31 22:04:50 -04:00
Clifford Yapp f951eae38a Add a few static analyzer fixes 2026-05-31 21:45:54 -04:00
Clifford Yapp d2e9dd9192 Clean up older build support tools
These days the prevalence of pkg-config and CMake makes the old
brlcad-config and brlcad.dll logic obsolete.  (We're modernizing our
find_package support for CMake for the next release - probably should
look at our pkg-config support too at some point, not sure where that
stands.)  Clear out no-longer-used logic and documentation.
2026-05-31 00:16:05 -04:00
Christopher Sean Morrison b00a94b640 add an initial architecture doc for libpkg understanding.
belongs under doc/, but there's no established home for dev docs like this.  starting here until a home is established.
2026-05-30 11:54:51 -04:00
Clifford Yapp 22a7711748 Update RTree.h path 2026-05-29 16:52:32 -04:00
Clifford Yapp b37de31958 RTree.h isn't a public header - move it to src/libbg. 2026-05-29 14:50:56 -04:00
Clifford Yapp 58f729f5dc Update bext sha1 to latest 2026-05-29 14:09:29 -04:00
Clifford Yapp f6c02c0557 Use vls for paths 2026-05-29 12:30:59 -04:00
Clifford Yapp edfd9e8e45 Address a few static analyzer warnings 2026-05-29 12:14:36 -04:00
Clifford Yapp 71d3b0ccba Move photonmap.h to optical subdirectory 2026-05-29 09:58:46 -04:00
Clifford Yapp 4f05e6ec0c Add M_LIBRARY for bark executable 2026-05-28 22:15:48 -04:00
Clifford Yapp c7fec63b9d List bu/vfont.h in CHANGES 2026-05-28 16:13:38 -04:00
Clifford Yapp e02724d78d List the tinycthread API we exposed in libbu in CHANGES 2026-05-28 16:09:35 -04:00
Clifford Yapp a8210e296f Remove reference to tc.h 2026-05-28 16:06:41 -04:00
Clifford Yapp cb1b9f931d We'll be simplifying libnmg to planar-only geometry - list nurbs APIs in CHANGES. 2026-05-28 15:58:26 -04:00
Clifford Yapp 9553e7b051 Adjustments to assetimport writing gcv plugin 2026-05-28 07:04:59 -04:00
Clifford Yapp a44cb0908a Make ttcp regression test stand alone 2026-05-28 06:54:15 -04:00
Clifford Yapp 715c738487 Fix ttcp -B mode data truncation on Windows
The -B block output regression test intermittently fails on Windows with
mismatched file sizes. Two bugs in the transmitter and receiver combine
to silently drop data in -B mode.

Root cause

Transmitter: premature WSACleanup()
After shutdown(SD_SEND) + closesocket(), WSACleanup() may fire while the
socket is still in FIN_WAIT, causing Windows to send RST instead of
completing the graceful teardown.

Receiver (mread()): partial-read data loss
mread() accumulates bytes into a block before writing. If recv() returns
-1 (e.g. WSAECONNRESET from the spurious RST) after a partial read, the
old code returned -1, silently discarding already-buffered bytes.
Regular mode is unaffected because it writes after every recv().

Changes

    mread() — preserve partial data on error

    if (nread < 0) {
        if (count > 0)
            return (int)count;  /* return bytes already buffered */
        perror_sock("ttcp_mread");
        return -1;
    }

    Transmitter (Windows) — drain before closesocket()/WSACleanup()
    After shutdown(SD_SEND), loop recv() until 0 to ensure both FINs are
    exchanged before Winsock cleanup:

    (void)shutdown(fd, SD_SEND);
    while (READSOCKET(fd, drainbuf, sizeof(drainbuf)) > 0) {}

    Without this, WSACleanup() can abort a connection still in FIN_WAIT,
    triggering the WSAECONNRESET that hits the mread() bug.
2026-05-28 06:32:27 -04:00
Clifford Yapp d26205611e Don't static test librtuif - it intentionally leaves symbols to be provided by other code in executables, so full archive closure is invalid in this case. 2026-05-27 21:10:11 -04:00
Clifford Yapp f06199d409 Fixes for regress-licenses and regress-repository 2026-05-27 20:18:34 -04:00
Clifford Yapp 646ef9fa2d Another try at reworking the regress fuzz detection. 2026-05-27 20:10:14 -04:00
Clifford Yapp c55a4e82ed Quell clang Bullet3 warnings 2026-05-27 19:57:08 -04:00
Clifford Yapp aae39baa8e Looking like we need PNG_INCLUDE_DIRS with FreeBSD to avoid pulling in wrong png.h 2026-05-27 16:38:38 -04:00
Clifford Yapp 3fcac5be6e Clang doesn't like the @par here 2026-05-27 15:59:03 -04:00
Clifford Yapp 2a23224497 Fix cmakefiles entries 2026-05-27 15:58:15 -04:00
Clifford Yapp 2510cdb85a Actually test for getaddrinfo and use it if present 2026-05-27 15:48:05 -04:00
Clifford Yapp 07aff8e569 Use C++ random 2026-05-27 15:48:05 -04:00
Christopher Sean Morrison 9500877ae9 restore BU_BITV_LOOP_START/BU_BITV_LOOP_END macros.
intent is to replace with the callback interface as it is cleaner, but have to deprecate.
2026-05-27 15:09:14 -04:00
Christopher Sean Morrison edf903415d documented in COPYING and decided long ago that testing infra would be bsd or more relaxed. intent is maximum permissive. updated headers accordingly. 2026-05-27 14:59:11 -04:00
Christopher Sean Morrison 920f51f2b4 rename all tests to have a consistent test_{group}[_subgroup] naming convention.
this minimizes the risk of test sources conflicting/matching with implementation source file names, which causes problems with various IDEs and other tools scanning the repo.  it also creates an exec pattern that distinguishes test targets from non-test targets unambiguously, and makes finding tests more consistent (no longer having to guess or search if logic is in a prefix/suffix/nofix file).
2026-05-27 14:45:12 -04:00
Christopher Sean Morrison fd9e7b7453 rename runner to have a test_{group} prefix, targets plugin libs too 2026-05-27 14:45:11 -04:00
Christopher Sean Morrison 6441100884 make sure there's just at least that many since there will be multiple when renamed 2026-05-27 14:45:11 -04:00
Christopher Sean Morrison e6534b0c78 massively simplify instead of nm brittleness.
if the compile definitions we got from find package indicate system is double, go with that, otherwise just assume float.  looked at homebrew, ports, apt, pacman, apk, emerge, and dnf and only one of them had libbullet as double (apk) with the rest appending suffixes or installing into ad hoc secondary locations or simply only doing float.
2026-05-27 14:45:11 -04:00
Clifford Yapp ddc958bd8b Add sys/stat.h for FreeBSD 2026-05-27 13:56:16 -04:00
Christopher Sean Morrison 97f1f63d5c if we're not using system bullet, assume double since that's what we set. default to double. if it's system, check for float if we can run nm though we still might have mangled names. 2026-05-27 12:29:56 -04:00
Christopher Sean Morrison 16873214cb c++ requires including a nul byte when using a string literal, C does not 2026-05-27 12:14:30 -04:00
Christopher Sean Morrison cfa483131c ged help command was overflowing a static array 2026-05-27 12:13:37 -04:00
Christopher Sean Morrison 78ef79d5d2 fix two crash bugs involving the help command.
the large MAX_WORDS array allocated on the stack was getting overflow writes corrupting the stack, typically observed as a crash on exit or sometime after running 'help'.

there was also a separate bug if the number of dirs exceeded 2048, though I don't think we hit that limit.
2026-05-27 12:13:37 -04:00
Christopher Sean Morrison 7c4c62df9b no validation criteria yet, but add a test that runs it at least 2026-05-27 12:13:37 -04:00
Christopher Sean Morrison 56e1eb5e07 apply same optimization to bu_bitv_vls(), now 60x faster and less than half the time as the stl variant. uses builtin_ctz11 to fast-skip zero bits in sparse sets when we're using gnu or clang. 2026-05-27 12:13:37 -04:00
Clifford Yapp 319a24ac95 Can't assume alloca on FreeBSD - test for it. 2026-05-27 11:36:38 -04:00
Clifford Yapp 95c67b8e71 Bump array size to hold null 2026-05-27 07:26:29 -04:00
Christopher Sean Morrison cfacbff01e oops, we do want to keep track of the requested number of bits separate from the alloc multiples, needed for proper printing purposes. tddd ftw. 2026-05-26 20:53:08 -04:00
Christopher Sean Morrison 872b650ac0 zeros for nouns 2026-05-26 20:45:57 -04:00
Christopher Sean Morrison 5c1b1551a7 re-implement bu_bitv_to_hex() as it was incredibly slow. 400x speedup.
it was calling bu_vls_printf() for every byte, but now doing a single bulk append.  went from being half the speed of stl to being nearly 100x faster.
2026-05-26 20:44:22 -04:00
Christopher Sean Morrison 553651abe7 make sure we init with the right number of bits available (64).
document the static use case also that avoids dynamic alloc when caller doesn't need more than 64 bits.
2026-05-26 20:08:43 -04:00
Christopher Sean Morrison c995de771e nbits guard is wrong, always have to clear. if nbits is zero, we still can just set it also 2026-05-26 20:07:57 -04:00
Christopher Sean Morrison 2118ceb3ec ws cleanup 2026-05-26 19:51:35 -04:00
Christopher Sean Morrison c925adab84 fix underflow bug where caller asking for fewer than 64 bits would have resulted in massive allocation (probably OOM-abort). note we don't need to alloc more, and avoid re-zero'ing after calloc 2026-05-26 19:45:42 -04:00
Christopher Sean Morrison b105f21346 note how we have 64 usable bits in the struct 2026-05-26 19:43:21 -04:00
Christopher Sean Morrison 5b8e4e3e63 switch from 1-byte to 8-byte default bitv.
this aims to address a longstanding issue with the bitv[2] creating misalignment (and potential padding).  switching to a 64bit type improves the alignment and quells the warning (on mac at least).

extensive performance testing showed no significant change across debug or release builds (though in theory the aligned struct should give better cache coherency).  even compared against vector<bool> and it's on par in all the calls that are performance critical.

5 bu_bitv_clear
   5 bu_bitv_or
   7 BU_BITCLR
   8 BU_BITS2WORDS
   8 bu_bitv_dup
  10 bu_bitv_to_hex
  15 bu_bitv_vls
  37 BU_BITSET
  40 bu_bitv_free
  42 bu_bitv_new
  45 BU_BITTEST
2026-05-26 19:37:05 -04:00
Christopher Sean Morrison 95e10b6423 switch from 1-byte to 8-byte default bitv.
this aims to address a longstanding issue with the bitv[2] creating misalignment (and potential padding).  switching to a 64bit type improves the alignment and quells the warning (on mac at least).

extensive performance testing showed no significant change across debug or release builds (though in theory the aligned struct should give better cache coherency).  even compared against vector<bool> and it's on par in all the calls that are performance critical.

5 bu_bitv_clear
   5 bu_bitv_or
   7 BU_BITCLR
   8 BU_BITS2WORDS
   8 bu_bitv_dup
  10 bu_bitv_to_hex
  15 bu_bitv_vls
  37 BU_BITSET
  40 bu_bitv_free
  42 bu_bitv_new
  45 BU_BITTEST
2026-05-26 19:37:00 -04:00
Christopher Sean Morrison cf4c282665 gonna provoke some tdd failure.. add api testing across avs, cmd, endian, observer, units, and vlb. 2026-05-26 19:11:16 -04:00
Christopher Sean Morrison 88e40fb2ba remove bitv_private.h 2026-05-26 18:37:16 -04:00
Christopher Sean Morrison ab108e5c3e remove bitv_private.h (encapsulation test was a dead-end) 2026-05-26 18:36:29 -04:00
Christopher Sean Morrison 04fe2db9b1 fix bullet detection. was looking in noinstall, but it's installed. 2026-05-26 18:17:07 -04:00
Clifford Yapp 0cc12eb7f8 List file for CMake 2026-05-26 16:07:45 -04:00
Clifford Yapp e4d2604fa7 Try to be cleaner about Tcl/Tk shutdown when quitting MGED. 2026-05-26 15:40:51 -04:00
f4alt a8ca15733a cleanup
caught while auditing behavior change. Don't use a failing fu, and free
alloced ptbl.
2026-05-26 13:19:34 -04:00
f4alt 0a70997f02 restore behavior
Don't fail on non-closed rings. Although techincally invalid, prior to
de27f90 the raytracer will still produce an image - which we want to
maintain. Keep the check and warning but don't abort.
2026-05-26 13:19:34 -04:00
Christopher Sean Morrison eab203ca4a header says return -1 when not found in the set, so make sure we return it when not found 2026-05-26 12:48:42 -04:00
Christopher Sean Morrison 27fafb07fa fix bug decoding identity matrix. need to actually copy it. 2026-05-26 12:48:42 -04:00
Clifford Yapp ce18ee053b Note potential Windows MGED issue to resolve for release. 2026-05-26 11:28:53 -04:00
Christopher Sean Morrison 6f3c978d0f Call Tcl_Finalize() instead of Tcl_Exit() so Td doesn't try to close descriptors and pipes that we might have already closed. 2026-05-26 11:20:21 -04:00
Christopher Sean Morrison 87ccdb8c82 reduce the logic depth, and not null out too early 2026-05-26 11:20:21 -04:00
Christopher Sean Morrison 3c6ccd385c when launching mged on windows, console window was spewing messages, which quoting the dot-paths fixes. this was the error:
wgl_open: wm deiconify .topid_0.ul failed: invalid character "."
in expression ".topid_0.ul eq [winfo t..."
wgl_open: wm deiconify .topid_0.ur failed: invalid character "."
in expression ".topid_0.ur eq [winfo t..."
wgl_open: wm deiconify .topid_0.ll failed: invalid character "."
in expression ".topid_0.ll eq [winfo t..."
wgl_open: wm deiconify .topid_0.lr failed: invalid character "."
in expression ".topid_0.lr eq [winfo t..."
2026-05-26 11:20:21 -04:00
Christopher Sean Morrison 48b4fe2339 add a preliminary manpage for the new near command 2026-05-26 11:20:21 -04:00
Christopher Sean Morrison 36df107bf5 looks possible for a bad list to deref null, so make sure not 2026-05-26 11:20:21 -04:00
Christopher Sean Morrison ca0b6ca434 don't declare db_read or linkage is wrong on windows 2026-05-26 11:20:21 -04:00
Christopher Sean Morrison 4257f03062 quell going pointer to number 2026-05-26 11:20:21 -04:00
Christopher Sean Morrison a253b39d0f needs noexcept declaration else latest msvc build failure 2026-05-26 11:20:21 -04:00
Christopher Sean Morrison 61806795dc make sure we're not null before inserting. 2026-05-26 11:18:31 -04:00
Christopher Sean Morrison 4d283e42fe windows defines ALTERNATE so suffix it here 2026-05-26 11:18:31 -04:00
Clifford Yapp 90de63ec6f Make aligned_allocator const 2026-05-26 10:19:24 -04:00
Clifford Yapp e6acdc8d84 Fix build 2026-05-26 10:02:15 -04:00
Christopher Sean Morrison c142519ebc add a batch of man1 pages that didn't exist previously.
adds manpages for archer bombardier damdf dauto dauto2 dconv ddisp dfft dmod dpeak dsel dstats dwin fence human
2026-05-25 17:43:31 -04:00
Christopher Sean Morrison 98970aadd7 add a batch of man1 pages that didn't exist previously.
adds manpages for archer bombardier damdf dauto dauto2 dconv ddisp dfft dmod dpeak dsel dstats dwin fence human
2026-05-25 17:43:31 -04:00
Christopher Sean Morrison 721260ee29 all three bumped up to 256 creations 2026-05-25 17:43:31 -04:00
Christopher Sean Morrison a02f75f8c7 clean up the description and usage 2026-05-25 17:43:31 -04:00
Christopher Sean Morrison ad9e99cedb also updated, supports 256 windows 2026-05-25 17:43:31 -04:00
Christopher Sean Morrison eb9f784a3f also updated, supports 256 windows 2026-05-25 17:43:31 -04:00
Christopher Sean Morrison ade6d4ba97 already out of sync, wire can be 100 segments 2026-05-25 17:43:31 -04:00
Christopher Sean Morrison 276d61aecf enable testing the macros 2026-05-25 17:43:31 -04:00
Christopher Sean Morrison ee615b7d44 add a bitv macro test 2026-05-25 17:43:31 -04:00
Christopher Sean Morrison ec2a283b42 set the stage for making bitv guts private if we can do so without affecting performance 2026-05-25 17:43:31 -04:00
Christopher Sean Morrison cc47408931 unused MAX_EXTENT 2026-05-25 17:43:31 -04:00
Christopher Sean Morrison d91713d217 this backwards compatibility pass makes it incorrectly pick up subcommand registrations. stick to the X() registrations which should probably be renamed. 2026-05-25 17:43:31 -04:00
Clifford Yapp 50dbc0eb87 Couple more TODO list updates 2026-05-24 10:29:45 -04:00
Clifford Yapp dad93281c1 Remove obsolete TODO items from the list 2026-05-24 09:47:35 -04:00
Clifford Yapp 5efe48bbdc See if we can consolidate the introspection logic for characterizing libs 2026-05-23 13:38:15 -04:00
Christopher Sean Morrison 4436ff860c after significant discussion with cliff, it's time to adapt the change policy to enable faster code evolution and changes while still giving adequate notice and migration support to other parties relying on brl-cad 2026-05-23 10:54:22 -04:00
Christopher Sean Morrison eb2815dd99 whoosh, lots of new command manpages exist now.
three that still reside in mged need to be resolved
2026-05-23 10:36:50 -04:00
Christopher Sean Morrison 472528463d if path is already absolute (which it is coming from lemon), then don't smash two fulldirs together 2026-05-23 01:09:10 -04:00
Clifford Yapp b176471ba3 Add Config.cmake style find_package(BRLCAD) suppport, call out PUBIC and PRIVATE libs
BRL-CAD poses a complex problem when it comes to find_package - rather than
require callers to implement a FindBRLCAD.cmake, try to use CMake's newer
mechanisms to provide what is needed ourselves as part of a BRL-CAD install.

Related to this effort, we also separate out the libraries our libs and
executables use into PUBLIC and PRIVATE libraries.  We also have added a test
that tries to test out our static libraries (sans libged and libtclcad, which
are too large for our testing enviornments in full static configuration) to
make sure we are defining our setup correctly for them (they are not usually
tested in the main BRL-CAD build.)
2026-05-22 17:08:57 -04:00
Clifford Yapp 2edab774e2 Avoid linker warning about -Werror=stringop-overread 2026-05-22 17:05:52 -04:00
Christopher Sean Morrison 6621e7065d needs more work, but try harder to find git on a default visual studio install 2026-05-22 13:57:32 -04:00
Christopher Sean Morrison dd8e269caa new near command for finding objects near to an object or point implemented in response to user request 2026-05-22 03:14:05 -04:00
Christopher Sean Morrison a11c52b89c add initial implementation of a 'near' command for reports objects in proximity.
does a quick bb check and shoots rays within the overlapping bb to determine how close objects are to a given object or point.  defaults to auto, but has options for ray spacing, what comb context to limit it to, and max number of samples.  implemented in response to a user request.
2026-05-22 03:14:05 -04:00
Christopher Sean Morrison f36620d116 we need to document meshing/remeshing/decimation 2026-05-22 03:14:05 -04:00
Clifford Yapp 977f66f730 Get distcheck-source_archives passing 2026-05-21 19:39:32 -04:00
Clifford Yapp b810770cba Tell cmakefiles about ged plugin srcs 2026-05-21 16:09:31 -04:00
Christopher Sean Morrison ee5a29072d shouldn't have to specify sources already listed by targets 2026-05-21 01:47:24 -04:00
Christopher Sean Morrison 379e738482 latest bext 7eaec4272310a7a741817c8f680d8db49abe2387 with shallow cloning 2026-05-21 00:49:21 -04:00
Christopher Sean Morrison 88ed7e6395 make sure the precompiled header is generated outside SCHEMA_OUT_DIR.
exp2cpp wipes out the SCHEMA_OUT_DIR files which gets it out-of-sync with the pch use.  ultimately resulted in mac build failures:

path/to/build/src/conv/step/step-g/CMakeFiles/step-g.dir/cmake_pch.hxx:5:10: fatal error: 'path/to/build/src/conv/step/step-g/CONFIG_CONTROL_DESIGN_stepg/precompile_stepg.h' file not found
2026-05-20 22:31:17 -04:00
Christopher Sean Morrison 68821c1c26 build failures in external codes, unclear if this satisfies minimally impacting 2026-05-20 20:23:34 -04:00
Christopher Sean Morrison e055fb77b2 user request to report adjacent objects (e.g., objects within 0.1 inches from the surface of a specified object).
gqa already has an adjacent air option, so this is potentially another analytic case or a generalization.
2026-05-20 20:23:34 -04:00
Clifford Yapp b21d137de9 Fix sketch/polygon round-trip plane offset math
db_scene_obj_to_sketch and db_sketch_to_scene_obj could introduce offsets when
converting between view polygons and sketch primitives. The conversion was
mixing plane points with basis vectors and losing the sketch-derived plane
during scene-object creation.

Conversion math
    Preserve the sketch-defined plane after creating the scene polygon object.
    Export sketch u_vec / v_vec as vectors relative to the sketch origin, not
    absolute plane points.
    Align bg_plane_closest_pt UV output with sketch vertex coordinate storage.

Round-trip coverage
    Update polygon/sketch tests to compare reconstructed scene geometry rather
    than requiring identical sketch parameterization.
    Add a non-zero plane-origin case to catch axis/origin offset regressions.

Core correction:

bg_plane_pt_at(&sketch_ip->V, &p->vp, 0, 0);
bg_plane_pt_at(&u_end, &p->vp, 1, 0);
bg_plane_pt_at(&v_end, &p->vp, 0, 1);
VSUB2(sketch_ip->u_vec, u_end, sketch_ip->V);
VSUB2(sketch_ip->v_vec, v_end, sketch_ip->V);
2026-05-19 16:18:34 -04:00
Christopher Sean Morrison 04c2aa6569 more fully documented in rtwizard(1), so keep rtwizard(n) simpler to not replicate it. 2026-05-18 09:49:08 -04:00
Christopher Sean Morrison 66781c0797 do a better job explaining how/what rtabort does. aborts them all. 2026-05-18 09:49:08 -04:00
Christopher Sean Morrison b09df27298 spell out all the options, don't punt 2026-05-18 09:49:08 -04:00
Christopher Sean Morrison b1684bc92b explain globbing and pattern matching 2026-05-18 09:49:08 -04:00
Christopher Sean Morrison 37b41c8cc7 note i is same as instance, elaborate usage and examples 2026-05-18 09:49:08 -04:00
Christopher Sean Morrison 1b65f05790 weird command, does seem to be a simple app runner 2026-05-18 09:49:08 -04:00
Christopher Sean Morrison 75d6cbe9e9 spell out all the subcommands 2026-05-18 09:49:08 -04:00
Christopher Sean Morrison be042eea5a elaborate and include better examples 2026-05-18 09:49:08 -04:00
Christopher Sean Morrison 7f70668cad better examples 2026-05-18 09:49:08 -04:00
Christopher Sean Morrison cf68ca8a36 note comb_std and c are the same, elaborate options, better examples 2026-05-18 09:49:08 -04:00
Christopher Sean Morrison de67a47e98 reconcile the cc and constraint commands which largely overlap but have different forms with 'constraint' having more read/write options and cc just doing a simple creation. 2026-05-18 09:49:08 -04:00
Christopher Sean Morrison 10ef911f01 expand all the options, better example 2026-05-18 09:49:07 -04:00
Christopher Sean Morrison dba6a792f4 missing the -C option 2026-05-18 09:49:07 -04:00
Christopher Sean Morrison e6993509a7 major rewrite, elaboration, and source-reconciled correction of several man pages 2026-05-18 09:49:07 -04:00
Clifford Yapp c8ef2dd8cd List mann scanner as exempt from bu_setprogname check 2026-05-18 07:29:48 -04:00
Clifford Yapp 121c42b093 regex expression was crashing on Linux 2026-05-18 07:26:11 -04:00
Christopher Sean Morrison b1d713d944 prose summaries are supposed to be strictly for end user impact, so move note to CHANGES.
elaborate a bit on the nature of the change and why it fell outside deprecation, but still needing to be documented.
2026-05-18 01:24:31 -04:00
Christopher Sean Morrison 2ca3238870 about 200 man pages have been edited and/or added. more work needed, but this greatly expands ged command coverage and examples. 2026-05-18 01:07:20 -04:00
Christopher Sean Morrison 1decfdd093 refactored, we need the guts which live in who plugin 2026-05-18 00:52:56 -04:00
Christopher Sean Morrison fe7ccb76eb refactored the solid_report command as well, common code. make sure it's committed 2026-05-18 00:51:57 -04:00
Christopher Sean Morrison b55e394b53 no longer need resources for the treewalk 2026-05-18 00:50:46 -04:00
Christopher Sean Morrison 9b146200f4 need to declare override 2026-05-18 00:49:44 -04:00
Christopher Sean Morrison c9126d2173 def can use another set of eyes on this, but more logic to look harder for zlib and eigen3; and telling other logic where to find them. 2026-05-18 00:49:04 -04:00
Christopher Sean Morrison 0f3f3baa7f looks like it needs to be ZLIB_STATUS not ZLIB_LIBRARY to get ON/OFF state 2026-05-18 00:47:34 -04:00
Christopher Sean Morrison 8f20fb8e05 maybe a better fix, but noticed eigen, opencv, and zlib seem to lose track that they were enabled on/off, so make sure they're on when bext_enable_all is set. 2026-05-18 00:44:54 -04:00
Christopher Sean Morrison 020de0f680 refactor and isolate librt's spatial partitioning.
this lets us get an easier handle on how the spatial partitioning is implemented, as now the majority of logic resides in a specific place, single file.  it also makes it easier to introduce a null method that doesn't do anything.

as anticipated, the null method can actually speed up traces for very small scenes but becomes exponentially worse as more objects are being ray traced.

did not see a noticeable change in performance on the refactor itself for nubsp, but does warrant additional testing.
2026-05-18 00:38:44 -04:00
Christopher Sean Morrison 7195e5d8c9 list the spatial partition methods 2026-05-18 00:37:53 -04:00
Christopher Sean Morrison f4725fc8e0 consolidate solid_report into who/who2 as a solids subcommand.
this also lets us refactor them to use a common core, and easier to identify what options were available/needed/missing/etc.
2026-05-18 00:31:54 -04:00
Christopher Sean Morrison d958b2c727 add 113 new manual pages for ged commands not yet documented.
includes some works-in-progress, some deprecated, some that need to be deprecated, consolidated, and more, but substantially closes the gap.
took multiple iterations and fully manual review to get them all into a minimally viable state with accurate synopsis, descriptions, options and subcommands, and hopefully  useful examples.
still needs some more iterating and validation, but now covers all but a select few that were manually excluded.
2026-05-18 00:25:31 -04:00
Christopher Sean Morrison 9d4388ad45 group lc options by their relationships 2026-05-17 23:58:05 -04:00
Christopher Sean Morrison c468aceb0f improve writeup clarity 2026-05-17 23:57:21 -04:00
Christopher Sean Morrison 5eb07eccec elaborate text and examples 2026-05-17 23:56:35 -04:00
Christopher Sean Morrison 6a02a65641 elaborate the description and examples 2026-05-17 23:56:08 -04:00
Christopher Sean Morrison 0b729b9742 concise name, but put rest in description. note relationship to rcodes, idents, and wmater. 2026-05-17 23:54:59 -04:00
Christopher Sean Morrison f6992a6f81 expand the actual list of subcommands 2026-05-17 23:53:38 -04:00
Christopher Sean Morrison 1c2b116ee0 it's still wildly more complicated than the synopsis indicates, but still spell out some of our options 2026-05-17 23:53:14 -04:00
Christopher Sean Morrison 7a035b92a0 document the -D option and command alias with underscore 2026-05-17 23:52:03 -04:00
Christopher Sean Morrison 3a7ba763d6 note the two forms of overlay, plot and image 2026-05-17 23:51:17 -04:00
Christopher Sean Morrison f39f9e06d6 better idents/solids/regions/table write-ups that are consistent with each other 2026-05-17 23:48:07 -04:00
Christopher Sean Morrison a160f4f3ee better eye_pt docs noting the get/set forms 2026-05-17 23:45:12 -04:00
Christopher Sean Morrison 8d2c92a2ce document -a all option and better description. 2026-05-17 23:44:39 -04:00
Christopher Sean Morrison 3a2851b07c explain db_glob more fully.
actually tries to expand full command strings, which means almost certainly doesn't work well with objects having spaces and special chars.
2026-05-17 23:43:53 -04:00
Christopher Sean Morrison d9c2e1f5cf expand bb options to actual 2026-05-17 23:41:47 -04:00
Christopher Sean Morrison dc65ab8f7b animmate is no more 2026-05-17 23:34:37 -04:00
Christopher Sean Morrison 034a207ce3 second though, no get_dbip 2026-05-17 13:17:25 -04:00
Christopher Sean Morrison b5f842ff62 document the tire command (should be dynamic plugin command) 2026-05-17 13:15:41 -04:00
Christopher Sean Morrison 5309c2a792 initial select command doc 2026-05-17 13:14:10 -04:00
Christopher Sean Morrison 21d4a8b766 again learned something new, document sdata_lines command fo radding secondary drawing set 2026-05-17 13:13:46 -04:00
Christopher Sean Morrison dd9a9caa15 initial rselect manual page 2026-05-17 13:12:38 -04:00
Christopher Sean Morrison 9f745d1bad initial man page for 'png' command that saves an image of the current display 2026-05-17 13:10:50 -04:00
Christopher Sean Morrison 250a2e6b96 add initial pipe_ACTION manual pages, even though these need to be reworked as subcommands 2026-05-17 13:10:06 -04:00
Christopher Sean Morrison 775a74004a initial pathsum man page 2026-05-17 13:09:08 -04:00
Christopher Sean Morrison c84e09070c initial man pages for metaball_move_pnt and metaball_delete_pnt even though these need to become subcomands 2026-05-17 13:07:34 -04:00
Christopher Sean Morrison 6d0d60402c initial get_dbip manpage, even if it's a dev cmd 2026-05-17 13:05:13 -04:00
Christopher Sean Morrison 2985e1efa9 add new dbversion man page 2026-05-17 13:04:18 -04:00
Christopher Sean Morrison 30d90e4a2c dev doc, but add for completeness 2026-05-17 13:03:48 -04:00
Christopher Sean Morrison f920cbf198 add data_lines man page.. didn't know this existed 2026-05-17 13:02:53 -04:00
Christopher Sean Morrison 44ed7aaaa9 initial closedb manpage with example 2026-05-17 13:01:35 -04:00
Christopher Sean Morrison 23f9b2e905 might have this wrong, but looks like html is generated from the manpage, so let the log indicate what's happening with an arrow 2026-05-17 12:39:07 -04:00
Christopher Sean Morrison 0f2a8397a0 in prep for merging of solid_report into who as solids subcommand 2026-05-17 12:12:28 -04:00
Christopher Sean Morrison 64ba393552 this may need work, but see if we can get away with the file being bigE and the guts documenting 'E'. document the -s option. 2026-05-17 12:11:44 -04:00
Christopher Sean Morrison 4a04cf9a3a include an example 2026-05-17 12:10:24 -04:00
Christopher Sean Morrison c5f5fa23e9 expand options for -s, -V -U 2026-05-17 12:08:30 -04:00
Christopher Sean Morrison 2d82d825a0 document -s option 2026-05-17 12:07:26 -04:00
Christopher Sean Morrison 241291c7f6 add opts section, explain 2026-05-17 12:07:08 -04:00
Christopher Sean Morrison a9d0632550 document the -s option 2026-05-17 12:06:46 -04:00
Christopher Sean Morrison fd0f2e4bfa note t is really an ls alias at this point. manpage made it sound like something completely different. 2026-05-17 12:06:10 -04:00
Christopher Sean Morrison 4d5a6da25b more clearly describe the synopsis, add an example 2026-05-17 12:02:10 -04:00
Christopher Sean Morrison 22be869765 document -q and -v and -r opts 2026-05-17 11:57:53 -04:00
Christopher Sean Morrison 69ee9c424a note it's an alias to 'who solids', and encourage migration 2026-05-17 11:57:13 -04:00
Christopher Sean Morrison 96f0815f90 add example. this needs a regression test.. 2026-05-17 11:55:23 -04:00
Christopher Sean Morrison 8e3603113e add help 2026-05-17 11:54:54 -04:00
Christopher Sean Morrison de20ccbffb add help opts 2026-05-17 11:54:46 -04:00
Christopher Sean Morrison a9c3d3b525 fix synopsis, add examples 2026-05-17 11:54:04 -04:00
Christopher Sean Morrison 7f5b572b27 link to the aliases 2026-05-17 11:53:29 -04:00
Christopher Sean Morrison 8c65113520 meh 2026-05-17 11:52:46 -04:00
Christopher Sean Morrison 809987f51d document full usage and opts 2026-05-17 11:52:29 -04:00
Christopher Sean Morrison b45adc9140 there is now, example added 2026-05-17 11:51:58 -04:00
Christopher Sean Morrison c5c439c105 add a trivla example with leader to next command 2026-05-17 11:51:36 -04:00
Christopher Sean Morrison 01bfbcafe7 expand the options into a table instead of para 2026-05-17 11:50:56 -04:00
Christopher Sean Morrison 654b1688d7 note -h option 2026-05-17 11:50:30 -04:00
Christopher Sean Morrison 88194fec13 minor caveat, ws 2026-05-17 11:50:10 -04:00
Christopher Sean Morrison 2398dc0757 add options section with all short+long opts 2026-05-17 11:49:25 -04:00
Christopher Sean Morrison d896fc69ec add a couple examples 2026-05-17 11:48:20 -04:00
Christopher Sean Morrison d83ed5e546 swath of doc cleanup, long opts, added missing opts, and organization cleanup 2026-05-17 11:47:06 -04:00
Christopher Sean Morrison b8eea78865 document -L, -D, and reference the long opts 2026-05-17 11:38:07 -04:00
Christopher Sean Morrison 5f0f28f5e0 mention help 2026-05-17 11:35:37 -04:00
Christopher Sean Morrison d1b3be66de document all of the invocation forms, describe the options, and provide some examples 2026-05-17 11:34:40 -04:00
Christopher Sean Morrison 3619bcc7ff document the -h and -o options, learned something new myself! 2026-05-17 11:33:50 -04:00
Christopher Sean Morrison 19f71302c1 spell out all the options including -A and -o, and their long opt form 2026-05-17 11:32:49 -04:00
Christopher Sean Morrison 8b7fbef64d doument more long opts 2026-05-17 11:31:05 -04:00
Christopher Sean Morrison 925a7c19b9 added an example 2026-05-17 11:30:53 -04:00
Christopher Sean Morrison acb45e8c36 document the -n option, list -q 2026-05-17 11:29:00 -04:00
Christopher Sean Morrison 96c3c42448 document the non-recursive -R option 2026-05-17 11:17:43 -04:00
Christopher Sean Morrison bef6e66baf add a couple non-trivial examples 2026-05-17 11:17:05 -04:00
Christopher Sean Morrison 0fdf04ccc7 add examples, unverified. looks like grouper / gr is a tcl proc along with dg (done grouper). 2026-05-17 11:16:24 -04:00
Christopher Sean Morrison 1c86004ba2 document the long opts 2026-05-17 01:59:29 -04:00
Christopher Sean Morrison e953c83516 document the confirm option 2026-05-17 01:59:05 -04:00
Christopher Sean Morrison 6b83eadd49 document a few opts missing 2026-05-17 01:57:49 -04:00
Christopher Sean Morrison 1b18b42859 note synonym for quit 2026-05-17 01:56:45 -04:00
Christopher Sean Morrison ac54795bec expand all erase methods, explicitly call out the -r -A and -o 2026-05-17 00:41:10 -04:00
Christopher Sean Morrison 49ff35acac cleanup description, get rid of /bin/ed assumption 2026-05-17 00:39:24 -04:00
Christopher Sean Morrison 9d55e4e9d3 document the -h -v options 2026-05-17 00:33:09 -04:00
Christopher Sean Morrison 47629c22b6 include examples 2026-05-17 00:32:22 -04:00
Christopher Sean Morrison b5ac548305 document the long opts 2026-05-17 00:30:06 -04:00
Christopher Sean Morrison a1e0f612af add basic description and example 2026-05-17 00:28:15 -04:00
Christopher Sean Morrison 78d783ef1d do same, document brep selection subcommand 2026-05-17 00:26:41 -04:00
Christopher Sean Morrison 52f7cf0c5e document actual brep intersect subcommand arguments 2026-05-17 00:23:46 -04:00
Christopher Sean Morrison a77d8f508d document all the brep subcommands 2026-05-17 00:18:46 -04:00
Christopher Sean Morrison ecdd5ffbc6 add simple bot_sync example 2026-05-17 00:15:45 -04:00
Christopher Sean Morrison 6785880257 add simple flip example 2026-05-17 00:14:53 -04:00
Christopher Sean Morrison 89ff3c36e6 expand options section instead of packing into description 2026-05-17 00:13:17 -04:00
Christopher Sean Morrison c586bffb1e better area example 2026-05-17 00:09:54 -04:00
Christopher Sean Morrison 52bf6a240d document all analyze subcommand synopses separately 2026-05-17 00:07:20 -04:00
Christopher Sean Morrison 588227acec update to ef7b75463308b6c7c87a244b475cb7acb0359700 to get geogram update, update patching and clean rules 2026-05-16 17:14:33 -04:00
Christopher Sean Morrison c034687c0b fix error when build dir happens to have an adoc matching something being built.
in my case, happened to have a copy of an adoc in the build dir, and it 'exists' so the build logic added the file name as-is, later resulting in an error when being run in another location.  we need to expand out the source-relative path, and presumably need the handle full path overridsies.
2026-05-16 00:21:55 -04:00
Christopher Sean Morrison 4e3c221153 add a manpage validity check.
that every libged command has a page, has all expected sections, and options are documented
2026-05-15 22:10:51 -04:00
Christopher Sean Morrison 26ca9d7b67 make sure _USE_MATH_DEFINES is not already defined 2026-05-14 19:28:58 -04:00
Clifford Yapp faa869a748 Update ttcp to work on WIN32
Also added a regress-ttcp script to try and exercise things.
2026-05-12 12:45:42 -04:00
Clifford Yapp 3739beca9d Re-engineer the facetize pipeline for more robust behavior
This commit turns on work attempting to improve facetize outcomes on CSG
boolean hierarchies using implicit solids.  A number of elements added to librt
and libnmg in previous commits are needed to achieve these results:

1. Improved behavior with abs/rel/norm tolerance settings.

It has long been known that various BRL-CAD primitives react poorly to
facetization tolerance settings that vary appreciably from the default values.
This had to do with a combination of lack of guards for extreme inputs (for
example, tol norm 0.000000001 would result in certain primitives subdividing
beyond levels we could handle - and even if they had somehow succeeded, the
number of triangles produced would be unusable.)  The new logic both adds
clamping guardes for extreme values to limit how refined things can get and
implements various improvements to the tess algorithms themselves.

2. Improved triangulations for planer faces with non-linear boundaries

NMG typically produced "triangle fans" for such faces, with all triangles
sharing a single vertex on the outer polygon.  This functioned but was usually
not the cleanest triangulation option available - the new logic leverages other
BRL-CAD functionality to produce CDT triangulations of those polygons.

3. Corrections to various surface area/volume analytic formulas and methods

When performing validation of tess output meshes against the original
primitives, we discovered various errors and limitations in our analytic
functions (when a triangle mesh and the primitive differed widely, we needed to
determine whether the triangulation was at fault or the CSG primitive wasn't
reporting itself correctly.)

4. Improved raytracing-based sampling for complex area and volume calculations

Many of the more complex solid shapes like TGC do not have analytic solutions
for surface area and volume - in those cases, we have leveraged the
Cauchy-Crofton sampling methods first implemented by Sean Morrison for the
rtsurf tool to generate converging numerical estimations we can use as control
values to check BoT output properties.

5. Maturing and wiring in the "perturb" methodology for clearing parallel faces

A long standing problem with facetizing CSG trees (and a known problem with the
Boolean evaluation problem industry wide) is an operation involving co-planar
faces.  This is mathematically very difficult to resolve, and even when a
library like Manifold can "handle" it the output is not necessarily what is
expected.  In earlier work we had observed "sliver" triangles in areas the
librt raytracer said should be empty.  In prior work we had added
post-processing steps to clear these faces with some success, but a recent
update to the latest version of Manifold exposed a weakness in that approach.

Newer Manifold versions use double rather than float for internal storage, and
that means BRL-CAD primitive meshes that had previously been forced to act
co-planar in narrow tolerance situations are suddenly being handled as fully
distinct "close" faces.  This is not in fact wrong, although it looks like it
to a casual inspection - the BoT being produced is accurately reflecting the
low level geometry description.  It is the CSG raytrace that is discarding the
very tiny "solid" segments being returned by the almost co-planar faces, and
producing sometimes startling visual and hit behavior differences between a BoT
conversion and the CSG original.  This is also prominently seen in the
Cauchy-Crofton surface area calculations, where the BoT and CSG answers
disagree due to the CSG boolweave raytrace discarding small segments the BoT
intersection keeps. Indeed, the CSG surface area calculation is also "wrong"
due to shallow incident angles resulting in segment lengths between the close
planes being long enough to keep.  In effect, close ARB planes are
demonstrating view dependent behavior when they are being subtracted at
distances close to the BRL-CAD distance tolerance.

To achieve the "right" answer here - i.e. a BoT that visually matches what a
CSG raytrace would show - we detect when those mismatches occur and
automatically "bump out" the faces of the subtraction arbs.  We also adjust
non-subtraction solids a little (when they have implementations of the perturb
callback) to help avoid these problematic interactions.  Historically this is
what we have told modelers to do manually to avoid failing boolean operations.
With this improvement, both problem detection and correction (when possible)
should be handled under the hood.

Note that even this improvement does not handle *all* cases.  In situations
where a CSG expression results in a tiny sliver geometry, facetizing,
area/volume calculations and even CSG raytracing itself may do unexpected and
different things that result in the output mesh disagreeing with the source CSG
volume.  In those cases however the recommendation is for the modeler to
revisit the original CSG description and try to determine what the modeling
intent was - many times these sorts of failures are the result of an actual
error in the original description.
2026-05-11 16:15:19 -04:00
Clifford Yapp a6d21c4c42 No longer need the Geogram status line 2026-05-11 16:12:09 -04:00
Christopher Sean Morrison bdcc4b63f6 update to get latest bext mac fixes 2026-05-11 12:00:18 -04:00
Clifford Yapp f2f24f70af When we can, use libged dm cmd for MGED dm cmd implementation
MGED's dm has more subcommands than libged's, but when we can use the libged DM
command prefer it.
2026-05-11 10:48:20 -04:00
Clifford Yapp ded434e9b3 Adjust MGED tk grid setup for quad view 2026-05-11 10:44:11 -04:00
Clifford Yapp 770cd09e46 Add support for adaptive zclip calculating 2026-05-11 10:42:39 -04:00
Clifford Yapp 328356eb54 Shouldn't be looking for Geogram anymore 2026-05-09 15:25:04 -04:00
Clifford Yapp bff64927fa Implement Unix-style rm per deprecation plan 2026-05-08 17:35:22 -04:00
Clifford Yapp d56c893b85 Have libged glob cmd use librt db glob 2026-05-08 17:34:20 -04:00
Clifford Yapp 6d64cc9d37 Define a librt comb glob using the libbu API. 2026-05-08 16:47:14 -04:00
Clifford Yapp 4ee1f15dae Flesh out the libbu glob API. 2026-05-08 16:29:12 -04:00
Clifford Yapp 0d7a95b32a We will need new function to target for chull deprecation - add. 2026-05-08 15:43:24 -04:00
Clifford Yapp af1c255069 Hmm. Still had some users of SMALL - update to SQRT_SMALL_FASTF 2026-05-08 15:41:12 -04:00
Clifford Yapp 04d0dffbbc Remove a few old deprecated vmath.h macros, old nmg deprecation 2026-05-08 15:24:44 -04:00
Clifford Yapp 049bf97c4d We want to avoid visual artifacts - go with 32 bit depth 2026-05-08 15:17:03 -04:00
Clifford Yapp fad7c8aa5e Respect -a dm type override when launching MGED 2026-05-07 22:29:44 -04:00
Clifford Yapp f88d25aa57 Check for 6.9 rather than 6.0 Qt 2026-05-07 13:47:33 -04:00
Clifford Yapp 6adcdf62dd Aaand MSVC didn't like the clang fix. Try an enum 2026-05-07 12:14:59 -04:00
Clifford Yapp 2ab21fb89f Clear -Wunused-lambda-capture error on OSX 2026-05-07 11:04:28 -04:00
Clifford Yapp 858ccc4f8d Only deiconfiy if the dm Window is a toplevel window - it doesn't work otherwise 2026-05-07 10:59:34 -04:00
Clifford Yapp e4b20751dd Early work on a Qt widget for sketch editing
One thing we will eventually need if we're going to have a CSG Qt geometry
editor is a way to interact with sketches.  There are a couple of Tk widgets
MGED and Archer use for this purpose, but we don't currently have a Qt
solution.  Stash some exploration of ideas on how to got about exposing such an
ability in a way qged could eventually use.
2026-05-07 10:47:32 -04:00
Clifford Yapp 547bc0b6ad Stash some more of the librt edit work (focusing on pipe constraints). Not wired into MGED. 2026-05-07 10:46:42 -04:00
Clifford Yapp e3a54f5352 Use OpenGL wireframe rather than fast path for tests
Unsurprisingly in retrospect, there are pixel differences between the fast
wireframe path and the proper OpenGL swrast version - use the full version for
the image tests so we match.  Should add a test specifically for the fast path
as well, once the dust settles, but that can wait for the more substantial
drawing logic rework to land first (post 7.44) so we won't have to keep
updating another image.
2026-05-07 09:51:54 -04:00
Clifford Yapp 5a27333586 Add some work on improving QGED wireframe speeds
One of the drawbacks of the swrast osmesa-backed 3D rendering pipeline
was it was significantly slower (2x-3x) than the X backend for wireframe
only rendering.  These changes implement a fast path in the style of the
X backend for swrast, as well as trying to address some other potential
bottlenecks in the qged drawing pipeline.  Speeds now should be
reasonably close when using the fast mode.  This was the last major
reason to prefer X to swrast for rendering, so we should be close now
to being able to retire the X libdm completely in favor of swrast (it
does shaded mode, albeit slowly, so it is more capable than X.)
2026-05-07 06:58:21 -04:00
Clifford Yapp 4fc5cc8428 Just disable building these for now 2026-05-06 22:29:24 -04:00
Clifford Yapp b3b8fdba1c Bump bext SHA1 again working on bullet3 MSVC issues 2026-05-06 19:55:26 -04:00
Clifford Yapp 8d5ada2d73 Bump bext SHA1 2026-05-06 12:53:58 -04:00
Clifford Yapp 97cf0b6857 Keep simulate tests off for now 2026-05-06 09:00:10 -04:00
Clifford Yapp 7542aa6504 Fix include, bump bext, make bullet missing be non-fatal 2026-05-05 14:50:02 -04:00
f4alt 927acad3a2 fix callback recursion counter 2026-05-05 14:35:12 -04:00
Clifford Yapp 1e172dbeb4 Bump bext SHA1 to include bullet3, enable by default. 2026-05-05 14:01:51 -04:00
Clifford Yapp 9c222511a5 Per suggestion from Sean, add support for single-vector plane specification to rt -k as well. 2026-05-05 13:01:47 -04:00
Clifford Yapp 0d69d1d6c7 See if we can use GL_FLAT for better performance with swrast wireframes
This will need an osmesa tweak as well, but getting the BRL-CAD side change in.
2026-05-05 12:10:35 -04:00
Clifford Yapp a766b00a40 Enhance rtwizard, fbserv and remrt/rtsrv
We make some add-ons to the IPC protocols and mechanisms for fbserv to
better support running multiple rtwizard instances at the same time -
this was what had been stopping us from being able to hook up our
rtwizard test targets.  Running distcheck means firing off multiple
builds, each of which may simultaneously try to start their own rtwizard
tests - even if we forced them to be serial within a single build, that
was no guarantee of contention avoidance across multiple builds.  Now,
however, there is an option for fbserv to generate a key clients must
use when communicating in order to have fbserv accept their input - that
allows us to avoid confusion and incorrect images in the chaos of
multiple parallel builds.

We enhance remrt/rtsrv the same way, as well as getting them to be
portable to Windows.

Also, we have enhanced libpkg to support using pipes for IPC, in
addition to TCP.
2026-05-05 10:33:51 -04:00
Clifford Yapp 699bde1c76 Document point + normal specification option for rt -k cutting plane 2026-05-05 10:33:25 -04:00
Clifford Yapp 0c20db05d3 Add a x,y,z,nx,ny,nz plane specifying form to the rt -k cutting plane option 2026-05-05 10:27:11 -04:00
Clifford Yapp 663d324056 Put the long opts in the actual option descriptions 2026-05-05 10:11:00 -04:00
Clifford Yapp d111f87d04 Keep the b=1 avoidance guard for pure black in benchmark
When trying to match rtwizard render outputs, it seems the bench/ref/m35.pix
image didn't have a guard disabling the b=1 bump when it was originally
rendered.
2026-05-05 10:05:36 -04:00
Clifford Yapp feca851e16 Initialize mdl_min as well as mdl_max 2026-05-05 10:02:44 -04:00
Clifford Yapp e542a120aa Mention long opts in rt usage 2026-05-05 09:55:51 -04:00
Clifford Yapp 0ad52ff7be Replace system Geogram dependency with local subset
Geogram's cross-platform portability is somewhat spotty - they use per-platform
definitions, and you have to define a new set for each environment you want to
run in.  We are using them for repair and remesh, without pulling in any of the
more elaborate dependencies they optionally use.  Rather than trip over portability
issues, it proved practical (after a lot of iterations) to boil down the code
to a more focused subset.  We did try to re-implement, but although that was more or
less feasible for the repair logic there are a LOT of subtlties to the
remeshing algorithm that proved rather confounding.  "Strip it down to the core
we need" proved to be the safest way forward in the end.

While we are at it, we also have taken a stab at implementing a "uv unwrap 3D
polygon" method for hole filling repairs to try for increased robustness - in
theory this should handle some cases that would otherwise be a bit difficult to
process.  We are also explicitly scoping "bot repair" to focus on getting a
manifold, rather than worrying about whether that manifold satisfies the lint
criteria like "no long superthin triangles" - that's up to post-processing.  An
"ugly but manifold" BoT is still viable for booelan evaluation, which is one of
our most important appliations, so we shouldn't be rejecting anything that we
can use for such an operation as an invalid repair.

To try to "clean up" an ugly BoT, combinations of repair, remesh and bot
decimate -f can be effective for some inputs - however, be warned that if you
need to do multiple remesh/decimate cycles you want to decimate first before
feeding a remesh output back in for another round of remeshing.  With the
GenericTwin 4003 example, the following proved reasonably effective:

bot repair 4003.1.t0
bot remesh 4003.1.t0 4003_fine.bot
bot decimate -f 100 4003_fine.bot 4003.bot
bot repair 4003.bot

To clear the one small visual artifact (not a manifold issue) you can
remesh again, but at the loss of some edge sharpness.  Probably more we can
experiment with here going forward.
2026-05-04 16:54:22 -04:00
Clifford Yapp db463b2a9e Missed a file 2026-05-04 14:01:45 -04:00
Clifford Yapp c2f0f446b4 list libbg for libnmg 2026-05-04 12:45:03 -04:00
Clifford Yapp 46fa871d00 Stash more in-progress simulate cmd work. 2026-05-04 12:36:05 -04:00
Clifford Yapp dbcbe40653 db_read is already declared in rt/db_io.h - shouldn't need it here. 2026-05-03 00:51:45 -04:00
Clifford Yapp 7e63e94b4b More edit command work
The idea is to have the edit command use primitive-supplied descriptions
to figure out what parameters are available to edit for a given
primitive type and how they may be manipulated.
2026-05-03 00:04:31 -04:00
Clifford Yapp fb91b13816 Not sure how useful it'll be but try adding support for private library specification. 2026-04-30 23:38:31 -04:00
f4alt da8d194bd9 add empty dispatch trigger for manual testing 2026-04-30 16:52:00 -04:00
Clifford Yapp ffda7c0f6f Shallow copy doesn't duplicate vls string. 2026-04-30 14:27:53 -04:00
Christopher Sean Morrison e2d94c41f7 and full circle, re-introduce linker test (this time without the pretend-lib hack) for msvc since we need to just pass the full fuzzer flag to cl 2026-04-30 07:38:23 -04:00
Christopher Sean Morrison c9743f772b significantly rework fuzzing logic to be more robust, and fallback so it can still always run 2026-04-30 00:51:26 -04:00
Clifford Yapp 5fa1dd9ee6 Fix off-by-one in libicv's pixel writers
Make a few fixes to libicv writing:

libicv pixel writers (src/libicv/fileformat.c):

icv_writeline / icv_writepixel accepted y == height (and x == width) as
in-bounds, then wrote one row / one pixel past bif->data. Bound checks
tightened from > to >=.

libicv PNG writer (src/libicv/png.cpp):

Dropped static from png_color_type — process-wide storage was a race
between concurrent png_write calls and could flip the IHDR color type
mid-call.

Error path called png_destroy_read_struct on a write-side png_ptr;
switched to png_destroy_write_struct.

text_chunk.text_length was set to the JSON byte length with
PNG_TEXT_COMPRESSION_NONE; libpng requires 0 here. Now zero, with a
comment.

bif->height == 0 would underflow bif->height - 1 (size_t) and walk the
heap. Row loop guarded.

rt BUFMODE_SCANLINE invariant (src/rt/view.c)
BUFMODE_SCANLINE updates scanline[].sl_buf and sl_left without
RT_SEM_RESULTS, relying on each parallel chunk (per_processor_chunk =
width) covering exactly one scanline. That holds only when cur_pixel's
starting value is scanline-aligned. With -b X Y where X != 0, pix_start
= Y*width + X is not aligned, chunks straddle scanlines, two CPUs race
on the same row, and the do_eol flush can bu_free sl_buf while another
CPU is still writing it.  Added a guard at mode selection.
2026-04-30 00:06:15 -04:00
Clifford Yapp e1f4ae6ce2 Re-enable long options on rt
Fix regress-repository complaints, address AmbientIntensity issue and
fix handling of certain -c configurations.
2026-04-29 20:54:05 -04:00
Clifford Yapp f62ea391b4 See if unsetting CMAKE_TRY_COMPILE_TARGET_TYPE helps. 2026-04-29 16:06:11 -04:00
Clifford Yapp 40fc3a6590 Make a design pass to improve and simplify new clone options
Worked with Sean and AI to clean up and simplify the new pattern options on
clone.  This should improve both clarity and usability while simplifying and
cleaning up the implementation.
2026-04-29 14:56:25 -04:00
Clifford Yapp 2038413a88 Fix if conditionals for fuzz logic 2026-04-29 12:59:01 -04:00
Christopher Sean Morrison 831937ae6a looks like a typo, should be wsf since that's what we checked for 2026-04-29 02:06:24 -04:00
Christopher Sean Morrison 75f349b3dd be a little more richly descriptive about fuzzing status 2026-04-29 01:59:33 -04:00
Christopher Sean Morrison 2b4aa0f07e move bench before doc so all TARGETS are defined before we process docs 2026-04-29 01:47:57 -04:00
Christopher Sean Morrison 36cc842c61 variable just to make it longer or.. 2026-04-29 00:48:59 -04:00
Christopher Sean Morrison e58543571f animmate invokes the tool, but provide an example anyways 2026-04-29 00:48:59 -04:00
Clifford Yapp d85ac43970 make a note to check if arb editing is watching for non-standard point ordering. 2026-04-28 23:56:40 -04:00
Clifford Yapp 7e465a1fbf libbu: remove O_TEMPORARY from Windows mkstemp
O_TEMPORARY on Windows tells the OS to automatically delete the file
when the last file handle referencing it is closed. If we then call
fclose(fp), the OS deleted the file - not always what we want.

This fix removes O_TEMPORARY -  temp file cleanup is already handled
correctly by the atexit-registered temp_close_files() function that
calls bu_file_delete(), so O_TEMPORARY was redundant and harmful.

This should allow us to enable a never-fully-completed test for
rt_datum.
2026-04-28 23:05:05 -04:00
Clifford Yapp 66a3498a9b Revert "Enable long options in rt command option handling."
Whoops, lost track of which branches I had and hadn't tested.  This one
isn't ready yet - revert.

This reverts commit 7439e7c2f8.
2026-04-28 20:07:24 -04:00
Clifford Yapp a5dcd9d467 Fix DBI cache format-mismatch infinite recursion and test cache isolation
1. src/libged/dbi_state.cpp - infinite recursion / segfault on format mismatch

   When dbi_cache_open() detects that the on-disk CACHE_CURRENT_FORMAT does
   not match the format file, it calls dbi_cache_clear() (which removes only
   the per-file LMDB directory, NOT the format file) and then recursively
   calls dbi_cache_open().  The recursive call reads the same stale format
   number, hits the mismatch again, and recurses indefinitely.  The result is
   a stack overflow and segfault - exactly what was observed when the main
   branch test suite ran after a newer-format cache had been written to the
   user's real cache directory.

   Fix: call bu_file_delete(dir) to remove the stale format file immediately
   before the recursive dbi_cache_open() call.  The recursive invocation then
   finds no format file and writes a fresh one with CACHE_CURRENT_FORMAT,
   breaking the cycle.

2. Correct tests to use a local cache
   src/libged/tests/draw/faceplate.cpp
   src/libged/tests/draw/aet.cpp
   src/libged/tests/test_select.cpp

   These faceplate draw tests did not redirect BU_DIR_CACHE to a local scratch
   directory.  All other draw tests (basic, lod, quad, select, bsg_parity,
   lod_crossrun) already use a private per-test cache dir.  Without
   isolation, any format mismatch in the real user cache triggers bug #1.
2026-04-28 19:43:27 -04:00
Clifford Yapp 7439e7c2f8 Enable long options in rt command option handling.
We have essentially exhaused the single letter options for the rt command's
option specification, and the -c 'set var=val' pattern lacks discoverability.
We've been using bu_opt for a while now - this commit translates rt's existing
option handling into bu_opt and adds long option forms for many of the options.
Eventually we'll probably also want to look at exposing long options for
variables currently only exposed via the -c mechanism, but for now the focus is
simply on migrating the existin getopt setup correctly.
2026-04-28 17:04:50 -04:00
Clifford Yapp 7f165d038a Add tree shaking for non-overlapping subtractions in librt
When we are building a CSG boolean tree, we know at the time of tree build that
any subtracted children cannot contribute to the shape of their parent if the
bounding boxes of the instances don't overlap.  We use that to cull any such
subtractions out of the tree before we start raytracing, to avoid doing extra
intersection work we know will not be needed.

For most geometry models this won't have much impact, but for pathologic cases
(a contrived example is taking our tank_car.g model, making a copy of the top
level tank car, offsetting it, and making a subtraction comb of tank_car -
offset_tank_car) being able to think out the tree can improve performance by
almost an order of magnitude.  Since it does help in those rare-but-legal cases,
we go ahead and add it as a refinement.
2026-04-28 16:23:12 -04:00
Clifford Yapp 5dd9ec906e Avoid tmp_v collision in unity building on MSVC 2026-04-28 16:22:05 -04:00
Clifford Yapp ac0a463f28 Loosen point/tri drawing mode tolerance
Now that we're getting better image diffing, it's becoming more apparent where
we weren't seeing variation.  Need to back off our tolerancing for this test,
since a fair bit of subtle variation is expected.
2026-04-28 15:51:56 -04:00
Clifford Yapp a68a6bbcd7 Stash in-progress work fleshing out the libged edit command
Still needs a lot more testing, but makes a stab at implementing the rotate and
scale modes for edit.  Consolidates on edit.cpp and utilizes the new librt
routines.
2026-04-28 15:46:01 -04:00
Clifford Yapp e15b8cb3c8 Fix libicv diff comparison to match pixdiff
The original libicv diff implementation didn't properly match pixdiff - correct
its approach.  Also add an abilty to encode scene data in PNG images to
(theoretically) allow reproducing pixel difference shotlines via raytracing
with NIRT.

imgdiff command updated with appropriate options - probably should look into
whether we can deprecate pixdiff in favor of imgdiff with a little more work.

Also, now that libicv should be producing more correct diff results, add a
icv diff subcommand to the icv utility (that was where I went looking to use
this capability first.)
2026-04-28 15:30:47 -04:00
Christopher Sean Morrison 63ecf0c1e5 update the saveview+loadview pair so they're in sync 2026-04-28 00:51:51 -04:00
Christopher Sean Morrison 2d0c722702 expand tops manpage with all options 2026-04-28 00:30:48 -04:00
Clifford Yapp 89d1c29f9f Add libbv camera API, move LoD cache to libbu API
More drawing cleanup support work being staged.  The LoD move to libbu's
cache wrapping API should be functionally equivalent since LMDB is
backing the libbu implementation (although we're bumping the format
anyway just in case.)
2026-04-27 21:59:39 -04:00
Clifford Yapp d0df8970e5 Add a libdm dlist sensor API
Staging part of the work from another effort to try and improve our
drawing stack.  This isn't wired to anything yet - just setting up
for work to come.
2026-04-27 21:04:56 -04:00
Clifford Yapp 667998ce6d More removal of unneeded resource pointers from functions
This lets us eliminate quite a few additional instances of rt_uniresource in
the code.
2026-04-27 15:13:32 -04:00
Clifford Yapp 0718165c44 Set bot exterior bot type to RT_BOT_SURFACE explicitly. 2026-04-27 14:35:05 -04:00
Clifford Yapp 48a267b06e Hide more of the rt_i opaque struct entries 2026-04-26 22:19:49 -04:00
Clifford Yapp d04c6cfd19 Update CMakeLists.txt 2026-04-26 21:32:48 -04:00
Clifford Yapp 33eb7afe0e Downstream use has been replaced by MOOSE - remove 2026-04-26 21:21:32 -04:00
Clifford Yapp 6498596532 Remove struct resource from the db I/O functions
We don't actually need the resp resource when we're reading and writing
- it's critical uses are in the raytracing code, not I/O.  Remove the
resp parameter from the I/O functions and adjust the code accordingly.

We have to be careful here - most functions take the resource pointer as
their last argument, and the calling conventions of C should allow
binaries compiled against older lib versions to run, but there were a
few cases where struct resource was *not* the last argument.  In those
cases we deprecate the old functions and make the wrappers around new
versions, updating our code to call the new versions.  In most/all cases
we'll revert to the old name once deprecation is complete - doing it
this way to try and minimize disruptions during transition.

We have also retired re_directory_hd and re_directory_blocks from the
struct resource container in favor of the db_i internal's
dbi_directory_hd and dbi_directory_blocks.  These weren't really public
facing resources to begin with, and if I'm interpreting some of the
comments in the rt_i code correctly I think we may have actually fixed a
structural problem with memory management there.

This is a first step towards either completely eliminating struct
resource or (more probably, at least in initial stages) making it a
private, hidden librt managed function of an upgrade to the struct
application data type.  The latter will require shifting away from the
current explicit user malloc/free of struct application to librt
provided create/destroy routines for the struct application container
(or preferably something with a better name like struct
rt_thread_worker_data - struct application, in addition to being way too
generic, sounds like a single global resource along the lines of Qt's
QApplication, when in reality it's the per-thread container responsible
for our ability to handle data in multi-threaded raytracing...)

This was actually a good case study in both the utility and limitations
of AI in a refactoring case of this sort.  It correctly identified that
struct resource wasn't critical in I/O operations, and did most of the
work to remove/update logic, but it made a number of mistakes adjusting
the APIs.  For example, it noted that the majority of internal I/O calls
used NULL matrices, so it thought it could eliminate that parameter as
well as the struct resource parameter.  There were a few other cases of
a similar nature, as well as a number of other adjustments and cleanups.
2026-04-26 14:53:41 -04:00
Christopher Sean Morrison 16766cfe85 scrub source references. lets stay higher-level and only mention products. 2026-04-26 03:04:40 -04:00
Christopher Sean Morrison b7df9a1fc1 add prelim summary of all the main algorithms and features in BRL-CAD 2026-04-26 03:04:40 -04:00
Clifford Yapp b7ecb1d3a4 Need dbip when actually using rt_obj_import/rt_obj_export 2026-04-25 23:43:03 -04:00
Clifford Yapp cac618524c Don't hard fail if we don't find GDAL and STEPCODE - just message and disable 2026-04-24 14:46:45 -04:00
Clifford Yapp c219b05dcb Stash a Claude Opus 4.7 analysis of struct resource removal prospects. 2026-04-22 23:06:11 -04:00
Clifford Yapp f858258a4a First stages of making rt_i internal info actually internal
The pattern here is similar to db_i, and the solution is similar as well
- make an opaque internal struct to hold the "opaque" rt_i entries.  For
the statistics we make a struct and group them there.

This first pass intentionally doesn't handle all of the "OPAQUE"
entries - there are a few that need more careful study due to how
they are being used in the BRL-CAD code.
2026-04-22 22:01:50 -04:00
Clifford Yapp 9bf6a6eb26 Simplify algorithms and control options for bot exterior 2026-04-22 21:02:04 -04:00
Clifford Yapp 75c59f7896 Going 1 order below (M_PI / 360.0) is too much for NMG to handle - document that this limit is quite sensitive and important. 2026-04-22 20:02:45 -04:00
Clifford Yapp 4a2be9e154 Add a bot exterior subcommand that builds a set of exterior triangles
This is still being tested, but it is now interesting enough it's worth
committing.  Using raytracing for visibility testing, we can build up a set of
triangles from the bot that are "exterior" triangles.

Although it is not on by default, also checkpointing some logic (currently
using OpenVDB but I'm not sure that's actually necessary for this) to do a
"flood fill" based test for whether a triangle is exterior.  For that
definition of "exterior", the test is not "can we see it" but "would it get wet
if we submurged the model in water."  What you want to define as "exterior"
will be application dependent, so options will be available to control which
interpretation is used.
2026-04-22 16:31:58 -04:00
Clifford Yapp 5a6b44b2b7 Add include for bu_setprogname 2026-04-22 12:27:38 -04:00
Clifford Yapp ffd7f4e7f3 Use libbu tbl API instead of directly using fort 2026-04-21 22:40:55 -04:00
Clifford Yapp f577b1d002 Loosen the test thresholds on the meshing dependent drawing tests. 2026-04-21 22:40:19 -04:00
Clifford Yapp 88bb29551c Use approximate matching - seeing 2 pixels off in the basic v20 test on OSX. 2026-04-21 21:40:58 -04:00
Clifford Yapp 5cd4f7e967 Hmm. Is Windows not converging as quickly for some reason? 2026-04-21 20:20:29 -04:00
Clifford Yapp 458c82e708 Make crofton target total a settable variable, bump it a little 2026-04-21 19:44:00 -04:00
Clifford Yapp fa6bbc12bb Centralize signal.h include
OK, that's enough fun with the signal.h XCode popping up randomly.
Replace BRL-CAD uses of signal.h with one include from bu/interrupt.h
where we can deal with this in a single shot.  We'll keep the
workarounds in the stand-alone headers like libtermio.h, but most of
the includes we can consolidate.
2026-04-21 19:39:10 -04:00
Clifford Yapp 3d89e85ad7 Add ebm and vol tess work. 2026-04-21 17:00:02 -04:00
Clifford Yapp 07479dc2c0 Add --raytracing mode to lint tool 2026-04-21 16:59:14 -04:00
Clifford Yapp f0344813cf Whoops, not ready to enable this one yet. 2026-04-21 16:17:29 -04:00
Clifford Yapp 7dfbc16ee8 Add testing tools for tess work
These are used to exercise per-primitive tess routines systematically,
collecting timing and information.  The full facetize pipeline is more complex
in order to be fault tolerant - these let us run the core routines directly.
2026-04-21 15:46:34 -04:00
Clifford Yapp a69bdaccfd Add remainder of primitive tess/area updates, wire volume and surface area funcs into functab 2026-04-21 15:42:52 -04:00
Clifford Yapp 2df6e45ad3 Adjustments to PIPE tess routines 2026-04-21 15:37:50 -04:00
Clifford Yapp 20a3c52e53 OSX spotted it - point2d_t shouldn't be used like that with std::vector 2026-04-21 15:12:06 -04:00
Clifford Yapp 619331a6ed Update hrt tess code, add perturb 2026-04-21 14:49:56 -04:00
Clifford Yapp da503e2f33 Add support for intermediate fast-path NMG assembly 2026-04-21 14:44:56 -04:00
Clifford Yapp dd5f12a76b Add rt_comb_volume and rt_comb_surf_area using Cauchy-Crofton 2026-04-21 14:42:42 -04:00
Clifford Yapp 183ebdaf9d Update crofton to return the total number of ray-surface crossings accumulated 2026-04-21 14:41:31 -04:00
Clifford Yapp 3e4d7f2413 Put back deprecated notices 2026-04-21 14:38:56 -04:00
Clifford Yapp 79f386e34e Add rt_bot_csg_miss_check sampling function. 2026-04-21 14:38:02 -04:00
Daniel Rossberg 7546bf03cf Merge branch 'main' of https://github.com/BRL-CAD/brlcad 2026-04-21 19:42:18 +02:00
Daniel Rossberg 44de64b755 declared some more local stuff as static
or removed the function entirely, because it was an unused dummy
quell multiple definition conflicts when linking the libraries statically
2026-04-21 19:39:30 +02:00
Clifford Yapp 2a46778c72 Add tess updates for ETO primitive
Similar to those made for TOR - limit triangle explosions due to extreme
tolerances, support self intersection cases when producing triangle meshes.
2026-04-21 13:00:36 -04:00
Clifford Yapp f1603e488d Updates to tess routines for EHY, EPA, HYP, RHC and RPC
Similar updates to these - limits to prevent infinite recursion and bad
behavior at extremes.  HYP previously wasn't generating a valid output mesh -
we should be producing a good one now.

Also update area and volume calculations as appropriate.
2026-04-21 10:54:02 -04:00
Clifford Yapp de27f9007f Adjustments to the ARS tess routine 2026-04-21 10:41:07 -04:00
Clifford Yapp 91961d006f Just use the tessellated ARBN for surface area and volume analytic answers. 2026-04-21 10:38:42 -04:00
Clifford Yapp 96e29bdb6a Add updates for ell, tgc, tor and NMG triangulation
This is a focused commit of the primitives with tessellation changes that have
an impact on our libged drawing tests (TOR, ELL, TGC and planar primitives
using the NMG CDT face triangulation.)  We're commiting these four updates
together so we only need to update the drawing images once.

The changes are summarized as follows:

libnmg - use detria to get a better face triangulation than the "all triangles
sharing a single vertex" we were getting previously.  The cleaner triangles
both produce better wireframes and appear to assist with boolean evaluation
(better spatial separation.)

ell - added guards against infinite recursion and "triangle bombing" when
tolerance settings are extreme.  Use Cauchy-Crofton sampling for surface
area (no closed form solution.)  Added perturb callback function.

tgc - guards against extreme triangle counts, improvements to algorithms
to better handle difficult input vector combinations, improvements to
surface area calculations.

tor - added guards against infinite recursion and "triangle bombing" when
tolerance settings are extreme.  Support facetizing cases where the radius goes
zero or negative - in that case we return the outer surface.  (Not technically
valid definitions, but it is possible to create them and the failure mode was
catastrophic previously.)

Updated drawing test images to reflect new triangle outputs.
2026-04-21 10:00:23 -04:00
Clifford Yapp 878f52244a Handle 3 hit point grazing case in TGC
In the specific case of 3 hits returned from a TGC, we can discard the middle
point.  Counts higher than 3 indicate a problem with either the prep filtering
(allowed an invalid TGC definition through) or the root solver itself.
2026-04-20 15:03:47 -04:00
Clifford Yapp b20d9b7c59 Get the tolerance clamping utility functions in place
For a lot of the primitives, we need to prevent exteremly small tolerances from
causing cascading triangle generation that results in unusable geometry (and
usually hangs or crashes the program as we run out of memory.)  These utility
routines are intended to centralize the defaults, and allow environment variable
override if the standard limiters don't work for a particular application.
2026-04-20 11:31:18 -04:00
Clifford Yapp 56b03ac259 Add lint test and helpers for non-standard ARB8 ordering
Facetize, surface area, etc. will sometimes show odd results for ARB*
primitives if they do not follow the standard convention for defining points -
ARB8 defines an order for encoding duplicate points, and if that order isn't
followed assumptions made by some of the routines break down.  For some of the
metrics like surface area and volume we can recover with the convex hull as
long as we're not dealing with the newly supported concave cases, but at the
end of the day these aren't encoded the way they are supposed to be. (A few of
our sample models do have a few arbs that trigger this test, so this isn't
theoretical.)
2026-04-20 10:56:02 -04:00
Clifford Yapp 0f821dad59 Implement more libged "exists" command options
The "exists" command is intended to map to the BSD "test" command
roughly the same way "search" maps to the BSD "find" command.  We had a
more or less stubbed version of this file - fill it out with various
geometry specific types and checks.
2026-04-19 21:07:50 -04:00
Clifford Yapp 1746d669b9 More OSX complaining about deprecated 2026-04-19 07:10:37 -04:00
Clifford Yapp b1c5c99fd0 Apparently OSX clang is picky about @deprecated 2026-04-18 22:48:59 -04:00
Clifford Yapp 4220d5c8de Update copyright headers - it's 2026 2026-04-18 22:27:38 -04:00
Clifford Yapp 728627f981 Adjustments to libged-static + plugin system build logic
We had the shared library target for libged using the correct CMake
mechanisms for collecting plugin sources and definitions, but not the
static version.  We were still building a static version, but it was
missing most of the actual logic - got a report from Daniel Rossberg
that trying to link to libged.a resulted in many failures such as:

/bin/ld: libbrlcad.so: undefined reference to `__ged_cmd_ptr_fbclear_cmd'

Also observed the static library for libged was much smaller than the
shared, which suggested missing logic.  Was able to confirm locally -
libged.a was 17M vs. 33M for the shared version.With the above fixes the
libged.a static size is now 81M.
2026-04-18 22:12:49 -04:00
Clifford Yapp 4c0ab85d65 Fixes to BSPLINE→BREP conversion
Bugs fixed in rt_nurb_brep

CV index transposition — SetCV(k, j) → SetCV(j, k). With j iterating
s_size[0] (u) and k iterating s_size[1] (v), the original code silently
swapped u/v, producing geometrically wrong surfaces on any non-square
control net.

Rational weights dropped — Surface was constructed with is_rat=true but
CVs were always set via ON_3dPoint, discarding the homogeneous w
coordinate. Now uses ON_4dPoint(Xw, Yw, Zw, w) for rational surfaces,
matching the homogeneous convention already used by the BRL-CAD snurb
storage.

First surface never got an outer loop — if (findex_before < 1 || ...) is
always true for i=0 (no faces exist yet), so NewOuterLoop was
unconditionally skipped for the first surface. Fixed to if (findex_after
== findex_before).

Unconditional verbose logging — 6 bu_log calls fired on every conversion
regardless of outcome. Now a single diagnostic log fires only when the
output BREP fails IsValid.

New C-callable in-place converter: rt_nurb_to_brep

/* Converts a loaded ID_BSPLINE rt_db_internal to ID_BREP in-place.
 * Returns 0 on success; -1 on failure (original left unchanged). */
int rt_nurb_to_brep(struct rt_db_internal *ip);

Declared in the new include/rt/primitives/bspline.h (installed alongside
hf.h/pg.h, pulled into raytrace.h), with C linkage so it is callable
from plain C translation units.  Pipeline wiring

table.cpp — ID_BSPLINE.ft_brep was NULL; now set to rt_nurb_brep.
Enables brep_conversion() and any other ft_brep-driven path to handle
BSPLINEs.

dbupgrade.c — Adds an ID_BSPLINE migration block calling
rt_nurb_to_brep. Failure is non-fatal (logs a warning and falls through
to write the original BSPLINE), preserving the invariant that old
BSPLINE I/O remains functional even if conversion fails.
2026-04-18 18:01:18 -04:00
Clifford Yapp 329418985c add an ars bicone example to primitives.asc 2026-04-17 15:32:40 -04:00
Clifford Yapp 87a7607a89 Add a trimesh volume calculation function 2026-04-17 15:27:36 -04:00
Clifford Yapp 0ff8b7aace Handle memory stability requirements when using detria 2026-04-17 15:27:01 -04:00
Clifford Yapp 461844c095 Make sure the bg_3d_polygon_sort_ccw function is working from the point centroid 2026-04-17 15:25:54 -04:00
Clifford Yapp d99810b26b Document some interesting (observed) properties of the Crofton SA
This is a really interesting corner case - havoc.g's r.wind6 region (and a few
others) have arb-within-arb subtractions that are nearly coplanar.  Crofton
analysis revealed something very interesting about how our raytracing interacts
with that case.  It turns out that the arb faces in these cases aren't *really*
coplanar - they're just close enough that for angles looking "down" on the
windows the interior thicknesses reported during raytrace are below tolerance
and boolweave culls them out.  HOWEVER, that is *not* true for all angles - if
the shotline comes in at a very shallow angle, it does get an in/out segment
that is above tolerance and a segment is returned.  This doesn't make much
difference for the volume calculation, since the segment lengths are small, but
it makes a *huge* difference for the surface area - the interior of the
"window" is now filled in for a noticable percentage of the sampling rays.  The
subtraction planes sitting right near the tolerance limit of boolweave is
essentially creating view dependent geometry behavior in the raytrace.  The
Crofton surface area calculation *does* still converge - but not to the CSG
volume answer we would expect from the subtracted arbs.

We have another new problem with this same case that also manifests in current
code.  In our original Manifold boolean evaluation these planes effectively
were coplanar, since Manifold used float internally - during facetize our
repair logic handled the interior slivers that got produced. However, we are
now working against a newer Manfold that uses double internally instead of
float.  That means we *are* reliably getting the internal faces now, and the
facetize results look completely wrong compared to the CSG raytrace - even
though it is actually *correct* per the underlying geometry description.  In
order to get a mesh that matches user expectations in this case reliably and
automtically, we're going to need to a long-wanted feature - automatically
perturbing the CSG solids before boolean operations.  Doing so can get us out
of "bad" coplanar region behavior, but we have historically had to tell
modelers to fix cases like this themselves manually.
2026-04-17 15:15:20 -04:00
Clifford Yapp d3a6827d9e Stage the new forms of rt_mk_parabola and rt_mk_hyperbola
Kinda wondering if these should just be internal to librt...
If so the public API should just be deprecated outright rather
than the new one being exposed, but needs discussion.
2026-04-17 14:26:14 -04:00
Clifford Yapp 160d1cd47c librt: add configurable Cauchy–Crofton estimator for surface area and volume
Introduce a unified implementation of the Cauchy–Crofton integral-geometry
estimator for computing surface area and volume via stochastic ray sampling.
The Crofton formula relates geometric measures to statistics of random line
intersections: surface area is proportional to the number of boundary crossings,
and volume to the accumulated chord lengths of rays through the solid. This
approach is especially useful for primitives lacking closed-form solutions or
for complex/implicit geometry where analytic formulas are difficult, expensive,
or unavailable.  It is based off of the work done originally for the rtsurf
tool by Sean Morrison.

We add rt_crofton_shoot() for operating on prepared rt_i instances and
rt_crofton_sample() as a high-level entry point for arbitrary primitives.
rt_crofton_params allows callers to control stopping criteria via
maximum ray count, equivalent-radius stability threshold, or wall-clock time
in order to support making different tradeoffs in accuracy vs performance.

Also adds standalone tests validating accuracy against analytic shapes (sphere,
RCC, tilted geometries) and regression coverage for sub-mm cases, along with
basic convergence and timing checks.

For now the tests are disabled - we need other changes not in this commit
before the tests will pass.
2026-04-17 14:01:57 -04:00
Clifford Yapp 28c3a434bd Spotted by Keith - we weren't respecting the -S flag when redrawing a previously drawn comb 2026-04-16 11:50:42 -04:00
Daniel Rossberg fe2f5cf2b5 declared some local functions as static
quell multiple definition conflicts when linking the libraries statically
2026-04-16 16:53:50 +02:00
Clifford Yapp 4d7c66226b Update qged view settings plugin for new data struct 2026-04-15 20:07:18 -04:00
Clifford Yapp 52a2895815 Don't bu_bomb if something isn't right with dbi_filepath on ebm tess 2026-04-15 13:17:45 -04:00
Clifford Yapp c01f9fd99b Appears to be fixed with the shift to libged garbage_collect (explicit global attribute saving) 2026-04-14 14:11:02 -04:00
Clifford Yapp dfce7ad961 Fix rt_ell_surf_area: PROLATE/OBLATE formulas applied to wrong spheroid types
The ell_type assignments in the EQUAL(mag_a, mag_b) and EQUAL(mag_a, mag_c)
branches were swapped — an oblate spheroid was classified as PROLATE and vice
versa, applying the wrong closed-form formula. The EQUAL(mag_b, mag_c) branch
was already correct.
2026-04-13 15:37:05 -04:00
Clifford Yapp 138a870efa Make the librt arb8 area calculation match libged's analyze version
The two implementations didn't agree, and it looks as if the libanalyze version
(what the analyze command actually uses) gives the correct answer - we can get
an independent answer from the facetize bot of an arb solid, and BoT answers
didn't agree at all with the original librt answer.
2026-04-13 13:43:10 -04:00
Clifford Yapp fbb4cb589e Correct ELL_CIRCUMFERENCE calculation 2026-04-13 12:07:49 -04:00
Daniel Rossberg a242b4a8b9 Merge pull request #230 from LorenzoSanti34/fix-element-beam-multicard
Fix ELEMENT_BEAM multi-card parsing in k-g converter:
- Fix optionsCounter not incrementing after Card 1, causing option cards (THICKNESS, SECTION, etc.) to be misrouted back to the Card 1 branch with "Too short ELEMENT_BEAM" error
- Fix local variables (eid, element) resetting on every line, causing option data to overwrite stored elements with empty data
2026-04-12 19:42:33 +02:00
Clifford Yapp e566500ab4 Update libbu opt tests for behavior adjustment
Two existing tests asserted the old fatal-error behavior for grouped
flags containing unrecognized characters:

    h_5 (-?4): ? is a known flag, 4 is not → whole token is now an
    unknown positional arg; flag variable is not set (the token is discarded
    before any flags are processed). Updated from EXPECT_FAILURE to
    EXPECT_SUCCESS_INT_UNKNOWN(..., 0).

    h_7 (-?=4): same reason — = is not a flag char, opt_process returns
    -1, whole token becomes unknown arg.

Other callers that previously checked bu_opt_parse() == -1 for this case
(gsh, nirt/diff, libanalyze/nirt) are not broken: unknown args with a
leading - are either caught by explicit post-parse checks (nirt main.cpp
already does if (argv[i][0] == '-')) or cause an error at the later
stage where the arg is consumed.
2026-04-11 08:34:41 -04:00
Clifford Yapp d8876fb06d Fix bu_opt swallowing of sub-command flags
Switching MGED to use bu_opt exposed a couple issues with bu_opt
when trying to run the conversion.sh script.

sh/conversion.sh was completely non-functional: every mged -c file.g
search . -name foo or search . -print invocation either segfaulted or
exited with a usage error before executing the GED command.

Root causes
1. NULL shortopt dereference (segfault)

opt_is_flag() and the grouped-flag descriptor scan in bu_opt_parse both
did desc->shortopt[0] without a null guard. Options declared with a NULL
shortopt (e.g. --rcfile, --no-rc) are valid and common; iterating past
them crashed.

2. Grouped-flag parse error swallowing GED sub-command flags

When opt_process() encountered -print as a separate argv token, it
correctly identified -p (pipe) and -r (read-only) as valid mged flags,
then hit -i (unknown) and returned -1 — a fatal parse error.
bu_opt_parse propagated that -1, causing mged to print a usage message
and exit before the GED command was ever run.

For MGED, this was a regression from the old bu_getopt-based parser,
which stopped processing options at the first non-option positional arg
(POSIX mode), so -print was never seen as an option candidate.
i
Changes:

    opt_is_flag() and grouped-flag desc loop: add desc->shortopt &&
    guard before desc->shortopt[0] comparison in both locations.

    opt_cnt == -1 handler: instead of freeing all tables and returning
    -1, free only the partially-built opts list, insert argv[i] into
    unknown_args, and continue — exactly matching how a fully-unknown
    option is handled. This makes search . -print, search . -name foo,
    search . -type X etc. all pass through as GED command tokens.

After the fix, sh/conversion.sh --bot --nmg share/db/*.g runs to completion.
2026-04-11 07:08:49 -04:00
Clifford Yapp bb67437a1e Add command line setting options for .mgedrc entries
Add support for MGED's command line to override select entries in the
.mgedrc file at runtime.  We do not override all of them (many are
difficult to set up as options and unlikely to be useful) but this gives
users a way to control these values at a scripting level without having
to write an .mgedrc file
2026-04-10 13:45:04 -04:00
Clifford Yapp a2a0c089e6 Add support for a sentinal that client programs can enable to detect when commands finish. 2026-04-10 12:16:14 -04:00
Clifford Yapp ff694b5ae7 Startup fixes for MGED display managers
In mged -c -a mode, respect a .mgedrc size setting.

Attempt to fix mged -c -a wgl behavior on Windows (needs testing)
2026-04-10 11:44:50 -04:00
Christopher Sean Morrison ff180df30e add new iterate_geometry doc to the list 2026-04-10 10:32:21 -04:00
Christopher Sean Morrison 2024d767f6 Add prelim guide for the database traversal APIs
provides an overview of the existing LIBRT api calls available for traversing geometry database objects, including usage scenarios and key characteristics of the various traversal functions (e.g., data struct involved).
2026-04-10 10:31:36 -04:00
Erik 6318e4885c Merge pull request #56 from GregoryLi0/brep_epa_debug
epa->brep translation bug fix
2026-04-09 13:14:37 -04:00
Erik Greenwald 0d9ba5f071 Style: use tabs for indentation, spaces after commas
Whitespace-only changes to match project conventions.
No functional changes.
2026-04-09 11:36:07 -04:00
Christopher Sean Morrison 029075133d and one more again, restructure semi blindly watching ci logs 2026-04-09 02:51:38 -04:00
Christopher Sean Morrison 7958d40624 one more reordering 2026-04-09 01:15:46 -04:00
Christopher Sean Morrison 831b3593f1 more reordering required, flying blind 2026-04-09 01:12:44 -04:00
Christopher Sean Morrison 21cef9334d reorder to avoid nmg collusion, reorder to avoid predecl 2026-04-09 00:47:31 -04:00
Christopher Sean Morrison 586d0d7b6b use a diff prefix to not collude with nmg api 2026-04-09 00:47:31 -04:00
f4alt 29bb49460c expand -d usability
user-requested way to skip the density related calculation alltogether
=> "-d 0"
2026-04-08 12:21:56 -04:00
f4alt 58b2897a50 improve parsing helper
parsing raw gqa output in practice is pretty fragile - tighten some of
the checks. Also collapse parseMass and parseVolume into one helper.

Slight behavior change - if stod() fails, bu_log a warning instead of
hard failing
2026-04-08 12:21:56 -04:00
Erik Greenwald e44c88c25b Fix heap buffer overflow in rt_ehy_tess and rt_hyp_tess
The vells[] vertex array allocation loop iterated forward, giving the
largest array to index 0 and progressively smaller arrays to higher
indices.  The top face code then writes nseg entries to vells[nell-1],
which had the smallest allocation — a heap buffer overflow.

The identical code in rt_epa_tess correctly iterates backward (nell-1
to 0), giving vells[nell-1] the full nseg slots.  Fix both EHY and HYP
to match EPA's allocation order.

Found via valgrind on an isolated EHY test case:
  "Invalid write of size 8 at rt_ehy_tess (ehy.c:1424),
   0 bytes after a block of size 112 alloc'd at (ehy.c:1417)"
2026-04-08 08:51:23 -04:00
Clifford Yapp 515d0bf438 Fix quoting in bot and facetize search examples 2026-04-07 11:51:06 -04:00
Erik Greenwald 34bf6dddcc Fix FindLMDB to search default system paths
FindLMDB only searched when LMDB_ROOT was set, missing system-installed
liblmdb-dev entirely. Add fallback to default CMake search paths.
2026-04-06 11:08:15 -04:00
Christopher Sean Morrison b0c8fca950 update docs to reflect asciidoc conversion, and not dupewhat's already in the other man pages 2026-04-05 07:56:18 -06:00
Clifford Yapp 372704282a Add some work on Region-of-Interest support for Bullet simulate
Still something of a work in progress (so not announcing anything yet), but
this gets us much closer to actually having objects be able to interact with
large terrain files.  Previously, the huge bounding box of the terrain and the
tiny bounding box of the object being dropped on it didn't play well in Bullet.
This attempats to define a Region-of-Interest (roi) that effectively makes a
subset of the larger terrain bounding box we can use for the interaction math.
2026-04-02 11:44:07 -04:00
Clifford Yapp f95f5a2fdf librt: make db_dirbuild idempotent and call db_update_nref automatically 2026-04-01 20:33:09 -04:00
Clifford Yapp 5ba0fa7182 Make another stab at a Tcl search exec interp 2026-04-01 16:54:03 -04:00
Clifford Yapp 00cc859be6 Back out separate Tcl interp for search -exec running change
This is more involved than one might think - backing out for now.

Reverts commit 90f111e54e.
2026-04-01 14:28:51 -04:00
Clifford Yapp e22ee182ec Eliminate rt_cline_radius in favor of rti_max_beam_radius
rt_cline_radius in globals.c was the last mutable per-session global in librt -
eliminate it for the per-rtip rti_max_beam_radius instead.

This should mean we are now able to reliably open multiple .g databases and
raytrace them simultaneously.
2026-04-01 11:59:57 -04:00
Clifford Yapp 4750f779dc Properly set the stage for removal of the material_head global in librt 2026-04-01 09:56:55 -04:00
Clifford Yapp faef611807 Looks like spsr.cpp may not be happy with clang unity building - skip 2026-04-01 09:55:34 -04:00
Clifford Yapp 0bd9a9a077 remove obsolete tie entry, update TODO 2026-03-31 21:34:00 -04:00
Clifford Yapp a1fa4a194b Move db_i "PRIVATE" entries to the actual private internal container
This an ABI change, but these entries were always explicitly marked
PRIVATE so they were not part of the API contract.
2026-03-31 14:51:57 -04:00
Clifford Yapp f0ce154401 Fix rtweight/gqa iterations looking for material objects
Previously, were only looking at the first entry in a hash bin - need to do a
double iteration over all indices and bin contents to check all objects.

While we're at it, switch to using FOR_ALL_DIRECTORY_START/FOR_ALL_DIRECTORY_END
macros.
2026-03-31 13:43:45 -04:00
Clifford Yapp 5a132ab60d Restore stdout and stderr setup specific to Windows - evidently even modern Tcl doesn't really hide all the details here. 2026-03-31 12:10:42 -04:00
laithaldaeef 886ee76ff9 Fix missing *3 stride in BoT normal array indexing in k-g converter 2026-03-31 20:50:52 +10:00
Clifford Yapp 90f111e54e See if we can use a separate Tcl interp to allow Tcl script search -exec running 2026-03-30 21:35:07 -04:00
Clifford Yapp 24a4603b39 Fix Tcl channel blocking in stdin_input and std_out_or_err
Got Copilot to reproduce this one.

Root cause: Tcl_Read(chan, buf, N) on a blocking Tcl channel uses
DoRead(allowShortReads=0), which loops calling read() until exactly N
bytes accumulate — unlike POSIX read() which returns whatever is
available. This stalls two handlers:

1. mged -c cbreak mode: Tcl_Read(chan, buf, BU_PAGE_SIZE=4096) fires
   for each single keypress (1 byte in cbreak mode), then spins on
   read() waiting for 4095 more bytes, permanently blocking the event
   loop. Confirmed via PTY test: stdin_input was called but
   Tcl_Read never returned.

2. GUI puts test: Tcl_Read(chan, line, RT_MAXLINE=10240) reads the 5-
   byte output ("test\n") then blocks on read() on the now-empty pipe
   waiting for 10235 more bytes. Confirmed via btclsh pipe test: with
   blocking mode, handler stalled; with non-blocking, handler returned
   the available bytes immediately.

Fix: set channels to non-blocking mode before registering channel
handlers. With CHANNEL_NONBLOCKING, DoRead exits the loop when the
buffer drains, so Tcl_Read returns whatever bytes are available.

Also guard stdin_input against:
- non-cbreak Tcl_Gets returning -1 for EAGAIN (not EOF) on a
  non-blocking channel — only call quit() when Tcl_Eof is true
- cbreak Tcl_Read returning 0 for EAGAIN — add count <= 0 early
  return before the buf[0] sanity check to avoid bu_bomb
2026-03-30 20:52:23 -04:00
Clifford Yapp d6c1f9d5c5 Enable async cmd output collection in MGED
Tcl doesn't like mulitple threads trying to write text output at the same time,
but our bu_log callbacks were trying to do exactly that when triggering from
things like a multi-core raytrace.  We've been "getting away" with it for the
most part, but severe loading on Windows in particular has been known to cause
problems with the MGED command prompt.

We alleviate that problem by launching ged_exec commands in a thread, with the
bu_log callback set up to write safely to a separate holding area and the main
Tcl thread doing the job of "flushing" that content periodically.

One nuiance with this approach is we need to be aware that we're already inside
a Tcl_Eval when running commands like search -exec, which can launch their own
commands.   Allowing arbitrary nested Tcl_Eval evaluations doesn't play well in
the Tcl environment - allowing fully arbitrary Tcl script execution in search
-exec results in having no way to guarantee correct behavior.  To avoid this,
we restrict search -exec to running libged commands rather than supporting
arbitrary Tcl procs.

Even with that restriction, however, there are still per-command callback hooks
available in libged for appliations to register their own logic to - they are
also a potential source of trouble.  So callbacks must be disabled when we're
execing inside a search command run - a mechanism has been added to support
this at the libged level.

With the current setup, testing:

 search / -exec l "{}" \\;

on the Generic_Twin.g example appears to complete successfully on Linux.

Similarly,

 search ! ( -type bot -or -type comb ) -exec draw "{}" \\;.

appears to draw the correct geometry.
2026-03-30 14:30:22 -04:00
LorenzoSanti34 9834cf8b45 Fix ELEMENT_BEAM local variables resetting across multi-card lines
The element ID and element data were declared as local variables
inside the case block, causing them to reset on every line. When
option cards (THICKNESS, SECTION, etc.) were processed, the element
ID was lost and options were written to an empty element.

Replace local eid with persistent elementId declared alongside other
state variables. Update option handlers to modify the stored element
directly via data.elements[elementId] instead of overwriting it with
an empty local copy.
2026-03-30 17:44:41 +00:00
LorenzoSanti34 b4a13df904 Fix ELEMENT_BEAM optionsCounter not incrementing after Card 1
After parsing Card 1 of a multi-card *ELEMENT_BEAM keyword (e.g.,
*ELEMENT_BEAM_THICKNESS), optionsCounter was not incremented. This
caused Card 2 (the options data) to re-enter the Card 1 branch,
failing with "Too short ELEMENT_BEAM" since the options card has
fewer tokens than expected for Card 1.

Increment optionsCounter after Card 1 when beam options exist, so
subsequent cards are correctly routed to the options branch. Also
reset optionsCounter to 0 after all options are consumed so the
next element's Card 1 is parsed correctly.
2026-03-30 17:43:19 +00:00
Clifford Yapp 291e668a9e More thoughts about the multithreaded I/O issue 2026-03-28 00:27:43 -04:00
Clifford Yapp e226ce54a0 Whoops - incorrect view axes file rename 2026-03-27 16:22:04 -04:00
Clifford Yapp c4f8c502b0 Rename some files to avoid warnings in an MSVC compile about same-named files going to same output in Unity build 2026-03-27 15:57:07 -04:00
Clifford Yapp 85a2b4c952 Rework MGED to use Tcl_Channel on all platforms
We've wondered for a long time if we could use Tcl_Channel on all platforms to
give us a unified answer to our I/O needs - it appears the answer is yes, at
least on modern systems.  This commit replaces our non-Windows Tcl logic with a
Tcl_Channel based solution.

mged.c

    stdin channel: Tcl_GetStdChannel(TCL_STDIN) replaces
    GetStdHandle(STD_INPUT_HANDLE) / Tcl_MakeFileChannel(STDIN_FILENO)
    — the canonical cross-platform way to get Tcl's stdin.  Note that
    Tcl_MakeFileChannel on Windows expects a native HANDLE, not a CRT,
    so we still need to use _get_osfhandle() on Windows

    stdin reads: Tcl_Gets(chan) / Tcl_Read(chan) / Tcl_Eof(chan)
    throughout, replacing the split between bu_vls_gets(stdin) (Linux)
    and Tcl_Gets(chan) (Windows)

    Completed the cbreak newline handler — the USE_TCL_CHAN branch had
    /*XXX Nothing yet */ here, meaning commands typed in cbreak mode
    never executed on Windows

    GUI stdout/stderr pipe: the Windows CreatePipe/HANDLE path is
    removed; the POSIX pipe()/dup() approach (already behind HAVE_PIPE)
    works on all platforms including Windows CRT

    Guard semantics corrected: #ifndef USE_TCL_CHAN → #ifdef HAVE_PIPE
    for pipe setup/teardown; use HAVE_WINDOWS_H for cbreak terminal
    control and _get_osfhandle(fd) (which is the actual platform
    distinction)

    Removed unused fd field from stdio_data struct; libtermio.h include
    made unconditional

fbserv.c

    fbserv_set_port: replaces POSIX-only pkg_permserver + Tcl_CreateFileHandler
    with Tcl_OpenTcpServer (cross-platform, callback-based TCP accept)

    fbserv_new_client_handler: unified to always use Tcl_TcpServerAcceptProc
    signature (ClientData, Tcl_Channel, char*, int) as required by
    Tcl_OpenTcpServer; extracts the OS fd via Tcl_GetChannelHandle to
    construct the pkg_conn

    fbserv_new_client / fbserv_drop_client: Tcl_CreateFileHandler/Tcl_DeleteFileHandler
    replaced with Tcl_CreateChannelHandler/Tcl_DeleteChannelHandler + Tcl_Close

    fbserv_makeconn and the c_chan/c_handler client fields are now always compiled in (no guards)

mged_dm.h

    #ifdef USE_TCL_CHAN guards removed from struct client (c_chan, c_handler)
    and struct mged_dm (dm_netchan) — fields always present
2026-03-27 14:42:18 -04:00
Clifford Yapp e014fd420d Regress targets may depend on db targets - do this block after db is added 2026-03-27 09:32:29 -04:00
Clifford Yapp 71b801bf6c Exclude various libbu files from Unity building, enable by default
Still haven't narrowed down exactly which file or files are the problem in
libbu, but if we exclude this set from the libbu Unity build we appear to have
success on the CI Windows runner that was previously failing.  Good enough -
this still gets most of the libbu files into a unity build, which is enough to
help improve our build times.
2026-03-27 08:56:21 -04:00
Clifford Yapp dbc6504d6a Hmm. CI testing suggests it's libbu that's having the issue in Windows UNITY release building 2026-03-26 17:04:14 -04:00
Clifford Yapp 80437037d3 Various adjustments for Unity building
Consolidate OSX signal.h NSIG workaround for MGED

Add some undefs to help with winnt.h conflicts in Windows Unity builds

More min/max guarding - make sure winsock2 doesn't mess with min/max

We don't want to include the init files - too much chance of something going
wrong.  For now, we are disabling all of the unity builds to allow this to
function on Windows, but we would like to understand why it's not working

Adjust some files to clear unity build errors and avoid the need to SKIP them
2026-03-26 16:37:35 -04:00
Clifford Yapp ac797cecd0 remove globals from fb ged commands, rename bot global in wdb_importFg4Section 2026-03-26 12:43:43 -04:00
f4alt f64dcec59b add option to allow specifying density file to gqa 2026-03-25 16:38:39 -04:00
f4alt b212dc2e90 make adjusting the options table easier
re-indexing the full array to add / remove options is annoying
2026-03-24 15:09:46 -04:00
Clifford Yapp e5ec165089 Nope, not ready yet on Mac or Windows 2026-03-24 13:03:07 -04:00
Clifford Yapp 62046fae14 Turn on UNITY building by default
We can always restore the OFF default if need be, but the speedup during
building is proving to be quite handy in practice.
2026-03-24 10:30:46 -04:00
Clifford Yapp e6b9ba54b2 Update librt editing code to match latest experimental work
This code is still not active in MGED editing, so it's not user impacting as
yet.  We are committing current progress to help minimize the differences (and
corresponding rebasing difficulties) between main and the working branches.

Once the tor pattern was established, AI was able to add scaffolding for the
other primitives, but they have not yet been individually checked and verified
(and they will need to be.)
2026-03-24 09:38:16 -04:00
f4alt 7f63884d39 better help printing
extra or unknown options were being silently ignored and returning as
opt_parse does not return an error nor set a message - giving no user
feedback
2026-03-24 09:15:30 -04:00
f4alt a29fed3406 fix gist crashing with bad units 2026-03-23 16:05:05 -04:00
f4alt 9ceed520d9 fix 'search -type sph' 2026-03-23 11:41:48 -04:00
f4alt 180fd8b81b add ability to distinguish sphs from ells 2026-03-23 09:55:24 -04:00
Rupesh 2e4cdc0b29 Fix minor bugs and code quality issues in art/appleseed renderer
- brlcadplugin.cpp: Fix incorrect header comment (ARTPLUGIN -> BRLCADPLUGIN)
- brlcadplugin.cpp: Fix char loop variable overflow in get_objects() for
  object counts > 127 (char is signed), changed to int
- art.cpp: Fix float literal (200.0) assigned to size_t variable
  light_intensity, changed to integer literal (200)
- art.cpp: Fix grammar 'a orthographic' -> 'an orthographic' in comment
- art.cpp: Fix missing apostrophe in error messages ('Dont' -> 'Don''t')
  across 5 bu_bomb() calls
2026-03-21 11:30:59 +05:30
Clifford Yapp 11eecfe986 Replace OpenMesh calls with embedded smoothing and subd
We were only using OpenMesh for a couple of features, which ultimately
proved amenable to refactoring into stand-alone headers.  We can avoid
needing to worry about OpenMesh as a dependency this way.
2026-03-20 23:40:28 -04:00
Clifford Yapp fb7c7be9be Need stdio.h for some of the jpeglib.h API evidently, at least with a system install... 2026-03-20 20:25:27 -04:00
Clifford Yapp 5657e2d150 Add JPEG support to libicv (lets rt write out .jpg images)
We already have libjpeg in bext anyway for GDAL, so we might as well make it
available for use in libicv.  Note that a JPEG write cannot save every original
pixel exactly in the JPEG output file no matter what quality setting we use -
doing so is not possible due to the nature of the JPEG format itself.  If you
need full preservation, you'll still want to use PNG.  We try to strike a
balance between file size and quality with a 90% quality and disabling chroma
subsampling (for the moment at least, libicv does not expose quality settings
for image writes) - however, those specific settings are not a guaranteed part
of the libicv JPEG output API.

Bottom line - if you need full quality, use PNG.  JPEG is available if you want
"smaller and probably good enough".
2026-03-20 10:21:22 -04:00
Clifford Yapp eb71eb7275 Performance adjustments for the dsp primitive 2026-03-17 23:27:29 -04:00
Clifford Yapp 9726413ecd Convert DocBook documentation to AsciiDoc
Leveraging a C++ translation of the asciidoctor tool called asciiquack,
we are converting our DocBook documentation to the AsciiDoc format.

There are a number of motivations for this - first and foremost, it has
not proven to be a particularly friendly editing format for contributors
to use.  Second, DocBook is not particularly well integrated into
various modern web frameworks for online documentation that we would
like to be able to leverage.  Third, our processing toolchain for
DocBook -> html/man formats (the two we use in practice) was quite heavy
and complex.  We had done some work to produce PDF files, but it is not
an ability used in practice and requires tools not part of our
dependency management chain.

We had previously been reluctant to migrate to AsciiDoc due to its own
tooling requiring a sizable ecosystem of dependencies also not part of
our toolchain, but the Ruby->C++ translation of asciidoctor demonstrated
enough capability to meet our basic in-repository needs.  Accordingly,
we can now make the transition - and set the stage properly to leverage
online infrastructure more effectively.  (Not to mention having a more
approachable source format for potential contributors.)

For the moment, we are simply not adding PDF conversion support -
asciiquack does enable it at a basic level, but until there is a
demonstrated need for it we'll stick with just the formats that are
known to have active use.
2026-03-17 21:22:20 -04:00
Clifford Yapp e98c76941d Mention clone changes in NEWS 2026-03-16 15:26:38 -04:00
Clifford Yapp f6ad1dc408 Improve clone progress bar logic and man page 2026-03-16 15:25:51 -04:00
Clifford Yapp 1a7d0e92d9 Fold MGED pattern tool functionality into clone command
Progress bar callback still not working quite right.
2026-03-16 15:25:51 -04:00
Clifford Yapp 53563dcc39 Improve search's -above option performance
Using the -above option in a search filter specification previously resulted in
O(n^2) performance behavior - basically unusable for large CSG models.  This
commit optimized the common case (non-nested -above specifications) to reduce
that to O((n*d) where d is the tree depth.
2026-03-16 15:25:00 -04:00
Clifford Yapp d601de85cb Improvements to npush
Get depth and region halting options working, use stable
keys for more reliable tree walking.
2026-03-16 13:13:42 -04:00
Clifford Yapp cf97e6fef1 Merge rel-7-42-2 changes back into main
Also update version numbers
2026-03-13 21:58:24 -04:00
Clifford Yapp 5f4a0c066b Exempt brledit.cpp from bu_setprogname check - intentionally separate, doesn't need dirs 2026-03-13 09:37:32 -04:00
Clifford Yapp 757a3dd5a5 brledit is stand-alone intentionally - adjust 2026-03-13 09:33:18 -04:00
Clifford Yapp 0bc0943116 Update ChangeLog and release date 2026-03-13 08:36:39 -04:00
Clifford Yapp fc905ca063 Move brledit to libbu - for bu_editor to work reliably, it has to be there for anything that might call bu_editor - which means it has to be there for libbu.
(cherry picked from commit dc2cca5853)
2026-03-12 16:49:48 -04:00
Clifford Yapp dc2cca5853 Move brledit to libbu - for bu_editor to work reliably, it has to be there for anything that might call bu_editor - which means it has to be there for libbu. 2026-03-12 16:49:14 -04:00
Clifford Yapp 1a86cbd7ac Move brledit to src/util, set up its license file - it needs to be installed as the last resort editor
(cherry picked from commit 433722851e)
2026-03-12 15:17:31 -04:00
Clifford Yapp 433722851e Move brledit to src/util, set up its license file - it needs to be installed as the last resort editor 2026-03-12 15:16:57 -04:00
Clifford Yapp f2afb65a8e Update ChangeLog with commits being incorporated into rel-7-42-2 2026-03-12 12:56:03 -04:00
Clifford Yapp c1fc1ee1d8 Update release numbers and date 2026-03-12 12:42:58 -04:00
Clifford Yapp 2a0af414df Bump libpkg error msg buffer size
One of the GitHub CI runners had a long enough path that it hit the 128
char limit.  Need to pick some value, so going with the fallback default
for MAXPATHLEN from common.h plus a little extra for message chars.

(cherry picked from commit ad91dec028)
2026-03-12 12:33:21 -04:00
Christopher Sean Morrison d0de263e10 hah, can consider those investigations done. 2026-03-11 23:15:01 -04:00
Clifford Yapp df16ccaeb3 Address race condition in libbu semaphore system
This manifested on FreeBSD - in bu_semaphore_init(), there is an
nsemaphores <= bu_nsemaphores check.  However, if bu_nsemaphores
gets lowered by a thread with stale information, it can result in higher
value semaphores being re-initialized.  Once reinitialized, the code
that originally thought it had the semaphore no longer owns it since
it has been reset.  On Linux this evidently is not a fatal failure,
but on BSD we get an EPERM return.

Fix is to only update bu_nsemaphores count if the proposed nsemaphores
count update is an increase over the number already set, so we never
accidentally re-initialize already initialized semaphores.
2026-03-11 14:42:16 -04:00
Clifford Yapp bd9fb72146 Fix potential negative cell index in DSP
The initial cell computation cX = (minpt[X] - bbmin[X]) / cs only clamped the
upper bound, so a floating-point entry point landing slightly outside the
bounding box would produce a negative index into dspb_children[].
Fixed by clamping to valid indicies.
2026-03-10 14:37:49 -04:00
Clifford Yapp 12185dd7f9 Fix problems in libbn's noise subsystem (impacts some rt shaders)
We've long observed problems in multithreaded raytracing when using shaders
leveraging the libbn noise system, but hadn't tracked down the issue.  AI
analysis zeroed in on two problems:

The while-loop folding large coordinates into [0, LLONG_MAX] could not converge
for values > ~1.66e35: at that scale max2x - dst[i] equals -dst[i] exactly in
double precision, so the fold oscillates forever. A secondary issue: values
above INT_MAX caused ip[i] = (int)floor(p[i]) to overflow, yielding garbage
hash indices and non-finite noise output.

Fix: Replace the while-loop with a single fmod. Since Hash3d already masks with
& 0xfff (period = TABLE_SIZE = 4096), folding into [0, TABLE_SIZE) is
semantically equivalent and safe — fmod preserves the fractional part
(fmod(x,n) - floor(fmod(x,n)) == x - floor(x) for integer n) and is O(1) for
any finite input.

The "optimistic unsynchronized first scan" read etbl and etbl_next without
holding sem_noise. Concurrently, build_spec_tbl() (which holds sem_noise) can
call bu_realloc(etbl, …), freeing the buffer the first thread is reading. This
use-after-free corrupts state and can manifest as rt worker threads hanging or
crashing.

Fix: Hold sem_noise for the entire lookup — single scan, no double-checked
locking.

Unit tests were also added to libbn for both issues.
2026-03-10 14:26:11 -04:00
Clifford Yapp fd68159bca Only guard the define that actually needs rt_wdb 2026-03-10 09:41:56 -04:00
f4alt 88df8abbeb document e46c6ddb6a and 1ac6bde653 2026-03-09 10:40:46 -04:00
Clifford Yapp dc18b9458d Eliminate swrast_getDisplayImage side effects, make tests more robust 2026-03-06 20:31:31 -05:00
Clifford Yapp 631fd28780 Help screengrab work with osmesa in mged -c 2026-03-06 17:06:32 -05:00
Clifford Yapp 9bbfc18376 Remove the Co3Ne method from facetize
OK, I'm convinced - this algorithm really isn't designed to produce
manifold output - it's "close but not really" and I've not been able to
figure out a way to reliably construct a manifold from its outputs.
That means for the facetize use case it's basically unusable, and SPSR
is our *actual* sometimes-viable fallback algorithm.  Adding complexity
for no value - yank it.
2026-03-04 21:24:55 -05:00
f4alt 1ac6bde653 another stab at better scaling gqa grid
We need to always work in mm. Otherwise we restrict our grid to 1 UNIT -
ie if we're working in m, the grid can only go down to 1m = 1000mm (is a
very loose grid).

Also, set the grid lower bound to be 1/10th the upper to see if we can
get some cheap convergence and higher accuracy value without sacrificing
too much speed.
NOTE: this value is still largely arbitrary and would be nice to verify
how much error this is introducing over a much slower precision run.
2026-03-04 10:49:31 -05:00
f4alt e46c6ddb6a need to have grid_step of atleast 1 2026-03-04 10:46:44 -05:00
Daniel Rossberg 0e8c00d249 final merge of pull request #203 from BraghinAndrea 2026-03-04 13:50:43 +01:00
Daniel Rossberg d80116169a fixed the build issues
- std::find() is declared in algorithm
- multiple dfeclaration of a variable
- unused enum element
2026-03-04 13:50:12 +01:00
Daniel Rossberg ad401e4ff1 merge pull request #203 "Update k_parser.cpp"
the logic for handling section shell length and the error related to it in case of multiple sections under the same keyword
2026-03-04 13:32:08 +01:00
Clifford Yapp 23e4fe2c6d Reapply "Complete removal of deprecated redblack tree from libbu"
Patch releae is being handled separately - yank deprecated redblack tree
implementation.

This reverts commit de35eab67b.
2026-03-02 11:11:12 -05:00
Clifford Yapp 5d275223e6 Add optional unity building for faster compilation
Added BRLCAD_ENABLE_UNITY_BUILD option to CMake to utilize modern
CMake's ability to combine source files for faster compilation.  OFf by
default while we shake down, but in initial testing on Linux with Ninja
it shaves about 25% off of the overall build time.
2026-02-28 22:12:59 -05:00
Clifford Yapp e3426fb801 Have the f_bv_35_25 and f_bv_45_45 functions call their actual matching C functions 2026-02-28 16:06:17 -05:00
f4alt 368ea4f68a more sane sanity check
check more than just the last face index
2026-02-26 15:46:44 -05:00
Clifford Yapp e47ace6792 Bump patch number 2026-02-20 09:58:20 -05:00
Christopher Sean Morrison 8a44c1bd82 document how to get a list of all commands registered with the tcl interpreter 2026-02-19 13:12:46 -05:00
Clifford Yapp b7ed363f3b Note crash fix for invalid data input 2026-02-19 12:12:44 -05:00
f4alt 5982ac1303 cleanup unused var 2026-02-19 12:11:02 -05:00
f4alt b5440039ed oops, inverted logic 2026-02-19 12:10:55 -05:00
f4alt 542354b6eb these should not be possible
since we've validated the point, vector math with real numbers should
not produce NaN/INF's. Remove unnecessary if check, but leave an assert
for completeness' sake
2026-02-19 12:10:42 -05:00
f4alt 75663b3f18 sanity asserts 2026-02-19 12:10:29 -05:00
f4alt 0fa200fb74 be a little more memory friendly
There's no reason to always allocate valid_faces array during prep.
Instead take a two-loop approach: the first pass assumes all faces are
valid and computes centroids + bounds directly. If an invalid face is
encountered, we enter a 'heavier' path where we then create the valid
face mapping to compact the array (skip the bad data).

This preserves crash resilience while reducing memory usage for the
"correct" usage of bots with good data.
2026-02-19 12:10:20 -05:00
f4alt 56a6640cb9 better safeguards on bot prep
Josh caught a bot that crashes when raytraced. So, add a safety function
to protect prep from doing vector math on bad data (nan's / inf's).
Might have gotten a bit carried away with the validation checks -
performance impact is currently untested.

In the future, we could be smarter about stitching out the bad data, but
this edit matches old (< 7.42.0) behavior of just ignoring the problem
geometry and moving on to ray tracing.
2026-02-19 12:10:11 -05:00
Clifford Yapp 037d3e28b4 Right, the Qt6 approach won't work with Qt5 2026-02-17 11:29:31 -05:00
Clifford Yapp e5044cc491 Right, the Qt6 approach won't work with Qt5 2026-02-17 11:27:38 -05:00
joshbaker22 0f43c41d00 Update search.xml
add a note about wildcards and escape characters
2026-02-17 10:33:04 -05:00
Clifford Yapp 99b351b733 Updates for warnings and deprecations with newer Qt6 2026-02-17 09:58:14 -05:00
joshbaker22 236fd71606 Update in.xml
add datum solid type, remove a bunch of extra (and inconsistent) periods
2026-02-13 13:36:59 -05:00
joshbaker22 8a1256dfde Update search.xml
add note about default behavior for clarity
2026-02-13 13:24:37 -05:00
Clifford Yapp 4c2eeae618 Migrate libged to using bu_plugin.h, enable static+dynamic setup.
This represents a major cleanup of the libged plugin architecture.  Previously,
all commands were loaded dynamically as individual shared objects, which
significantly slowed program launches - particularly during debugging.  With
this new setup, most commands are built directly into libged during compile
(although they are still architected as plugins and can optionally be built
that way.)

A new macro scheme has been established to reduce the verbosity of defining the
plugin logic - each command in a plugin has a single definition line used for
both static and dynamic modes.  Most commands can use the simple "X" form of
the definition (there are many examples) but in a few cases the command name
may preclude using the short form - in that case, a slightly more explicit
XID form of the command definition macro can be used.  (The short form is
more sensitive to C/C++ name collisions with command names, or command names
that aren't valid in C - examples like 3ptarb, ?, dup and stat show how to
use XID to handle these cases.)

We are using a private libbu abstraction of the core plugin mechanisms to set
the stage for allowing multiple libraries to have their own plugin systems
without needing to duplicate the somewhat finicky cross platform logic.  The
static bundling mechanism is specific to libged, because it requires code
awareness via a scanner in order to allow staticly compiled-in commands to work
reliably, but the dynamic mechanisms are more universal and bu_plugin.h has
been deliberately architected with an eye towards making it simpler to define
such systems.
2026-02-13 11:46:46 -05:00
Clifford Yapp 6f9a28aa81 Initial test of a mechanism to allow for either built-in or plugin loading of cmds. 2026-02-13 11:39:34 -05:00
Clifford Yapp 11cfb60ccb Fix BRL-CAD summary reporting when Config.cmake is involved
We don't always get variables - sometimes we get full-up paths to check as
well. Check the changed items both as paths and variables, since they can be
either.
2026-02-13 11:25:11 -05:00
Clifford Yapp 02e8d3ec8e Add stepcode dep update to NEWS items 2026-02-12 09:38:55 -05:00
Clifford Yapp b096fe7f7f Update sha1 to point to latest bext branch updates 2026-02-12 09:37:08 -05:00
Clifford Yapp 7eddd4769b Updates for warnings and deprecations with newer Qt6 2026-02-11 10:16:18 -05:00
Clifford Yapp 3db6857fea Add brledit editor as a last-resort fallback
Originally based on https://github.com/troglobit/mg

We went with pico/nano style key bindings rather than emacs-style, since the
latter is more complex to deal with for a casual user.  Anyone wanting more
powerful editing capabilities is also likely to have their preferred editor
set up - the envisioned use case for this is constrained/last-resort cases
where the only option is to use what is available.

The original code has been extensively reworked, simplified, etc. to produce a
minimalist console editor that can work both on Linux/OSX/etc. type systems and
the various Windows console environments.  The latter in particular are very
difficult to deal with, and there will likely be various corner cases we
don't/can't handle well, but brledit has demonstrated the ability to edit a
file in PowerShell, Command Prompt and git bash.

Typically, the only environment where we might not have access to at least a vi
editor is a headless Windows server.  If we're going to maintain console mode
on a Windows desktop without 3rd party editors installed brledit also comes
into play , but in that situation we can generally also fall back on local GUI
editors to get the job done as well.  In one sense yori's yedit, a Windows-only
console editor and our previous last resort, covers the only truly problematic
case.  Running in git bash, for example, we will generally have nano available
and so not need brledit.  However, the switch is still worthwhile - brledit is
both a much smaller code footprint than yori and also works on POSIX type
systems in case some unforseen circumstance DOES end up making having our own
fallback there desirable or necessary.

In addition to brledit itself we have added new logic to the libtermio.h header
to deal with the requirements of its interace, which are much more extensive
than any of the other BRL-CAD utilities still leveraging libtermio.h.  Previous
functionality was left in place, so the libtermio.h header update should
introduce no behaviorial changes in other tools.

This commit also swaps brledit in for yedit in bu_editor logic and removes the
yori directory we previously added to support compiling yedit as part of
BRL-CAD.

(cherry picked from commit 400037e12d)
2026-02-10 15:47:45 -05:00
Clifford Yapp 5d971c51d6 Typo 2026-02-10 09:37:32 -05:00
Clifford Yapp 15029fae8b Use full checkout rather than co alias 2026-02-09 14:24:50 -05:00
Clifford Yapp 7edeafaf48 Match CMakeLists.txt sha1 2026-02-09 12:57:03 -05:00
Clifford Yapp a1ce5c10a3 As with bext itself, only target macos-14 for this release 2026-02-09 09:47:05 -05:00
Clifford Yapp ee5c0e12bc Point 7-42-2 test branch at the latest test 7-42-2 bext sha1 2026-02-09 09:45:29 -05:00
Clifford Yapp a5e37dd447 Update libtiff to v4.7.1 2026-02-05 14:47:30 -05:00
Clifford Yapp 3862f3c948 A lot of dependencies with CVE updates - update NEWS with the list so far. 2026-02-05 13:14:32 -05:00
joshbaker22 ecb84ddb38 Update lc.xml
update notes for flags to reflect actual behavior (-d flag claims to only list 1 region per id but actually is designed to list only duplicate ids (regions that share ids)).

(cherry picked from commit a01688ff2d)
2026-02-04 10:52:10 -05:00
joshbaker22 cd28b5cfaa Update gqa.xml
add note on density file order

(cherry picked from commit e7fb661959)
2026-02-04 10:52:02 -05:00
f4alt 6be84e7082 document Josh's changes
(cherry picked from commit 6662c3318e)
2026-02-04 10:51:48 -05:00
joshbaker22 3ab24cabca Update helplib.tcl
(cherry picked from commit b90147b26d)
2026-02-04 10:49:30 -05:00
joshbaker22 fe22bb795d Update view.xml
expand view save notes (with options listed out) and add example

(cherry picked from commit 27b23a1c15)
2026-02-04 10:49:24 -05:00
f4alt 5e67a885b6 want a literal ampersand here
(cherry picked from commit 0e17a6386d)
2026-02-04 10:49:17 -05:00
joshbaker22 f9bb22f1ad Update get.xml
reword name description to match syntax

(cherry picked from commit 44c5c2fbf7)
2026-02-04 10:49:11 -05:00
joshbaker22 5ae766bb16 Update get.xml
add notes about adjust

(cherry picked from commit 908911eb6a)
2026-02-04 10:49:04 -05:00
joshbaker22 4620183b2b Update CMakeLists.txt
add new adjust page

(cherry picked from commit b466ae0e7a)
2026-02-04 10:48:57 -05:00
joshbaker22 f1993cb914 Create adjust.xml
add new page for adjust

(cherry picked from commit f29054f9e1)
2026-02-04 10:48:51 -05:00
joshbaker22 faf89c6fe2 Update helplib.tcl
update adjust to show that it works on solid parameters (not on metadata attributes). Make a note on get for the same (although it works on some basic attr as well (default region ones I think))

(cherry picked from commit a7cf1dc612)
2026-02-04 10:48:35 -05:00
joshbaker22 768b461834 Update draw.xml
note on what -A -o does

(cherry picked from commit 561a8e50a7)
2026-02-04 10:48:28 -05:00
joshbaker22 a400b360a4 Update B.xml
Add flags to match draw command and quick note on -S and -m1.

(cherry picked from commit b3cccb00e9)
2026-02-04 10:48:21 -05:00
joshbaker22 6c7068a311 Update draw.xml
fix spacing issue after -A -o

(cherry picked from commit 091e4c881d)
2026-02-04 10:48:14 -05:00
joshbaker22 516f7c06c2 Update voxelize.xml
adjust example to be 100 size and note defaults for each value.

(cherry picked from commit cbe6c1d6cb)
2026-02-04 10:48:07 -05:00
joshbaker22 d9c2e82500 Update gqa.cpp
add p in options after -A (for display with -h)

(cherry picked from commit b570d5dc2e)
2026-02-04 10:48:00 -05:00
joshbaker22 e90f4c46d2 Update center.xml
fix typo (extra > in example)

(cherry picked from commit 7cc0f24a16)
2026-02-04 10:47:47 -05:00
joshbaker22 07423da5bf Update gqa.xml - removed extra > after p (under analysis flags)
(cherry picked from commit 7c4455d3ea)
2026-02-04 10:46:25 -05:00
Clifford Yapp 947d7cf728 Document open cmd reporting fix 2026-02-04 10:45:24 -05:00
Clifford Yapp 09a092581e If we don't have a database open, report that.
(cherry picked from commit 399356125e)
2026-02-04 10:44:46 -05:00
Clifford Yapp accdc03842 While I'm at it, do the same check in g2asc
(cherry picked from commit db8e79d886)
2026-02-04 10:44:08 -05:00
Clifford Yapp 633eec2a03 Update asc2g to not overwrite input file if specified as output
Ugh.  Let's not do that again.  Sanity check that the user didn't
specify the input file as the output file.  Previously that would
dump output to the input file and corrupt it.

(cherry picked from commit 12ec562e6c)
2026-02-04 10:44:00 -05:00
Clifford Yapp 1b4cb31ba6 Fix default behavior of open cmd when creating non-extant files
Back in commit e0384c3abc in 2023, I added a -c option to open for
creating files. In the process, I inadvertantly broke the default ged open
behavior when supplied with a filename that didn't yet exist, and various uses
of the opendb command in MGED and Archer depended on that.

This restores the "create by default" behavior.  To allow for cases were we
don't want that, we need to add an "o" option to disable it and only open
existing files - the default behavior needs to remain create.  We'll leave
the -c option for compatibility, since it is harmless.

(cherry picked from commit e7c5ca3780)
2026-02-04 10:43:08 -05:00
Clifford Yapp 50c8016ffc Fix static initialization order issues in libged/libdm plugin registries
Global registry objects (using STL containers) in libged and libdm were defined
as static variables at file scope. This risks "static initialization order
fiasco" - static constructors from other translation units (TUs) may access the
registries before they are initialized, causing crashes or undefined behavior,
especially in static builds with plugins.

The solution is to convert global registry objects to function-local static
"Meyers singletons". All registry accesses now use singleton getter functions,
ensuring construction is ordered and thread-safe by C++11 guarantees.

With this approach function-local statics are initialized on first use,
guaranteeing that any plugin constructor or TU macro accessing the registry
always gets a fully constructed object, regardless of cross-TU initialization
order. This makes static and dynamic plugin registration robust across all
platforms and build/link scenarios.

(cherry picked from commit 48a87e7e13)
2026-02-04 10:39:23 -05:00
Clifford Yapp 7c1e3c3037 Fixed a crash with bot -h when we don't have a database open - no reason we can't still print help.
(cherry picked from commit 35bf1f3ca0)
2026-02-04 10:38:24 -05:00
Clifford Yapp e8f8715fb1 Fix libged (i.e. MGED's) handling of nirt -c option to disable ray point backout
(cherry picked from commit a788c09615)
2026-02-04 10:34:53 -05:00
Clifford Yapp efe0496b07 Add workaround for broken OSX signal header
(cherry picked from commit 1a9c712da5)
2026-02-04 10:30:47 -05:00
Clifford Yapp bd2087f3d5 Don't create an LoD cache unless we need it.
(cherry picked from commit bccb3733e6)
2026-02-04 10:27:54 -05:00
Clifford Yapp 79949ffd43 Add workaround for broken Xcode signal.h header
Apparently Xcode 16.4 has a broken signal.h header that uses NSIG but
doesn't define it.

(cherry picked from commit db6809643e)
2026-02-04 10:26:52 -05:00
ChangJoon Lee c7f2cbdab2 Remove documentation error in clang
(cherry picked from commit 68ad20e42c)
2026-02-04 10:25:00 -05:00
Clifford Yapp a3903fab55 Add error case if all THREADLOCAL attempts fail
Per suggestion from Sean, make the failure to define THREADLOCAL
explicit.

(cherry picked from commit 5e54a73797)
2026-02-04 10:21:50 -05:00
Clifford Yapp 44782d88bd Define THREADLOCAL to use for per-thread storage
How to properly identify per-thread storage varies somewhat with
different standards and platforms - boil the various cases down to a
THREADLOCAL encapsulation we can use in our code.

(cherry picked from commit fc7c51af95)
2026-02-04 10:21:39 -05:00
Clifford Yapp c8a53047c9 Stop bot remesh subcmd from clearing output
Was truncating the help message being built up for the bot subcommands.

(cherry picked from commit 3dd6914b57)
2026-02-04 10:19:42 -05:00
Clifford Yapp 8482dc235a Correct BoT raytracing behavior when starting pt inside mesh
Josh found a test case (long small arb subtracted from narrow large arb) where
the new raytracing code wasn't properly evaluating the subtraction.

Turned out that the new code wasn't backing a starting ray point that was
inside a BoT mesh out of the mesh before intersecting with the BVH tree - the
result was that only the triangles after the start of the ray were reported.
That in turn resulted in single hit reports that produced no solid segments -
with nothing for boolweave to process from the subtraction solid, we got no
subtraction in the rendering result.

Fix is straightforward and consistent with how other primitives are handled -
back the start point out along the ray for the solve so we properly get all
triangles from a mesh intersection even when the originally specified ray pt is
inside the mesh.

This evidently didn't show up in more normal testing because it is rare for a
starting ray point to be set up inside geometry - when the same geometry
configuration was set up as a union rather than a subtraction it worked,
because the staring ray point calcluated for the scene incorprated both
bounding boxes.  The overall scene bounding calculation does not incorporate
subtractions (since they do not contribute positive volume they're not a good
basis for things like autoview sizing) and in most geometries that means the
ray point is already backed up "far enough".  The corner case of a subtraction
volume outside the overall scene was what was needed to trigger this issue.

(cherry picked from commit 0a8a286e34)
2026-02-04 10:15:10 -05:00
f4alt a3091bed40 this is wrong
(cherry picked from commit fa85521fd5)
2026-02-04 10:12:58 -05:00
f4alt 1972c02466 get rid of the magic number
since we're now ensuring the ray origin WILL be outside of the root
node, we can ditch the -1 magic tolerance value here and use the
standard slab rejection criteria.

Use SMALL_FASTF instead of straight up 0.0 to give us a little
fuzz protection.

(cherry picked from commit 106f5fa6e5)
2026-02-04 10:12:50 -05:00
f4alt 1d75918492 only backup our ray pt if we need to
the rp->r_min has already accounted for if the ray is inside the
bounding sphere. We can us it directly to back up rather than blindly
applying a bounding sphere diameter backout. This has the added
benefit of keeping our bot_shot_hlbvh_flat() function signature clean
of the soltab.

we can also do the backout in-line to avoid the tiny load/store overhead
and improve formula readability.

(cherry picked from commit 0cf43403e8)
2026-02-04 10:12:44 -05:00
Clifford Yapp 7376385fd2 For the initial fast culling test, back our r_pt out in the inverse ray direction.
Also try avoiding NaNs, but not sure this will make a major difference either
way performance wise.

(cherry picked from commit 042338c49c)
2026-02-04 10:12:39 -05:00
f4alt e12863573f improve readability
probably way overkill on the comments but oh well

(cherry picked from commit fb2757bee8)
2026-02-04 10:12:33 -05:00
f4alt a7cf755c03 pretty sure we want don't want bitwise
(cherry picked from commit 42ce6f5d64)
2026-02-04 10:12:27 -05:00
f4alt 437eaaf3ae make sure we're not accidentally wiping out the ray
(cherry picked from commit 3eba161f7b)
2026-02-04 10:12:20 -05:00
Clifford Yapp 0a8a286e34 Correct BoT raytracing behavior when starting pt inside mesh
Josh found a test case (long small arb subtracted from narrow large arb) where
the new raytracing code wasn't properly evaluating the subtraction.

Turned out that the new code wasn't backing a starting ray point that was
inside a BoT mesh out of the mesh before intersecting with the BVH tree - the
result was that only the triangles after the start of the ray were reported.
That in turn resulted in single hit reports that produced no solid segments -
with nothing for boolweave to process from the subtraction solid, we got no
subtraction in the rendering result.

Fix is straightforward and consistent with how other primitives are handled -
back the start point out along the ray for the solve so we properly get all
triangles from a mesh intersection even when the originally specified ray pt is
inside the mesh.

This evidently didn't show up in more normal testing because it is rare for a
starting ray point to be set up inside geometry - when the same geometry
configuration was set up as a union rather than a subtraction it worked,
because the staring ray point calcluated for the scene incorprated both
bounding boxes.  The overall scene bounding calculation does not incorporate
subtractions (since they do not contribute positive volume they're not a good
basis for things like autoview sizing) and in most geometries that means the
ray point is already backed up "far enough".  The corner case of a subtraction
volume outside the overall scene was what was needed to trigger this issue.
2026-02-04 10:00:05 -05:00
f4alt fa85521fd5 this is wrong 2026-02-04 09:57:19 -05:00
f4alt 106f5fa6e5 get rid of the magic number
since we're now ensuring the ray origin WILL be outside of the root
node, we can ditch the -1 magic tolerance value here and use the
standard slab rejection criteria.

Use SMALL_FASTF instead of straight up 0.0 to give us a little
fuzz protection.
2026-02-04 09:57:19 -05:00
f4alt 0cf43403e8 only backup our ray pt if we need to
the rp->r_min has already accounted for if the ray is inside the
bounding sphere. We can us it directly to back up rather than blindly
applying a bounding sphere diameter backout. This has the added
benefit of keeping our bot_shot_hlbvh_flat() function signature clean
of the soltab.

we can also do the backout in-line to avoid the tiny load/store overhead
and improve formula readability.
2026-02-04 09:57:19 -05:00
Clifford Yapp 042338c49c For the initial fast culling test, back our r_pt out in the inverse ray direction.
Also try avoiding NaNs, but not sure this will make a major difference either
way performance wise.
2026-02-04 09:57:19 -05:00
Clifford Yapp 399356125e If we don't have a database open, report that. 2026-01-23 14:13:12 -05:00
Clifford Yapp 07e4fda73b Revert "Checkpoint some work on sanity checking comb member matrices in asc2g v4 reading. Not enabled yet."
Having stashed it, back out the v4 matrix check work - since it adds libbn API,
should only do it if there is a real feature addition to justify it.

This reverts commit 408174d0b9.
2026-01-23 11:14:12 -05:00
Clifford Yapp 408174d0b9 Checkpoint some work on sanity checking comb member matrices in asc2g v4 reading. Not enabled yet. 2026-01-23 11:07:26 -05:00
Clifford Yapp db8e79d886 While I'm at it, do the same check in g2asc 2026-01-21 16:56:27 -05:00
Clifford Yapp 12ec562e6c Update asc2g to not overwrite input file if specified as output
Ugh.  Let's not do that again.  Sanity check that the user didn't
specify the input file as the output file.  Previously that would
dump output to the input file and corrupt it.
2026-01-21 16:52:18 -05:00
f4alt fb2757bee8 improve readability
probably way overkill on the comments but oh well
2026-01-20 14:44:01 -05:00
f4alt 42ce6f5d64 pretty sure we want don't want bitwise 2026-01-20 13:27:54 -05:00
f4alt 3eba161f7b make sure we're not accidentally wiping out the ray 2026-01-20 13:26:42 -05:00
Clifford Yapp e7c5ca3780 Fix default behavior of open cmd when creating non-extant files
Back in commit e0384c3abc in 2023, I added a -c option to open for
creating files. In the process, I inadvertantly broke the default ged open
behavior when supplied with a filename that didn't yet exist, and various uses
of the opendb command in MGED and Archer depended on that.

This restores the "create by default" behavior.  To allow for cases were we
don't want that, we need to add an "o" option to disable it and only open
existing files - the default behavior needs to remain create.  We'll leave
the -c option for compatibility, since it is harmless.
2026-01-12 15:11:40 -05:00
Clifford Yapp 3707905ecd Not sure about the other two, but exposed region count is user visible. 2026-01-09 22:02:27 -05:00
Clifford Yapp f63f9229c5 Last of the AI spotted issues in viewarea.c - need to change what we're counting based on the type. 2026-01-09 22:00:43 -05:00
Clifford Yapp e7124a9d47 Don't write into buffer[l-1] if l == 0 2026-01-09 21:54:57 -05:00
Clifford Yapp 092ed28518 Use zu for size_t printing 2026-01-09 21:29:33 -05:00
Clifford Yapp 252e76fd4e Add a few include relocations to help minimize gedcmds diff 2026-01-07 15:30:54 -05:00
Clifford Yapp e2275bbff7 Update brlcad_find_package to pass args
We were one-off handling one of the find_package args - instead of
doing that, add a more general approach.  Also do better about
getting locations from imported targets.
2026-01-07 15:29:23 -05:00
Clifford Yapp e2260e257b Also have mmesh integrated now 2026-01-07 15:11:54 -05:00
Clifford Yapp f9a39703a1 Remove a couple of completed TODO items. 2026-01-07 15:10:03 -05:00
Clifford Yapp 3681a66dba List README.adoc for CMake 2026-01-07 11:39:11 -05:00
joshbaker22 a01688ff2d Update lc.xml
update notes for flags to reflect actual behavior (-d flag claims to only list 1 region per id but actually is designed to list only duplicate ids (regions that share ids)).
2026-01-07 10:22:32 -05:00
Christopher Sean Morrison 493801fb45 stub in an adoc test file.
will be better to git mv the main README to preserve history if this pans out.
2026-01-06 19:23:46 -05:00
joshbaker22 e7fb661959 Update gqa.xml
add note on density file order
2026-01-05 10:05:29 -05:00
Clifford Yapp 446c9604fe Fix rle image conversion support. Remove utahrle dependency.
Looks like our previous RLE image conversion integration wasn't quite right.  While we're at this,
also implment a basic single-header read/write implementation of the RLE image specification so we
can eliminate the need to bundled libutahrle.  RLE is a very rare image format in the wild these
days, and it's not terribly complex, so rather than require a dependency for it (which we are also
maintaining, as there is no active upstream) consolidate support to a single built-in header file
implemented from the spec.
2026-01-02 15:39:26 -05:00
f4alt 6662c3318e document Josh's changes
7cc0f24a16
b570d5dc2e
cbe6c1d6cb
091e4c881d
b3cccb00e9
561a8e50a7
a7cf1dc612
f29054f9e1
908911eb6a
27b23a1c15
2025-12-31 15:06:35 -05:00
f4alt a4ec1112b1 quell deprecated usage warning 2025-12-31 13:34:48 -05:00
joshbaker22 b90147b26d Update helplib.tcl 2025-12-29 14:34:39 -05:00
joshbaker22 27b23a1c15 Update view.xml
expand view save notes (with options listed out) and add example
2025-12-29 13:29:33 -05:00
f4alt 0e17a6386d want a literal ampersand here 2025-12-29 12:57:14 -05:00
joshbaker22 44c5c2fbf7 Update get.xml
reword name description to match syntax
2025-12-29 12:49:20 -05:00
joshbaker22 908911eb6a Update get.xml
add notes about adjust
2025-12-29 12:29:52 -05:00
joshbaker22 b466ae0e7a Update CMakeLists.txt
add new adjust page
2025-12-29 12:27:15 -05:00
joshbaker22 f29054f9e1 Create adjust.xml
add new page for adjust
2025-12-29 12:26:54 -05:00
joshbaker22 a7cf1dc612 Update helplib.tcl
update adjust to show that it works on solid parameters (not on metadata attributes). Make a note on get for the same (although it works on some basic attr as well (default region ones I think))
2025-12-29 12:12:14 -05:00
joshbaker22 561a8e50a7 Update draw.xml
note on what -A -o does
2025-12-29 11:52:52 -05:00
joshbaker22 b3cccb00e9 Update B.xml
Add flags to match draw command and quick note on -S and -m1.
2025-12-29 11:46:38 -05:00
joshbaker22 091e4c881d Update draw.xml
fix spacing issue after -A -o
2025-12-29 11:39:07 -05:00
joshbaker22 cbe6c1d6cb Update voxelize.xml
adjust example to be 100 size and note defaults for each value.
2025-12-29 11:02:48 -05:00
joshbaker22 b570d5dc2e Update gqa.cpp
add p in options after -A (for display with -h)
2025-12-29 10:29:56 -05:00
joshbaker22 7cc0f24a16 Update center.xml
fix typo (extra > in example)
2025-12-29 10:17:18 -05:00
f4alt 8706832f06 another stab at better scaling gqa grid
We need to always work in mm. Otherwise we restrict our grid to 1 UNIT -
ie if we're working in m, the grid can only go down to 1m = 1000mm (is a
very loose grid).

Also, set the grid lower bound to be 1/10th the upper to see if we can
get some cheap convergence and higher accuracy value without sacrificing
too much speed.
NOTE: this value is still largely arbitrary and would be nice to verify
how much error this is introducing over a much slower precision run.
2025-12-23 16:12:56 -05:00
Clifford Yapp 60f05e8bd9 Try using -w instead of pragmas for lemon srcs 2025-12-19 13:37:04 -05:00
Clifford Yapp 8745b38c6b no peaking into yytos - not portable across versions 2025-12-18 15:36:00 -05:00
f4alt c43d90f3df fix indices 2025-12-18 13:48:45 -05:00
Clifford Yapp be8a902be5 It would be better to deal with this using -w, but until I figure out how get things building. 2025-12-18 12:05:15 -05:00
Clifford Yapp 38531dcc37 Suppress the unused-parameter warning in lemon generated code
The error message code tried to work around this by using the variable
in question, but that is proving to be unreliable across different
versions of lemon - using yyminor appears to intrude on data structures
that lemon treats as internal, and what works with one version won't
work with another.  Instead, just use the pragmas to avoid the
compilation failure.
2025-12-18 07:24:18 -05:00
Clifford Yapp bc176ddd81 Update bext sha1 hash to get correct expparse patch 2025-12-10 09:30:28 -05:00
Clifford Yapp 22c9634341 Need *full* dependency setup for the source archives check
By bad luck, we had a cache miss in the bext CI dependencies due to an upstream
commit just before a Source Archives check fired, and it fell to Source
Archives to produce a new bext.  Problem was, the Qt dependencies weren't
present, so it couldn't do so successfully - build failed.

The way configure is set up, we *need* bext to be able to proceed, even with
just a Source Archives test - and changing that would be very difficult/
invasive for such a minor convience enhancment - we can already do the check,
as long as bext is set up correctly, and we need that for basically all other
cases anyway.  Better to just make sure we have the deps uniformly, so this can
succeed if we hit this corner case again.
2025-12-10 09:17:36 -05:00
Clifford Yapp 0dbd82a100 Updates to work with modern lemon 2025-12-09 17:11:06 -05:00
Clifford Yapp 1e685ab4fe Remove outdated TODO entry - we've switched to mmesh 2025-12-04 15:05:34 -05:00
Clifford Yapp 48a87e7e13 Fix static initialization order issues in libged/libdm plugin registries
Global registry objects (using STL containers) in libged and libdm were defined
as static variables at file scope. This risks "static initialization order
fiasco" - static constructors from other translation units (TUs) may access the
registries before they are initialized, causing crashes or undefined behavior,
especially in static builds with plugins.

The solution is to convert global registry objects to function-local static
"Meyers singletons". All registry accesses now use singleton getter functions,
ensuring construction is ordered and thread-safe by C++11 guarantees.

With this approach function-local statics are initialized on first use,
guaranteeing that any plugin constructor or TU macro accessing the registry
always gets a fully constructed object, regardless of cross-TU initialization
order. This makes static and dynamic plugin registration robust across all
platforms and build/link scenarios.
2025-11-26 10:21:29 -05:00
Clifford Yapp 35bf1f3ca0 Fixed a crash with bot -h when we don't have a database open - no reason we can't still print help. 2025-11-25 16:28:46 -05:00
Clifford Yapp 9c6710bc05 Remove embedded ports of Geometric Tools algorithms
With bext, we have the upstream project from which these algorithm
implementations were orignially derived. Simplify our own code by directly
using the upstream and removing the translations - upstream is actively
maintained, so in addition to code simplification we will benefit from any
bug fixes and improvements they make.
2025-11-25 12:06:00 -05:00
Clifford Yapp 554ff0380f Update and enhance GED graph cmd
It's been a long time since this was tried, and Adaptagrams has apparently
changed quite a bit.  This update attempts to get things running with a newer
version of Adaptagrams (assuming a new CMake build system's outputs for
find_package).

We also add a basic SVG output mode (which is the default now) that uses higher
level Adaptagrams layouts to explore more visualization options.  This output
doesn't need the Tk window - any SVG viewer should be able to see the outputs,
and they do display in Firefox.

The actual motivation for touching this right now is to try and get a GED
plugin that depends on an LGPL library (and isn't centrally important
functionality) working to serve as an "always build as a plugin" test case.
The CMake build of Adaptagrams is a prelude to getting it running on Windows,
since any plugin adjustments will need to be tested there, but that will also
set the stage for making the graph command available reliably there as well
and lay the foundation for doing more interesting things with this capability.
2025-11-21 23:06:38 -05:00
Clifford Yapp a788c09615 Fix libged (i.e. MGED's) handling of nirt -c option to disable ray point backout 2025-11-21 16:33:56 -05:00
Clifford Yapp 45cad0bd6f Add NEWS item for gdiff -G similarity grouping mode 2025-11-18 17:11:41 -05:00
Clifford Yapp 06e65f520f Improve formatting of gdiff group output. 2025-11-18 17:11:41 -05:00
Clifford Yapp 35902eb18b Update gdiff man page 2025-11-18 17:11:41 -05:00
Clifford Yapp 648318e0b0 Sort the top level for reporting purposes 2025-11-18 17:11:41 -05:00
Clifford Yapp bea41dd03f Sync verbosity in local opt copy 2025-11-18 17:11:41 -05:00
Clifford Yapp a519bfebb1 Improve output column alignment 2025-11-18 17:11:41 -05:00
Clifford Yapp 03d8ac73f2 Verbose reporting support 2025-11-18 17:11:41 -05:00
Clifford Yapp 5f89d68431 Remove SsdeepNET license and unused header, add TLSH license 2025-11-18 17:11:41 -05:00
Clifford Yapp a5d3990036 Add cached hashes read/write
In order to support redoing diffing without forcing an
expensive recalculation of hashing values every time,
we want to support writing out and reading back
cached values from a file.
2025-11-18 17:11:41 -05:00
Clifford Yapp ed308be463 Consolidate hashing of names and geometry, add options to gdiff 2025-11-18 17:11:40 -05:00
Clifford Yapp 9ce816166a Adjust filename bin reporting, default to slower-but-better geom check. 2025-11-18 17:11:40 -05:00
Clifford Yapp 6c649d170e Checkpoint testing of clustering algorithms 2025-11-18 17:11:40 -05:00
Clifford Yapp 8be7434ff1 If we don't have path args or file lists, check cwd 2025-11-18 17:11:40 -05:00
Clifford Yapp 54b2a479ba Make threading for hashing a theoretically configurable option. 2025-11-18 17:11:40 -05:00
Clifford Yapp d1dd14d0fb Checkpoint testing for parallel speedups 2025-11-18 17:11:40 -05:00
Clifford Yapp 2ae9cf252d Checkpoint scalability experiment 2025-11-18 17:11:40 -05:00
Clifford Yapp 794123b50c Checkpoint work (AI assisted) trying to improve reporting for various options. 2025-11-18 17:11:40 -05:00
Clifford Yapp 4f0985043c Sort files to process newest to oldest in order to 'seed' groups with the newest file as the key. Seed the name data to make sure we get non-zero hashing even for short inputs. Report all groups, even if only one member. 2025-11-18 17:11:40 -05:00
Clifford Yapp 70328079c2 Remove ssdeep - not a good fit for gdiff
The ssdeep algorithm is sensitive to addition/removal of data mid-file, which
is entirely likely when comparing .g data.  tlsh seems to do better in that
regard.
2025-11-18 17:11:40 -05:00
Clifford Yapp 37d4fe6621 Checkpoint work on making grouping more flexible. 2025-11-18 17:11:40 -05:00
Clifford Yapp ba680e2fb9 Set up to support more options for grouping 2025-11-18 17:11:40 -05:00
Clifford Yapp e92cb441b4 Nope, we do need to assemble the string - way faster than incremental update calls 2025-11-18 17:11:40 -05:00
Clifford Yapp 8a6dbc7505 Looks like we don't need to assemble a string. Sort the names before hashing. 2025-11-18 17:11:40 -05:00
Clifford Yapp dfb9d8b2cd Clear gcc warning 2025-11-18 17:11:40 -05:00
Clifford Yapp 0457b146aa Stash a levenshtein routine for unsigned long long vectors. 2025-11-18 17:11:40 -05:00
Clifford Yapp 09a3b26273 Experiment with TLSH hashing
ssdeep properties may not be a good match for what we're wanting to do
here, so set up a version of the tlsh algorithm to test out.  Leaving
ssdeep for now in case it ends up being useful later.

May need to try out Levenshtein distance as well - current idea is to
hash all the bu_external data of the objects with bu_data_hash, assemble
a sorted set of all those unsigned long long values, and then treat the
arrays of those values as input sequences for a Levenshtein distance
calculation - that could let us get a sense of how many objects have
changed geometry between two files. We could also independently do
something similar instead of the hash-the-string-of-names trick we are
currently trying...

Another trick to try might be to get editing distance metrics for file
names and pre-bin similarly named files for closer study.
2025-11-18 17:11:40 -05:00
Clifford Yapp abe4e79f77 test name-only check 2025-11-18 17:11:40 -05:00
Clifford Yapp 92c762ea7b Add some more methods for incremental hashing 2025-11-18 17:11:40 -05:00
Clifford Yapp 3f3bd8f56e Tweak wording 2025-11-18 17:11:40 -05:00
Clifford Yapp 41c3211566 tweak comments 2025-11-18 17:11:40 -05:00
Clifford Yapp 55f2b4bb73 h == c check is unnecessary 2025-11-18 17:11:40 -05:00
Clifford Yapp ed5bacba5f Message if no groups were found. 2025-11-18 17:11:40 -05:00
Clifford Yapp b26305f7e9 A 0 threshold is pointless, use 1 as a minimum 2025-11-18 17:11:40 -05:00
Clifford Yapp 835e547cdb Update to use a streaming read rather than loading whole file. 2025-11-18 17:11:40 -05:00
Clifford Yapp f6d3ed6b73 List SsdeepNET.txt for CMake 2025-11-18 17:11:40 -05:00
Clifford Yapp cb045aaa71 Print all paths for exact hash matches 2025-11-18 17:11:40 -05:00
Clifford Yapp 076c31c1e1 Calculate fuzzy hashes and do comparisons. 2025-11-18 17:11:40 -05:00
Clifford Yapp c2261573b7 Stub in a gdiff hook for grouping 2025-11-18 17:11:40 -05:00
Clifford Yapp 460c29c3dc Add a C++ translation of SsdeepNET
Want to test out the ssdeep fuzzy hashing algorithm to group similar .g files.
Of the available implementations, SsdeepNET has an MIT license but was
implemented in C#.  Tried out Github Copilot to see if it could produce a C++
version of the SsdeepNET code.  A basic test with the gdiff regression test
examples seems to produce reasonable results, so go ahead and stash the header.

Next up will be to figure out a good way to analyze a lot of files to identify
and report groupings.
2025-11-18 17:11:40 -05:00
Clifford Yapp 6c265fa22d Remove unused headers 2025-11-18 15:49:04 -05:00
Clifford Yapp dde2208e4c The gcv non-Tcl ascv5 reader couldn't handle the pinewood brep due to multi-line content - improve the parsing to handle it. 2025-11-14 13:00:42 -05:00
Clifford Yapp ca70eaa4dd Remove duplicate inner tread cut subtraction. 2025-11-14 12:02:30 -05:00
Andrea Braghin 7e5466a594 cleaning up 2025-10-22 11:31:18 +02:00
Andrea Braghin 7b77bcd47d correction based on mentor's feed back 2025-10-20 16:22:20 +02:00
Andrea Braghin c948e395ba update for section_solid 2025-10-18 14:45:51 +02:00
Christopher Sean Morrison 95412a3f51 missed a to_string 2025-10-08 09:27:45 -04:00
Christopher Sean Morrison 4369761ca7 still lacking local dev to avoid stupid mistakes, fixed std:: to c-str conversion 2025-10-08 08:33:13 -04:00
Andrea Braghin efb6eb8bfe fix for section title and forgotten changes 2025-10-08 09:31:01 +02:00
Christopher Sean Morrison 657c200890 some compilation fixes for being too hasty 2025-10-08 01:35:36 -04:00
Christopher Sean Morrison e135dbe81f header cleanup 2025-10-07 23:42:25 -04:00
Christopher Sean Morrison 299041295c plurality typo 2025-10-07 23:37:19 -04:00
Christopher Sean Morrison c6a08b773c test commit 2025-10-07 18:29:57 -04:00
Christopher Sean Morrison 7a0ae8845f add -P option and propagate setting for the max number of cores 2025-10-07 18:15:31 -04:00
Andrea Braghin ec4895a3b3 small mistake 2025-10-07 11:24:44 +02:00
Andrea Braghin ef22044d10 cleaned updated branch with tested code 2025-10-05 20:04:11 +02:00
f4alt fb88a55230 add todo for recent notes / fixme's
should address 98eab98f6a and f5b9e8a7e5
2025-10-01 18:22:39 -04:00
Christopher Sean Morrison 98eab98f6a leave a note to revisit the gqa and rtarea grid size 2025-09-30 15:08:32 -04:00
Christopher Sean Morrison f5b9e8a7e5 drop to 8 samples temporariliy for production testing 2025-09-30 15:06:13 -04:00
Clifford Yapp 1a9c712da5 Add workaround for broken OSX signal header 2025-09-26 11:20:11 -04:00
Clifford Yapp 329aca0f5b Get DSP NMG tessellation method working
Existing DSP tessellation via the librt rt_db_tess callback was
impractically slow, and the facetize command had been using the CM
fallback method (marching tetrahedrons) as the next best viable way to
produce a DSP mesh output.

This fix implements a basic meshing routine for digital elevation map
data that will complete within a reasonable timeframe - under 2 seconds
for the example terra.g file's terra.s primitive.  It does not
(currently) implement any of the more sophisticated terrain meshing
algorithms for the surface mesh, but it DOES go to some trouble to
generate a "bottom" mesh that closes the volume which is sparser than
the naive "every active cell gets 2 triangles" method.

This is not the more sophisticated terrain meshing I had originally
hoped to achieve (although that may still come one day.)  However, in
the meantime it *is* still a user visible improvement working right now
so I'll go ahead and put it in.
2025-09-26 00:01:00 -04:00
Clifford Yapp d7bfefff5f Initialize 2025-09-24 21:48:15 -04:00
Clifford Yapp 60a217304a earcut.hpp steiner isn't equivalent to detria steiner, looks like - go back to passing if supplied. 2025-09-24 15:11:46 -04:00
Clifford Yapp 79b2066627 Improve performance of nmg_mdl_to_bot for all triangle case
Testing new DSP tess code, I observed a successful conversion that was spending
virtually all of its time (a LOT of it - order of minutes for what should have
been a couple seconds) in the nmg_mdl_to_bot code.  That's nonsensical, since
there's no real work to do (the data is already all triangles to begin with)
but it turns out that the nmg routine (which is probably a lot slower than it
shoudl be anyway) has REALLY serious scaling problems when presented with
something like a high-triangle count terrain model.

Rather than work around the problem (again), this time we actually introduce
into the nmg code itself a fast path that recognizes when we have the trivial
case and directly writes the data without further processing.  It doesn't fix
what's likely a host of other issues with nmg, but at least in this (extremely
common) case we should get tolerable performance now.
2025-09-24 14:05:06 -04:00
Clifford Yapp 6834c65b40 Update TODO file 2025-09-24 14:02:22 -04:00
f4alt 04b41f1d93 allow longer file names for output
Names can get truncated when saving a rt a couple levels deep in a fs
(like, windows temp dirs). Windows has the smallest limit at 260 (mac
1024, linux 4096) so we can safely double our existing size.
2025-09-24 13:48:43 -04:00
f4alt 8435d568ec expose option to specify output dir 2025-09-24 13:48:43 -04:00
f4alt 1598fcb9da need to have grid_step of atleast 1 2025-09-24 13:48:43 -04:00
Clifford Yapp aa416698af Whoops, use NEAR_EQUAL 2025-09-24 12:40:55 -04:00
Clifford Yapp 016da8ac71 earcut.hpp expects certain loop orientations - enforce that before calling. 2025-09-24 10:47:26 -04:00
Clifford Yapp 22bf0eb81f ws 2025-09-24 10:42:13 -04:00
Clifford Yapp 7e1d021157 Newer earcut.hpp added steiner point support, so enable it for TRI_EAR_CLIPPING bg_nested_poly_triangulate method. 2025-09-24 09:52:27 -04:00
Clifford Yapp 5b433c3fe5 Update earcut.hpp to f36ced7 (latest as of 2025-09-24) from https://github.com/mapbox/earcut.hpp 2025-09-24 09:44:14 -04:00
Clifford Yapp 13bc4adc25 Break the dsp tess function out into its own file 2025-09-24 09:37:10 -04:00
Clifford Yapp 6aca54d93e Missed an IndexType->index_t 2025-09-21 13:01:45 -04:00
Clifford Yapp e0423d822e Fix for OSX Wdocumentation 2025-09-19 21:28:56 -04:00
Clifford Yapp d688aac07c List files for CMake 2025-09-19 21:27:25 -04:00
Clifford Yapp f375218378 Add BallPivot implementation
https://github.com/isl-org/Open3D/blob/main/cpp/open3d/geometry/SurfaceReconstructionBallPivoting.cpp
is used as a starting point for an AI-assisted translation of the ball pivot
algorithm implementation into something that works with BRL-CAD data types.

Adding this because it appears to constitute a functional implementation of the
methodology, but in actual practice it seems to be tricky to use well and the
Screened Poisson approach looks like a better fit for BRL-CAD's use cases.

Deliberately leaving undocumented - the work is worth preserving, but for most
situations it won't produce the manifold output a user is looking for.
2025-09-19 12:16:52 -04:00
Clifford Yapp 3998066d5c Remove ballpivot comment 2025-09-18 17:27:30 -04:00
Clifford Yapp 7b79469025 Add the SPSR meshing methodology to the pnts cmd
Previously this was only exposed indirectly via the facetize command, where it
was combined with decimation to be a fallback method of turning primitives into
triangles when MGED doesn't work.  However, SPSR itself actually takes point
clouds with normals, which is what the pnts command generates, so to allow for
easier experimenation and more control we can expose the method directly for
arbitrary point clouds: "pnts tri spsr input.pnts output.bot"

This is an outgrowth of experimenting with the Ball Pivot and Power Crust
methodologies to see if they would be useful, but neither is looking promising
in early testing so only the SPSR exposure and refactor to support bu_cmdtab
addition of other methods via new subcommands has been migrated back to main.

Ball pivot can produce meshes in some cases but they're not very good and
may need a lot of fiddling with the radius parameter - not to mention it seems
to be pretty easy to specify parameters that cause very long run times.

Power Crust I didn't explore as much, but it doesn't seem to be very well
suited to the arbitrarily complex shapes we might be throwing at it from
CAD geometry so I doubt it would provide us anything SPSR doesn't already.

Main reason to merge this in is to make it easier to try out new methodologies
currently being developed - Sean indicated there are some new approaches to
this problem that have been developed in the last couple years so this should
give us a convenient way to kick the tires for our use cases.
2025-09-18 16:29:06 -04:00
Clifford Yapp 5cb6ee6466 Use bu_cmdtab for pnts subcommands 2025-09-18 16:02:09 -04:00
Clifford Yapp e9594193bf Remove stub for winding number experiment 2025-09-18 15:48:32 -04:00
Clifford Yapp 0515e6b0bc Use max_digits10 2025-09-18 15:46:56 -04:00
Clifford Yapp 4e4f23cc2f Update repocheck to avoid the broken strnstr and incorporate a variety of improvements in the scanning logic. 2025-09-10 17:07:20 -04:00
Clifford Yapp 400037e12d Add brledit editor as a last-resort fallback
Originally based on https://github.com/troglobit/mg

We went with pico/nano style key bindings rather than emacs-style, since the
latter is more complex to deal with for a casual user.  Anyone wanting more
powerful editing capabilities is also likely to have their preferred editor
set up - the envisioned use case for this is constrained/last-resort cases
where the only option is to use what is available.

The original code has been extensively reworked, simplified, etc. to produce a
minimalist console editor that can work both on Linux/OSX/etc. type systems and
the various Windows console environments.  The latter in particular are very
difficult to deal with, and there will likely be various corner cases we
don't/can't handle well, but brledit has demonstrated the ability to edit a
file in PowerShell, Command Prompt and git bash.

Typically, the only environment where we might not have access to at least a vi
editor is a headless Windows server.  If we're going to maintain console mode
on a Windows desktop without 3rd party editors installed brledit also comes
into play , but in that situation we can generally also fall back on local GUI
editors to get the job done as well.  In one sense yori's yedit, a Windows-only
console editor and our previous last resort, covers the only truly problematic
case.  Running in git bash, for example, we will generally have nano available
and so not need brledit.  However, the switch is still worthwhile - brledit is
both a much smaller code footprint than yori and also works on POSIX type
systems in case some unforseen circumstance DOES end up making having our own
fallback there desirable or necessary.

In addition to brledit itself we have added new logic to the libtermio.h header
to deal with the requirements of its interace, which are much more extensive
than any of the other BRL-CAD utilities still leveraging libtermio.h.  Previous
functionality was left in place, so the libtermio.h header update should
introduce no behaviorial changes in other tools.

This commit also swaps brledit in for yedit in bu_editor logic and removes the
yori directory we previously added to support compiling yedit as part of
BRL-CAD.
2025-09-10 13:54:19 -04:00
Clifford Yapp 30f2eea134 Initialize the opendb_ctx structs 2025-09-09 15:03:54 -04:00
Clifford Yapp bccb3733e6 Don't create an LoD cache unless we need it. 2025-09-09 12:00:36 -04:00
Clifford Yapp a8100c3c40 Note update of geogram dependency to v1.9.6 2025-09-03 14:15:56 -04:00
Clifford Yapp 543fcb20c0 linenoise improvements on Windows are user visible with cmd line NIRT - note. 2025-09-03 14:12:04 -04:00
Clifford Yapp d0584fcc3c Merge pull request #199 from BraghinAndrea/main
Corrected wrong title at the beginning of sphere.h
2025-09-02 20:51:22 -04:00
Andrea Braghin 1893fba3e1 Corrected wrong title at the beginning of sphere.h 2025-09-02 23:32:21 +02:00
Clifford Yapp 988ffe218a Make similar adjustments to scheduled.yml 2025-09-02 17:06:37 -04:00
Clifford Yapp 8ec1c1f4ca Temporarily set MacOS runner to macos-14
Apparently macos-latest got retargted to macos-15 at some point in August,
which would explain why we saw the abrupt behavior change.  We're still seeing
the timeout issues trying to run regress-mged, so for now try targeting
macos-14 until we can get to the bottom of it.
2025-09-02 17:03:04 -04:00
Clifford Yapp a6367226f0 Be more selective about when we use Win32 console
For some Windows terminal environments like git bash (or VT aware consoles), we
want to handle things the way we would for other terminals.  If that doesn't work,
we need to fall back on the old-school console code path.

We want to have applications work in all those enviornments, so check up front
to detect what we're dealing with and set up our I/O handling accordingly.
2025-09-02 14:41:12 -04:00
Clifford Yapp f1ab0c1760 ws, astyle 2025-09-02 10:06:13 -04:00
Clifford Yapp f20125a26a Use make on OSX, break build, check and package out into separate steps. 2025-09-02 09:51:27 -04:00
Clifford Yapp a15de384ad Unused vars - do we need these? 2025-08-31 13:58:37 -04:00
Clifford Yapp db6809643e Add workaround for broken Xcode signal.h header
Apparently Xcode 16.4 has a broken signal.h header that uses NSIG but
doesn't define it.
2025-08-30 23:42:47 -04:00
Christopher Sean Morrison 72d69f3ceb Merge pull request #198 from BraghinAndrea/ErrorBuild
initial support for Element Discrete Sphere entities
2025-08-30 18:29:06 -04:00
Clifford Yapp 6225b7f4a6 Check OS environment as well as bext SHA1
A bext build may be invalidated by more than just a change in the upstream
sources - it may also need to be rebuilt if the operating system or compiler
changes.  Make a stab at incorporating that information into the cache process.
2025-08-29 14:58:43 -04:00
Clifford Yapp 7a6460628c Add some notes about new issues on MacOSX
Gah.  Not 100% sure, but it seems as if the GitHub CI system just rolled out
some updates for the macos runners, and they're messing with us.
OpenNURBS suddenly seems to need _DARWIN_C_SOURCE defined or we get the
following error:

In file included from /Users/runner/work/brlcad/brlcad/build_osx/include/openNURBS/opennurbs_system.h:389:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/malloc/malloc.h:177:46: error: unknown type name 'malloc_type_id_t'
  177 |                         struct _malloc_zone_t *zone, size_t size, malloc_type_id_t type_id);
      |                                                                   ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/malloc/malloc.h:181:4: error: unknown type name 'malloc_type_id_t'
  181 |                         malloc_type_id_t type_id);
      |                         ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/malloc/malloc.h:185:17: error: unknown type name 'malloc_type_id_t'
  185 |                         size_t size, malloc_type_id_t type_id);
      |                                      ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/malloc/malloc.h:189:4: error: unknown type name 'malloc_type_id_t'
  189 |                         malloc_type_id_t type_id);
      |                         ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/malloc/malloc.h:194:4: error: unknown type name 'malloc_type_id_t'
  194 |                         malloc_type_id_t type_id);
      |                         ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/malloc/malloc.h:334:2: error: unknown type name 'malloc_type_id_t'; did you mean 'malloc_type_kind_v0_t'?
  334 |         malloc_type_id_t type_id;
      |         ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/malloc/malloc.h:237:3: note: 'malloc_type_kind_v0_t' declared here
  237 | } malloc_type_kind_v0_t;
      |   ^

I haven't managed to get a working configure-time test for the needs
_DARWIN_C_SOURCE yet, so for now just setting the define to get us passed the
build error.
2025-08-29 13:17:34 -04:00
Clifford Yapp ce3bb90970 Don't kick off distcheck on anything but main 2025-08-29 12:01:12 -04:00
Clifford Yapp 959b55db4a Add missing build_parallel ids
The if: conditional for the serial build wasn't properly triggering on failure,
so the continue-on-error flag resulted in the OSX build looking like it
succeeded to the CI even when it didn't.
2025-08-29 10:22:02 -04:00
Clifford Yapp 8ba596631a Set up GitHub CI logic to run distcheck targets
The full distcheck target is too big to run as a single job within the
GitHub CI confines, but it turns out there's another way to get at it.
We already define individual build targets for each configuration, and
each individual target fits within the 6 hour limit for a single step.

Accordingly, if we define separate jobs for each distcheck target in the
yaml file, rather than trying to use the top level CMake distcheck build
target, we can avoid hitting the per-job limit.  The overall limit for
the entire process is longer, so even running in series we can stay
under both limits as long as we do one target at a time.

The catch is we don't want to hard code the list of distcheck targets in
distcheck.yml - that's an invitation for the .yml file to get stale and
out of sync as more configurations are added to distcheck.   The
workaround is to have BRL-CAD's CMake logic that sets up distcheck
targets also prepare an autogenerated distcheck.yml file, and then do a
comparison with the live copy in .github/workflows/distcheck.yml If they
are out of sync, the configure halts and instructs the developer to sync
the copies.

We deliberately don't write the new distcheck.yml directly into the
source tree.  This is the same pattern as the INSTALL file, which also
gets updated automatically, and the decision there as well was to
respect the "source tree is not altered by build logic" rule even though
it requires an extra manual step to do the updating.  The distcheck
target list does not change often, and this will catch the potential
syncing issue on those rare occasions when it does.
2025-08-29 07:32:55 -04:00
Clifford Yapp 912a61af72 Call out GDAL v3.11.3 version bump in NEWS 2025-08-28 19:27:31 -04:00
Clifford Yapp ad91dec028 Bump libpkg error msg buffer size
One of the GitHub CI runners had a long enough path that it hit the 128
char limit.  Need to pick some value, so going with the fallback default
for MAXPATHLEN from common.h plus a little extra for message chars.
2025-08-28 19:24:40 -04:00
Clifford Yapp 9b0d1ca7fe Bump bext SHA1 to get GDAL v3.11.3 2025-08-28 16:35:42 -04:00
Andrea Braghin a421ffff6c clean up for shpere 2025-08-28 17:49:59 +02:00
Clifford Yapp 843613e1cf Round two - dependent execution of CI tests
This update to the GitHub CI yml files will attempt only the basic Ubuntu GCC
and Windows Ninja builds out of the gate.  If they succeed, other tests
dependent on those tests are executed - this avoids firing off a lot of extra
work if our base configurations are broken.

We also introduce caching of bext dependencies here.  It is MUCH more typical
for our bext to be stable while the main BRL-CAD repository is changing
quickly, so there is no need to rebuild bext every time we want to test the
main repo.  Previously we hadn't worked out out to use the GitHub mechanisms
for this, but with some Copilot AI assistance we now have a working setup.  If
bext changes it will still be necessary for the first BRL-CAD push that
encounters it to rebuild, but if we have a stable bext the actual BRL-CAD tests
should be considerably faster since we can now reuse previously built bext
binaries.

We also introduce a once-per-night run of the full bext-during-configure
integration.  BRL-CAD's configure needs to be able to build bext itself at need,
but the above optmiization actively avoids triggering that logic path.  Since
that test is more expensive, but we still want to know fairly quickly when it
breaks, we go with a once-a-day test of that mode on all platforms.

We have also moved the static analyzer and lcov builds to the once-per-day
mode - the static analyzer in particular is a relatively expensive build, and
we can generally spot fairly quickly from its output where issues would have
been introduced in a relatively small changeset.
2025-08-28 11:04:43 -04:00
Clifford Yapp d240de3a36 Revert "Try conditional execution of more complex tests"
Need to test this in fork and make sure a known state works before
trying to go live in main - restore previous version.

This reverts commit 69a369fbd6.
2025-08-26 23:19:32 -04:00
Clifford Yapp 69a369fbd6 Try conditional execution of more complex tests
Per suggestion from Sean, see if we can make our CI tests a little more
measured - only try the other platforms if the Linux build succeeds,
and only try the static analyzer and code coverage if all platforms are
building and running.  This will take longer than executing everything
in parallel, so we won't get a "fully clean" result as quickly, but
the tradeoff is we don't waste a lot of time testing known broken
configurations on multiple platforms.
2025-08-26 20:07:58 -04:00
Clifford Yapp a5a7356e5c Update to latest bext 2025-08-26 19:28:03 -04:00
Clifford Yapp 5450da6815 Not that fbserv problem was not see running from Command Prompt - seems specific to git bash. 2025-08-26 19:25:38 -04:00
Christopher Sean Morrison ecdd14aecf fbserv and -F option handling appear to be fully broken on windows.
alas, I really needed that to work today.. sad face.
2025-08-25 22:06:52 -04:00
Clifford Yapp daff26637b Set up disabled-by-default code to test librt editing code paths for rot/tra/sca. 2025-08-25 20:57:29 -04:00
Clifford Yapp 9285ca75f8 Refactor logic to be better able to test either MGED or librt editing code paths. 2025-08-25 19:54:20 -04:00
Clifford Yapp a6fd65b793 Refactor rate flag checking, adjust calibrate logic to better match older MGED code 2025-08-25 15:07:42 -04:00
Clifford Yapp 7ff9a3b60c Use the more compact token_should_edit test to check if we have an edit cmd 2025-08-25 14:24:16 -04:00
Clifford Yapp 96ae53c92e Use bv_knobs_cmd_process for view changes.
Reduce knob_apply functions to edit case
2025-08-25 14:10:41 -04:00
Clifford Yapp a7cdc54222 Refactor token handling in chgview.c 2025-08-25 13:42:53 -04:00
Clifford Yapp 13f2a4e2b5 Define precompile headers before setting other target properties. 2025-08-25 11:11:59 -04:00
Clifford Yapp 316871bb62 Refine how _view_mutation_hash is calculated, sync model2objview matrix. 2025-08-25 07:04:20 -04:00
Clifford Yapp 0d9caf39d0 Whoops - revert was incomplete somehow. Finish undoing fef9c66aa6 2025-08-25 06:57:29 -04:00
Clifford Yapp bc9ba268ec Revert "Use librt and libbv knob logic for MGED f_knob"
Not ready for the librt editing - back out.  libbv knob logic we could
do, but the librt editing code will need working per-primitive
processing of rot, tra, sca operations for all primitives.  Not even
close yet, and that's work to do in a branch.

This reverts commit fef9c66aa6.
2025-08-24 22:45:37 -04:00
Clifford Yapp 250beea9c3 Add hasher for libbv knobs struct 2025-08-24 22:33:58 -04:00
Clifford Yapp da6b0e53c5 Add -k option to experimental view knob command 2025-08-24 22:33:23 -04:00
Clifford Yapp e5760820e6 Add "o" and "k" coordinates support to bv_knob_rot
Missed those cases in the initial port, or rather oversimplified it.
There is a case during editing where "o" is different from the view
case, so we will need it to express the full capabilities of the MGED
logic, and we also will need "k" for specifying keypoints.
2025-08-24 17:36:39 -04:00
Clifford Yapp 9bf114b5fc Merge pull request #196 from Elastino2/main
Remove documentation error in clang
2025-08-22 23:45:45 -04:00
Clifford Yapp b10cfa66bd Adjust bv_knobs_* and rt_knob_edit_tran signatures. 2025-08-22 21:33:31 -04:00
Clifford Yapp fef9c66aa6 Use librt and libbv knob logic for MGED f_knob 2025-08-22 19:25:44 -04:00
Clifford Yapp 921557b241 Use the librt rt_edit struct for most of the MGED edit state data. 2025-08-22 13:06:09 -04:00
Clifford Yapp 8c444578a5 Call out some variables that are still globals. 2025-08-22 11:54:12 -04:00
Clifford Yapp 9704933497 Remove unused defines 2025-08-22 11:45:19 -04:00
Clifford Yapp 86364862c3 Use bv_knobs_reset in mged_svbase 2025-08-22 11:41:53 -04:00
Clifford Yapp 340ed1b106 Add comment about interaction of MGED knob command with editing states. 2025-08-22 11:28:38 -04:00
Clifford Yapp ff54ab1985 reorder to remove forward declarations 2025-08-22 11:22:39 -04:00
Clifford Yapp 0d99e5f124 Remove unused function 2025-08-22 11:14:42 -04:00
Clifford Yapp 5c798ac95e Use a local matrix rather than 'borrowing' incr_change in this function. 2025-08-22 11:12:11 -04:00
Clifford Yapp c67bdcfb8b Add a specific wrapper for libged view cmd
Since we have knob info in the MGED viewstate but libged can only operate on
the libged copy of the view, we need to do some extra work to have "view knob"
commands impact MGED.  (Originally tried to consolidated around using ged_gvp
in MGED, but in multipane that's a problem since we really do have multiple
views.  Need to do a more careful parsing of MGED's view management and how it
interacts with libged - probably some things to fix there, particularly in
multipane - but for now focus on getting view knob working.)
2025-08-22 10:59:52 -04:00
Clifford Yapp b24fb4faca Probably not needed 2025-08-22 10:09:45 -04:00
Clifford Yapp 76c2c614d8 Add a way to sync two bview_knobs structures 2025-08-21 17:16:44 -04:00
Clifford Yapp e179c5ada2 Rework f_knobs command to consolidate logic
This eliminates the giant switch table, but doesn't loop in the librt
refactorings of any of the logic since that is a likely source of the
bug we were encountering earlier.
2025-08-21 16:40:25 -04:00
Clifford Yapp df98ea7a12 More unused global variable removal. 2025-08-21 14:09:05 -04:00
Clifford Yapp bfe165ad87 Remove unused global vars 2025-08-21 14:06:20 -04:00
Clifford Yapp 8e0a25ddaf Use a bview_knobs struct in view_state 2025-08-21 14:03:41 -04:00
Clifford Yapp 05b9febd2c Remove stray unused global 2025-08-21 13:38:56 -04:00
Clifford Yapp 2fea350f79 Use bview knob structure to hold rotate/tran/scale info 2025-08-21 13:35:06 -04:00
Clifford Yapp bb36df4d24 Call nirt rather than qray_nirt 2025-08-21 13:11:54 -04:00
Clifford Yapp 61c2ea62ec Move some more globals into mged_edit_state 2025-08-21 13:05:12 -04:00
Clifford Yapp ca398d9251 Refactor logic for handling scroll menus 2025-08-21 12:54:14 -04:00
Clifford Yapp 78b4917a66 ws 2025-08-21 12:46:40 -04:00
Clifford Yapp 864efba1e9 Remove unused variable 2025-08-21 12:43:02 -04:00
Clifford Yapp 6fed17bd77 Improve readability of motion_event_handler conditional checks 2025-08-21 12:03:01 -04:00
Clifford Yapp 79f25e6b2f Move parameter input globals to mged_edit_state 2025-08-21 11:47:00 -04:00
Clifford Yapp 922f5f5736 Move various editing globals into mged_edit_state 2025-08-21 11:38:04 -04:00
Clifford Yapp 623ea3a718 Move GEOM_EDIT_STATE global into mged_state 2025-08-21 11:19:43 -04:00
Clifford Yapp f14db9fca5 Move a few more globals into the mged_edit_state. 2025-08-21 11:14:45 -04:00
Clifford Yapp 21addbc1ca Relocate a few globals into the mged_state struct. 2025-08-21 11:05:39 -04:00
Clifford Yapp 7972de2bf3 Reapply change to use libged functions for set and clear editor ops. 2025-08-21 10:50:57 -04:00
Clifford Yapp 3a35e2442a Sort filenames, formatting 2025-08-21 10:36:55 -04:00
Clifford Yapp 105cdc861c Pull in changes to librt editing codes from the mged_reapply branch. Mainly fixes to label logic. 2025-08-21 10:34:26 -04:00
Clifford Yapp 5c77e9105b Remove IR_KNOBS and IR_BUTTONS ifdef codes (reapplies 931803312c) 2025-08-21 10:31:06 -04:00
Clifford Yapp b532eb8af2 Make edit state a separately allocated struct
Hmm.  Re-applying the MGED changes is proving a bit tricky - somewhere in the
refactor an editing state was mishandled, manifesting in an incorrect
appliation of tra logic (at least) when repeated edits are made in MGED.  To
help try and zero in on the issue, need to reapply safe changes to MGED main to
help minimize the differences between the working and non-working states (as
well as getting at least some of the refactoring reapplied.)

Note:  to reproduce the issue, the following works with moss.g from the MGED
cmd prompt:

facetize LIGHT light.bot
e light.bot
sed light.bot
tra 10 10 10
reject
sed light.bot
tra 10 10 10

The second tra in the sequence doesn't produce the same result as the first.
2025-08-21 10:20:04 -04:00
ChangJoon Lee 68ad20e42c Remove documentation error in clang 2025-08-21 17:39:18 +09:00
Christopher Sean Morrison 868ad46c77 issue isn't limited to -j flag, looks like -H and -J are also nfg 2025-08-20 19:31:48 -04:00
Christopher Sean Morrison 84b622f4a2 rt -j subrect ignores the output file type, assumes fb causing pix data to get written 2025-08-20 18:50:42 -04:00
Christopher Sean Morrison 494385bbe4 Add two more test cases pertaining to SCR3506, one non-planar, one concave. 2025-08-20 16:13:19 -04:00
Clifford Yapp b8bdc1ba62 Bump bext to get geogram v1.9.6 + patches to 35cf7d6 2025-08-20 09:44:47 -04:00
f4alt 597257173e need to apply /bigobj for building spsr.cpp
recent spsr change will error out when building debug Windows in visual
studio without /bigobj
2025-08-19 16:36:31 -04:00
Clifford Yapp d5897bfd93 Switch librt to using mmesh instead of gct_decimation
With the new version we need to supply stride in bytes, and optimization
needs sizeof rather than MD_FORMAT_INT.

We will be using the CONFIG style find_package for mmesh.

Compared to the old gct code, mmesh interpretes feature size a bit differently.
The old code's sensitivity to feature size was a fourth power formula, while
the new code uses a sixth power. The BRL-CAD code tries to adjust for this, but
there may also be other internal changes and the decimation results will most
likely still be a bit different.  Overall the tendency will be to produce finer
meshes for the same feature size, which will preserve detail better but also
result in more triangles as compared to the original settings.
2025-08-19 16:13:36 -04:00
Clifford Yapp 5c4927245f Not linking SPSR anymore - remove this option 2025-08-19 12:45:19 -04:00
Clifford Yapp 7cb2386d08 Update BRL-CAD code to use the Manifold v3 API
This conceptually reverts commit 11edd29f1a, with various other changes
included as well to adapt to the newer behaviors of Manifold v3.

Due to the intenral use of doubles in Manifold v3, we need to do our own
preliminary binning-based decimation of input plate mode bots in order to (more
or less) dupliate the implicit simplification (and corresponding performance
boost) we were seeing with Manifold v2 for surface extrusions.

We use a maximum allowed surface area delta metric and a minimum threshold
triangle removal count to decide when the mesh can be simplified, defaulting to
requiring that at least 20% of the original mesh triangles be removed for an
area change penalty of less than 1%.  This lets us avoid expensive boolean operations during extrusion
that have little to no impact on the final mesh shape or volume.

Both of those percentages are user settable, so the user can opt to pay the
penalty of not simplifying, but at least with current Manifold algorithms the
penaltiy is occasionally *severe*. Performance hits on the order of seconds
turning into minutes have been seen for relatively small meshes (less than 600
faces) when their structure is particulary hard for Manifold to handle.

We have also disables intermediate status checks for better performance - per
guidance from Manifold devs, doing these checks really slows down processing.
Recent boolean eval fixes have addressed boolean failure cases that we were
using the Status() checks to avoid.

At least at the moment we aren't set up to show images in the Github CI output
(something to look into to see whether it is possible) - as a short term
work-around we printed out debugging output ascii art images of diff images to
be able to see what sorts of deltas were manifesting on the CI runners.
Unsurprisingly, the meshes produced by facetize with the new double-based
Manifold were subtly different, so we have update draw images for the new
expected Manifold outputs.
2025-08-19 10:12:24 -04:00
Christopher Sean Morrison 106246b05f say fewer word, half dozen fewer lines 2025-08-19 02:05:06 -04:00
Clifford Yapp 1756219319 Suppress compiler warnings from Eigen and SPSR
Yeesh.  SPSR triggers quite a few clang warnings, at least in static
analyzer mode, and Eigen is triggering some as well.

While we're at it clear a couple static analyzer warnings.
2025-08-18 21:59:11 -04:00
Clifford Yapp 5a82d0e146 clang is giving us -Wunused-parameter warnings from SPSR - suppress them just for that header. 2025-08-18 16:45:05 -04:00
Clifford Yapp eecc6e67ea Correct BRLCAD_EXT_DIR - not using bext_output anymore 2025-08-18 14:52:23 -04:00
Clifford Yapp c0fce2a1ed Correct bext sha1 warning messages. 2025-08-18 14:31:12 -04:00
Clifford Yapp 55f81dd31f Test out target_precompile_headers with the step-g build. 2025-08-18 14:00:09 -04:00
Clifford Yapp c3a3fbf21e Correct clone line in clang-static-analyzer-run.sh 2025-08-18 12:51:05 -04:00
Clifford Yapp cb01e9541a Note update of SPSR dependency version to upstream v18.74 (removes old embedded copy) 2025-08-18 10:34:47 -04:00
Clifford Yapp 341da646fe Explicity set ASYNC threading to be clear we're doing multithreaded
Also update bext sha1 to get PoissonRecon submodule, and update SPSR license
file
2025-08-18 10:34:47 -04:00
Clifford Yapp 29cde62ed4 AI for the win again - update to newest PoissonRecon API. 2025-08-18 10:34:47 -04:00
Clifford Yapp 74ed2c8782 Confirm SPSR update is now working with v16.10
So, good news is it works - moss.g facetized successfully with the SPSR method!
Bad news is the upstream changed the API again and the latest (v18.74 as of
this writing) doesn't compile, so we'll need to update it again.
2025-08-18 10:34:47 -04:00
Clifford Yapp 612491ac3b Note targeted version (apparently things have changed upstream since Aug. 2024) 2025-08-18 10:34:47 -04:00
Clifford Yapp a84d8b5640 Github Copilot GPT-4.1 spotted an indexing error in the face assignments. 2025-08-18 10:34:47 -04:00
Clifford Yapp 4d7c7524dd Reapply "Update libbg SPSR to use upstream header-only mode"
This reverts commit 8ca81d575a.
2025-08-18 10:34:47 -04:00
joshbaker22 7c4455d3ea Update gqa.xml - removed extra > after p (under analysis flags) 2025-08-18 10:08:31 -04:00
Clifford Yapp 07f3d66da5 Use bu_file_delete instead of std::remove 2025-08-17 01:18:09 -04:00
Clifford Yapp 5e54a73797 Add error case if all THREADLOCAL attempts fail
Per suggestion from Sean, make the failure to define THREADLOCAL
explicit.
2025-08-17 00:13:30 -04:00
Clifford Yapp fc7c51af95 Define THREADLOCAL to use for per-thread storage
How to properly identify per-thread storage varies somewhat with
different standards and platforms - boil the various cases down to a
THREADLOCAL encapsulation we can use in our code.
2025-08-16 23:07:18 -04:00
Clifford Yapp bf8c450c0e Adjust the link-time flag being used to suppress the bitv[2] warning
Our bitv_t bits[2] member triggers warnings such as the following:

warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] *out++ &= *in++;

We deliberately over-allocate extra memory for bits so we have something to
access, but per C99 this is undefined behavior: array subscripting a[b] is
defined as *(a + b) (C99 6.5.2.1p1) and pointer addition is only defined within
the same array object or one past its last element (C99 6.5.6p8). Accessing
elements bits[2]..bits[n-1] therefore goes outside the declared array object
and is UB (cataloged in Annex J.2: “array subscript is out of range” / “pointer
outside bounds of an array object”).

The current approach was used before C99 added flexible array member support
(and is still working, which is why we haven't changed it) but in theory a
sufficiently strict standards-compliant environment might someday break it
(hence the compiler warnings.) Since the "proper" fix would be to use a C99
flexible array member and fall back to this approach only in C++ compiling mode
(which only has flexible array members as extensions), we have settled for
suppressing the warning.  However, when we do LTO compilation the link
optimizer triggers another bounds analysis pass that doesn't respect other
warning suppressions we have defined.

We were avoiding a Werror compile failure with the previous compile flag, but
that still left the noisy warning messages in an LTO build.  This switchs us to
a full-on disabling of the warning during the link stage, which avoids printing
the messages altogether.

Now that we're using newer C standards, it might be worth revisiting whether
the bits member array could/should use the C99 approach...
2025-08-15 15:56:59 -04:00
Christopher Sean Morrison 80c82970ee obj choked on anon g line 2025-08-15 10:32:25 -07:00
Christopher Sean Morrison 1112aa942e documenting constants should be concise as possible, not explaining the consequences of floating point..
here the value is used in tests that currently are ranged one signif digit above 1, so we can only check 1e-14 below.  if we turn on fast math or go above two signif digits above, this tol value will need to change.
2025-08-15 10:29:14 -07:00
Clifford Yapp 91b07e70f8 Add explanation of FLOAT_CMP_TOL 2025-08-15 07:03:55 -04:00
Clifford Yapp 8d205f7ab8 Hmm. Looks like storage may be a little different on OSX. Make the test a bit more flexible. 2025-08-14 23:36:08 -04:00
Clifford Yapp 22ac403469 Update all the dbl NEAR_EQUAL checks 2025-08-14 21:33:20 -04:00
Clifford Yapp 7940fb23ef Still too tight? Try 1e-14 2025-08-14 19:05:18 -04:00
Clifford Yapp 50dfdc882b Comparing at SMALL_FASTF may be too much to expect since we're doing multiplication math to make our ctrl value - try 1e-15 2025-08-14 17:03:28 -04:00
Clifford Yapp 892cd0e2b9 Print more digits when dbl read fails 2025-08-14 16:47:20 -04:00
Clifford Yapp 23ae2661ae Just use new and delete for bu_cache_impl 2025-08-14 14:39:14 -04:00
Clifford Yapp f1f28c5ec5 We need C++ setup/teardown for the mutex 2025-08-14 14:36:05 -04:00
Clifford Yapp f5ce194f36 Missed updating a libqtcad test file 2025-08-14 11:33:58 -04:00
Clifford Yapp e2fbadc4bc Add working version of libbu cache API
This gets the rough (and previously unworking) version of the libbu cache API
into a working state, while also adding tests to verify its functionality in
various use cases.

The intent is that this will replace raw usage of the LMDB API in various parts
of BRL-CAD's code.  Not introducing those changes in this commit, since there
are other design considerations at play in those refactorings, but this piece
is self-contained and cleans up the preliminiary cache code that was already
present.
2025-08-14 10:28:57 -04:00
Clifford Yapp 0ebff0578d Get dbi.h out of the public libged header directory
Shouldn't have been in there (at least not in this form) to start with, since
it isn't public API.  dbi.h is an experiment to create a C++ data model of the
.g database suitable for driving a Qt model that can support things like tree
views, but in this form it cannot be suitable as a public API (among many other
issues it exposes C++ containers, and the final form of this may belong in
librt rather than libged anyway.)  The concern in the initial stages was
searching for an implmentation approach that could in theory be performant
enough to scale to enormous databases, rather than isolating containers, so it
needs to be reworked to preserve its performance properties while also being a
proper API.  In any case, shouldn't have this form of the logic in this
location.

Until a more suitable replacement is designed and implemented, libqtcad still
needs it to drive its data model of the database, but it's not exposed in the
public libqtcad API so we can just reference the internal libged header in the
libqtcad implementation files for now.
2025-08-14 09:40:07 -04:00
Christopher Sean Morrison 7c21783f08 Merge pull request #194 from BraghinAndrea/SEATBELT
Refined PR for seatbelt implementation in k-g converter.
2025-08-14 00:50:13 -07:00
Clifford Yapp de35eab67b Revert "Complete removal of deprecated redblack tree from libbu"
Hold off on yanking this for now in case we end up doing a patch release
next rather than another minor version bump.

This reverts commit 842d431172.
2025-08-13 19:49:24 -04:00
Clifford Yapp 4bca9e3f5f Using bio.h - don't need individual includes 2025-08-13 19:22:09 -04:00
Clifford Yapp 3dd6914b57 Stop bot remesh subcmd from clearing output
Was truncating the help message being built up for the bot subcommands.
2025-08-13 16:16:34 -04:00
Clifford Yapp 842d431172 Complete removal of deprecated redblack tree from libbu 2025-08-13 15:49:28 -04:00
Clifford Yapp 48e49319e2 Replace libbu redblack tree with C++ containers in glint 2025-08-13 15:41:06 -04:00
Clifford Yapp dd4b715542 Remove struct prefixes, use nullptr instead of defines, ws 2025-08-13 15:32:04 -04:00
Clifford Yapp ad754d9afd Rework pixcount to use std::map rather than libbu redblack tree 2025-08-13 14:29:38 -04:00
Clifford Yapp 1fdd612143 No longer using git modules in main repo 2025-08-13 06:32:58 -04:00
Clifford Yapp d1e3c1f26b Various adjustments to release steps using Git
Still refining the best way to do various ops with Git tools.
2025-08-12 10:11:12 -04:00
Clifford Yapp 4746275032 Bump to next development revision after tagging the 7.42.0 release 2025-08-11 23:44:43 -04:00
Clifford Yapp b820ce6f9e Update ChangeLog with commits since 7.40.2 release 2025-08-11 16:50:22 -04:00
Clifford Yapp 127d915986 Bump version numbers for 7.42.0 release 2025-08-11 16:49:24 -04:00
Clifford Yapp 621f740050 Merge branch 'main' into RELEASE 2025-08-11 16:46:38 -04:00
Christopher Sean Morrison 38d96748e1 looks like we're done, start release steps 2025-08-11 02:56:35 -07:00
Christopher Sean Morrison 24419f4eac document the bext sbom/architecture changes 2025-08-11 02:53:51 -07:00
Christopher Sean Morrison 2f11f4981e not updated strclear though commit failed to document version or other identifier 2025-08-11 02:42:02 -07:00
Christopher Sean Morrison 1f34ea68d7 didn't notice any other user-visible changes, but some commit messages were cryptic or otherwise lacking to say the least 2025-08-11 02:35:24 -07:00
Christopher Sean Morrison 256120de62 summary note on bot written 2025-08-11 02:33:57 -07:00
Christopher Sean Morrison 3dbb8bb8d2 write up a summary paragraph on the bot work and not a few more user-visible changes. call out adrt a little more explicitly since it was a significant feature for such a long time. also note the MAXPSW bump up to 4096, replacing x with solid_report, and the nirt -T option MIC. 2025-08-11 02:33:08 -07:00
Christopher Sean Morrison 2b2a4fc2f9 and 1.1 is sometimes a bit too dark. see if 1.2 is a better sweet spot. 2025-08-08 21:04:26 -04:00
Christopher Sean Morrison f47071c039 don't need or want this rt_cline_radius extern here on Windows
it's provided in rt/global.h via raytrace.h with the proper import/export toggle.
2025-08-08 20:02:07 -04:00
Christopher Sean Morrison 3c94dbe1cb the bot change is confirmed improvement.
gqa changes observed on a particular model were attributed to a couple arb8 that had non-planar saddle face definitions that triggered concave handling.  In reviewing the new vs old shotline results, the old was missing significant portions ortho to that non-planar surface.  new behavior captures the arb8 volume as intended.

in reviewing other independent testing changes encountered, all were attributed to the same geometry in question with non-planar faces and all now reporting more correct and accurate results.
2025-08-08 17:45:49 -04:00
Christopher Sean Morrison b15d536b96 pull the latest 17f3f0c802dc7a60e5f25751019c0626cdbc7094 with qt headless tweak 2025-08-08 17:17:56 -04:00
Christopher Sean Morrison b886374b8c on other hand, it's already in deprecated status so no need 2025-08-08 17:13:50 -04:00
Christopher Sean Morrison a0c9c7b4d3 ugh, cline override is technically user visible 2025-08-08 17:13:07 -04:00
Christopher Sean Morrison 6f6c14d795 restore documented CLINE behavior on windows. we just forcibly set the offset before using the structparse table 2025-08-08 17:09:46 -04:00
Christopher Sean Morrison 43cb3c4aff mark unused 2025-08-08 17:05:14 -04:00
Christopher Sean Morrison 4a754452cd replace commentary and doubt-casting about what is not known with what is known. rt_cline_rai documented in the rtg3 manpage 2025-08-08 16:36:37 -04:00
Christopher Sean Morrison 753417364f restore the bot_minpieces command, properly deprecated 2025-08-08 16:23:41 -04:00
Christopher Sean Morrison eb0f0bd22b not helpful checking soltab if not doing anything with it 2025-08-08 09:57:28 -04:00
Christopher Sean Morrison 28837e0c6b give structparse an address for stashing values if they are specified by a user 2025-08-08 09:52:43 -04:00
Christopher Sean Morrison 07897f02c3 bah, use name, ignore sp 2025-08-08 04:06:17 -04:00
Christopher Sean Morrison e7eb8a9b89 that's right, we have to consult two git logs now 2025-08-08 03:56:04 -04:00
Christopher Sean Morrison 8b75979238 backtrace tool reliance is entirely an implementation detail.
never intended to be public API that it's using lldb or gdb or any other mechanism under the hood, and definitely not complexity that seems worth exposing all the way to userland as settings, docs, etc.

since this interface was developed, there are now some 3rd party library options available that could be considered/investigated for achieving similar capability.
2025-08-08 03:53:42 -04:00
Christopher Sean Morrison 6fb5eddfe6 nirt -T is obsolete 2025-08-08 03:47:59 -04:00
Christopher Sean Morrison 58b6333153 document the remaining tails so we can hopefully tag later today.
did encounter some minor changes in the last round of testing with robert that need to be validated.  rt matches, but getting different thickness (e.g., as gqa or nirt see) on just a handful of bot.  need to determine if it's an improvement or regression.

there's also a vertible slew of commits to look through for publicly visible changes.  we should toss the commmit log into gpt and see if it can help.
2025-08-08 03:46:19 -04:00
Christopher Sean Morrison ec4e4ee8e9 note vslew also in addition to fixing the center view button as it was underlying and also broken due to refactoring 2025-08-08 03:35:41 -04:00
Christopher Sean Morrison b43fde5425 clean up wording for release.
note -o means oriented (unfortunately, major inconsistency), not output; and consolidate two command failure entries that had same root symptom for brevity.
2025-08-08 03:30:55 -04:00
Christopher Sean Morrison d137567276 clean up indent on the new material logic 2025-08-08 03:09:24 -04:00
Christopher Sean Morrison 230fc148af restore -B option so it can be properly obsoleted per policy.
not seeing any way to defensibly say it's minimally impacting either.
conveniently had already deprecated the -T option though and has been
several minors, so it can just go.

CLI option handling seems wildly inappropriate for an analysis lib...
2025-08-08 03:01:14 -04:00
Christopher Sean Morrison 38b72a95f9 document a 7.34.2 missed change, that nirt -b backout became default back in jan 2023 2025-08-08 02:58:54 -04:00
Christopher Sean Morrison 629d810bc1 restore pieces and mintie options to rt/rtshot/nirt due to deprecation policy.
notices posted.  still need to deal with nirt's but it moved.
2025-08-08 02:40:25 -04:00
Christopher Sean Morrison 256d4a8175 libanalyze would get a failing grade were this for a software design course. needs serious debt paydown. 2025-08-08 02:38:03 -04:00
Christopher Sean Morrison 032f34eea1 restore LIBRT_BOT_MINTIE to adhere to policy and avoid churn.
since we still want a setting, no benefit changing the name and no apparent harm if users have scripts that set the value (if we don't want them doing that, we should announce deprecation). in testing, prep was fairly invariant to value changes; and shot was mildly influenced linearly by very large increases if the bots were big enough.
2025-08-08 01:48:45 -04:00
Christopher Sean Morrison 6ecf34b753 datums need to serialize to ascii 2025-08-08 01:35:35 -04:00
f4alt c8c521b730 unnecessary zeroing
warnings from static analyser
2025-08-08 00:17:53 -04:00
Clifford Yapp e5e4b69ab7 If dp == NULL, don't continue processing 2025-08-07 21:19:14 -04:00
f4alt 5814a737f2 bump bext 2025-08-07 12:35:48 -04:00
Christopher Sean Morrison 638c0ba7f1 credit the whole team effort on the new fast bot ray tracing support. effort was conceived and planned by sean and chris, worked by team of 5 in spring of 2024 at texas a&m university as a capstone project, mentored by chris and sean. changes were reviewed, merged, and deduped by cliff. testing and V&V performed by chris, and performance tested and parallism bug fixed by sean. 2025-08-05 01:48:28 -04:00
Christopher Sean Morrison 0c8e0e5c45 add a based twisted unit cube, created by doing full rotation, but then only keeping the new top face values 2025-08-05 01:44:22 -04:00
Christopher Sean Morrison 3ea3bb291c credit the spring 2024 team that works on what accelerated BoT ray tracing, ultimately landing on hlbvh construction and shot integration. gaultier debarre, connor mclean, ian beckett, samuel reed, and timothy reynolds. 2025-08-04 13:21:14 -04:00
Christopher Sean Morrison b23697ffe2 adjust wording to make more clear this is 8-vertex arbs only) 2025-08-04 13:03:32 -04:00
Christopher Sean Morrison 3da73c52dc summarize concave arb8 support 2025-08-04 12:59:21 -04:00
Christopher Sean Morrison dd93f8d9ab staging 2025-08-04 12:49:16 -04:00
Christopher Sean Morrison d1423f2280 all seems to be behaving, so consolidate face orderings to previously existing face array 2025-08-04 12:47:18 -04:00
Christopher Sean Morrison cd807d4d7d convert arb8 concave/nonplanar debugging to use existing RT_DEBUG_ARB8 flag 2025-08-04 12:40:13 -04:00
Christopher Sean Morrison 98e28f21be finding some old arb8 in the wild that are 0.00x val from non-planar, but quell for now 2025-08-04 06:46:46 -04:00
Christopher Sean Morrison 887b063d5e still a couple cases to chase down, but set the stage to quell the blather 2025-08-04 06:17:42 -04:00
Christopher Sean Morrison 3ec64ec358 these test cases aren't near the origin 2025-08-04 06:13:20 -04:00
Christopher Sean Morrison 9cfc1dafb0 unitize our normal and take span into account 2025-08-04 06:03:57 -04:00
Christopher Sean Morrison 8a365b99bd make sure we use the same face vertex mapping and only test arb8 2025-08-04 05:13:40 -04:00
Christopher Sean Morrison 5044d9500a install the new primitives.g data files also 2025-08-04 03:48:37 -04:00
Christopher Sean Morrison 0be7d9e45d ebm_logo.bw, not data 2025-08-04 03:42:13 -04:00
Christopher Sean Morrison 1134c76cf7 credit mitchell roberts for his work back in 2014 on creating a primitives.g with all types 2025-08-04 03:40:24 -04:00
Christopher Sean Morrison cc17afaf56 add a primitives.g sample model by mitchell roberts.
this is a model that's been sitting around for over 10 years that I came across recently.  the contributor made one of nearly every object supported at the time including complex types like vol, ebm, dsp, submodel, grip, etc.  useful test model as several as-is provoke bugs and crashers, things that should otherwise be working.
2025-08-04 03:37:58 -04:00
Christopher Sean Morrison 6ccd92af92 fixed one issue only to hard kill all vol edit/write support...
copy-paste error from ebm made all vol fail to mat transform, which affected all editing and writing (e.g., g2asc).  fortunately, looks like this was caught prior to user-visibility.
2025-08-04 03:19:04 -04:00
Christopher Sean Morrison a8e3ed8eb5 just as important as upgrades is noting removal of dependencies. note gdiam is out. 2025-08-04 03:04:50 -04:00
Christopher Sean Morrison 4858869bcc date was wrong and empty block unhelpful 2025-08-04 02:59:00 -04:00
Christopher Sean Morrison e6fa9d7b05 reduce nirt commentary from 8.5 to 3.5 lines.
elimianted potentially alarming/confusing narrative and massive parentheticals.
2025-08-04 02:38:37 -04:00
Christopher Sean Morrison 266aeeea5c mged crash encountered simply switching databases after having run rt.
stack was in the tcl io handler callback registered by ged/libtclcad during open, but the subprocess was corrupt/gone (as we'd just switched to a new db).  handler was still registered, so fix was to manually ensure the subprocess channels (for in/out/err) get closed.
2025-08-04 02:13:22 -04:00
Christopher Sean Morrison 03cf0cafdf add additional test cases that erroneously fail convexity test 2025-08-04 02:06:12 -04:00
Christopher Sean Morrison 53e733259b poor naming, ged_subp isn't a pointer (it's an embedded bu_hash). delete io handlers on close, otherwise corruption and crashes after rt. 2025-08-04 02:05:05 -04:00
Christopher Sean Morrison 135cc0c183 not checking gedp before use, and later checking for null is pointless. hunting down a crasher. 2025-08-04 01:43:10 -04:00
Christopher Sean Morrison bd1ad5ffbe validate rrtp before accessing it 2025-08-04 01:33:58 -04:00
Christopher Sean Morrison 5397ab0abb simplify tol init, same values. 2025-08-02 15:08:51 -04:00
Christopher Sean Morrison 953f0c08f2 avoid crash on null rtip, and earlier deref for mild opt 2025-08-02 15:07:57 -04:00
Christopher Sean Morrison d4c392e4cc update bext to fe856ea7167f15a0f6df70637f88c355e4ceebce for qt mod 2025-08-01 22:02:48 -04:00
Clifford Yapp 986fc995b3 Explicit cast for bg_coplanar_pts with gcc 2025-07-31 11:34:40 -04:00
Clifford Yapp 4e87567487 Make a note to look into --first-parent option for git logging. 2025-07-31 11:01:57 -04:00
Clifford Yapp bdfccaf459 Add convenient gitk line to view commits to check for user visible changes 2025-07-31 10:58:31 -04:00
Clifford Yapp 75a6d90596 Add the cino bit to all the vim lines, not just the initialization 2025-07-28 13:23:04 -04:00
Christopher Sean Morrison 86eba8daea so we are working unoriented, so something is awry with the winding 2025-07-28 09:43:14 -04:00
Christopher Sean Morrison 27459b573f clarify comment, planar only for now 2025-07-28 08:57:05 -04:00
Christopher Sean Morrison abe1db1c6b since we're converting concave to bot, this simplifies quite a bit 2025-07-28 07:56:43 -04:00
Christopher Sean Morrison 9adba89ee2 after many iterations, the simplest that works without threading or other issues is to just convert it to a bot 2025-07-28 07:40:47 -04:00
Christopher Sean Morrison 08cd6daa36 also protect from null directory 2025-07-28 07:25:14 -04:00
Christopher Sean Morrison d8739cd0f1 implement preliminary arb_to_bot logic. still needs to split based on concavity. 2025-07-28 03:26:50 -04:00
Christopher Sean Morrison 7328dbe9a4 no such thing as libbt. fixed, librt. 2025-07-28 02:57:51 -04:00
Christopher Sean Morrison ebee2395fd pass concave definitions through bot prep/shot.
note several areas for improvement, which could also include stashing the bot soltab but not doing that for now to avoid dynamic memory
2025-07-28 01:18:56 -04:00
Christopher Sean Morrison 0e840eb34e support null rtip on bot prep, use defaults 2025-07-28 01:15:34 -04:00
Christopher Sean Morrison 3acf34a45c optionally save the arb8 definitions out to a .g 2025-07-27 23:43:35 -04:00
Christopher Sean Morrison 650cebc127 start with just a single ray expected results.
we shoot a ray from 2,.5,.5 towards -1,0,0 (i.e., through center of 1st quadrant cube).  note that arb8 prep is noisy about non-planar but does not reject them (intentionally per history).
2025-07-27 22:38:06 -04:00
Christopher Sean Morrison e6284a1c38 messy and noisy, but now shoots low-level w/ direct calls to prep and shot 2025-07-27 20:59:24 -04:00
Christopher Sean Morrison 3c9b29dcfd st_name is a convenience. need to check st_dp, so be a bit more rigorous. 2025-07-27 20:56:46 -04:00
Christopher Sean Morrison 3e04bcd3ab let name be optional 2025-07-27 20:51:12 -04:00
Christopher Sean Morrison 3538672cb1 ref_seghead is unused 2025-07-27 20:44:06 -04:00
Christopher Sean Morrison 27cddcbad6 if caller doesn't want segs, don't calculate them 2025-07-27 20:34:24 -04:00
Christopher Sean Morrison 87d172511c more streamlining sans-rtip for direct unit testing 2025-07-27 20:28:16 -04:00
Christopher Sean Morrison 6262ec1eb1 make rtip optional 2025-07-27 20:15:39 -04:00
Christopher Sean Morrison b5b8fa931b make sure ip is valid before dereference 2025-07-27 19:51:49 -04:00
Christopher Sean Morrison 19e184e5a4 only fail assertions when required. these could be null from a minimally-required perspective. 2025-07-27 19:41:20 -04:00
Christopher Sean Morrison 275eb38176 stp shouldn't be required just to print a name for debug 2025-07-27 19:39:08 -04:00
Christopher Sean Morrison 4be5a98401 xml ids can't start with numbers 2025-07-27 16:59:27 -04:00
Christopher Sean Morrison 05fcd764fa another helper to detect when an arb8 isn't planar 2025-07-27 16:59:00 -04:00
Christopher Sean Morrison 95a5b22535 implement different method for determining concavity.
we look at every line segment pairing and if the midpoint of any line is outside the arb, then we know we have a concave surface.  this is more resilient to vertex ordering issues and avoids needing to wind the right direction since we also make sure all faces go outward from the centroid.  in testing, this general approach appears to be far more robust, and considerably faster than convex hull methods.
2025-07-27 16:35:10 -04:00
Christopher Sean Morrison 453e8ea19f additional configurations of concave and non-planar 2025-07-27 11:57:22 -04:00
Christopher Sean Morrison 20905ca9e0 document configurations with a bit more detail so I can keep them straight 2025-07-27 11:57:22 -04:00
Christopher Sean Morrison 03798eb7ea fix refentries 2025-07-27 09:33:27 -04:00
Christopher Sean Morrison 8f4e4e716f useful if axis colors were configurable (and worked with flipped output) 2025-07-27 09:33:27 -04:00
Clifford Yapp 23842e3859 Note fix for brep solid edit crash. 2025-07-25 14:50:07 -04:00
Clifford Yapp 6f14e4fa5f Note man page updates by Josh 2025-07-25 13:59:03 -04:00
Clifford Yapp 87ff166ad4 Note Kenneth Davis bu_log contributions from PR #106 2025-07-25 12:53:28 -04:00
Clifford Yapp ed18ca3417 Bump bext hash 2025-07-24 08:43:51 -04:00
Clifford Yapp 84a37d9076 Whoopsie - don't match the name of an in-src directory, or in-src build isn't happy. 2025-07-23 15:41:39 -04:00
f4alt 878ce88114 make our volume estimate looser but faster
generic 2mm grid size is way overkill for a volume estimate in larger
objects. Have the grid size instead be relative to the bounding box -1
order of magnitude on the smallest size
2025-07-23 15:18:22 -04:00
Clifford Yapp beac0dae03 Add some outputs to distclean 2025-07-23 13:28:12 -04:00
Clifford Yapp eac1f432b9 Bump bext for assimp build and strclear update 2025-07-22 23:21:17 -04:00
Clifford Yapp db451ca547 Same as bext - warn if we're not in a REAL_PATH 2025-07-22 14:16:21 -04:00
Christopher Sean Morrison 6dc35d276b 1.5's a bit too bright for some models at such a low sample.
increase ambient by about a third from default 0.8.  also drop ambSlow, no longer a thing.
2025-07-21 15:54:27 -04:00
Christopher Sean Morrison 3758795b0e restore drawing of coordinate axes on the front/left/top views.
noticed by bill c., looks like the option was lost on a consolidation refactoring.
2025-07-21 15:50:57 -04:00
Clifford Yapp d76192c826 Looks like we were getting WINSOCK from libbu - try listing directly. 2025-07-20 21:01:58 -04:00
Clifford Yapp 277e807417 Hmm - were we getting Windows lib linking from libbu? 2025-07-19 07:57:28 -04:00
Clifford Yapp b84b0533a1 Adjust comment 2025-07-18 10:30:10 -04:00
Clifford Yapp 81860658a7 set_deps ordering is important - restore, add comment to that effect. 2025-07-18 10:07:10 -04:00
Christopher Sean Morrison c725c5a0ec misnomer, doesn't appear to do anything with ged (any more) 2025-07-17 18:01:52 -04:00
Christopher Sean Morrison 49a4d9269a note direct libbu dependency, all but three libs (fft, pkg, pc) 2025-07-17 17:51:23 -04:00
Christopher Sean Morrison e02c482dc8 note direct call dependency to libbn, nearly all libs 2025-07-17 17:46:03 -04:00
Christopher Sean Morrison 616c554ff8 libbv is directly called by 7 other libs 2025-07-17 17:36:59 -04:00
Christopher Sean Morrison 152fdeab20 cleanup comments 2025-07-17 17:29:15 -04:00
Clifford Yapp 774a9fe2c6 add TODO note 2025-07-16 22:46:41 -04:00
Clifford Yapp a4d8eaf4a1 Explain the implications of nirt reading settings from .mgedrc 2025-07-15 13:39:15 -04:00
Andrea Braghin ec962453e3 added " break; " in k_parser.cpp for section_seatbelt 2025-07-10 10:43:34 +02:00
Andrea Braghin ecb427bdab Spacing and formatting fix in k-g.cpp and k_parser.cpp 2025-07-09 22:04:01 +02:00
Christopher Sean Morrison e713cf3739 technically user visible with nurbs recursive threading.
if we exceed 1024 active threads, there were issues.  now limit is 4096 threads.
2025-07-09 01:37:42 -04:00
Christopher Sean Morrison b030e570e7 some indent cleanup 2025-07-09 01:15:01 -04:00
Christopher Sean Morrison 9aa03acf83 temporary fix for the bu_parallel unit test failure on a 48 core workstation.
our recursvie unit test invoked 48*48 workers which exceeded the 1024 limit.  libbu's book-keeping detects the condition but continued 'optimistically' instead of bombing.  this meant handing out id's that were greater than our MAXPSW arrays which would then either segfault or corrupt the unit test tally.

proper fix will be to rework the book-keeping to either halt at the limit when creating threads so we don't create too many, or to eliminate the limit (complicated across all the code).
2025-07-09 01:06:08 -04:00
Andrea Braghin 6e0d34bd34 Seatbelt implementation in k-g.cpp, k_parser.cpp and k_parrser.h 2025-07-08 16:20:48 +02:00
Christopher Sean Morrison e69aeda441 initial unit testing for rt_boolweave().
this doesn't do much more than call rt_boolweave at this point, doesn't even validate that it worked, but does at least exercise the function.
2025-07-06 12:59:48 -04:00
Christopher Sean Morrison c9aec16ab5 towards making boolweave not require a solid since it's only used for validation and debug 2025-07-06 12:41:06 -04:00
Christopher Sean Morrison f0e29d72cc get rid of commented deadcode 2025-07-06 12:18:47 -04:00
Christopher Sean Morrison 0087aa1f16 don't access rtip before we make sure it's valid 2025-07-04 13:01:49 -04:00
Christopher Sean Morrison cbee5d6a4a confirmed parallelism bug on rhel8 host with 48 cores.
unit test catches the bug on the recursive case where 48*48 threads are created.  upon investigation, looks like there's either potential for book-keeping collision or thread id being out of expected bounds.  closing in on confirming the specific cause and fix needed.
2025-06-27 02:47:03 -04:00
Christopher Sean Morrison df37ba52c7 hlbvh work is merged and finally all validated 2025-06-27 02:47:03 -04:00
Clifford Yapp df04666717 Bump to latest bext SHA1 2025-06-26 13:31:25 -04:00
Clifford Yapp 7c4fd2a83f Only do the stdfd management if we're not using TCL_CHAN 2025-06-26 10:35:47 -04:00
Christopher Sean Morrison 44520009e7 sync with header, add support for public domain 2025-06-25 17:35:31 -04:00
Christopher Sean Morrison c2fbc35a5f use rhel8 fix 2025-06-25 09:36:20 -04:00
Clifford Yapp 7d396c43e9 Add TODO note to look at BoT subcommands for debugging 2025-06-24 10:03:19 -04:00
Clifford Yapp eacd570a94 Add a few more missing doxygen entries 2025-06-24 08:31:40 -04:00
Clifford Yapp 34ed4d889d Add a commented out section demoing the local clone settings to gitconfig 2025-06-24 08:18:18 -04:00
Christopher Sean Morrison 451338b768 update assimp to not use ccache also, bext fa1149406792dce4c47d7603ed8d2cab1f177a25 2025-06-23 19:17:40 -04:00
Clifford Yapp 717118e3aa Restore default value for mged_rel_tol
Plotting after solid edit for rpc and rhc needs this value to be set or the
"restored" wireframe ends up coarse until a zap and redraw is completed.

Previous default was removed in e157a9e0a6, but the replacement of mged_rel_tol
took place in dc2fbcaf65 so that would have been where we lost the default
global initialization.
2025-06-23 12:09:04 -04:00
Clifford Yapp d209c40ba0 Back out keypoint and label MGED changes
Something isn't quite right about this logic - epa editing crashes,
and user report indicates BoT editing keypoints weren't behaving.

Reverts changes from around commits 50f9e29bc8 and 3d12a3452.
2025-06-23 11:36:12 -04:00
Clifford Yapp 257ab559a7 Add assignment for alpha value in BU_COLOR_INIT 2025-06-20 12:40:21 -04:00
Clifford Yapp 2837407011 Now that we've got ged_init actually creating the view, we can simplify our setup elsewhere. 2025-06-20 12:37:35 -04:00
Clifford Yapp 1e8ac2aa68 Have ged_init create an initial bview
Fixed the Archer issue that was causing it not to tolerate an initial ged_gvp
being present.  This way we can always depend on ged_gvp being valid.
2025-06-20 12:15:52 -04:00
Clifford Yapp 53d977f196 Various changes for doxygen. 2025-06-18 16:36:53 -04:00
Clifford Yapp 2eb54707b1 Update copyright 2025-06-18 15:12:18 -04:00
Clifford Yapp f7c762ed41 Correct data being assigned to search callback (de52d5e585)
Hopefully we've got all the key commits - needs testing.  The idea is to roll
back MGED for release to avoid problems introduced in editing with the newer
code. Since we also capture functional and build fixes made after that point,
we have to cherry-pick some changes and backport them.
2025-06-18 15:07:26 -04:00
Clifford Yapp 22dad69e46 Reapply mged quit cmd crash fix. (ed4b0588e9) 2025-06-18 14:56:16 -04:00
Clifford Yapp 7f34b0756e Need to pass ctp through be_s_trans call (9cf98f2d03)
If we don't do this, editing operations like translate crash due to not getting
the state information passed through the callbacks.
2025-06-18 14:54:08 -04:00
Clifford Yapp 84a346cbf9 Fix CLBK defines (from commit 2367c1c9f3) 2025-06-18 11:22:07 -04:00
Clifford Yapp a580e0d60c Fix includes (from commit a5e5daf7e4) 2025-06-18 11:20:55 -04:00
Clifford Yapp a0e50a5be2 Fix includes
This change more or less re-applies commit da4a8e11f3 related to
libged header externs.
2025-06-18 11:19:47 -04:00
Clifford Yapp af72449b76 Re-apply bu_editor related changes
This re-applys the MGED changes related to using the new bu_editor
API.

Re-applys commits:

be76b13b81
26d24eba47
7fa42e8bb5
da26bcf455
2025-06-18 11:00:21 -04:00
Clifford Yapp 33abe7c196 Re-apply MGED changes from ac6c6dd2b2
Deprecated code removal.
2025-06-18 10:59:48 -04:00
Clifford Yapp fa815d00b2 Re-apply "Shift view limit defines into bv/defines and rename"
Re-apply MGED changes from commit 76802549f4
to adapt to moving view size limit defines into libbv headers.
2025-06-18 10:59:04 -04:00
Clifford Yapp ce85a8839f Re-add drawable display list updates
Re-add commits 6f97a7c68c and
4e1448766b related to making
the ged_drawable structs private.
2025-06-18 10:58:32 -04:00
Clifford Yapp 6449f83313 Fix what appears to be a copy/paste error from 1997
Re-apply fix from commit ccd263a34c

The if conditional here is checking X rather than Y - this doesn't fit the
pattern of the other wrapping logic.  Digging back in the history, it appears
to originate from a 1997 mode to f_knob() in SVN commit 14080 (Git SHA1
b3fc3be99).

The prior blame commit (SVN 12861, SHA1 e78e1b2252) does not seem to have an
equivalent, and the commit that introduced it  does not mix X/Y/Z indices in
any of the other wrapping checks.
2025-06-18 10:57:52 -04:00
Clifford Yapp 11a7e5b845 Back up MGED to commit 2a705a734c 2025-06-18 10:57:03 -04:00
Clifford Yapp 9831cf6ef1 Make a note to try similarity meshing on PCA mesh data. 2025-06-16 17:03:24 -04:00
Christopher Sean Morrison d67d4fafd5 assetimport allegedly needs 3.22, so we need 3.22. release was '21 so seemingly not a big deal to bump. 2025-06-16 16:56:53 -04:00
Clifford Yapp 5a309e13f9 Remove db_cache_init - premature, may not be needed. (Will do experiments in dbi2 branch.) 2025-06-16 10:40:37 -04:00
Clifford Yapp 79cd479270 Correct expected FLAT search cnt 2025-06-13 15:29:27 -04:00
Clifford Yapp 554a93d62d Add a way to get a bv_mesh_lod struct from the dbip LoD cache. 2025-06-13 15:20:02 -04:00
Clifford Yapp b47878d422 From an API standpoint, name is more flexible than struct directory here - allows us to use update to clear the cache on a removed object we no longer have a valid dp for. 2025-06-13 13:59:26 -04:00
Clifford Yapp 764fac8c1d Figuring out the limits of BoT hashing
The necessity of tolerance clamping means we remain sensitive to "almost but
not quite the same" points ending up getting clamped in opposite directions.
That is in the nature of clamping - you have to have some decision criteria,
and given enough inputs there will always be some cases that fall right on the
line.

What this means in practice is that bg_trimesh_hash can't be a full substitute
for bg_trimesh_diff, but it does still do enough to be interesting.  It might
be helpful, for example, to use to check if a BoT's data changed after an edit
operation - it might bias in favor of "changed" in cases like rotation or
translation but could still confirm unchanged if the original data is intact.

In testing with PCA meshes on a large .g file, it was also able to identify
about 80% of the matches the full bg_trimesh_diff check identified via matching
hash values.  In principle we might be able to combine the non-matching hash
values with additional info from bg_trimesh_diff results to do some intersting
things, but for the moment we'll file that for future consideration.
2025-06-13 13:36:35 -04:00
Clifford Yapp 9f8e485fb0 Check diff results against hash results to identify disagreements for further study. 2025-06-13 11:06:32 -04:00
Clifford Yapp af07182670 Clean up msg printing a little 2025-06-13 10:57:04 -04:00
Clifford Yapp ea6aaeb1a1 If db_search is called with no paths and a DB_SEARCH_FLAT flag, have db_ls pull the list of everything. 2025-06-13 10:41:37 -04:00
Clifford Yapp b56e6e9b65 Test out mesh hashing as a diff check 2025-06-13 10:29:27 -04:00
Clifford Yapp b65e998ced Stash a demo of how to truncate float numbers
May come in handy when trying to do a tolerance-based hash of mesh data, since
for that to work (i.e. generate an identical hash for meshes that are only the
same within tolerance) we'd need to clamp the number we're hashing to the data
subset that is above the tolerance specified.
2025-06-13 08:36:33 -04:00
Clifford Yapp e505e97057 Add missing void 2025-06-12 20:06:04 -04:00
Clifford Yapp 259ae3c04b Initialize, explicit void 2025-06-12 17:09:04 -04:00
Clifford Yapp 01d454276d Make sure we've got mesh_c 2025-06-12 17:05:45 -04:00
Clifford Yapp 620c073186 Start setting up logic for a dbip LoD cache
Haven't tried triggering it yet, but getting the pieces in place to make this
actually usable.  Once ready, it should replace ged_lod in libged.
2025-06-12 17:02:27 -04:00
Clifford Yapp f452e77ef1 Stub in a hidden internal struct for db_internal
Not moving anything yet, but figuring out the pieces needed to establish a
db_internal hidden struct.
2025-06-12 15:36:41 -04:00
Clifford Yapp 95d4ce4c28 Adjust scene_obj functab signature to use directory/db_i rather than rt_db_internal
This is necessary to take advantage of cached data properly - by the time we
have cracked the rt_db_internal, we have already had to hit the .g disk data
and incur the memory penalty of loading all of the geometry information.  For
large BoTs, we want to get things like bounding boxes and coarse approximation
meshes without ever having to handle the full BoT at all (beyond the initial
pass to cache the LoD data, of course.)  The LMDB cache lets us do that, but
only if our processing flow allows us to completely avoid the rt_db_internal.

The reason this is possible with the OBJ functab is the d_minor_type entry in
the struct directory.  While we typically do OBJ lookups using ip->idb_type (or
its expanded form ip->idb_minor_type) it is also possible to do lookups with
the directory pointer itself.  I.e. OBJ[dp->d_minor_type] will also let us
access the per-primitive methods the same way OBJ[ip->idb_minor_type] would.
We can thus take advantage of this to provide a per-type method that does not
necessarily require the caller to crack the rt_db_internal (although it will
under the hood if that ends up being necessary.)

This also means that the scene_obj method will need to be passed the data
container holding any specialized cache data info that is not part of the
struct directory entry.  Right now that's just a stub for the function
definitions, but eventually it will most likely be a variation of the ged
draw_update_data_t container under the hood.

It might actually make more sense to associate the caches with the db_i struct,
since that's what they actually correspond to - cached database instance data.
If we go that route then we don't need a separate public cache struct at all...
both ged_lod and the dbi state ged_cache should be subsumed under the db_i
version, and will be accessible to the scene_obj method as part of dbip. It has
the further appeal of allowing the librt database I/O routines to see to the
clearing (and potentially the regeneration) of the cache data directly - that
would avoid a whole host of possible "forgot to sync the cache" scenarios.

Also document explicitly in a few places the expectation that
dp->d_minor_type == ip->idb_minor_type.
2025-06-12 14:20:07 -04:00
Clifford Yapp 5278cc8f06 Break BoT plotting out into its own file 2025-06-12 13:27:56 -04:00
Clifford Yapp bdcfe25826 Add a functab slot for populating scene object data.
Haven't migrated the primitive specific functions like BoT yet, but this
establishes a general API pattern for handling multiple modes via a primitive
specific functab interface.

It felt a little off having primitive specific logic for drawing in libged -
hopefully this will give us a way to push the per-type details down to the
primitive implementations.

In support of this, the object point sampling routine got moved from libanalyze
to librt (it is fundamental to the mode 5 drawing.)  For the moment the
libanalyze version is deprecated rather than being removed outright.
2025-06-12 11:35:03 -04:00
Clifford Yapp 3ca2c45cdf Adjust come comments, add some TODOs 2025-06-11 17:03:44 -04:00
Clifford Yapp 93ab4a4b98 Remove the bv_obj_settings container from bview
Not really getting used, and doesn't fit well there conceptually.
2025-06-11 16:48:49 -04:00
Christopher Sean Morrison 7501a5f7ae bump up to 3211ee1861eb87231dcb790d0eeb4cfa2e120aa7 for rhel8 fix 2025-06-10 17:10:47 -04:00
Clifford Yapp 324406a7f0 List make_pkg.sh for CMake 2025-06-05 16:58:05 -04:00
Christopher Sean Morrison 60cdeafc9d restore make_pkg.sh for mac release 2025-06-04 18:52:14 -04:00
Clifford Yapp 2dfef62422 Add lint solid raytrace checking to bot repair
Ideally we don't want bot repair returning something that will fail a lint check,
so add by default a step that throws those tests at the candidate BoT output.

One downside to doing this is we lose repairs that DO produce a manifold, which
may still work for facetize boolean evaluation even if they're not exactly what
we want for solid raytracing purposes.  Hence we add a setting that will allow
code to disable lint check.  This will let facetize proceed with repairs that
would be rejected at the user level to prepare boolean inputs and allow the
facetize process to continue.  There is no guarantee the final facetize output
will always make lint happy, but that was true in any case.
2025-06-03 14:55:55 -04:00
Clifford Yapp ca1d5ae98c Allow remesh to run successfully
Fix an output error, apply some settings.
2025-06-03 14:54:38 -04:00
Clifford Yapp 266fd30e14 Pull in crt change from https://github.com/malxau/yori upstream commit 431dc07 to disable memcpy optimizations 2025-06-03 08:42:16 -04:00
Christopher Sean Morrison d343813824 pull the lief fix for linux gcc13 2025-06-03 02:02:57 -04:00
Christopher Sean Morrison 9dc827499e will need to rethink as wdb_ followed by db_ looks like api error.
they're also not technically equivalent as a failed open results in a crash on null dereference, and was encountered unexpectedly.
2025-06-03 02:02:14 -04:00
Clifford Yapp fc9a3a0eb0 Nix on the volume check - experimentation showed that the before calculation isn't reliable. 2025-06-02 16:28:31 -04:00
Clifford Yapp 10ecbc3273 Note work need to add BoT post-repair checks. 2025-06-02 14:41:29 -04:00
Clifford Yapp 2a211f65c5 Fix doxygen comment 2025-05-29 13:52:17 -04:00
Clifford Yapp e207ad1c71 Print info about how many BoTs ended up in groups. 2025-05-29 10:41:14 -04:00
Clifford Yapp efaee1b13d Don't hit the disk for every BoT/BoT check
It didn't matter much for the GenericTwin small case, but the grouping problem
is fairly nasty when it comes to time complexity, assuming most geometry in a
.g database is distinct.  As a database gets bigger, if we have no groups at
all that can be defined we will have to check every object against every other
object to prove there are no matches - the only efficiencies we can get are to
not repeat an already performed check (e.g. if we've done A->B don't do the
B->A comparison) and pulling any matches we DO find out of the active set
(since we already have their group, there's no further need to check them.)

However, the initial implementation left some I/O performance on the table we
can recover.  Although it's true that in the worst case we might have to do PCA
comparisons for everything against everything, in practice counts will almost
always give us a negative answer immediately. There is no need to hit the disk
over and over just to pull the vert and face counts from the BoT internal
struts, since the memory overhead of storing just that data is basically
insignificant.  Accordingly, just pull that data once up front for all objects
and store it in maps.  Vastly speeds up runtimes on larger files needing lots
and lots of comparisons, since the previous way was unnecessarily hitting the
disk over and over.
2025-05-29 09:58:01 -04:00
Clifford Yapp 8d8aa4cebe Set up a test to find PCA BoT matches
This logic tests out a scheme to use the PCA alignment of meshes in a .g file
to identify meshes that are copies of the same geometry relocated in space.

This is potentially useful in an "unpush" type scenario in that it would allow
us to identify candidates that could be replaced with references to a single
BoT and a matrix.  Less invasively, if this can be done fast enough it could
serve as a pre-processing step for drawing codes that would allow for a single
in-memory copy of the wireframe data that could be reused to draw all matching
objects.
2025-05-29 09:40:08 -04:00
Clifford Yapp d43659b5c2 Make pca a libbg function, have BoT code use it. 2025-05-28 14:47:12 -04:00
Clifford Yapp be02dbc41c Rough in a principle component analysis subcommand for BoTs
Principle Component Analysis (PCA) lets us take an input mesh (or really, any
point set) and "fits" a coordinate system to the data such that the axis
vectors of that system "line up" with the data.  The command will print out
the calculate data for the mesh.

If given an option for an object name, it will also produce a version of the
input mesh that has its center at the the global model origin and rotate it
according to the PCA - intuitively, it will be "lined up" with the global XYZ
model space coordinate system.

One potential application of this might be an "unpush-like" functionality for
meshes which would allow us to compare and recognize when meshes are the same
except for translations and rotations in model space.  The immediate motivator
is testing to see if we could use this to help minimze the number of vlists we
need to generate to represent solids - a view object could reference the
at-the-origin aligned data and provide the inverse matrix to the one used here
to restore the actual model position for drawing.  However, to catch such cases
we might need to do a slightly fuzzy comparison of the mesh vertcies to allow
for floating point drift due to the math operations involved in xpushing.
2025-05-28 12:27:29 -04:00
Clifford Yapp c1090376d5 Point dev to actual geometry generation start point.
At least at the moment, we don't seem to be reusing leaf node geometry for
mulitple instances in the new drawing path.  One more thing to think about...
2025-05-28 10:06:27 -04:00
Clifford Yapp de2c0da2d4 Add some mechanisms to manage child drawing
These are inactive in current code, but the idea is to set things up to allow
an rt_edit scene obj to have children inserted, and use the edit obj's settings
to draw them without disturbing the state of the child objs.

We won't be able to leave the original scene objs completely untouched, since
the main drawing loop will still need to know not to draw objs currently being
managed by the rt_edit scene obj, but this should help minimize the disruption.

Need to also look into whether the logic in the new drawing path is reusing
vlists for scene objs that are multiple instances of the same solid - if not,
this mechanism or something like it will be needed there as well.
2025-05-28 09:46:15 -04:00
Clifford Yapp 2de42a215f Add a TODO note to look at hiding librt only db_i elements 2025-05-27 16:14:14 -04:00
Clifford Yapp 58e1ceb858 Move the db open/create/close defines to db_instance.h
They were in db_io.h, which is more or less reasonable, but since the idea
isn't to create a raw db_i struct without using the open/create functions, and
db_close does the destruction operation let's put these with the struct
definition itself.

Looking at db_i, it should have a private internal where the non-public aspects
of the struct are stored.  Since we have open/create and close doing the work
of setup and teardown anyway, that should be practical.
2025-05-27 13:45:59 -04:00
Christopher Sean Morrison e09209d28e zero out capacity and items 2025-05-27 11:21:26 -04:00
Christopher Sean Morrison 2bc7f3713c adjust to not rely on libbu threading.
if we're not using libbu, then bu_parallel_id() will be always zero and we'll get collisions.  instead utilize a C11 thread local data container, that way we're always collision-free.  this could still be improved (avoid dynamic allocation altogether), but should be a minimal adjustment step towards release testing if we can rely on the C11 construct.
2025-05-21 08:42:34 -04:00
Clifford Yapp 4ed69d75ef Remove leftover comment from earlier comb_tess experiment. 2025-05-16 10:51:28 -04:00
Clifford Yapp d1dc6a4fae Take another stab at setting up an rt_comb_tess method
Revisits the work from d6bb98eda8, but this time we use the comb_internal to
hold the dbip and name rather than the higher level rt_db_internal structure.

comb primitives have to know about dbip and their origin object name, but that
is due to the specifics of how combs are defined rather than a general property
of rt_db_internal entities.  Accordingly, make that awareness an "internal"
detail of the comb definition.

It doesn't get us away from the awkwardness that a comb rt_db_internal can't
simply be used as-is with a different dbip (most other objects can do that) but
that limitation is innate to how combs are defined.  This approach should let
us make better use of the comb functab interface for methods beyond just import
and export, while not disturbing the broader rt_db_internal ecosystem.

Right now this is unused - should eventually replace the nmg boolean version of
tess in the facetize command, but there are also other considerations for a
general purpose comb facetizer to think about.  From an API perspective, we
arguably could/should wrap the entirity of the facetize csg->bot/nmg logic
under this call, but to fit it into this API we would need to solve the problem
of converting NMG polygons to triangles, doing a Manifold boolean, and then
simplifying the output triangles from Manifold back into NMG polygons to
produce the expected result.  (Manifold is triangle only, and we know we need
its robustness for boolean evaluation - if we can solve the problem of
converting back from evaluation triangles to NMG polygons we can probably just
remove nmg_boolean completely.)

Manifold has some abilities to track things like face IDs that should be
helpful - we could, for example, assign NMG ids and keep intact any NMG
polygons that weren't involved with the boolean changes - but there is no
question we would also have to solve re-creating NMG polygons from coplanar
output triangles.  Even though the face ID abilities recently enhanced for
Blender will help, there is no getting around that data structure translation.
2025-05-16 10:34:02 -04:00
Clifford Yapp b45c7dc9d2 Eliminate internal ptr parameter - we're always passing in s->es_int 2025-05-16 08:55:45 -04:00
Clifford Yapp f21a4f6597 Untested, but stub in handlers for parameter specified matrix edits. 2025-05-16 08:55:33 -04:00
Clifford Yapp 2287595568 Make it clearer that the matrix XY tra ops are in the view plane, but the non-uniform scale ops are defined in relation to the model coord system. 2025-05-16 08:55:14 -04:00
Clifford Yapp b5f436ce75 Reject non-uniform scaling edit op requests for TOR 2025-05-16 08:54:14 -04:00
Clifford Yapp 190a5cfc19 Add a TODO note for a lint capability to investigate 2025-05-15 16:04:35 -04:00
Clifford Yapp 9710ac0da3 Stash a couple TODO notes 2025-05-15 15:47:13 -04:00
Clifford Yapp 6a8cbedff0 Pull in latest librt_edit librt changes
Aside from the removal of the PSCALE define, which we add in sedit.h, there
shouldn't be any impact on MGED from these changes.

Renamed private functions for brevity, set up the oedit matrix editing logic in
functions.  Need to figure out if MGED exposes oed manipulations via the
command line as well as the mouse...
2025-05-15 15:08:22 -04:00
Clifford Yapp 3d98651c05 Clarify the material_name based warning in rtweight
The previous message made it look as if there was an error in the pinewood
rtweight calculation - the material_name attribute is set and there are no
material objects in his database, which is what prompted the warning, but
material_id is set and valid so the calculation can still proceed successfully.

Adjusted the reporting to be conscious of whether we also have a material_id to
use.  Since material_name IS set the user still needs to know we're not using
it, but until material objects become more commonplace a more mild sounding
note would seem to be in order.
2025-05-15 12:04:59 -04:00
Clifford Yapp 8eb60b19d5 Add some more example density data to the misc file 2025-05-15 11:42:12 -04:00
Clifford Yapp 88302bb178 Don't crash if we have an invalid path specifier
Check that db_ls actually found something before proceeding.  Do a little more
memory cleanup while we're at it.
2025-05-12 14:48:14 -04:00
Clifford Yapp cd2dc572cf Based on user feedback, make the standard attribute table in the search man page a little clearer. 2025-05-12 09:07:52 -04:00
Clifford Yapp 96f90e5037 Wrap all the edit flag save/restore ops into functions. 2025-05-09 15:56:50 -04:00
Clifford Yapp 2a8011da3a Note something to test to see if it might help with problem brep triangulations. 2025-05-09 15:23:42 -04:00
Clifford Yapp 0a904b9d68 Rename rt_solid_edit struct, various related renames
If we're going to do oed style operations on comb instances this API will be
more general than just solids, so rename accordingly.

Also, since objedit (i.e. matrix edit) can be attempted on both solids and comb
instances - and hence also operate on "solids" - refer to RT_SOLID_ defines as
RT_PARAMS_ instead to emphasize that those code paths are updating
rt_db_internal parameters rather than just the model_changes matrix.
2025-05-09 11:10:30 -04:00
Clifford Yapp 3a7c82f35d Remove model2objview calc from librt edit code
Studying this more confirms my initial impression that this likely doesn't make
sense to do at this level.  Instead, try to explain what might drive the use of
a model2objview style matix and document how to set it up in the header
comments.

Thinking about this, I'm starting to wonder if it might be possible and beneficial
to apply a principle component analysis to meshes when they are first loaded and
establish a database-level hash map of origin centered and PCA aligned meshes to
try and spot xpushed meshes for drawing data reuse...
2025-05-09 09:45:07 -04:00
Clifford Yapp 3963ed9398 Still not sure if we want model2objview here, but if we do have it we need to init it to IDN. 2025-05-07 15:36:30 -04:00
Clifford Yapp 2e7770604b Pull in branch librt translate and scale editing funcs
Not hooking these up to MGED in main, just minimizing the diff between main and
the branch.
2025-05-07 12:39:35 -04:00
Clifford Yapp e7a35c874d Back mged (more or less) up to de8716f88b
Kept the c24d00d8 comment about how oedit data is applied and the local incr
matrix from 9b36104ad but otherwise back up MGED to avoid using the librt
functions for rot/tra/sca.  Will work in the branch to get a better sense of
what those should look like to handle both sed and oed ops.
2025-05-07 12:09:48 -04:00
Clifford Yapp 9b36104ad7 Use local incr_changes in oedit_mouse
This is the localized change I was after - this logic looks like it should be
similar to other scale logic, so rework to get it a little closer.  The
incr_changes matrix beings and ends life as an IDN matrix here, so a local matrix
is equally viable as long as we reproduce setting incr_change to IDN.
2025-05-07 09:36:45 -04:00
Clifford Yapp 0352e5718f Revert "Rather than using incr_change for the matrix math, use a local temp matrix."
Need to check more carefully that an incr_change delta here isn't used elsewhere.

This reverts commit 3dcab32287.
2025-05-07 09:20:12 -04:00
Clifford Yapp 3dcab32287 Rather than using incr_change for the matrix math, use a local temp matrix. 2025-05-07 09:11:52 -04:00
Clifford Yapp e37950bd5b Missed a solid_edit var 2025-05-07 08:51:53 -04:00
Clifford Yapp 069136aca0 Invert solid flag, refer to matrix edit instead
Rather than solid and object edit, at the API level it may be better to
think about the two behaviors here as solid edit - i.e. modify primitive
parameters - and matrix edit - apply the operation to the model_changes
matrix rather than the primitive parameters themselves.

MGED's objedit code is capable of editing both individual solids and
comb instances (see mover.c)  In the former case, it simply applies the
matrix directly in the final save-to-disk step (which may or may not
succeed, depending on the primitive.)  Comb instances, of course, only
support the matrix operations since they have no parameters to apply the
matrix to.

In theory, an xyz scale operation via solid edit or object edit ought to
wind up producing the same result, and there may be other cases where
the individual operations in isolation are the same, but there are
definitely some operations that will only work as matrix edits and
cannot be reliably assigned to all primitives - for example, an x-only
scale on tor will not work.  Another consequence will be wireframes -
solid editing the parameters will allow the generation of a new, data
appropriate wireframe, but a matrix edit will only provide enough
information for the application to distort the pre-existing wireframe
generated from the original primitive.

This may mean that capturing both matrix and solid operation logic for
rot, tra and sca ops at the librt API level will be enough to give us
what we need to express the MGED editing operations.  As MGED is
currently implemented I think it would suffice, but a more consistent
approach would be to have the matrix mode immediately attempt to update
the rt_db_internal instance of the solid when a new matrix is written to
model_changes.  Rather than manipulating the drawing of the scene solids
in the application's refresh loop based on a flag, it would be better to
have editing specific data associated with the edit object that could be
manipulated at will - that would provide more flexibility.

If the "solid" being edited is a comb or comb instance (neither of those
- particularly the latter - is supported yet but we clearly will need
to) that will always work as long as the matrix satisfies the general
criteria for all BRL-CAD geometry matrices.  Updating the rt_db_internal
for a comb would amount to applying the matrices to the comb child (or
all children if we're editing a "whole" comb rather than an instance in
its tree.  The child wireframes associated with the edit object created
for the comb would then be altered the same way MGED uses
new_edit_matrix and do_zoom to alter their scene appearance - since the
matrix would never be written to the leaf solids in that case, there
would be no strong motivation to regenerate the wireframes (and it
wouldn't always be possible anyway.)

On the other hand, a matrix application to a solid could be immediately
tested.  If it would succeed, a new and improved wireframe could be
generated, just like for solid edits.  If it would fail, we can (and
probably should) reject the attempt to apply the matrix and report an
error.

Conceptually, that may eventually make a matrix edit just another
category of input for an edit, along with e_mvalid and e_inpara...
2025-05-06 19:35:47 -04:00
Clifford Yapp c24d00d8d4 Explain a little about how oed scaling operations are being applied. 2025-05-06 10:48:21 -04:00
Clifford Yapp 634ea01ff0 Consolidate sca knob editing code into chgview.c
Also do a preliminary separation of input setup and execution calls.  This one
is interesting in that it is the first blocker so far where the BE_O defines
are active.  They are specific to object editing rather than solid editing, so
they have not (as yet) been considered for the librt refactor.
2025-05-05 11:04:19 -04:00
Clifford Yapp c0619c5750 Stage edit_tran setup code in a function
To push this one down to librt, we'll need to have the functab
get_solid_keypoint replacement become live.  That is probably viable - it
should be one of the safest code migrations - but need to check over the logic
again so for now just get as close to a ready-to-move function as we can
without making that switch.
2025-05-05 09:58:33 -04:00
Clifford Yapp f3a38316fe Use s_edit vars for units and view pointer 2025-05-05 09:52:39 -04:00
Clifford Yapp 5b8046e7e5 Set e_inpara in the lower level code
Higher level code should only be doing things that are related to app state
management.

Eventually, once we have gotten the librt editing code to the point where it
can replace sedit, rt_knob_edit_rot should probably take over doing the sedit
call as well.  For now, however, since MGED still needs to do its own thing,
rt_knob_edit_rot can only take care of input setup.
2025-05-05 09:43:52 -04:00
Daniel Rossberg d53985c6f7 Match bext sha1 to latest main
- build more static libraries
- made lmdb static library usable
2025-05-03 17:27:58 +02:00
Clifford Yapp a0936a6fe7 Separate the setup and editing execution for edit rot
That was more tangled than it appeared at first glance - separate out the
mged_state aware parts of the rot matrix logic and the setup.

This logic has setup for both sed and oed - still need to get a good handle on
how the latter works and how it relates to the solid edit data structures.
2025-05-02 16:07:27 -04:00
Clifford Yapp de8716f88b Remove unused function 2025-05-02 11:36:39 -04:00
Clifford Yapp 100dcd5208 Relocate rot/tra/sca edit functions to top of chgview.c
Need to break these up into a form that is viable for relocation to librt -
right now they incorporate MGED state awareness directly.
2025-05-01 15:58:56 -04:00
Clifford Yapp 75dfbaca98 Separate edit and view knob logic more clearly. 2025-05-01 15:01:01 -04:00
Clifford Yapp aef8a26f13 Use the librt copy of the edit knob processing. 2025-05-01 14:51:01 -04:00
Daniel Rossberg 158fd1322e Merge pull request #187 from Forchapeatl/patch-3
Forchapeatl found and fixed a bug in libged's plot functionality, where all paths in ged_plot_core() returned an error
2025-05-01 18:52:47 +02:00
Clifford Yapp 091afba56b Adjust edit_flag saving, use rt function
If we're saving the edit_flag state, also save solid_edit_mode.  For the big
mode switch table, wrap both solid and obj edit state saving in a function.
2025-05-01 11:47:30 -04:00
Clifford Yapp 36e3b84b5d Use s_edit edit_flag var, remove es_edflag global. 2025-05-01 10:06:35 -04:00
Clifford Yapp 170510c31f Put main set_e_axes_pos logic in callback func
More setting the stage for eventual librt editing.  Leaving the original
function signature intact, just having it call the callback signature
internally.
2025-05-01 08:48:29 -04:00
FORCHA PEARL df985390a6 return success in ged_plot_core() 2025-04-30 22:33:12 +01:00
Clifford Yapp 49677443a3 See if we can just use one var to indicate rot/tra/sca/pick mode 2025-04-30 17:05:26 -04:00
Clifford Yapp f731f8ca53 Replace MGED edit state struct with librt struct
The librt structure is now defines a superset MGED's active editing varibales,
modulo a couple things like the global MGED state variable.  Use that struct
rather than the MGED version and put the few that aren't present there in
mged_state.

This again should amount to a rename, since we are still using one global copy
of the struct for all operations, but it gets us closer to using transient edit
states and having editing logic live in librt.
2025-04-30 15:00:29 -04:00
Clifford Yapp bde655a537 Add a librt function for processing of edit knob commands 2025-04-30 13:55:26 -04:00
Clifford Yapp 234649ae49 Use the knob reset function for the edit state knobs 2025-04-30 10:36:20 -04:00
Clifford Yapp 98d6436bf7 Return after printing error message. 2025-04-30 10:09:37 -04:00
Clifford Yapp d095bdf56e Remove unused global vars 2025-04-30 10:08:05 -04:00
Clifford Yapp ce6d914896 Got bit by local definition - fix dozoom.c 2025-04-30 10:02:47 -04:00
Clifford Yapp 43a2713de1 Move most of the editing related globals to edit_state struct. 2025-04-30 09:31:28 -04:00
Clifford Yapp 2479b8bca5 Move update_views into mged_state struct 2025-04-30 08:16:23 -04:00
Clifford Yapp 3109829774 Sort CMake file lists 2025-04-30 07:58:55 -04:00
Clifford Yapp 9a2b5d5024 Move a few globals into the edit_state struct. 2025-04-29 15:50:13 -04:00
Clifford Yapp 97361e201c Set up to use knobs struct in rt_solid_edit as well. 2025-04-29 15:02:41 -04:00
Clifford Yapp 90193fd99e Use a bview_knobs struct for the edit knobs logic. 2025-04-29 11:07:39 -04:00
Clifford Yapp 4b0dab1b7e Add an XY rotation test for tor editing.
Phew.  Would have liked ft_edit_xy to be able to handle the setup for rotate as
well as translate, but looking at what MGED has in place for rotation that's
too heavy a lift - can't afford to dive into such a deep sinkhole and lose
sight of the functab editing refactor.

It looks as if at least some of the rotation modes and matricies probably back
the full generalized power of the knob command, which (among other things)
allows for continually spinning the model in X, Y and Z directions and has lots
of modes for both edit and view manipulation, with edits often falling back to
view manipulations when the MGED settings don't indicate a particular type of
edit mode is active.  This logic is also senstivie to the "coords" setting,
with different setup math in play for the matrices in reponse to the various
settings.

In the fullness of time this should all be boiled down to some sort of
"rotation" module that can capture and apply the full capability of the knob
command as an API, but that will have to be for another day.  Some of the more
obscure/esoteric modes would have to be studied to determine what they even do,
and decoding the various paths completely doesn't seem to be necessary for the
"primitive specific editing to functab" migration task.  Since the rotation ops
boil down in the end to a rotation flag being set and a matrix appliation, as
long as we are able to prepare both e_inpara and non-e_inpara inputs that
should (in theory) let us test the various paths of rt_solid_edit_generic_srot
successfully without needing to go deeper.

Note however that ft_edit_xy does remain unable to do the full setup for
generic solid object rotations (as opposed to param specific cases).  For API
cleanliness and completeness this should be revisited at some point.  The setup
logic in this test for the final XY rotation is an extraction of ONE possible
interpretation of XY deltas for rotation, but it is by no means the only
answer.  Devs looking into the problem can't treat it as the "uniquely correct"
way to interpret such mouse delta info, even if it should happen to match
MGED's default behavior in testing.
2025-04-29 10:28:50 -04:00
Clifford Yapp d8ebd6711c Make knobs setup independent of view
orig_pos doesn't seem to be tied closely to the knobs concept data wise,
and setting it involves other bview data, so move it to the main struct.
Likewise, have the knobs init function work just with the knobs data,
and do other view manipulation elsewhere.
2025-04-29 10:09:52 -04:00
Clifford Yapp 1c97a34e95 Generalize bview knob stucture
Although these additional entries are not used directly for view manipulation
as such, they should provide enough generality to allow MGED's knob-based
editing operations to also leverage this data structure.
2025-04-29 09:18:01 -04:00
Clifford Yapp 77231aef8a Make the bview knob struct entry names shorter
Also make them a bit more generic, with an eye towards possibly reusing this
struct for editing ops as well as view manipulation.
2025-04-29 08:29:28 -04:00
Clifford Yapp 7fd78908bc Missed a bit of the adc logic when relocating - thanks Chris 2025-04-29 08:00:10 -04:00
FORCHA PEARL 1292fb97e8 Fixed Unkown PLot error 2025-04-29 04:58:52 +01:00
Clifford Yapp 2f1393c6fb Reduce the depth of the scroll display switch statement. 2025-04-28 16:22:54 -04:00
Clifford Yapp 5e08310bb5 Separate sca edit op out of command processing
Unlike tra and rot, which are executed at the end after accumulating the
results of processing multiple commands, sca is always executed immediately.
Not clear why, but to perserve existing behavior just add the sedit/oedit
execution in the main arg loop immediately after the setup.

This lets us set up edit cmd processing as a function whose sole job is to
assign the inputs for edit operations for all three categories, ever if MGED's
knob loop opts to handle them differently.  That in turn will let us push the
edit command processing down to librt without the problem of MGED's sedit vs
oedit state awareness when scaling.

Note, however, that the librt push also implies the reworking of the MGED
editing state being carried out in the librt_edit branch - therefore,
subsequent work to create a librt version of this functionality will be carried
out there.
2025-04-28 10:10:33 -04:00
Clifford Yapp fa626a621f Start simplifying logic to disentangle editing
As with the view logic, we need to collapse all the switch statements
for increased readability.  The MGED state-specific conditional
determinations we try to wrap into a single up-front test, so we can
branch into either view or editing modes.  This is where the breakout of
the bv_knobs command processing into per-command becomes critically
important, because the MGED knob state awareness appears to be per
arg/val pair, not global to all arguments to an individual knob command.
(NOT something we will duplicate in the library versions, of course, but
to preserve that behavior in MGED's version we need enough flexibility
from the lower level functions to handle it.
2025-04-28 08:20:11 -04:00
Clifford Yapp ad41a86ad2 Make sure the view syncs with the db unit-wise before doing knob ops. 2025-04-28 08:18:45 -04:00
Clifford Yapp 643e8ebc96 S case doesn't use ind, but we still need to pass validation. 2025-04-26 23:07:37 -04:00
Clifford Yapp e2883119de Make it clear what category is being reset, use bv_knobs prefix consistently. 2025-04-26 22:57:13 -04:00
Christopher Sean Morrison 8ba358b5eb check for fpclassify 2025-04-26 17:54:10 -04:00
Christopher Sean Morrison 88baf8cc04 use nextafter if we have it 2025-04-26 17:46:03 -04:00
Christopher Sean Morrison 4b38dd985d set stage to use libm for the nextafters 2025-04-26 17:43:54 -04:00
Christopher Sean Morrison 03effe70ba round three redux, should be zero-compare free again 2025-04-26 17:41:55 -04:00
Christopher Sean Morrison a5846c7ca6 before going down a lower-level route, see if fpclassify (c99) is portable enough for our needs 2025-04-26 17:37:59 -04:00
Christopher Sean Morrison ff0684ffa7 no reason these need to rely on FP_ZERO, just check if it's been precomputed. 2025-04-26 17:18:27 -04:00
Clifford Yapp 219076566e fix comment 2025-04-25 22:27:53 -04:00
Clifford Yapp 491095f3b0 Wdocumentation tweaks for clang 2025-04-25 16:52:27 -04:00
Clifford Yapp ccd263a34c Fix what appears to be a copy/paste error from 1997
The if conditional here is checking X rather than Y - this doesn't fit the
pattern of the other wrapping logic.  Digging back in the history, it appears
to originate from a 1997 mode to f_knob() in SVN commit 14080 (Git SHA1
b3fc3be99).

The prior blame commit (SVN 12861, SHA1 e78e1b2252) does not seem to have an
equivalent, and the commit that introduced it  does not mix X/Y/Z indices in
any of the other wrapping checks.

Noticed this while working to collapse the switch statements for chgview into
more readable code.
2025-04-25 15:22:09 -04:00
Clifford Yapp bb90a248c8 OSX is saying there's no pushed diagnostic to pop... 2025-04-25 15:10:41 -04:00
Clifford Yapp caddf075af Temporarily re-enable the Wfloat-equal suppression to check CI compilation 2025-04-25 13:43:05 -04:00
Clifford Yapp b575612154 Push the rest of the bview knob math down into libbv. 2025-04-25 12:48:34 -04:00
Clifford Yapp eb4c3f73b0 Move per-command knob processing to libbv
Studying MGED's f_knob, being able to reuse the logic for handling individual
knob commands looks like it will be useful.  Moreover, there's no data
dependency on libged for the core command processing, so it can be pushed down
cleanly.

Probably need to get knob_rot and knob_tran moved as well, but will do that in
a separate commit.
2025-04-25 12:23:17 -04:00
Clifford Yapp e183a1c530 Break the per-command processing of view knob into a function. 2025-04-25 11:44:51 -04:00
Clifford Yapp 0e30d1230e We may have more than 6 args for some subcommands. 2025-04-25 11:41:10 -04:00
Clifford Yapp 4270c8abb7 Use bu_opt_fastf_t to read the numerical args of view knob 2025-04-25 11:14:04 -04:00
Clifford Yapp c8ebc503f0 Set the array X/Y/Z index up front to collapse some more switch statements. 2025-04-25 11:04:32 -04:00
Clifford Yapp 23721f27da Translate MGED's knob cmd (view portion) to libged
The knob command in MGED appears to expose the most powerful view manipulation
capabilities exposed anywhere in BRL-CAD's user tools.  It interleaves editing
and view manipulations, requiring careful study to determine how to untangle
those without changing functionality.

The original code uses lots of switch statements for the various cases.  To
reduce the verbosity and consolidate redundant calculation logic, the libged
version of the code uses pointers to array entries rather than having
individual x,y,z case logic.

Although we're starting with the view manipulation logic, the main motivator
here is to try and encapsulate the editing manipulation capabilities of knob in
a way that will let us put them behind the librt editing interface.  The first
unit test setup for editing with the tor primitive made it clear that we'll
need to tackle knob if we want to properly expose all of MGED's editing power
via the functab interface - the test was able to set up one of the XY
manipulation cases (mouse input simulation) but there are a multitude of
possibilities with knob and if we don't want to have to keep repeating the
setup patterns of the initial test we'll need to get a handle on what an API
for this capability should look like.

For now, MGED's f_knob logic is unchanged - because it is so central to MGED's
interactive interface behaviors, the plan is to only replace its core logic
with libged or lower library functionality after the individual pieces have
been tested in isolation.

Because both "view knob" and MGED's "knob" command operate on a bview's knob
data, they may both be used to interact with the same view.

Note that we deliberately are not incorporting the MGED command's adc (angle
distance cursor) features into this command.  The MGED version is calling other
commands for adc features in any case, so the functionality is already exposed
elsewhere.
2025-04-25 08:50:53 -04:00
Clifford Yapp 1c02e1f464 Don't call mged_svbase in MGED's view cmd wrapper
mged_svbase always resets the absolution portion of the knob values, and we
don't always or even usually want that for libged view commands.  Since we
are reworking the knob values to be part of bview, individual libged commands
can now reset them themselves if that is something they want to do.  Just
add the part of the logic from mged_svbase we do want.

Ran into this experimenting with a "view knob" command - doing this makes it
impossible for that command to work as it should.  MGED's knob command runs
without calling mged_svbase - to work the same way, "view knob" must also be
able to do the same thing.
2025-04-24 16:23:19 -04:00
Clifford Yapp 21c09833c8 Have MGED use the bview knob struct to store its data
This basically amounts to a relocation/rename, since the knob is controlling a
view.  We check for a NULL view pointer in a few place where the pre-existing
surrounding logic isn't already assuming that pointer is valid.
2025-04-24 13:55:08 -04:00
Clifford Yapp 71c1bf069b Define knob data entries for struct bview
Setting the stage to support a libged level knob command.
2025-04-24 12:38:26 -04:00
Clifford Yapp 21b903d87d Remove unused struct variable 2025-04-24 08:39:08 -04:00
Clifford Yapp 09e285c32d Remove src/other include callout 2025-04-23 09:40:19 -04:00
Christopher Sean Morrison 612975c29c don't forget to pull the pop as well. 2025-04-22 15:02:01 -04:00
Christopher Sean Morrison 83e08e9e6f don't forget to pull the pop as well. 2025-04-22 15:00:58 -04:00
Christopher Sean Morrison d0dcf6356c Boolean evaluation on floats should also match exact zero.
Should avoid needing to exclude any floating point comparison warnings.
2025-04-22 14:58:44 -04:00
Clifford Yapp afc2e61d8b Upstream pixcii released version 0.2.0 - update to match. 2025-04-22 14:17:48 -04:00
Clifford Yapp 04d8d658fa Adjust hits_da comment
Was a little misleading, since the fact it was zeroed during prep (while true)
doesn't have any functional relevance here - there is no reliance on the memory
being zeroed.  Rather, we deliberately reuse memory here by overwriting new
data and keeping a count of which entries are valid (for performance reasons.)
2025-04-22 09:33:42 -04:00
Clifford Yapp fc884767d6 Try to disable -Wfloat-equal warning for ulp.c file
Normally (on sufficiently modern GCC compilers) this code would trigger the
-Wfloat-equal warning, but since that is the nature of the calculations being
performed in this use case we need to locally suppress the warning.
2025-04-22 09:20:24 -04:00
Christopher Sean Morrison 539415fc37 simplify, always return the distance (i.e., abs value) 2025-04-22 02:36:57 -04:00
Christopher Sean Morrison dd6915417d include the header to export, fix bn_ulpf types 2025-04-22 02:16:53 -04:00
Christopher Sean Morrison 1a44730a30 switch to strictly using unions instead of casting to avoid undefined behavior for C. 2025-04-22 02:08:26 -04:00
Christopher Sean Morrison 22d8b237e6 add implementations of bn_ulpf() as well as nextafter functions 2025-04-22 01:42:17 -04:00
Christopher Sean Morrison 777d21c675 instead of a flat list, group them for readability 2025-04-22 00:39:56 -04:00
Christopher Sean Morrison 0f92d93eed stub initial public header for the ulp implementation (which also includes limit funcs) 2025-04-22 00:36:06 -04:00
Clifford Yapp 55cf41e0e3 common.h comes first 2025-04-18 21:14:24 -04:00
Clifford Yapp 251af4d7fc Didn't end up using this - remove 2025-04-18 17:29:19 -04:00
Clifford Yapp d24e8c04b5 List header for CMake 2025-04-18 17:27:54 -04:00
Clifford Yapp 4521975f3f Add ability to generate ASCII art from images to libicv
Incorporate a subset of the https://github.com/ashish0kumar/pixcii logic,
adapted to libicv data types, to support producing ASCII art from images.

Setting this up to set the stage for an experiment - whether or not dumping out
ASCII art for failed image diffs in the libged drawing tests will give us
enough info in the CI system logs to visually distinguish between "slightly
different facetizations or grazing behaviors" and "major breakage".

To test out the functionality, a small test program was written - the m35.png
image in regress/icv can be used to kick the tires:

Black and white:
./src/libicv/tests/icv_ascii -a 2 -b 2 ../brlcad/regress/icv/m35.png

Color:
./src/libicv/tests/icv_ascii -a 2 -c -b 6 ../brlcad/regress/icv/m35.png
2025-04-18 16:03:58 -04:00
Clifford Yapp ddd9c2a504 Detect and return failure in "soft fail" draw tests
If we're doing a "soft fail" for the image comparison in the drawing tests,
provide an error return code.  This way we can collect the results and have
the final overall return be success or failure.

This, in turn, should let us do our actual tests in soft fail mode and let us
see the full results in CI printing, rather than immediatly failing on just
one.  Due to the nature of the drawing tests, if we need to be using
approximate matching rather than hard comparisons and we tweak something we may
need to adjust the threshold values.  Rather than forcing an iteration for each
test, we want to run all the tests once to get a sense of the necessary
changes.
2025-04-18 10:11:03 -04:00
Clifford Yapp dab5d977ca We want to tie these two numbers together 2025-04-17 15:36:01 -04:00
Clifford Yapp 3dd7e16e83 Zero the count, since we're reusing the array
This had a really weird test failure manifestation where the libged drawing
test that tessellates moss.g failed its diff test.  Inspection showed that the
LIGHT solid had been strangely tessellated, and further inspection led to the
discovery that the "cleanup" pass had deemed most of the triangles in the mesh
to be "thin".  That test is raytracing based, which made sense of the fact that
the prior commit could impact facetization.  A lot of digging by myself and
Sean determined that the prior memory allocation commit had also removed a
counter zeroing that is necessary for the internal results array to be
successfully reused.  For performance reasons the array is not zeroed out, so
stale data made debugging "interesting".  Restored the zero assignment with a
comment explaining the zero assignment is a functional necessity.
2025-04-17 13:20:47 -04:00
Clifford Yapp f34dd5fa62 Make sure we have cmd_out before we check its contents 2025-04-17 13:15:59 -04:00
Christopher Sean Morrison 192dd314b4 allocate the initial hit structs.
we were reallocating an array of struct hits that were never allocated in the first place.   encountered crash during linux testing during DA_APPEND on the first realloc.  possible could still be something else, like thread_id collision on the hit_arrays_per_cpu, but that would be a caller mistake to correct.
2025-04-17 01:33:52 -04:00
Clifford Yapp 75e9452327 Remove unused define 2025-04-16 21:49:50 -04:00
Christopher Sean Morrison 352d4262f7 additional status printing 2025-04-16 19:10:19 -04:00
Clifford Yapp a09620e3ec Match bext sha1 to latest main 2025-04-16 15:35:52 -04:00
Clifford Yapp 417162d421 Correct target name 2025-04-16 13:46:21 -04:00
Clifford Yapp d7ba5c4966 Update bext to get Tk build adjustments. 2025-04-16 12:41:07 -04:00
Clifford Yapp 469fecc577 Assign folders to a few misc targets. 2025-04-16 12:38:12 -04:00
Clifford Yapp 51471f974d Try RC clearing with bext Tcl bld. 2025-04-16 11:16:25 -04:00
Clifford Yapp bbeb16aa25 Update bext to get updated assimp/pugixml component deps. 2025-04-16 09:01:27 -04:00
Clifford Yapp e149f0103c Use ':' rather than ';' to delimit components 2025-04-16 08:50:47 -04:00
Clifford Yapp 4217071587 Update bext sha1 to ee06c9068bbe for Itk build fix 2025-04-15 13:51:28 -04:00
Clifford Yapp 5131bc9ecb Update TODO entries 2025-04-15 08:54:58 -04:00
Clifford Yapp 58098a667c I think we're not using the bext_output subdir anymore? Don't seem to be using the bext from the separate setup step. 2025-04-15 08:25:53 -04:00
Clifford Yapp 403fcea64a More notes about header changes. 2025-04-14 10:22:16 -04:00
Clifford Yapp cc9625376b Remove configure compat script
Removed most of the logic maintaining this about a year ago - clear out
the script itself and update CHANGES.
2025-04-12 20:33:47 -04:00
Clifford Yapp ac6c6dd2b2 Update CHANGES, remove some old deprecated code
Yikes, been a while since I checked this list.  Add notes about globals
removed.  Additionally, try to clean out some of the lower hanging fruit
on the "deprecated" list.
2025-04-11 23:21:15 -04:00
Clifford Yapp 9a90cde487 Remove deprecated bu_brlcad_dir and bu_brlcad_root APIs - replaced by bu_dir. Document global removals while we're at it, and mention Orca_hash_tbl. 2025-04-11 21:54:25 -04:00
Clifford Yapp d73ad6441f Remove more stray references to mintie and minpieces
Obsolete with new BoT raytracing code.  There WAS still one place in librt
referencing the LIBRT_BOT_MINTIE environment variable, but it was not being
used in the traditional way - it was instead being used to allow overriding of
the maximum number of primitives allowed in a node during the HLBVH
acceleration structure building process.

In normal usage this variable shouldn't be modified (couuld be just a
debugging/tuning feature left from development) so rename it to be more
descriptive of what it is actually being used for.  May remove it entirely
later if there's no compelling motivation to allow user run-time tuning of that
parameter.
2025-04-11 16:20:33 -04:00
Clifford Yapp c783484f9a Update nirt(n) man page to refer to nirt(1) man page
Since we should be close to or at option parity now, DRY out the NIRT
documentation a little by having the GED version reference the command line
program's manual.

We should probably update these to be just "GED" rather than "MGED" man pages,
since tools like gsh and qged/arbalest (and for that matter Archer) are also
using them - most of these are not *just* MGED commands anymore.
2025-04-11 15:59:55 -04:00
Clifford Yapp b0c6da74d2 Update TODO 2025-04-10 17:01:36 -04:00
Clifford Yapp 49f58025fd Relocate initialized librt globals to rt_init.cpp
Daniel Roßberg's testing indicated we need to have the initialized librt
globals in the same file with the initialization code to avoid a risk that
linkers will cause problems and require us to manually initialize anyway.
2025-04-10 16:29:40 -04:00
Clifford Yapp 63d7d24f1e Still want this regex 2025-04-10 14:42:22 -04:00
Clifford Yapp 6da7f1d335 Revert "Put back the explicit rt_vlfree and rt_uniresource initializers"
Daniel Roßberg did some testing and found a way to make this work - reverting
the revert ahead of making the changes.

This reverts commit 4cbc87cef6.
2025-04-10 14:40:52 -04:00
Clifford Yapp c076351597 Don't try to prep an empty BoT
With the new facetize logic sometimes returning empty BoT solids to indicate a
CSG tree evaluated to an empty volume, we need to skip prepping if that solid
is present in the CSG tree being raytraced.
2025-04-10 14:11:30 -04:00
Daniel Rossberg cec004f1ad Merge pull request #180 from BraghinAndrea/main_AB
Correction of typos related to Element_Seatbelt
2025-04-09 21:53:42 +02:00
Clifford Yapp ddce676719 ged_exec needs its own copy of the argv
Saw a problem with search -exec using the -F option to bot extrude
2025-04-08 15:49:44 -04:00
Clifford Yapp f3533ecad6 Add libbg function to get trimesh area. 2025-04-08 10:16:16 -04:00
Andrea Braghin 44748e9eae Correction of typos related to Element_Seatbelt 2025-04-08 10:09:24 +02:00
Clifford Yapp 4cbc87cef6 Put back the explicit rt_vlfree and rt_uniresource initializers
Per reports and discussion, rt_init.cpp isn't enough to always ensure these
resources are set up correctly.  Aside from keeping the rt_init.cpp setup
itself, this commit largely undoes the initialization removals from 3a68e6180
and related commits.

We also define convenience macros RT_VLFREE_INIT and RT_UNIRESOURCE_INIT while
we're at it, so calling code has an easy way to both check if init is needed
and perform it if it is.
2025-04-03 16:43:25 -04:00
Clifford Yapp cb4b62d0d4 Note need to put back explicit inits 2025-04-03 15:11:03 -04:00
f4alt 754d9443a4 fastest rejection first 2025-04-03 12:55:40 -04:00
f4alt ef8371122c add in a tolerance to bot shot hit detection
toldist existed in previous bot_shot code and serves to improve hit
detection.

Improve on the calculation by using a ULP based tolerance, and further
scale the tolerance using the ray+triangle orientation. This means
parallel (grazing) rays get more tolerance while the more stable
calculations of parallel intersection get a smaller tolerance to reduce
false negatives.
2025-04-03 12:55:40 -04:00
f4alt 7a21493cbd improve readability 2025-04-03 12:55:40 -04:00
Clifford Yapp cf7a457eb7 Adjust TODO list 2025-04-03 11:14:18 -04:00
Clifford Yapp 115ff98da2 Have gsh depend on ged plugins, not just dm plugins. 2025-04-03 10:48:38 -04:00
Clifford Yapp e9efe16166 Rework how nirt is plotting and sending commands.
This addresses a number of issues.  The initial motivation was to allow for
processing a large number of drawn objects by avoiding having to list them all
on the command line.  In the process of reworking how data was being passed to
nirt, the plotting logic was simplified by having nirt(1) generate a plot file
as an optional output that can be read back in to provide the graphics.  This
avoiding the need to shoot multiple rays in libged to collect different data
types, as well as eliminating the textual post processing previously used to
recover the data.

Because option processing was modularized and reworked, it should now be
possible for virtually all options that are supported by the command line
nirt(1) command to also be used on the MGED command prompt.  It is not possible
to specify an alternate .g file to use there, but the command line parsing of
options is now shared by both nirt(1) and nirt(n).  If a -e option is detected
then the default "s" command for ray shooting will be skipped, allowing users
to customize what operations they want executed.

The nirt command in MGED will now also respect the formatting specified by the
qray command (fmt r, fmt p, etc.).  Previously it appears to have been using
the default libged nirt formatting.  This means that any existing .mgedrc
files (which may define other formatting) will now be active again - users
may wish to clear any qray settings pertaining to formatting from their .mgedrc
files to avoid unexpected output formatting changes.

The arbs.g file is useful for testing plotting - for example, the following
view settings will shoot down multiple arbs and trigger multiple plotting
output behaviors:

center -800 600 320
ae 322 0
2025-04-02 16:07:16 -04:00
Clifford Yapp ac537c4d59 Add a flag for db_ls to permit returning of RT_DIR_PHONY_ADDR objects. 2025-04-01 12:41:27 -04:00
Clifford Yapp f643856a5e Add a few more predefined bu_colors as well as a macro for comparing colors. 2025-04-01 12:39:39 -04:00
Clifford Yapp 1bf0b63cb8 For the moment, back out most of the nirt changes
Leaving the removal of the "need to specify objs on command line" limitation
but otherwise backing up - major work is going on in a branch that will change
most of this code, and until that's ready we'll leave main in an unaltered
state.
2025-03-28 13:28:37 -04:00
Clifford Yapp 4c4f83aa41 Don't conflate sscanf return codes with func return code. 2025-03-28 13:03:50 -04:00
Clifford Yapp 15ecfed6ef Deprecate libged nirt trailing xyz center setting in favor of opt
The abilty on the MGED command prompt to specify the x y z values of the center
is different than the command line nirt, and potentially problematic if an
object name should happen to be the same as a center point value (unlikely but
certainly not impossible.)

To replace the x y z syntax, we add an option to nirt to allow explicitly
setting xyz via an option up front as well as listing the libged/MGED "nirt x y
z" syntax for deprecation.
2025-03-27 10:51:51 -04:00
Clifford Yapp 9a7be331e5 Reduce scope of variables. 2025-03-27 09:29:35 -04:00
Clifford Yapp ed6c2ae74d Localize variables, rename vls str, use bu_vls_cstr instead of bu_vls_addr 2025-03-27 09:19:06 -04:00
Clifford Yapp abaceb7129 Split the output aspects of the libged nirt command into a separate function. 2025-03-27 09:06:19 -04:00
Clifford Yapp 75311f194d Use bu_ptbl_cat rather than manually iterating. 2025-03-26 13:57:28 -04:00
Clifford Yapp 2c038142d4 Make ged_drawable and related struct types private 2025-03-26 13:52:21 -04:00
Clifford Yapp 4e1448766b Set up accessor functions for the drawable display list and clbk
This is setting the stage for making ged_gdp private within libged.  Code
outside of libged proper uses the display list and the notifier callback - if
we make those settable and getable with accessor funcs, the rest of the struct
(and its associated type structs) can become private.
2025-03-26 11:41:37 -04:00
Clifford Yapp 6f97a7c68c Add user pointer tbl to struct ged, remove rt_cmd entries from ged_drawables struct
Looks like only two uses of the rt_cmd entries in the ged_drawables struct, and
the entires have long been marked deprecated.  The preview command logic looks
like it could stand some cleanup, but that's orthogonal to the focus right now
so the idea is to preserve its existing behavior as-is, just without involving
ged_drawable.

This also adds a way to allow apps and commands to stash arbitrary data
pointers in the ged struct.  Rather than an individual void pointer, which is
more typically what we provide for this, use a bu_ptbl so apps can avoid the
need to do their own packing and unpacking of multiple pointers.  struct ged is
big anyway and is already set up and cleared by functions, so the
flexibility/convenience benefit wins out over a single void pointer.
2025-03-26 11:28:17 -04:00
Clifford Yapp da4a8e11f3 Clean up libged header externs
The switch to ged_exec ended up replacing a large chunk of what had
been externed libged functions.  Scrub and simplify - consolidate
the previously broken out view subfolder into view.h since there is
now less to manage.
2025-03-26 09:54:13 -04:00
Clifford Yapp 7d33b4e5f6 Update mouse-based query ray calls for new defaults. Just nirt command - previous nirt output is being cleared anyway. 2025-03-26 09:06:37 -04:00
Clifford Yapp fa3a85fcf2 Have nirt_opt_vals_reset also restore the int values to defaults. 2025-03-26 08:51:00 -04:00
Clifford Yapp 6f70aeb9db Modularize NIRT option parsing
Both MGED and the command line nirt program need to parse NIRT options.  The
libged nirt command does some custom setup to both handle options specified by
the app and prepare appropriate inputs to launch its own command line nirt(1)
command.  The hope is that by making the primary nirt option parsing available
as a library call, it will be easier to make the libged "pass through" more
robust.

The underlying motivation is a use case recently encountered with a very large
number of objects drawn in an MGED scene via search -exec.  Attempting to run
NIRT on such a scene will result in a very large argv command line being
constructed for nirt(1) launching, which does not scale - particularly on
Windows.  (We have had a similar problem with rt in the past when command lines
got too long due to complex scene specification.)  Newer NIRT has the ability
to accept "draw" commands to add new geometry objects, so we no longer need to
specify them all on the command line, but to make that work we must also make
sure we are constructing the appropriate inputs in libged.  If we can do option
processing in libged the same way we do it in nirt(1) itself, that should
(theoretically) let us handle things more cleanly at the libged layer as well
(separating out scripts and actual command-line only options, for example.)
2025-03-25 16:02:10 -04:00
Clifford Yapp 095049cf4d Remove requirement that command line nirt have objects listed
Chris noticed that with the draw command in nirt, we don't actually *need* to
specify objects up front - we can launch with just a .g file and specify
objects to draw after the fact.
2025-03-25 13:07:29 -04:00
Clifford Yapp e9b40d2708 Add a version reporting feature to gsh 2025-03-24 16:54:38 -04:00
Clifford Yapp 9995d8f286 Remove some unused extern defines, rename internal ged database version function. 2025-03-24 16:36:17 -04:00
Clifford Yapp 3cb8d48915 Define a search -exec callback function for gsh and register it. 2025-03-24 15:52:40 -04:00
Clifford Yapp cc9b551f83 Update all active MGED views, not just the current one.
When mv_coords is assigned, it's treated as a global in MGED.  So if we want
the view based value gv_coord to behave the same way, we need to update ALL the
active view copies of it when the toplevel changes, not just the current view.
2025-03-24 10:33:53 -04:00
Clifford Yapp a0673db359 Use gv_coord from the bview struct rather than the mged var
The gv_coord variable is updated when "coords" is set in MGED (by copying the
mv_coords value that is actually set from the Tcl command.)  To help make the
rest of the MGED code a bit more generic (i.e. potentially easier to refactor)
check the gv_coord value rather than mv_coords.
2025-03-24 10:22:29 -04:00
Christopher Sean Morrison 22690121ea update to 90ea63597e529a03e05158ffcfbf0803591c87fa for more mac fixes 2025-03-24 01:51:19 -04:00
Clifford Yapp 71776518c5 Put MGED back in the 335aaf8bdd state from main so we can sync back. 2025-03-21 15:44:16 -04:00
Clifford Yapp 23f29ed8e6 Use a struct to hold saved flags for less verbosity. 2025-03-21 15:01:03 -04:00
Clifford Yapp 762dcafd7d Use numbers based on MGED editing - in particular, set curr_e_axes_pos for trans. 2025-03-21 15:00:05 -04:00
Clifford Yapp a00508ae34 Still need to check values against main MGED, but get basic logic in place for tor xy testing. 2025-03-21 15:00:05 -04:00
Clifford Yapp 590d86ec83 Looks like we'll want to use one of the param ops for this. 2025-03-21 15:00:05 -04:00
Clifford Yapp 7d4ac2c83d Stub in entries for xy testing. Still thinking about how to do this. 2025-03-21 15:00:05 -04:00
Clifford Yapp 88d5caa753 Add a couple tests with mv_context == 0
MGED allows the user to explicitly disable this value, so we should make sure
the tests touch those code paths.
2025-03-21 15:00:05 -04:00
Clifford Yapp 55123cf6c6 Some of the rotate modes are also sensitive to view scale. These now seem to line up with the MGED results. 2025-03-21 15:00:05 -04:00
Clifford Yapp 26f0da7bcd Start working on matching the results to actual MGED edits
Need to set up the view to match an MGED view for the view-sensitive edits.
Use "set rotate_about" in MGED to v/m/e/k to trigger the various behaviors
(default appears to be 'k'.)  Got 'v' case to align, but more work to do for
the others.
2025-03-21 15:00:05 -04:00
Clifford Yapp 4cc8e11a6e Set up paramaters to match those we get stepping through a tor edit in the GUI. 2025-03-21 15:00:05 -04:00
Clifford Yapp ba1cfe5c05 Not sure numbers are right yet, but clearing acc_rot_sol gets us further. 2025-03-21 15:00:05 -04:00
Clifford Yapp 0cb2fa58b6 More tests of tor editing. 2025-03-21 15:00:05 -04:00
Clifford Yapp dbd035d14f Do more explicit initializations. 2025-03-21 15:00:05 -04:00
Clifford Yapp 8149a177b7 Rather than require an on-disk input, use an inmem db for the edit test. 2025-03-21 15:00:05 -04:00
Clifford Yapp 83d1bd601a Trigger tor edit operation from test. 2025-03-21 15:00:05 -04:00
Clifford Yapp 881ce10105 Start working on testing code for TOR editing. Once patterns are established, will make it more general. 2025-03-21 15:00:05 -04:00
Clifford Yapp 23ee7449fb Set up other primitive set_edit_mode functions
In some cases the logic for the primitive calls the process function (equiv. to
sedit) so we need to study in more detail why those calls are happening and
what makes sense.
2025-03-21 15:00:05 -04:00
Clifford Yapp 2181ee7a0d Stash a note to study get, put and adjust. 2025-03-21 15:00:05 -04:00
Clifford Yapp ccddd6b094 Split out TOR ed setup logic. 2025-03-21 15:00:05 -04:00
Clifford Yapp 490fd85b66 Stub in entry for edit mode setting method
Right now, the way edit modes are selected for solid editing tends to be the
faceplate GUI in MGED, which sets various values via its function callback.  To
be able to test this without the GUI, we want a way to trigger that same logic
without going through the MGED selection system.

The most direct route looks like refactoring the logic of the *_ed() functions
to be callable directly rather than only being exposed via the menu item static
functions.
2025-03-21 15:00:04 -04:00
Clifford Yapp 6dd352ffe6 Need to set the scale flag for other CSG param editing modes. 2025-03-21 15:00:04 -04:00
Clifford Yapp 471979674b Don't work with e_para unless that input type is specified. 2025-03-21 15:00:04 -04:00
Clifford Yapp 77be246968 TOR - set scale flag, only check e_para if we've got that sort of input. 2025-03-21 15:00:04 -04:00
Clifford Yapp b450f70cda Use the flag setting function for less verbosity. 2025-03-21 15:00:04 -04:00
Clifford Yapp a37fc9764b Eliminate PSCALE define in favor of SCALE
With primitives handling edit_flag values directly, we don't need PSCALE at
that level and for flag setting purpose PSCALE and SCALE are the same.
2025-03-21 15:00:04 -04:00
Clifford Yapp 86c205cb68 More adjustments to edit_xy functions
Generic won't handle the PSCALE param, since that should be per
primitive with the specific edit_flag values.

Make a few other case adjustments to primitives with existing edit_xy
functions.
2025-03-21 15:00:04 -04:00
Clifford Yapp 15b72a3b44 Adjust edit_xy methods, add sedit equiv. call
Ah, OK.  The edit_xy routines merely set the stage for the full-on
processing edit call.  Initial breakout was slightly off the mark in
that it was having the edit_xy calls try to do everything in certain
cases and not calling the main routine from sedit_mouse, which is why
most things weren't updating properly.

Will need another pass to make sure all the equivalents are in place as
compared to the big case table, but with this change setting the A
parameter in cone.s in moss.g example is behaving much better.
2025-03-21 15:00:04 -04:00
Clifford Yapp 7f39cea1c7 Only create a solid edit in init_sedit if we don't already have one. 2025-03-21 15:00:04 -04:00
Clifford Yapp 05c636e49b Whoops, want all the callbacks in sedit, not just the per-prim. 2025-03-21 15:00:04 -04:00
Clifford Yapp 9e8379bef0 Remove menu_cmd from the clbks 2025-03-21 15:00:04 -04:00
Clifford Yapp 90ee21aa87 Adjust switch logic - probably more to do here... 2025-03-21 15:00:04 -04:00
Clifford Yapp 85c66f76b1 Use a define rather than a raw number 2025-03-21 15:00:04 -04:00
Clifford Yapp 2cca7c901e Remove edit_menu in favor of edit_flag
In the case of arb8, which has more complex/extensive use, make it an
entry in the arb specific struct - otherwise, just use edit_flag.  In
the case of PSCALE, this means rather than using a LIBRT level PSCALE
define and edit_menu to get specific, the primitives take care of things
on an individual basis.  The top level variable becomes only convenience
for updating the flags.
2025-03-21 15:00:04 -04:00
Clifford Yapp 8955479f6a Restore (in a branch) the in-progress MGED using librt editing
OK, main has a version of MGED from before the code relocations started.
We now make another branch to focus on shaking down MGED's editing
capabilities with this new form of the edit code.

Doing it this way so we (hopefully) wind up with fewer conflicts when
rebasing and/or merging main - prior branch was getting a bit unwieldy.

This reverts commit 187b138fd2.
2025-03-21 15:00:02 -04:00
Clifford Yapp 335aaf8bdd Reorder knob_tran and knob_rot, pass through pre-baked vars
Simplify knob_tran and knob_rot conditional checks, since we
have already done them in the f_knob function.
2025-03-21 14:54:13 -04:00
Clifford Yapp 84349dd552 Consolidate repeatedly used verbose conditionals for f_knob into variables. 2025-03-21 14:47:03 -04:00
Clifford Yapp c0f78684b1 No need to pre-declare var names here. 2025-03-21 14:45:14 -04:00
Clifford Yapp 6cfba6d5b5 Set a variable up front to improve readability 2025-03-21 13:50:03 -04:00
Clifford Yapp 4b0ebde875 Specify bext_output subdir in the initial setting of the BRLCAD_EXT_INSTALL_DIR path. 2025-03-21 13:15:53 -04:00
Clifford Yapp 594adbeb1e Update bext SHA1 2025-03-21 10:28:56 -04:00
Clifford Yapp b70472dee7 Update callback type to include struct region pointer
The prior approach using the libbu standard callback type required that we pull
the region pointer off the head list, which in turn required that the head list
be stable until we were done with the callback.  While that woudl function, it
expanded the length of time when an individual thread would be blocking.

Instead, pass the specific region pointer of interest directly so we don't need
to worry about looking it up.
2025-03-21 10:22:34 -04:00
Clifford Yapp 81f4591685 Try a different approach to Orca_hash_tbl removal
Rather than requiring the caller to dupliate the tree walk, supply a callback
slot that gets passed the rtip and tsp.  The current region can be pulled off
of the rtip list, since it was just inserted, and that lets the caller perform
this (previously hard-coded operation) in the callback in the same way.

This not only alleviates concerns about whether the second tree walk in the
previous approach would behave the same way as the initial pass, but also
greatly simplifying the code required from the user to implement the feature.
2025-03-21 09:41:34 -04:00
Clifford Yapp 9eb97223c6 Revert Orca_hash_tbl removal
Have an idea for another approach that won't depend on a second tree walk that
matches the first exactly.

This reverts commits 40c2b369d7,
467df4df35 and
856ab47182.
2025-03-21 08:19:54 -04:00
Clifford Yapp 40c2b369d7 Note idea for a possible alternate approach to the inv matrix calc problem. 2025-03-20 22:53:45 -04:00
Clifford Yapp 931803312c Remove IR_KNOBS and IR_BUTTONS ifdef codes 2025-03-20 16:11:04 -04:00
Christopher Sean Morrison abdca2d6cf msvc still throwing redefinition erros, probably a built-in, so conditionalize platform-specific until can find another solution 2025-03-20 11:53:02 -04:00
Clifford Yapp 76802549f4 Shift view limit defines into bv/defines and rename
Both libdm and libged use these, and previously we didn't have a good place to
store them that both could access.  As a result, they got dupliated when the
two were decoupled.  Now, however, we have libbv - that's a logical place to
stash these and is used by both libdm and libged.
2025-03-20 09:57:42 -04:00
Clifford Yapp 8286b46095 Another INV define 2025-03-20 09:26:47 -04:00
Clifford Yapp 5ad18f4805 Rename _GED_MAX_LEVELS to _GED_TRACE_MAX_LEVELS
Really looks like this define should be private, but it is in the ged/debug.h
header so go ahead and add it to changes.
2025-03-20 09:24:25 -04:00
Clifford Yapp 0ed98a90d1 More GED min/max definition consolidation. 2025-03-20 09:17:56 -04:00
Clifford Yapp 00e696a028 Consolidate defines for view 2025-03-20 09:06:18 -04:00
Clifford Yapp e4744c018d Causes common.h:477: error: "alloca" redefined [-Werror] on Linux - see if we can just check for an existing definition. 2025-03-20 09:03:43 -04:00
Christopher Sean Morrison ef429b9ee8 credit daniel and ali for their extensive work on LS-DYNA importer support for .k files 2025-03-20 03:58:41 -04:00
Christopher Sean Morrison 45efec37c1 trivial workaround that gets system Eigen working on Mac.
we don't use the old and discouraged alloca() interface, but Eigen can/does.  alas, isn't declarable in certain compilation modes due to declaration settings, so build fails on any use due to header/macro expansions.  this works around that and was tested to work using the k-g converter.
2025-03-20 03:22:47 -04:00
Christopher Sean Morrison d4ae399249 if we ignore CRs, should avoid returning empty lines and stateful parsing issues.
does mean that we're not text-file portable to ancient macs that only used carriage returns, but their existence is increasingly rare.
2025-03-20 02:02:43 -04:00
Christopher Sean Morrison 41d6b27473 for portability, use std::endl instead of hardcoding a newline 2025-03-20 01:53:36 -04:00
Clifford Yapp 79c924891c Relocate editit, use argv[0] ged_exec will recognize. 2025-03-19 15:35:37 -04:00
Clifford Yapp 0f016a9659 Try to clear a few MSVC warnings. 2025-03-19 13:54:23 -04:00
Clifford Yapp b6db42b7e3 Set up to check more than one terminal
Note that any additions to this list should be check with edcodes/red commands
in MGED to make sure they work as expected.
2025-03-19 13:03:34 -04:00
Clifford Yapp 0fcc635aa2 Have gsh set up an editor for command usage 2025-03-19 12:41:15 -04:00
Clifford Yapp 7d0440a8a4 Move MGED level editor setting logic to libged
There is nothing specific to MGED in these functions, and they establish
a general pattern for setting up editor inputs for GED commands that
might be useful to other applications.
2025-03-19 12:36:19 -04:00
Clifford Yapp da26bcf455 Use bu_ptbl to hold editor options from bu_editor
Notepad++ proves we need more flexibility here, so use make bu_ptbl to
make life simpler.  While we're at it, add a unit test to validate that
we do get an option back for a lookup case where we know to expect one.
2025-03-19 09:50:00 -04:00
Christopher Sean Morrison d5ede2c245 get us past itk/itcl failure due to cached empty vars 2025-03-19 03:21:34 -04:00
Clifford Yapp 5b3861965f Work on adding original librt decimate to bot decimate subcommand. 2025-03-18 17:16:03 -04:00
Clifford Yapp b1b70fe0ee Looks like we'll be needing multiple editor options for Notepad++ on Windows. 2025-03-18 17:15:14 -04:00
Clifford Yapp 7fa42e8bb5 Work harder to use an env specified editor in MGED
If environment variable specified editors are terminal editors, by
default we were skipping them in graphical mode and moving on to GUI
editors.  Since MGED tries to do terminal setup for launching such
editors from a graphical environment, work harder to try and respect
editor environment variable settings even if we're in graphical mode.
2025-03-18 15:27:33 -04:00
Clifford Yapp 26d24eba47 Have MGED editit commands used ged struct
Avoid putting the paths through string packing and unpacking.  This may
be all the uses of the -E options on these commands, in which case we
could probably just remove those options from the commands and remove
the editstring param completely from editit, but will go ahead and
deprecate to be safe.
2025-03-18 13:57:43 -04:00
Clifford Yapp bb1033e922 CreateProcess needs bu_vls_addr here. 2025-03-18 10:57:26 -04:00
Clifford Yapp 7022c98af9 Start reworking editit to accept either an edit string or gedp data. 2025-03-18 10:57:26 -04:00
Clifford Yapp bbf021765f Remove redundant include 2025-03-18 10:56:14 -04:00
Clifford Yapp 411c1a606e Fix Windows testing for bu_editor 2025-03-18 10:39:23 -04:00
Clifford Yapp f394d10fbb Slot ged struct entries into editit logic. 2025-03-18 10:26:33 -04:00
Clifford Yapp a6850e8b2c Rough in struct ged slots to hold editor info
Need a way to manage this that doesn't involve constructing and chopping up
strings.  In theory the terminal path will have the same weaknesses as the
editor path, so we'll need the same mechanism for both.
2025-03-18 10:26:33 -04:00
Clifford Yapp 63d60cefa8 Pass gedp to internal editit function
Having to rely on string parsing for this is fragile and clunky.  Need to see
if we can come up with something better to manage the necessary data.
2025-03-18 10:26:33 -04:00
Clifford Yapp be76b13b81 Remove unused definitions 2025-03-18 10:26:33 -04:00
Clifford Yapp 9c8dbaec1a Even non-space paths may change - need to match bu_editor processing. 2025-03-18 10:26:15 -04:00
Clifford Yapp d48bb84639 If we have a path with a space, the EDITOR strequal check would be too strict on some platforms. 2025-03-17 13:14:58 -04:00
Christopher Sean Morrison 036b70c7ba ignore anything top-level with build in the name to also catch specific build type dirs 2025-03-17 12:36:29 -04:00
Christopher Sean Morrison 0a446629f7 leave a note about the openbsd implementation, but needs testing 2025-03-17 11:56:12 -04:00
Christopher Sean Morrison 4d982aec3f Revert "Stash url for glob.c implementation file."
This reverts commit dbaa0f9846.

We intentionally did not expose more of the glob(3) API to not
inherit legacy behavior, nor expose API unrelated to BU's file
processing, nor expose API that is untested (particularly w.r.t.
portability).
2025-03-17 11:56:12 -04:00
Clifford Yapp e2d3b3ea57 Use the common.h define 2025-03-17 11:42:35 -04:00
Clifford Yapp 2f1d3bbbab Avoid (if possible) returning bu_editor paths with spaces on Windows
The command evaluation path for various commands involves using
bu_argv_from_string to create an argv from a programmatically generated string,
and it turns out that means trying to use full paths to editors when the editor
paths have spaces is Not Good.

The better fix would be to change how editors and editor options are passed to
libged, but there seem to be multiple commands with options that accept edit
strings.  We'll have to look at where and how those are being used and possibly
do some deprectations.
2025-03-17 11:21:30 -04:00
Clifford Yapp caad32cb5f Be more informative about what inputs CreateProcess saw. 2025-03-17 09:34:07 -04:00
Clifford Yapp 9cd29236a9 See if we can get some info if CreateProcess fails (untested) 2025-03-17 08:51:54 -04:00
Clifford Yapp c26837e645 Sean got these running on Windows in 7.38.0 2025-03-14 16:51:25 -04:00
Clifford Yapp dbaa0f9846 Stash url for glob.c implementation file. 2025-03-14 15:02:28 -04:00
Clifford Yapp 6f7441bbff Try C extern for BU_SEM_DATETIME 2025-03-14 14:42:24 -04:00
Clifford Yapp 157e4cc81d Remove y2038 in favor of C++ date.h header
Originally we included y2038 to make our code robust to the so-called "year
2038 problem" - when Unix epoch time is stored as a 32 bit integer, it reaches
its representatioal limit on January 19, 2038.  However, a better solution is
now available - the C++11 standard introduced <chrono>, which does not suffer
from this limitation.  If we can use <chrono> based solutions for timing needs
internally, we avoid the limitations of structs like time_t.

The date.h library (v3.0.3 from https://github.com/HowardHinnant/date is added
in this commit) provides a convenient way to produce the ISO formatted output
needed by bu_utctime.  This library (in slightly modified form) was the basis
for expanded formatting support added to the C++20 standard.   While we are
including date.h currently since BRL-CAD only requires C++17, once we
eventually require the newer standard we can switch this functionlity to using
the standard version instead.
2025-03-14 11:44:03 -04:00
Clifford Yapp 140f510f66 Let's see if using the C++ standard APIs will fix bu_snooze. 2025-03-14 10:35:52 -04:00
Clifford Yapp fa4f25f080 bext SHA1 handling has been improved. 2025-03-14 10:14:43 -04:00
Clifford Yapp cb373c2da4 Don't unpack the input bot name until we need it. 2025-03-13 16:15:02 -04:00
Clifford Yapp 9cf98f2d03 Need to pass ctp through be_s_trans call 2025-03-13 16:12:46 -04:00
Clifford Yapp 6028895db9 Forcing one config, we shouldn't (in theory) need CMAKE_CFG_INTDIR or $<CONFIG> anymore. 2025-03-12 16:13:16 -04:00
Clifford Yapp d9f5939456 Get closer to upstream cpp-linenoise
We've still got history handling changes and win32 patches merged in, but
upstream accepted the "make this a class" update so we can now be a lot closer
to the upstream.
2025-03-12 09:47:50 -04:00
Clifford Yapp c8d4fc239e typo 2025-03-12 08:42:32 -04:00
Clifford Yapp 9944ec5898 list asset file 2025-03-10 19:45:21 -04:00
Clifford Yapp 6ea6454f92 uterm always equals uterm 2025-03-10 16:21:43 -04:00
Clifford Yapp 8ac6b3abf1 Minimize use of env vars for new cmd behavior. 2025-03-10 15:46:07 -04:00
Clifford Yapp dc99c84c4f Document user request for arb validator
Probably makes the most sense for lint and/or as a subcommand of an arb
primitive command - need something to audit existing arbs looking for
problematic definitions.
2025-03-10 11:45:26 -04:00
Clifford Yapp a1e824a6db Correct Geogram variable names for new find_package setup. 2025-03-07 15:17:59 -05:00
Clifford Yapp 27d7567e8a First rough cut at connecting Geogram remeshing code into BRL-CAD's bot remesh cmd. Untested. 2025-03-07 12:15:47 -05:00
Clifford Yapp 73f363c422 Start setting up to allow more than one remeshing option. 2025-03-07 12:15:46 -05:00
joshbaker22 b2ed7fa040 Update view.xml note that faceplate subcommand not implemented
The faceplate subcommand gets you some usage statements but doesn't seem to actually change anything on the graphic window. If it does work it needs more documentation because I couldn't figure it out.
2025-03-05 11:29:18 -05:00
joshbaker22 ddc26d38b1 Update help.tcl typo (extra pipe in view help) 2025-03-05 11:15:00 -05:00
Christopher Sean Morrison 27546f4a35 make easier to jump right to bext hash 2025-03-04 04:41:33 -05:00
Christopher Sean Morrison 55476737f6 update to f11907cb9d1e5894ee395d4d2b25820ecd1257ed with some more mac fixes 2025-03-04 04:34:21 -05:00
Christopher Sean Morrison f11dc3d133 Mac frameworks are apparently deprecated in cmake, so rip out the logic.
long time since we built with system tcl/tk so will need to revisit the whole approach regardless.
2025-03-04 02:43:31 -05:00
Christopher Sean Morrison 58f6709930 match project name in vars 2025-03-04 02:23:06 -05:00
Christopher Sean Morrison 8ae4d10f9d make Geogram match cmake's camelcase project name convention 2025-03-04 02:22:11 -05:00
Daniel Rossberg 6212069005 Merge pull request #176 from AliHaider93/main
readded formats mistakenly deleted in pull request #144
these changes were deleted by mistake, and they handle various format forms of a .k file
2025-03-03 17:56:56 +01:00
Clifford Yapp ab195463c7 Make a note to look into possibility of remeshing nasty plate mode inputs. 2025-02-28 17:04:21 -05:00
Clifford Yapp 66e2bcd2f0 Fix option indexing. 2025-02-28 14:18:51 -05:00
Clifford Yapp a8b0d95d60 Right - not persisting plate info, so we can't propagate those modes. 2025-02-28 13:52:04 -05:00
Clifford Yapp 472e70c3f7 Add an extremely basic vertex-snapping decimation routine
Not really something ready to announce - more of an experiment to see how much
vertex/thin triangle clearing is needed to avoid performance issues with some
of the Generic Twin inputs in Manifold 3.0.
2025-02-28 13:19:50 -05:00
Clifford Yapp c735463d00 Add support for bot dumping high precision floats
Default to existing behavior, but for situations where we need high fidelity
reproduction of the exact vertex values of BoTs add an option to support it.
2025-02-27 16:06:52 -05:00
Clifford Yapp 776a5f58a9 Increment, then assign. 2025-02-27 09:38:51 -05:00
Clifford Yapp 790a0597b2 Add support for thickness manipulation/reporting to bot get/set
We don't work with plate mode bot thicknesses much, but I hit a use case where
I wanted it so go ahaed and add some basic support.  (The use case in question
was taking a glb bot dump, importing it back into MGED, turning it from a
surface to a plate mode bot, and then setting a thickness so we could try out
bot extrude on the dumped and imported data.)
2025-02-27 09:18:52 -05:00
Clifford Yapp 2231e7d326 Fix vertex data type - glTF only supports the FLOAT vertex coordinate type
Welp. Tinygltf apparently implements a data type the standard doesn't actually
call out - DOUBLE vertices aren't a standard type, so we can't just dump our
vertex data straight into a glb/glTF file and have it work.

That's a real shame, since it means a glTF export is inherently lossy for .g
BoT data, but the standard is what it is - even if tinygltf based readers could
support it, others (assimp being the observed case) don't support it.
Accordingly, step the data down to floats when writing it out.
2025-02-27 08:22:11 -05:00
Clifford Yapp c21cb725d3 Stub in a placeholder for a thickness-setting subcommand in bot set. 2025-02-26 16:07:56 -05:00
Clifford Yapp 6b36bbe345 Apparently signed INTs make AssetImport sad. Convert to unsigned. 2025-02-26 15:46:17 -05:00
Clifford Yapp 1d8684a727 Enable basic glb/glTF output from bot dump
Needs a lot more testing, but this allows us to generate basic glTF ascii and
binary output from the arb4 bot test case.  So far only read with the updated
gltf-g importer, so not sure if other tools can read it, but definite progress.
2025-02-26 13:28:07 -05:00
Clifford Yapp 50abaadc27 Various improvements to the gltf-g importer
Trying to test bot dump, this importer wasn't giving the expected results.
Asset Import's export as glTF seems to be writing out a separate .bin file for
the buffer, while the bot dump experiments are serializing it as part of the
glTF file.  The latter apparently was problematic, and it looked as if the
import using the .bin file wasn't quite right either.

While I'm here, add some basic option handling - help, verbosity, etc.
2025-02-26 13:21:34 -05:00
Clifford Yapp 9fa0513774 Make a note about the state of view obj writing
Looks like this was specific to one particular use in Archer, rather than being
a general export ability for view elements in a scene.  To do this "right" will
take a lot more work, so for now just make a note.
2025-02-26 08:27:42 -05:00
Christopher Sean Morrison f6ec25bec1 extract variant from the invariant, pass the hash to brlcac_bext_init(). 2025-02-26 02:03:00 -05:00
Christopher Sean Morrison 72ed658ea7 bump to b053baaf86fe80fbc06fd6106eae1a5532e1f9b9 for tcl and png changes 2025-02-26 01:49:14 -05:00
Clifford Yapp d37ce7aa8b Remove directory after bot tests are complete. 2025-02-25 13:27:38 -05:00
Clifford Yapp 007696383b Enable running of the bot dump tests. 2025-02-25 13:24:44 -05:00
Clifford Yapp ba4a07266f Test writing out BoTs to a directory. 2025-02-25 11:22:47 -05:00
Clifford Yapp 888ae44ca5 Add test of -u bot dump option 2025-02-25 10:34:41 -05:00
Clifford Yapp 8b7d536218 Add very basic bot dump regression testing
Right now this is as simple as it gets - a single facetized arb4.  Control
outputs are generated from BRL-CAD 7.40.2.  At this point we're not asserting
that these outputs are necessarily correct, just that they're the same results
we were getting previously.
2025-02-25 09:45:32 -05:00
Clifford Yapp 2d09986e6c Adjust bot repair purpose string. 2025-02-25 08:37:48 -05:00
Clifford Yapp 4d612f0729 Add dump as a subcommand of bot
While I'm at this, make the "dump" subcommand for "bot".  Previously the dump
functionality was only available with the top level bot_dump command.
2025-02-25 08:29:12 -05:00
Christopher Sean Morrison 90e13f26a0 make the value bitwise unique since we're using them as bit flags 2025-02-25 00:15:44 -05:00
Christopher Sean Morrison 221ffc6d11 fix what looks ike a copy-paste mistake from 7+ years ago.
looks like the code doesn't rely on them being different since they're or'd together for their test, but still good idea to make them distinct.
2025-02-25 00:15:44 -05:00
Christopher Sean Morrison 176bd53e4a useful for dimensioning if nirt had an option to report thickness through the surface hit point. 2025-02-25 00:15:44 -05:00
Clifford Yapp 27d6aeb1b7 In directory mode we shouldn't be terminating fp. Fix stl binary write check. 2025-02-24 16:43:07 -05:00
Clifford Yapp 29b16372c9 Fix usage line, initialize vars, require at least one arg. 2025-02-24 15:47:44 -05:00
Clifford Yapp ea17530554 Initialize obj_materials_file 2025-02-24 15:03:42 -05:00
Clifford Yapp ed4b0588e9 Reapply mged quit cmd crash fix.
Fix from 0de845a628 got reverted when the MGED code was backed up - reapply.
2025-02-24 13:55:29 -05:00
Clifford Yapp 6b13f92bab Fix behavior of dbconcat when given '/' prefix.
Older codes would treat "/" as indicating no prefix, but updated code ended up
treating it as an active string and adding slashes to names (which is a Bad
Idea).

Catch this case in the new code and avoid the issue.  May actually want to do
more sanity scrubbing on the input strings, but for the moment keep it simple.
2025-02-24 13:48:09 -05:00
Clifford Yapp fa64813907 Collapse dbot into bot dump
Not tested yet, but in prinicple this collapses dbot down to options on the
main bot dump command.  Will need to go through and systematically check the
refactored code to make sure it works.  Probably should set up some kind of
basic regressions on this, since it is frequently used for fast BoT geometry
extraction from .g files.
2025-02-24 10:47:59 -05:00
Clifford Yapp 4ba1745494 Relocate dbot functions 2025-02-24 10:06:35 -05:00
Clifford Yapp 13eeb92fb0 Remove src/bext submodule in favor of an explicitly stored SHA1
Also, no longer deleting the cloned srcs and bext build from the BRL-CAD build
dir unless an option enabling that is explicitly set.  We still need it for CI,
since space is at a premium there and we need to clear the build outputs, but
otherwise removing these makes it more difficult to debug any problems.
2025-02-24 09:10:03 -05:00
louisgoogl 3961763d48 deleted changes related to format 2025-02-23 22:28:21 +01:00
Clifford Yapp 44b46d1814 Fold more dbot logic into per-format functions
dbot has some OBJ specific additional logic - add it to the relevant OBJ
functions.  Should be getting fairly close to being able to fold dbot into
bot.
2025-02-21 15:46:07 -05:00
Clifford Yapp 370af2a2c6 Wrap more format specific logic into functions, use bu_opt.
This almost certainly breaks various things, but we're moving this code towards
being able to merge the bot and dbot variants.  Should eliminiate a lot of
duplication.
2025-02-21 14:44:32 -05:00
Clifford Yapp 4645cfb591 Break data formats out into separate files and structs
Grab the low hanging fruit of the per-format logic and relocate it to separate
files.  We've still got a bunch of per-format case statements in the main
bot_dump, but this makes it a little easer to deal with the logic.
2025-02-21 10:38:08 -05:00
Clifford Yapp f18af4199c Break bot dump structs out into header. 2025-02-21 09:41:00 -05:00
Clifford Yapp a7b589ce1c Quick and dirty de-globalization of bot_dump
Since we already have a client data struct, just shove everything in there and
fix the compile.  Some of these are clearly format specific, so we want to get
more careful about organizing these, but this at least gets us passing them
around.
2025-02-21 09:29:47 -05:00
Clifford Yapp 99bdc3cb5f Make a note - next step is to get rid of these globals. 2025-02-20 16:37:07 -05:00
Clifford Yapp c554fa1e21 Have cache parallel prep test use parallel resources
The new check against rt_uniresource being used in parallel prepping tripped up
this test.  Actually use separate resources the way we're supposed to.
2025-02-20 16:29:09 -05:00
Clifford Yapp b46230dc28 Try reorganizing bot_dump logic for clarity 2025-02-20 16:19:47 -05:00
Clifford Yapp be5bf4454d Not using it yet, but stash work towards gltf/glb dumping. 2025-02-20 15:18:44 -05:00
Clifford Yapp 3a083828f6 Start working on figuring out bot_dump logic flow
Feels like this could be cleaner, but need to properly understand how the
various pathways differ.  Ideally would like to make it a bit more
straightforward to add new formats.
2025-02-20 15:16:14 -05:00
Clifford Yapp 894502a6fa Note improvements we need to make to the build system. 2025-02-20 12:52:19 -05:00
Clifford Yapp ebfc144c0c Including rt_ecmds.h here causes dupliate defines 2025-02-19 18:52:27 -05:00
Clifford Yapp 11edd29f1a Revert "Update code to use the Manifold 3.0 API"
Looks like there's some more work to do before we're ready to make the 3.0
Manifold jump.

This reverts commit c38fd66035
and e4e3f0db4d.
2025-02-19 16:26:40 -05:00
Clifford Yapp fd637656ef This is an inmem dbip, so we're not looking for a DISK wdbp 2025-02-19 11:49:50 -05:00
Clifford Yapp c38fd66035 Update code to use the Manifold 3.0 API
GLM has been swapped out for the public domain linalg.h math routines, and the
mesh containers have been reworked.  Using the manifoldConfig.cmake targets as
well.

The largest select drawing test differences appear to be the facetized mesh
interacting slightly differently with the LoD code.  One possibility is the use
of the 64 bit mesh container has slightly altered where vertices end up, which
may result in different clamping in the LoD scheme.  The meshes themselves test
as a valid manifold.

Note that at the moment this version has some regressions in boolean evaluation
performance observed in the plate mode evaluation - GenericTwin mesh 7316.1.t0
is one example.  Previous bot extrude timing was a little over 5 seconds to
completion, but the current code is far slower.  One possibility is an internal
change in Manifold to higher precision.  There is a new SetTolerance parameter
which may be useful for this case, but as of now still digging into what needs
to be done.  May need to back up to the previous version if we can't resolve
this before release.
2025-02-19 11:45:31 -05:00
Christopher Sean Morrison e4e3f0db4d update to ba8043ccdbe6973a536c6d2d3f13a72fde7433f6 2025-02-13 11:56:26 -05:00
Clifford Yapp 3d3e9ba95d Make a note about what we'll eventually want for edit and why the librt edit API isn't intended to support it in the near term. 2025-02-12 15:53:08 -05:00
Christopher Sean Morrison 052aad611f migrate docs to public interface header 2025-02-12 02:49:32 -05:00
Christopher Sean Morrison 9c2d20f3ec would be useful for gist and/or other tool to report on the max/min area possible 2025-02-12 02:49:32 -05:00
Clifford Yapp de52d5e585 Correct data being assigned to search callback
Was originally passing in the Tcl interp, but we actually need the full
mged_state.  Caught by the magic check, but only when a user triggered it -
indicates we need a search -exec test case in the regression tests....
2025-02-11 11:39:14 -05:00
Clifford Yapp 2fd7c08f72 Add a check for parallel prepping with rt_uniresource
This is an easy mistake to make, so let's check for it and be
informative rather than traipsing into potential trouble.  Warn and
error out of anyone's code tries to utilize rt_uniresource in a
multithreaded context - it's not intended for that.  Per struct resource
docs we need one resource per thread of execution, and accordingly
rt_uniresource can only be good for single threaded applications.
2025-02-07 16:08:35 -05:00
Clifford Yapp 9a8648934d missing headers 2025-02-07 00:09:51 -05:00
Clifford Yapp c5aa5fbca1 Initialize 2025-02-07 00:07:14 -05:00
Clifford Yapp bb228a0b3a Fix various copyright dates 2025-02-06 19:40:50 -05:00
Clifford Yapp 187b138fd2 Back MGED up to commit 3998b4e108
Quite a bit more work to be done to get editing working and tested with
the refactor, so back things up to before the code moves began.

Leaving the librt editing code in place, so we can merge back into main
and then branch again to continue working with MGED and the librt code.
This state of MGED doesn't use any of the librt editing APIs, so they'll
be dormant until we get things properly retuned and tested.
2025-02-06 19:14:45 -05:00
Clifford Yapp 7186665112 Note that we're deliberatly not installing rt_ecmds.h yet. 2025-02-06 13:10:35 -05:00
Clifford Yapp c2ecc2af2b Consolidate MENU_ and ECMD_ defines.
If I'm following how this is used correctly, we don't really need
separate MENU and ECMD defines - they can all be ECMD, and we just
handle the flag logic setting for the various categories of command in
the menu's edit function callback.
2025-02-06 12:55:27 -05:00
Clifford Yapp 1690470ab9 Need to be able to reset menus - NULL is a valid input for mmenu_set. Make sure the menus are reset after destroying s_edit. 2025-02-06 11:42:46 -05:00
Clifford Yapp aef25b4cb5 Only need to set up s_edit once per cycle. 2025-02-06 11:18:02 -05:00
Clifford Yapp dffd5f4f5e Don't validate and process e_para unless we need to. 2025-02-06 11:17:45 -05:00
Clifford Yapp 95a8401558 Initialize point labels array 2025-02-06 11:00:15 -05:00
Clifford Yapp 0164430f06 Make sure s_edit is in place before doing matrix ops 2025-02-06 10:47:25 -05:00
Clifford Yapp a3abdc4c9e First initialization is taken care of during rt_solid_edit_create 2025-02-06 10:28:50 -05:00
Clifford Yapp d8aece8d20 Eliminate parameter from ft_edit 2025-02-06 09:14:49 -05:00
Clifford Yapp 5687597955 Eliminate parameter from ft_edit_xy 2025-02-06 08:59:07 -05:00
Clifford Yapp a5e5daf7e4 Move MGED solid editing logic to LIBRT
Another major milestone - shift per-primitive editing logic from MGED down into
librt proper.  At least on one Linux platform make check appears to pass, but
beyond a couple things like the red regression that doesn't say too much about
whether this refactor is functional.

Next step will be to start systematically defining tests to exercise the
various editing operations and get them working as intended.  Plan is to start
with non-GUI testing and once that works check the behavior of MGED GUI
testing.
2025-02-05 14:34:35 -05:00
Clifford Yapp ccc4a08e05 Prefix all primitives files 2025-02-05 11:27:30 -05:00
Clifford Yapp 2f3938668f Rename internal edit header 2025-02-05 11:24:22 -05:00
Clifford Yapp f608ded771 Move some more edit logic to librt 2025-02-05 11:10:19 -05:00
Clifford Yapp 2cdcfbd53d Make a separate edit.h header 2025-02-05 10:24:34 -05:00
Clifford Yapp ec511f5520 Migrate some of the edit logic to librt
Having to stub in a couple things to make this incremental, but start working
on moving the functional edit logic to librt proper.  We want unit tests for
this that don't depend on MGED, so before defining them we want the logic in
the lib context rather than the app context.
2025-02-05 10:06:39 -05:00
Clifford Yapp 222103ea2f Eliminate rt_solid_edit_clbk_get in favor of the map version, since we need the latter regardless. 2025-02-05 09:44:46 -05:00
Clifford Yapp ef645cc676 Move a few defines, eliminate use of CMD_BAD in primitives code. 2025-02-05 09:28:49 -05:00
Clifford Yapp 7d6c35e0f7 Localize RT_Edit_Map_Internal definition 2025-02-05 09:04:52 -05:00
Clifford Yapp f7d165cf0b Add prefix to function name 2025-02-05 08:59:17 -05:00
Clifford Yapp b81c5b372d Move rt_solid_edit and edit functab to librt headers
Will need to separate out what can stay in an internal private rt_edit.h header
and what needs to be visible to apps.  rt_solid_edit and the functab are the
most obvious, so start there.
2025-02-04 17:02:07 -05:00
Clifford Yapp cc9ddb06f8 Move prim specific editing struct to corresponding rt prim headers 2025-02-04 16:56:34 -05:00
Clifford Yapp 4b7e91fec2 Couple cleanups 2025-02-04 16:34:15 -05:00
Clifford Yapp b6b6bb0f98 Fix name 2025-02-04 16:31:19 -05:00
Clifford Yapp b25517ecb6 Eliminate ARB8 globals, edbspline.h header 2025-02-04 16:28:04 -05:00
Clifford Yapp 1857da8b4e Update defines, remove ged header includes 2025-02-04 15:55:16 -05:00
Clifford Yapp cc2324686b Merge branch 'main' into tmp_sedit 2025-02-04 15:43:30 -05:00
Clifford Yapp 6b667c00f1 Fix comment 2025-02-04 15:29:29 -05:00
Clifford Yapp 2367c1c9f3 CLBK defines will be useful in more than just libged - relocate next to bu_clbk_t 2025-02-04 15:16:48 -05:00
Clifford Yapp bac70a61ec Initialize 2025-02-04 14:58:12 -05:00
Clifford Yapp dfd934019d Eliminate METABALL global variables 2025-02-04 14:55:41 -05:00
Clifford Yapp ffa6cc9f99 Eliminate BOT global variables 2025-02-04 14:48:55 -05:00
Clifford Yapp 0dfc63ff3a Eliminate PIPE global variables 2025-02-04 13:16:25 -05:00
Clifford Yapp 06701f3df9 Fix function signature 2025-02-04 12:44:43 -05:00
Clifford Yapp fe2855e79b Add the resets for NMG variables. 2025-02-04 10:55:36 -05:00
Clifford Yapp 7cce33c67b Stub in reset functab entry 2025-02-04 10:41:55 -05:00
Clifford Yapp 02796f406f Eliminate NMG global variables
Looking like we may need a "reset" functab callback for cases where we want to
reset internal vars but not completely delete the edit struct, but I'll do that
in a separate commit.
2025-02-04 10:34:30 -05:00
Clifford Yapp 8adbe6b29c Eliminate ARS global variables. 2025-02-04 09:56:29 -05:00
joshbaker22 56dbb16f66 Update view.xml (missing the)
minor fix to add "the" in under eye command to fix sentence
2025-02-04 09:35:08 -05:00
Clifford Yapp 4e3518313b Place bspline specific globals in per-prim struct
Had to alter a couple of the functab signatures, which is why other primitives'
files also have changes.

Not sure if we'll end up needing to expose this struct for applications to
manipulate, so for now leaving it in the edbspline.h header, but ideally this
should be private.
2025-02-04 09:32:48 -05:00
Christopher Sean Morrison 79064fb0a3 submodule updated to ed8a0febc25f357cb07dbb091444f029f4cf5206 2025-02-04 08:55:46 -05:00
Clifford Yapp 4f46172bf5 Put in the prim specific create/destroy call 2025-02-04 08:50:50 -05:00
Christopher Sean Morrison 1a7eca7977 update subproj to cef79c30221fb8dc8c860fe85247972fdaa08f01 2025-02-04 08:34:15 -05:00
Clifford Yapp ac72d366d6 Update to try Tcl install with CMake script 2025-02-04 07:06:09 -05:00
Clifford Yapp c0c272c5fc Fix edextrude callback logic 2025-02-03 21:26:14 -05:00
Clifford Yapp 4275ec9a18 Ah - already had ecmd_extrude_skt_name_clbk, just didn't fully remove get_sketch_name 2025-02-03 20:46:59 -05:00
Clifford Yapp f838ffb9d5 TODO notes for next steps
Got one more extern function that needs to be a callback, and then its time to
tackle the primitive specific globals.
2025-02-03 20:40:29 -05:00
Clifford Yapp 00055dc887 get_file_name pops up a dialog, so it needs to become a callback 2025-02-03 20:40:29 -05:00
Clifford Yapp 0e3fa75a28 Split out solid edit maps into separate file. 2025-02-03 20:40:29 -05:00
Clifford Yapp 6a36846ea2 Rename all mged_ prefixed names in primitives code 2025-02-03 20:40:29 -05:00
Clifford Yapp 33eaaa62a8 Remove mged from @file paths 2025-02-03 20:40:29 -05:00
Clifford Yapp 3242dcd6c3 Another milestone - all mged.h include removed from primitives. 2025-02-03 20:40:29 -05:00
Clifford Yapp 20f9bf9b11 Remove mged.h from edarb includes 2025-02-03 20:40:29 -05:00
Clifford Yapp e314c11cff More renaming to ID code that will be separated out of MGED. 2025-02-03 20:40:29 -05:00
Clifford Yapp f047393964 Move sedit.h defines needed by primitives, rename 2025-02-03 20:40:29 -05:00
Clifford Yapp e427f7a3c3 mged_dm.h is no longer needed in the primitives code 2025-02-03 20:40:29 -05:00
Clifford Yapp e57ec4a20d Move and rename sedit function 2025-02-03 20:40:29 -05:00
Clifford Yapp ff80b31458 Move rt_solid_edit struct 2025-02-03 20:40:29 -05:00
Clifford Yapp f3c95872a5 Rework callback code to better manage maps 2025-02-03 20:40:29 -05:00
Clifford Yapp f8d01e3c21 mged_solid_edit -> rt_solid_edit 2025-02-03 20:40:29 -05:00
Clifford Yapp 58c0fa56d0 Rename mged_functab.h to edfunctab.h, various other renamings
Start renaming things to make it clearer which parts of the code are intended
to eventually move out of MGED.
2025-02-03 20:40:29 -05:00
Clifford Yapp 25209e6187 Set up s_edit before writing to it. 2025-02-03 20:40:29 -05:00
Clifford Yapp 4a87621aea Get MGED compiling using clbks for nmg and extrude
Extrude in particular we will probably want to handle with an internal struct
rather than a callback, but until we get the globals folded into editing
internal structs we don't have a dbip for the lookup.

Not ready for merging to main, but this removes explicit uses of Tcl* functions
and mged_state from the primitives code.
2025-02-03 20:40:29 -05:00
Clifford Yapp 3f59f7954d Use gv_rotate_about rather than mv_rotate_about - set.c seems to assign it when changed. 2025-02-03 20:40:29 -05:00
Clifford Yapp 9592cc8294 Try setting up ECMD specific callbacks
In principle these should allow us to pop up the Tcl/Tk editing dialogs without
having to expose Tcl in the primitives code.
2025-02-03 20:40:29 -05:00
Clifford Yapp d7ff8d49ab Try using ft_mat in the primitives code 2025-02-03 20:40:29 -05:00
Clifford Yapp 4e09f11953 Try to move some of init_sedit into the create func
To initialize per-ID-type data containers from the functab, we need to know our
solid type during creation.  Basically, everything not using MGED state info
should be moved into the create function.
2025-02-03 20:40:29 -05:00
Clifford Yapp 0ce4d70c4d Disable sedit_vpick for now.
There is something really odd about how this is implemented - it is calling
functions no other primitive calls.  Needs a revisit/rework.
2025-02-03 20:40:29 -05:00
Clifford Yapp 13495a324c Replace a couple more direct app state manipulations with callbacks. 2025-02-03 20:40:29 -05:00
Clifford Yapp ca23080941 Pass in vlfree list for plotting 2025-02-03 20:40:29 -05:00
Clifford Yapp 8430f229ab Need to look into transform_editing_solid uses 2025-02-03 20:40:29 -05:00
Clifford Yapp d8afbb26ed Use log_str for message 2025-02-03 20:40:29 -05:00
Clifford Yapp c77545e595 Work towards eliminating mged_state in primitives dir
Not compiling yet, since there is a lot to do here and some corner cases to
deal with, but checkpointing process towards pushing mged_state out of
primitives directory.
2025-02-03 20:40:29 -05:00
Clifford Yapp aefdc9de20 Add view update callback 2025-02-03 20:40:29 -05:00
Clifford Yapp c3122e8522 Inch closer to sedit using only mged_solid_edit 2025-02-03 20:40:29 -05:00
Clifford Yapp 98160e6cb8 Make update_views non-global, copy to/from solid_edit
We'll need this in the code that calls sedit within primitives, so get set up
to pass it in and extract it back to mged_state.
2025-02-03 20:40:29 -05:00
Clifford Yapp 04c4f65084 Work towards making sedit use mged_solid_state only.
The update_views block needs another callback, but this gets us closer to being
able to define sedit without mged_state.
2025-02-03 20:40:28 -05:00
Clifford Yapp 6342533c6b Use callback for replot_editing_solid 2025-02-03 20:40:28 -05:00
Clifford Yapp f97dce3576 Use callback for set_e_axes_pos 2025-02-03 20:40:28 -05:00
Clifford Yapp 05bfd3e414 Set up function to sync callback maps 2025-02-03 20:40:28 -05:00
Clifford Yapp 31760504a5 Use callback for mged_print_result. 2025-02-03 20:40:28 -05:00
Clifford Yapp 847eece33e Test having s_edit actually be transient
Up until now all we've been doing is moving globals into structs and
renaming, but this makes s_edit something that is created and destroyed
when MGED enters and exits the sed and oed editing states.

This will need a ton of testing - basically, any point that's going to
edit an object in earnest will need to do the setup and tear-down for
the mged_solid_edit state structure.  The "sed" and "oed" commands are
the obvious entry points, and accept/reject the obvious exits, but there
may be more than just those.

This is one of the key changes that will be necessary for this logic to
move to a library - we have to properly divorce ourselves from the
persistent MGED global state.  Everything in primitives (except for the
code still using Tcl directly) needs to try to move to taking a solid
edit struct rather than mged_state itself.
2025-02-03 20:40:28 -05:00
Christopher Sean Morrison 28797bb72e guilty also, document this file. 2025-02-03 18:43:57 -05:00
Christopher Sean Morrison 6416739aae document some of these too 2025-02-03 18:43:32 -05:00
Christopher Sean Morrison 3642b6e528 fill out a brief description since it's public 2025-02-03 18:42:48 -05:00
Christopher Sean Morrison 644ff7222e keep the block but nix the comment 2025-02-03 18:41:26 -05:00
Christopher Sean Morrison e446b6b8bb eliminate some unused doxy 2025-02-03 18:41:10 -05:00
Christopher Sean Morrison 8832ec7fc9 add missing common.h 2025-02-03 18:37:08 -05:00
Christopher Sean Morrison 8fffee823c too many instances of this not getting replaced, so default to nada. 2025-02-03 18:29:49 -05:00
Christopher Sean Morrison 95776a5f50 pointless doxy 2025-02-03 18:24:34 -05:00
Christopher Sean Morrison fb9cabe987 revise text for brevity.
completely forgot I'd investigated a solution to the Dll's living in the bin dir issue over a decade ago. need to revisit.
2025-02-03 18:23:50 -05:00
Christopher Sean Morrison 754ea71e38 putc->fputc 2025-02-03 18:22:36 -05:00
Christopher Sean Morrison b918c701d4 brep_translate_scv() doubly declared inconsistently, eliminate the local one 2025-02-03 18:19:10 -05:00
Christopher Sean Morrison 501592c4a5 size_t print specifiers 2025-02-03 18:19:10 -05:00
Clifford Yapp 54ac8807ff Use the define rather than a raw number
Arguably this isn't strictly accurate, since libnmg I/O versioning isn't
TECHNICALLY tied in a data sense to .g I/O versions, but functionally it should
be fine and provides at least a little context.

The broader problem here is needing to use versioned librt routines in an API
that only really wants to be working with rt_db_internal structs.  Wondering if
it wouldn't be cleaner to encode versioning of the idb_ptr data in the
rt_db_internal container rather than needing to propagate the dbip for that...
2025-02-03 11:16:03 -05:00
Clifford Yapp 4d3de1e0d0 Implement rt_nmg_mat using nmg I/O functions.
Yikes.  Rather than try to untangle all the NMG matrix applications, just use
the I/O routines in this particular case.  If we needed to do the former it
would be technically *possible*, but at least for now that's more trouble than
it's worth.
2025-02-03 10:39:46 -05:00
Clifford Yapp ab7929a178 Try to isolate matrix application logic
More or less able to ID the mat application logic, but in this form it's not
ready to apply to a struct model input, which is what we'll get in most cases.
2025-02-03 10:06:53 -05:00
Christopher Sean Morrison b139549567 disable warnings on shapelib sources, not ours to fix 2025-02-02 22:19:19 -05:00
Christopher Sean Morrison d8c53d6aec add some I/O nullity protections 2025-02-01 23:29:21 -05:00
Christopher Sean Morrison 0876097705 stdout can technically be null, so check it 2025-02-01 02:23:43 -05:00
Christopher Sean Morrison d2fd3b9c67 convert putc() calls to fputc() for consistency.
was almost an even split, but this homogenizes.
2025-02-01 02:09:11 -05:00
Christopher Sean Morrison 0d1ead3f8b pclose doesn't have any defined behavior on NULL, so protect against it 2025-02-01 01:27:28 -05:00
Clifford Yapp d32f787121 Add DATUM mat application method 2025-01-31 12:20:18 -05:00
Clifford Yapp e537e6c5da Add HRT mat application method 2025-01-31 12:10:13 -05:00
Clifford Yapp 0e4eeab837 Add ANNOT mat application method 2025-01-31 12:05:46 -05:00
Clifford Yapp 065bd5fd74 Add REVOLVE mat application method 2025-01-31 12:01:22 -05:00
Clifford Yapp 79713e90cb rt_brep_mat needs to be C extern 2025-01-31 11:49:32 -05:00
Clifford Yapp 1d55fa3587 Add HYP mat application method 2025-01-31 11:46:58 -05:00
Clifford Yapp df66e84893 Add BREP mat application method 2025-01-31 11:41:51 -05:00
Clifford Yapp 9e9e7f748f Add PNTS mat application method 2025-01-31 11:38:29 -05:00
Clifford Yapp 2de29b871e Add METABALL mat application method 2025-01-31 11:12:54 -05:00
Clifford Yapp d1198a5ebd Add SUPERELL mat application method 2025-01-31 10:56:07 -05:00
Clifford Yapp 6beb23a46e Add COMB mat application method 2025-01-31 10:49:22 -05:00
Clifford Yapp 39222f8436 Add BOT mat application method 2025-01-31 10:01:23 -05:00
Clifford Yapp 3673448e57 Add CLINE mat application method 2025-01-31 09:45:20 -05:00
Clifford Yapp 7fa5058e9a Add SUBMODEL mat application method 2025-01-31 09:41:16 -05:00
Clifford Yapp b7337141c6 Add EXTRUDE mat application method 2025-01-31 09:38:28 -05:00
Clifford Yapp 22abaa5e77 Add SKETCH mat application method 2025-01-31 09:30:24 -05:00
Clifford Yapp 9b501ffa7b Add DSP mat application method 2025-01-31 09:12:02 -05:00
Clifford Yapp 22cb6d5e7f Add JOINT mat application method 2025-01-30 11:15:41 -05:00
Clifford Yapp dc050bade5 Add GRIP mat application method 2025-01-30 11:00:50 -05:00
Clifford Yapp cc54b8affc Add ETO mat application method 2025-01-30 10:49:31 -05:00
Clifford Yapp 5a81c548ea Add EHY mat application method 2025-01-30 10:41:30 -05:00
Clifford Yapp 291263e813 Add EPA mat application method 2025-01-30 10:32:35 -05:00
Clifford Yapp cf61a407c2 Add RHC mat application method 2025-01-30 10:21:50 -05:00
Clifford Yapp c79a1dd272 Add RPC mat application method 2025-01-30 10:12:49 -05:00
Clifford Yapp 6e21f51581 Add PART mat application method 2025-01-30 10:03:19 -05:00
Clifford Yapp 2ac06d0e0a Add PIPE mat application method 2025-01-30 09:39:59 -05:00
Clifford Yapp 5426a64cd9 Add ARBN mat application method 2025-01-30 09:12:58 -05:00
Clifford Yapp d6759a684c Add VOL mat application method
May have also fixed a double application of mat transforms introduced in SVN
commit 77698.
2025-01-30 08:59:08 -05:00
Clifford Yapp e16d2df1a0 Add EBM mat application method 2025-01-29 17:12:40 -05:00
Clifford Yapp 5a8b7740de Add HALF and BSPLINE mat methods 2025-01-29 16:55:29 -05:00
Clifford Yapp 70da07b7c9 Split ARB and ARS mat applications into separate methods. 2025-01-29 14:43:07 -05:00
Clifford Yapp d5b2d021da Split TOR, TGC and ELL mat applications into separate methods. 2025-01-29 14:17:50 -05:00
Clifford Yapp dab4cc1543 Stub in librt functab entries for primitive matrix application
Right now, to apply a matrix to an internal representation of a solid we're
going through the export5/import5 cycle - the import step is where the matrix
gets applied.  That's fine if we're doing I/O, but for edit operations using
that API means we need the dbip just to apply the matrix.  Most of the time
that shouldn't be needed - rt_db_internals (with a few execptions like extrude)
should be able to function independent of their parent database.

Will need to be done carefully, but set up to explore if we can make the matrix
application logic in the *import5 routines available as a direct stand-alone
functab call.
2025-01-29 11:37:37 -05:00
Clifford Yapp 1036da14ce tol can be const here 2025-01-29 10:46:31 -05:00
Christopher Sean Morrison ff79d92371 good grief, fix this little tool's memory management.
was using malloc to allocate and bu_free to release, yikes.  switched to bu.
2025-01-28 16:05:38 -05:00
Christopher Sean Morrison 72e47ed1d7 size_t ftw 2025-01-28 16:05:38 -05:00
Christopher Sean Morrison 90f423b075 more uintptr_t conversion 2025-01-28 16:05:38 -05:00
Christopher Sean Morrison c96e6a018a avoid truncating sign bit to support 2x larger bots 2025-01-28 16:05:38 -05:00
Christopher Sean Morrison faef072c44 use uintptr_t instead of unsigned long. they're just for printing but potential truncation. 2025-01-28 16:05:38 -05:00
Christopher Sean Morrison 11d0379385 PKC_ERROR is a pointer, casting to int is wrong because of truncation 2025-01-28 16:05:38 -05:00
Clifford Yapp cf4727dbd0 Don't use strp temp var - use e_keytag 2025-01-28 15:07:26 -05:00
Christopher Sean Morrison 0b22181b9f don't think we want config_win.h to be in a subdir as it's in the same dir as brlcad_config.h, otherwise that will require two include dirs always be specified (on windows only) 2025-01-28 12:02:46 -05:00
Christopher Sean Morrison 94aa5e18d6 update filename header 2025-01-28 12:02:46 -05:00
Clifford Yapp 30dd994225 List file for CMake 2025-01-28 07:20:40 -05:00
Christopher Sean Morrison e92d4e2e25 need some hash maps to collectively group atoms, so switch to c++ for an easier time 2025-01-28 03:30:34 -05:00
Christopher Sean Morrison 1fdbe012bd use more descriptive comb container name in prep for needing others 2025-01-28 03:21:28 -05:00
Christopher Sean Morrison 8e558f4e5d someone's already including it, but we use vls so make include explicit 2025-01-28 02:59:07 -05:00
Christopher Sean Morrison aa6634382f save pdb header line as the title 2025-01-28 02:58:24 -05:00
Clifford Yapp a642c50a89 Make get_solid_keypoint private to edsol
Replace get_solid_keypoint call in primitives with direct method call, and put
the expansion in chgview.c so we don't need to expose the function.  Should
take a closer look at the chgview.c use later.
2025-01-27 14:32:47 -05:00
Clifford Yapp 761c5675d6 Use int pair for key 2025-01-27 10:35:46 -05:00
Clifford Yapp e111eeecbf Start working on collecting ECMD defines
For proper registration, we'll have to sort out the MENU_ defines as well -
either collapse them into unique ECMD_ defines, or register a pair of integers
as keys for callback lookups.  The latter is probably less invasive from a code
change standpoint, but the former would be simpler in the long run...
2025-01-27 09:51:29 -05:00
f4alt a52e8cb47b BoT boundingbox fix
this loop is calculating the bounds of triangles - not the rpp. The
bounding box degen check should be (and is) done later bot.c:546
2025-01-27 08:44:55 -05:00
Christopher Sean Morrison ebf539b593 re-enable the version test. needs a lib arg even if it doesn't need it. 2025-01-26 02:23:23 -05:00
Christopher Sean Morrison 1028503c38 use av also 2025-01-26 02:13:49 -05:00
Christopher Sean Morrison 96894082b8 update to a706f0f997f12eac1f4008a263f46351e1b0ae01 to get the mac build fix 2025-01-26 01:36:12 -05:00
Christopher Sean Morrison 73623103a6 do something basic with ac/av in lieu of suppressing 2025-01-25 23:47:17 -05:00
Christopher Sean Morrison 9f5bc8944a need to optimize mged startup.
knew we slowed down, but profiled more precisely how much.
2025-01-25 23:43:27 -05:00
Christopher Sean Morrison 6747f6e5ca only need to add a row if the modulo isn't zero 2025-01-25 23:43:27 -05:00
Christopher Sean Morrison ec2e86d5e0 add the most basic version number test.
succeeds if it compiles, intentionally a compilation test.
2025-01-25 23:40:47 -05:00
Clifford Yapp 7b322cb498 Stub in callback management functions
To get Tcl out of the editing logic we'll need this almost immediately,
and removing the "basic" Tcl use cases will help make the outliers
easier to spot.
2025-01-24 17:10:07 -05:00
Clifford Yapp 9a2a8db6d1 Allocate the s_edit container, change references
Preparing for when this container becomes something we create and
destroy, store a pointer to an allocated version in mged_state rather
than the struct itself.
2025-01-24 15:24:38 -05:00
Clifford Yapp 1bd9860605 There will be some code that needs to migrate to create/destroy routines. 2025-01-24 15:10:28 -05:00
Clifford Yapp da79b2a6c8 Add a data parameter to the menu_item function signature. 2025-01-24 14:57:00 -05:00
Clifford Yapp 44a7ccafaf Fix function signature 2025-01-24 12:58:35 -05:00
Clifford Yapp 26039640cd Start thinking about what editing callback would look like
Looking at the MGED editing code, at least a few places are popping up
dialogues asking for user input.  Setting aside the question of whether
that's the best way to go about the interface design, the simplest way
to rework the MGED code without changing too much user behavior would be
to support doing that. It might potentially be a useful ability for
other GUI applications as well (triggering events, for example.)

The way the edit code is structured, operations end up having unique
integers associated with them.  That could potentially allow us to
register per-operation-specific callbacks.

The code here roughs out some thoughts - no functionality, just making
sure we can define some internal C++ containers in MGED (up until
this point MGED has been C/Tcl only.)
2025-01-24 10:53:51 -05:00
Clifford Yapp ade65c82ca Pull gui dialog out of extrude code into function
Still calling Tcl via the function, but this gets the direct usage of
Tcl out of edextrude.c
2025-01-24 09:43:50 -05:00
Clifford Yapp b757f2e88a Replace Tcl_SetResult calls with log_str
Looks like the main functional difference between Set and Append is to
clear the pre-existing result str (if any) so we trunc the log_str
before printing.

Could use bu_vls_sprintf, but not 100% if blowing away existing log_str
content is actually the right move here - using explicit trunc makes it
a bit more obvious what is happening.
2025-01-24 09:30:19 -05:00
Christopher Sean Morrison eb7db7ac9d relying on globbing bad. aggregate our actual list of tiles 2025-01-23 23:58:34 -05:00
Christopher Sean Morrison e5ff5e419f print the list of g files before processing them 2025-01-23 23:58:34 -05:00
Christopher Sean Morrison 2f4b2f705f allow overriding the variable settings via command-line 2025-01-23 23:58:34 -05:00
Christopher Sean Morrison 05f3220c0a use tile.png as the default name 2025-01-23 23:58:34 -05:00
Clifford Yapp 6789e294f6 List misc/bugs/CMakeLists.txt for build 2025-01-23 16:51:27 -05:00
Clifford Yapp 47bf7c7383 Update baseline static analyzer bug count for v18
Need to look at new items, but for now in order to catch issues being
added in new code baseline on current code state.
2025-01-23 16:48:15 -05:00
Clifford Yapp ed3529d0c0 Update clang tools and lcov logic 2025-01-23 16:46:48 -05:00
Clifford Yapp a4214e8fff Add fprofile-update=atomic flag to lcov profile building
Apparently we need this to get proper counts for lcov in some
situations.
2025-01-23 16:45:06 -05:00
Clifford Yapp 1e16387047 Restore previous src/hdrs add_subdirectory order to fix BRLCAD_COMPONENTS
The BRLCAD_COMPONENTS logic for building only subsets of BRL-CAD uses the
target definitions in src to enable/disable install rules for per-library
headers.  We need the lib targets defined before we define our header install
rules, or we don't know which headers are needed and almost none of them get
installed.
2025-01-22 13:26:17 -05:00
Clifford Yapp cc57bb82e0 Remove option to use OpenMesh decimator in bot subcmd
This wasn't announced since it needed testing, fortunately. When it WAS tested
it turns out the decimation results apparently aren't always properly manifold.
For our use case that's Not Awesome, so we'll stick with the GCT version and
let OpenMesh handle the subdivision logic (which also needs be checked for
manifold preservation, but that's a separate issue...)
2025-01-22 10:33:18 -05:00
Clifford Yapp c25290f30a Address a couple clang static analyzer warnings in MGED
Count jump looks like it is quite a bit more than can be accounted for by just
MGED build.  Looking at the CI log, the install request was for clang 14 but
the CMake configure is reporting clang 18.1.3. That'll do it...
2025-01-22 10:13:48 -05:00
Clifford Yapp 567651a0c4 Revert "Back MGED up to 3998b4e108"
Well, phooey.  Backing out the refactor is not enough to clear the static
analyzer complaints - maybe it got a version update as well when the new CI
image rolled out.  No point in the complexity of branching then - back out the
reversion to look at what the errors are.

This reverts commit 2a705a734c.
2025-01-22 09:47:37 -05:00
f4alt bcd587da2c document 9dceba97f5, 1c2b06dc94 2025-01-22 09:44:07 -05:00
f4alt bbd01f07ed yank gdiam
we already use GTE. Plus it's more stable than gdiam and has an active
upstream
2025-01-22 09:42:12 -05:00
f4alt 1c2b06dc94 dont trust user to zero out return value
function accumulates values to calculate volume. vol needs to be zero
before using +=
2025-01-22 09:42:12 -05:00
f4alt 9dceba97f5 slot in GTE for our bot oriented bbox calculations 2025-01-22 09:42:12 -05:00
Christopher Sean Morrison 005ac4c3db stub initial logic for known test failures (bugs).
idea is to not add them to the main tests target, yet still use ctest definitions for them.  achieved using a external project that declares the tests, added to a custom target (bugs target in this case).

this is intended for maintaining a running backlog of known bugs that we want to fix, yet are unable to for whatever reason / prioritization. this also lets us set up the conditions and/or inputs that reproduce the bug, which might be a good proving ground for getting them fixed.  potentially a resource for new contributors to learn as well.
2025-01-22 02:33:55 -05:00
Christopher Sean Morrison 3073d567ea move verbose_add_subdirectory() function definition to BRLCAD_Util. document global it relies on. 2025-01-21 22:15:27 -05:00
Christopher Sean Morrison 1767ffeb60 slightly reorder, group, and document rationale for adding the top-level subdirectories.
also note a few of the exceptions that are included earlier just so there's a breadcrumb.  most of the dirs are order-independent which is great/best, but documenting might help avoid some surprises down the road.
2025-01-21 22:15:27 -05:00
Clifford Yapp 2a705a734c Back MGED up to 3998b4e108
Given how extensive the functab introduction is proving, should do it in
a branch to avoid messing with static analysis and lcov results.
2025-01-21 19:53:32 -05:00
Clifford Yapp 4a283ee3fb Don't do find_package_tcl if Tcl is disabled. 2025-01-21 16:35:03 -05:00
Christopher Sean Morrison 53eaf55f81 add automatic size adjustment based on tile size and desired number of tiles per row 2025-01-21 02:32:47 -05:00
Christopher Sean Morrison 6116ed4f22 templatize 2025-01-21 01:53:42 -05:00
Christopher Sean Morrison f5af8c6fa5 script for auto tiling previews of a folder full of .g files.
demonstrates three concepts: 1) using -l3 lighting model, 2) using pixtile to grid renderings together, and 3) one idea for automatic default render object selection (based on naming).
2025-01-21 01:29:15 -05:00
Christopher Sean Morrison 39a3ad43d5 minor cleanup.
couldn't find any reference to NOERROR_FLAG_* so removed it as the only inlined logic that ran on include (except for define_property()).  moved the search for astyle into the function too so it's not auto-run as well.  space out the rest for readability.
2025-01-20 01:31:54 -05:00
Christopher Sean Morrison f29366f850 more wordy reduction.
reduce to less than half, and still essentially saying the same.  did reduce zlib mentions since that's handled a bit differently for a while now.  81 to 34 lines.
2025-01-20 01:02:12 -05:00
Christopher Sean Morrison b82343a355 cut verbosity in half, should say same as before 2025-01-19 23:20:42 -05:00
Christopher Sean Morrison e2fb8bdd32 update the reference pix now that rtwizard defaults to 12 opacity for ghost images 2025-01-19 21:58:40 -05:00
Clifford Yapp d606bbbaf6 Update analysis workflow apt get as well. 2025-01-17 08:11:39 -05:00
Clifford Yapp 0d38ab60a0 This doesn't work anyway, and doesn't seem to be a package anymore 2025-01-16 19:43:14 -05:00
Christopher Sean Morrison a447c0a8d1 make sure pedantic-error isn't the source of bext woes. 2025-01-16 17:25:55 -05:00
Christopher Sean Morrison 7615589edc match CLi rtwizard default ghost intensity, change from 12 to 6 2025-01-16 00:17:49 -05:00
Christopher Sean Morrison f2bbc83538 make them both singular for consistency, and there's only one anyways 2025-01-15 19:58:58 -05:00
Christopher Sean Morrison 111394c4ca plurality typo 2025-01-15 19:57:40 -05:00
Christopher Sean Morrison 11102587f9 shorten the preamble to just the current impact.
this significantly reduces the commentary to what the code is currently doing, with less elaboration on why.  bext needing to be built in advance is the driving constraint here, so that much is acknowledged.
2025-01-15 19:56:56 -05:00
Christopher Sean Morrison b4b1ad84a0 encapsulate logic into two functions so we can avoid relying on global side effects 2025-01-15 19:45:29 -05:00
Christopher Sean Morrison 0528094bd2 make default configuration type match default build type (i.e., Release) 2025-01-15 19:31:36 -05:00
Christopher Sean Morrison 3888f36743 cleanup indent and update comments while exploring.
this should all probably get put into a function so inclusion doesn't just run logic.
2025-01-15 19:30:43 -05:00
Clifford Yapp 6d3b40eb0d Start looking at other Tcl uses in primitives code.
There are undoubtedly many implicit uses (mged_print_result is a case in
point) but start by looking at direct, explicit usages of Tcl in this
code.  Looks like BoT is the major troublemaker, but there are a few
other uses to consider as well.
2025-01-15 16:54:22 -05:00
Clifford Yapp d1bb15dbb7 Replace Tcl_AppendResult with the log_str
This should be regarded as a first step - there is a function in the
code called "mged_print_result" which is used sometimes (but not
consistently) in the primitives I/O code.  Not completely clear yet what
it is doing, why it is there and why it's not used consistently.  It
will need to come out completely for this logic to be refactored, so the
question will ultimately be what the parent calling code needs to do.
2025-01-15 16:54:22 -05:00
Clifford Yapp 998c2e1751 Wrap MGED_OBJ calls in logic to write out messages via Tcl_AppendResult 2025-01-15 16:54:22 -05:00
Christopher Sean Morrison cd8ea44354 re-set the exec bit 2025-01-15 16:05:29 -05:00
Christopher Sean Morrison d50279aae3 Update copyright to 2025, Year of the Wood Snake. 2025-01-15 16:04:13 -05:00
Clifford Yapp 9322ed21ef reduce variable scope 2025-01-15 14:58:29 -05:00
Clifford Yapp 111b1ef753 Move Tcl arb command implementations to edsol.c
Most of these move without issue, but edgedir checks an internal arb
editing state as a validation, so we need to split that one into a
primitives function and the parent Tcl wrapper.
2025-01-15 14:56:33 -05:00
Clifford Yapp c2dd90f14e Start thinking about how to redo edit messaging
To relocate the edit code, we'll also need to get Tcl out of the
equation.  One of the prominent uses is a lot of Tcl_AppendResult calls,
so we'll need another answer there.

Probably should first look at chopping up and reworking any functions
using Tcl data types like ClientData, since they won't be able to move
as-is.
2025-01-15 14:23:02 -05:00
Clifford Yapp 284d59f888 Try to update es_peqn when we might need to use it
Trying to do the update in edsol.c resulted in es_peqn's scope being
greater than just the edarb.c code - see if we can just do the
calculation when we need it in the editing code instead.  This will need
some testing to make sure we've got the equations when we need them, but
except for the edsol.c setting this variable is local to edarb.c so that
constrains the problem.

es_peqn was the last global exposed in the primitives headers, which
gets us one step closer to the primitives code being movable.
2025-01-15 14:04:16 -05:00
Clifford Yapp 92f7979574 Add MGED_OBJ functab entry for menu strings
This lets us hide the arb cntrl_menu exposure, and eliminate another
(small, admittedly) switch table.
2025-01-15 13:40:05 -05:00
Clifford Yapp f1f7b715bf Move remaining edit_state variables used in primitives to s_edit 2025-01-15 13:08:09 -05:00
Clifford Yapp b3db7e2ecd Eliminate most (all?) uses of e_type for ARB type storage
Eventually we can probably stash this in an ARB specific internal
structure and use it the way es_type was being used, but for now we'll
just invoke the arb type checking function when we need the type.
2025-01-15 11:52:12 -05:00
Clifford Yapp b6377e3290 As long as we don't end up with edit_flag set to one of the arb editing states in oed mode, we should be able to just go with the default rather than checking the global editing state here. 2025-01-15 11:14:41 -05:00
Clifford Yapp b1b32e05ca Move more vars used for solid editing to s_edit
Looking like the challenge will be variables active in both object edit
and solid edit modes...
2025-01-15 10:54:04 -05:00
Clifford Yapp aead703015 incr_change may be a better fit for s_edit 2025-01-15 10:49:05 -05:00
Clifford Yapp f9da2c3d27 Document removal of -b and -t opts from rtshot
With the new BoT raytracing logic changes these options are no longer
needed.
2025-01-15 10:41:52 -05:00
Clifford Yapp 12e126bfcd Document removal of bot specific settings from rt
New BoT raytracing logic means these values are now no-ops.
2025-01-15 10:40:00 -05:00
Clifford Yapp f78fd62f52 Document removal of -B and -T opts from nirt
With the new BoT raytracing logic changes these options are no longer
needed.
2025-01-15 10:37:38 -05:00
Clifford Yapp c11e965a97 Document removal of bot_minpieces cmd from nirt
New BoT raytracing logic means this value is a no-op, so the command was
removed - it is no longer needed.
2025-01-15 10:35:34 -05:00
Clifford Yapp 425ff3e4dc Sync a local copy of mv_context for primitives code
Sure enough - "set context 1" is how the behavior of editing is changed
for those cases using the "mv_context" variable in the primitive editing
code.  Yikes - holy undocumented obscure unintuitive feature Batman!

For the moment, just force the MGED set command to do a sync for us so
the setting makes it into the mged_solid_edit struct and we don't have
to reference mged_variables in the primitive code.  I'll have to look at
the other uses but it might be that something like "force_keypoint"
would be a better name for that variable given how it is used in eto...
2025-01-14 21:31:05 -05:00
Clifford Yapp 2c0de16d88 Revert "Move the mged_variables mv_context to mged_solid_edit"
On second thought, need to verify this isn't intended to be responding
to setting context *directly* on the MGED prompt.  I don't see another
trigger for this logic anywhere - the Tcl set path seems to be the
*only* window to activating it - so needs experimentation.

This reverts commit 975faffcb7.
2025-01-14 21:15:18 -05:00
Clifford Yapp 975faffcb7 Move the mged_variables mv_context to mged_solid_edit
This one is a little bit more risky, since it is apparently exposed as
"context" via a structparse, but it doesn't seem (as far as I can tell)
to be playing a role in the current MGED tcl code and it is active in C
only in the primitives code.  With one exception in generic, this is the
only use of the mged_variables global in the primitives code - since
mv_context is specific to the primitives code, relocating it there.
2025-01-14 20:54:27 -05:00
Clifford Yapp e157a9e0a6 Making progress, but still a fair number of globals in the MGED code. 2025-01-14 20:42:22 -05:00
Clifford Yapp 42d1fe1130 Move some more globals into mged_edit_state 2025-01-14 20:20:54 -05:00
Clifford Yapp 4da9b55b76 Group variables predominately used in primitives
Now that we've got the logic isolated in files, begin identifying which
variables are used mostly or exclusively in primitives code.  Those will
be the candidates for the first iteration of an rt_db_edit_internal
struct.  Conversely, anything in primitives still using edit_string
rather than s_edit from the global state will require more scrutiny.
The mousevec code seems to be updating some of the edit_absolute_*
variables, so that will take some thought.  acc_sc_sol appears to also
be in that camp, although it's currently still a global.
2025-01-14 20:07:30 -05:00
Christopher Sean Morrison f50b39fb9e CI segfault, need to investigate 2025-01-14 16:08:55 -05:00
Christopher Sean Morrison 61ead1ebfa oops, templatize the new test. legal regression did it's job. 2025-01-14 14:19:45 -05:00
Clifford Yapp 2e53709122 Avoid -Werror=unused-but-set-variable warning 2025-01-14 11:51:53 -05:00
Christopher Sean Morrison b07b013b8a preliminary arb8 testing with 22 different arb8 configurations.
presently only looking at currently valid configurations, but idea will be to then add currently invalid configs that can be tested as support for them is added (e.g., concave, non-planar).
2025-01-14 11:37:20 -05:00
Clifford Yapp 8e19a8f221 Add the vim line to avoid indenting namespaces 2025-01-14 10:48:01 -05:00
Clifford Yapp 04b62d7d11 Fix version numbers 2025-01-13 22:34:24 -05:00
Clifford Yapp 6f2cfa8fbd Correct -Wstrict-prototypes errors 2025-01-13 17:25:12 -05:00
Christopher Sean Morrison 069757db2d include one real pdb with about 10k atoms, https://www.rcsb.org/structure/3NN4 2025-01-13 15:52:36 -05:00
Christopher Sean Morrison 9f5c334915 on second thought, refer to bwish and btclsh respectively instead of tclsh. 2025-01-13 15:26:07 -05:00
Christopher Sean Morrison e034fbedd2 add basic manual pages for bwish and btclsh.
far as I can tell, looks like they'll parse a script passed as an arg, but not much else.  did not document the built-in commands supported, but would be room for improvement.
2025-01-13 15:26:07 -05:00
Clifford Yapp ffc4410a5c Stub in create and destroy functab entries
To eliminate the per-primitive-type globals, we'll need some way to
encapsulate them.  Not quite sure yet what this will look like, but at
least stub in basic function callback entries in the table.
2025-01-13 15:09:39 -05:00
Christopher Sean Morrison 8bf278215a move pedantic-errors to the error section.
should only be on in strict mode.  try re-enabling for c++ as well since the transitive issue is no longer relevant for externals.
2025-01-13 15:06:58 -05:00
Christopher Sean Morrison 09d9a8ce37 hilarious s/search/brlman/ snuck in at some point 2025-01-13 15:06:58 -05:00
Clifford Yapp 1734c58ba5 Update minimum CMake version to 3.20
Biswaranjan-Dash spotted that our CMake logic wasn't calling out a new
enough CMake for the features we are using.  Was able to adjust one
case, but our target_include_directories call is using the AFTER keyword
which sets our minimum at 3.20 now.
2025-01-13 14:49:37 -05:00
Clifford Yapp e9d8e5a551 Use older try_compile signature for libged scanner. 2025-01-13 14:32:04 -05:00
Clifford Yapp a84ecaa262 Address -Werror=c++-compat compiler complaints in pdb-g.c 2025-01-13 14:18:12 -05:00
Christopher Sean Morrison 2bddee78bf compilation cleanup, it works! 2025-01-13 13:01:58 -05:00
Christopher Sean Morrison 26a3f72823 quell massive blather from CMP0177.
assuming we don't rely on unnormalized INSTALL paths, as is the new behavior.
2025-01-13 12:43:04 -05:00
Christopher Sean Morrison 4b00f7553a bu_strlcpy() so we don't have to manually nul-terminate 2025-01-13 12:30:47 -05:00
Christopher Sean Morrison 9631af2fc9 need str.h 2025-01-13 12:30:47 -05:00
Christopher Sean Morrison a80f310a0a basics: create corresponding geometry for each atom.
make case insensitive on read also.
2025-01-13 12:30:47 -05:00
Christopher Sean Morrison 12455f08da clear up our atoms allocation too 2025-01-13 12:30:47 -05:00
Christopher Sean Morrison 6b68263bd0 add a couple pdb examples 2025-01-13 12:30:47 -05:00
Christopher Sean Morrison bd328274a8 restore the trailing whitespace -- it's required for pdb 2025-01-13 12:30:47 -05:00
Christopher Sean Morrison 6c63de0089 include a caffeine example using HETATM and the schema.
at least, as much as I've discerned thus far.
2025-01-13 12:30:47 -05:00
Christopher Sean Morrison 2fba34dd9b expand on pdb file format and include an example.
provide some preliminary parsing and a data structure for storing what we find.
2025-01-13 12:30:47 -05:00
f4alt 7c2ad6d2bf handle null termination w/o erroring out 2025-01-13 09:36:52 -05:00
Clifford Yapp a60eaa4258 Fix build error 2025-01-12 10:44:55 -05:00
Clifford Yapp 4849cd5146 This logic is obsolete with the switch to bext 2025-01-12 10:12:08 -05:00
Christopher Sean Morrison 585e2326c7 move env2c and debug2c into libged.
this fixes a dependency coupling issue where misc had to come before src, but also moving because the tools are not really general.  they're highly specific to our existing repo structure and are specifically libged code generators, and only used there so looks like it should make sense to move them into place in libged.  giving it a try.
2025-01-12 02:17:11 -05:00
Christopher Sean Morrison 626d8fc1ef have ged_exec check for NULL args.
add some basic sanity checking to make sure we don't propagate NULL down to commands that may lack NULL protections if/when a NULL argument is inadvertently passed.  this is a mild layer of detection/reporting for commands being built up programmatically/dynamically.
2025-01-12 01:48:12 -05:00
Christopher Sean Morrison 7ef23628e1 we already just cached the build flags
no-op after rebase as fixed elsewhere.
2025-01-12 01:48:12 -05:00
Clifford Yapp 0f970977a1 Start thinking about how to handle per-prim editing data. 2025-01-10 10:29:00 -05:00
Christopher Sean Morrison ce68683db7 regress-asc and regress-weight are back on the menu 2025-01-10 01:58:59 -05:00
Christopher Sean Morrison 9ab1eea87c regress-asc works again. v4 no longer adds gift string to the material field.
this in turn ensures v5 upgrade doesn't turn the field into a new attribute that results in non-faithful roundtripping.
2025-01-10 01:58:34 -05:00
Christopher Sean Morrison 4623770bda remove auto-setting gift%ld attribute during v4 import.
gift is long gone, but more importantly usage of the 'material' field changed / needs to change to bring it in sync with the shader setting and to support material objects.
2025-01-10 01:34:50 -05:00
Christopher Sean Morrison ec23c12850 not why this test is failing 2025-01-09 23:33:18 -05:00
Christopher Sean Morrison 113c0544ff quote the material too, not just shader, as it could have spaces 2025-01-09 23:29:20 -05:00
Christopher Sean Morrison 374cd87c47 fix all the wrong logging 2025-01-08 15:36:23 -05:00
Christopher Sean Morrison 46e4a514f4 append to the log file. was getting wiped out. 2025-01-08 15:17:50 -05:00
Clifford Yapp 487435a191 initialize 2025-01-08 11:06:42 -05:00
Clifford Yapp 0881002f84 List MGED predictor for deprecation and removal. 2025-01-08 09:55:37 -05:00
Clifford Yapp 0c305ffcde initialize 2025-01-08 09:42:18 -05:00
Clifford Yapp c547f4a295 initialize 2025-01-08 07:56:54 -05:00
Christopher Sean Morrison 9bc177b079 fix and re-enable rtweight regression test.
when code was refactored to libanalyze and c++ containers, there was no longer an upper limit on the number of material IDs supported, so the regression testing for that limitation was no longer valid.  reference updated accordingly, keeping the high ID now that it's supported.
2025-01-08 00:25:06 -05:00
Christopher Sean Morrison 7c121f3686 add a manual page for pixcmp 2025-01-07 23:47:34 -05:00
Clifford Yapp 1808d55bc1 Add missing mged_state pointer to declaration 2025-01-07 19:25:38 -05:00
Clifford Yapp 387951cb36 Move most of the solid edit globals into the edit_state struct 2025-01-07 19:07:56 -05:00
Clifford Yapp 2ca1e25d15 Adjust the numbers being used by primitive edit modes
These are nominally private to the primitives, but it would still be
better if they don't conflict - and they can't conflict with SROT and
the other general flags.  Use the functab primitive order to prefix
the numbers, to allow us to tie any given primitive edit state flag to
its specific primitive type just from the prefix of the number itself.
2025-01-07 15:55:02 -05:00
Clifford Yapp 30ef78a213 Remove most of the per-prim headers
With the defines no longer public in the MGED code, that removes most of
the need for the per-primitive headers.  Move a few externs into edsol.c
since we don't yet have per-primitive initialization for editing.
2025-01-07 15:34:57 -05:00
Clifford Yapp 7dd28d60be Move the last logic referencing ECMD defines into edarb.c 2025-01-07 14:36:10 -05:00
Clifford Yapp 3c456a9289 Move es_edflag into edit_state, and push sedit ECMD_ uses down
This one was tricky - sedit.h was using specific editing states to set
up defines which tested whether or not the current editing mode was a
rotate, translate or scale.  Rather than list out the specific states at
the top level, we instead establish four flags at the same level as
edflag which encode the same information - whether we are in a rotate,
translate, scale or pick operation.  We then define a function to handle
setting all the variables appropriately for the most common values, and
have the primitives manage them more explicitly when they are setting
one of the edflag states that would previously have activated one of the
old define definitions.  The defines themselves are updated to reference
the new high level flags rather than encoding the states directly.

Need to understand more about why so much code needs to be aware of
whether we're rotating, translating, scaling, or picking that we need
these defines, but in the interests of trying to be incremental and
limiting scope just do this to hide the primitive specific code and
defer exploring the SEDIT_* define uses until later.
2025-01-07 14:22:09 -05:00
Clifford Yapp 8e08ee0939 Move GEOM_EDIT_STATE into mged_state 2025-01-06 17:40:00 -05:00
Clifford Yapp 3e2e83841d Remove IR_KNOBS and IR_BUTTONS ifdef codes
Does not appear to be enabled.  VC has the code if we need them.
2025-01-06 17:18:22 -05:00
Clifford Yapp 46dab1c399 Break the sedit_mouse logic out into per-primitive functions.
This leaves the SEDIT_ROTATE, SEDIT_SCALE, SEDIT_TRAN, etc.
defines in sedit.h
2025-01-06 16:45:00 -05:00
Clifford Yapp 0de845a628 Don't keep running doEvent if MGED_STATE is NULL
Chris ran into a crash in MGED where doEvent was trying to access
something invalid in the course of shutting down.  We tried to
de-register the doEvent callback but that doesn't seem to be effective.
Testing a global flag did work, but Chris spotted that we could just
look for a NULL MGED_STATE instead since we do explicitly NULL that out
in mged_finish.
2025-01-06 15:27:33 -05:00
Clifford Yapp 650f680e8e Stub in function slot for sedit_mouse 2025-01-06 12:27:54 -05:00
Clifford Yapp 8fd68fd411 Push unit conversions down from mged_params to individual methods. 2025-01-06 12:02:27 -05:00
Clifford Yapp 2049b086d0 Try to spot and add 3 param cases
These aren't called out, and there seems to be a lot of independent
checking for params in some of the code, but try to push the full three
param checks we actually seem to need down.  Probably will be a lot of
input validation cleanup generally when we reach the point of putting
together unit tests for all this, but for now this clears one of the two
mged_param ties to edit-operation-specific code.
2025-01-06 11:37:12 -05:00
Clifford Yapp 15905ec055 Add 2 param cases 2025-01-06 10:51:15 -05:00
Clifford Yapp a62d55c1e9 Check sscale return code, add other 1 param special cases 2025-01-06 10:50:20 -05:00
Clifford Yapp 6b2ffbc048 Begin pushing mged_param verification down.
mged_param has a lot of specific cases for checking if the parameters
provided as input conform to the needs of specific cases.  Need to push
this checking down to the actual methods themselves - while it's
definitely more compact to do this up front, the exposure of specific
editing methods in the PARAM_* defines means it doesn't scale well.
Not to mention we're trying to hide the details behind MGED_OBJ in the
first place.

This focuses on SSCALE and PSCALE - the latter has a second tier of
special case with es_menu flags, so metaball and pipe need to be broken
down further.  The rest of the pscale functions look as if they can get
away with one check up front, but pipe and metaball have different
requirements depending on the es_menu settings so in their cases the
checks have to happen within the local switch calls.
2025-01-06 10:21:10 -05:00
Christopher Sean Morrison c7c339aa07 ws cleanup 2025-01-05 23:15:37 -05:00
Christopher Sean Morrison 0a3011225f little ws cleanup 2025-01-05 23:13:55 -05:00
Christopher Sean Morrison e7c5b0058c ws cleanup, just a few. 2025-01-05 23:10:27 -05:00
Christopher Sean Morrison 6864199f39 cleanup ws regressions 2025-01-05 23:09:17 -05:00
Christopher Sean Morrison cc0a4fa8a7 remove a few more trailing lgt references 2025-01-05 00:21:27 -05:00
Christopher Sean Morrison e03ea05f56 removed the lgt.sh script 2025-01-05 00:15:00 -05:00
Christopher Sean Morrison 87345b8a59 remove and diminish references to lgt 2025-01-05 00:13:55 -05:00
Christopher Sean Morrison ef06a822e1 remove lgt helper script.
lgt was obsoleted in 7.30.2 so should be safe to remove.  procs are undocumented, but consist of process_mdb, apply_lgt_mat, and make_lgt_light.  all three appear to deal with lgt-specific files.
2025-01-05 00:06:00 -05:00
Christopher Sean Morrison fe2f59c1d0 remove. lgt was removed in 7.30. curiously not in regress. 2025-01-04 23:54:34 -05:00
Christopher Sean Morrison 0abd63c6d9 more ws cleanup 2025-01-03 23:44:21 -05:00
Clifford Yapp 3cbdf8d15e Move arb-only logic to arb function 2025-01-03 16:28:34 -05:00
Clifford Yapp 6dfd26ec8b Fold pscale into per-primitive files 2025-01-03 16:26:02 -05:00
Clifford Yapp 524760afcc Move primitive specific initializations to primitive logic. 2025-01-03 15:49:15 -05:00
Clifford Yapp c756501631 Refactor the generic solid routines into functions 2025-01-03 15:40:50 -05:00
Clifford Yapp 91ec4799c7 Add an edit functab entry
This will undoubtedly change quite a bit, but for starters deconstruct
sedit to get the primitive specific menu items into the per-primitive
code.
2025-01-03 14:55:28 -05:00
Christopher Sean Morrison ba6d178a7b hit them all up, ws cleanup 2025-01-02 23:30:27 -05:00
Christopher Sean Morrison 7ec2668834 ws cleanup 2025-01-02 23:27:53 -05:00
Clifford Yapp 7c6064d372 Update bext submodule to 306f40246de 2025-01-02 21:12:54 -05:00
Clifford Yapp 8e9d8033cb Shift remainder of readsolid primitive logic to functab.
TODO - can we use bu_sscanf here instead of sscanf?
2025-01-02 15:59:49 -05:00
Clifford Yapp a85c823d1b Migrate HYP read_params logic to functab 2025-01-02 15:31:34 -05:00
Clifford Yapp 8afff34584 Migrate EPA and EHY read_params logic to functab 2025-01-02 15:26:35 -05:00
Clifford Yapp 2d8e2090cd Migrate RHC read_params logic to functab 2025-01-02 15:18:59 -05:00
Clifford Yapp 6a4ae7b2fa Migrate RPC read_params logic to functab 2025-01-02 15:14:44 -05:00
Clifford Yapp 5f6ec12533 Migrate PART read_params logic to functab 2025-01-02 15:09:16 -05:00
Clifford Yapp b88a347924 Fix grip CK copy-paste error 2025-01-02 15:05:50 -05:00
Clifford Yapp 81664b6a47 Remove functab .h function definitions
Going through the function table for these, so shouldn't need the .h callouts.
2025-01-02 15:02:54 -05:00
Clifford Yapp 910b9effd0 Migrate GRIP read_params logic to functab 2025-01-02 14:58:08 -05:00
Clifford Yapp 4399767dc7 Migrate HALF read_params logic to functab 2025-01-02 14:52:45 -05:00
Clifford Yapp 20d8e24cc4 Migrate ARB read_params logic to functab 2025-01-02 14:40:02 -05:00
Clifford Yapp 2649fa3a13 Migrate ELL read_params logic to functab 2025-01-02 12:23:45 -05:00
Clifford Yapp d25aad0154 Migrate TGC read_params logic to functab 2025-01-02 12:16:14 -05:00
Clifford Yapp 98f99babcd Document functab write/read params API purpose. 2025-01-02 12:03:04 -05:00
Clifford Yapp 7d6ee0ea2f Finish and wire up shift of read_solid TOR logic to functab. 2025-01-02 11:58:43 -05:00
Clifford Yapp bffe1f0cb8 Fix MGED "ted" command used during solid edit
Looks like commit #447b384d4 switched editit to using ged_exec, but MGED uses
"ted" for an argv[0] here and libged doesn't know how to translate that into a
command.  editit is used in only one place, so relocate it and update it to use
the libged "editit" command name to trigger editing.
2025-01-02 11:12:45 -05:00
Christopher Sean Morrison 987c0d80f3 gltf import was improved by chris via assimp 2025-01-01 02:40:08 -05:00
Christopher Sean Morrison 9c76def5a4 SDFs on the horizon 2025-01-01 02:39:06 -05:00
Christopher Sean Morrison c896ffd97c ill-defined blend operation 2025-01-01 02:17:02 -05:00
Christopher Sean Morrison a0584281d2 make fastf_t a class.
expand slightly on a really old idea that we briefly tried out (and seemed to work).
2025-01-01 02:13:50 -05:00
Christopher Sean Morrison 90bc532054 arb types are not written.
inference happens on import, so it's a reflective property.  there's maybe UX value in preserving the original count, but that's not a contemporary issue.
2025-01-01 02:10:50 -05:00
Christopher Sean Morrison 55841c5491 likely unhelpful, would only save a division 2025-01-01 02:05:12 -05:00
Clifford Yapp c04fc5f73b Fix a couple of the headers 2024-12-31 21:29:16 -05:00
Clifford Yapp 29e7a8e752 read_params migration may be a bit tricky. Use tor as a test case 2024-12-31 12:51:43 -05:00
Clifford Yapp 46400bd4ef Refactor writing of parameters into functab 2024-12-31 12:30:42 -05:00
Clifford Yapp ecbc81f170 Use the functab to get prim menu items
This clears most of the use of ID_* conditionals for menu items,
although there are still a few corner cases to deal with - thinks like
initializations or primitive specific calculations.
2024-12-31 11:29:39 -05:00
Clifford Yapp efa336466d Add another gitk path to check on Windows 2024-12-31 11:28:40 -05:00
Clifford Yapp 0c58790703 Comment tweaks 2024-12-31 11:10:56 -05:00
Clifford Yapp 80565d5b49 Consolidate menu definitions
Had initially menu.h into mged.h, but logic breakout ended up going the
other way and expanding the menu.h contents.  Move the menu_item and
defines to group them with other related logic.
2024-12-31 07:40:15 -05:00
Clifford Yapp dc4a49aa7e Fold e_axes_pos prim specific logic into functab 2024-12-31 07:24:35 -05:00
Clifford Yapp b896c92fa5 Pull in latest yori srcs for all components 2024-12-30 21:57:26 -05:00
Clifford Yapp fd350718fa Update other libwin files from upstream yori 2024-12-30 21:34:31 -05:00
Clifford Yapp 811a84468d Scrub old patterns out of env2c 2024-12-30 18:47:18 -05:00
Clifford Yapp 3d763f6927 Add precise variables for GUI and CONSOLE editors
Support BRLCAD_EDITOR_GUI and BRLCAD_EDITOR_CONSOLE environment
variables for bu_editor to allow users precise control over what will be
selected without requiring them to muck with the more broadly used
VISUAL and EDITOR env variables.  The latter will still work, but
precedence is given to the BRLCAD_EDITOR_* vars if set.
2024-12-30 18:20:15 -05:00
Clifford Yapp 4979010b58 Fold keypoint per-primitive logic into MGED functab 2024-12-30 15:50:34 -05:00
Clifford Yapp b2ac6ba418 Add keypoint function pointer to MGED functab 2024-12-30 13:24:06 -05:00
Clifford Yapp c46dc5d243 Use functabs for both edit aware and std labels
Still using global state variables for edit-aware, but this fully clears
the ID_* switch tabel from the MGED label code.

The pattern is hinting that we'll need to be looking at an equivalent to
rt_db_internal and idb_ptr for editing - perhaps an rt_db_edit_internal
with the generic info and the per-primitive-type containers in the
idb_ptr, to correspond to how librt handles similar issues.
2024-12-30 12:07:41 -05:00
Clifford Yapp 106c5a1e90 Don't check the magic until we need to access bot members. 2024-12-30 10:30:15 -05:00
Clifford Yapp cb352515ec Reapply "Wire up bot labels function into MGED_OBJ"
This reverts commit e3016ac5fa.
2024-12-30 10:23:09 -05:00
Clifford Yapp b8a0d23a6e Pull in yori upstream commit e272fb3 - improvement to searching in list box. 2024-12-30 10:11:09 -05:00
Clifford Yapp f162d5d31c Pull upstream fix c93f8e9 - avoids a crash relating to indenting. 2024-12-30 10:06:47 -05:00
Clifford Yapp 5507abeb78 Pull in upstream commit fe63688 from yori - fix for building with spaces in path 2024-12-30 10:01:02 -05:00
Clifford Yapp e3016ac5fa Revert "Wire up bot labels function into MGED_OBJ"
sed on a BoT crashes with this change, so back out for now.

This reverts commit 40f3d03a32.
2024-12-27 21:49:12 -05:00
Clifford Yapp 82038a6039 Be fault tolerant of src/bext retrieval failing
If src/bext (for whatever reason) doesn't yield up a SHA1, try main
rather than giving up completely.
2024-12-27 18:05:08 -05:00
Clifford Yapp 40f3d03a32 Wire up bot labels function into MGED_OBJ 2024-12-27 17:19:48 -05:00
Clifford Yapp a0a9aace2c Start roughing in an MGED functab
Deliberatly trying to match how librt's OBJ functab is implemented, with
an eye towards eventually migrating as much of this logic as we can to
librt for multi-application use.  That will take multiple stages - right
now there are still rampant globals throughout the code, just for
starters - but the tentative steps currently planned are:

1.  Stand up a couple functions in the MGED_OBJ table to test its
    functionality.  Current candidates are logic for getting labels and
    keypoints that isn't alreay pushed down to librt (i.e. those whose
    output reflects editing state not just primitive data) and
    (probably) set_e_axes_pos.

2.  Figure out the differences between MENU_ and ECMD_ logic and whether
    there is anything common between them that can be factored out.

3.  Encapsulate the logic that is generic to many method types into
    reusable functions for the functab, again similarly to how librt
    manages such cases.

4.  Reduce (maybe even eliminate?) explicit use of ID_* types in
    favor of MGED_OBJ calls similar to how we use OBJ[] calls for
    librt defined primitive methods.

5.  Identify globals needed by the editing codes specifically and
    figure out how to encapsulate them in structs.  Probably will
    be some equivalent to the rt_db_intern and primitive specific
    structs, but we'll see.

End goal is to have MGED edit logic be both unit testable and reusable
by other applications.  Also consolidate with any editing logic stood up
in libged.
2024-12-27 16:48:18 -05:00
Clifford Yapp f4ae7acaa9 Move VOL logic. 2024-12-27 14:40:50 -05:00
Clifford Yapp 6d9690ac86 Move TOR logic 2024-12-27 14:29:46 -05:00
Clifford Yapp 315c5ac9eb Move SUPERELL logic 2024-12-27 14:25:53 -05:00
Clifford Yapp da8492d793 Move RPC logic. 2024-12-27 14:19:12 -05:00
Clifford Yapp 7620c39d03 Move RHC logic. 2024-12-27 14:13:48 -05:00
Clifford Yapp 3cd8aad3fa Move PARTICLE logic 2024-12-27 13:12:38 -05:00
Clifford Yapp 36eb366393 Move METABALL logic 2024-12-27 13:06:37 -05:00
Clifford Yapp 68c7d89c2d Move HYP logic 2024-12-27 12:36:32 -05:00
Clifford Yapp 8df2efc14c Move EXTRUDE logic 2024-12-27 12:28:15 -05:00
Clifford Yapp 4494f58ebb Move ETO logic 2024-12-27 12:17:04 -05:00
Clifford Yapp 365dfa56e1 Move EPA logic 2024-12-27 12:09:02 -05:00
Clifford Yapp 5bd6e0db3a Move TGC logic 2024-12-27 12:01:53 -05:00
Clifford Yapp 377c577513 Move ELL logic 2024-12-27 10:59:46 -05:00
Clifford Yapp 82637f6442 Move EHY code 2024-12-27 09:46:23 -05:00
Clifford Yapp bf67dbf189 Move EBM logic 2024-12-27 09:39:33 -05:00
Clifford Yapp 71876a29c6 Move DSP code 2024-12-27 09:29:34 -05:00
Clifford Yapp 0a410d6649 Whoops - thanks static analyzer. These breaks were breaking for loops, not the switch statement the code was extracted from. 2024-12-27 00:02:53 -05:00
Clifford Yapp e886dc33a6 Move cline logic to primitives 2024-12-26 16:50:58 -05:00
Clifford Yapp ac8b8f2a81 Move bspline code to edbspline files 2024-12-26 16:37:33 -05:00
Clifford Yapp f439207191 Relocate BoT editing code 2024-12-26 15:57:49 -05:00
Clifford Yapp 3e43a2b397 Relocate primitive menus into per-primitive files. 2024-12-26 14:29:20 -05:00
Clifford Yapp ed52956a24 Make a primitives dir for MGED to match librt
Stub in C files for various primitives we haven't broken out yet, as
well as moving some header defines.
2024-12-26 13:58:26 -05:00
Clifford Yapp d6d5a067bd Break other defines out into per-primitive headers 2024-12-26 12:44:28 -05:00
Clifford Yapp 08c6b05990 Work on refactoring ARB logic
This is a bit messier than some of the others, and there is a lot more
to do here, but at least get a start.

The broader goal is to get things organized so we can do an "editing"
equivalent of the librt OBJ functab that will encapsulate all the
per-primitive editing logic.  At the moment not worrying about gloabls
being used in this code - just trying to set the stage for eliminating
all the huge primitive switch statements being used for primitive
specific editing behaviors.  Once we get that far, we can look at what
globals are in play with the editing codes and how to properly
refactor (or ideally eliminate) them.
2024-12-26 11:48:13 -05:00
Clifford Yapp 3b6137891c Unused vars 2024-12-26 10:21:54 -05:00
Clifford Yapp 50b3646e5b Stub in headers for more primitive types 2024-12-26 10:13:25 -05:00
Clifford Yapp 92ac92fdf4 Break ars editing logic out into separate files 2024-12-26 10:09:20 -05:00
Clifford Yapp dd5d9a17e2 Add a couple TODO notes for linenoise.hpp 2024-12-23 18:09:09 -05:00
Clifford Yapp 53f0a145cc Move pipe logic into edpipe.c 2024-12-23 16:54:57 -05:00
Clifford Yapp 9ac0df3fb1 Rename to follow the existing per-primitive file naming convention. 2024-12-23 16:01:13 -05:00
Clifford Yapp 01c347513d Break MGED NMG specific logic into its own file
NMG logic tends to be quite verbose, so start with that and break it out
into a separate file.  The idea here (besides making edsol easier to
digest) is to see if there are patterns that can be established for
per-primitive MGED logic that could let us set up something similar to
the OBJ functab in librt and hide per-primitive details.
2024-12-23 15:31:41 -05:00
Clifford Yapp 202be7fc55 Break the nmg keypoint logic out into its own function. 2024-12-23 13:41:26 -05:00
Clifford Yapp 2d2aa80f79 Check VISUAL env var as well as EDITOR
Per https://unix.stackexchange.com/q/4859 discussion, check VISUAL first
and then EDITOR.

Ideally it would be nice if we could have something to call out GUI and
console editors specifically - may want to support BRLCAD_EDITOR_GUI and
BRLCAD_EDITOR_CONSOLE options to allow precise user control without
disturbing more general system settings, if there aren't actually
standard env variables we could use for that.  Unfortunately, despite
them getting used that way in more modern contexts, it seems the
"standard" usages of VISUAL and EDITOR are NOT "GUI and console text
editor" specifiers but rather "advanced" and "basic" terminal
environment editor specifiers (the latter having no way to handle cursor
movement.
2024-12-22 12:06:20 -05:00
Clifford Yapp 03e62e5a15 Shift in bext approach - go ahead and use main 2024-12-21 21:39:35 -05:00
Clifford Yapp 3998b4e108 Unused variable 2024-12-20 23:37:44 -05:00
Clifford Yapp 73915e4dd3 Correct keypoint assignment 2024-12-20 19:38:08 -05:00
Clifford Yapp 12b4d0f79f Whoops - remove mged_tol var in favor of mged_state. 2024-12-20 19:24:13 -05:00
Clifford Yapp abf2e1c3fd Helps to actually use the return code... 2024-12-20 19:13:45 -05:00
Clifford Yapp 50f9e29bc8 Migrate keypoint logic to librt functab
Compiles, but both this and the previous labels work need to be tested
and shaken down - probably some breakage involved, since the regression
tests won't necessarily see changes to these parts of the logic.  (Only
the new drawing subsystem works with the swrast backend, so none of the
MGED editing drawing paths are covered.)
2024-12-20 17:15:30 -05:00
Clifford Yapp 084b088917 Check for non-NULL ip 2024-12-20 13:13:46 -05:00
Clifford Yapp 5b106c6ec1 Only call out cases where ft_labels isn't enough. 2024-12-20 12:05:22 -05:00
Clifford Yapp 3d12a3452a Rework/simplify ft_labels callback logic
Rather than setting up bv_scene_obj outputs, focus the method on
returning label info.  This should allow both MGED and qged to use the
same source for labels.
2024-12-20 11:54:46 -05:00
Clifford Yapp 5f80972733 Split mmenu definitions into menu.c/menu.h
Start trying to split up the gigantic edsol.c into more digestible
pieces.
2024-12-19 21:46:52 -05:00
Clifford Yapp ae4b7c93a6 Relocate shader specific code to librt
"Shaders" isn't a concept defined at the libbu level, so move this code to the
appropriate library level.
2024-12-19 15:52:33 -05:00
Clifford Yapp c2aaeafe75 Relocate arb_vertices array to group it with other similar definitions. 2024-12-19 14:44:45 -05:00
Clifford Yapp 20212c0132 Rename RTG.rtg_vlfree list to rt_vlfree
Making the vlfree container a top level global since we've removed the other
RTG entries.

Thinking perhaps we should try to change the type of this to be something
hidden and specific (rather than the generic bu_list container) so we could
manage how it stores things behind the scenes, but that would have a LOT of API
implications so leaving it alone for now.
2024-12-19 14:21:04 -05:00
Clifford Yapp 4a1fc738c3 Git TODO has been addressed. 2024-12-19 13:04:20 -05:00
Clifford Yapp 1e362e794e Relocate edit state rt_db_internal 2024-12-19 11:24:42 -05:00
Clifford Yapp bd8e649957 Unneeded externs 2024-12-19 11:02:34 -05:00
Clifford Yapp 1d158e7f05 Shift es_scale into edit_state struct. 2024-12-19 10:57:16 -05:00
Clifford Yapp 720e7ed70b Relocate origin variables 2024-12-19 10:44:54 -05:00
Clifford Yapp a7727f660c Relocate dm stashing pointers (and rename - they hold mged_curr_dm, not a list.) 2024-12-19 10:40:29 -05:00
Clifford Yapp e02d92057c Unused variable. 2024-12-19 10:29:27 -05:00
Clifford Yapp d572d4fc93 Move the scale editing variables to the struct. 2024-12-19 10:28:33 -05:00
Clifford Yapp a59d07104f Move the tran editing variables to the struct. 2024-12-19 10:20:00 -05:00
Clifford Yapp 5609a1eff4 Merge pull request #110 from kennethsdavis/export-rt_version
add rt_version to brlcad.def refs #109
2024-12-19 09:55:07 -05:00
Clifford Yapp 289ec2d397 Merge pull request #108 from kennethsdavis/ignore-regexp
rt_regionfix polite error reporting
2024-12-19 09:54:15 -05:00
Clifford Yapp 659c5d10ec Merge pull request #106 from kennethsdavis/main
suppress bu_log from multiple threads simultaneously
2024-12-19 09:51:20 -05:00
Clifford Yapp b6d328166c Whoops, right - vlfree isn't in that container. 2024-12-19 09:44:28 -05:00
Clifford Yapp a9fe0a7963 Missed an initializer 2024-12-19 08:06:58 -05:00
Clifford Yapp ca404a1ee3 Start getting a feel for what's involved with de-globalifying MGED editing variables.
There are a LOT of these - this just tries out the variables specific to
rotate to see how this would work and what the hot spots are in the
code.
2024-12-18 21:43:27 -05:00
Clifford Yapp c80f16df6a Add a note to look into mged_dm vs dm 2024-12-18 20:53:51 -05:00
Clifford Yapp eb3e99550d Eliminate the last direct use of RTG.rtg_vlfree
Still using the global itself, but now all code references to it should
be of the form vlfree = RTG.rtg_vlfree - i.e. we are assigning it to
some form of local variable.

This sets the stage - the remaining changes now to achieve removing
rtg_vlfree as a global will involve figuring out how to pass an
application supplied vlfree through the code, rather than using RTG.
Almost certainly some function and macro signatures will need to change,
and we will need vlfree pointers in a few structs as well to reach
things like librt primitive routines.  Biggest risk is making sure we
don't end up just creating the necessary struct entries and leaving code
paths with uninitialized/NULL vlfree pointers - that'll compile, but
will obviously crash without a valid vlfree container.
2024-12-18 19:55:29 -05:00
Clifford Yapp 7350f955ac More RTG.rtg_vlfree adjustments. 2024-12-18 17:29:44 -05:00
Clifford Yapp 5238c67870 Make a stab at removing libged globals 2024-12-18 14:19:36 -05:00
Clifford Yapp 54e0205141 Function signaure updating in iges converter (on Linux this only shows up in Release building, apparently.) 2024-12-18 14:00:22 -05:00
Clifford Yapp b30ea1611e Ah, right - rt_pipe_tess has a function signature to match in table.cpp. 2024-12-18 13:50:38 -05:00
Clifford Yapp c3b00e13b1 More RTG.rtg_vlfree adjustments 2024-12-18 13:44:24 -05:00
Clifford Yapp 7040de805a Remove various initialization calls concerning rt_uniresource - handled by rt_init.cpp now. 2024-12-18 11:49:41 -05:00
Clifford Yapp 3a68e6180a Add load-time initialization to LIBRT
Like libbu, libged, etc. use an rt_init.cpp file to definite load time
initializations for librt.  Historically, applications have needed to
initialize the RTG.rtg_vlfree list themselves before being able to
successfully use draw routines.  Rather than keep requiring that, we
instead initialize it ourselves at library load time.

Ironically, if we do eventually succeed in eliminating the global
completely applications will be back to having to initialize their own
vlfree lists, but at least in that scenario they will be managing the
list themselves and will need to know about it - unlike the current
situation, where the only awareness of rtg_vlfree in application code
comes from them needing to know to initialize it a-priori.

In principle this should also remove the need for initializing
rt_uniresource, but deliberately focusing this commit on the rtg_vlfree
initializations to limit how much changes at once for testing.
2024-12-18 11:35:25 -05:00
Clifford Yapp 1a7a14ac2a Do some more RTG.rtg_vlfree rework 2024-12-18 10:47:03 -05:00
Clifford Yapp 7053598a22 More removal of RTG references 2024-12-17 17:01:18 -05:00
Clifford Yapp bca99792f3 Reduce MGED references to RTG.rtg_vlfree 2024-12-17 14:32:00 -05:00
Clifford Yapp f76e7da9f1 More removal of RTG references 2024-12-17 14:19:27 -05:00
Clifford Yapp 2275f6046a Replace explicit RTG references with local vars
Migrate the code away from reliance on RTG.  This still uses the RTG.rtg_vlfree
global, but except for local variable assignments the code is now referencing
local variables instead.
2024-12-17 11:59:18 -05:00
Clifford Yapp 7d8e5a9a5f First crack at turning mged_curr_dm into an entry in mged_state.
Eventually will want to unwind defines, but leaving them for now to try
and make the diff clearer.
2024-12-17 09:39:20 -05:00
Clifford Yapp 467df4df35 Rework rt_find_identical_solid for intended use case.
Rename original private rt_find_identical_solid to
rt_find_or_create_identical_solid, since it will create new soltab structs.
What we want rt_find_identical_solid for is to allow us to walk an already
populated rtip the same way the librt prep routines would, in order to allow
the calculation of inverse matrices as was previously done with Orca_hash_tbl.
For such walks, we are not altering the rtip state itself by adding soltab
entries - that work is already done.  We just want to repeat the walk itself to
do calculations.
2024-12-17 09:34:30 -05:00
Clifford Yapp 6c4b917b23 Add a note about some work needed for a public version of rt_find_identical_solid 2024-12-17 07:31:12 -05:00
Clifford Yapp b0462bae8c Console editing on Windows with yedit is user visible. 2024-12-17 00:26:42 -05:00
Clifford Yapp 2a89c27098 adjust comment 2024-12-17 00:25:36 -05:00
Clifford Yapp 3d3090e04f Update HACKING for current C++ standard 2024-12-17 00:16:58 -05:00
Clifford Yapp e67632b6d7 Mark tri_specific struct for deprecation 2024-12-16 22:55:27 -05:00
Clifford Yapp 55ea5d1a47 Remove unused struct entry 2024-12-16 22:51:54 -05:00
Clifford Yapp 3584dbfdd8 Remove globals made obsolete by new BoT raytracing work. 2024-12-16 22:39:39 -05:00
Clifford Yapp e378fdc58f Eliminate the RT_* macros wrapping rtg_vlfree 2024-12-16 22:27:13 -05:00
Clifford Yapp ad8b99cb95 Per (old) deprecation notice, remove RTG.rtg_parallel
Only active use of this remaining was as an option variable in the rt
code - make the variable local to rt itself and remove the RTG global
entry from librt.

That leaves rtg_vlfree as the last barrier to eliminating the RTG global
completely from librt.
2024-12-16 22:05:36 -05:00
Clifford Yapp c9cbb04162 Move rtg_headwdb to MGED sources
The rtg_headwdb entry of the RTG global was in active use only within
MGED.  Relocate it there, as one step towards removing the RTG global.
2024-12-16 21:55:26 -05:00
Clifford Yapp 0c121142ca Unused 2024-12-16 21:35:47 -05:00
Clifford Yapp 0d121f0ade Eliminate the binu_types global 2024-12-16 21:32:48 -05:00
Clifford Yapp 19e3b5f11a Eliminate rt_initial_tree_state global 2024-12-16 19:58:17 -05:00
Clifford Yapp e90ca1e134 Start setting up to remove rt_initial_tree_state global. 2024-12-16 16:18:57 -05:00
Clifford Yapp 036c9b8acc Update platform symbol count, filter list for repocheck. 2024-12-16 15:29:18 -05:00
Clifford Yapp b6011d236f Use the TCL_CHAN define in libtclcad as well. 2024-12-16 15:19:05 -05:00
Clifford Yapp 5db0a1dd69 Make broader use of the USE_TCL_CHAN ifdef 2024-12-16 15:03:17 -05:00
Clifford Yapp 268fc1f305 Unused 2024-12-16 15:03:08 -05:00
Clifford Yapp 543c0b030f If we're going to define MGED_DISPLAY_VAR, use it consistently. 2024-12-16 15:02:59 -05:00
Clifford Yapp 03388b0edb localize define 2024-12-16 15:02:47 -05:00
Clifford Yapp c693352ca8 unused 2024-12-16 15:01:36 -05:00
Clifford Yapp 234b4b597b Fold mged_db_warn and mged_db_version into the db ctx 2024-12-16 14:33:00 -05:00
Clifford Yapp 80579b24ed Consolidate titles.h defines into mged.h 2024-12-16 14:19:10 -05:00
Clifford Yapp bc883397e6 Replace (XY)MIN/MAX defines with libged versions 2024-12-16 11:04:13 -05:00
Clifford Yapp ab4552d570 Consolidate scroll.h into mged_dm.h 2024-12-16 10:55:17 -05:00
Clifford Yapp 7fd12408be Fold menu_item into mged.h 2024-12-16 10:51:52 -05:00
Clifford Yapp aa20d17dbb Correct the check for editor viability - if we don't know, assume valid. 2024-12-13 19:17:12 -05:00
Clifford Yapp b3a6e2b900 Remove hardcoded editors, escape Windows style paths.
Passing full path to yedit.exe, backslashes were a problem going through
bu_argv_to_string.  Must not have been passing full paths to Windows
executables through there before?  In any case, with the updated quoting
this was the first successful use of yedit to do a "red" operation in
MGED classic mode on Windows.

While we're at it, clear out some more of the hard coded editor paths
from libged and call bu_editor instead.  Need to look more closely at
that call to see if it really makes sense there...
2024-12-13 17:07:23 -05:00
Clifford Yapp f1406c8032 Shouldn't need BUILD_ALWAYS for this when we're not debugging. 2024-12-13 16:30:26 -05:00
Clifford Yapp 802c4f68d8 Try out the new bu_editor routine in MGED 2024-12-13 16:26:41 -05:00
Clifford Yapp 7c8164f00b Try to match MGED behavior more closely. 2024-12-13 16:05:52 -05:00
Clifford Yapp 36cf45665d Integrate yedit Windows console editor into misc/tools
BRL-CAD uses text editors for a variety of commands, and has
logic to attempt selecting an editor, but the combination of Windows and
console (non-graphical) mode doesn't supply an editor out of the box on
modern systems (as of 2024 at least.)  Older Windows systems DID supply
edit.exe, so modern Windows platforms have regressed in this particular
regard.  Console mode with no option to run GUI apps is a rare
configuration for Windows, and if a user has sufficient privileges they
can install 3rd party alternatives, but the fact remains that on a
vanilla non-GUI system of that type where a user does not have either
the privileges or internet access need to install software BRL-CAD's
text editing commands will fail.

On all other targeted platforms we can usually assume at least the vi
editor (which is rather "expert friendly" but at least is present) so
Windows console mode is anomaly.  The CMD replacement shell at
https://github.com/malxau/yori has implemented a replacement for the old
edit.exe Windows console text editor, which would at least let us
supply an edit.exe-alike as a last resort.  It is MIT licensed and
should be a fairly straightforward compile on Windows.  Unfortunately
yedit is specific to Windows, so it solves the fallback problem only for
that particular case, but that seems to be about the best we can do
currently.  The Windows console environment is so different from
Unix-style environments that finding a simple, portable, liberally
licensed console text editor written in C/C++ with minimal/no
dependencies is a difficult challenge.
2024-12-13 15:05:48 -05:00
Clifford Yapp 0ca78f66f7 Set up some tests for new bu_editor function
Setting the stage to consolidate editor selection logic.  Added unit
testing, although it will almost certainly fail on Windows without the
yedit bundled console editor in place.
2024-12-13 14:06:18 -05:00
Clifford Yapp 348b017bba fix snprintf 2024-12-09 20:14:30 -05:00
Clifford Yapp 5c8216b66c Add a TODO note about maybe building up bu_which to handle Win/OSX hunting a little. 2024-12-09 16:59:08 -05:00
Clifford Yapp 7d16642bc5 List a couple more editors, tweak ordering to put 'easiest' editors first. 2024-12-09 16:41:13 -05:00
Clifford Yapp 49be552d3c Checkpoint some work on a libbu editor selector
We've got this code in a couple places, in one form or another, and there's
nothing app or lib specific about it, so try to think about what a canonical
implementation would be that could cover all our potential use cases.  At least
one of the current implementations also encapsulates logic to launch command
line programs with xterm, but that feels like it should be a separate
consideration so leaving it out of this function.

Not hooking it up to anything yet - need to write unit tests and try on
multiple platforms first.
2024-12-09 14:41:23 -05:00
Clifford Yapp d7f01ce34e Remove unused red.c file 2024-12-09 11:39:07 -05:00
Clifford Yapp 5d927930a9 qray.h isn't actually used. 2024-12-09 11:29:33 -05:00
Clifford Yapp a445f49717 Fix embedded license file list 2024-12-09 11:24:32 -05:00
Clifford Yapp ae520fdd3f Remove old, unused comb bool lexer/parser code
Unused code.  Looks like an effort to use flex/bison (or lex/yacc) to handle
comb boolean tree textual specifiers.  Revision control history has this if we
want to revisit.
2024-12-09 11:14:13 -05:00
Clifford Yapp 5c96ec5409 Remove unused header 2024-12-09 11:12:33 -05:00
Clifford Yapp e627b01cfe Scrub out a few more stale/unnecessary declarations 2024-12-07 12:57:57 -05:00
Clifford Yapp aa4e33d0d9 Fold interactive flag into the mged state 2024-12-07 12:49:12 -05:00
Clifford Yapp 9718c3f80b Little more mged.h scrubbing 2024-12-07 12:41:35 -05:00
Clifford Yapp 8ae832a77b Rename STATE to GEOM_EDIT_STATE in MGED
To make it clearer that STATE is *not* the global MGED_STATE
container, rename it to reflect its purpose.
2024-12-07 00:19:53 -05:00
Clifford Yapp 59e63ea265 release is used only in attach.c 2024-12-07 00:00:40 -05:00
Clifford Yapp 28a30dbefe just use the plain Tcl call 2024-12-06 23:58:35 -05:00
Clifford Yapp fee7659d2b Remove unused 2024-12-06 23:55:10 -05:00
Clifford Yapp 9f79e7b627 funtab struct also unused 2024-12-06 23:49:06 -05:00
Clifford Yapp 8979f7ebd5 remove local2base and base2local defines 2024-12-06 23:42:35 -05:00
Clifford Yapp 1f6bc28327 unused 2024-12-06 23:38:05 -05:00
Clifford Yapp 35ebefdb49 Make db_update part of the global db context. 2024-12-06 23:32:09 -05:00
Clifford Yapp 423f354c12 move track-only variables to track.c 2024-12-06 23:12:10 -05:00
Clifford Yapp 9debbd1cf9 Not using these much - just use 0 and 1 2024-12-06 22:59:17 -05:00
Clifford Yapp d378fd3305 Make dpy_string non-global 2024-12-06 22:56:28 -05:00
Clifford Yapp 5592c18ffc mged_cmd actually wasn't being used. 2024-12-06 22:50:26 -05:00
Clifford Yapp 87338d64f1 unused 2024-12-06 22:46:42 -05:00
Clifford Yapp cbbcba026e Clear out the rest of the error macros 2024-12-06 22:45:23 -05:00
Clifford Yapp c0ee705ab6 Not making much use of this - unwind 2024-12-06 22:29:24 -05:00
Clifford Yapp 234018162c Make classic_mged and input_strs part of mged_state
While trying to move cmd_stuff_str to cmd.c, ended up de-globalifying a
variety of input string vls containers in mged.c, as well as the
classic_mged state flag.
2024-12-06 22:19:47 -05:00
Clifford Yapp 361a230898 Reorganize a bit and remove/localize some externs 2024-12-06 21:17:35 -05:00
Clifford Yapp 63e167d84d Make main the last function in mged.c 2024-12-06 21:05:40 -05:00
Clifford Yapp 5e970b7e3b output and refresh handlers are used in only one place - move 2024-12-06 20:32:07 -05:00
Clifford Yapp fc7ea7d929 Don't need f_opendb and f_closedb in mged.h 2024-12-06 20:29:24 -05:00
Clifford Yapp f7e993b4f9 mged_init_flag is specific to mged_opendb_ctx - put it there. 2024-12-06 20:24:39 -05:00
Clifford Yapp 149d41b8e7 Whoops - need to set the context state pointer before calling the close callbacks. 2024-12-06 20:11:38 -05:00
Clifford Yapp 92ba88caa7 Fix function signature 2024-12-06 18:50:04 -05:00
Clifford Yapp dc2fbcaf65 Consolidate the various tolerance values into a struct, put struct in mged_state 2024-12-06 16:10:53 -05:00
Clifford Yapp 3894ad6745 Remove the defines for the old global variables, make it clear in the code where we are using mged_state 2024-12-06 15:55:28 -05:00
Clifford Yapp 0017085ce4 Revert "Don't keep running doEvent when MGED exits"
Grr.  Trying to delete the event handler is segfaulting.

This reverts commit ee8ecc5c05.
2024-12-06 15:47:45 -05:00
Clifford Yapp dae4cebeb2 WDBP -> mged_state wdbp 2024-12-06 15:38:07 -05:00
Clifford Yapp 58a6beff13 Switch out global DBIP in favor of mged_state
With the other mged_state work in place, this one isn't too bad.  For now,
doing like INTERP and just changing the define, but will swap that out too
later.
2024-12-06 15:29:43 -05:00
Clifford Yapp ee8ecc5c05 Don't keep running doEvent when MGED exits
Rather than trying tricks in set_curr_dm and doEvent to avoid checks when the
state is collapsing on exit, just stop running the doEvent callback before we
begin teardown.
2024-12-06 14:50:05 -05:00
Clifford Yapp 87eaad9f6b Remove the global INTERP in favor of mged_state
As with GEDP, there are a few cases where passing the state through is tricky
and we fall back on using MGED_STATE, but try to pass through the pointer to
make the code less dependent on globals.

For the first pass left INTERP in the code and changed the define.
2024-12-06 14:37:29 -05:00
Clifford Yapp 9dc8b0fb5b Shouldn't need the GED_EXPORT prefixes here. 2024-12-06 14:36:45 -05:00
Clifford Yapp 1b1f15d5df No need for a separate interpreter parameter to mged_setup 2024-12-06 11:09:36 -05:00
Clifford Yapp bfc2342dfc Add some sanity checks for mged_state void* casts
We have to be a little careful about this thanks to the dm calls inside
doEvent, but add some ability to sanity check mged_state getting past through
voids with a magic value.

Since we don't control when doEvent gets called by Tcl/Tk, during shutdown when
we're tearing down our data structures we may hit a case where Tk wants to
handle some event after we've already closed out the mged global state
container and calls set_curr_dm.  In that particular case we need to be fault
tolerant. We're closing down and it's fine that set_curr_dm isn't going to
work.  However, we don't want to access the GEDP after free either, so check
the magic and return if things look invalid.

There is probably a better way to handle the doEvent calling of set_curr_dm to
avoid this issue completely, but trying to be minimalist about this particular
change.
2024-12-06 10:39:04 -05:00
Clifford Yapp 74683d49ad Make GEDP a non-global variable in MGED
The global state in MGED has long been a problem when it comes to code
maintainability.  Try starting small(ish) and make GEDP a non-global
variable in the MGED code.

The global variable is MGED_STATE, which is roughly equivalent to
qApp in Qt applications.  However, we try to pass it to functions
rather than just using MGED_STATE everywhere - hopefully, we'll
eventually be able to eliminate many globals and reduce the scope of
function inputs to structs specific to their uses.  Passing in the
state parameter is a first step towards that goal.  If we're using
MGED_STATE somewhere other than the initial allocation or header
definition, it's generally because some constraint of Tcl makes it
difficult to pass the state variable through the logic successfully.
2024-12-05 18:49:31 -05:00
Clifford Yapp 014aad75e1 Explain why the set_curr_dm calls are in doEvent 2024-12-05 11:26:08 -05:00
Clifford Yapp 2090ad2915 Missed a couple ged_cmd_valid uses 2024-12-05 08:06:14 -05:00
Clifford Yapp f7bab23c1f ged_cmd_valid replaced with ged_cmd_exists and ged_cmd_same
The design of ged_cmd_valid was rather clunky - break its two functions
out into individual, simpler calls.
2024-12-04 21:58:01 -05:00
Clifford Yapp 6f3620e406 Fix test command name 2024-12-04 21:56:45 -05:00
Clifford Yapp 91eec7fe5a Set up to have MGED report on GED/MGED command name collisions (commented out by default.) Looks like around 50 commands at the moment. 2024-12-04 21:19:35 -05:00
Clifford Yapp 57373f4806 Add a routine to test whether tclcad commands collide with GED command names. 2024-12-04 21:07:12 -05:00
Clifford Yapp 1e67ad61ea Add small program to audit GED cmds against primitives list
If we want to uniformly have a GED command for each valid librt
primitive type (which makes sense, give most primitives will likely have
primitive specific controls/settings/etc.) it would be good to have a
way to detect any missing commands.  At the moment most of them don't
have commands, so this isn't something to turn on as a unit/regression
test failure, but this establishes how to do it.
2024-12-04 20:39:28 -05:00
Clifford Yapp 2b935ffaf8 Undo introduction of data passing container in fbserv
The Raytrace Control Panel in MGED seemed to have a working Raytrace
button with this, but the fbclear button does not work.  Still not sure
what the mistake is, but for the moment see if we can put back the
working configuration.
2024-12-04 15:43:32 -05:00
Clifford Yapp d34b98ab77 f_release was setting status 2024-12-04 12:27:56 -05:00
Clifford Yapp b9a5949b78 Separate out the f_* functions in MGED
Typically these are used to back Tcl commands, but there were a few
other uses in the MGED code where they were being called directly.  A
few of the calls passed in NULL clientdata pointers, which won't work
once we shift to non-global GEDP.

Simplest option looks to be replacing the raw f_* calls with Tcl_Eval
calls which will go through the callback table rather than us having to
hand-feed the f_* functions the correct inputs.
2024-12-04 12:00:13 -05:00
Clifford Yapp ab5bc44d43 Consolidate platform specific fbserv functions
Trying to keep everything in sync during the refactor was getting
annoying, so use a Tcl Channel based define and consolidate the two
different sets of functions, using ifdef USE_TCL_CHAN to select the
necessary logic just in those cases where it actually differs.

While we're at it, don't hide the dm_netfd and dm_netchan globals behind
defines - we'll need to deal with those at some point, so make it
clearer what they are.  As a bonus that clears a WIN32 ifdef.
2024-12-04 11:16:12 -05:00
Clifford Yapp 80d3f5954c Fix bu_vls_sprintf 2024-12-03 20:34:51 -05:00
Clifford Yapp 856ab47182 Remove Orca_hash_tbl and inv_mat calculations, add rti_udata
Rather than having a one-off special case hardwired into prep, provide a
generic pointer allowing users to attach arbitrary data to the rt_i struct.
This also removes the one-off calculations of inverse matricies on regions with
ORCA_Comp attributes set.  rtshot example demonstrated how to use those
matrices - update it to use a generic implementation of the same
inverse-matrix-on-region-with-attribute functionality.  Since the inverse
calculations aren't built into the prep, the client code runs a second walk
performing the specific calculations of interest.  Needs more testing to make
sure this approach produces the same results as the prior approach.
2024-12-03 17:23:33 -05:00
f4alt 87bd39cc81 pass new struct instead of fd
Windows fix for 617d150
2024-12-03 13:46:50 -05:00
Clifford Yapp 10d09b2610 List libged "how" command for deprecation, add replacment.
Yuck yuck yuck.  In at least some cases this appears to be returning an
internal private libged numerical #define value as textual output.
Should be human understandable, not using a number, and I don't think
this deserves to be a top level GED command anyway.  Plan is to use a
view obj [name] info mode subcommand to report this instead.
2024-12-02 21:47:06 -05:00
Clifford Yapp 0c332d5d63 Only need one default terminal width define 2024-12-02 17:02:57 -05:00
Clifford Yapp 70050f5602 Relocate data structures only used in one plugin 2024-12-02 17:01:17 -05:00
Clifford Yapp 04f7e3d2b7 Unused externs 2024-12-02 16:53:01 -05:00
Clifford Yapp 2f877ddf40 Hide _ged_client_data struct 2024-12-02 16:51:53 -05:00
Clifford Yapp c3ff6fe483 Move the metaball code to more specific files 2024-12-02 16:48:18 -05:00
Clifford Yapp 7ac44ffb81 Move rt-datatype-only metaball function to librt 2024-12-02 16:37:38 -05:00
Clifford Yapp 0efd1be0f9 Move dup-only function to dup plugin 2024-12-02 16:27:53 -05:00
Clifford Yapp ef276fb6eb Move pipe scaling into edit with other scaling codes. 2024-12-02 16:10:54 -05:00
Clifford Yapp ba71287514 Move _ged_pipe_append_pnt_common to pipe plugin
This will take some thought long term - probably, edit should be calling
primitive specific commands if it finds the operations being requested
are not the generic rot/trans/scale varieties...
2024-12-02 15:59:00 -05:00
Clifford Yapp a45112085d Push pipe-specific functions not using libged data types to librt 2024-12-02 15:55:35 -05:00
Clifford Yapp 2a40812668 Data type wise, these can live below libged and they're pipe specific. 2024-12-02 15:41:26 -05:00
Clifford Yapp 0b292be188 Merge edarb into edit plugin 2024-12-02 15:20:37 -05:00
Clifford Yapp 37ac02f4b8 draw_walk_tree is used only by draw_gather_paths 2024-12-02 15:04:03 -05:00
Clifford Yapp 6a8da4ab6e Consolidate more code into edit plugin 2024-12-02 14:56:39 -05:00
Clifford Yapp f4cddf26bf Shift some editing commands into the editing plugin
Lets see if we can consolidate some of these into one plugin.  Not
subsuming the commands under edit (at least, not at this time) but there
are some potential advantages to grouping code with a similar intent.
2024-12-02 14:40:43 -05:00
Clifford Yapp 2b7f3fe1e5 Use a name more reflective of temporary nature
Looks like the old name was conflicting with libnmg's nmg.h, and anyway
this is supposed to act as a temporary catch-all while logic is being
reorganized so make that clearer with the name.
2024-12-02 14:35:28 -05:00
Clifford Yapp 9a47f3a138 Move some more declarations to a specific command 2024-12-02 14:02:00 -05:00
Clifford Yapp 9f83c3b19d Shouldn't need to declare these any longer 2024-12-02 13:46:34 -05:00
Clifford Yapp f0e43ba6b9 Move select-only function to select plugin 2024-12-02 13:44:23 -05:00
Clifford Yapp 0e906769ad Remove declaration 2024-12-02 13:41:29 -05:00
Clifford Yapp 5c852483e7 Move drawing specific logic to GED draw plugin 2024-12-02 13:30:58 -05:00
Clifford Yapp ccca1356ea Consolidate big E command into draw plugin. 2024-12-02 13:15:03 -05:00
Clifford Yapp 173e343d4b Add headers 2024-12-02 13:01:10 -05:00
Clifford Yapp 681303b797 Relocate dl_add_path next to its use 2024-12-02 12:06:59 -05:00
Clifford Yapp 483dcab638 More reorg/rework of private libged display_list logic 2024-12-02 12:03:13 -05:00
Clifford Yapp 3fe86dc0bc Doesn't seem to be a need to declare this 2024-12-02 11:47:57 -05:00
Clifford Yapp 16a6be60f1 invent_solid was only ever public as a hack for MGED - can make it private now. 2024-12-02 11:38:31 -05:00
Clifford Yapp 7d9bfad8cb Move logic to eliminate final MGED level use of cvt_vlblock_to_solids 2024-12-02 11:24:48 -05:00
Clifford Yapp c258d76f2f Move labelface to libged 2024-12-02 10:51:38 -05:00
Clifford Yapp a1a21addef Shift labelvert command to libged 2024-12-02 10:10:03 -05:00
Clifford Yapp 69c3544927 struct is specific to joint2 - move 2024-11-26 16:17:24 -05:00
Clifford Yapp a3e2bc2b51 unused 2024-11-26 16:15:34 -05:00
Clifford Yapp 00c56c637a Move dl_set_illum to illum.c 2024-11-26 16:13:06 -05:00
Clifford Yapp 0ca9a56871 Move dl_set_flag to rtcheck.c 2024-11-26 16:04:48 -05:00
Clifford Yapp 5ecf465413 Move dl_set_wflag to nirt.c 2024-11-26 16:03:51 -05:00
Clifford Yapp 664b2fc468 Move dl_zap to zap.c 2024-11-26 16:02:26 -05:00
Clifford Yapp e345a1c9e5 Move dl_how to how.c 2024-11-26 16:00:43 -05:00
Clifford Yapp f6f699b65b move dl_plot function to plot.c 2024-11-26 15:59:28 -05:00
Clifford Yapp fdff6b4f81 Move png specific logic to png.c 2024-11-26 15:57:08 -05:00
Clifford Yapp 7de4f0c62d relocate logic specific to solid_report 2024-11-26 15:49:49 -05:00
Clifford Yapp 2ef03e4e8a relocate functions specific to _ged_rt_write 2024-11-26 15:47:26 -05:00
Clifford Yapp e0ffdb2586 Move select-only functions to select.c 2024-11-26 15:44:00 -05:00
Clifford Yapp 4c04f70467 dl_set_transparency used only in set_transparency 2024-11-26 15:41:36 -05:00
Clifford Yapp 7f287789c8 Check for cmd recursion, as well as callback function recursion. 2024-11-26 15:33:31 -05:00
Clifford Yapp 5af5ed51be Move logic specific to ps command into ps.c 2024-11-26 15:24:01 -05:00
Clifford Yapp d9e003241e Try to add a convenient way to spot recursion in callbacks. Probably should do the same thing for the ged_exec cmdnames directly. 2024-11-26 11:54:13 -05:00
Clifford Yapp 76a6b19bff Not yet passing contexts to dm this way, but replace ged_ctx with something a little more flexible. May not be final form yet. 2024-11-26 10:53:35 -05:00
Clifford Yapp 6aaef8d1dc This issue was due to QtSvg not being present. 2024-11-26 10:13:04 -05:00
Clifford Yapp 829233b0c2 Shouldn't need duplicates of the fbserv_obj function pointers in struct ged 2024-11-26 10:11:01 -05:00
Clifford Yapp 95250a715a Remove ged_subprocess clbks from ged struct
This one was trickier, but I think I found a way to eliminate the
hardcoded struct pointers for the ert callbacks. (qged was using these
to update the state of its raytracing button based on either a button
launched raytrace or the ert command.)
2024-11-26 06:41:41 -05:00
Clifford Yapp 206a6a065a Replace opendb/closedb slots in struct ged
Getting more serious now - removing and replacing the opendb/closedb ged
slots.  These were in use not just by gsh and qged but MGED as well, and
the latter's use is the most non-trivial of any of these conversions
thus far.
2024-11-25 22:23:15 -05:00
Clifford Yapp 86b6980831 Add some notes 2024-11-25 21:41:58 -05:00
Clifford Yapp 0367d400c8 Remove clear and quit specific callback slots in struct ged
Command-specific callback assignments remove the need for these
particular slots in struct ged.  For the moment only gsh was utilizing
the ged versions of these commands, but need to look into migrating
qged/mged/anything else with quit and clear commands to do things this
way instead.
2024-11-25 21:32:11 -05:00
Clifford Yapp 867c4edd75 more thoughts on mged+libged 2024-11-25 21:16:46 -05:00
Clifford Yapp 179715fd86 Raw numbers aren't very clear - make it clearer what their role is in the function calls 2024-11-25 16:45:44 -05:00
Clifford Yapp 2081dbfaa0 Add a TODO note about mged cmd table. Same probably applies in libtclcad. 2024-11-25 16:35:31 -05:00
Clifford Yapp f42e6a0178 Remove dupicate (and wrong) ged_interp assignment 2024-11-25 16:25:04 -05:00
Clifford Yapp 45265e4602 First successful use of a cmd-specific registered callback function to run search -exec 2024-11-25 16:22:59 -05:00
Clifford Yapp c1598344ce Whoops, assigning wrong user pointer. 2024-11-25 16:12:52 -05:00
Clifford Yapp e02f672609 Corrections 2024-11-25 16:05:59 -05:00
Clifford Yapp 0a311af42c Allow for a "during execution" callback definition.
Thinking about the search case, it's not pre or post command execution but is
insteadn passed to search for execution *during* the command run.  Allow for
this case in assignment and retrieval functions.
2024-11-25 15:20:17 -05:00
Clifford Yapp d50d11872a Rough in mechanism to set and get per-cmd GED callbacks
Not testing this for real yet, but put in place the skeleton to associate
callbacks with command execution via ged_exec.
2024-11-25 15:07:24 -05:00
Clifford Yapp 48fca109a5 Oh, right - newer gcc's C++ One Definition Rule [-Werror=odr] flag is cranky about having two search copies. Try some renaming. 2024-11-25 15:01:55 -05:00
Clifford Yapp e7084c3cf9 Add in compat code to make db_search change minimally impacting, deprecate old signature
This is a breaking change if we just yank the old db_search_context type and
change the db_search signature, so we'll put in the older code under the
db_search_old name, list it in CHANGES, and do the deprecation for the previous
signature.  This lets us have our code use the new signature while still
allowing a regex to keep the old code working for a while.
2024-11-25 13:31:27 -05:00
Clifford Yapp 2a0a53f622 Make the db_search_context container private
Ultimately most of the utility of db_search_context is internal, for passing
data around the implementation.  The caller can just pass in the callback and
data directly to db_search and let the implementation manage it internally as
it pleases.
2024-11-25 12:47:09 -05:00
Clifford Yapp 7392e07a25 Simplify/cleanup search callback logic 2024-11-25 12:09:26 -05:00
Clifford Yapp 4f789b8a23 Try creating an internal container 2024-11-25 11:28:31 -05:00
Clifford Yapp 45314f404d Need a void to avoid -Wstrict-prototypes error. 2024-11-25 11:00:49 -05:00
Clifford Yapp 429c35054f add some notes 2024-11-25 08:14:53 -05:00
Clifford Yapp 7d5751f883 Start thinking about what a hidden implementation pointer in struct ged would look like. 2024-11-23 23:33:22 -05:00
Clifford Yapp 8d78d21b57 Explain why wdb uses local ged containers
Figured out what wdb_obj is doing with its local struct ged containers -
they're deliberately avoiding the need to reference global MGED state in
this logic.  Update comments.
2024-11-22 16:33:58 -05:00
Clifford Yapp d789f4582b Phew. Looks like most of these are in the other libtclcad command table. 2024-11-22 13:36:28 -05:00
Clifford Yapp b254793235 Convert the readily convertible cases of ged_exec to wrappers
For any cases in our code where we are using ged_exec simply to fire off
a pre-defined command, use the wrapper so we will get a compile time
breakage in the case of a command rename or removal.

Cases where we are still using ged_exec warrant scrutiny to make sure
it's a correct usage.  There are some (gsh and qged command lines, for
example) where the intent *is* general command execution, and a couple
cases where there are multiple potential command names coming in from
the caller that are passed through as-is (though the latter are
problematic in that we're still losing the compile time validation.)
There are definitely a few cases in libtclcad that are straight up
broken - I tried to label them as I encountered them.
2024-11-22 12:57:45 -05:00
Clifford Yapp 4edadfd14c Remove libged TODO item - prototype complete. 2024-11-22 11:38:36 -05:00
Clifford Yapp c3014be538 Make most of the remaining ged_exec commands in the libged code explicit wrappings. A few are deliberately left as tests or in cases where non-specific command execution is the intent. 2024-11-22 11:29:50 -05:00
Clifford Yapp 31d7c8bce3 No longer have ged_ls, not validating argv[0] 2024-11-22 11:24:09 -05:00
Clifford Yapp 0671df2ed2 Remove unused defines 2024-11-22 10:46:33 -05:00
Clifford Yapp 805fff9ef7 Remove obsolete exec_mapping file 2024-11-22 10:39:30 -05:00
Clifford Yapp e6e3b7a089 Eliminate raw ged_exec calls from the plugin code
Apply the use of the autogenerated wrappers to all plugins.  Already
helpful - caught a few cases where ged_exec was being called
incorrectly.
2024-11-22 10:32:07 -05:00
Clifford Yapp 6f3465999f vrot is like mrot - we don't want a ged_exec here 2024-11-22 10:30:50 -05:00
Clifford Yapp 2c2f375b9d argv[0] for make_pnts follow-on ged_exec can't just be a copy, or we just keep calling make_pnts without ever moving beyond the wrapper. 2024-11-22 10:21:20 -05:00
Clifford Yapp f5b491d4f5 mrot command exhibiting incorrect behavior
Looks like ged_rot->ged_exec wasn't the right mapping for mrot - in this
case, it just calls itself again with incorrect arguments and errors
out.  Restore the older behavior of calling ged_rot_args and _ged_do_rot
present in the original ged_rot function.
2024-11-22 10:03:51 -05:00
Clifford Yapp 02bea82bcd Adjust how the ged_cmds are included.
Simplify the prefix, use BRLCADBUILD to guard a more general inclusion
of ged_cmds.h rather than doing it per file, and use a template for
ged_cmds.h so we can provide better explanation.

Placing ged_cmds.h in a general include location so it can potentially
be used in other BRL-CAD code - anywhere we are hard-coding a ged_exec
of a specific command we really should be doing this to enlist the
compiler's help in catching renaming/removal errors.  Whether it should
be actual public API is a separate concern, but as long as we don't
install it and guard its include with BRLCADBUILD it's internal only.
2024-11-22 09:21:59 -05:00
Clifford Yapp 1c70cc5574 For now keep cmd args execable with raw ged_exec
Until we know the path forward for sure, keep options option.  As long
as the raw argv strings can be fed to ged_exec successfully, we can
update the whole codebase and still revert to basic ged_exec calls with
a single regex.
2024-11-22 08:28:00 -05:00
Clifford Yapp e4062f3f1d Add a note about possible approaches for commands with many subcommands (bot/brep/edit/etc.) 2024-11-21 22:40:06 -05:00
Clifford Yapp e49134f4dc Turn off debug printing 2024-11-21 22:22:31 -05:00
Clifford Yapp 604a77baac Make argv[0] string setting optional
If the ged_exec_* function name encodes the command name, there's no
reason to force the user code to set it.  There's no particular harm if
they need or want to for a specific command, so allow it, but we have
the info to (literally) fill in the blank so go ahead and do so if there
is one.

The advantage in doing this (beyond cleaner client code) is that a
command defined in this fashion can be automatically renamed
successfully with find -exec and perl.  For example, if rm subsumes
killtree then s/ged_exec_killtree/ged_exec_rm is a one-and-done if the
calling code isn't also setting av[0] = "killtree";
2024-11-21 21:58:17 -05:00
Clifford Yapp c50666383a Document what the right way to prevent plugins using raw ged_exec is in the general case. If we extend this to the libged library sources we'll need to tweak it slightly, but the same general idea should apply. 2024-11-21 21:16:46 -05:00
Clifford Yapp 4738e0eaef Right - automatic functions need DECL wrappers
This reverts commit 313f945b4a.
2024-11-21 20:54:52 -05:00
Clifford Yapp 313f945b4a Revert "Initial test of automatic functions for ged cmds"
This reverts commit b2519bd890.

Breaks a regression test.
2024-11-21 19:43:29 -05:00
Clifford Yapp b2519bd890 Initial test of automatic functions for ged cmds
This tests out a mechanism to set up automatic compile-time sensitivity
to situations where commands are renamed or removed, but are being
execed by other LIBGED commands.

We have a scanner read the plugin source code files to determine the
active GED command names.  Using that list, we then define a header and
wrapper functions.  The wrapper functions can be called in lieu of a
direct ged_exec.  When the code is changed and BRL-CAD is next
reconfigured, the newly generated function set will reflect the command
changes and callers of the wrappers will see a compile failure.

This isn't a full conversion of libged to the new approach, just a few
commands to test it out.  The goal here is to avoid a situation were we
don't find out seldom-exercised commands are broken until many releases
later when someone tries to run it.  It's not perfect, obviously, in
that changed command options can still break things, but at least this
way we will have some minimal detection of changes which are guaranteed
to break things.
2024-11-21 16:44:27 -05:00
Clifford Yapp a0587001a1 Consolidate boilerplate for ged_plugins into function 2024-11-21 14:05:26 -05:00
Clifford Yapp 0dbecd520a List more mGed object commands to check
In light of the vslew command not working, decided to try and list out
other Tcl commands being run onthe mGed object and see if libged knew
about them.  Not sure if all of these are actually supposed to be libged
commands or if they work in some other way, but given the vslew
situation...
2024-11-21 12:13:16 -05:00
Clifford Yapp 6e2e7746ca Add a note about an experiment to try with libged 2024-11-21 11:31:18 -05:00
Clifford Yapp e9d926a8e4 Fix Archer Center View button (vslew GED cmd)
Got a user report that the Archer Center View button was broken as of
BRL-CAD release 7.34.2.  Looking into it, the vslew command it is using
was looking for a GED command that wasn't known by that name.  We want
to call the libged slew plugin with that command, so we just have the
plugin define "vslew" as one of the acceptable strings to run it.

Looks like this probably got broken with 5f8aa3204 changing the ged_slew
call out for a ged_exec.  In this particular case the command argv[0]
didn't end up corresponding to the ged_* function signature it was
replacing, since the libtclcad command was "vslew" rather than "slew".

Looking through the Tcl code for $mGed commands, it looks like there may
be others that don't have active libged definitions.  Need to
investigate.  This is a textbook illustration of why interpreted
languages are fragile for this sort of work...
2024-11-21 10:39:42 -05:00
Clifford Yapp 4070bee582 Try flto=auto first to avoid lto-wrapper warnings 2024-11-21 10:14:17 -05:00
f4alt 388629e766 fix view usage
intentionally not call out qvrot in the usage line (since dir is a
better name). But, leave it as a subcommand for legacy expectations.
2024-11-21 08:58:57 -05:00
Clifford Yapp 6f5c4bd43d typo 2024-11-20 10:49:50 -05:00
Clifford Yapp 86f7c01186 Add more detailed instructions for URL remapping with git
If we ever end up changing hosting solutions, having to work with local copies
of the github.com repositories, etc. these notes will be needed.

This is the alternative to doing a gnarly history rewrite to update submodule
URLs - as long as a basic prefix subsitution on the URLs is sufficient, this
appears to do the job.
2024-11-20 10:41:59 -05:00
joshbaker22 e57dba681d Update view.xml remove ref to aet
we have both ae & aet - don't need to ref both (they are the same)
2024-11-20 09:59:56 -05:00
Clifford Yapp bf7eab079c Rework configure's handling of bext
Changing the logic to use src/bext as the source of the SHA1 used for
building, when BRL-CAD's configure process is responsible for producing
bext binaries.  This will allow checkouts of older BRL-CAD releases to
pull versions of bext that will work with their checkouts.  Previous
releases were pulling the RELEASE branch's current state, which may be
wildly out of sync if the cloned BRL-CAD version is older.

Also switching to using main as the touchpoint for BRL-CAD, rather than
the RELEASE branch.  For the bext repository itself, the plan is to
switch to a more typical github workflow of doing major updates in
branches and then merging them into main once complete, rather than
trying to keep main and RELEASE in sync.

Another feature added in this rework is the ability to recognize when a
configure-built bext is out of date.  The logic will now automatically
clear out the old build products and set the stage for a new build.
(Experience has shown us that if we don't do this automatically it's
quite common for the user to need to do it themselves due to bext
changes being necessary for newer BRL-CAD code to compile.)
2024-11-19 19:07:44 -05:00
Clifford Yapp 192b494355 Document a way to submodule update w/ local mirror
Since the URLs are baked into git submodule definitions in the history,
git doesn't know by default how to go looking for a local checkout.
Fortunately, it looks like the url insteadOf mechanism is able to
address this as long as the on-disk hierarchy of our mirror matches that
of the github URLs (which isn't hard, since it's all flat.) It's really
pretty simple - we just swap out the github prefix of the URL with our
local path and change the protocol.

When the submodule isn't populated yet we appear to have two options -
pass the necessary settings in via the command line -c options, or set
them in the global config file.  (Since the submodules aren't
initialized yet we can't use their local .git/config files.) If we don't
want to supply the -c options it  may be worth checking into the new
includeIf mechanism to see if it could help localize the impact of such
settings: https://stackoverflow.com/a/71096731

As long as github.com is viable this won't be an issue, but if we ever
have to change hosting services or work strictly with a local mirror the
submodule URLs *will* be a problem.  We can't change them in our history
without rewriting it in a major (and sophisticated) way - we would first
have to rewrite all of the bext history to use new URLs and update all
SHA1 references in submodule definitions, comments and content while
maintaining a map of old commits to new.  Once we had that map we would
need to do the same thing with the main brlcad history.  All things
considered, remapping the URLs seems to be far easier, less invasive and
effective.
2024-11-19 19:05:59 -05:00
Clifford Yapp cd36716026 Add update_bext.sh to CMakeLists.txt 2024-11-19 16:34:05 -05:00
Christopher Sean Morrison 43a964b2f3 initial script to update embedded bext.
needs some protections for local changes to stash and pop, but should update a clean tree to latest in one step.
2024-11-19 15:11:37 -05:00
Christopher Sean Morrison f3bd140762 looks like only alternative is a post-checkout hook, but go ahead and update to tracking main.
still requires git submodule update --remote
2024-11-19 14:32:15 -05:00
joshbaker22 3a141bd7d8 Update help.tcl
update view help statement
2024-11-19 13:26:32 -05:00
joshbaker22 d7f585cfa6 Update view.xml
add/expand new subcommands, fix some typos
2024-11-19 13:16:13 -05:00
Clifford Yapp 96d2425f49 Place setup logic inside main function
If I'm understanding CMake's rules for this, variables defined in
functions will remain defined when calling nested functions.  If that is
the case, we can just set the variables we need in our top level
function and avoid the "global to file" setup we had previously without
having to explicitly pass all the values we need as arguments to the
child functions.  That's only marginally better than a global, to be
honest, but at least the setup code is not unencapsulated logic that'll
be run on include()
2024-11-18 16:23:19 -05:00
Clifford Yapp c19eea89b8 Not running logic as a side effect of inclusion - brlcad_ext_setup encapsulates. 2024-11-18 15:30:27 -05:00
Clifford Yapp a8e8234b84 Generalize the mirror_repos.sh script
Previous manual tweak only would have worked up to 200 repos - instead
of leaving it at that, have the script keep iterating until it has
gathered all the repositories on all pages.
2024-11-16 19:56:02 -05:00
Clifford Yapp 0c4a9369d5 Need two pages from git projects list
Git API limits us to 100 repositories per page:
https://stackoverflow.com/questions/27331849/github-api-v3-doesnt-show-all-user-repositories
Since we have more than 100 we need page 2.  If we get more than 200 we'll need
page three as well - ideally we should probably make this iterate until the
page return is empty, but for now just do the simple thing.
2024-11-15 13:02:17 -05:00
Clifford Yapp e7746d9657 Add a note to looking into keying off of src/bext SHA1 2024-11-07 12:48:58 -05:00
f4alt f0b5c4b21b mod linenoise.hpp
old linenoise behavior would send commands on newline. For subprocess
use, like we do with nirt in MGED, this is very important as the
alternative means collecting commands like "Command_0\nCommnand_1.." and
expecting the process to parse the newlines.
2024-11-07 09:12:38 -05:00
Christopher Sean Morrison 78bfb346ec renaming x is minimally impacting (and a dev cmd), but also note it should merge with 'who' 2024-11-05 18:19:21 -05:00
Christopher Sean Morrison 151e83bae5 rename x.xml to solid_report.xml 2024-11-05 18:19:21 -05:00
Christopher Sean Morrison 941b237f48 update docs to reflect x as solid_report 2024-11-05 18:19:21 -05:00
Christopher Sean Morrison 511a7a13ae replace instances of 'x' with 'solid_report' 2024-11-05 18:19:21 -05:00
Christopher Sean Morrison 0b489b40e8 convert argument parsing to bu_opt (only using it for help). document levels. 2024-11-05 18:19:21 -05:00
Christopher Sean Morrison 6385f8e2bf ws indent cleanup 2024-11-05 18:19:21 -05:00
Clifford Yapp 77d14c8874 Adjustments to Windows ifdef logic 2024-11-05 13:28:29 -05:00
Clifford Yapp 372448718c Delay column count initialization until we use the value
Looking at previous linenoise code we were using, it appears the column
counting didn't get triggered until later in the process.  Since the
early triggering breaks MGED+nirt integration, just postpone the count
until we actually need the values filled in.
2024-11-05 13:01:56 -05:00
f4alt bd6280fe27 upd help text for 83360b5 2024-11-05 10:55:30 -05:00
Clifford Yapp 71af1299aa The getColumns check interferes with MGED+nirt. Should look at the other linenoise code to see what the differece is for this part. 2024-11-05 09:41:12 -05:00
Clifford Yapp a486233ee2 Fix build on Linux 2024-11-05 08:56:21 -05:00
f4alt 446f430387 -Wincompatible-pointer-types cast 2024-11-04 15:21:41 -05:00
f4alt 83360b5e19 add midpoint (-m) option for bb output 2024-11-04 12:23:43 -05:00
f4alt 846764e749 add view 'print' subcommand for quick viewing
also reduce wording for 'view saveview' -> 'view save' and 'view autoview' -> 'view auto'
2024-11-04 12:23:43 -05:00
Clifford Yapp ac21bed76e Adjust how stdin_input gets its callback data
Another case where we will need to send more info than just an fd/chan through
the callback if we want to eliminate globals.  In this case happens to let us
clear a WIN32 ifdef as well.
2024-11-04 11:33:56 -05:00
Clifford Yapp c27dff49ae List file for CMake 2024-11-01 18:45:46 -04:00
Clifford Yapp 80c2fe61bd Update bext submodule to SHA1 8ee34e8 2024-11-01 16:33:28 -04:00
Clifford Yapp c38c851ea2 Adjust compilation for find_package based bext copy of tinygltf 2024-11-01 16:24:17 -04:00
Clifford Yapp f3a313ef4e Remove embedded tiny_gltf copies. 2024-11-01 16:24:17 -04:00
Clifford Yapp 6b213bb69d Only free c_data once 2024-11-01 10:49:43 -04:00
Clifford Yapp 617d150231 Test using a more complex data container for MGED fbserv
Yikes.  If we ever want to eliminate global vars in MGED, we're going to
need to pass more than just the fd around to these.

If this is working correctly, there should be no change in functionality
- it's a test to make sure we can pass a richer container successfully
through this portion of the Tcl command labyrinth.
2024-10-31 22:54:33 -04:00
Clifford Yapp 8f5ce40bb3 See if we can avoid using strcasecmp 2024-10-31 14:44:31 -04:00
Clifford Yapp 23652e7f2e Can't initialize the nirt linenoise prompt at the beginning, or we get unexpected setup ctrl chars recorded in the output and break the regression tests. Just postpone setup until we actually need it. 2024-10-30 21:48:22 -04:00
Clifford Yapp 8f0e27751f Try bu_interactive in nirt as well. 2024-10-30 20:16:19 -04:00
Clifford Yapp 33f8ed110e See if bu_interactive will work here 2024-10-30 20:14:14 -04:00
Clifford Yapp dcce919e23 Try and avoid warning 2024-10-30 20:11:07 -04:00
Clifford Yapp 8c68ce7287 Line endings 2024-10-30 14:34:05 -04:00
Clifford Yapp 34529a9c37 Merge pull request #163 from BRL-CAD/devel_k-g
reengeneered LsDyna keyword file to BRL-CAD converter
2024-10-30 14:20:11 -04:00
Clifford Yapp 74a717ce8f Switch other linenoise apps to the hpp version. 2024-10-30 11:30:36 -04:00
Clifford Yapp 9f27c8adc9 list linenoise.hpp for repocheck 2024-10-30 10:55:43 -04:00
Clifford Yapp 5d3843165d Update copyright 2024-10-30 10:31:50 -04:00
Clifford Yapp 67cb22694d Try to port upstream changes to damlevlim.cpp 2024-10-30 10:24:39 -04:00
Clifford Yapp 0a392fc512 Simplify initialization (MSVC is saying previous style was a C++20 feature) 2024-10-30 09:36:27 -04:00
Clifford Yapp d7e890c7e8 Still not sure about multiline... 2024-10-29 21:12:09 -04:00
Clifford Yapp 8e1910f1b3 Replace old gsh code with new version
Looking like we're pretty much a parity, with the new ability to show rt
command's textual output without hanging.  Needs more testing,
particularly on Windows.
2024-10-29 21:00:57 -04:00
Clifford Yapp 802c309913 Prompt is base on interactive or stdin input 2024-10-29 20:46:28 -04:00
Clifford Yapp 53739934a7 If we're non-interactive and we have nothing, it's time to quit 2024-10-29 20:45:59 -04:00
Clifford Yapp 4e8067f22c See if some upstream patches for Windows will work for us 2024-10-29 20:16:07 -04:00
Clifford Yapp 328b9372c8 No particular reason to make these non-static... 2024-10-29 20:12:10 -04:00
Clifford Yapp 6d11b3b0bb Run the code through clang-format 2024-10-29 20:12:10 -04:00
Clifford Yapp df8501e705 Pass the prompt to the constructor 2024-10-29 20:12:10 -04:00
Clifford Yapp c7f684b7af Nix the Initialize function 2024-10-29 20:12:10 -04:00
Clifford Yapp 9b0d31c581 Put the class at the top of the file, to try and help make it clear that's the public API 2024-10-29 20:12:10 -04:00
Clifford Yapp af8e23ccd0 Make other operations methods on the linenoise class
Line wiping and screen clearing don't depend on the linenoise state from
a data perspective, but it feels cleaner to have all of our operations
pertaining to linenoise be handled consistently.
2024-10-29 20:12:10 -04:00
Clifford Yapp 54bb5df737 Don't intent namespaces 2024-10-29 20:12:10 -04:00
Clifford Yapp f4861e698d Adjust how history is handled 2024-10-29 20:12:10 -04:00
Clifford Yapp df8405f516 Make a bunch of variables private 2024-10-29 20:12:10 -04:00
Clifford Yapp 4ee90e5450 Make functions with state pointers methods on the class 2024-10-29 20:12:09 -04:00
Clifford Yapp 6ec97d6883 Remove unneeded externs 2024-10-29 20:12:09 -04:00
Clifford Yapp 07b1c23d6a Undo hack - WipeLine is being handled differently 2024-10-29 20:12:09 -04:00
Clifford Yapp ef01d3c2c4 linenoise.hpp and libtermio are conceptually related - group them together.
linenoise.hpp is modded from the upstream for gsh purposes, so it's not
a good bext candidate.  If this does end up replacing the C library
version of linenoise, it'll get reused.  Stash it with libtermio header
so all the similar functionality is in one place.
2024-10-29 20:12:09 -04:00
Clifford Yapp 20ef8d44d3 Simplify line wipe function 2024-10-29 20:12:09 -04:00
Clifford Yapp c0edc8d665 Print output from non-interactive eval 2024-10-29 20:12:09 -04:00
Clifford Yapp 42a0634d9f Reorganize logic 2024-10-29 20:12:09 -04:00
Clifford Yapp cf764836bc Remove special casing of clear/quit, narrow use of USE_DM defines 2024-10-29 20:12:09 -04:00
Clifford Yapp fa1b7912c2 Tweak when to restore prompt 2024-10-29 20:12:09 -04:00
Clifford Yapp 377a61bf24 Successfully write out rt command output. 2024-10-29 20:12:09 -04:00
Clifford Yapp 8a52c17a3d Checkpoint 2024-10-29 20:12:09 -04:00
Clifford Yapp 36fe85095b Start roughing in callback functions. io_handlers will be thorny. 2024-10-29 20:12:09 -04:00
Clifford Yapp 16e70714eb Checkpoint a new approach to structuring gsh that (hopefully) will work better for showing output from async commands. 2024-10-29 20:12:09 -04:00
Clifford Yapp e569886e1a Add line to Vim footer for not indenting namespaces
Indenting namespaces isn't particularly helpful and produces a LOT Of
whitespace, so update our default Vim footer to add the option from
https://stackoverflow.com/a/8125118 to avoid it.
2024-10-29 15:30:37 -04:00
Clifford Yapp be05cdb998 Add a note to work on the BRL-CAD configure driven bext process. 2024-10-29 11:27:33 -04:00
Clifford Yapp d5c85b77d3 Add screen clearing and quitting commands to libged
These need to use callbacks (and callback pass-throughs are basically
all they amount to since the functionality is application specific) but
"clear" for clearing the screen and "q/quit/exit" for exiting the
application pop up repeatedly when defining user facing applications.
Rather than having to do ugly specific case hacks in each application's
command evaluation wrappers over and over, just make it possible to do
what we need via standard GED command evaluation instead.
2024-10-28 14:36:59 -04:00
Clifford Yapp fb234d51fd Remove dlopen libged mode
Having moved completely to ged_exec, without the "pre-defined" command
specific wrappers in the libged C API, the dlopen trick is no longer
interesting.

Should do some more cleanup/modernization - this is still a very handy
tool for testing GED commands in a simple(r) environment, even if we
don't yet properly handle async commands like rt.
2024-10-25 22:16:39 -04:00
Clifford Yapp 931161a99a Don't want garbage between geometry specifier and subcommand 2024-10-25 13:57:29 -04:00
Clifford Yapp e5b0dc14ab List header for CMake 2024-10-24 20:43:23 -04:00
Clifford Yapp 8f57941c88 Work on edit cmd option handling 2024-10-24 16:52:08 -04:00
Clifford Yapp ce0e624cfa Make it easier to test new commands with gsh 2024-10-24 12:19:39 -04:00
Clifford Yapp 425ce6fe4f Be more specific about objecting to .gitattributes content. 2024-10-24 11:35:09 -04:00
Clifford Yapp 672dd4fb69 List .gitattributes 2024-10-23 19:20:57 -04:00
Clifford Yapp 71e44449a7 Add a TODO note for some Git experiments. 2024-10-23 16:30:49 -04:00
Clifford Yapp 7c32717e54 Too aggressive with .gitattributes check - add a TODO note 2024-10-23 16:07:20 -04:00
Clifford Yapp d49ccbad37 See if we can tell GitHub our .asc files aren't AGS Script 2024-10-23 16:00:17 -04:00
Clifford Yapp 04025764d0 No longer using meshIO at librt level
If we need to output glb for debugging, we can wire it in at the time of
need.  In normal use we don't want to enable the logic for these checks,
since it significantly slows processing.
2024-10-22 16:23:26 -04:00
Christopher Sean Morrison c25c0310cc return val isn't used or needed 2024-10-22 01:18:26 -04:00
Christopher Sean Morrison 63bea0718b verify arb6 editing, seems to have broken in 7.24-7.28 2014-2016 timeframe 2024-10-21 12:32:32 -04:00
Christopher Sean Morrison 6dc5a6a294 add some checks to make sure NewFace worked 2024-10-21 12:32:32 -04:00
Christopher Sean Morrison 9f3a497cf9 change all readers to start from 0 index with upper limit bounds checking to avoid crashing 2024-10-21 12:32:32 -04:00
Daniel Rossberg e9cde82531 Merge pull request #164 from BRL-CAD/main
sync with main branch
2024-10-21 16:27:04 +02:00
Clifford Yapp 0144bdd6ed Stash BRLCAD_EXT_DIR in the cache if specified
Daniel Rossberg ran into a situation were configuring, changing a
setting in the GUI, and then re-configuring was ignoring a previously
specified BRLCAD_EXT_DIR location.  Need to cache the BRLCAD_EXT_DIR
value if set so we don't forget it the next time around.
2024-10-21 10:17:43 -04:00
Clifford Yapp cb0ffd07b9 Remove obsolete comment - didn't end up going this route 2024-10-21 10:08:27 -04:00
Daniel Rossberg 716d5df09b Merge branch 'main' into devel_k-g 2024-10-20 22:30:45 +02:00
Daniel Rossberg a06ac0975f stylistic/white space changes
harmonized coding style
2024-10-20 22:08:51 +02:00
Christopher Sean Morrison 0eb932dbdf fix a variety of crash cases working with old bspline nurbs.
this is just enough to get iges-g to succeed without crashing or bombing, but there does still appear to be some incorrect book-keeping going on.  there are paths through the logic were specific iges entities are ending up without geometry or without a mate. there were also cases resulting in loopuse without edgeuse, though now a minimum was put in place to progress through the existing logic.  this requires a much more careful study as iges-g -t now completes but doesn't result in a usable conversion.
2024-10-19 19:50:32 -04:00
Christopher Sean Morrison bc6f18d0fa lets not bomb if we don't know what geometry to apply the matrix to 2024-10-19 19:50:32 -04:00
Christopher Sean Morrison 7a880e8868 fix a iges-g crash when names are null.
there are other problems prior to getting in this situation, but this addresses the glaring crash.  we give unnamed objects a generic noname_# name (not thread safe, but assuming single-threaded).
2024-10-19 19:50:32 -04:00
Christopher Sean Morrison adf6257e6b make sure our index is in a valid range for creating loops 2024-10-19 19:50:32 -04:00
Clifford Yapp 8659e8e413 Remove intermediate mesh checks in bot extrude
Learned from upstream that these checks can be very expensive.  If this
type of debugging becomes necessary, introduce it when working the
problem rather than paying the overhead all the time.

(On a semi-related note, there's a bug in the upstream RotateUp routine
which appears to be behind the problems with using their Cylinder, so
we'll watch for developments there - would still be nice to use their
implementation (which is what their testing will also use) rather than
our custom one-off logic.)
2024-10-19 00:15:14 -04:00
Clifford Yapp c865093f58 Revert "Similarily, use Cylinder from manifold rather than custom code."
Seems to be causing an exception in the boolean logic.  Can see this
upstream as well, so revert to our previous implementation for now.

This reverts commit 8e2f81d4e7.
2024-10-18 16:00:14 -04:00
Clifford Yapp 8e2f81d4e7 Similarily, use Cylinder from manifold rather than custom code. 2024-10-18 11:37:54 -04:00
Clifford Yapp 9f607be70b Just use Manifold to construct a sphere rather than going through the tess routines. 2024-10-18 11:06:51 -04:00
Clifford Yapp 33e7d3a594 Do managed files operations before other targets
Got a report that common.h wasn't in place for building a test file on Windows.
Make sure all targets depend on managed_files target so things are in place.
2024-10-17 15:16:52 -04:00
Clifford Yapp e645fca9b0 Add note about interesting looking ortho construction 2024-10-16 14:17:16 -04:00
Clifford Yapp d19ad21a1d Add a note so we don't forget to look into mmesh 2024-10-15 21:31:54 -04:00
Clifford Yapp 830d8b8107 Add a reminder to look into EXPORT targets 2024-10-15 19:37:17 -04:00
Clifford Yapp dc1b01c798 Add a copy of FindBRLCAD.cmake for projects to use
Since we don't (yet) export BRL-CAD targets the way the newer CMake
find_package mechanism is looking for, add a copy of FindBRLCAD.cmake
for projects looking to locate BRL-CAD libraries to use.
2024-10-15 13:49:37 -04:00
f4alt b278268abc fix text wrapping in the notes section
ran into an edge case with a long db title where a word filled the last
available room, but was not the last word of the title and did not leave
room for an ellipsis. Refactor the textWrapping function to not use a
hardcoded check for the number of chars before writing the ellipsis.
2024-10-10 14:02:35 -04:00
Clifford Yapp 5be73f8fd4 Remove unused tcl_pkgindex file 2024-10-09 15:54:17 -04:00
Clifford Yapp 5a1127e25d Don't think we're using FindFontconfig.cmake anymore? 2024-10-09 15:54:17 -04:00
f4alt f60382a9e9 swapped subcommand to be more intuitive 2024-10-09 15:33:24 -04:00
f4alt b0a53ed012 update view manpage for subcommands 2024-10-09 15:31:53 -04:00
f4alt f6bb4cb179 combine qvrot and viewdir functionality
create 'view dir' command that will return the current value using
viewdir, or set the value using qvrot
2024-10-09 15:31:53 -04:00
f4alt de1cbd5a1f move viewdir into libged/view 2024-10-09 15:31:53 -04:00
f4alt 883246da94 add -i flag to negate values 2024-10-09 15:31:53 -04:00
Clifford Yapp 3909fc8131 See if the new management of CMake find_package input paths fixes the
Asset Import simplification.

This reverts commits 241d68d792
and 6103b24493.
2024-10-09 12:06:29 -04:00
Clifford Yapp bafecddda6 Adjust bext text file processing for CMake find_package
Normally CMake's find_package *Config.cmake files don't hardcode paths,
but it looks like our z_brl library path made it in as a full path.  The
standard text processing set this path to the final install path, which
wasn't present, and that caused problems.  Moreover, the pkgconfig files
(which can be used by CMake, depending on how it searches) do use full
paths, and so would have similar issues.

Adjust the path setting logic so the CMake input files use the build
directory path while they are in the build directory, and add a
post-install rule to correct them for their final install location. We
could in principle do this for all text files, and that might be the
simpler route long term, but it would slow the install step
significantly to post-process ALL text files (particularly when large
dependencies like LLVM and Appleseed are added to the mix) so for now we
target this specifically at find_package inputs.
2024-10-09 10:47:36 -04:00
Clifford Yapp 8b6cca55ce Use ExclusiveGeometry method to get pointer
Unlike the previous change this doesn't fix anything behavior wise with
MGED edit operations, but per the opennurbs_model_geometry.h
documentation this methods feels like a better fit conceptually -
bi->brep isn't likely guaranteed to satisfy the restriction of "not
being used to modify the geometry."
2024-10-08 16:39:26 -04:00
Clifford Yapp fc58aa48e8 Correct memory managment for BRL-CAD brep object
ON_ModelGeometryComponent* CreateForExperts documentation in OpenNURBS
header opennurbs_model_geometry.h indicates that a true value in the
first argument indicates the geometry object should be deleted by
the ON_ModelGeometryComponent destructor.  That's not what we want -
we're managing the brep object ourselves - so we need this to be false.

This may be the reason doing a "sed" operation on a brep was crashing
MGED, but needs more testing to confirm this has actually fixed it.
2024-10-08 16:28:08 -04:00
Clifford Yapp 241d68d792 Revert "Reapply "Make a stab at replacing FindASSETIMPORT and using the built-in export targets instead.""
This reverts commit 6113146ec3.
2024-10-04 16:36:03 -04:00
Clifford Yapp 6103b24493 Revert "Add pugixml find_package calls to support assimp."
Hmm.  OSX build is trying to look for a zlib in the final installed path
location - that's no good.  May have to investigate the details of the
exported CMake targets...

This reverts commit ad2547992f.
2024-10-04 16:17:37 -04:00
Clifford Yapp ad2547992f Add pugixml find_package calls to support assimp. 2024-10-04 15:25:02 -04:00
Clifford Yapp 6113146ec3 Reapply "Make a stab at replacing FindASSETIMPORT and using the built-in export targets instead."
Looks like we'll need to explicitly hunt up pugixml as well using this method...

This reverts commit 657723751f.
2024-10-04 15:13:33 -04:00
Clifford Yapp 657723751f Revert "Make a stab at replacing FindASSETIMPORT and using the built-in export targets instead."
Seeing CI build failures, back out for now.

This reverts commit 98711282f2.
2024-10-04 15:06:10 -04:00
Clifford Yapp f5b1671e54 ws 2024-10-04 11:54:29 -04:00
Clifford Yapp 98711282f2 Make a stab at replacing FindASSETIMPORT and using the built-in export targets instead. 2024-10-04 11:52:17 -04:00
Clifford Yapp 0b3f853eda Add some notes to investigate modernizing our find_package logic
Historically we've created and bundled a lot of Find*.cmake files to allow
find_package to locate our dependencies, but modern CMake has shifted towards
packages providing *Config.cmake files in specific locations to avoid the need
for such files.  Some of bundled dependencies already do this, so we should be
using those files when present.  Looks like asset import library, png and proj
are the current candidates.

Probably should also investigate patching our bundled copies of libraries to
provide such files, in the cases where they don't already do so.  zlib in
particular would most likely benefit from this, since we use custom naming and
currently have to patch a large number of dependencies to teach them how to
look for our version.  If CMake doesn't have a built in way to look for a
package and vanilla upstream doesn't provide export targets we'll still need to
keep some Find*.cmake files for those cases, but we should strive to minimze
them since it's looking like the exported target approach will be simpler and
cleaner for bundled libs.
2024-10-04 10:48:02 -04:00
Clifford Yapp bc2e86ecfc lint crashing should be addressed now - had to do with implementation of parallelism. 2024-10-04 10:40:07 -04:00
Christopher Sean Morrison b5f33917a7 gotta extern C it 2024-10-03 17:03:38 -07:00
Christopher Sean Morrison cd45e7213f fix the 'x' aka 'solid_report' command.
the command is set up to take 'levels' which can be negative numbers, which indicate reporting of just leaf nodes or just combs, etc.  The assumption that a dash meant help meant any negative levels throw usage.  MGED uses x -1 and x -2 for the solid and object/comb editing panels (for object selection).
2024-10-03 18:37:03 -05:00
Clifford Yapp e7ed1d3170 Shift stl-write to a C++ file 2024-10-03 15:38:24 -04:00
Christopher Sean Morrison f33cff1670 mged gui editing appears to be broken :( 2024-10-03 12:49:24 -05:00
Clifford Yapp ef4b2a9198 Try gersemi automatic CMake formatter
This is the result of running the gersemi CMake automatic formatter
(https://github.com/BlankSpruce/gersemi) on our CMake files with
the following settings:

gersemi -i  --indent 2 -l 120 --no-warn-about-unknown-commands
2024-10-03 11:04:08 -04:00
Clifford Yapp beb8a94993 Use the status check from C++ to check for error condition 2024-10-02 21:38:55 -04:00
Clifford Yapp 7ab1d060b2 Remove a few unused defines from config_win.h
With the C++17 APIs we can probably eliminate the need to define most or all of
these, but need to look into reworking bot_dump and a few other cases where low
level open() calls are using some of them.
2024-10-02 17:00:20 -04:00
Clifford Yapp 153a5d0125 Of the S_IS macros, only S_ISFIFO is used and that only in pixcmp.c. Simplify, add a note to investigate using the C++17 std::filesystem::is_fifo check to eliminate the need for pixcmp's S_ISFIFO ifdef use as well. 2024-10-02 16:55:45 -04:00
Clifford Yapp 4d0510f00b Use std::filesystem to implement the bu_file_directory check. 2024-10-02 16:40:11 -04:00
Clifford Yapp 6317437cc7 Use std::filesystem to check for symbolic link 2024-10-02 16:36:22 -04:00
Daniel Rossberg 37bf7f8822 Merge pull request #156 from AliHaider93/sketchExtrude_devel_k-g
SketchClass: beam elements with integrable cross sections
2024-09-26 19:11:12 +02:00
louisgoogl 3d8fa73830 compliation errors 2024-09-26 17:30:56 +02:00
Clifford Yapp b00e712413 fix build 2024-09-25 23:33:31 -04:00
Clifford Yapp 425e888880 Don't prefer frameworks when doing find_package 2024-09-25 19:02:58 -04:00
f4alt 44210966f0 move to top of file 2024-09-25 17:04:16 -04:00
f4alt 15de2f2986 document view subcommand updates 2024-09-25 17:03:27 -04:00
Clifford Yapp 2e22c67a66 Some of the X headers on OSX are apparently causing -Wdocumentation warnings...
(cherry picked from commit fddaf4d53c)
2024-09-25 16:59:25 -04:00
f4alt ebf8375fd1 alphabetize 2024-09-25 16:57:16 -04:00
f4alt b0f1d8b921 move qvrot into libged/view 2024-09-25 16:57:16 -04:00
f4alt 7880b87019 have qvrot angle be optional. defaults to 0 2024-09-25 16:57:16 -04:00
f4alt f0b82ef9c5 users are familiar with ae command - mimic usage 2024-09-25 16:57:16 -04:00
f4alt 42cbe769ec create view 'align' command
used to align eye, center and an arbitrary point
2024-09-25 16:57:16 -04:00
f4alt 8410fd1a7c move saveview command into libged/view 2024-09-25 16:57:16 -04:00
f4alt bb4da6e824 move autoview into libged/view 2024-09-25 16:57:16 -04:00
f4alt 12ab70332d move lookat command into libged/view 2024-09-25 16:57:16 -04:00
Clifford Yapp fddaf4d53c Some of the X headers on OSX are apparently causing -Wdocumentation warnings... 2024-09-25 16:28:03 -04:00
Clifford Yapp 354b98358c Check for a matching bext version branch before cloning RELEASE
Avoid older releases pulling dependencies that might be too new or
changed by first looking for a bext branch that matches the current
BRL-CAD release.

(cherry picked from commit 79bc519a37)
2024-09-25 10:37:10 -04:00
Clifford Yapp 00364f2236 Should be cloning RELEASE branch, not main 2024-09-24 21:54:58 -04:00
Clifford Yapp b1ace6be37 As with the writes, make icv_read handle file setup for the various formats. 2024-09-24 16:36:24 -04:00
Clifford Yapp bf58a27f92 Return BRLCAD_ERROR if we have a problem. 2024-09-24 16:08:36 -04:00
Clifford Yapp 2362ee2939 Make a stab at having icv_write manage the file open and close steps, with the image-specific code focused just on writing out the right data. 2024-09-24 16:06:01 -04:00
Clifford Yapp 79bc519a37 Check for a matching bext version branch before cloning RELEASE
Avoid older releases pulling dependencies that might be too new or
changed by first looking for a bext branch that matches the current
BRL-CAD release.
2024-09-24 09:38:01 -04:00
Clifford Yapp 54ba5b6c70 Add a note to beef up the git clone logic for the release case. 2024-09-24 07:04:36 -04:00
Clifford Yapp 9f22fe5623 Merge branch 'RELEASE' 2024-09-24 06:59:48 -04:00
Clifford Yapp 7f2dd97779 Restore RELEASE branch checkout 2024-09-24 06:59:35 -04:00
Clifford Yapp f8d7be0f75 Point the configure checkout at the bext release branch
Need to update HACKING, or even better make this smarter - once we tag a
release, we want configure to pull the bext associated with the tag, not
the RELEASE branch (which will update as we do new releases.)
2024-09-24 06:56:05 -04:00
Clifford Yapp d3572a510f merge of RELEASE fe0bbbad2da to main branch 2024-09-23 22:14:20 -04:00
Clifford Yapp fe0bbbad2d Update log with commits since 2024-08-16 2024-09-23 19:39:26 -04:00
Clifford Yapp 77cf9a764d Don't if guard this - if the target name is wrong, we want to know. 2024-09-23 16:54:40 -04:00
Clifford Yapp 75faf22784 asc2g needs TclIndexBld as a dependency. 2024-09-23 16:43:53 -04:00
Clifford Yapp 19b13a64fd Update log with commits since 2024-08-16 2024-09-23 14:41:24 -04:00
Clifford Yapp d52211e86e Update release date 2024-09-23 14:40:19 -04:00
Clifford Yapp a8e2ab67b8 Restore removal of tar files 2024-09-23 12:23:27 -04:00
Clifford Yapp 3d4480b34b Update git submodule to ba294f7468 2024-09-23 10:11:11 -04:00
louisgoogl b006e4e102 unnecessary Variables 2024-09-22 20:48:37 +02:00
louisgoogl c8c7371129 minor misconception 2024-09-21 20:22:55 +02:00
Clifford Yapp dd58e4d54b Fix tarball creation and unpacking, Tcl component logic
Making the tarballs with full path, the unpacking was not succeeding - instead,
files were being copied over individually as deltas.  Also, liboptical does
(can) use Tcl for one of its shaders, so based on BRLCAD_ENABLE_TCL we may need
it as a dependency.  Same for libdm plugins.

With the new bext setup, should probably simplify/replace all uses of
BRLCAD_ENABLE_TCL except the top level one with enable/disable based on the
find_package_tcl results.  As long as find_package_tcl returns empty if that
variable is set, the rest should follow.
2024-09-20 14:37:56 -04:00
Clifford Yapp 0a28fa001e Locate function where it is used, fix message 2024-09-20 11:36:51 -04:00
Clifford Yapp 34208011e3 Fix if test, adjust comments. 2024-09-20 11:13:54 -04:00
Clifford Yapp 36213589fc Guard a couple more test executables 2024-09-20 10:59:59 -04:00
Clifford Yapp d21c95e0c1 Whoops, missed a line
(cherry picked from commit 4add8d8968)
2024-09-19 19:53:59 -04:00
Clifford Yapp 4add8d8968 Whoops, missed a line 2024-09-19 19:53:41 -04:00
Clifford Yapp 782ce01ca9 Verify target
(cherry picked from commit 74db75505d)
2024-09-19 19:52:43 -04:00
Clifford Yapp 74db75505d Verify target 2024-09-19 19:52:24 -04:00
Clifford Yapp 2d5a5d9968 Mark a few more executables as TEST so they're disabled in a BUILD_TESTING=OFF build
(cherry picked from commit ab3bbb8a3b)
2024-09-19 19:50:53 -04:00
Clifford Yapp ab3bbb8a3b Mark a few more executables as TEST so they're disabled in a BUILD_TESTING=OFF build 2024-09-19 19:50:34 -04:00
Clifford Yapp fdc2770b0d Match if/endif
(cherry picked from commit f3fe394216)
2024-09-19 19:35:55 -04:00
Clifford Yapp f3fe394216 Match if/endif 2024-09-19 19:35:33 -04:00
Clifford Yapp 2314c77842 Validate fuzz targets before setting options
(cherry picked from commit adfde18ec1)
2024-09-19 19:34:18 -04:00
Clifford Yapp adfde18ec1 Validate fuzz targets before setting options 2024-09-19 19:33:37 -04:00
Clifford Yapp fe17b76bda Test whether using C++ permissions lookup helps on Windows 2024-09-19 15:57:31 -04:00
Clifford Yapp c1b1a0e751 Fix Windows compile 2024-09-19 14:52:07 -04:00
Clifford Yapp cc7bc1e5f0 See if we can use std::filesystem::permissions for Windows case 2024-09-19 14:46:02 -04:00
Clifford Yapp a5f9df9c6d Try out the error conditions parameter 2024-09-19 14:42:15 -04:00
Clifford Yapp 5e9a4f3281 Make fchmod a C++ file 2024-09-19 14:17:36 -04:00
Clifford Yapp 4bc6ff9271 Try adding and removing permissions 2024-09-19 14:12:48 -04:00
Clifford Yapp 5b1e77ef37 Add string header 2024-09-19 13:56:22 -04:00
Clifford Yapp fa032dd889 Add simple program to test C++17 permissions API 2024-09-19 13:51:09 -04:00
Clifford Yapp e1f024fce4 Revert "write something to the file before chmod."
Looks like when we use the newer API for filename unpacking we don't
need to pre-populate the file contents.

This reverts commit 1eb1ab6501.
2024-09-19 12:09:00 -04:00
Clifford Yapp 981accbb23 Try breaking out the various Windows steps into separate stages 2024-09-19 11:51:31 -04:00
Clifford Yapp abc361e2cd Don't apply the executable mask on Windows
Per Microsoft's _chmod documentation, their version doesn't have a
concept of executable, so "setting" it with bu_fchmod is a no-op.  We're
getting a path on Windows now, but the is-executable test was still
failing because the files sb.st_mode didn't match the mask we were
testing.

This may point to a problem with our config_win.h defines for this case,
and if we're willing to dive much deeper into the ACL permissions setup
there might be analogs we could map this to, but for now go the simple
route and just don't check for something we can't set with _chmod.
2024-09-19 11:41:38 -04:00
Clifford Yapp 10705d5464 Get farther - this returns the path name, but the file libbu test is still failing the executable check. 2024-09-19 11:21:57 -04:00
Clifford Yapp 489cce35ba Check return code from GetFileNameFromHandle 2024-09-19 10:55:27 -04:00
Clifford Yapp b904337def Fail earlier and with error messages in GetFileNameFromHandle
The reason we were getting a nonsense string rather than an empty string
from GetFileNameFromHandle appears to be the string copy still taking
place even if the CreateFileMapping operation failed.

Rework logic to bail immediately if one of the steps fails.
2024-09-19 10:50:47 -04:00
Clifford Yapp 746372b3b1 Try to validate filepath and warn if we can't 2024-09-18 21:09:21 -04:00
Christopher Sean Morrison 1eb1ab6501 write something to the file before chmod.
seeing a peculiar error from bu_fchmod() on secured Windows machines where GetFileNameFromHandle throws an error about being unable to map zero-length files.  this may be a security policy, or implementation limitation, but can be accommodated by simply writing something to the file beforehand.

(cherry picked from commit 02ba341f2e)
2024-09-18 21:03:50 -04:00
Christopher Sean Morrison 02ba341f2e write something to the file before chmod.
seeing a peculiar error from bu_fchmod() on secured Windows machines where GetFileNameFromHandle throws an error about being unable to map zero-length files.  this may be a security policy, or implementation limitation, but can be accommodated by simply writing something to the file beforehand.
2024-09-18 12:59:02 -04:00
Clifford Yapp 6aa51bae18 Update ChangeLog and release date 2024-09-18 11:04:14 -04:00
Clifford Yapp cc9ab31ab9 Validate a couple more input parameters in the libbv LoD functions. 2024-09-18 10:22:01 -04:00
Clifford Yapp 21a12c08f6 Update to get new utahrle submodule version 2024-09-17 18:23:56 -04:00
Clifford Yapp 89c185c347 Update to get new utahrle submodule version 2024-09-17 18:23:13 -04:00
Clifford Yapp ce84ec05f1 Work on improving LoD cache setup. 2024-09-17 18:15:26 -04:00
Clifford Yapp f679f2aa32 Update log with commits since 2024-08-16 2024-09-17 10:29:45 -04:00
Clifford Yapp 9ab81fa5c8 Update dates for release 2024-09-17 10:28:05 -04:00
Christopher Sean Morrison 44494716fd process doesn't need read-write. might just be ray tracing. 2024-09-17 10:20:21 -04:00
Clifford Yapp 7d6786d5a8 If the hidden files aren't present, don't hault the build - we don't actually need them for compilation. 2024-09-16 16:51:30 -04:00
joshbaker22 6e3cb21685 Update eye_pt.xml add see also view command 2024-09-16 12:05:23 -04:00
joshbaker22 c6081e37c0 Update orientation.xml add see also view 2024-09-16 12:05:23 -04:00
joshbaker22 ee0dd2da19 Update viewsize.xml add see also view command 2024-09-16 12:05:23 -04:00
joshbaker22 23cdc5a32c Update size.xml add see also view command 2024-09-16 12:05:23 -04:00
joshbaker22 befc058fa3 Update center.xml add see also
Add see also view command
2024-09-16 12:05:23 -04:00
joshbaker22 bbf3799990 Update ae.xml add see also
Add see also note to direct users to view
2024-09-16 12:05:23 -04:00
joshbaker22 d8e1c85d57 Update view.xml flesh out further
Note on each subcommand what parameters remain static and which ones change
2024-09-16 12:05:22 -04:00
joshbaker22 59cfef5229 Update comb_color.xml flesh out 2024-09-16 12:05:22 -04:00
joshbaker22 b989557987 Update bigE.xml standardize 2024-09-16 12:05:22 -04:00
joshbaker22 2ab4e7fcef Update bo.xml standardize 2024-09-16 12:05:22 -04:00
joshbaker22 832d5ef591 Update cd.xml standardize 2024-09-16 12:05:22 -04:00
joshbaker22 b8d787b89f Update clear.xml conform to standard
pluralize description to conform to standard
2024-09-16 12:05:22 -04:00
joshbaker22 3d3cf98f4f Update autoview.xml pluralize first statement to conform to standard 2024-09-16 12:05:22 -04:00
joshbaker22 94f587bd46 Update units.xml standard use of mged in italics 2024-09-16 12:05:22 -04:00
joshbaker22 dd7a903a53 Update Z.xml update description to conform to standard 2024-09-16 12:05:22 -04:00
joshbaker22 3da7f89c66 Update man.xml standardize sentence str
edit first line to conform to standards
2024-09-16 12:05:22 -04:00
f4alt b706fc84f1 can't use <arg> element outside of synopsis
we're also calling out the subcommands twice back to back. To make it
easier next time these need an update, remove the block in "Description"
and put the usage alongside the subcommands's in only the "Subcommands"
section.
2024-09-16 12:05:22 -04:00
joshbaker22 a92596eb28 Update man.xml note usage with no arguments
adjust arguments to optional, note usage if no argument given.
2024-09-16 12:05:22 -04:00
joshbaker22 d47817c9be Update units.xml normalize some language
normalize language and note usage in first statement.
2024-09-16 12:05:22 -04:00
joshbaker22 e855c490fb Update size.xml - update to show no argument usage
change arguments to optional, note no argument usage.
2024-09-16 12:05:22 -04:00
joshbaker22 6c79bf6def Update center.xml add note in top line about no argument case 2024-09-16 12:05:21 -04:00
joshbaker22 17c28b8cb9 Update eye_pt.xml - update to show no arguments case
change arguments to optional, note that without arguments returns current value. Description said this is always in mm but just confirmed it is in local units (in 7.40.0)
2024-09-16 12:05:21 -04:00
joshbaker22 10b718992c Update view.xml - further flesh out subcommands
Also add proper formatting to options
2024-09-16 12:05:21 -04:00
joshbaker22 be22bf583d Update ae.xml fix format of inputs
also change eye position to eye point for consistency
2024-09-16 12:05:21 -04:00
f4alt 01db30b260 add missing entries for cherrypicks 2024-09-16 11:59:22 -04:00
joshbaker22 120d720811 Update eye_pt.xml add see also view command 2024-09-16 08:48:30 -04:00
joshbaker22 3697ae2a2e Update orientation.xml add see also view 2024-09-16 08:46:18 -04:00
joshbaker22 69c05b2ccc Update viewsize.xml add see also view command 2024-09-16 08:45:38 -04:00
joshbaker22 898451cd29 Update size.xml add see also view command 2024-09-16 08:45:08 -04:00
joshbaker22 8f7f221a8b Update center.xml add see also
Add see also view command
2024-09-16 08:44:10 -04:00
joshbaker22 859f628d30 Update ae.xml add see also
Add see also note to direct users to view
2024-09-16 08:42:28 -04:00
joshbaker22 6610802dec Update view.xml flesh out further
Note on each subcommand what parameters remain static and which ones change
2024-09-16 08:40:29 -04:00
louisgoogl 36dff46d14 getName and small errors 2024-09-15 22:26:52 +02:00
joshbaker22 db03cb7025 Update comb_color.xml flesh out 2024-09-13 16:00:05 -04:00
joshbaker22 be9aa140d4 Update bigE.xml standardize 2024-09-13 15:45:51 -04:00
joshbaker22 3fa71f488f Update bo.xml standardize 2024-09-13 15:45:14 -04:00
joshbaker22 b0f9d109b8 Update cd.xml standardize 2024-09-13 15:43:51 -04:00
joshbaker22 e24f710b4b Update clear.xml conform to standard
pluralize description to conform to standard
2024-09-13 15:42:59 -04:00
joshbaker22 2c01bde393 Update autoview.xml pluralize first statement to conform to standard 2024-09-13 15:37:57 -04:00
joshbaker22 162f90078c Update units.xml standard use of mged in italics 2024-09-13 15:28:16 -04:00
joshbaker22 03d861c076 Update Z.xml update description to conform to standard 2024-09-13 15:25:35 -04:00
joshbaker22 6e57de3bfa Update man.xml standardize sentence str
edit first line to conform to standards
2024-09-13 15:18:01 -04:00
f4alt a4bb99cf9b can't use <arg> element outside of synopsis
we're also calling out the subcommands twice back to back. To make it
easier next time these need an update, remove the block in "Description"
and put the usage alongside the subcommands's in only the "Subcommands"
section.
2024-09-13 14:45:20 -04:00
joshbaker22 dc1a44551d Update man.xml note usage with no arguments
adjust arguments to optional, note usage if no argument given.
2024-09-13 13:41:05 -04:00
joshbaker22 8035d03007 Update units.xml normalize some language
normalize language and note usage in first statement.
2024-09-13 12:51:12 -04:00
joshbaker22 f1a3e81d94 Update size.xml - update to show no argument usage
change arguments to optional, note no argument usage.
2024-09-13 12:44:11 -04:00
joshbaker22 de202203b4 Update center.xml add note in top line about no argument case 2024-09-13 12:29:35 -04:00
joshbaker22 d7a5fbbb56 Update eye_pt.xml - update to show no arguments case
change arguments to optional, note that without arguments returns current value. Description said this is always in mm but just confirmed it is in local units (in 7.40.0)
2024-09-13 12:27:54 -04:00
joshbaker22 568282a8ad Update view.xml - further flesh out subcommands
Also add proper formatting to options
2024-09-13 12:20:38 -04:00
Clifford Yapp d36e0b8672 Bump version numbers in anticipation of patch release 2024-09-13 11:51:54 -04:00
joshbaker22 34b557dd65 Update ae.xml fix format of inputs
also change eye position to eye point for consistency
2024-09-13 11:51:26 -04:00
Clifford Yapp a654cbd7d6 Update src/bext submodule to latest RELEASE 2024-09-13 11:43:51 -04:00
Clifford Yapp d8a3433c9e Update src/bext submodule to latest RELEASE 2024-09-13 11:42:47 -04:00
joshbaker22 fe55ab2ae3 Update ae.xml - adjust to show can be used without arguments
(cherry picked from commit f043d5c37b)
2024-09-13 11:41:42 -04:00
f4alt c65d2addf8 revert/rework 5e4af9d - exit if no layout can be found
rework the error condition to not use bu_exit because if gist is doing a
folder run it needs to move on to the next db instead of exiting.

(cherry picked from commit f4bc99de42)
2024-09-13 11:41:29 -04:00
f4alt 133b9b8bdf make it more clear what's going on here
(cherry picked from commit f82a169814)
2024-09-13 11:41:23 -04:00
f4alt ba88a2febe make -F not so fragile
(cherry picked from commit 24c03c579d)
2024-09-13 11:41:14 -04:00
f4alt cf9829acde logic error when checking for input file / dir
(cherry picked from commit 249ec9d71a)
2024-09-13 11:39:49 -04:00
Clifford Yapp ea959da985 Whoops, got too fancy - just check the CTest var
(cherry picked from commit 435577a2f8)
2024-09-13 11:39:43 -04:00
Clifford Yapp b1c9e978f9 Disable test exec builds if BUILD_TESTING=OFF
Allow for a more minimal compilation if testing is off - disable the
compilation of test executables based on CTest's BUILD_TESTING variable.
If that variable is off CTest tests won't be available in any case.
Allows for more minimalist compilations as well when using
BRLCAD_COMPONENTS, which is the original user case prompting the suggest
to support disabling them.

(cherry picked from commit a399cd3902)
2024-09-13 11:39:37 -04:00
Clifford Yapp d010b57ace Go with utf-8 by default for Visual Studio
(cherry picked from commit 8012562f1d)
2024-09-13 11:39:30 -04:00
joshbaker22 f043d5c37b Update ae.xml - adjust to show can be used without arguments 2024-09-13 11:03:49 -04:00
Clifford Yapp b0707c84fe Match capitalization on github.com website 2024-09-12 19:37:53 -04:00
Clifford Yapp fb76e893dd Update bext submodule to latest RELEASE 2024-09-11 19:38:40 -04:00
louisgoogl 960fb1ca45 all sections 2024-09-11 00:31:08 +02:00
f4alt f4bc99de42 revert/rework 5e4af9d - exit if no layout can be found
rework the error condition to not use bu_exit because if gist is doing a
folder run it needs to move on to the next db instead of exiting.
2024-09-09 23:47:27 -04:00
f4alt f82a169814 make it more clear what's going on here 2024-09-09 23:47:26 -04:00
f4alt 24c03c579d make -F not so fragile 2024-09-09 23:47:26 -04:00
f4alt 249ec9d71a logic error when checking for input file / dir 2024-09-09 23:47:26 -04:00
Clifford Yapp 435577a2f8 Whoops, got too fancy - just check the CTest var 2024-09-09 19:40:41 -04:00
joshbaker22 bc592698bc Update view.xml fix missing close para tag
(cherry picked from commit 52ae498dd1)
2024-09-09 16:55:52 -04:00
joshbaker22 4cb3587c55 Update help.tcl eyepoint -> eye point
trying to keep things consistant

(cherry picked from commit 6a7d204afe)
2024-09-09 16:55:47 -04:00
joshbaker22 46007b0132 Update helplib.tcl eyepoint -> eye point
trying to keep things consistant

(cherry picked from commit a4a476e8c1)
2024-09-09 16:55:43 -04:00
joshbaker22 05d2532481 Update view.xml rework page to call out subcommands
Move descriptions of subcommands into a subcommands section, add some examples for ypr

(cherry picked from commit 5389d0b854)
2024-09-09 16:55:37 -04:00
joshbaker22 bb11add3ba Update help.tcl - add keywords to view help statement
Update a view help statement to include keywords to be searched with apropos. Also update reset to describe current behavior.

(cherry picked from commit d7c4f1483a)
2024-09-09 16:55:32 -04:00
joshbaker22 88fb393d05 Update helplib.tcl -update lookat help line
adjust lookat note so that it mentions eyepoint (and will come up if using apropos to search eyepoint)

(cherry picked from commit 3258334331)
2024-09-09 16:55:26 -04:00
f4alt beb08c51b0 exit if no layout can be found
if we get to this point and something has gone wrong (ie it is unable to
find a layout), we need to abort.

Current problem was observed with our m35 model. The tops objects are
'scenes' and have the component sitting on a halfspace groundplane with
lights. The halfspace in particular screws things up as we rely on the
bounding box size (which is inf) and orthogonal views (bottom view is a
blank white square).
This is a tricky problem to solve auto-magically. So for now, just punt
and make the user manually specify the correct component.

(cherry picked from commit 5e4af9d227)
2024-09-09 16:55:12 -04:00
Clifford Yapp b257c478b0 No longer using ext tirectory in misc/tools
(cherry picked from commit ea9b9fecea)
2024-09-09 16:55:03 -04:00
Clifford Yapp 7f9b861cba Remove concurrentqueue.h header
(cherry picked from commit 0cf18cb03d)
2024-09-09 16:54:44 -04:00
Clifford Yapp 7543dbee55 Call out the bext submodule in HACKING steps
Modernizing the release instructions here is still a work in progress,
but call out the submodule update as a step.  Target for testing is now
just distcheck.

(cherry picked from commit ead785b0a9)
2024-09-09 16:49:35 -04:00
Clifford Yapp a399cd3902 Disable test exec builds if BUILD_TESTING=OFF
Allow for a more minimal compilation if testing is off - disable the
compilation of test executables based on CTest's BUILD_TESTING variable.
If that variable is off CTest tests won't be available in any case.
Allows for more minimalist compilations as well when using
BRLCAD_COMPONENTS, which is the original user case prompting the suggest
to support disabling them.
2024-09-09 15:22:20 -04:00
Clifford Yapp 8012562f1d Go with utf-8 by default for Visual Studio 2024-09-09 14:14:30 -04:00
joshbaker22 52ae498dd1 Update view.xml fix missing close para tag 2024-09-09 13:48:53 -04:00
joshbaker22 6a7d204afe Update help.tcl eyepoint -> eye point
trying to keep things consistant
2024-09-09 09:31:50 -04:00
joshbaker22 a4a476e8c1 Update helplib.tcl eyepoint -> eye point
trying to keep things consistant
2024-09-09 09:31:11 -04:00
joshbaker22 5389d0b854 Update view.xml rework page to call out subcommands
Move descriptions of subcommands into a subcommands section, add some examples for ypr
2024-09-09 09:30:08 -04:00
joshbaker22 d7c4f1483a Update help.tcl - add keywords to view help statement
Update a view help statement to include keywords to be searched with apropos. Also update reset to describe current behavior.
2024-09-09 08:42:50 -04:00
louisgoogl 1264878ae7 sections 2024-09-08 22:20:47 +02:00
joshbaker22 3258334331 Update helplib.tcl -update lookat help line
adjust lookat note so that it mentions eyepoint (and will come up if using apropos to search eyepoint)
2024-09-06 11:19:47 -04:00
f4alt 5e4af9d227 exit if no layout can be found
if we get to this point and something has gone wrong (ie it is unable to
find a layout), we need to abort.

Current problem was observed with our m35 model. The tops objects are
'scenes' and have the component sitting on a halfspace groundplane with
lights. The halfspace in particular screws things up as we rely on the
bounding box size (which is inf) and orthogonal views (bottom view is a
blank white square).
This is a tricky problem to solve auto-magically. So for now, just punt
and make the user manually specify the correct component.
2024-09-04 10:47:50 -04:00
Clifford Yapp ea9b9fecea No longer using ext tirectory in misc/tools 2024-09-03 14:45:27 -04:00
Clifford Yapp 0cf18cb03d Remove concurrentqueue.h header 2024-09-03 14:43:08 -04:00
Clifford Yapp f84ea3fa2b Add RLE to DLL import definitions for libicv
(cherry picked from commit c924466b25)
2024-09-03 14:40:08 -04:00
Clifford Yapp e60775cf45 Move test using libged to libged tests dir 2024-09-03 14:15:44 -04:00
f4alt 6bb41c8c02 avoid memcpy, initialize directly 2024-09-03 11:39:09 -04:00
Clifford Yapp c7587877cd Shouldn't be using libwdb in a librt test - need to fix, or move test. 2024-08-31 21:25:37 -04:00
Clifford Yapp c924466b25 Add RLE to DLL import definitions for libicv 2024-08-30 12:47:38 -04:00
Clifford Yapp 51e45c909e Add NEWS items for 7.40.2 release 2024-08-29 12:58:36 -04:00
f4alt 464a16524a add simple progress bar feedback
when the execution got moved to gchecker (fdd3918), the progress bar for
this tool essentially became useless. In a perfect world we'd probably
have some sort of signal to poll progress and report back or refactor
gchecker to run one suite at a time. But, tcl doesn't easily accomodate
signal sending, and a refactor would be overkill just for a progress
bar.

In the meantime, give very basic status text to let the user know that
their click is doing *something*.

(cherry picked from commit dd6171742d)
2024-08-29 12:45:52 -04:00
f4alt c015d474b5 use -f
(cherry picked from commit 86b9d738bc)
2024-08-29 12:45:42 -04:00
f4alt 870aea5146 smarter default location hunting
gchecker writes the the current working directory - not where the .g
file is

(cherry picked from commit 610a4d64bb)
2024-08-29 12:45:28 -04:00
f4alt 936a682907 close forgotten fp's
(cherry picked from commit e49c27e6bd)
2024-08-29 12:45:00 -04:00
f4alt 511cbd8ae2 correctly catch gchecker errors
our raytracing tools log to stderr, which 'exec' treats as an error. So,
use the status plus last error code to determine if gchecker actaully
failed or it was just raytrace logging.

(cherry picked from commit 72e2e0c243)
2024-08-29 12:44:39 -04:00
f4alt 5fd23bd511 need to close gedp
(cherry picked from commit 7cf2b3ba96)
2024-08-29 12:43:13 -04:00
f4alt 7be20a523d add 'force' flag to gchecker
(cherry picked from commit c355d377d9)
2024-08-29 12:42:50 -04:00
Clifford Yapp 72ca6f9212 This doesn't fix the BoT lod error, but it should at least avoid crashing.
(cherry picked from commit 1ecaced194)
2024-08-29 12:38:53 -04:00
Clifford Yapp 471415a1d0 initialize childnodes, don't realloc if nchildnodes[i] == 0
(cherry picked from commit f44a46c71b)
2024-08-29 12:38:45 -04:00
f4alt fc1068b675 prettier spacing with the redraw checkbox gone
(cherry picked from commit a0e7f4de4c)
2024-08-29 12:38:37 -04:00
f4alt 47cb878bcc fix LOD Configuration tool
update LOD configuration tool to reflect 'redraw' subcommand removal
(ab4d33f)

(cherry picked from commit 9b31e3f6ad)
2024-08-29 12:38:22 -04:00
f4alt a7491f48c6 correctly catch gchecker errors
our raytracing tools log to stderr, which 'exec' treats as an error. So,
use the status plus last error code to determine if gchecker actaully
failed or it was just raytrace logging.

(cherry picked from commit 72e2e0c243)
2024-08-29 12:36:09 -04:00
Clifford Yapp cf01b7436b Replace lint concurrentqueue with bu_parallel
Back to basics - lint using concurrentqueue.h didn't agree with the new
BoT raytracing code, so use standard bu_parallel instead.

For future reference - concurrentqueue issue appears to be some sort of
memory issue - running with one CPU worked, and running in valgrind
worked without errors (arrgh) but 2 or more CPUs crashed at bot.c:1480:

(gdb) l

1475
1476        RT_GET_SEG(segp, ap->a_resource);
1477        segp->seg_stp = stp;
1478        segp->seg_in = hits[i]; /* struct copy */
1479        trip = (triangle_s *)hits[i].hit_private;
1480        BOT_UNORIENTED_NORM(ap, &segp->seg_in, trip->face_norm, IN_SEG);
1481        segp->seg_out = hits[i+1];  /* struct copy */
1482        trip = (triangle_s *)hits[i+1].hit_private;
1483        BOT_UNORIENTED_NORM(ap, &segp->seg_out, trip->face_norm, OUT_SEG);
1484        BU_LIST_INSERT(&(seghead->l), &(segp->l));
(gdb) print segp->seg_in

$35 = {hit_magic = 0, hit_dist = 0, hit_point = {0, 0, 0}, hit_normal = {0, 0, 0}, hit_vpriv = {0, 0, 0},
  hit_private = 0x0, hit_surfno = 0, hit_rayp = 0x0}
(gdb) print i

$36 = 8
(gdb) print hits[i]

$37 = {hit_magic = 543713652, hit_dist = 1.9994999999998984, hit_point = {0, 0, 0}, hit_normal = {0, 0, 0},
  hit_vpriv = {-0.99999999999999978, 0.3333333333333337, 0.33333333333331677}, hit_private = 0x55555721dd18,
  hit_surfno = 1705, hit_rayp = 0x7ffde2bff960}
(gdb) print trip

$39 = (triangle_s *) 0x0
(gdb) print (triangle_s *)hits[i].hit_private

$40 = (triangle_s *) 0x55555721dd18

(cherry picked from commit e94a4064f3)
2024-08-29 12:27:05 -04:00
f4alt 8463a6101a use the param correctly..
(cherry picked from commit 57b5a4cd4d)
2024-08-29 12:26:33 -04:00
Clifford Yapp e94a4064f3 Replace lint concurrentqueue with bu_parallel
Back to basics - lint using concurrentqueue.h didn't agree with the new
BoT raytracing code, so use standard bu_parallel instead.

For future reference - concurrentqueue issue appears to be some sort of
memory issue - running with one CPU worked, and running in valgrind
worked without errors (arrgh) but 2 or more CPUs crashed at bot.c:1480:

(gdb) l

1475
1476        RT_GET_SEG(segp, ap->a_resource);
1477        segp->seg_stp = stp;
1478        segp->seg_in = hits[i]; /* struct copy */
1479        trip = (triangle_s *)hits[i].hit_private;
1480        BOT_UNORIENTED_NORM(ap, &segp->seg_in, trip->face_norm, IN_SEG);
1481        segp->seg_out = hits[i+1];  /* struct copy */
1482        trip = (triangle_s *)hits[i+1].hit_private;
1483        BOT_UNORIENTED_NORM(ap, &segp->seg_out, trip->face_norm, OUT_SEG);
1484        BU_LIST_INSERT(&(seghead->l), &(segp->l));
(gdb) print segp->seg_in

$35 = {hit_magic = 0, hit_dist = 0, hit_point = {0, 0, 0}, hit_normal = {0, 0, 0}, hit_vpriv = {0, 0, 0},
  hit_private = 0x0, hit_surfno = 0, hit_rayp = 0x0}
(gdb) print i

$36 = 8
(gdb) print hits[i]

$37 = {hit_magic = 543713652, hit_dist = 1.9994999999998984, hit_point = {0, 0, 0}, hit_normal = {0, 0, 0},
  hit_vpriv = {-0.99999999999999978, 0.3333333333333337, 0.33333333333331677}, hit_private = 0x55555721dd18,
  hit_surfno = 1705, hit_rayp = 0x7ffde2bff960}
(gdb) print trip

$39 = (triangle_s *) 0x0
(gdb) print (triangle_s *)hits[i].hit_private

$40 = (triangle_s *) 0x55555721dd18
2024-08-27 15:30:21 -04:00
f4alt 57b5a4cd4d use the param correctly.. 2024-08-27 13:08:27 -04:00
louisgoogl 5def054ea6 small fix 2024-08-26 22:22:32 +02:00
louisgoogl fc1756c4bd implementation of Geometry::addBeamResultant() to creat an extruded beam 2024-08-26 22:14:04 +02:00
louisgoogl ce8f1755de extrude class and some modifications 2024-08-26 11:56:32 +02:00
louisgoogl c37ac63467 SketchClass 2024-08-25 17:05:08 +02:00
Daniel Rossberg 9d8e10cd9c Merge pull request #151 from AliHaider93/Plan_devel_k-g
distinction between command and option: this is a way to make a distinction between a command and it's options, and eventually this is a necessary code to handle all kinds of elements in LS-DYNA
2024-08-24 15:29:03 +02:00
Clifford Yapp b59a4395e8 Test using upstream GeometricTools directly for lseg_lseg
Trying out using the C++ header-only GeometricTools implementation under
the hood of libbg.

We originally translated the code to C for direct embedding, but since
we're now using newer C++ standards in our own code we may be able to
replace all of our embedded copies of the GeometricTools algorithms with
direct usages (as well as leveraging a number of other algorithms
present in the GeometricTools code - in particular, their oriented
bounding box and convex hull implementations may be good candidates to
replace our current 3rd party codes.)

Deliberately starting small to get a sense of the implications, but
leveraging the upstream maintained code in favor of our refactored
copies is desirable - these sorts of problems can be tricky in corner
case scenarios, so it would be advantageous to leverage any upstream
improvements in the algorithms.
2024-08-23 16:29:22 -04:00
Ali haydar 179746c931 Update k_parser.cpp 2024-08-23 20:15:38 +02:00
Ali haydar d2f194d0a5 Update k-g.cpp
The third node will be used later for defining the cross-section plain for beams with asymmetric cross-section
2024-08-23 19:43:02 +02:00
louisgoogl fa697b262a third node will be used later with the other types of sections. 2024-08-23 11:31:51 +02:00
Clifford Yapp 96480fdf0e Note issue in Archer when editing certain comb trees
Looks like there's some sort of Archer specific weakness handling comb trees -
when trying to apply a color, some (but not all) comb trees ended up being
corrupted.  MGED was able to complete the same operation without issue.
2024-08-22 10:45:39 -04:00
louisgoogl ad78397a21 new line 2024-08-21 20:14:34 +02:00
Clifford Yapp ff03a84955 Make note of a BoT raytracing failure with lint
Crash observed trying to run lint on the facetize output of havoc:

facetize -r havoc havoc.bot
lint -V havoc.bot

Crash is in the BoT shotlining code, somehow getting a null trip pointer
at bot.c:1480
2024-08-21 13:57:15 -04:00
Clifford Yapp 1ecaced194 This doesn't fix the BoT lod error, but it should at least avoid crashing. 2024-08-20 15:16:13 -04:00
Clifford Yapp f44a46c71b initialize childnodes, don't realloc if nchildnodes[i] == 0 2024-08-20 15:16:13 -04:00
f4alt a0e7f4de4c prettier spacing with the redraw checkbox gone 2024-08-20 14:59:06 -04:00
f4alt 9b31e3f6ad fix LOD Configuration tool
update LOD configuration tool to reflect 'redraw' subcommand removal
(ab4d33f)
2024-08-20 14:57:14 -04:00
f4alt dd6171742d add simple progress bar feedback
when the execution got moved to gchecker (fdd3918), the progress bar for
this tool essentially became useless. In a perfect world we'd probably
have some sort of signal to poll progress and report back or refactor
gchecker to run one suite at a time. But, tcl doesn't easily accomodate
signal sending, and a refactor would be overkill just for a progress
bar.

In the meantime, give very basic status text to let the user know that
their click is doing *something*.
2024-08-20 11:28:25 -04:00
f4alt 86b9d738bc use -f 2024-08-20 11:28:25 -04:00
f4alt 610a4d64bb smarter default location hunting
gchecker writes the the current working directory - not where the .g
file is
2024-08-20 11:28:25 -04:00
f4alt e49c27e6bd close forgotten fp's 2024-08-20 11:28:25 -04:00
f4alt 72e2e0c243 correctly catch gchecker errors
our raytracing tools log to stderr, which 'exec' treats as an error. So,
use the status plus last error code to determine if gchecker actaully
failed or it was just raytrace logging.
2024-08-20 11:28:25 -04:00
f4alt 7cf2b3ba96 need to close gedp 2024-08-20 11:28:25 -04:00
f4alt c355d377d9 add 'force' flag to gchecker 2024-08-20 11:28:25 -04:00
Clifford Yapp 205965666b Make a note to look into CMinx and see if it might be useful. 2024-08-20 09:17:39 -04:00
Clifford Yapp 7e066eac5c Set up to work on integrating mmesh for decimation. 2024-08-19 17:12:09 -04:00
louisgoogl bb040907bf Pipe clean up 2024-08-19 22:22:14 +02:00
Clifford Yapp 8ca81d575a Revert "Update libbg SPSR to use upstream header-only mode"
Restore older working SPSR code while we try to figure out what we're
doing wrong with the newer code.
2024-08-19 13:51:41 -04:00
Clifford Yapp c36e09e272 Update libbg SPSR to use upstream header-only mode
Not working yet, but we seem to be able to feed our data in using this
approach and get *something* out, so checkpoint now to document how to
use their templates and streams.  Probably can refine this further, but
it does compile and run.

At the moment the decimation routine explodes with a bunch of SHOULD NOT
HAPPEN errors and crashes super hard (brings down the desktop, in fact.)
2024-08-19 13:49:00 -04:00
louisgoogl 7554e0982f export error fix 2024-08-19 18:08:08 +02:00
louisgoogl 9607c363bd Pipe class 2024-08-16 19:49:33 +02:00
Clifford Yapp ead785b0a9 Call out the bext submodule in HACKING steps
Modernizing the release instructions here is still a work in progress,
but call out the submodule update as a step.  Target for testing is now
just distcheck.
2024-08-16 09:40:26 -04:00
Clifford Yapp 1dd104d2f9 merge of RELEASE bfd3384963a to main branch 2024-08-16 09:01:07 -04:00
Clifford Yapp bfd3384963 Update log with commits since 2024-03-18 2024-08-16 08:55:12 -04:00
Clifford Yapp 340a4b200d Update bext submodule to cef79c30221 for Tcl OSX build fix 2024-08-16 08:43:38 -04:00
Clifford Yapp b9d72b66ad Finalize 7.40.0 release date (Fri Aug 16 12:34:59 PM UTC 2024) 2024-08-16 08:35:10 -04:00
Clifford Yapp 35c6709b4a Update log with commits since 2024-03-18 2024-08-15 21:36:10 -04:00
Clifford Yapp 1d32d03cb8 Add local cache vars to mged.sh
Had the local cache set up for the cmake controlled MGED tests, but not
the sh tests - just like with the other tests, that can led to
occasional cache setup/access collision issues when tests running in
parallel all try to manipulate the global cache simultaneously.
2024-08-15 21:35:48 -04:00
louisgoogl e8241067f2 first try with Pipe premative 2024-08-15 13:12:47 +02:00
Clifford Yapp 0273969c03 Adjust approx comparison tols for drawing tests
Couple of these were a little too tight, failing on OSX.
2024-08-14 20:02:03 -04:00
Clifford Yapp 8a4a20a47a Adjust rel tol for libged select drawing test
Mac select test is failing because of trying to tessellate tor at tol
0.0001:

Attempting to triangulate tor...
cut_unimonotone(): infinite loop 0x60000231aac0

cut_unimonotone(): infinite loop

LoD test avoids a similar failure by using 0.0002, so use that.  A
tol rel 0.0001 setting should work (and does on other platforms) so
that's an issue, but for the moment adjust to something that gives us
geometry so we can do the drawing test.

Fallback methods failing is yet another concern - specifically, the way
SPSR decimate fails with bu_mtx_trylock and bu_mtx_lock failures.
2024-08-14 20:01:54 -04:00
Clifford Yapp 8bf9522bfd Try enabling check for OSX on the Github runner 2024-08-14 20:01:17 -04:00
Clifford Yapp 8ad4f1e8f5 Add color and file libbu unit test fixes from main 2024-08-14 20:01:08 -04:00
Clifford Yapp b6d536d93c Explicitly list dbip and get_dbip for deprecation
Tempted to just eliminate them - really shouldn't be used - but they are
exposed as commands so just in case...  MGED uses get_dbip in one place.
2024-08-14 15:22:06 -04:00
Clifford Yapp f593c78063 Limit the get_dbip ugliness to f_db.c
As far as I can tell, this is the only use in BRL-CAD of get_dbip.
Still very ugly usage, but confine it to this file to prepare for
getting rid of libged's dbip/get_dbip command plugin.
2024-08-14 15:16:04 -04:00
Clifford Yapp a248e798bc Adjust approx comparison tols for drawing tests
Couple of these were a little too tight, failing on OSX.
2024-08-14 12:27:47 -04:00
Clifford Yapp bcc2e1dfa6 Adjust rel tol for libged select drawing test
Mac select test is failing because of trying to tessellate tor at tol
0.0001:

Attempting to triangulate tor...
cut_unimonotone(): infinite loop 0x60000231aac0

cut_unimonotone(): infinite loop

LoD test avoids a similar failure by using 0.0002, so use that.  A
tol rel 0.0001 setting should work (and does on other platforms) so
that's an issue, but for the moment adjust to something that gives us
geometry so we can do the drawing test.

Fallback methods failing is yet another concern - specifically, the way
SPSR decimate fails with bu_mtx_trylock and bu_mtx_lock failures.
2024-08-14 12:08:45 -04:00
louisgoogl 9254242990 beam class 2024-08-13 21:46:28 +02:00
Clifford Yapp 9c00040a93 Try enabling check for OSX on the Github runner 2024-08-13 13:46:01 -04:00
louisgoogl 5b1e5adf47 preparations for section type (CST= 1)Tubular (circular only) 2024-08-12 18:13:13 +02:00
f4alt 1a3c4e4018 Werror fixes 2024-08-12 10:36:45 -04:00
Ali haydar 5d25e3d758 Merge pull request #6 from AliHaider93/G_devel_k-g
G devel k g
2024-08-12 15:33:36 +02:00
f4alt c5416cbab7 have summary be useful for objects 2024-08-12 08:15:55 -04:00
louisgoogl 649705ee37 SECTION_BEAM 2024-08-09 19:16:48 +02:00
Daniel Rossberg cf7346899f Merge pull request #153 from AliHaider93/G_devel_k-g
region color: implementation of random coloring for the regions
2024-08-09 19:13:06 +02:00
louisgoogl ee32e3165e ++region_id 2024-08-09 16:55:49 +02:00
Christopher Sean Morrison 9dfd6faf75 fix some more spelling mistakes found in doc files 2024-08-09 02:01:18 -04:00
Christopher Sean Morrison b7bc05d103 scan+fix remainder of easily found app code spelling errors.
fixed over 190 oopsies.
2024-08-09 01:47:18 -04:00
Christopher Sean Morrison e222c61265 scan+fix remainder of easily found app code spelling errors.
fixed over 190 oopsies.
2024-08-09 01:46:59 -04:00
Christopher Sean Morrison cb26e21a9f find more carlisms spelling errors in public headers 2024-08-09 01:11:58 -04:00
Christopher Sean Morrison 69609442c8 remove the print statements.
they can be reconstituted easily enough.  comment on how simple this test actually is, basic sanity check.
2024-08-09 01:00:48 -04:00
Christopher Sean Morrison 63d29d6598 more spelling corrections, done with all our libs 2024-08-08 03:27:58 -04:00
Christopher Sean Morrison c8510ebb04 more carlness. fix a slew of spelling errors in libs. 2024-08-08 02:55:50 -04:00
Christopher Sean Morrison 968e164a9a down to just the lod failures 2024-08-08 02:55:00 -04:00
Christopher Sean Morrison e166cacfc4 channeling my inner carl. fix more spelling mistakes. 2024-08-08 02:47:01 -04:00
Christopher Sean Morrison 9d2acb90f3 need carl. fix handful of spelling errors. 2024-08-08 02:38:00 -04:00
Christopher Sean Morrison 77ba67785d symbols prefixed with underscores are reserved for libc and compilers 2024-08-08 02:24:08 -04:00
Christopher Sean Morrison 8e3b8bbae6 value of marking static, remove unused func.
should be reinstated as bu_str_isdigit() if that route is taken.
2024-08-08 02:09:41 -04:00
Christopher Sean Morrison ab84d9f24e document bu_str_isprint() 2024-08-08 02:06:47 -04:00
Christopher Sean Morrison c9f2bcba81 ws style indent consistency cleanup. make all funcs static. 2024-08-08 01:53:11 -04:00
Christopher Sean Morrison 0f26360add ws 2024-08-08 01:00:07 -04:00
Christopher Sean Morrison 70beb6d3a8 refactor file+dir teardown into a function to ensure clean start.
encountered some build dirs were leaving files around, which can happen when the test fails or the testing is interrupted.  so this ensures we delete what we expect to create if it exists at the very start (as well as at the end when we pass).  that way files will still be there for inspection if/when the test fails (hence no atexit()).
2024-08-08 00:59:34 -04:00
louisgoogl afe6b2a638 some elements 2024-08-07 21:57:08 +02:00
Christopher Sean Morrison 6ed88bc581 vmath arg love too, when it's fastf 2024-08-07 14:29:47 -04:00
louisgoogl 38b1c886ed region_id 2024-08-07 20:26:54 +02:00
Christopher Sean Morrison 62a305e35c more vmath love 2024-08-07 14:16:55 -04:00
Christopher Sean Morrison b696af8313 more vmath, works with fastf_t rgb arrays too 2024-08-07 14:11:39 -04:00
louisgoogl a2a81febac mk_lcomb 2024-08-07 20:09:56 +02:00
Christopher Sean Morrison 36faba58ca floating point sensitivity if we don't actually save the multiplication.
could be improved as this is currently testing round-trip consistency which is not guaranteed as we don't have associative property with floating point math.
2024-08-07 14:09:15 -04:00
Christopher Sean Morrison bb06e53a29 fix bu_file test failure by adapting our test.
test previously assumed we're running on a unix-like filesystem with distinct read/write/execute bits that are set a particular way by default.  this was both wrong for different umask settings as well as different filesystems (e.g., exfat) that are fixed-permissive (akin to immutable 777 everywhere).  thus, changed the test to force the files permissive with an bu_fchmod(777) where we can at least ensure read/write/execute are set (and we can't reliably check if unset after bu_fchmod(000) or variations thereof without knowing the FS).

also added a few more checks to make sure files exist and do not exist at the expected times.
2024-08-07 13:24:08 -04:00
Christopher Sean Morrison 238e63051e make sure the directory was made before proceeding 2024-08-07 12:44:56 -04:00
Clifford Yapp df90b76009 Werror=pedantic
(cherry picked from commit 805c6303e1)
2024-08-05 18:30:56 -04:00
Clifford Yapp 805c6303e1 Werror=pedantic 2024-08-05 16:17:50 -04:00
louisgoogl b2937c3a05 small modifications and element pulley 2024-08-05 22:10:21 +02:00
louisgoogl 63f7dde36b region color 2024-08-05 20:56:55 +02:00
Clifford Yapp 0367adc574 Wrap primary BRLCAD_ExternalDeps logic in a function so it doesn't execute simply by doing the include 2024-08-03 14:33:49 -04:00
louisgoogl 663dfb3f3d handling element beam options 2024-08-03 13:49:33 +02:00
Christopher Sean Morrison ef9220a35b autoformat comments for consistency 2024-08-02 19:41:11 -06:00
Christopher Sean Morrison 46ca92df63 annotate major issues making this file+code exceptionally difficult to read, follow, and maintain. 2024-08-02 19:34:54 -06:00
Christopher Sean Morrison 3dbddcf97e try to say same preamble with less verbosity.
cuts to the essential info a bit more.  Leaving secondary configuration detail (which unfortunately dominates the header) even though this documentation is not really discoverable.  Might be better relcated to HACKING.
2024-08-02 19:22:51 -06:00
Christopher Sean Morrison 7cda3843ae can simplify even a bit more to just notify when going auto. 2024-08-02 18:46:43 -06:00
Christopher Sean Morrison 1dffb07522 simplify BRLCAD_EXT_DIR reporting to improve usability.
there's really only two audiences of concern, someone that doesn't know (the default) and someone that does but needs to be warned in case that wasn't their intention.  Also simply helps to say the same thing in fewer words.
2024-08-02 18:30:34 -06:00
Christopher Sean Morrison 36e8043a5d Revert "bye bye bext"
Didn't realize this is a submodule.  Will have to see if we can document it as such somehow.

This reverts commit 4b5588ddfb.
2024-08-02 15:18:25 -06:00
Christopher Sean Morrison 527f9e5d09 auto ws cleanup 2024-08-02 14:58:10 -06:00
Christopher Sean Morrison cf34d4c45f documented bu_parallel_id and friends better. just a few check failures to go. 2024-08-02 14:53:46 -06:00
Christopher Sean Morrison 69d906dbda document how per-cpu containers and IDs are supposed to work.
disambiguate bu_parallel_id() vs bu_thread_id() a little better too.
2024-08-02 14:53:20 -06:00
Christopher Sean Morrison af04ca7bb4 still not right, got to allocate MAX_PSW.
bu_parallel's interface does not guarantee 0-based or 1-based indexing.  it just happens that some environments will be one thread (e.g., -P1) or the parent process (0) will kick off N threads that end up 1-indexed.  however, an application (or plugin or library) could have kicked off threads in which case per-cpu indexing will be in some arbitrary 0-to-MAX_PSW range.  thus calling sites allocate MAX_PSW even if unused to guarantee lock-free contention and give maximum performance.
2024-08-02 14:36:48 -06:00
Clifford Yapp bd8577d7c6 Allow for 0 or 1 indexing with bu_parallel_id
Got bit by this with the new BoT raytracing - on Windows,
bu_parallel_id() starts counting from 1, so the thread indexing into the
hit array was offset accordingly.  On Linux, however, bu_parallel_id()
DOES return 0 - so that offset generated an invalid index and
segfault.

Simplest approach appears to be to increase the hit array allocation by
1, to allow either indexing approach to succeed.  Additional cost of a
single unused hit container is negligible and avoids any other need for
conditional logic.
2024-08-02 11:15:32 -04:00
Clifford Yapp a2d4fb5cf2 Add a note to check bu_parallel_id indexing 2024-08-02 11:09:45 -04:00
Christopher Sean Morrison 4b5588ddfb bye bye bext 2024-08-01 19:04:53 -06:00
Christopher Sean Morrison 9d0d2d2d49 need to mark the externals SYSTEM or we get warnings/errors on mac 2024-08-01 19:04:53 -06:00
f4alt c98cdfb406 revert 42057b9, fix per-cpu-array accessing
Incorrect diagnosis of the original problem. Access violations were
being caused by a bad method for calculating indices. Using the OS's
thread ID % number_cpus had no guarantee for uniqueness and often
collilde (for example 100%4 and 104%4) - meaning hits were being added
from bot_shot_hlbvh_flat() at the same time they were being sorted in
rt_bot_makesegs().

Proper fix is to use bu_parallel_id(), which is calculated and managed
by bu_parallel.
2024-08-01 13:50:19 -04:00
louisgoogl f4c3d7f897 minor fix 2024-07-31 17:53:56 +02:00
louisgoogl 8d68d75d2c a solution for handling element options 2024-07-31 17:46:34 +02:00
Clifford Yapp 7c387658f5 Do some setup in summary command to get ready to accept object arguments 2024-07-31 10:46:27 -04:00
Clifford Yapp 1de1cbe0a8 Mark summary p, r and g options for deprecation 2024-07-31 09:51:25 -04:00
f4alt 73a01a7039 add some Windows TODOs 2024-07-30 14:02:38 -04:00
f4alt 42057b9758 naive fix for bot raytracing on Windows
with the recent hlbvh work merge, Windows raytracing for bots was
broken. This was caused by indices being based on the current thread id
(gathered with bu_thread_id()). On Windows, the thread ID is often
recycled from recently closed threads which means indexing into the
hit_array is not guaranteed unique. This lead to bad rt images and
memory access vioations.

To temporarily fix the issue, we need to allocate the hit_da container
on the stack before doing shot calculations. This will almost certainly
have some form of performance implication but the extent has not yet
been tested.
2024-07-30 13:44:22 -04:00
Clifford Yapp 0eef223c34 Make valgrind on Ubuntu happy by doing some initializations 2024-07-30 11:11:45 -04:00
Clifford Yapp e91c0585f4 Not sure if it's a libdm issue per-say, but add some notes to look into Zink and VulkanSceneGraph. 2024-07-29 21:22:11 -04:00
f4alt 79ddee2fd9 fix signedness comparison 2024-07-29 13:54:26 -04:00
f4alt f70a0777a2 fix flat search + exec bug
when doing a flat search with | in mged, the path was being built with
db_path_to_string which always assumes the path is starting from the
root - and therefore prepends a forward slash. However, this is not
always the case. Bug was noticed when using a 'search | .. -exec ..' as
the exec inputs would have a leading slash and would break.
2024-07-29 11:47:02 -04:00
f4alt 863e431bf3 add some unit tests for db_search
stand up some basic db_search tests in librt. Nothing terribly
exhaustive yet, but this provides a baseline / entry point for
more tests
2024-07-29 11:47:02 -04:00
joshbaker22 e543412ea1 Update tol.xml - dist specified in mm
update man page to show dist specified mm not model units
2024-07-29 09:21:57 -04:00
louisgoogl 76faea6e56 distinction between command and option 2024-07-27 18:03:43 +02:00
Christopher Sean Morrison 00d89932ed break up the wall and document a bit 2024-07-26 22:19:02 +00:00
Christopher Sean Morrison 76b215abe8 document BRLCAD_EXT_PARALLEL since parallel bext builds are not yet reliable (Tcl chokes) 2024-07-26 22:19:02 +00:00
Clifford Yapp b4de1517ab Needs to be ON, not just defined 2024-07-26 17:05:18 -04:00
Clifford Yapp ac2ff509ea Allow for the possibility of a Doxygen-only configure so we don't have to build bext 2024-07-26 17:02:45 -04:00
Clifford Yapp 306d8c9e3d Update mirror script to update pre-existing clones, if present 2024-07-26 11:21:01 -04:00
Clifford Yapp daf20816b1 Stash a script to pull mirrors of all BRL-CAD git repos 2024-07-26 10:21:27 -04:00
Clifford Yapp ebd29ac66c Bump version numbers in main to next dev cycle 2024-07-26 09:36:27 -04:00
Clifford Yapp f01665b529 Another MSVC build fix 2024-07-25 22:42:03 -04:00
Clifford Yapp 0a3aef7db7 Compile adjustments for MSVC and OSX 2024-07-25 20:00:42 -04:00
Clifford Yapp 31a6e91526 Update log with commits since 2024-03-18 2024-07-25 16:58:58 -04:00
Daniel Rossberg 91dd7c940f Merge pull request #147 from AliHaider93/G_devel_k-g
introducing the Geometry class with Arbs and Bot
2024-07-25 22:28:07 +02:00
f4alt 4568e2f572 need to launch subprocess with env vars
in funky build environments, where we had to build with specific env
variables set, we need to make sure to propagate said variables
2024-07-25 16:07:43 -04:00
f4alt 59aee1100e cherry pick fb84643cbd: need to launch subprocess with env vars
in funky build environments, where we had to build with specific env
variables set, we need to make sure to propagate said variables
2024-07-25 16:07:24 -04:00
Clifford Yapp e4901e40ca Get lh BoTs rendering. This also gets regress-bots passing. 2024-07-25 16:05:05 -04:00
Clifford Yapp 4105bd4dc9 Revert "Back out the hlbvh changes - breaking regress-bot."
This reverts commit f5f0149868.

Going to try an adjustment to bot prep for lh bots
2024-07-25 15:54:13 -04:00
louisgoogl 3047c284ba size_t 2024-07-25 20:25:00 +02:00
louisgoogl e3a7761cdd reference 2024-07-25 20:19:28 +02:00
louisgoogl e35da3b725 small fixes 2024-07-25 19:16:34 +02:00
Clifford Yapp f5f0149868 Back out the hlbvh changes - breaking regress-bot. Doing this in a single commit so it can easily be restored. 2024-07-25 11:01:51 -04:00
Clifford Yapp 5d61e3d994 Add header for bg_isect_tri_ray 2024-07-25 10:48:03 -04:00
Clifford Yapp 6a919c6684 Merge pull request #126 from ianebeckett/hlbvh-PR
Replace tooled system with faster system (HLBVH) for BoT ray tracing
2024-07-25 10:44:14 -04:00
Clifford Yapp d0f37fd7a5 Merge branch 'main' into hlbvh-PR 2024-07-25 10:42:20 -04:00
Clifford Yapp 66a37b84f7 Allow perturbing of arbn as well 2024-07-24 18:39:03 -04:00
Clifford Yapp 8086c0e172 Take the perturb routines for a test drive with qged.
Not a cure-all, apparently, but potentially useful none the less.
Working with r.ant5 from havoc, perturbing the primitives and then
facetizing produces a bot that still won't pass lint, but seems to have
fewer failures.  Following up with bot strip, bot repair and bot
decimate was able to get to a clean BoT.
2024-07-24 17:48:52 -04:00
Clifford Yapp 53e78aca3a Fix ctrl images 2024-07-24 13:24:23 -04:00
Clifford Yapp 5bdd73cd1c rt_arb_calc_planes assumes a non-NULL vls 2024-07-24 13:15:04 -04:00
Daniel Rossberg 1ed4ce5dbd Merge pull request #150 from AliHaider93/CaseInsenstive_devel_k-g
small tweak: one line fix
2024-07-24 18:59:21 +02:00
Clifford Yapp 8707219093 Re-enable arb perturb adjustment 2024-07-24 12:38:59 -04:00
Clifford Yapp 9c7f2f3f7b ARBN keeping us honest again - bg_plane_pt_nrml needs to be synced with the other functions 2024-07-24 12:31:46 -04:00
louisgoogl 6270203e5a one line fix 2024-07-23 16:41:27 +02:00
joshbaker22 b196c36d9f Update facetize.xml - add note about tolerances
Add note about tolerance and direct users to tol man page.
2024-07-23 09:54:57 -04:00
joshbaker22 63b07e9026 Update tol.xml abs in mm
adjust note in man page stating that absolute tolerance is specified in model units (testing shows it is specified in mm)
2024-07-23 09:26:24 -04:00
Clifford Yapp b1995c437f Clear a few static analyzer warnings 2024-07-22 20:22:29 -04:00
louisgoogl 49240327d3 VMOVE 2024-07-22 21:09:08 +02:00
louisgoogl e31eb950ef AddArb 2024-07-22 21:00:24 +02:00
Clifford Yapp 7b4f444a73 Make various corrections to polygon and projection logic
Hello rabbit hole.  When trying to construct ARBN primitives from ARB8
primitives, found a problem with the closest point calculation that was
being masked in other use cases.  Also saw an issue where passing
point_t rather than a pointer to the point_t was causing a problem.

Correct the libbg plane/point unit tests, updated a few of the ell
drawing images which were showing pixel differences after fixing the
projection issue, and verified the qged polygon drawing works.
2024-07-22 11:15:48 -04:00
louisgoogl 8066eef426 arb4...arb7 2024-07-21 23:24:08 +02:00
louisgoogl 250d14f024 cleaning 2024-07-21 22:30:03 +02:00
Clifford Yapp 3bb2f40fe9 OK. Able to (finally) generate valid ARBN primitives, but still some unanswered questions. 2024-07-19 23:36:12 -04:00
Clifford Yapp 9d95c0fbba Use mk_rcc, start setting up to look at arb8 (not working yet) 2024-07-19 17:09:21 -04:00
Clifford Yapp b0a7fbfa3e Set up some logic to exercise perturb code. Just tgc so far. 2024-07-19 16:42:13 -04:00
Clifford Yapp 644c59c350 Checkpoint some exploratory perturbation work
Thinking about how bumping the primitive parameters might work, using
tgc and arb8 as the initial focus (those are likely sources for coplanar
faces in models - of 2429 primitives in havoc.g, 2137 are either tgc or
arb8.)
2024-07-18 16:10:15 -04:00
Clifford Yapp cc0dd1cecd Stub in a functab entry for a perturb function 2024-07-18 11:24:10 -04:00
Clifford Yapp 55fb3fb422 Add a note to look into what we can do to automatically tweak solids out of coplanarity. 2024-07-18 10:34:49 -04:00
Clifford Yapp c57b317034 Add a note to look into updating our SPSR code 2024-07-18 10:10:08 -04:00
Clifford Yapp 77f5306b46 Update log with commits since 2024-03-18 2024-07-17 06:39:59 -04:00
Clifford Yapp 2a56cc62e6 Merge branch 'main' into RELEASE 2024-07-17 06:39:17 -04:00
f4alt 85c1163f18 triVerts is ivec3 2024-07-16 17:15:33 -04:00
Clifford Yapp 91ae60c3c1 Update log with commits since 2024-03-18 2024-07-16 16:48:05 -04:00
Clifford Yapp 9321b2c5b6 Bump version number to rel 7.40.0 2024-07-16 16:45:50 -04:00
Clifford Yapp e4ff72b031 Add an option to calcuate the Hamming approximate image diff metric with imgdiff 2024-07-16 15:10:17 -04:00
Clifford Yapp aad38d8dd6 Adjust NEWS text 2024-07-16 14:40:08 -04:00
f4alt d630d086bb document 464355de76 2024-07-15 18:02:50 -04:00
f4alt 464355de76 cleanup of primitive naming
strip debugging extensions adding to primitive names.

NOTE: raw_grouping_name is guaranteed unique from obj_groups(), so we
should not hit any trouble copying this value directly
2024-07-15 17:59:47 -04:00
Clifford Yapp d55a45ebf9 Rework NEWS paragraphs 2024-07-15 16:01:33 -04:00
Clifford Yapp 481c8d1166 Add basic man page for gist 2024-07-15 15:57:15 -04:00
louisgoogl 2df94d19af dot 2024-07-15 21:43:39 +02:00
Clifford Yapp cfabd5e7fa facetize volumes tested with havoc, bext updated, gist changes merged. 2024-07-15 14:50:46 -04:00
Clifford Yapp 31d19444e5 More adjustments to INSTALL test. Sean mentioned we should phase out aliases for options - not doing that for this release, but when we do it'll be a good opportunity to clean up this file's discussion of options as well. 2024-07-15 14:49:56 -04:00
Clifford Yapp 98ce3c3e80 List old sources for CMake 2024-07-15 14:36:04 -04:00
Clifford Yapp be016d3c9f Add previous facetize logic back in as facetize_old
Because the new facetize system is such a radical departure from older
codes, add the 7.38.2 facetize logic to have as a backup under the
command name facetize_old.  This can go away as we get more confidence
in the new setup, so it's not being announced as a command per-say, but
it will be available to try if the new logic isn't working for some
reason.
2024-07-15 11:58:25 -04:00
louisgoogl 1f8fad791f updated Names 2024-07-14 22:25:58 +02:00
Daniel Rossberg 179ef2eade Merge pull request #146 from AliHaider93/CaseInsenstive_devel_k-g
made keyword evaluation case insensitive
2024-07-13 16:01:36 +02:00
Clifford Yapp 3da2810326 Update bext SHA1 to c03b2bd41c to get install of android_uuid/uuid.h 2024-07-13 00:50:39 -04:00
Clifford Yapp 8aa3f15156 clang needs to suppress some OpenNURBS warnings as well 2024-07-13 00:50:03 -04:00
Christopher Sean Morrison 9da0b358f7 missing algorithm for std::find 2024-07-13 04:03:43 +00:00
Christopher Sean Morrison b9f6e15e72 gcc14 found memory issues, curious 3char buffers 2024-07-13 04:03:21 +00:00
Christopher Sean Morrison b2dbe503eb still had a comment about 3-lights, restore but reworded 2024-07-12 23:48:41 -04:00
Christopher Sean Morrison 8c9123985d restore the 3-light lighting option 2024-07-12 23:48:41 -04:00
Clifford Yapp 9911d5232e Update bext SHA1 to ffbeab6 - need -latomic with geogram for clang 2024-07-12 20:50:03 -04:00
Clifford Yapp 695f70c476 Correct function name 2024-07-12 19:20:37 -04:00
Clifford Yapp 8df0b0ff0c Call out GDAL and OpenCV library updates
We'll need to figure out some other way to communicate dependency
version bumps when Appleseed comes online, given the number of
dependencies that will add, but for now just call out the major ones in
current use.
2024-07-12 18:33:39 -04:00
Clifford Yapp c92b011870 Do some work on INSTALL - not done yet. 2024-07-12 16:25:31 -04:00
Clifford Yapp ff53838c6d Start working on intro paragraphs. INSTALL needs work as well. 2024-07-12 15:39:01 -04:00
Clifford Yapp ed8382d618 Update BRL-CAD bext submodule to 541f65e180 - add static lib to lmdb build 2024-07-12 14:32:08 -04:00
Keith Boman 512ae7a262 Included LOD check for BREPs 2024-07-12 14:13:30 -04:00
Keith Boman fd30f50734 Added "exists" as option to "view lod cache [clear [all_files] | exists]", used to test if cache already exist, return BRLCAD_OK when it does exist else BRLCAD_ERROR 2024-07-12 14:13:23 -04:00
Keith Boman 7d15b2152a Added timing output of lod cache build 2024-07-12 14:13:16 -04:00
Clifford Yapp b6e579b97b Remove nmg.h include from rt/geom.h
knot_vector is defined in nmg.h, but its use in rtgeom isn't related to NMG.
It's simple, so just define it directly for the seg purpose it is used for
here and avoid the unnecessary nmg coupling.
2024-07-12 12:04:07 -04:00
f4alt 1ef4ef7b5f fix last name spelling[F 2024-07-12 09:59:09 -04:00
f4alt 3893f7b195 credit TAMU Fall capstone student work on gist 2024-07-12 09:55:50 -04:00
louisgoogl 71473a5142 pssing a refernce to Geomtry so I don't delete the objects twice which will cause memory access error 2024-07-12 15:11:42 +02:00
Clifford Yapp b5f763dcf6 Update BRL-CAD bext submodule to 6f3de9da78c - this has the newer opennurbs and other dependency updates. 2024-07-12 08:23:41 -04:00
Clifford Yapp 8197b0c01c Update OpenNURBS version 2024-07-12 08:20:32 -04:00
Clifford Yapp 863ddc4234 bot repair is new, so we don't have to call out man page update - covered by announcing new command. Chris helped with -or fix, wasn't just me. 2024-07-12 07:47:12 -04:00
f4alt 6ff9a642b0 document 8905498 / 65ff012 2024-07-12 00:37:19 -04:00
f4alt 642710564e document 9aecfc0 2024-07-12 00:37:19 -04:00
f4alt 0d9bcc3518 document b1084e5, ff7582f 2024-07-12 00:37:19 -04:00
f4alt dcd4f9f42c document 9fe5b5d 2024-07-12 00:37:19 -04:00
f4alt 2063742c55 document 98ebf82 2024-07-12 00:37:19 -04:00
f4alt c065839e84 document 7a5adee 2024-07-12 00:37:19 -04:00
f4alt 65dbf7b185 document 34c8a63 2024-07-12 00:37:19 -04:00
f4alt 35980cb8fc add TODO for imgdiff validation 2024-07-12 00:37:12 -04:00
f4alt b21f94d8b3 document 3c226c8 2024-07-12 00:35:48 -04:00
f4alt 022cc1cee5 document a439807, 17c8e15 2024-07-12 00:35:48 -04:00
Clifford Yapp 57c27a39d2 Fail early and hard if we can't process a region. 2024-07-11 17:17:56 -04:00
Clifford Yapp 71f33e4f1b Optimize how we process per-region facetizations
We were treating each region like a complete conversion, but we don't
want to do that - it's inefficient and launches too many subprocesses.
Instead, handle all the solids up front and then handle just the boolean
evaluations individually.
2024-07-11 15:59:58 -04:00
Clifford Yapp 29134ef5e2 Allow for disabling the bext library staging
In situations where the LIEF rpath management isn't working, the
BRLCAD_DISABLE_RELOCATION variable can be enabled to disable the bext
setup process.  This will make it the responsibility of the developer to
set all necessary variables on the configure line so BRL-CAD can find
the necessary components for building.
2024-07-11 14:05:48 -04:00
Clifford Yapp 0f5c765789 List specific files to target for GTE testing 2024-07-10 16:36:55 -04:00
louisgoogl e22e89fc43 a conseptulization of geomtry.write() still need to modify arb.write() so I don't name the arbs twice 2024-07-10 17:55:11 +02:00
Clifford Yapp 9c66fd8a28 Make a note to leverate bext to use Geometric Tools directly for algorithms and removing our translations of a few of them to vmath.h types. 2024-07-10 11:42:34 -04:00
Clifford Yapp 5f2d2b0e56 fix spelling 2024-07-10 11:42:34 -04:00
f4alt f00837bd41 more intuitive search string for finding regions 2024-07-10 11:38:55 -04:00
f4alt 65ff012a74 rework 8905498
we don't want to accumulate state since stacked expressions before the
or should be and-ed.

This is not a full revert, as we do need to update matched_filters
2024-07-10 11:38:55 -04:00
joshbaker22 28107dc79c re-add updated pinewood car
Added material info, attributes, cleaned up a little.
2024-07-10 10:28:44 -04:00
joshbaker22 270acd3ba7 Delete db/pinewood.asc
deleting/updating pinewood car
2024-07-10 10:28:11 -04:00
f4alt 8b084a09f2 triVerts are ivec, not vec 2024-07-09 15:33:23 -04:00
louisgoogl 514d959bb9 getNames 2024-07-08 19:35:26 +02:00
louisgoogl 9ee645233e toupper 2024-07-07 22:15:45 +02:00
louisgoogl 86e96b0543 Geomtry class 2024-07-05 16:45:50 +02:00
louisgoogl c30bebc194 Case insensitive keywords 2024-07-04 17:59:42 +02:00
Christopher Sean Morrison bde47029cf force frameworks last so mac build finds bundled 2024-07-03 02:58:33 -04:00
Clifford Yapp a5c36c47ce Note obj-g importer attr setting as well. 2024-07-02 15:47:11 -04:00
Clifford Yapp e4f143c767 Like STL, need to update libgcv OBJ reader as well to set importer attribute 2024-07-02 15:45:08 -04:00
Clifford Yapp 6a35f04050 Set importer attribute for obj-g as well 2024-07-02 15:41:38 -04:00
Clifford Yapp 258af10943 Note improvements to stl-g importer 2024-07-02 15:34:48 -04:00
Clifford Yapp 09ea051def Also update libgcv STL reader (really need to consolidate stl-g and libgcv stl reader...) 2024-07-02 15:33:03 -04:00
Clifford Yapp 3f82f9999c Set importer attribute on stl-g BoT solids 2024-07-02 15:10:09 -04:00
Clifford Yapp 7ecf01ce0a Update stl-g object naming
Use some of the VLS simplification and cleanup routines we've developed over
the years to improve stl-g object naming.  Also, per user request, skipping
text inside < > bracketing when making object names.

Switching solid and region names from using prefix (s. and r.) to suffix (.s
and .r) naming conventions.  These extensions are often viewed similarly to
filename extensions (and using suffixes has the advantage of allowing
bu_path_component to break down the names as well.)
2024-07-02 15:01:42 -04:00
Clifford Yapp 09824e622a Adjust 3dm-g import attribute for consistency,clarity
Josh asked if we could make the attribute assigned when importing geometry
consistent - Creo plugin is using importer, so let's go with that for 3dm-g as
well.  Also, store the name of the converter and don't use spaces in the value.
2024-07-02 11:19:15 -04:00
Clifford Yapp 467563d5e9 Initialize logging vls containers 2024-07-01 18:35:29 -04:00
Clifford Yapp cfbd9f24ef Try to support using libnmg booleval both for BoT output and regions mode - user report is that libnmg booleans sometimes give better output for coplanar cases (when they succeed) 2024-07-01 12:27:12 -04:00
f4alt 2489787b64 fix compiler warnings 2024-07-01 12:05:54 -04:00
f4alt 077bdd2da2 remove extra space 2024-07-01 12:03:45 -04:00
f4alt 2082de66b1 better GUI window behavior
use cv::WINDOW_NORMAL so window can be resized

replace destroyWindow with destroyAllWindows so that the window 'X'
button can be used
2024-07-01 11:03:47 -04:00
f4alt 77f7e225d9 minimize reporting, explicitly pass size 2024-07-01 11:03:46 -04:00
f4alt daefb49ba6 rework getVerificationData
this was horribly ineffecient
2024-07-01 11:03:46 -04:00
f4alt 0fc3cc0dd2 dont recalculate bb
store bb dimensions with the component the first time they're looked up.
2024-07-01 11:03:46 -04:00
f4alt 5fbf6bd4e3 adjust 'search' gathering logic
use db_search instead of ged_exec.
search results should reflect the reports main model - not the entire
file
2024-07-01 11:03:46 -04:00
f4alt 83c7852d4c use number of unioned objects as entity metric 2024-07-01 11:03:46 -04:00
f4alt 6237786e3e use tops to get top-level objects 2024-07-01 11:03:46 -04:00
f4alt 19f57e930b make it clear this is getting bounding box volume
make output getting more efficient
2024-07-01 11:03:46 -04:00
f4alt 4236959b9e use 'exists' for existance check 2024-07-01 11:03:46 -04:00
f4alt f652c6a7d1 bundle with transparent logo instead of white bg
remove some of the noise created around manually masking out the
background with opencv by supplying a transparent background logo.
2024-07-01 11:03:46 -04:00
f4alt 9bffe1bec8 leverage image transparency if we can 2024-07-01 11:03:46 -04:00
f4alt a841abba61 minimize redundant code 2024-07-01 11:03:46 -04:00
f4alt e2b2983c10 improve background removal
checking the pixel in the copy loop was doing strange things with
reflections / lighter parts of an image. Use thresholding at the
beginning of the operation - utilizing the alpha channel to separate
object from background.
2024-07-01 11:03:45 -04:00
f4alt b5f1934a60 need this so images dont get distorted 2024-07-01 11:03:45 -04:00
Clifford Yapp 956093c242 Sanity check commandLine 2024-06-28 19:56:22 -04:00
Clifford Yapp dd0cfbd3da Sanity check tess_run inputs 2024-06-28 19:48:26 -04:00
Clifford Yapp ea9afc474d ncolors sanity check 2024-06-28 19:46:57 -04:00
Clifford Yapp 800eb50bb2 Make sure we've got bot before we look for faces 2024-06-28 18:51:26 -04:00
Clifford Yapp 1a28cfb78f Validate function pointer is non-NULL 2024-06-28 18:49:26 -04:00
Clifford Yapp 8905498040 Fix filter return settings for search -or case
Chris noticed a problem with the db_search return value when using the
-or filter - numerical return values were order dependent.  Bookkeeping
of the return values in the f_or loop processing was incorrect - we were
zeroing out if the last filter didn't match, when what we need to do is
track if any of the filters was successful and report accordingly.
2024-06-28 11:28:20 -04:00
Clifford Yapp a028ae8d47 Grr. GCC 12 doesn't seem to be properly respecting the multiple pragma diagnostic calls 2024-06-27 15:57:01 -04:00
Daniel Rossberg 7b5524c49c Merge pull request #144 from AliHaider93/devel_k-g
read files written in different formats

In a key file there are multiple places where the format might be determined. This patch evaluates these places and handles the different formats.
2024-06-27 19:25:17 +02:00
Clifford Yapp 5af26f4659 Another warning suppression for OpenNURBS headers 2024-06-26 14:24:52 -04:00
Clifford Yapp aa802bc004 Adjustments to OpenNURBS logic, preparing for v8.8 update 2024-06-25 16:41:18 -04:00
joshbaker22 9aecfc032c Add back pinewood.asc
cleaned up the file
2024-06-25 12:38:26 -04:00
joshbaker22 86a304564e Delete db/pinewood.asc
replacing with cleaned up version
2024-06-25 12:38:01 -04:00
f4alt 14c0211f25 format numbers with commas 2024-06-25 09:40:05 -04:00
f4alt 4bb16a2960 remove weird space 2024-06-25 09:40:05 -04:00
f4alt ea659c9e64 better pattern for dimension printing 2024-06-25 09:40:05 -04:00
f4alt b3eb2e7b26 don't strip file extension from top banner 2024-06-25 09:40:05 -04:00
f4alt 652d877c91 better input not found error message 2024-06-25 09:40:05 -04:00
f4alt 5ce2e0d4a7 make options extension hint better 2024-06-25 09:40:05 -04:00
f4alt c8cc28313b don't create DETAILED render multiple times 2024-06-25 09:40:05 -04:00
f4alt 099a90fb6e verbose printing got muddied in the merge
Add back in, and clarify, progress printing.
2024-06-25 09:40:05 -04:00
f4alt 253a622f74 don't explicitly escape the command string
This really confused execvp.
The surrounding quotes are only needed on Windows - but this is
accounted for in bu_process_create
2024-06-25 09:40:05 -04:00
f4alt 26444ac57e need to collect output - else linux throws SIGPIPE 2024-06-25 09:40:05 -04:00
f4alt ae398e7e81 fix logic - only delete if the file was found 2024-06-25 09:40:05 -04:00
f4alt 7f839a22a5 linux doesn't work with escaped quotes
need to verify this doesn't break Windows
2024-06-25 09:40:05 -04:00
Clifford Yapp ba35fca584 Restore DEBUG workaround for common.h+opencv
Looks like 7dcf5938f commit's workaround for debug_build_guard namespace
issues with DEBUG didn't survive the merge - restore.
2024-06-24 10:42:23 -04:00
Christopher Sean Morrison ef6173369d good idea, unprefix option. (scr 3688) 2024-06-24 10:32:10 -04:00
joshbaker22 eefabe8cee Update helplib.tcl id->ident
standardize language of region id -> ident
2024-06-24 10:26:58 -04:00
joshbaker22 ff7582f2ce Update help.tcl update edcodes - standardize "ident" instead of id
Use ident where appropriate so help statements are better searchable
2024-06-24 10:10:50 -04:00
joshbaker22 b1084e5f06 Update edcodes.xml add flags
add -r and -i flags. Do not quite understand what -E or -n does so I skipped them for now.
2024-06-24 09:59:30 -04:00
joshbaker22 9fe5b5d13e Update mvall.xml (-n explanation)
add -n explanation
2024-06-24 09:37:59 -04:00
louisgoogl 9a6f3722d9 cleaning up 2024-06-23 21:59:14 +02:00
Clifford Yapp 2ab496443f Remove incomplete comment for OSX clang 2024-06-21 17:09:33 -04:00
Clifford Yapp c2122a719c Add TEST.png to CMake files list 2024-06-21 17:06:57 -04:00
Clifford Yapp bccfabf01d Rough script to compare facetize output areas and volumes from two different MGEDs. 2024-06-21 12:14:21 -04:00
Clifford Yapp 5098b0128a Minimize platform ifdefs in gist code (needs testing) 2024-06-21 07:06:34 -04:00
Clifford Yapp fd24676761 Tweaks to get comparisons working - perf and prep seem to just be measurements rather than comparisons? 2024-06-20 18:43:38 -04:00
Clifford Yapp f8a28a71a2 Victor noticed the 3dm-g error message is misleading in the case of an incorrectly specified filename - fix. 2024-06-20 16:10:28 -04:00
Clifford Yapp 10af6c1716 Pass correct dpa cnt variable to _ged_facetize_booleval 2024-06-20 13:41:18 -04:00
Clifford Yapp e487fa1598 If a -r facetize doesn't have any regions, just do a normal facetize instead. 2024-06-20 11:37:27 -04:00
Clifford Yapp 69a29a3504 List options in facetize man page 2024-06-20 11:28:15 -04:00
Clifford Yapp 7b5141217a whitespace 2024-06-20 10:46:29 -04:00
Clifford Yapp f69c1cffe6 Compile fixes for Linux 2024-06-20 10:29:38 -04:00
Clifford Yapp ecd983ab16 Add 7.40 release TODO items 2024-06-20 09:57:37 -04:00
Clifford Yapp e21cbe5a96 Move rtarea and concave arb8 TODOs down one iteration 2024-06-20 09:57:37 -04:00
Clifford Yapp fb7bd53910 ged_tessellate rework complete 2024-06-20 09:57:37 -04:00
Clifford Yapp c6c1690275 Merge pull request #104 from samhollenbeck/fall-2023-gist-capstone
Fall 2023 Gist (A&M Capstone)
2024-06-20 09:56:44 -04:00
Clifford Yapp 505be66656 Fix counting logic for obj reporting 2024-06-18 16:29:42 -04:00
Clifford Yapp f8d330983e Checkpoint work updating facetize man page
Still need to document all the options
2024-06-18 16:21:05 -04:00
louisgoogl b46cf185e2 modifications for comma separated files and non default only format 2024-06-18 20:43:04 +02:00
f4alt c804419ea1 Merge branch 'main' into gist_pr 2024-06-18 13:25:59 -04:00
f4alt 000132e8bb flexible BRL-CAD logo for gist report
don't hardcode a relative path to the BRL-CAD logo. Instead, we need to
install into the DATA directory and use bu_dir to find it on each run.

The image needs to be .png instead of .jpg for opencv support on
all platforms.
2024-06-18 13:12:49 -04:00
Clifford Yapp 034f24ac0d Fix help printing for methods 2024-06-18 12:56:01 -04:00
Clifford Yapp db51309e34 Update facetize TODO - per suggestion from Sean, should compare volumes on original facetized outputs vs new outputs. 2024-06-18 12:39:43 -04:00
Clifford Yapp 23158962ed Revert "Start thinking about how to validate a facetized geometry against its original source."
This reverts commit a55df9ae42.
2024-06-18 12:35:05 -04:00
Clifford Yapp a18a4cd1bb Revert "Checkpoint"
This reverts commit 4bd3b20870.
2024-06-18 12:34:30 -04:00
Clifford Yapp 4bd3b20870 Checkpoint 2024-06-18 12:34:21 -04:00
f4alt a395ca727a style cleanup 2024-06-18 10:54:20 -04:00
Clifford Yapp 77d8b70e3b Add note on view update cycle. 2024-06-18 08:46:59 -04:00
Clifford Yapp 9c5b2beede Stash diagram trying to lay out qged signal/slot setup 2024-06-18 08:44:28 -04:00
Clifford Yapp a55df9ae42 Start thinking about how to validate a facetized geometry against its original source. 2024-06-17 19:13:19 -04:00
Clifford Yapp faceec1d3b Writing out failed and fallback combs 2024-06-17 18:42:26 -04:00
f4alt 4d059fa362 add back logo and owner option settings 2024-06-17 17:40:21 -04:00
f4alt 81ef42b4fd GetUserNameEx is not part of standard Windows API
Ex is only part of the Windows security API which is not linked with
WinBase. Including it would only gain slightly improved username
formatting - which we're not utilizing anyhow. Instead, let's only use
the base supplied GetUserName function.
2024-06-17 16:19:26 -04:00
Clifford Yapp 7a0c8f1d14 Summary printing logic is the same, refactor 2024-06-17 16:10:34 -04:00
Clifford Yapp 0cdf90939d Do the summary for non-region mode as well. 2024-06-17 16:04:14 -04:00
f4alt 40e8bcd8c9 fix compilation. Use the correct getters here 2024-06-17 15:56:10 -04:00
f4alt 1343702b3b fix getVerificationData
add back in error checking for density information for volume and mass
2024-06-17 15:54:24 -04:00
f4alt d5ea740357 make sure image loads before attempting to draw 2024-06-17 15:46:40 -04:00
Clifford Yapp 79d974b13e Tag primitives that don't convert so we can report and group them. 2024-06-17 15:28:46 -04:00
Clifford Yapp 84b430b6f6 Make combs holding the objects that used various methods. 2024-06-17 13:44:34 -04:00
Clifford Yapp f2eab53290 Put NMG check in correct line 2024-06-17 13:22:30 -04:00
Clifford Yapp e8b653e52b Don't want verbosity check here 2024-06-17 13:19:55 -04:00
Clifford Yapp c797cbb1a1 Adjust reporting, flag plate->vol 2024-06-17 13:08:41 -04:00
Clifford Yapp c0d6efe410 Remove duplicate message 2024-06-17 12:38:51 -04:00
Clifford Yapp 886a1ab84f First rough cut at getting information on processing details from the working file 2024-06-17 11:43:03 -04:00
Clifford Yapp 406e856a75 Only include opt header where we need it 2024-06-17 11:16:14 -04:00
Clifford Yapp aab75b2fae Rename directory 2024-06-17 11:06:53 -04:00
Clifford Yapp 7816304313 Updated logging system for facetize 2024-06-17 09:58:52 -04:00
Clifford Yapp 8cb4d09377 Fix comment 2024-06-17 09:58:08 -04:00
louisgoogl 090faa81d1 split_key and nodehalfline 2024-06-17 14:40:33 +02:00
Clifford Yapp 0af151b27c Validate the repair results, only use clean output
The bot repair routine doesn't always manage to produce an output that
satisfies the thin bots check, even when it produces a manifold output.
Check the repaired output, and only replace the original manifold result
with the new BoT when it passes the thin faces check.  Note in the
verbose log what happened.

We need to be more aggressive in the librt routine - filtering out
first-hit misses results in our not seeing some problems that the repair
routine can handle (the havoc windows are a case in point.)
2024-06-14 20:35:34 -04:00
Clifford Yapp be376bc3e2 We want to write to the file immediately, in case something goes wrong. 2024-06-14 14:47:58 -04:00
Clifford Yapp 5ff3c7b76a If we're resuming a conversion, we'll want to append rather than overwrite the log 2024-06-14 14:36:32 -04:00
Clifford Yapp 6574ff66c5 Add a way to turn off the bot_fixup step - in case the repair logic has trouble with an input, we need a way to skip it and get whatever output the other routines can generate. Even if it's not usable as-is, the unaltered output may be the best starting point for repair work. 2024-06-14 14:35:58 -04:00
Clifford Yapp 1cb18f4812 Validate triangle first before doing a thin check 2024-06-14 14:26:55 -04:00
Clifford Yapp 5c5196c59f Report more verbosely on boolean status 2024-06-14 13:04:00 -04:00
Clifford Yapp ee9ebc44fd Start working on new logging setup for facetize. 2024-06-14 12:53:05 -04:00
louisgoogl 9bf69c7942 draft realted to formats 2024-06-14 14:11:04 +02:00
Clifford Yapp 5900293a78 Revert - not doing something right 2024-06-13 16:51:19 -04:00
Clifford Yapp 46e2428165 See if bulk dequeue helps performance 2024-06-13 16:45:06 -04:00
Clifford Yapp fad44297d9 Start getting set up to do verbose logging to a file 2024-06-13 15:57:06 -04:00
Clifford Yapp f6dec22f9f Missed a regression test for local cache dir setup 2024-06-13 15:50:39 -04:00
Clifford Yapp 4c6f444228 If BU_DIR_CACHE env var is in use, don't modify it - use as specified. 2024-06-13 15:33:08 -04:00
Clifford Yapp 3152630b94 Note new lint capabilities for BoT checking 2024-06-13 14:39:05 -04:00
Clifford Yapp e9d562b51e Updated pnts command - default limit for random generation is still 2 million, but if the user asks for more go ahead and try to generate them. 2024-06-13 14:36:57 -04:00
Clifford Yapp f6480d3c35 lint testing is now parallel 2024-06-13 14:32:49 -04:00
Clifford Yapp 3a13bd183f Refactor bot fixup logic from region processing to utility function, conditionally add to general case 2024-06-13 14:21:08 -04:00
f4alt 610501c855 fix handful of auto-merge build errors 2024-06-13 14:10:44 -04:00
Clifford Yapp 0eaa924265 Add missing continue instructions 2024-06-13 13:30:35 -04:00
Clifford Yapp dde13104ee Add repair discussion to the lint man page 2024-06-13 11:39:39 -04:00
Clifford Yapp 396e8ad273 Add example of how to control XML indentation in vimrc 2024-06-13 10:26:47 -04:00
f4alt bae5510b55 Merge branch 'main' into gist_pr 2024-06-13 09:56:04 -04:00
Clifford Yapp e79d562b9c Don't keep shooting a face if a single hit triangle check misses that face 2024-06-12 16:18:59 -04:00
Clifford Yapp fcf61e4109 Get all the BoT lint tests working in parallel
Most of the logic is common between these tests, so refactor to take
advantage of that fact.

When running in a parallel bu_log is wiping out MGED, even on Linux, so
temporarily quell the hooks.
2024-06-12 15:15:55 -04:00
Clifford Yapp ef937e2172 Failure was on the CI end - revert lint backout
Chris McGregor found it - apparently a misconfigured Windows image was
used for the github runners.  See the following issue for more info:
https://github.com/actions/runner-images/issues/10004

Reverts commit 76e46aa9b3.
2024-06-12 12:30:33 -04:00
Daniel Rossberg 007d0fae5e Merge pull request #143 from AliHaider93/devel_k-g
added function to read nodes in standard format
2024-06-12 18:23:45 +02:00
louisgoogl 6cd66781a5 update with comment 2024-06-11 20:28:34 +02:00
louisgoogl 267ce68d06 function to read node standard format 2024-06-11 15:10:07 +02:00
Daniel Rossberg 16f1fc3394 Merge pull request #142 from AliHaider93/devel_k-g
Handling new command key: PART_ADAPTIVE_FAILURE
2024-06-09 18:17:11 +02:00
louisgoogl ac794e1606 bigger or equal 2024-06-09 15:31:58 +02:00
louisgoogl 01cfc8bac7 test rt_db_get_internal updated 2024-06-09 15:02:05 +02:00
louisgoogl 92f004b61a test directory 2024-06-08 22:33:24 +02:00
louisgoogl d85e44937f test rt_db_get_internal() 2024-06-08 22:12:37 +02:00
louisgoogl e0d4b6d098 update pull request 2024-06-07 21:28:51 +02:00
Clifford Yapp 87a4244bdb Correct filename for Geogram find logic to match new expectation. 2024-06-07 10:26:02 -04:00
Clifford Yapp 76e46aa9b3 Hmm. Looks like this broke building on Windows - revert for now 2024-06-07 10:23:01 -04:00
f4alt 31d752769f fix cmake warning
case sensitivity matters for find_package
2024-06-07 09:02:51 -04:00
Clifford Yapp a6cc585920 Hmm. It looks like checking the individual triangles is actually useful... 2024-06-06 22:19:15 -04:00
Clifford Yapp ed347faeb9 print debugging msg after filter 2024-06-06 22:08:46 -04:00
Clifford Yapp 53c315a15e Comments, first stab at collecting working results. 2024-06-06 21:55:05 -04:00
Clifford Yapp c479e132fe Add concurrentqueue license 2024-06-06 20:48:11 -04:00
Clifford Yapp b03fdc466b Checkpoint experimental work on making lint's raytracing based tests parallel using moodycamel concurrentqueue. 2024-06-06 20:43:16 -04:00
louisgoogl 468a80c374 Handling unexpected command *PART_ADAPTIVE_FAILURE 2024-06-06 23:31:51 +02:00
Clifford Yapp 7d7ecd995f Add a simple test to push the numerics of the triangle area calculation 2024-06-05 13:37:13 -04:00
Clifford Yapp 5ae6f188f0 Default to 2 million if no limit is specified, but if the user explicitly requests more go ahead and try it. 2024-06-05 11:08:28 -04:00
Clifford Yapp f296248a7b lint option added, and bot decimate -f does appear to be useful for such cases. 2024-06-05 11:04:02 -04:00
Clifford Yapp 71388eeb8d Add an option to limit lint reporting based on triangle size
We can't do it for all shotlines - if we miss a small triangle somewhere other
than at the shotline origin, we won't know about it in the callbacks - but add
an option to allow users to avoid reporting issues when the source triangles
have a small area.

In principle this shouldn't ever be necessary, but sufficiently small triangles
are currently a problem for librt's BoT intersection routines and given we're
deliberately sampling *every* triangle we're guaranteed to report all BoTs with
such small triangles as invalid even if a ray hitting such a small face is
highly improbable.

Reporting the errors remains the default behavior, since the mesh in question
really isn't behaving the way the raytracer expects even if it's a raytracing
problem rather than a geometric problem per say, but this option gives users a
way to determine what category of problem they are seeing and decide if the
circumstances warrant using decimating to try and clear the small triangles.

(Note: in testing, bot decimate -f 0.005 was able to produce a valid bot by
clearing a small triangle, but the -e OpenMesh-based option isn't producing
manifold output and doesn't repair successfully... arrgh.)
2024-06-05 10:06:43 -04:00
Clifford Yapp 1293de1b94 Add a note on another filter option to add to lint 2024-06-05 07:24:29 -04:00
Clifford Yapp 779230804c Add some TODO notes for facetize 2024-06-04 21:17:06 -04:00
Clifford Yapp 4b575a7466 Start refactoring the directory naming logic. Needs testing 2024-06-04 16:12:45 -04:00
Clifford Yapp 177c2cd6d9 Don't attempt raytracing check if the bot is empty 2024-06-04 11:05:39 -04:00
Clifford Yapp 063799f232 Protect against a suffix specifier and output comb name generating a collision. 2024-06-03 16:11:31 -04:00
Clifford Yapp dde702ddaa Set an attribute so users can tell the object was written out by facetize 2024-06-03 15:34:28 -04:00
Clifford Yapp 71931211f6 Support user specification of region obj copy naming preferences 2024-06-03 15:26:50 -04:00
Clifford Yapp 4210e8cca3 Add option to write out flagged objects to comb 2024-06-03 14:05:12 -04:00
Clifford Yapp b4cda821ec Allow specifying the lint numerical tolerance value 2024-06-03 12:22:29 -04:00
Clifford Yapp 72e847ffad Whoops - use correct struct 2024-06-03 12:10:42 -04:00
Clifford Yapp e09a931b95 Miss is a legitimate reporting condition for thin volumes - adjust lint 2024-06-03 12:06:44 -04:00
Clifford Yapp f9b6509949 Narrow scope of librt thinness check 2024-06-03 11:59:59 -04:00
Clifford Yapp 973f595beb Adjust lint bot testing and reporting - make unexpected hit point its own test 2024-06-03 11:39:26 -04:00
Clifford Yapp 4d4ba0edd7 Need to flag if we're going to plot 2024-06-03 11:06:31 -04:00
Clifford Yapp 1d5773d243 Fix -I method option handling for lint 2024-05-31 16:35:52 -04:00
Clifford Yapp 0a4cc58a87 fix spelling 2024-05-31 15:38:16 -04:00
Clifford Yapp bde807a9c1 Add a note to look into thin triangle raytracing 2024-05-31 15:15:18 -04:00
Clifford Yapp fee1ee0c3a Plate->Vol BoT support has been added. 2024-05-31 15:01:40 -04:00
Clifford Yapp 9646922ddc Support nuanced controls for specifying lint methods.
Added support for optional technique specifiers to lint -I option.  It's not
required, but if specific techniques are specified only those will be used for
testing.  Goal is to allow visualization of specific categories of BoT problem
faces.
2024-05-31 14:56:03 -04:00
Clifford Yapp 4d053744ce Add a visualize option to lint
We want to be able to see where the problem triangles in a mesh are, and we
have enough information from the raytrace to be able to do so.  Set up a
-V option for lint to allow plotting of problematic faces.

Ideally we probably want the -I option to lint to allow for more specialization
- i.e., only run one specific type of BoT check, for example.  This will need
some sort of flexible test specification mechanism.
2024-05-31 11:22:16 -04:00
Daniel Rossberg cddd833eb5 Merge pull request #134 from AliHaider93/devel_k-g
Update k-g.cpp: Deleting some code from k-g which was leftover from previous development.
2024-05-31 13:56:07 +02:00
Clifford Yapp 458558bcc8 Rough in bot plot subcommand
For now this is just plotting faces by index.  Need to think about
whether it makes sense to support plotting vertices as well - that might
be less useful, since if we can retrieve a vertex's coordinates by index
it would be trivial to either move the view center to that point or make
a sphere there...

On a related note - probably need to adjust the bot get syntax. Right
now it's property then objname, but if we want to upgrade it to allow
getting per face and per vertex info we need the property to optionally
have arguments - that would make more sense in a "bot get objname prop
[opt]" layout.
2024-05-30 20:53:48 -04:00
Clifford Yapp 812f2d885f Support writing out the JSON data to a file 2024-05-30 15:19:20 -04:00
Clifford Yapp f025764133 Refactor lint command to use JSON data
Trying to set up the lint code to be more flexible for multiple usage
scenarios.  Haven't added new functionality yet - this is just getting
the current "summarize what's broken" reporting going with the new
setup.
2024-05-30 14:20:21 -04:00
Ali haydar 2764e3a4d4 Update k-g.cpp
deleting some code from k-g which was leftover from previous development.
2024-05-30 20:00:35 +02:00
Clifford Yapp f7cf5f626b list json.hpp for repocheck 2024-05-29 21:34:27 -04:00
Clifford Yapp 9754432a81 Start setting up to have lint capture data for debugging. 2024-05-29 16:59:19 -04:00
Clifford Yapp c8b4e8ca36 Set up libged lint cmd versions of checks
We're going to want more powerful reporting and visualization than makes
sense for librt.  Reduce the bot check there to just the one facetize
uses, and shift the more extensive logic into lint.  If we want to set
up for things like json logging, visualization of problem triangles,
etc. it makes more sense to do it in the lint command rather than trying
to shoehorn it into the librt API, at least in the early stages.  If
something emerges that makes sense in librt we can move it back later.
2024-05-28 20:06:27 -04:00
Clifford Yapp 02c3ac9fbb Note need for a check-against-CSG-original step in facetize. 2024-05-28 15:41:00 -04:00
Clifford Yapp c250eb5cbb Need a way to handle verbose lint data intelligently. 2024-05-28 15:36:30 -04:00
Clifford Yapp a0c23ebe65 Get lint reporting correctly. 2024-05-28 15:20:04 -04:00
Clifford Yapp 5bec77080a Try using segs to get the closest in/out hit 2024-05-28 12:40:39 -04:00
Clifford Yapp 474b830443 Split out the various checks into their own tests 2024-05-28 11:34:32 -04:00
Clifford Yapp 852653c355 Revert "Rename function - more to this than just thinness"
This reverts commit ae4e26626f.

I think we're going to want to split this into two functions - the "thin"
volumes we want to process, the "close above" case we just need to warn about
since it's much harder to fix.
2024-05-28 10:28:30 -04:00
Daniel Rossberg 7cf6af780f Merge latest commit from main branch
"Looks like some versions of CMake are insisting on docs arguments for define_property"
Merge pull request #132 from BRL-CAD/main
2024-05-28 08:34:59 +02:00
Clifford Yapp a3e8072766 Looks like some verisons of CMake are insisting on docs arguments for define_property 2024-05-27 17:59:07 -04:00
Daniel Rossberg e4809d4ea1 Merge pull request #131 from BRL-CAD/main
sync with main branch
2024-05-27 13:15:58 +02:00
Clifford Yapp 71c2c4794f Fix bots.sh regression script
Since bot flip is typically used only to repair an inside-out bot, we
need to explicitly update the orientation in a case where we are
intentionally creating a cw bot.

Previously the rt_bot_flip function was also swapping the orientation.
2024-05-25 13:27:05 -04:00
Clifford Yapp ae4e26626f Rename function - more to this than just thinness 2024-05-24 21:17:29 -04:00
Clifford Yapp d41931f011 Should probably explore what sort of correctness check we can do on the facetization results with shotlining. rtcheck on two copies of a bad mesh visually showed 'missing' areas where there should have been overlaps and weren't - we might be able to use original facetization inputs as a 'ground truth' check to make sure our solid shotlines from the bots seem sane. 2024-05-24 21:07:37 -04:00
Clifford Yapp 24fd293081 Note we may have different categories of problem to spot and either handle or simply report. 2024-05-24 21:01:03 -04:00
Clifford Yapp ebf7d2abc5 Experiment with looking 'above' the triangles.
Studying the r.rot348 havoc example, I'm becoming convinced CSG
intervention is the only practical way to resolve interior triangle
issues like that.  We'll go ahead and attempt repairs, since some
categories of problem can be fixed that way, but resolving the rot348
case would require (at a minimum) removing all the coplanar triangles
involved in the interference, which center ray testing won't catch, and
even then it might be too much for the hole filling algorithm.
2024-05-24 20:54:09 -04:00
Clifford Yapp 6886076f47 Add some notes about further testing needed.
The repair step isn't clearing all issues despite reporting valid
meshes, and examination reveals that's because of interior coplanar
faces impacting solid shotline results.  We'll need to find a way to
identify not just the thin triangles filling holes, but also the
interior triangles messing with shotline results.  The latter are less
startling visually but arguably much more important analytically, since
they will negatively impact things like rtweight.

It looks as if hit_surfno is recording the triangles associated with
hits, so we should have enough info to identify our problem areas if we
shoot the right rays.  More work ahead.
2024-05-24 19:31:58 -04:00
Clifford Yapp f59a51aa6d Expose the "remove degenerate thickness faces" feature as a "bot strip" subcommand
Even if the default settings aren't able to repair these meshes, it may be that
manual intervention with more aggressive bot repair settings can.  Failing
that, this allows the modeler to remove the problematic faces and prepare a BoT
for export to other tools for additional repair work.  For that reason, no
attempt is made to automatically repair the output as part of the strip process
- if there are any problematic triangles, the resulting bot will be
non-manifold until repaired.

Going ahead and defining this command rather than capturing the intermediate
results from facetize to avoid complexity in the facetize code, as well as
provide more flexibility for users.

The lint command can produce a list of bot objects that will make sense to
consider as possible inputs for this command.  Note that providing non-manifold
inputs to this command will likely remove triangles in unexpected ways since
there is a risk that the rays shotting from the triangles centers will have
nothing on the opposite side of the mesh to hit.
2024-05-24 16:27:50 -04:00
Clifford Yapp 9cf5336f21 Able to do some thin faces removal and repairs, but (pretty much as expected) Geogram can't handle all cases. 2024-05-24 15:58:04 -04:00
Clifford Yapp 14315043b9 Checkpoint 2024-05-24 12:15:23 -04:00
Clifford Yapp bf4924b8b9 Compile fixes for gist 2024-05-24 10:39:52 -04:00
Clifford Yapp 711cd49ca5 instant-meshes is useful for improving mesh quality and remeshing, but doesn't repair inputs to produce manifold output. 2024-05-24 09:50:31 -04:00
Clifford Yapp 3a3db146be Don't call rt_init_resource if it looks like rt_uniresource is already initialized 2024-05-24 08:31:59 -04:00
Clifford Yapp fad4791e38 Checkpoint 2024-05-23 20:35:27 -04:00
f4alt 432db7238a remove obvious debugging comments/code 2024-05-23 20:18:46 -04:00
f4alt ea4d56f753 add -v (verbose) flag to Options
hide non-essential printing behind verbose flag
2024-05-23 20:18:46 -04:00
f4alt 4441362e2c tweak help printing 2024-05-23 20:18:46 -04:00
f4alt 601bdf7633 consistent logging
use bu_log instead of std::out and std::err
2024-05-23 20:18:46 -04:00
f4alt aa70c4fe86 better output file handling
if no output file is given, warn and default to framebuffe (gui) popup.

if file name is given with extension, make sure it is .png. Or, if no
extension, append .png
2024-05-23 20:18:45 -04:00
f4alt ad36e281a1 handle reuse of renders correctly 2024-05-23 20:18:45 -04:00
f4alt 277f6e5d82 dont render DETAILED 3 times 2024-05-23 20:18:45 -04:00
f4alt 8e6696c817 define these as int so BU_OPT can set directly 2024-05-23 20:18:45 -04:00
f4alt 28d8067f04 dont hardcode output dir
have Options class keep track of working directory where renders are
stored while report is being built.
2024-05-23 20:18:45 -04:00
f4alt d80981e9e2 gqa has a lot of output, use bigger buffer 2024-05-23 20:18:45 -04:00
f4alt 5750be3609 use bu_process for getSubComp 2024-05-23 20:18:45 -04:00
f4alt c895c150e2 use bu_process for renderPerspective 2024-05-23 20:18:45 -04:00
f4alt b513fd848e better usage table
fix some typos, use better flags (like -o for output name), improve use
and descriptions
2024-05-23 20:18:45 -04:00
f4alt c2ee5449bc use bu_process for gqa running 2024-05-23 20:18:45 -04:00
f4alt c974f1311d need to use double pointer
wait() frees the structure and null's out the pointer, so we need its
address
2024-05-23 20:18:45 -04:00
f4alt 071a98b8ea use bu_process to run rtarea 2024-05-23 20:18:45 -04:00
f4alt 28b3e613f6 needs to be int so we can OR multiple options 2024-05-23 20:18:44 -04:00
f4alt dd22e15e56 openInGUI needs some tlc
using this commit more as a means of documenting a TODO. current
width/length settings for the popup make the window HUGE, not indicative
of the actual report, and is not resizable.

Also, throws an ugly NULL pointer error when destroying the window.
2024-05-23 20:18:44 -04:00
f4alt e301547d48 use bu_dir to get command paths 2024-05-23 20:18:44 -04:00
f4alt b109e4143e fix debug assertion failure on Windows
apparently on Windows fileno can return -1 when run as a subprocess -
which isatty throws an assertion failure with. So, make sure we have a
valid value before continuing.
2024-05-23 20:18:44 -04:00
f4alt db352700f1 another pass at readParameters cleanup 2024-05-23 20:18:44 -04:00
f4alt 0e5a7b4d61 better class member names 2024-05-23 20:18:44 -04:00
f4alt 458764efda shift readParameter logic into Options class
readParameters deals exclusively with Options setting / validation so
add it as a class member instead of handling in main.

refactor option parsing to use BU_OPT table. Some of the options dont
feel quite right yet, so this will allow flexible modifaction should it
become necessary.
would it be worth refactoring 'set' functions to be used as the BU_OPT
callbacks? It'd clean up some of the post option checks..
2024-05-23 20:18:44 -04:00
Clifford Yapp 984c7d8cdb Add a lint check for bots with thin face thicknesses
Although the Manifold boolean usually succeeds, it sometimes does so
when faced with coplanar faces by producing extremely close together
faces that raytrace with zero thickness but still show up as hits in
nirt and when drawing the geometry.

We test for this case by finding the center point of each triangle,
backing it off slightly from the triangle plane, and shooting in the
opposite direction of the triangle normal into the mesh.  We then check
the first partition distance to see if that face is part of one of these
degenerate volume pairings.  If such a case is found, abort the test and
report a problem case.

The "fix" for this is typically going to be to tweak the parent CSG
solid definitions to avoid the coplanar faces.  It's probable the zero
distance partitions can also be filtered and ignored analytically in the
solid shotlining cases (rtweight, for example, won't add weight from a
zero length segment), but they remain a visual distraction.
Topologically these *are* valid meshes, but if we can it would be good
to find a way to eliminate the coplanarity artifacts.

One possibility that suggests itself, given the new repair capabilities,
would be to analyze all faces on the mesh and flag any with this
characteristic for removal.  We could then apply the bot repair logic to
the mesh with the zero distance faces removed to create a new valid
manifold.  Need to experiment and see if that would work - not entirely
sure if the repair logic could handle the sort of inputs that process
would produce.
2024-05-23 19:05:59 -04:00
Clifford Yapp 7e7b714415 Add a way to determine if a BoT is inside-out
Usually we end up spotting these cases when a shaded solid drawing winds
up black instead of red, even with no color set on the object.  Add a
way to programmatically detect when this is happening, so we can try to
either do something about it automatically or at least report the
situation to the modeler without them having to manually draw and
inspect the solids to spot it.
2024-05-23 14:17:03 -04:00
Clifford Yapp 8d8f83d6be Fix shaded drawing of BoTs in CW mode
Noticed this working with bot flip - the bot flip code (incorrectly, as
it happens, given the intent there) was changing the orientation of the
bot from RT_BOT_CCW to RT_BOT_CW, but the shaded display was still
showing the bot as inside-out even though the orientation on the
"flipped" geometry was in fact changed.  Dug a bit, and the poly drawing
routine was ignoring the orientation flag when supplying drawing
instructions.
2024-05-23 13:50:33 -04:00
Clifford Yapp 1f059ef88f Explain a little more about what bot repair does 2024-05-23 10:57:00 -04:00
Clifford Yapp f1c4ff67b7 Mention bot get type for checking individual bots 2024-05-23 10:40:12 -04:00
Clifford Yapp f40ac53163 Discuss plate and solid mode BoTs and how to identify them. 2024-05-23 09:38:40 -04:00
Clifford Yapp 3a696dfb23 Remove adc.h from CMakeLists.txt 2024-05-23 08:31:27 -04:00
Clifford Yapp 7501a553ae Free fname before returning 2024-05-23 08:30:03 -04:00
Clifford Yapp 5062d7b750 fix compile on Linux 2024-05-23 08:20:09 -04:00
Christopher Sean Morrison 65295a5b27 lots of archer editing now results in runtime errors.
in preference/value/expediency order, we'll need to map them in ged, revert their ged_exec, or remove the functionality entirely.  seeing as the editing features are valuable progress towards scriptability, probably best to map them as commands and ideally put testing in place that indicates their use in archer.
2024-05-23 00:03:55 -04:00
Christopher Sean Morrison a2919b9cb3 appears to be self-ref case, so should be true despite the -1.
plus true matches previous return val as non-zero is true.
2024-05-22 22:37:57 -04:00
Christopher Sean Morrison 8dccc011a4 print bigger, but go through uintptr_t to indicate intentional truncation (which is okay as this is debug) 2024-05-22 22:36:46 -04:00
Christopher Sean Morrison 7f9fd90f6b these adc funcs are not used externally are aren't exported correctly 2024-05-22 22:34:32 -04:00
Christopher Sean Morrison 5a2fafe36f Merge branch 'main' of https://github.com/BRL-CAD/brlcad 2024-05-22 21:48:49 -04:00
Christopher Sean Morrison aacb4ff868 clientdata is a pointer so cast to int first 2024-05-22 21:48:42 -04:00
Christopher Sean Morrison 4f26c2ed40 ged_adc() doesn't exist
and ged_adc_core() doesn't need to be exported at this time.
2024-05-22 21:30:02 -04:00
Christopher Sean Morrison a8b200268d debug, but still try harder to not truncate and appease linter. 2024-05-22 21:13:57 -04:00
Clifford Yapp 12861c742f Adjust bot repair to accept multiple inputs
The most common use case for this is most likely going to be "I have a
.g file, fix all the BoTs in it."  Update the usability of the bot
repair command accordingly - now "bot repair *" will try to repair all
the BoT solids in a database.  For the case where a user wants to write
the repair of a single bot to an object name, the -o option is now
available rather than using an optional second argument.
2024-05-22 21:13:17 -04:00
Christopher Sean Morrison 34c75eb262 use the right type at compile-time.
even though the sizeof() check will result in an always true or always false traversal, we shouldn't be passing the wrong type.  code now toggles on the UNICODE define which is the WinAPI way.
2024-05-22 21:07:55 -04:00
Christopher Sean Morrison 3da60b43f3 because it's embedded code, fix the pointer truncation 2024-05-22 21:05:09 -04:00
Christopher Sean Morrison d7e4c81e74 fix export from bg to bv 2024-05-22 21:03:58 -04:00
Clifford Yapp 98ebf822d2 Update bot_repair man page with options. 2024-05-22 18:53:47 -04:00
Christopher Sean Morrison 1cb705f3fb need to check on rtarea output for correctness.
needs test case and manual verification.  threading issue observed way back on 7.32.4 but no known changes since then related.
2024-05-22 13:49:06 -04:00
Clifford Yapp d17e19a2f4 Do some sanity checking on the post-hole-filling mesh 2024-05-22 11:50:10 -04:00
Clifford Yapp ab502bb3a4 By default, limit mesh repair to holes less than or equal to five percent of the mesh area. Add controls for bot repair so the user can adjust. Should probably allow adjusting that for facetize eventually, bot for now just using the default. 2024-05-22 11:23:43 -04:00
Clifford Yapp 1f8cd64eb7 Update src/bext submodule to get librt+geogram gchecker fix
It turns out the gchecker failure in Windows Release mode was due to
linking in a geogram built without the win32 building patches.

The symptoms were that gchecker would launch but hang, with bu_parallel
launching its threads but failing to start its workers successfully.
Even commenting out the actual guts of the work function still resulted
in hanging, indicating the problem was with the parallelism itself.
Bisecting identified the commit merging bext usage into the facetize
branch as the point where the regression first appeared, and commenting
out the librt usage of geogram in that commit resulted in success.

dumpbin /dependents geogram.dll on the failing geogram build produced a
very short dependencies list, which may be related.  In any case, it
looks like the latest bext patch does succeed in allowing gchecker to
run again.
2024-05-21 20:41:17 -04:00
Clifford Yapp 6961998c30 Make sure gchecker depends on the ged-check target 2024-05-21 12:23:51 -04:00
Clifford Yapp 27f0a853bc Check both Manifold and bg_trimesh routines - if either is unhappy, attempt repair. 2024-05-21 11:49:38 -04:00
joshbaker22 8dfc8ed4e3 Update facetize.xml
small typo fix - lint -I not -M to find invalid objects
2024-05-21 09:09:46 -04:00
Clifford Yapp d26b912d5b No longer using executables for this - don't fail if we can't find them. 2024-05-20 17:06:00 -04:00
Clifford Yapp 44db19e1f9 Phew. OK, it was on our end - we need to call subprocess_destroy after the join for the cleanup. 2024-05-20 13:38:12 -04:00
Clifford Yapp f0166543ee stdinfd isn't a source of fds leaks per valgrind 2024-05-20 13:24:09 -04:00
Clifford Yapp 1ec05d9dd4 We were leaking file handles - add some closes.
valgrind reports clean now with facetize -r:

valgrind -q --tool=none --track-fds=yes ./bin/mged moss.g facetize -r all.g all_r.bot
2024-05-20 11:08:50 -04:00
Clifford Yapp 92a5fa0413 Remember to ged_close the file after doing a ged_open 2024-05-20 10:56:09 -04:00
Clifford Yapp 7c4c6e5d3d Don't need this definition any longer 2024-05-17 16:55:52 -04:00
Clifford Yapp 699550bbd3 Use local caches for the CMake MGED tests as well. 2024-05-17 16:42:54 -04:00
Clifford Yapp 7b113a5f23 See if we can add /DEBUG to Release MSVC build
Grr.  Getting a regress-gchecker failure unique to Release mode -
libanalyze perform_raytracing function calls bu_parallel, and in Release
mode on Windows everything hangs.  Doesn't appear to be related to the
contents of analyze_worker - commenting out its internals and making it
a no-op doesn't alleviate the hanging, but launching bu_parallel with
ncpus==1 succeeds.  Haven't been able to get a backtrace so far.  Trying
this, even though early results don't seem to be too promising...

Failure is especially bizarre since parallel rt is still succeeding.
There must be a setup difference somewhere.
2024-05-17 16:32:11 -04:00
Clifford Yapp d9c0adaf73 Initialize point values to zero (fixes drawing of label line in Windows Debug mode) 2024-05-17 15:15:09 -04:00
Clifford Yapp 5a47962155 Adjust how brep_loop_points is allocated
We were getting the following warning in Release mode with gcc on Linux:

src/libbrep/cdt/fast.cpp:2067:97: error: argument 1 value
‘18446744073709551615’ exceeds maximum object size 9223372036854775807
[-Werror=alloc-size-larger-than=]
 2067 |     ON_SimpleArray<BrepTrimPoint> *brep_loop_points = new ON_SimpleArray<BrepTrimPoint>[loop_cnt];
      |
^ /usr/include/c++/13/new:128:26: note: in a call to allocation function
‘operator new []’ declared here
  128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)

To avoid this we instead make a pointer array and create the
BrepTrimPoint arrays individually.  In practice loop_cnt probably
wouldn't have gotten big enough to produce an array object that would
hit this limit, but in principle it IS possible (i.e. the data types
don't preclude it.)
2024-05-17 10:39:08 -04:00
Clifford Yapp faf47ffa45 Try removing the if(WIN32) block from FindGeogram.cmake 2024-05-16 19:10:36 -04:00
Clifford Yapp 6fd7be14e8 Update detria to latest upstream 2024-05-16 18:59:10 -04:00
Clifford Yapp f1cc644dbf Testing a debug setup, it looks like dumpbin needs the native Windows path to work. 2024-05-16 15:23:51 -04:00
Clifford Yapp 45981a0909 Override the config-speific output vars too
Even though we are reducing the active config set to one, CMake is still using
the variables associated with that config to determing where the plugins are
written, so we need to override them.
2024-05-16 11:49:20 -04:00
Clifford Yapp c9b59167b1 With MSVC we don't want an empty CONFIG variable 2024-05-16 11:22:30 -04:00
Clifford Yapp 48d206e02e Need no-alloc-size-larger-than for libbrep Release build. 2024-05-16 10:48:21 -04:00
Clifford Yapp 2b18a17945 Ah, right - the LoD drawing test does test shaded drawing of a brep, and the detria change causes off-by-1 img differences. 2024-05-15 22:51:34 -04:00
Clifford Yapp e2909c45e8 Replace poly2tri with detria
This logic is exposed via the e -m1 shaded drawing and brep->bot
facetization routines.  The latter aren't working for most inputs at the
moment with either triangulator (need to fix that, but that logic is a
deep dive so it will have to be later).  However, testing a couple of
basic primitive->brep->bot conversions confirms we ARE able to get
triangles out with the new detria logic in this pipeline when the
inputs aren't problematic for other reasons.

More significant at the moment is the use of this triangulation for
interactive shaded display of NURBS brep geometry, and in testing so far
the speed appears to be on the same order as poly2tri and the results
are either comparable or (in a couple of cases) actually better. A
conversion of the GrabCAD model YachtMod(55).3dm resulted in inputs that
resulted in the poly2tri-backed draw crashing but the detria-backed draw
succeeding.

Give detria appears to *fix* a drawing problem, that's motivation for
switching it in.  Although not decisive in and of itself, another
convenient benefit of this switch will be eliminating the need for our
forked copy of poly2tri (we have diverged from upstream, and the last
attempt at using vanilla upstream poly2tri resulted in unsuccessful
shading results for various NURBS surfaces.)
2024-05-15 19:18:53 -04:00
Clifford Yapp c55ec15b6b Fix tclIndex and pkgIndex input collections
Use global properties to collect the dependency and install lists for
the index generation.  Also, fail immediately if any of the indexing
commands doesn't succeed.
2024-05-15 17:46:15 -04:00
Clifford Yapp 02d5328257 Not defining the staging targets any more. Have GUI Tcl/Tk apps depend on the tclscripts target. 2024-05-15 15:10:39 -04:00
Clifford Yapp aedb661e2c Looks like we don't need this on OSX? Causing a conflict with dlfcn.h... 2024-05-15 11:47:24 -04:00
Clifford Yapp f67ae96926 Merge new facetize work into main
distcheck-full is now passing - merge the facetize branch back into
main.  This work improves the conversion success rate of facetize in BoT
mode significantly - although the process is slow, on Linux we have
successfully run conversion.sh --bot MAXTIME=5000 against all of the .g
example files in share/db and the share/db/* subfolders.

Need to do more usability cleanup - improve user messages, make sure
documentation is up to date, etc. - but things seem to be doing well
enough now that we can avoid the overhead of working in a branch while
tying up the lose ends.
2024-05-15 10:50:48 -04:00
joshbaker22 e7e7947b36 Update reair.xml
remove last # comments
2024-05-15 10:47:09 -04:00
f4alt 717fedd0ec fix comment section 2024-05-15 10:44:32 -04:00
Clifford Yapp b21128bfcb Harden cache cleanup against odd pathnames 2024-05-15 10:34:14 -04:00
joshbaker22 fe1f87fa0d Update CMakeLists.txt
add reair.xml
2024-05-15 09:28:04 -04:00
joshbaker22 7a5adeeb2f Create reair.xml
add reair man page. modeled on reid - commented out references to the -n flag (which is currently a proposed addition to the command)
2024-05-15 09:27:25 -04:00
joshbaker22 34c8a63ff0 Update help.tcl
add reair
2024-05-15 09:06:25 -04:00
Clifford Yapp 3a66f9f0b9 Always register bext_output in the build directory for clearing 2024-05-14 20:51:06 -04:00
Clifford Yapp 3473ec6819 Rather than checking __APPLE__, see if we can do this extern within each platform specific setup where it might be needed. 2024-05-14 19:21:20 -04:00
Clifford Yapp 7529fcb7a1 Realign distcheck tests for bext build testing
The enableall and autodetect settings in the original tests aren't
directly relevant for all cases now, but they do have analogs if the
configure process is responsible for building bext rather than re-using
the parent supplied files.

Set up some additional tests to try and cover the configure-driven bext
cases, and explicitly pass BRLCAD_EXT_DIR for the others rather than
hard coding it into the test templates.

Also simply definition of distcheck target.  distcheck-full is what we
use to actually test - the shorter list of configurations originally
defined for distcheck-std is not used in practice.  If any of the
distcheck-full configurations is broken, that identifies an issue we
need to fix - rather than defining a macro and getting fancy, just
specify the configurations and targets we actually use.
2024-05-14 19:05:53 -04:00
Clifford Yapp 70a075683c Rather than conditionally defining this in CMake, just add it to config_win.h.in 2024-05-14 17:24:45 -04:00
Clifford Yapp 2fcf7cbd2c Looks like on OSX dl_info is provided later by dlfcn.h 2024-05-14 16:43:25 -04:00
f4alt c1c0542551 make sure error messages are correct 2024-05-14 13:33:57 -04:00
f4alt 79e2f119cf terminate is touchy
get rid of magic abort delay and instead poll with a timeout to
determine success.
2024-05-14 13:31:31 -04:00
Clifford Yapp c3d0fcd595 Update whereami.c to latest upstream code, re-apply local mods. 2024-05-14 10:51:36 -04:00
Clifford Yapp 0455259114 Sean caught that we need to ensure per run uniqueness for the benchmark directories - use the same pattern used for the log filenames. 2024-05-14 07:12:27 -04:00
Clifford Yapp c8ada9826a List some files for distclean 2024-05-13 23:24:57 -04:00
Clifford Yapp eebd761343 Harden new db logic against odd pathnames 2024-05-13 22:20:24 -04:00
Clifford Yapp ece05e8a48 Turn off ged_tessellate exec build in favor of ged_exec + plugin. 2024-05-13 19:40:36 -04:00
Clifford Yapp 9cfdc78f91 First successful run of tessellation with ged_exec setup. 2024-05-13 17:26:24 -04:00
Clifford Yapp 763920c044 Checkpoint work on getting ged_tessellate set up as a loadable module for a 'ged_exec' program to run. 2024-05-13 17:03:40 -04:00
Clifford Yapp a49d18f908 Reworked regression and unit tests to use local caches 2024-05-13 15:43:27 -04:00
Clifford Yapp 45d6864d56 The conversions also write to the cache - update how they are run. 2024-05-13 15:42:38 -04:00
Clifford Yapp 02efc30324 Don't warn on initializing - that's normal operation 2024-05-13 13:01:29 -04:00
Clifford Yapp 8d9fd80c1e Rework gqa plot testing into a regression test
These tests will trigger the cache logic, so rework them into a
regression test were we can use BU_DIR_CACHE to localize the cache
activity.

This seems to be the last functional issue for make check to work (at
least on Linux) when disabling the man user cache.  That should imply
that the build and check process is now localized, and we won't have
tests and multiple builds all trying to pile into the global cache at
once.

The way this was tested was 1) removing the .cache/BRL-CAD directory and
replacing it with a file (i.e. ensuring that any attempt to work with
the standard cache location would fail) and 2) altering cache.c in librt
to make any failure to set up the cache immediately fatal.  If we don't
do that, then the uncached behavior is used and everything still works -
but for this case, we wanted specifically to identify cases where we
didn't have localized cache logic, so we needed an immediate failure.
2024-05-13 12:54:56 -04:00
Clifford Yapp 709f0866c5 Make sure the cache dirs are present so bu_dir will use the environment variable 2024-05-13 12:16:48 -04:00
Clifford Yapp 3068050098 Cache setup for CMake based tests 2024-05-13 12:04:40 -04:00
Clifford Yapp c9f5abd29a Start working on getting tests to use local caches. 2024-05-13 10:35:21 -04:00
Clifford Yapp d1e6aaab70 Note need to look at using local caches for regression tests 2024-05-12 09:52:04 -04:00
Clifford Yapp 37c6e0aa35 Getting to the point where it's time to see if we can make ged_tessellate into something more generic/flexible in anticipation of usage with other LIBGED commands 2024-05-12 09:50:27 -04:00
Clifford Yapp a0740185da If we're doing our own bext build, we need to let distclean know to clean up bext_output 2024-05-10 23:05:35 -04:00
Clifford Yapp 7e1c2434a7 Looks like the distcheck and output file quoting requirements are different. 2024-05-10 22:58:46 -04:00
Clifford Yapp acf62353fc Not done yet, but some work on distcheck cleanup 2024-05-10 17:00:41 -04:00
Clifford Yapp da3be4baac Do a little bit of cleanup on the distcheck tgts
With bext coming online, there are some implications for distcheck.  An
earlier commit instructed the distcheck builds to re-use the bext
provided by the parent build, and that's an overall BIG win, but in the
(so far theoretical) case where we try to get distcheck working on
Windows, it won't fly due to the Debug/Release incompatibility problem.
When the time comes we'll have to engineer so we can both reuse when
possible and build when necessary, but for the moment we just skip
defining the targets where we can't use them (and where they weren't
known to be working anyway.)

Also remove the bundled libs control variables - we no longer specify
that at the BRL-CAD configure stage.

Definitely more work to do here - post-build cleanup is well and truly
busted by the bext copies, so it looks like the distclean logic didn't
get the memo.  Also need to clean up the pkgIndex and tclIndex files
properly after that logic was reworked.
2024-05-10 14:29:22 -04:00
Clifford Yapp a1289f492e Don't do the index logic if we don't have a btclsh target 2024-05-10 14:20:50 -04:00
Clifford Yapp 1aea05ae67 regress gcv tests weren't odd-pathnames proof either. 2024-05-10 13:38:56 -04:00
Clifford Yapp 0651200646 Address issue with getModulePath and odd pathnames
whereami.c uses sscanf to break up and parse a map file on Linux, and
the odd pathnames test wound up detecting that the code wasn't returning
the full path when there was a space in it (which is expected behavior
when using %s with sscanf - it treats spaces as delimiters.)

Using a hint from https://stackoverflow.com/a/50440783/2037687 we change
this logic to instead read the full remaining contents of the line for
the path.
2024-05-10 12:49:30 -04:00
Clifford Yapp 467c4296ff If we're doing distcheck, we've already done a configure and have a BRLCAD_EXT_DIR - use it. 2024-05-10 11:30:02 -04:00
Clifford Yapp e541336c3e Need to quote paths for odd pathnames case 2024-05-10 11:07:06 -04:00
Clifford Yapp 19774a1981 If the path is crazy, a MATCH test won't work for this - use IS_SUBPATH. 2024-05-10 10:57:36 -04:00
Clifford Yapp a44828a75d Have the libged drawing tests use local caches, and update facetize subprocess exec to support using the parent cache 2024-05-10 10:48:35 -04:00
Clifford Yapp d8a07739db Leave CPack bundling of bext off by default - it's really expensive. 2024-05-10 10:35:24 -04:00
Clifford Yapp 68f19bde15 Put back the more informative ignored files message. 2024-05-10 10:32:06 -04:00
Clifford Yapp bbe4f8f21e Merge branch 'main' into facetize 2024-05-09 20:46:08 -04:00
Clifford Yapp 2b8572a74e Tweak FindASSETIMPORT so the bundled reporting works 2024-05-09 20:45:49 -04:00
Clifford Yapp 499cb531e0 Tweak FindASSETIMPORT so the bundled reporting works 2024-05-09 20:44:18 -04:00
Clifford Yapp 1e14ccfda3 Add a TODO entry for detria testing 2024-05-09 11:46:43 -04:00
Clifford Yapp 3a48edb2a0 Merge branch 'main' into facetize 2024-05-08 19:43:03 -04:00
Clifford Yapp 5ecee9f3ad No, that way we just wait for the terminal. Don't do fast fail 2024-05-08 15:27:18 -04:00
Clifford Yapp af54a07aff With fast-fail, do we need to set up tmate at the beginning? 2024-05-08 15:12:55 -04:00
Clifford Yapp 14a4c54913 Add TODO entry for hlbvh merge 2024-05-08 15:00:41 -04:00
Clifford Yapp 83dad88af5 Class, not struct 2024-05-08 14:31:53 -04:00
Clifford Yapp 95d1efa8fd Adjust bu_mkdir to also ensure parents are present
Hmm.  Looks like mkdir doesn't ensure that parents are also made
automatically, so do it explicitly.
2024-05-08 14:27:37 -04:00
Clifford Yapp 4fda675583 Merge branch 'main' into facetize 2024-05-08 13:48:01 -04:00
Clifford Yapp 5be29ac867 Match bext FindASSETIMPORT.cmake 2024-05-08 13:47:44 -04:00
Clifford Yapp ed195f96ba Set up to interactively debug on a Github runner
This action proved VERY helpful getting to the root of a failure showing
up on a Github Actions runner, so putting it in as an option for future
use.
2024-05-08 13:45:07 -04:00
Clifford Yapp dabd5464ba Looks like we need to make sure the cache directories exist... 2024-05-08 13:24:07 -04:00
Clifford Yapp 8f4453de6d Make sure plugin has subprocess exec as dependency 2024-05-08 13:04:11 -04:00
Clifford Yapp f789849a67 Match bext FindASSETIMPORT.cmake file 2024-05-08 11:25:41 -04:00
Clifford Yapp 4dda180938 Unused assignment 2024-05-08 11:06:27 -04:00
Clifford Yapp b127bcf9db Check for vertices and faces before we work with them. 2024-05-08 11:06:27 -04:00
Clifford Yapp eae981a2ed libged needs nirt format files for nirt plugin
There we go - wanted to be able to run make check with a
-DBRLCAD_COMPONENTS=libged build, so we can more quickly iterate
testing the facetize+draw combo in a limited environment like the
CI runners.
2024-05-08 10:56:42 -04:00
Clifford Yapp fc88fdbfb2 typo 2024-05-08 10:45:48 -04:00
Clifford Yapp 215c543c5c list libdm as a libged requirement
libged the library does not have a link-time dependency on libdm, but
the libged drawing tests need the swrast dm in order to render images,
so we still need the libdm targets available for proper libged testing.
2024-05-08 10:39:33 -04:00
Clifford Yapp aad6cb5890 Message if we had a problem running to get the methods. 2024-05-08 10:05:30 -04:00
Clifford Yapp f1cd96a6bf tess_opts is a class 2024-05-08 09:53:15 -04:00
Clifford Yapp 07796054fa Ignore subprocess.h in regress-repository test 2024-05-07 20:23:26 -04:00
Clifford Yapp 0d77d4ed7f Update libged drawing tests that use facetization
The new facetize setup results in slightly different triangles being
produced for moss geometries, which in turn means the images are
slightly different.  Output names of subtree objects are also different,
so update select callouts accordingly.

To really do this right these tests should set up caches local to the
build directory so multiple builds can't interfere with facetize
outputs - TODO notes added.
2024-05-07 20:18:14 -04:00
Clifford Yapp baa14d3b72 Should't be adding extra quotes here - this is why rel tolerance settins weren't getting read correctly in ged_tessellate 2024-05-07 20:00:55 -04:00
Clifford Yapp 86546a9acc Update v020 ctrl image for basic drawing test 2024-05-07 16:06:16 -04:00
Clifford Yapp 1901243e74 Only use subprocess.h where we need to 2024-05-07 15:20:49 -04:00
Clifford Yapp 6dbeeb9fa4 Use Chris's updates to subprocess.h to launch ged_tessellate
OK, so this is a little complicated... the current iteration of the
libbu process API doesn't include support for async reads.  The changes
for doing so are rather invasive, and given the other cleanup work it
would be a lot to try to add them until the dust has settled.

Chris also did some work to pull in the upstream proposed patch for Unix
async I/O support and also worked to get subprocess.h to handle async on
Windows - while not yet passing all the upstream tests, he did meet with
some success.  We will try that version of subprocess.h for launching
the ged_tessellate executable, and experiment with the async I/O
capabilities it provides.  This is a self-contained change for just
facetize - the other libbu changes are unaffected.

Async I/O is of particular interest in this situation because we want to
eventually provide more useful intermediate status info from
ged_tessellate to its parent as it is working.  We need an async read
capabilities for that, since there is no guarantee ged_tessellate will
produce output at all and we can't have the parent libged hanging
indefinitely waiting for input that might not come.
2024-05-07 15:10:12 -04:00
Clifford Yapp a791f70eac For the moment, don't do the post-timeout reads 2024-05-07 13:51:52 -04:00
Clifford Yapp 667ab1a665 Be more selective about what primitives we're looking at as leaves, and filter inputs to db_walk_tree 2024-05-07 12:37:28 -04:00
f4alt 2d2a6e6ab3 cleanup commented out code
after further testing, it looks like we can get away with checking the
WNOHANG wait() as long as we protect the bu_process_wait from re-waiting
on the same pid.

only caveat is the alive check could now end up 'eating' the error code
from being returned by process_wait().. not sure there's a clean way to
avoid that
2024-05-07 01:05:21 -04:00
Clifford Yapp 8d6c9db900 Restore ability to specify top level comb name to hold -r mode outputs. 2024-05-06 20:32:21 -04:00
f4alt 0617588182 sanity null-termination 2024-05-06 16:17:44 -04:00
f4alt c11db6d235 wip - update 'alive' checking on linux
kill(pid, 0) is not quite enough for our use cases. If a process
finishes, it will still report alive until it is waited on - which is
not what we want. Instead, attempt to wait on the process and report
that status as its alive state.

Still need to test to make sure we can't double wait (ie infinite hang) on a
process that's been waited for in 'alive' before calling bu_process_wait
2024-05-06 16:17:44 -04:00
Clifford Yapp 2b9ab24c90 Empty comb trees will have no objects, but can still 'succeed' by producing an empty bot. 2024-05-06 13:57:13 -04:00
Clifford Yapp 9e98fc823a Merge branch 'main' into facetize 2024-05-02 14:51:32 -04:00
Clifford Yapp 22d86f9b08 fgets -> bu_fgets 2024-05-02 14:51:01 -04:00
f4alt 5effa8a1a4 Merge branch 'bu_process_upd' 2024-05-02 01:20:32 -04:00
f4alt 47ce952e3c use new function 2024-04-30 19:18:47 -04:00
f4alt 51ce134b55 get rid of subprocess.h
bu_process updates are now able to accomodate facetize needs. Attempt to
replace the code as 1:1 as possible - only reordering the reads/waits.
2024-04-30 16:33:02 -04:00
f4alt dfd8b8a260 need ON_Brep definition 2024-04-30 16:31:40 -04:00
f4alt a593e9b131 need to avoid double quoting if user already has 2024-04-30 16:31:00 -04:00
f4alt 1979a53ca0 Merge branch 'bu_process_upd' into facetize 2024-04-30 13:47:52 -04:00
f4alt e468f0e53b capitalization should match Find* logic 2024-04-30 09:23:12 -04:00
f4alt 0ebff397c9 mismatched close argument warning 2024-04-30 09:22:17 -04:00
f4alt 7da3e95248 need type insensitivity 2024-04-30 09:21:44 -04:00
f4alt 8696f70573 Merge branch 'main' into facetize 2024-04-30 01:24:02 -04:00
Clifford Yapp c7ee0c9a57 Incorrect brew syntax 2024-04-29 15:06:04 -04:00
Clifford Yapp 5864e79155 Try out the v2 msbuild and Xquartz setup with the main BRL-CAD build process. 2024-04-29 14:53:10 -04:00
Clifford Yapp 362c473276 Merge branch 'main' into facetize 2024-04-26 18:24:21 -04:00
Clifford Yapp 15f61ed86a See if we can do this check up front, before we do all the configure tests - that can be a slow process on Windows, and if we're going to wipe out because of a bext configuration mismatch we want to find out early. 2024-04-26 12:48:58 -04:00
Clifford Yapp 74f1314bfc Add examples of using presets with BRLCAD_EXT_DIR
Since it will be a recommended/common pattern to build bext once and
reuse it many times, it will probably make sense for developers to
utilize CMakeUserPresets.json to make the configure process smoother and
easier to use (as opposed to having to type out the location of
BRLCAD_EXT_DIR each time.)  Provide a couple minimalist examples of json
files set up to do this.
2024-04-26 12:23:25 -04:00
Clifford Yapp d08f5733a6 CMakePresets.json is apparently intended to be used for cases where project-wide setting defaults might want to be defined. I can thing of a few cases where we might want to do that - for exmaple, it's one potential way to encode the configuration options used by the distcheck-full builds - so let's not ignore it. Also explain a little more about where some of these ignore file patterns are coming from. 2024-04-26 12:05:17 -04:00
Clifford Yapp 543cd0363e Correct if block closing arg 2024-04-26 11:50:05 -04:00
Clifford Yapp 1fefa363b0 Hmm. Looks like CMakePresets.json (or perhaps CMakeUserPresets.json) is going to be important for Visual Studio building going forward. Should probably come up with some worked examples of how to use with BRL-CAD builds... 2024-04-26 11:35:13 -04:00
Clifford Yapp 426a1d677a Fix if open/close block to match. At least in an isolated test, this appears to work and spots a CMAKE_BUILD_TYPE=Debug being paired with Release binaries. 2024-04-26 11:19:05 -04:00
Clifford Yapp 89f5d0e705 Go ahead and make sure we actually got the global dp before processing. 2024-04-26 10:14:02 -04:00
Clifford Yapp e301f8af6b Whoops - can't look up _GLOBAL successfully without doing a db_dirbuild first. 2024-04-26 10:10:31 -04:00
Clifford Yapp b21c713f67 Merge branch 'main' into facetize 2024-04-26 06:57:38 -04:00
Clifford Yapp ce11ae8c3c Not using this yet 2024-04-26 06:57:22 -04:00
f4alt abe391dd3a -Werror=unused-result 2024-04-26 04:47:26 -04:00
Clifford Yapp a89e948f58 Actually, probably can just set this directly? 2024-04-25 20:20:47 -04:00
Clifford Yapp f32eacb377 Make sure we have cd defined before using it 2024-04-25 20:14:30 -04:00
f4alt 29e606a48d fix param declaration 2024-04-25 19:56:23 -04:00
f4alt bc4d6066e8 -Werror=format-security 2024-04-25 16:57:40 -04:00
f4alt 576878fb8d Windows is slow
and make it clear elapsed time is in uS not mS
2024-04-25 16:51:00 -04:00
f4alt 501bea1c74 handle timeouts on Windows 2024-04-25 16:50:38 -04:00
f4alt 67284dee02 add process_wait() timeout test
add a 'timeout' bu_subprocess path so we can keep 'alive' short
2024-04-25 15:20:33 -04:00
f4alt 7e34ff16f4 yes, this is good behavior 2024-04-25 14:16:10 -04:00
f4alt f32214cbf8 add create_opts tests
NOTE: need to come up with command / add test for Windows
BU_PROCESS_HIDE_WINDOW still
2024-04-25 14:15:16 -04:00
f4alt 4c836a9822 document, move on
in our current linux configuration, we cannot easily get the creation
status of the subprocess.
2024-04-25 14:10:36 -04:00
f4alt 0ea6439ca4 stable bu_pid_terminate() tests
kill() is touchy on linux, add in a slight delay to make sure the
process has started and is reporting correctly to the OS
2024-04-25 11:57:40 -04:00
f4alt ade0fcf6a2 for some reason this works but inlining doesnt 2024-04-25 11:55:41 -04:00
f4alt a22bded7bc make 'basic' test more basic 2024-04-25 10:41:16 -04:00
Clifford Yapp 97e24cfc0c Rough logic to spot between bext and CMAKE_BUILD_TYPE
Given the impracticality of mixing Debug and Release binaries on
Windows, we need a way to spot up front when we've been handed a
BRLCAD_EXT_DIR using the wrong MSVC runtime.

Untested (i.e. virtually certain to not be correct yet) but rough in
some logic to try to detect what configuration bext was built in.
2024-04-24 16:57:25 -04:00
Clifford Yapp 94cac3ca3d Force all CMake generators to use one configuration
With the switch to bext, the configure process (in some modes) needs to
build bext itself.  This means with MSVC we can't switch the build type
from Debug to Release at build time, since Debug bext binaries aren't
usable with Release BRL-CAD build outputs and vice versa.  Even with a
pre-defined BRLCAD_EXT_DIR, that directory will hold only one
configuration of the bext binaries and we still won't be able to do
a Debug/Release build time switch.

If we wanted the configure process in a multiconfig build environment to
pre-build and manage all possible configurations of bext (which can be
as many as 4, if we use the CMake pre-defined build configurations) we
would have a huge problem in terms of build logic complexity, disk space
and configure time requirements as we built multiple copies of
potentially all of bext.  This isn't worthwhile just to be able to
select between Debug and Release at built time, when we can just set up
two build directories to achieve the same result and avoid the whole
problem.

To constrain BRL-CAD's build to the desired behavior, we need to
simplify what configurations are allowed for a single configure+build
setup by overriding CMAKE_CONFIGURATION_TYPES.  As a bonus, we can also
eliminate a lot of logic that was added specifically to support BRL-CAD
being runnable in per-configuration build directories.  Needs to be
tested with Visual Studio to make sure we've successfully cleared the
old logic out correctly and set up the necessary output directory
variable overrides to make things work like a single-config tool, but
in the end this should be a lot easier to deal with across the board.
2024-04-24 15:32:31 -04:00
f4alt 7cdc09b488 simple implementation
pid_alive and process_alive should be the same if it wasn't for Windows
shenanigans
2024-04-24 13:45:06 -04:00
Daniel Rossberg a53acec258 Merge pull request #127 from drossberg/devel_k-g
LS-Dyna keyword file to BRL-CAD converter
2024-04-24 18:41:14 +02:00
f4alt aa136e76f4 fix linux build errors for process changes 2024-04-24 10:48:30 -04:00
f4alt 0cf44b9a4d deprecate bu_terminate: replaced by bu_pid_terminate
move logic from kill.c into process.c as having it broken out is
unnecessary
2024-04-24 08:41:05 -04:00
f4alt f43874946d deprecate bu_process_id: replaced by bu_pid 2024-04-24 03:18:40 -04:00
f4alt 8c3700b29f deprecate bu_process_args: replaced by bu_process_args_n
reorder args for API consistency
2024-04-24 03:05:15 -04:00
f4alt 2c212ec77d deprecated bu_process_open / _close
replace with bu_process_file_open / _close to fix function naming
misnomer.
2024-04-24 02:55:18 -04:00
f4alt f9c9dccb4f deprecate bu_process_read: replaced with bu_process_read_n 2024-04-24 02:28:04 -04:00
Clifford Yapp 0bf026baa0 rt_nmg_do_bool is (at least at the moment) used by rtcmp directly - add a header entry for it. 2024-04-23 13:48:34 -04:00
Clifford Yapp 3c226c88bb Add an image diff tool that supports more formats
PIX images are awkward to work with compared to PNG images... throw
together an image diff utility so we can write PNG images from raytrace
tools and diff them more easily.  This is just thrown together for
checking out the new BoT speedup work.
2024-04-23 10:35:31 -04:00
f4alt 8bd7406cb1 deprecate bu_process_wait: replaced by bu_process_wait_n 2024-04-23 10:34:58 -04:00
f4alt aff36e0fa4 todo for tests 2024-04-23 08:09:19 -04:00
f4alt 2476144d22 found bug while testing bu_process 2024-04-23 03:17:54 -04:00
f4alt 9ff73598b4 deprecate bu_process_exec: replaced by bu_process_create 2024-04-23 03:11:34 -04:00
Clifford Yapp 5ecd7cb3c6 Add latest detria.hpp 2024-04-22 21:32:13 -04:00
Clifford Yapp 34dbc8f77a Using bext for dependencies means we now also have the version 8 OpenNURBS. 2024-04-22 15:45:09 -04:00
f4alt 148753e925 make it clear process manip via pid is intentional
some features, like alive checking and termination, are preferable to
access via a process ID rather than the process struct. To make the API
uniform, break these tools out into a new prefix: bu_pid instead of
bu_process.

Also update return and input types to pid_t for extra clarity.
2024-04-22 15:44:11 -04:00
f4alt 872bb4bb12 update process_open / _close desc 2024-04-22 11:40:16 -04:00
TheZouave007 600b5c559e Fix indenting on the hit sort 2024-04-21 11:08:13 -05:00
TheZouave007 5ac712c69e Remove btg.h from CMakeLists.txt in librt 2024-04-20 22:06:25 -05:00
TheZouave007 6183106321 refactored make_oriented_segs to leverage dynamic arrays and get rid of MAXHITS 2024-04-20 21:13:17 -05:00
Clifford Yapp b6e80c58c2 Merge branch 'main' into facetize 2024-04-20 11:22:12 -04:00
Daniel Rossberg 058d4b491c minor changes
w/s, comments, clarification
2024-04-20 16:32:54 +02:00
TheZouave007 f479804583 Delete btg.h file as no one uses that interface anymore 2024-04-20 09:15:47 -05:00
TheZouave007 79cdf32ebd Remove code in btg.c and btgf.c as it is not used anymore. Those files are now stubs for the tie interface, one for the double interface and one for the float interface. 2024-04-20 09:13:36 -05:00
Clifford Yapp e0257ff477 Update src/bext to get Geogram RPATH patch 2024-04-19 21:52:09 -04:00
TheZouave007 ee9fb6f253 Add license information to cut_hlbvh.h 2024-04-19 16:52:09 -05:00
Clifford Yapp 01808c752e Be explicit that there are no parameters 2024-04-19 17:23:16 -04:00
Clifford Yapp fcd942bde8 Update src/bext to get OSX build fix for geogram superlu 2024-04-19 17:20:09 -04:00
Clifford Yapp 7178f4294f Nope, that wasn't it. Error is cryptic - 'dyld[#####]: Library not loaded: '' - almost as if it's trying to dyld an empty entry. 2024-04-19 17:19:43 -04:00
Clifford Yapp d8e38aa284 I think we need to let Mac OSX know where to find librt... 2024-04-19 14:48:39 -04:00
TheZouave007 49fa4ac54c collapse hlbvh_shot_raw and hlbvh_shot_flat functions together, just exposing a stubs to the user 2024-04-19 12:13:39 -05:00
TheZouave007 9399f969e3 Propogate stack size change back to hlbvh_shot methods 2024-04-19 11:57:17 -05:00
TheZouave007 15f05b2475 Remove old comment 2024-04-19 11:53:00 -05:00
TheZouave007 ff2aad53fc Fix -Wc++-compat warning 2024-04-19 11:50:20 -05:00
TheZouave007 1db97ca3fc Fix macro DA_APPEND to be less compiler-specific without throwing warnings. We can resimplify with typeof after C23 becomes standard 2024-04-19 11:48:58 -05:00
Clifford Yapp b4b233df1d Put the gen-attributes program next to where it is used. 2024-04-19 11:25:40 -04:00
Clifford Yapp 093c83af9a Getting a false positive here - lint command output has an 'invalid' in the string. Even though the command exists, we get a failure. Try looking for 'invalid command' instead 2024-04-19 11:12:25 -04:00
Daniel Rossberg c561b7fb03 a more feature-rich version og the LS-Dyna keyword file to BRL-CAD converter 2024-04-19 16:56:03 +02:00
joshbaker22 17c8e15710 Update help.tcl
update lc help
2024-04-18 14:57:07 -04:00
joshbaker22 a439807973 Update help.tcl
2 entries for LC - looks like one should be lint
2024-04-18 14:53:55 -04:00
Clifford Yapp 00798498a1 brep will probably need a keep step, like regions... 2024-04-18 11:07:50 -04:00
f4alt bafe842425 stub in proposed bu_process_read 2024-04-18 10:54:54 -04:00
Clifford Yapp 8fe9528712 Remove unused containers 2024-04-18 10:54:20 -04:00
f4alt 1392c67f8a low hanging documentation fixes 2024-04-18 10:50:35 -04:00
Clifford Yapp fc375eef74 Lot to do here, but start working on updating experimental brep-only facetize experiment for new setup. 2024-04-18 10:36:38 -04:00
f4alt 5802025ddb consistent documentation 2024-04-18 09:24:05 -04:00
f4alt 2109858ce1 stub in proposed new process_wait func 2024-04-18 09:19:53 -04:00
Clifford Yapp 0099a8d1fb Merge branch 'main' into facetize 2024-04-18 08:53:59 -04:00
Clifford Yapp db71f9beca Initialize 2024-04-18 08:52:20 -04:00
Clifford Yapp be87965989 Return actual bool type 2024-04-18 08:51:08 -04:00
Clifford Yapp 21e55bf22e With the new check, we shouldn't need the reset flag. 2024-04-18 08:30:22 -04:00
f4alt d09cf124eb linux is so much easier than Windows 2024-04-18 08:12:00 -04:00
f4alt 15414e2839 add functionality to the alive check stub 2024-04-18 01:33:17 -04:00
f4alt 53b701b2fb add alive check using pid (only working Windows)
WIP commit - add a version of bu_process_alive that uses a process id
instead of the bu_process struct.
2024-04-18 00:57:40 -04:00
Clifford Yapp a2eb5ee18c Work in progress on checking for a running pid that claims ownership of the working facetize files - we want to avoid two MGED processes stomping on each other accidentally. 2024-04-17 17:13:51 -04:00
f4alt 5a4a8463b0 stub in proposed bu_process_create func
will eventually replace bu_process_exec
2024-04-17 16:38:44 -04:00
f4alt a14989b908 rearrange process.h definitions so like-functions are together 2024-04-17 15:59:58 -04:00
TheZouave007 10dec2ac44 Added new file cut_hlbvh.h to ignored files in CMakeLists.txt 2024-04-17 14:19:47 -05:00
TheZouave007 7a52ec5576 Deleted g_bot_include.c and updated the CMake to reflect that 2024-04-17 14:19:47 -05:00
TheZouave007 5bac1fe397 remove extra #undef since we got rid of the initial define earlier 2024-04-17 14:16:49 -05:00
f4alt 465b06dd7e beef up our bu_process tests
ifdef tests for async reading.

NOTE: once bu_process changes get ironed out, it'd probably be
advantagious to itemize out all the tests in CMakeLists.txt rather than
using 'all'
2024-04-17 15:02:52 -04:00
f4alt ae5346fc64 stub in bu_process_alive
only (marginally) tested on windows
2024-04-17 14:46:40 -04:00
Clifford Yapp c2b662fa06 ws 2024-04-17 13:39:22 -04:00
Clifford Yapp 2f1a426b44 Merge branch 'main' into facetize 2024-04-17 13:38:10 -04:00
Clifford Yapp bb37d3a2a7 Note .emacs settings for enabling an Emacs package that gives you Vim keybindings 2024-04-17 13:35:32 -04:00
TheZouave007 5c8fe47945 Fix typo 2024-04-17 12:33:26 -05:00
Clifford Yapp 5c8602c632 Add bot check man page, note new man pages in NEWS file. 2024-04-17 13:32:42 -04:00
Clifford Yapp 81fad6afcd Add test files for libged bot commands 2024-04-17 13:29:58 -04:00
Clifford Yapp 0b879bb586 bot extrude enhancement to produce an evaluated BoT
Taking advantage of the Manifold boolean abilities, we are able to
properly realize the "bot extrude" feature and produce a mesh that is
the result of the evaluated CSG tree of primitives generated to
represent the implicit volume of a plate mode BoT explicitly.  The comb
tree that was previously produced can still be generated with the -C
option, but this is not recommended as those comb trees can be very
large and difficult to work with.

For large plate mode BoTs the extrusion process may be rather slow - the
boolean problem involved with evaluating the union of all individual
elements of the extrusion is difficult - but the output should be a
properly manifold representation of the plate mode volume.

Note that the output volume is ultimately an approximation of the
implicit plate mode volume - even in the simplest cases there can be
view dependent behavior of plate mode BoTs depending on incoming ray
angles.  Plate modes where the hit distance is always extruded out in
the direction of the ray are ignored - such behaviors are not
representable with volumetric geometry, and the standard "extrude in
both directions from the middle" volume will be generated regardless.
2024-04-17 13:27:39 -04:00
Clifford Yapp fed15b002d Expose the Manifold check as a bot check cmd
Manifold library's validity testing is key for determining whether a
given BoT is viable for boolean evaluation, so wire it in to the bot
check command.  It's added to the default checks and "solid" (solid is
the test implicitly selected when no specific test is asked for.)  The
specific Manifold test can also be run in isolation with the "manifold"
subcommand:

   bot check manifold input.bot

A warning will be printed if BRL-CAD's routines and Manifold disagree -
such a case probably warrants investigation to see if there is a
problem in either testing setup.
2024-04-17 13:14:17 -04:00
Clifford Yapp 48291aa52b check subcommand is using Manifold directly, so find and list it 2024-04-17 13:10:35 -04:00
Clifford Yapp 7d0102f51a Shouldn't be using these libs directly in bot, with the repair logic moved to librt 2024-04-17 13:05:31 -04:00
Clifford Yapp 14b1b29ab8 Add bot repair command to expose Geogram hole filling
The "repair" subcommand to the libged "bot" command will check if a mesh
is manifold.  If not, it tries to use the Geogram library's hole filling
routines to produce a manifold mesh.  It can either write out the new
mesh in-place, or to a user-supplied object name.

Note that this is intended to repair relatively small holes in nearly
manifold meshes - if a mesh is sufficiently messy, the original modeling
intent is lost and even a "repaired" mesh may not be very representative
of what an actual human modeler would have reconstructed.
2024-04-17 12:52:12 -04:00
Clifford Yapp c76083c401 Add function to apply Geogram hole filling to bots
This is the core logic used to apply Geogram's hole filling algorithm to
rt_bot_internal data.  At some point we'll probably want to allow
passing in a threshold parameter to control how aggressive the hole
filling should be - right now it basically tries to fill ANY hole.
2024-04-17 12:28:41 -04:00
Clifford Yapp c94421ce34 Add CMake find logic for Geogram 2024-04-17 12:25:22 -04:00
Clifford Yapp 2ec0dd3fc2 Merge branch 'main' into facetize 2024-04-17 12:22:10 -04:00
Clifford Yapp 6a0311a4c5 List Geogram find module 2024-04-17 12:21:48 -04:00
Clifford Yapp cd9706aace fix distcheck repo verify 2024-04-17 12:20:27 -04:00
Clifford Yapp d38560d373 Add some subcommand man pages for bot command 2024-04-17 11:14:01 -04:00
Clifford Yapp de5d6e92c4 Make a note of a resource for setting up Emacs with Vim keybindings - useful for vim folks wanting to use the DocBook editing features in Emacs. 2024-04-17 10:39:30 -04:00
Clifford Yapp 9885d10912 Move BoT repair feature to bot repair subcommand
Add the Manifold library's validity check to the "bot check" command as
an additional subcommand and part of the solid check.  The repair
functionality is renamed to a "repair" subcommand.
2024-04-17 10:25:05 -04:00
Clifford Yapp f82cca67c5 Merge branch 'main' into facetize 2024-04-16 21:48:16 -04:00
Clifford Yapp 038b7632af Test updating src/bext submodule 2024-04-16 20:54:03 -04:00
Clifford Yapp 5696b20423 Make sure we have non-empty strings for the SHA1 reports 2024-04-16 20:51:56 -04:00
Clifford Yapp 58462a3702 Adjust messaging based on whether src/bext is populated 2024-04-16 20:08:52 -04:00
Clifford Yapp 0286b6e72d Check to see if a populated src/bext is up to date
Because git submodules always point to a specific SHA1, there's no way
to tell src/bext to always pull the latest checkout of RELEASE when
doing the "git clone --recurse-submodules" checkout.  Since bext and
brlcad are decoupled, updating BRL-CAD/bext's RELEASE branch won't
automatically update the src/bext submodule.  In order to keep the two
in sync, in the cases where we have an internet connection validate the
local submodule SHA1 against the bext RELEASE branch's latest SHA1.
It's not a fatal error - we just warn if there's a mismatch and advise
updating src/bext to point to the latest.

In the case of a checkout of a release tag of BRL-CAD, src/bext should
be pointed to the equivalent rel-X-Y-Z branch of bext rather than
RELEASE.  Accordingly, we also check for that case if the RELEASE SHA1
doesn't match before concluding there's a problem.
2024-04-16 19:25:49 -04:00
TheZouave007 aef6fec9d8 Delete unused line of code 2024-04-16 16:34:38 -05:00
Clifford Yapp b6b50de1ee Set up bext as a submodule in src
A default "git clone" of BRL-CAD will not populate bext, so the more
minimal configure-driven "clone only what you need" process will still
be the default.  However, since that requires an internet connection to
work, we also want to make it as easy as possible to get a "full"
checkout of all the necessary sources, and setting up a submodule will
allow for the possibility of a "one shot clone everything" process with:

    git clone --recursive https://github.com/BRL-CAD/brlcad.git

This will result in a large checkout, since all the Appleseed and OSPray
dependencies will also be cloned, but it will obtain everything with one
command.
2024-04-16 17:06:45 -04:00
Clifford Yapp fa4c20db6e Merge branch 'main' into facetize 2024-04-16 16:57:53 -04:00
Clifford Yapp 3ffd84bc58 Getting weird Eigen find_package results due to find_package using the User Package Registry with stale info... disable looking there 2024-04-16 16:51:32 -04:00
TheZouave007 86bdce4962 Delete unneeded check in rt_bot_free 2024-04-16 14:19:30 -05:00
TheZouave007 4e20b8e635 change variable type to get rid of warning 2024-04-16 14:18:25 -05:00
TheZouave007 3742c200ef Add comment about functionality of vertex_normals in spatial_partition_s 2024-04-16 14:18:01 -05:00
TheZouave007 1d471c0ea1 Update MAXHITS to depend on DA_INIT_CAPACITY, we should remove MAXHITS when btg.c no longer exists 2024-04-16 13:55:53 -05:00
TheZouave007 f26409983e Get rid of a bunch of unused includes. These might be used in, and therefore break, the OpenCL pipeline or the new implementation of rt_bot_vertex_fuse(). If so, these can be added back later. 2024-04-16 13:42:58 -05:00
TheZouave007 dbd3096270 Remove internal references to 'tie' and replace with 'spatial_partition' or sps for 'spatial partitioning structure'. 2024-04-16 13:22:41 -05:00
Clifford Yapp 3ff543aef0 Remove logic relating to configure script autogeneration. 2024-04-15 20:06:56 -04:00
Clifford Yapp ab65d452ea INSTALL options won't change now based on 3rd party dependency building, so remove doc generation from CMake logic. 2024-04-15 20:03:44 -04:00
Clifford Yapp 3e5a15aa57 Remove logic to write configure translation lines and descriptions - management of building those components is now handled in bext 2024-04-15 19:53:14 -04:00
Clifford Yapp 871c70aaa3 Add the step directories so we can store the file lists there. 2024-04-15 19:49:24 -04:00
Clifford Yapp 7cc2892c0b Remove src/other references and logic
Still some TODO items - in particular need to think about whether to
have env2c scan bext source dir and simplify the BUNDLED/SYSTEM/AUTO
variable setup - but this removes the grand majority of the src/other
specific logic in the build system.
2024-04-15 19:19:36 -04:00
Clifford Yapp fec8f7df45 Update GitHub Actions workflows for bext building
Phew.  This was a lot more work than expected, but looks like we now
have a working path for building BRL-CAD with bext-based dependencies.
Particular considerations included:

1.  Had to provide an option for configure-driven bext builds to
    operation in non-parallel mode.  Parallel building was too much
    for the runners and resulted in failures (Tcl building was
    particularly fragile for some reason.)
2.  Qt6 - for the moment, going ahead and having bext build the subset
    of Qt that we need as part of bext building.  Should probably figure
    out how to used the cached Qt for some of the tests, but the full CI
    cycle is pretty long even without the Qt build and it is nice to know
    the full bext Qt + BRL-CAD stack is at least building across the
    various CI platforms.
3.  Space - in some tests we hit space limits for the VMs used as
    runners - being more aggressive about clearing out the bext
    source and build dirs from configure-driven builds to limit space
    consumption.
4.  CPack - the new trick CPack was taught to bundled bext in src
    for package_source builds is murderous on hard disk space, since
    CMake isn't efficient and makes one copy of everything for each
    archive type - see https://gitlab.kitware.com/cmake/cmake/-/issues/16249
    Probably need to make our own alternative to package_source using
    cmake -E tar so we can avoid more than one copying setup stage...

It's looking like the bext find logic (and BRL-CAD's for that matter)
may need a bit more work - a couple of Ubuntu dependency installs didn't
seem to result in the bext build skipping those components...
2024-04-15 15:34:44 -04:00
Clifford Yapp 03074e378e Various source and build logic changes to support bext building 2024-04-15 15:04:35 -04:00
Clifford Yapp 86c5c31b91 Remove the copies of the src/other licenses - these will now be provided by bext. 2024-04-15 15:02:19 -04:00
Clifford Yapp de756e3565 Repeat removal of src/other and misc/tools/ext
Getting ready to integrate updates to CI testing that will allow Github
Actions to work with bext dependencies.

This reverts commit a8812e44e6.
2024-04-15 14:51:41 -04:00
Clifford Yapp e665a5f16e Few more static analyzer adjustments 2024-04-15 13:30:27 -04:00
Clifford Yapp 75f8ac60e1 Use the ae values (caught by clang static analyzer) 2024-04-15 13:25:05 -04:00
Clifford Yapp 957f3126b4 Set the values in the right canvas (caught by clang static analyzer) 2024-04-15 13:23:36 -04:00
Clifford Yapp 37ac7f9e27 If doing bext build we need find logic for Qt in these cases 2024-04-15 12:24:11 -04:00
Clifford Yapp 2c0ed7eadf Another ignore flag for OpenMesh+clang 2024-04-15 12:21:32 -04:00
Clifford Yapp 83f6582630 Pull in some BEXT setup changes 2024-04-15 11:31:08 -04:00
Clifford Yapp 6edb21b34b Use one sentinel file for the tclscript generation 2024-04-15 11:24:27 -04:00
Clifford Yapp aca8476333 Make a stab at updating the pkgconfig templates - untested. 2024-04-15 10:58:59 -04:00
TheZouave007 8979ccb8a9 remove old line that was initally there to get rid of an unused variable error 2024-04-15 02:06:23 -05:00
Clifford Yapp 680101cf85 Ignore detria.hpp for regress repository checks 2024-04-13 11:00:47 -04:00
Clifford Yapp ad83e9653e Update to latest upstream detria 2024-04-13 08:36:41 -04:00
Clifford Yapp ed6b9392ee Add ifdef guarded tessellation code using detria
The detria header-only implementation of CDT is looking very
interesting.  Upstream changes made it work for a C++17 build, so add it
to the build for more extensive testing, guarded by a USE_DETRIA ifdef
check.

Have tried a few simple cases - facetize of a brep rcc, shaded drawing
of a few NURBS brep objects - but will need *extensive* testing to
verify it works as we need it to, which is why it's added behind an
ifdef conditional.  If this does pan out however, it would allow us to
remove our older, semi-forked poly2tri version in favor of a new
header-only implementation that is much simpler to integrate.  Upstream
testing results suggest it may also be somewhat faster.
2024-04-12 22:39:22 -04:00
TheZouave007 2803fb79b8 Update comments 2024-04-12 21:12:17 -05:00
Clifford Yapp ef143bde02 Note OpenABF as a possible help for remeshing here (have cases where planar projection doesn't work, so we do need something more powerful to fall back on.) 2024-04-12 21:47:39 -04:00
TheZouave007 4f9b6cf223 Added a stack size and checking for stack overflow in bot_shot_hlbvh_flat 2024-04-11 23:20:33 -05:00
TheZouave007 16b17e0160 Fixed some old comments 2024-04-11 23:18:19 -05:00
TheZouave007 48c9463a7c Changed RT_EXPORT to extern - this code is meant to be used interally by librt 2024-04-11 23:17:18 -05:00
TheZouave007 b0036fa9c2 Looked at some data and decided on a good default for RT_DEFAULT_MINTIE 2024-04-11 23:14:00 -05:00
Clifford Yapp 8b6905b75a Checkpoint experiment replacing poly2tri with https://github.com/Kimbatt/detria (not working yet) 2024-04-11 21:41:12 -04:00
Clifford Yapp 97a0b24ef2 When trying a C++20 std build, getting an error about a deleted function here. 2024-04-11 21:34:11 -04:00
Clifford Yapp 7ad254da54 Looks like pc.h structs are present at least one or two places in librt. Untangle that later - for now, just put it back. 2024-04-11 18:39:03 -04:00
Clifford Yapp 660af97159 Merge branch 'main' into facetize 2024-04-11 18:37:46 -04:00
TheZouave007 2015612c3d Disable unavoidable warnings in macros 2024-04-11 11:28:22 -05:00
TheZouave007 e63eec9950 Removed unused variable and parameter in rt_bot_oriented_segs 2024-04-11 11:28:22 -05:00
TheZouave007 ed1daa9ff8 Removed unused parameter in rt_bot_unoriented_segs 2024-04-11 11:28:22 -05:00
TheZouave007 46358469d6 Eliminated unused variables and parameters in rt_bot_surface_segs 2024-04-11 11:28:22 -05:00
TheZouave007 082d5324ec Deleted code that supported raw bvh_build_node mode, because we saw in performance testing (for both memory and time) that the memory win was worth the time hit. 2024-04-11 11:28:22 -05:00
TheZouave007 05ddefa9ea Add flattened shot function 2024-04-11 11:28:22 -05:00
TheZouave007 b762682763 Fix very long line 2024-04-11 11:28:22 -05:00
TheZouave007 3e6470de05 Modified bot.c to have an #if switch between flattened and raw modes 2024-04-11 11:28:22 -05:00
TheZouave007 ab8738aa1e Add flattening wrapper; correct exported function to be the wrapper; Add functions to use 'bvh_flat_node's instead of 'bvh_build_node's; disambiguate between flat and raw functions 2024-04-11 11:28:22 -05:00
TheZouave007 4a11c250ee Change hlbvh_shot to hlbvh_shot_raw and update cut_hlbvh.h 2024-04-11 11:28:22 -05:00
TheZouave007 61e3b9056b Move the location of hlbvh_shot to be below hlbvh_create 2024-04-11 11:28:22 -05:00
TheZouave007 141b8d5c02 Added a bvh_flat_node structure to cut_hlbvh and copied out flatten_bvh_node fron the OpenCL code and modified it to compile 2024-04-11 11:28:22 -05:00
TheZouave007 3883fa3590 Actually plug in LIBRT_BOT_MINTIE into the parameter in hlbvh_create 2024-04-11 11:28:22 -05:00
TheZouave007 5517e727c8 Fixup a comment 2024-04-11 11:28:22 -05:00
TheZouave007 75a020b2bf Add deallocations of dynamic hit arrays into rt_bot_free 2024-04-11 11:28:22 -05:00
TheZouave007 338874ab2d Add caching of bu_avail_cpus in tie_s, because we were spending a lot of time asking about it 2024-04-11 11:28:22 -05:00
TheZouave007 197d5ea0a5 integrate bot_shot_hlbvh into rt_bot_shot 2024-04-11 11:28:22 -05:00
TheZouave007 35780fceb8 pull code over from cut_hlbvh.c and inline the triangle intersection and hit registering into it 2024-04-11 11:28:22 -05:00
TheZouave007 6d0f178183 remove recursive bvh_build_node shooting implementation 2024-04-11 11:28:21 -05:00
TheZouave007 01e18513b6 precompute inverse of r_dir for speed in while_populate_leaf_list of cut_hlbvh.c 2024-04-11 11:28:21 -05:00
TheZouave007 ee3c762bb5 Convert recursive bvh_build_node checking into a while loop 2024-04-11 11:28:21 -05:00
TheZouave007 771d5057e0 set up thread-local hit arrays 2024-04-11 11:28:21 -05:00
TheZouave007 a2394bdb6e Added macro-based dynamic array management to bot.c 2024-04-11 11:28:21 -05:00
TheZouave007 0333ee26b9 Added comment message for hlbvh_shot in cut_hlbvh.c 2024-04-11 11:28:21 -05:00
TheZouave007 b4ba068d31 Change rt_bot_prep triangle copy to reduce generated warnings 2024-04-11 11:28:21 -05:00
TheZouave007 f9df7546cc Removed unused code 2024-04-11 11:28:21 -05:00
TheZouave007 3b23c997b2 move code around so that segment code is between bot interface code and loading code; update comment on rt_bot_shot; add forward declare for rt_bot_makesegs for rt_bot_shot 2024-04-11 11:28:21 -05:00
TheZouave007 0f632503c8 Delete unused function rt_bot_piece_hitsegs 2024-04-11 11:28:21 -05:00
TheZouave007 5af2e143cc Removed unneeded functions from bot.c and table.cpp 2024-04-11 11:28:21 -05:00
TheZouave007 2e0a7e46e4 Fix call to bu_free in rt_bot_free 2024-04-11 11:28:21 -05:00
TheZouave007 f8fc3ea551 Change use of ordered_faces[i] to bot_ip_index for readability in copying triangles in rt_bot_prep 2024-04-11 11:28:21 -05:00
TheZouave007 b188667c7c add freeing of batched vertex normal memory 2024-04-11 11:28:21 -05:00
TheZouave007 1964e42fc1 fix normal check to be sure face is in bounds 2024-04-11 11:28:21 -05:00
TheZouave007 d2ed652ec5 batch allocate vertex normals 2024-04-11 11:28:21 -05:00
TheZouave007 25cf04ef75 Change large callocs into mallocs in rt_bot_prep 2024-04-11 11:28:21 -05:00
TheZouave007 f05f0f3a68 Added normal debug prints 2024-04-11 11:28:21 -05:00
TheZouave007 6be48c8e44 Get the indexes for the normals with the correct triangle index; Triangle normals are now working!!!! 2024-04-11 11:28:21 -05:00
TheZouave007 a953f93022 Actually index into the correct normal array 2024-04-11 11:28:21 -05:00
TheZouave007 089c04fcf4 Fix triangle intersection code 2024-04-11 11:28:21 -05:00
TheZouave007 ff57ecbde0 We have completely changed over to using triangle_s, however the issue remains. 2024-04-11 11:28:21 -05:00
TheZouave007 118b237215 In the process of modifying bot.c to use triangle_s instead of tri_specific_float or tri_specific_double, we currently compile but will segfault on a blind cast in rt_bot_makesegs 2024-04-11 11:28:21 -05:00
TheZouave007 2664914341 removed old include 2024-04-11 11:28:21 -05:00
TheZouave007 7356a6bf46 Moved hlbvh include stuff from space_partition.h to cut_hlbvh.h; moved bvh_build_node definition into cut_hlbvh.h 2024-04-11 11:28:21 -05:00
TheZouave007 2b848576a3 Fix BVH exit condition for realz this time 2024-04-11 11:28:21 -05:00
TheZouave007 9d3bd165dd Simplfy AABB-ray check in hlbvh with FMIN and FMAX macros; make assert for children more explicit; add comments 2024-04-11 11:28:21 -05:00
TheZouave007 e1817cf31a Got rid of old comment 2024-04-11 11:28:21 -05:00
TheZouave007 c8e74a13eb Removed extranious rt_bot_bbox call in rt_bot_prep; Replaced triangle bounds calculation in rt_bot_prep with macro; Modified stp global bounds setting to give better radii; turned the rt_bot_norm function into a stub because it was causing segfaults - replicated side-effects into rt_bot_shot 2024-04-11 11:28:21 -05:00
TheZouave007 86ad546e48 Added parenthesis to BBOX_NONDEGEN macro 2024-04-11 11:28:21 -05:00
TheZouave007 f645a2970f fix conditions for aabb in hlbvh and triangle intersection 2024-04-11 11:28:21 -05:00
TheZouave007 69e1f460fd Add hit sorting; Fix spacing; Add comments 2024-04-11 11:28:21 -05:00
TheZouave007 7f39c941b6 Actually init stp box stuff; normalize calculated triangle normal; fill out rt_bot_free; convert triangle_s to points and vects; update hlbvh code to read as triangle agnostic (which it was); add todos 2024-04-11 11:28:21 -05:00
TheZouave007 37105a0fae Got shot compiling 2024-04-11 11:28:21 -05:00
TheZouave007 2cabdee0a3 Added ordering of triangles, preliminary tie structure, and hooked it all up 2024-04-11 11:28:21 -05:00
TheZouave007 d6b4f60a60 Got hlbvh build working! 2024-04-11 11:28:21 -05:00
tr-tamu 993405daa0 Merge pull request #1 from BRL-CAD/main
Update main to match BRLCAD main
2024-04-11 11:19:00 -05:00
Clifford Yapp 66945ba60e Make sure the clone is in the binary directory - if cmake is run from somewhere else and specifying the build directory via options, we need to be explicit about this. Not doing so resulted in a bext configure attempt finding the top level CMakeLists.txt file from brlcad again and re-running that configure. Noticed it in CI testing when we were losing a setting, but consequences were probably wilder than just that... 2024-04-05 13:43:33 -04:00
Clifford Yapp 3c486834e1 Looks like firing off the bext builds in parallel is a bad idea on the Github runners. Make this configurable, with the default value the same as what we were using before. 2024-04-05 10:28:01 -04:00
Clifford Yapp a8812e44e6 OK, BRL-CAD's Github CI isn't ready for bext yet - revert
Revert "Remove the src/other and misc/tools/ext dirs"

This reverts commit 7cf80c570b.
2024-04-04 17:25:48 -04:00
Clifford Yapp a31d80e63d Merge branch 'main' into facetize 2024-04-04 16:47:38 -04:00
Clifford Yapp 7cf80c570b Remove the src/other and misc/tools/ext dirs
The motivation for doing this is to fully decouple our third party
bulding logic from BRL-CAD's primary build and allow our use of third
party components to scale beyond just what is feasible within our main
tree.  Integration of independent build systems has always been a source
of issues, and when it comes to very large prospective dependencies
(Boost, LLVM, Qt, etc.) our existing approaches simply weren't
practical.  Consequently, a new appoach was developed - using a
completely separate repository to focus solely on the management of
third party components.  In this new scheme the only role BRL-CAD's
build system has is to copy and bundle provided third party outputs, as
well as pointing CMake's "find_package" logic preferentially to those
local copies if they are present.  The new "gist" tool already depends
on this approach when bundling OpenCV; that dependency was never
integrated into src/other/ext, and so requires either a system version
or a bext-based build.  There is also additional experimental code in
branches and off-by-default compilation units that already depends on
bext.

In bext-based compilation, if user does nothing to specify any bext
inputs the BRL-CAD configure process will attempt to do its own clone,
configure, and build of the elements of bext necessary for the current
build configuration, based on the configuration settings.  If a
pre-existing copy of the bext source tree is present in an expected
location, the clone step can be skipped - otherwise a network
connection must be present to download the sources.  If BRL-CAD's
configure is doing the configure+build steps for bext, it will enable
only the necessary compoennts.

If the user has a pre-compiled bext output directory they wish the build
to use, rather than building components as part of configure, the
BRLCAD_EXT_DIR variable may be used to point the build to that tree.
Note that in that mode, BRL-CAD's build will bundled whatever files are
present in the provided outputs - for example, if Qt6 is present in the
bext output directory specified but BRL-CAD's BRLCAD_ENABLE_QT feature
is off, a generated output package will still contain Qt6 even though it
is unused per the BRL-CAD configure and build settings.

We have been working to shift our CMake build logic from in-tree
src/other and misc/tools/ext directories to pulling from the
https://github.com/BRL-CAD/bext respository.  Logic is already in place
to support the latter, conditionalized on whether src/other and
misc/tools/ext are present in the source tree.

By removing these two directories, we are making the bext logic "live" -
testing has gone well thus far, so it is time to iron out any remaining
practical issues with this approach.
2024-04-04 16:07:14 -04:00
Clifford Yapp 8203528f90 Merge branch 'main' into facetize 2024-04-04 15:12:26 -04:00
Clifford Yapp 74ed77fb03 Initialize old_dbip in ctx 2024-04-04 15:11:53 -04:00
Clifford Yapp 85ed565203 Merge branch 'main' into facetize 2024-04-04 14:17:17 -04:00
Clifford Yapp fa9541afdf Revert "db_free_tree handles the nmg_kr calls"
Caught by Sean - the facetize logic in main does need these calls to
avoid leaking memory.

This reverts commit 1602a19e0b.
2024-04-04 14:13:13 -04:00
Clifford Yapp 7f682300ee Put back the pkgconfig file templates, with notes
This reverts "Remove the old autotools pc.in files" (commit
48bc30b152) but also notes that we have
some work to do if we want to properly integrate these with the CMake
build logic.  In an ideal world these should probably be an output
of BRLCAD_ADDLIB.
2024-04-04 13:38:07 -04:00
Clifford Yapp 377a37543f Merge main into facetize 2024-04-02 22:51:58 -04:00
Clifford Yapp 457c1ad4fa Note where to go to find the definition logic for the *_deps variables. 2024-04-02 19:02:51 -04:00
Clifford Yapp 2a6eede5d5 List file for CMake 2024-04-02 16:34:03 -04:00
Clifford Yapp 4cd547ee4c Consoliate find_package resets into BRLCAD_Find_Package
Per suggestion from Sean, most (but not all) of the find_package cases respect
a similar pattern.  Rather than have one macro per package, it would be better
to make a generic wrapper that handles most of the cases and use it.

The key to making this work is the CACHE_VARIABLES directory property, which
gives us a way to get a "before and after" insight into what a find_package
call has done to the cache.  Once we know that, we can use unset(CACHE) to
clear those values from the cache.  We also make sure to save and then restore
the values to the working variable state, so we don't destroy the find_package
results for the working session.

We do, however, still need something in the cache so the BRL-CAD Summary
printing knows what happened - the find_package variables are scoped in their
calling directories and aren't directly visible.  To handle this, we write out
a *_STATUS variable for each package and teach the Summary logic to look for
it.  The *_STATUS variable isn't functional, so it is harmless as far as
find_package is concerned, but it still gives us what we need for the final
summary.  Nor does it matter that the value will be overwritten by mulitple
calls, since the results of multiple BRLCAD_Find_Package calls with the same
package should always be the same.  (If not, it is an error.)
2024-04-02 16:17:38 -04:00
Clifford Yapp 44a51f8666 Try a different approach to tclIndex/pkgIndex
We're still getting occasional problems with errors generating these
files in parallel builds.  Take the build targets out of the equation
and generate a script that executes each command in order.  Then run
that script with a single custom target and custom command.

Needs testing in multiconfig environments - not sure if $<CONFIG> will
do what needs doing here...
2024-04-01 19:15:15 -04:00
Clifford Yapp b4ebe60ea8 Right - without the whole-directory list, the regression tests will need to assemble their own list of what's in the license directories. 2024-04-01 17:20:02 -04:00
Clifford Yapp f7cbb3e519 Correct filename 2024-04-01 17:01:55 -04:00
Clifford Yapp 628a368a10 Avoid target name collision 2024-04-01 16:33:16 -04:00
Clifford Yapp e687ef4065 Disable some more directories and targets if we're doing a minimalist build. 2024-04-01 16:28:32 -04:00
Clifford Yapp 48bc30b152 Remove the old autotools pc.in files
We're not set up to generate these in CMake, and there doesn't seem to
be a trivial way to extract the information from the build files in the
format they are expecting.  Would probably be more useful to first look
at supporting a "modern" style find_package call for BRL-CAD by
producing the expected files in lib/cmake (needs more research.)
2024-04-01 16:12:19 -04:00
Clifford Yapp 61a8e6296e Don't process the terra.bin file unless we've got at least gcv enabled 2024-04-01 16:07:01 -04:00
Clifford Yapp 8e4d68a8ce With a bext build, these are coming from the bext repo 2024-04-01 16:05:00 -04:00
Clifford Yapp 3e9db999fb Correct name in comment 2024-04-01 15:42:07 -04:00
Clifford Yapp 22af994845 Install license files based on whether they are in use per the targets. REQUIRED target should be the lowest level target that can activate the component. May have to make this more powerful if we need to list multiple activating targets - REQUIRED needs all the listed targets to be active, and what we would need in that case is 'at least one active. 2024-04-01 15:27:34 -04:00
Clifford Yapp 99d669db0e Need the attribute_DEPS dependencies to be listed 2024-04-01 14:11:53 -04:00
Clifford Yapp 1926b8d706 Need to stash this in the cache for the summary printing, or we get a NotFound report even when it's there for the build. 2024-04-01 13:58:32 -04:00
Clifford Yapp 9f557be05b Adjust Eigen includes 2024-04-01 13:48:00 -04:00
Clifford Yapp 236c52df19 Try teaching ADD_DOC to support a REQUIRED flag 2024-04-01 13:00:37 -04:00
Clifford Yapp 38960fad38 Get more selective about when to enable the man5 man pages 2024-04-01 12:40:05 -04:00
Clifford Yapp b412dcbd86 Scrub out obsolete BRLCAD_LEVEL* vars 2024-04-01 10:24:42 -04:00
Daniel Rossberg 3069f25557 Merge pull request #118 from AliHaider93/main
k-g.cpp converter patch:
the k-g converter was producing and empty data base, the error is due to the function ifsteam::tellg() returning a wrong position, the fix is to specify the input file as binary when opening the ifstream.
2024-03-31 20:00:16 +02:00
Ali haydar a1a73f1a02 Merge pull request #1 from AliHaider93/AliHaider93-patch-1
Update k-g.cpp
2024-03-31 12:09:42 +02:00
Ali haydar 5ba18bcb6f Update k-g.cpp 2024-03-31 12:03:42 +02:00
Clifford Yapp 94046a89e8 Fix header 2024-03-29 22:04:24 -04:00
Clifford Yapp 315c79b588 More logic trimming, remove the BRLCAD_IS_SUBBUILD conditionals. We're figuring out how to use ExternalProject_Add effectively with BRL-CAD, and that seems to be the scalable approach. Realistically, our build is too complex to be practical as an add_subdirectory inclusion, particularly with bext coming online soon. 2024-03-29 21:58:42 -04:00
Clifford Yapp f6e23a64e1 Should be out of scope now 2024-03-29 21:36:06 -04:00
Clifford Yapp e4b024d44f Another older standards related test that should hopefully now be moot 2024-03-29 21:26:55 -04:00
Clifford Yapp 0365483c77 Our minimum required standard is now way beyond C++11 - remove the old feature testing. 2024-03-29 21:18:25 -04:00
Clifford Yapp bf65ca795c Separate the test and the CONFIG_H logic 2024-03-29 21:14:32 -04:00
Clifford Yapp 031cca5966 Remove a few HAVE_* tests that no longer appear in our code. 2024-03-29 21:02:36 -04:00
Clifford Yapp 5fcb96865f These don't appear to be used in our current code 2024-03-29 20:47:02 -04:00
Clifford Yapp 7782264e13 Use CMakePushCheckState 2024-03-29 20:30:59 -04:00
Clifford Yapp 4772288735 FILE_LANG CMake function does not appear to be used any longer 2024-03-29 20:21:47 -04:00
Clifford Yapp c9bb4da572 libbu appears to be the only BRL-CAD source concerned about these defines. 2024-03-29 20:19:54 -04:00
Clifford Yapp 56da410455 Remove what appear to be unused files 2024-03-29 20:03:45 -04:00
Clifford Yapp 66c63f830a Make some defines specific to libraries part of their compiles rather that top-level brlcad_config.h settings, add missing find_package_tcl calls. 2024-03-29 20:01:21 -04:00
Clifford Yapp b6a0e86474 Remove debug messages 2024-03-29 19:16:40 -04:00
Clifford Yapp 65b7f64e3a Right, qged dir gets added even when Qt is off 2024-03-29 19:15:18 -04:00
Clifford Yapp 93b4a5fcfa Add a useful trick to gitconfig for when you want to turn your last two (or more) commits into a single commit 2024-03-29 19:08:51 -04:00
Clifford Yapp 9aae8d20bc May need BRLCAD_SOURCE_DIR rather than CMAKE_SOURCE_DIR for this check. 2024-03-29 19:01:07 -04:00
Clifford Yapp a750437537 List teapot control image for CMake 2024-03-29 18:25:31 -04:00
Clifford Yapp b4e516e87c Needs more testing, but got UtahRLE reading and writing pulled in to libicv. 2024-03-29 17:16:14 -04:00
Clifford Yapp 76b8ae8d78 shorten name 2024-03-29 16:22:01 -04:00
Clifford Yapp 3d3fc7ccbe Using old rle-pix tool as a guide, get basic rle image read working. 2024-03-29 16:17:31 -04:00
Clifford Yapp ce3fe55b66 Stash an rle version of the Tk test teapot img
It's looking as if we didn't hook UtahRLE conversion support into
libicv, which means we don't currently have the ability to read and
write them exposed in our tools - need to fix that.

rle images aren't common, so we create one by using the netpbm utility
pnmtorle to convert the Tk test image of the teapot, and then passed
that result through the old Utahrle tools rletoraw and rawtorle.  Using
the netpbm rletopnm to convert the result back into something viewable
indicates the conversions were sane, so this should at least give us
something to work with.  Also add the original Tk version of the image
(which is already in our repo history anyway via Tk) to use as a
control.  In principle we ought to be able to read these both in with
libicv and get a clean diff comparison.
2024-03-29 14:44:35 -04:00
Clifford Yapp 894cc62c38 With the new bext logic, modularlize/localize find
misc/CMake/BRLCAD_ExternalDeps.cmake holds the find_package logic for
the bext components, but for a modular build we don't want to be doing
all the find_package calls right away.  If some components are disabled
we never need to look for their dependencies at all.

To make this work, we define macros that encapsulate what is needed for
a resettable find process for each package (we use macros rather than
functions deliberately here, otherwise the function scope encapsulates
the find_package output variables and we would have to PARENT_SCOPE
export the ones we care about - that's possible, but for now it's extra
work and we can do it later if it looks like it would be beneficial.)

The new macros are then called in the subdirectories where those
packages are actually needed/used.  Because the scope of the
find_package results isn't global except for variables being written to
the cache, we call the macros separately in the various places we need
them, but that should be acceptable - the results should always be the
same, and the extra work of repeating the finds is minimal compared to
the overall build and modularity benefits.

This lets us build (for example) librt and its dependencies with:

cmake .. -DBRLCAD_COMPONENTS=librt && make -j3

If we let the BRL-CAD cmake configure also do its own bext build, it
will try to enable only the bext dependencies needed for the active
configuration (a pre-supplied bext, on the other hand, is what it is -
the logic will not try to pick and choose just the files needed from an
already created output directory, as there is no way to reliably tell
what is needed and what isn't.)

The next step is probably to look at whether it makes sense to push the
various configure checks for headers and functions down closer to where
they are needed as well.  That would probably mean revisiting
brlcad_config.h - we'd either need to define private headers for the
various individual libs and programs to use instead, or supply command
line defines (the latter might make more sense if we only have a small
number of defines relevant to a particular component.)  Would also need
to determine which parts of brlcad_config.h really need to be part of
the install, and which parts are build-time only.
2024-03-29 14:12:37 -04:00
Clifford Yapp 2a2f0995be Make sure to list the common.h directory as well 2024-03-29 09:15:52 -04:00
Ian Beckett 1d8a76b280 Merge branch 'main' of github.com:BRL-CAD/brlcad 2024-03-28 14:22:09 -05:00
Clifford Yapp efc54e622d Correct logic for BRLCAD_EXTRADOCS=OFF 2024-03-27 18:35:30 -04:00
Clifford Yapp a01c074432 Add include directory listings for fft executables, which need the config file 2024-03-27 15:42:23 -04:00
Clifford Yapp 679680bbc7 Only try ADD_DOCBOOK if BRLCAD_EXTRADOCS is set 2024-03-27 15:10:35 -04:00
Clifford Yapp f120881cb1 Probably don't need to conditionalize this - useless on other platforms, but should be harmless 2024-03-27 14:21:54 -04:00
Clifford Yapp 93aa23e696 We should be paying attention to the status of bext configure/build steps, if we're attempting them. 2024-03-27 10:36:06 -04:00
Clifford Yapp cf38f484ad Look for a BRLCAD_ENABLE_APPLESEED flag to do the full Appleseed build stack with the configure bext checkout/build (enabling this, especially with ENABLE_ALL, will result in a VERY long configure...) 2024-03-26 20:24:37 -04:00
Clifford Yapp ea3d1a0717 Update INSTALL minimum versions. (Note - haven't actually tested these old versions, basing on online references indicating what compiler versions various language features...) 2024-03-26 20:12:23 -04:00
Clifford Yapp d31a556d60 List files for CMake 2024-03-26 19:59:00 -04:00
Clifford Yapp e5cf5faf44 Remove NOTFOUND include dir entries from the list. 2024-03-26 19:54:50 -04:00
Clifford Yapp bac25b8e0b Use BEFORE for most of the local target_include_directories additions. 2024-03-26 17:15:20 -04:00
Clifford Yapp 57eada581b Do header sorting in per-target assignment setup
We don't want to give up the preferential ordering we had established
for our local headers with the previous include scheme, so rather than
using generator expressions (which offer no opportunity to arrange
the order of accumulated headers) we read the target properties and
build up include lists that can be sorted at configure time.

Probably worth examining more closely which headers end up in public and
private groupings - not sure manifold and poly2tri need to be in public,
for example - but for now this builds.

TODO: Individual additions to the exec includes probably should be
specifying the BEFORE property to make sure they receive preferential
ordering, unless we're locally adding a system find_package result...
2024-03-26 16:45:20 -04:00
Ian Beckett decf99a8b5 Merge branch 'main' of github.com:BRL-CAD/brlcad 2024-03-26 14:30:27 -06:00
Clifford Yapp 9550739f1c Let BRLCAD_ADDEXEC and the target properties do most of the work of propagating the includes 2024-03-26 15:43:17 -04:00
Clifford Yapp 45e07f46a3 Remove debugging messages, explain use of SYSTEM with INTERFACE_INCLUDE_DIRECTORIES 2024-03-26 13:19:12 -04:00
Clifford Yapp d565fe020e Rework BRLCAD_ADDLIB to use target_include_dirs
Modern CMake practice uses target properties for include dirs, rather
than per-directory includes.  This is a significant change to the
BRL-CAD CMake logic, so start in a contained fashion with BRLCAD_ADDLIB.

The idea is to propagate the interface includes of dependencies using
these properties, rather than having to explicitly list them out.  Logic
should be more compact overall, as well as letting us more precisely
target include dirs to their intended targets even when there are
multiple targets defined in one directory.
2024-03-26 13:13:10 -04:00
Clifford Yapp 3357887874 Blegh - forget it, just pass in the options explicitly. 2024-03-26 08:46:31 -04:00
Clifford Yapp 2271f93808 Fix quoting on execute_process lists 2024-03-25 16:41:06 -04:00
Clifford Yapp cb38e246f3 No longer need the NO_TARGET flag 2024-03-25 16:26:29 -04:00
Clifford Yapp 8ecf9cdeca Only set up lib headers if the build targets indicate we need them. Also, remove brlcad.i swig file, RtServerImpl.h and rtserver.h from installed headers list - none of these appear to be active, and are probably candidates for removal. 2024-03-25 16:14:15 -04:00
Clifford Yapp aa2964b1c4 Don't build Docbook docs unless the defined targets seem to indicate we should. 2024-03-25 16:12:35 -04:00
Clifford Yapp 802ae866a5 Modularize the src dependency definitions so they can be used both in src/ itself and in the bext configure process. 2024-03-25 16:11:46 -04:00
Clifford Yapp 176c2b17f5 Merge branch 'man_page_rework' 2024-03-25 13:53:16 -04:00
Clifford Yapp d83ada9a11 Update CMAKEFILES for new logic 2024-03-25 13:51:31 -04:00
Clifford Yapp 5b1b6fdbd3 Shift the Docbook setup before the main exec targets, conditionalize some of the regression tests based on target availability. 2024-03-25 11:36:42 -04:00
f4alt d0dfc95205 remove debug message 2024-03-25 10:23:37 -04:00
Clifford Yapp 1be40344f6 More work on target naming 2024-03-23 12:04:08 -04:00
Clifford Yapp 469ed7698a Rework build target/man page interaction to better handle modular build. 2024-03-22 21:01:56 -04:00
Clifford Yapp a64773a124 Can probably key the mann pages off of libged, but the man1 pages are a different story... 2024-03-22 17:29:11 -04:00
Clifford Yapp a7dfef176a Test mechanism to optionally require targets to build man pages
This will need some thought, since we originally consolidated the man
page targets to avoid exploding the target count in Visual Studio, but
to support a cleaner modular build we need to avoid building man pages
or things that have been disabled.

One possibility might be to handle the Docbook building right in the
BRLCAD_ADDEXEC and/or plugin functions and make them part of the main
exec/plugin build.
2024-03-22 17:21:01 -04:00
Clifford Yapp 0d2e26e3f2 Initialize help variable 2024-03-22 16:55:09 -04:00
Clifford Yapp 85731f64de Add lmdb include dir 2024-03-22 16:10:54 -04:00
Clifford Yapp 6459eb72f6 Make sure we are building required tools before defining conversion targets. 2024-03-22 13:25:54 -04:00
Clifford Yapp 101d2a0764 Switch new dbconcat behavor to off-by-default
Enable the new lazy affix application with a -L option, rather than
changing the existing default behavior
2024-03-22 12:32:34 -04:00
Clifford Yapp e8a6bcf8cd Restore dbconcat changes so we can work on behavior adjustment 2024-03-22 12:12:53 -04:00
Clifford Yapp 936d6cbe72 Restore the red attribute standardizations so the regression tests pass 2024-03-22 12:12:14 -04:00
Clifford Yapp 093fcee65e Looks like we need this avs standardize call for drawing colors to work. 2024-03-22 11:59:45 -04:00
Ian Beckett 486f60b4b6 Merge branch 'main' of github.com:BRL-CAD/brlcad 2024-03-21 13:36:55 -06:00
Clifford Yapp b4f28c8cb8 Prototype a more modularized build approach
Instead of the three levels previously defined, explore supporting
specifying one or more "components" of BRL-CAD to be enabled.  The idea
would be that if a user defines (say) -DBRLCAD_COMPONENTS=librt then
only librt and its dependencies would be enabled for compilation.

For this to be properly realized a lot of higher level build logic will
have to be conditionalized based on whether various targets are
available (for example, regression tests will need to be disabled if
their executables aren't defined as targets) but this should let us be
way more flexible when it comes to "only build what we want" situations.
2024-03-21 15:20:13 -04:00
Clifford Yapp acb3fccff7 Revert "Should be able to use BU_DIR_CACHE to override LoD location - set up test"
This reverts commit 496b049ece.

Needs a lot more testing
2024-03-21 15:15:35 -04:00
Clifford Yapp 1c7bce3b2f Revert dbconcat update for now - breaking ged push regression test
This reverts commit 04b73749f9.

Also put the regress test itself back where it was.
2024-03-21 15:12:36 -04:00
Clifford Yapp 5d4fd08068 Remove db5_standardize_avs calls, add attr standardize
The db5_standardize_avs process proved to be too expensive to run every
time we are reading and writing a comb.  Instead, add a "standardize"
subcommand to the attr command to allow the user to trigger the process
manually.
2024-03-21 12:16:44 -04:00
Clifford Yapp c5b164b8c6 facetize is getting reworked a different way - in theory we could try to update libnmg to leverage the techniques used by Manifold for robustness, but that would be a substantial effort. 2024-03-21 11:05:29 -04:00
Clifford Yapp 50d4ee6c3c Include bu/malloc.h for BU_GET/BU_PUT 2024-03-21 10:56:15 -04:00
Clifford Yapp 8b921d4de7 Correct file location 2024-03-21 10:46:50 -04:00
Clifford Yapp 97ccb56c31 Sean enhanced termlib for Windows 2024-03-21 10:42:16 -04:00
Clifford Yapp 4faaad3a4f List new dbconcat options in help 2024-03-21 10:31:54 -04:00
Clifford Yapp 5c82eee6b3 ged push regression test expect the 'always append' prefix dbconcat naming. 2024-03-21 10:26:08 -04:00
Clifford Yapp 568b970e3e Update GCT TODO item 2024-03-21 10:24:05 -04:00
Clifford Yapp 59f40b17f7 Move the data hash API into the bu/hash.h header 2024-03-21 10:23:44 -04:00
Clifford Yapp 5639ebec6b Remove SPSR TODO note
With bext coming online, I think the direction we're going to want to go
here is to have the latest upstream code in bext, and call it as a
subprocess from our code rather than bundling it into libbg.
2024-03-21 09:53:07 -04:00
Clifford Yapp f4ffea313a dbconcat items have been addressed 2024-03-21 09:47:33 -04:00
Clifford Yapp dd8a5e1bb3 db_ls with DB_LS_TOPS should do what the proposed db_tops function would do. 2024-03-21 09:33:54 -04:00
Clifford Yapp 0a054a4b2e We have bot check, and newer work also exposes the Manifold validity test as well. 2024-03-21 09:31:06 -04:00
Clifford Yapp 2a8050622e 3dm-g man page has been added 2024-03-21 09:30:09 -04:00
Clifford Yapp 9c9ac97d27 bext lets us use upstream re2c - update TODO item to focus on updating our code for latest lemon 2024-03-21 09:29:10 -04:00
Clifford Yapp 67c6151788 openmesh decimate is hooked in 2024-03-21 09:27:15 -04:00
Clifford Yapp 496b049ece Should be able to use BU_DIR_CACHE to override LoD location - set up test 2024-03-21 09:22:24 -04:00
Clifford Yapp c83d20b89a Put back the default search filter - let's see if we can handle empty trees 2024-03-20 13:05:28 -04:00
Clifford Yapp 3451c84b68 Revert the libbu process experimentation 2024-03-20 13:00:26 -04:00
Clifford Yapp 7b0fd01edf Remove duplicate entry 2024-03-20 12:50:21 -04:00
Clifford Yapp 67a5c0f568 Merge main into facetize 2024-03-20 12:47:57 -04:00
Clifford Yapp 4f6e797909 Merge branch 'main' into facetize 2024-03-19 21:44:06 -04:00
Clifford Yapp 56d2d45f50 Fix comment typo 2024-03-19 20:46:36 -04:00
Clifford Yapp 7e361c8152 Merge branch 'main' into facetize 2024-03-19 20:24:10 -04:00
Clifford Yapp c1200dd680 Merge latest main into facetize branch 2024-03-15 09:19:22 -04:00
Clifford Yapp cb5cb51b41 Merge branch 'main' into facetize 2024-03-07 13:01:49 -05:00
Clifford Yapp 9a78ea5b30 Fix librt CMakeLists.txt 2024-03-05 21:26:31 -05:00
Gaultier Delbarre e244ffc9eb Merge branch 'main' of github.com:ianebeckett/brlcad 2024-03-05 15:56:43 -06:00
Gaultier Delbarre e16c16cb64 Merge branch 'main' of github.com:ianebeckett/brlcad 2024-03-05 15:56:38 -06:00
Clifford Yapp 008c36aad2 After main merge, restore bot extrude in facetize branch 2024-03-05 14:01:22 -05:00
Clifford Yapp d8e8df43d4 Merge branch 'main' into facetize 2024-03-05 13:59:06 -05:00
Clifford Yapp 7a61f51761 Use the plate mode timeout, not NMG. 2024-03-05 09:47:10 -05:00
Clifford Yapp de04940757 Merge main into facetize 2024-03-04 19:28:54 -05:00
Clifford Yapp 57d1cac377 Batch plate mode to vol inputs, don't stop on first obj if doing brep->csg 2024-03-04 15:36:09 -05:00
Clifford Yapp 2e044e9cc5 Try brep->csg to see if that simplifies the facetize problem for NURBS objects. 2024-03-04 14:15:40 -05:00
Clifford Yapp c04848ecef We need a separate control for plate mode to vol time. 2024-03-04 12:09:50 -05:00
Clifford Yapp c4ed9a3790 Spelling 2024-03-04 11:08:34 -05:00
Clifford Yapp f24396131d Merge the region conversions and hierarchy back into the original .g file. 2024-03-01 23:39:15 -05:00
Clifford Yapp 7dbdec895d Whoops - update nname 2024-03-01 21:22:09 -05:00
Clifford Yapp 38a13bf502 Rework dbconcat for less aggressive prefix use
Want behavior where a user supplied prefix/suffix is used ONLY when
necessary to resolve a name conflict - in other words, keep as many of
the original names as possible.

Old behavior - apply it to everything if specified - is available with
the addition of a -A option.

Update the man page - I think it is outdated even with main's dbconcat
in that combs do seem to get the word if object names need to be changed
on import.

This needs testing - it's a significant rework, using bu_vls_incr rather
than having one-off code in concat for incrementing the names, using
bu_opt, storing more info in the state struct rather than passing around
lots of parameters.
2024-03-01 21:04:24 -05:00
Clifford Yapp 1730159fc7 Only use bu_vls_incr if we need to. 2024-03-01 18:47:12 -05:00
Clifford Yapp 2958515690 Adjust how SPSR does decimation. With these settings, SPSR can process the two problem soilds. 2024-03-01 12:42:55 -05:00
Clifford Yapp e96ac7df03 Initialize co3ne max_time option. 2024-03-01 12:42:55 -05:00
Clifford Yapp cd9aebbfa2 Bump err_cnt if a fallback method fails. 2024-03-01 12:42:55 -05:00
Clifford Yapp 9dcc74d0f0 Enable the Co3Ne method, but it's not handling our two problem case primitives. 2024-03-01 12:42:55 -05:00
Clifford Yapp c4ccb86a91 Keep active objects from working copy into a separate .g 2024-03-01 11:07:23 -05:00
Clifford Yapp e58eb49e6c Start working on getting the per-region processing going. 2024-03-01 10:39:53 -05:00
Clifford Yapp 5a59d497ef Fix facetize opt description table. 2024-03-01 09:23:45 -05:00
Clifford Yapp d336313416 Start working on setting up the Co3Ne inputs. 2024-02-29 16:41:56 -05:00
Clifford Yapp 263a1a6093 Get co3ne.cpp compiling with Geogram if present. 2024-02-29 15:29:05 -05:00
Clifford Yapp fa84bb9d76 Stub in setup for Co3Ne meshing option from Geogram. 2024-02-29 14:40:54 -05:00
Clifford Yapp 95e82408d2 Rough in Co3Ne option structures. 2024-02-29 14:17:03 -05:00
Clifford Yapp d739e700b1 Just use strings to identify the methods 2024-02-29 14:11:42 -05:00
Clifford Yapp 161013fcae First successful SPSR run with new setup. 2024-02-29 13:40:42 -05:00
Clifford Yapp 8d0a62230b Start dusting off SPSR code. 2024-02-29 13:33:44 -05:00
Clifford Yapp 3f7a7b02d2 set time_offset before calling bot_gen 2024-02-29 11:26:02 -05:00
Clifford Yapp 74f88e0ce7 See if we can bail out of the libanalyze routine if we're coming up against our overall time limit. 2024-02-29 11:25:02 -05:00
Clifford Yapp 61eba46de3 Use empty BoTs for empty-but-successful boolean evaluation scenarios.
This gives us a way to distinguish between "we didn't get anything because the
conversion failed" and "we didn't get anything because the boolean CSG
evaluated to no volume".  conversion.sh will now be able to recognize that
we're handling things like unioned half primitives, as well as not failing in
cases where a region really does evaluate to empty volume due to subtractions
or whatnot.
2024-02-29 10:17:13 -05:00
Clifford Yapp 16ab9d2e0b Merge branch 'main' into facetize 2024-02-29 10:16:36 -05:00
Clifford Yapp 573045de64 Reset method queue when we start a new batch of objects. 2024-02-29 09:14:59 -05:00
Clifford Yapp 95e268d5ca Wasn't stopping properly if a leaf tessellation failed. Need better CM bailing if we are getting close to the time limit - need help from libanalyze there. 2024-02-28 23:31:17 -05:00
Clifford Yapp 9e148f754d Set feature_size if we're going to bail 2024-02-28 21:02:12 -05:00
Clifford Yapp a509840de7 Sanity check s before adding 2024-02-28 21:01:45 -05:00
Clifford Yapp 114167c3a1 Remove extra space from optstr 2024-02-28 20:57:55 -05:00
Clifford Yapp c3b0c2eb17 Try to accept a less refined result rather than running up against a max_time limit and failing. 2024-02-28 20:31:33 -05:00
Clifford Yapp 77b07cdbe2 Use cycle time for CM, sync pnt evaluation info back to cm and spsr options. 2024-02-28 20:16:27 -05:00
Clifford Yapp 1d38c66fae More work with time limit passing. May need a separate value for plate mode to vol processing. 2024-02-28 20:04:23 -05:00
Clifford Yapp 46ec3c0dae Work on passing time values into exec logic 2024-02-28 19:32:59 -05:00
Clifford Yapp 060cdca360 Initialize max_time from methods, and read in any overrides from method options. 2024-02-28 19:32:59 -05:00
Clifford Yapp a5d67e76ea Not wired up yet, but set up options to better manage timeouts. 2024-02-28 19:32:59 -05:00
Clifford Yapp c2987c062c Adjust opt descriptions 2024-02-28 19:32:59 -05:00
Christopher Sean Morrison 1ded530847 make sure it's not a macro too 2024-02-28 17:18:51 -05:00
Christopher Sean Morrison 5b45640109 make sure we have kill because it's also posix.1 2024-02-28 17:16:56 -05:00
Christopher Sean Morrison b4283db2fb oops, missed adding CMakeLists.txt for syscall changes 2024-02-28 17:16:56 -05:00
Christopher Sean Morrison 870d4f3cbb missing cmake checks for bu_thread_id's syscall method.
we don't get syscall() declared in our c11 compilation mode as it's a gnu extension, but can use it if its available.  interestingly, we were apparently falling through to other thread id methods.  we probably should have some asserts to make sure the ID is expected (positive number).
2024-02-28 17:16:56 -05:00
Christopher Sean Morrison f15dcd9064 need to pull update from main to avoid setting _GNU_SOURCE override 2024-02-28 17:16:56 -05:00
Clifford Yapp cafe0c15ab Print help on method settings. 2024-02-28 15:57:51 -05:00
Clifford Yapp dffb161a27 For in place, iterate if we are given multiple existing objects. 2024-02-28 14:43:38 -05:00
Clifford Yapp 87b38f2be5 Try to simplify further 2024-02-28 14:31:51 -05:00
Clifford Yapp 4017bb7cc3 See if we can dispense with obj_swap 2024-02-28 14:26:53 -05:00
Clifford Yapp ed21aff4fc Clean up unused declarations in ged_facetize.h 2024-02-28 14:14:48 -05:00
Clifford Yapp 5da04b3514 Reorg a bit to be clearer which bits of this are now being used only by brep.cpp 2024-02-28 14:08:02 -05:00
Clifford Yapp 3b4b528f7d Uncomment spsr_mesh call 2024-02-28 13:52:56 -05:00
Clifford Yapp 932f8dc1ed If user specifies different point sampling criteria for a specific method, may need to resample rather than reuse. 2024-02-28 13:44:44 -05:00
Clifford Yapp 99cc19143b Minor header tweaks, explain method_optstr dbip arg 2024-02-28 13:30:19 -05:00
Clifford Yapp f36af2d4b1 Pull all the tess_opt.h implementation into one file. 2024-02-28 13:24:56 -05:00
Clifford Yapp 50e6fe2027 Flesh out the method option parsing logic 2024-02-28 13:16:27 -05:00
Clifford Yapp 363d38ceff We may want the method string even if methods doesn't list that particular method. 2024-02-28 10:49:38 -05:00
Clifford Yapp 627c9ebef0 Use ged_tessellate to drive and validate the available methods 2024-02-28 10:24:35 -05:00
Clifford Yapp dea834125a Use a queue for the methods. 2024-02-28 09:53:25 -05:00
Clifford Yapp d1a93f80cb Remove some hard codings of the method flags 2024-02-28 09:36:25 -05:00
Clifford Yapp 0540f22405 Merge in changes from main 2024-02-28 08:47:09 -05:00
Clifford Yapp 4e665fd56a Stub in option syncing for cm and spsr 2024-02-28 08:30:45 -05:00
Clifford Yapp 921852bd24 Start working on using option classes for methods 2024-02-27 19:19:38 -05:00
Clifford Yapp af9cbf37d6 Incremental progress on facetize
Working on better method to pass down method-specific options from
parent libged command to subprocess.  Originally SPSR options were hard
coded, but that won't scale if we want to add more methods (or even
expose more of the SPSR knobs.)  Instead, pass key=val lists of options
down to each method.  Treat NMG as one more method, with rel, abs and
norm tolerances being options to the NMG method (along with nmg_debug).

Also, got first successful test of using Manifold's half space trimming
routine with a BRL-CAD half subtraction.
2024-02-27 16:10:23 -05:00
Clifford Yapp 213f2eed72 Need to use the rt_db_internal avs, not a separate one. 2024-02-27 16:00:57 -05:00
Clifford Yapp 3f9d1b44d6 Adjust help msg 2024-02-27 13:59:25 -05:00
Clifford Yapp 91f80c85c3 Add -F opt to extrude for view dependent inputs
After discussion with Sean, default the bot extrude behavior to
rejecting view dependent inputs unless the user specifically adds a flag
to proceed with them anyway.  The intent here is to force users to
recognize that their original geometry cannot be accurately reproduced
as a volumetric primitive, and require them to make an informed decision
as to whether the changes implied by switching in a volumetric extrusion
are acceptable for the specific use case in question.
2024-02-27 13:55:12 -05:00
Clifford Yapp a5995c0a38 Move the log state details into the old-school nmg logic. 2024-02-27 10:04:40 -05:00
Clifford Yapp 7ae75b9232 Add a simple test case for subtracting a half from a sph. 2024-02-26 10:39:49 -05:00
Clifford Yapp 87456495ba facetize brep was using some of the region functions - disable for now. 2024-02-26 10:35:02 -05:00
Clifford Yapp 082bf842da Shorten warning messages. 2024-02-24 20:49:57 -05:00
Clifford Yapp 6b9c09cd3c First cut at logic to redo region tree 2024-02-23 16:32:28 -05:00
Clifford Yapp fd9c61e729 More work figuring out regions logic flow 2024-02-23 15:57:52 -05:00
Clifford Yapp 43a0f63444 Checkpoint work on per-region facetize. 2024-02-23 15:41:38 -05:00
Clifford Yapp 06c36abfcd Checkpoint reworking of facetize option handling
Looking at the region code, and the prospect of adding more tessellation
methods to the backend, it becomes clear that we need a better way to
pass method specific options from the facetize command line rather than
hard-coding the specific parameters of each method at the top level.

Also, since we're using a working copy of the .g now to do the
processing, the logic for managing all the region copies may be
unnecessary.  A combination of keep and dbconcat using the working .g as
a starting point should be able to achieve the same thing we're trying
to achieve with all the comb copying in the current code, so let's see
if we can simplify.
2024-02-23 12:15:16 -05:00
Clifford Yapp a1123a787c First cut at setting up Manifold plane trimming (untested) 2024-02-22 12:25:18 -05:00
Clifford Yapp e4d4e8485d Half spaces have support in Manifold, so we'll need to adjust the boolean logic 2024-02-22 11:24:24 -05:00
Clifford Yapp 81a289fa8d We'll want to note the method used to facetize primitives for reporting purposes. 2024-02-22 10:52:21 -05:00
Clifford Yapp ca4aac856f Make a stab at modularizing the pieces of the tri booleval for reuse with regions 2024-02-21 19:40:03 -05:00
Clifford Yapp 7163c5c2e9 Split working file setup into its own function so we can reuse for region processing. 2024-02-21 19:16:42 -05:00
Clifford Yapp 40fa3afb3c Shorten file names 2024-02-21 18:57:31 -05:00
Clifford Yapp 3e52b73057 Merge branch 'main' into facetize 2024-02-21 18:30:50 -05:00
Clifford Yapp 2a97b4932f Shift bot repair to librt function for reuse in both bot and facetize commands. 2024-02-21 15:28:46 -05:00
Clifford Yapp 08968a5184 bu_log and bu_bomb overrides are specific to the nmg path 2024-02-21 14:41:07 -05:00
Clifford Yapp d823301bd4 Turn off stdout and stderr while geogram is initializing. 2024-02-21 14:21:12 -05:00
Clifford Yapp 7d24b9a715 Quell most (not quite all) of the geogram logging messages. 2024-02-20 12:11:47 -05:00
Clifford Yapp 916db85b97 Merge branch 'main' into facetize 2024-02-20 09:50:31 -05:00
Clifford Yapp eae794ec91 Merge branch 'main' into facetize 2024-02-16 21:28:28 -05:00
Clifford Yapp 859a9df27d Make a note to add support for multi-line quoted strings to the gcv asc_v5 reader to handle pinewood's new brep objects. 2024-02-16 21:26:47 -05:00
Clifford Yapp 851f9e4747 Don't make face_mode BoTs thicker
After discussion with Sean, adjust the conversion logic to not claim all
of the volume potentially claimed by the view dependent plate mode when
making the volumetric BoT.  The old way results in a bot with a much
larger overall volume, and from an analytic standpoint that larger
volume is likely to be more problematic than (what should be) a small
shift in hit point locations.
2024-02-16 14:58:06 -05:00
Clifford Yapp be0518901d Fix tessellate/main.cpp rt_bot_plate_to_vol call 2024-02-16 11:43:28 -05:00
Clifford Yapp 9fda6abd1d Better explain the implications of face_mode BoTs
The raytacing behavior of plate mode bots using face_mode is view
dependent.  Because what volume is claimed as part of the "solid"
changes based on the incoming ray direction, what we end up doing for
those cases is making a solid BoT that claims all the volume potentially
claimed.

For any given ray, this means the shotline's solid segment will be
longer, since the solid volume will end up reporting both the "before"
and "after" hit segments from the perspective of the original plate mode
BoT.  There isn't a perfect answer here since view dependent behavior
isn't something we can represent with a volumetric BoT.

If the user wants to create a version of the bot that will return
similar shotline lengths, they can adjust the per-face thickness
to half that of its current value to produce a smaller solid volume.
2024-02-15 18:56:00 -05:00
Clifford Yapp 3ca4cd66dc Don't try to extrude if face_mode is set, since that changes the reported mode of plate mode shotline reporting from center to append (i.e. our generated geometry won't match the reported shotline volume. 2024-02-15 15:41:35 -05:00
Clifford Yapp 6a5b926559 After discussion, make the default behavior no-rounding-of-outer-edges 2024-02-15 15:18:07 -05:00
Clifford Yapp 183e9dba8e Warn if extruding a NOCOS plate mode bot. 2024-02-15 15:13:27 -05:00
Clifford Yapp c3e07aab54 Teach the CSG bot extrude the same trick of skipping exterior edges and verts 2024-02-15 15:02:01 -05:00
Clifford Yapp a08bcb9716 Restore ability to extrude to CSG tree as an option 2024-02-15 13:24:52 -05:00
Clifford Yapp 611d9d2f7a Whoops - error was in arb thickness, not round elements. 2024-02-15 13:24:04 -05:00
Clifford Yapp edc6ee0ca7 Match the cyl radius for the verts as well. 2024-02-15 13:08:50 -05:00
Clifford Yapp fb9e69ab24 Correct cyl radius, allow suppression of outer edge rounding 2024-02-15 12:52:27 -05:00
Clifford Yapp fc951a199c No need to use rt_bot_internal container - just reference the arrays directly. 2024-02-15 11:39:39 -05:00
Clifford Yapp 1c01654d73 Merge branch 'main' into facetize 2024-02-15 11:20:54 -05:00
Clifford Yapp 642e4b1c16 Don't hardcode the nmg debug on, use the variable 2024-02-14 23:14:04 -05:00
Clifford Yapp b54ad0c6dc Don't process a face if it has zero thickness 2024-02-14 16:32:49 -05:00
Clifford Yapp 57590af922 No need to go through NMG for the arb6 face triangles either 2024-02-14 16:26:53 -05:00
Clifford Yapp 0c43b56ec8 Add timing based reporting for face booleans 2024-02-14 15:32:04 -05:00
Clifford Yapp 30976b6a02 Correct cylinder generation - first successful conversion with edge_cyl 2024-02-14 15:17:17 -05:00
Clifford Yapp 631e3dd1cf Try edge_cyl in the logic (not working yet) 2024-02-14 08:35:27 -05:00
Clifford Yapp 2a196fa37f Checkpoint work on a cylinder bot generator purpose built for the plate->vol case 2024-02-13 20:50:03 -05:00
Clifford Yapp a394c557d7 Add a way to pass NMG debug flags to the child process 2024-02-13 16:24:39 -05:00
Clifford Yapp 5de16c49d0 Adjust manifold includes 2024-02-13 15:59:37 -05:00
Clifford Yapp 150ba6eb18 Add an rcc producing an odd tess output
Although this Bot appears to be "closed" it isn't what is expected from
the NMG input the cylinder provides.  We get a lot of long, narrow
triangles on one half of the cylinder when the NMG input appears to be
uniformly structured.
2024-02-13 14:41:00 -05:00
Clifford Yapp 30b4467e8f Print out the right cylinder when we fail. 2024-02-13 14:29:45 -05:00
Clifford Yapp f4d55ae611 Break NMG tessellation routines out into their own file. 2024-02-13 13:38:06 -05:00
Clifford Yapp 48f9eb8bed Add a macro for copying a bn_tol 2024-02-13 13:27:10 -05:00
Clifford Yapp 33a5b0382a Check for null before proceeding 2024-02-13 12:57:48 -05:00
Clifford Yapp d7914a1db7 Add problematic tgc test cases for facetize 2024-02-13 10:11:00 -05:00
Clifford Yapp e6944fe035 Write out glb files for upstream reporting if boolean fails 2024-02-12 19:15:51 -05:00
Clifford Yapp 33f044d155 Provide a little progress feedback when dealing with edges 2024-02-12 16:57:47 -05:00
Clifford Yapp 0c6909279e manifold is a system include 2024-02-12 16:10:02 -05:00
Clifford Yapp d8bf2e3ce2 Lessen the verbosity of the intermediate plate mode debug printing. 2024-02-12 13:59:22 -05:00
Clifford Yapp 88f9125a39 Refactor BoT plate to vol logic into librt
Both the bot extrude and facetize logic may want to do this operation,
so push the core logic down into librt.  Rework bot extrude to provide
the evaluated volumetric BoT as its output, rather than the intermediate
CSG tree, as well as following the manifold pattern of supporting -i to
allow in-place conversion of BoTs from plate mode to volume mode.

Memory consumption due to nmg objects not being freed was addressed, but
this is still a slow operation - the Generic Twin example 401.1.t0 has
1191 vertices and 1873 faces and takes just over a minute to process due
to the thousands of sequential boolean operations needed to evaluate all
the individual face, edge and vertex elements.  For users who want to
use a reasonable timeout on their facetize operations, they'll probably
want to convert their plate mode BoTs to volumetric mode ahead of time:

search -type bot -type plate -exec "bot extrude -i {}" ";"
2024-02-12 13:46:23 -05:00
Clifford Yapp 21ea08259e Duh. Free NMG memory after we have our bot. 2024-02-12 12:12:04 -05:00
Clifford Yapp 8686958bb5 Merge branch 'main' into facetize 2024-02-12 10:02:19 -05:00
Clifford Yapp 97841539bf Update copyrights in facetize branch as well. 2024-02-08 13:29:04 -05:00
Clifford Yapp 210302fd53 Merge branch 'main' into facetize 2024-02-08 13:26:20 -05:00
TheZouave007 19549a9326 Add include and scoping so that file will compile on my machine 2024-02-06 17:32:16 -06:00
Clifford Yapp 0643f49670 Make in-place repair an option to bot manifold
This is for automatically repairing all bots in a file or hierarchy at
once via search exec in MGED:

search -type bot ! -type plate -exec "bot manifold -i {}" ";"

The above line will check all the non plate mode bots to see if they are
manifold.  If not, repair will be attempted to update the BoT to be
manifold via either small adjustments by the Manifold library or (if
that fails, which is more typical) hole filling using geogram.
2024-01-29 13:15:52 -05:00
Clifford Yapp 2e40d0174d Add a note for a possible adjustment to plate mode bot processing. 2024-01-26 19:56:48 -05:00
Clifford Yapp 0643054d85 Check the right library variable 2024-01-26 19:23:35 -05:00
Clifford Yapp 87e9369066 Make use of geogram in bot manifold contional on finding geogram 2024-01-26 19:14:26 -05:00
Clifford Yapp 90ea2ba5c9 Add geogram to SYS_INCLUDE_PATTERS, list Geogram in summary 2024-01-26 19:13:30 -05:00
Clifford Yapp 416c82377c Put the find_package(Geogram) call in BRLCAD_ExternalDeps 2024-01-26 18:58:29 -05:00
Clifford Yapp c1b6625635 Move GEO::initialize to group with the rest of the geogram logic. 2024-01-26 17:04:05 -05:00
Clifford Yapp 74cb50f342 If I'm reading the initialize code in geogram correctly, we need to call this at least once, but there's no harm in calling it multiple times since there's an internal initialized flag it checks. 2024-01-26 17:02:32 -05:00
Clifford Yapp 7d8ce87990 Add a note that we need to think about the surface area default for fill_holes. 2024-01-26 16:24:29 -05:00
Clifford Yapp 82fddf54b9 Fully successful manifold cleanup of Generic_Twin
Adding a preprocessing step used by the geobox mesh repair feature in
geogram, we can also process the four components in Generic_Twin.g that
previously couldn't be handled.  With this change, we appear to be
successfully producing manifold outputs for ALL non-plate-mode BoT
objects in Generic_Twin that initially report as non-manifold per the
Manifold library's test.

Of course if enough of the original shape is missing, the results of
hole filling can't recover the original shape - but for a lot of "almost
closed" cases this looks as if it could be quite helpful.
2024-01-26 16:10:20 -05:00
Clifford Yapp 9939b5d230 Make it easier to toggle outputing a still-bad mesh for debugging. 2024-01-26 15:50:17 -05:00
Clifford Yapp 1f7c1befe5 Make it easy to switch between overwriting and non-overwriting modes for testing. 2024-01-26 13:02:22 -05:00
Clifford Yapp 7bfe76ea1f We can use the assign_points helper, and we shouldn't need the map. 2024-01-26 12:45:30 -05:00
Clifford Yapp aef7f40b6d First successful repair of Generic Twin 9621.1.t0 bot 2024-01-26 12:42:35 -05:00
Clifford Yapp 75e579d02a Not correct yet, but start figuring out how to use geogram to process BoT data. 2024-01-26 12:08:32 -05:00
Clifford Yapp 17dd61cd31 Start looking at what using geogram entails 2024-01-26 10:39:13 -05:00
Clifford Yapp c91c615220 Break manifold subcommand into its own file. 2024-01-26 10:28:03 -05:00
Clifford Yapp 76172a8bb2 Try Mainfold MeshGL.Merge() function for mesh repair
Per https://github.com/elalish/manifold/discussions/697#discussioncomment-8149465
the Manifold library has a Merge capability which can sometimes produce
Manifold meshes from certain categories of inputs.  This wires up that
function under the "bot manifold" subcommand.  It's not capable of
repairing (for example) the non-manifold solid bots in Generic_Twin.g,
but it is able to repair an example from a TGC test that has degenerate
faces (added for an example in the manifold_fixable.g file).

My thought is that if we can link in more "mesh repair" capabilities via
third party libraries that have features such as hole filling, we could
try them as follow-ons after we see whether Manifold can handle things
itself.
2024-01-24 20:34:52 -05:00
Clifford Yapp 7c796db7f6 Adjust polygonizer method parameters
This isn't fully correct yet, but it lets pinewood complete with CM for
the brep case given sufficiently large MAXTIME.  However, these
parameters break the twisttrc.s case in aet.g...
2024-01-23 14:55:51 -05:00
f4alt f52467ded0 fix timeout handling
in the event of a timeout the subprocess is terminated and destroyed.
This sets the subprocess_join up for failure (atleast on Windows) as the
process handle was just forcefully closed. As a result, the join fails
and returns the function before the .g is restored. Reduce complexity by
handling the file restore and returning an error after killing the
timed-out process.

Also, modify to use clarifying returns.
2024-01-23 14:46:22 -05:00
Clifford Yapp 6de1dfaf43 Check for bot before deferencing 2024-01-19 17:05:05 -05:00
Clifford Yapp 7192a67c43 Merge branch 'main' into facetize 2024-01-19 16:42:00 -05:00
Clifford Yapp 73f2d4b1c6 Merge branch 'main' into facetize 2024-01-19 15:56:09 -05:00
Clifford Yapp 0d0b1f8794 Merge branch 'main' into facetize 2024-01-17 18:45:28 -05:00
Clifford Yapp 57d77c70c1 Copy supporting data to the correct position.
To make this properly robust, should really be hashing the path and
filename of the data file in question, then using that for a new data
file name for the copy, and then updating the dsp in the working copy to
point to the hash rather than the filename.
2024-01-17 16:58:15 -05:00
Clifford Yapp 215fc9c57d Refactor dir creation and clearing into libbu
This pattern - directory creation from C, and recursive deleting of all
the contents of a directory - has cropped up several times now, so
consolidate the logic into a couple of libbu calls.
2024-01-17 13:50:51 -05:00
Clifford Yapp 3236a71826 Merge branch 'main' into facetize 2024-01-17 13:08:09 -05:00
Kenneth Davis 06deccfad0 add rt_version to brlcad.def refs #109 2023-12-29 09:50:05 -06:00
Kenneth Davis 254d029169 rework the region fix file message for readability refs #101 2023-12-29 08:39:12 -06:00
Kenneth Davis f4dfedee81 consider the failure to open a regexp file a 'soft' error refs #101 2023-12-28 11:47:33 -06:00
Clifford Yapp bc83440744 binunif objects aren't candidates for facetize - filter them out. 2023-12-18 19:54:49 -05:00
Clifford Yapp 4f03d0a1f7 Ignore combs with empty trees in the hierarchy
The way conversion.sh is set up right now, if we don't get a .bot object
out it's a FAIL.  However, for empty regions, that's actually the
expected outcome.  Can't just check for that though - there can be cases
like truck.g's g1 comb that have a tree full of regions with empty
trees.

Kinda wondering if the thing to do here is create an empty BoT as the
output for these cases, to distinguish between failure and "successfully
empty"...
2023-12-18 19:45:22 -05:00
Clifford Yapp 58359969a7 Fix dsp tess_run call 2023-12-18 18:43:07 -05:00
Clifford Yapp 3ebd1b0fe3 Default CM sizing to be smaller than the average thickness. 2023-12-18 15:57:42 -05:00
Clifford Yapp 7cd7e89889 Reset err_cnt for each method tried. Also, use half of max_time as a cutoff for ged_tessellate 2023-12-18 15:56:04 -05:00
Clifford Yapp 3a8e3f20cc Check major_type before proceeding 2023-12-18 14:39:21 -05:00
Clifford Yapp d3292d68e6 Merge branch 'main' into facetize 2023-12-18 12:01:09 -05:00
Clifford Yapp 096dcdcaa4 Merge branch 'main' into facetize 2023-12-15 16:22:52 -05:00
Clifford Yapp 38c20325ac Catch matrices that flip a BoT inside out
Goliath's SKTRACKdrivewheel2.c was producing inside out BoT instances
with its matrices - the primitives tessellated fine, but the matrix
turned them inside out.  These inside-out BoTs are a problem for
facetize in that they ARE technically manifold, so they do get processed
slowly and result in an "inside-out" component in the final mesh.  While
it's actually rather impressive this doesn't fail outright, it's also
not really the result we're looking for.

The impact of this "inside-out" matix can actually be seen in both
facetization and raytracing.  In the latter case, when a BoT is used for
one of the SKTRACKdrivewheel2.c primitives and the matrices are left
unchanged - there are no hits on that BoT.  A CSG primitive in the same
place DOES report a hit, so there's an inconsistency there that is
somewhat concerning, but that's a separate issue...

To catch and deal with this case for facetize, we check an exemplar
triangle face and intersecting ray segment that report an "outward
facing" first hit with the IDN matrix, and see if the result changes
after application of the currently active matrix in the tree walk.  If
it does, we reverse the BoT orientation for the purposes of the boolean
operation, essentially "undoing" the inside-out effect from the matrix.
This lets Goliath convert without SKTRACKdrivewheel2.c being inside-out.
2023-12-15 15:58:38 -05:00
Clifford Yapp 14a000f7a1 If we hit a CW bot, flip the faces. This doesn't fix the SKTRACKdrivewheel2.c conversion in Goliath, but it seems to be related - if we flip this (incorrectly flipping the faces for CCW) it works (while breaking most everything else), so somehow we seem to be getting incorrect face orientation and/or labeling. 2023-12-15 12:33:34 -05:00
Clifford Yapp dd8a055b0b Merge branch 'main' into facetize 2023-12-15 10:45:43 -05:00
Clifford Yapp b50d15a646 Merge branch 'main' into facetize 2023-12-15 10:31:20 -05:00
Clifford Yapp 9ed76c371c Merge branch 'main' into facetize 2023-12-15 10:27:56 -05:00
Clifford Yapp 64be8e3e97 Merge branch 'main' into facetize 2023-12-14 19:37:36 -05:00
Clifford Yapp ece5595d9e Need to fix the CM settings, but this sets us up to process the dsp queue. 2023-12-13 13:20:37 -05:00
Kenneth Davis bb70f143b6 Merge branch 'main' of https://github.com/kennethsdavis/brlcad 2023-12-13 11:23:04 -06:00
Kenneth Davis a1805426f1 adjust outdated comment 2023-12-13 10:17:47 -06:00
Kenneth Davis b7fed1c11b protect the call to bu_hook_call with a semaphore 2023-12-13 10:17:47 -06:00
Kenneth Davis e40ed96999 adjust outdated comment 2023-12-12 13:21:06 -06:00
Kenneth Davis 6fb322a01b protect the call to bu_hook_call with a semaphore 2023-12-12 13:17:06 -06:00
Clifford Yapp 57d45d2cbb Triggering it this time, but CM still not working in new setup yet - decimation failing. 2023-12-06 21:08:27 -05:00
Clifford Yapp a925e63b0e Inspect all the tess_run command lines 2023-12-06 20:24:55 -05:00
Clifford Yapp 46a7805c5b Only bail on mt if it's greater than 0 2023-12-06 20:24:35 -05:00
Clifford Yapp c3eefb8643 Try https://github.com/sheredom/subprocess.h for process management. 2023-12-06 15:14:07 -05:00
Clifford Yapp 117e40b411 Need to rethink dealing with the defunct process
Still not getting the return code from the libged facetize
ged_tessellate call - if I'm following the man pages, it may be because
we have multiple waitpid calls being made that are wiping out the state
by the time we get to the end?  However, if we remove this then
bu_process_id can't recognize the defunct nature of the process and we
end up timing out every time.

Looking at how CMake's CTest manages subprocesses, I'm wondering if it
might make sense to refactor a subset of their code into a more powerful
subprocess management capability for libbu. What CTest does is
essentially what we need to do here - launch multiple processes, monitor
their return status and allow for timeouts.  Looks like they are using a
subset of libuv for some of what they need, so I'm beginning to think
that trying to do this with our own bu_process implementation isn't the
best approach.

Initially I can confine the experiments to facetize itself, but if a
working solution is found it should probably be promoted to a backend
for libbu's process control API in lieu of our current implementation.
2023-12-06 10:33:16 -05:00
Clifford Yapp b7bda3c0c0 Distinguish between non-zero return codes and aborted processes 2023-12-05 21:29:27 -05:00
Clifford Yapp 97e0dda7d8 Adjust process logic, move info printing to test. Restore output channel closures, but after wait is over (not 100% we need to do that, maybe check with valgrind?) 2023-12-05 21:22:28 -05:00
Clifford Yapp d559a0abec kill(-pid) wasn't stopping the process, at least on Linux. Make the runtime longer to make this more obvious, and adjust the bu_terminate routine. 2023-12-05 21:08:05 -05:00
Clifford Yapp ca418416b4 Experiment with not closing output pipes in wait
After some hair pulling, checking the reason the child process was
failing appears to offer some insight on why we weren't getting the
return code.  Because the child was writing to the output pipe, and the
pipe got closed, the process got hit with a SIGPIPE.  If we leave the
output pipes open, we get the expected return code.

Doing this, on the other hand, breaks the abort test - need to look into
that.
2023-12-05 20:45:04 -05:00
Clifford Yapp 38d968fbbf Work on understanding return code behavior. 2023-12-05 16:38:35 -05:00
Clifford Yapp b332190451 Make a backup copy of the .g to use if we time out ged_tessellate
The problem with having to kill a runaway subprocess is that there's no way to
guarantee we don't do so at a point where the result is a corrupted, partially
written object (or even a corrupted .g file).  It's unlikely, but certainly not
impossible - accordingly, if we do have to hard stop we restore the pre-run
state of the working .g file.  This will mean potentially having to redo work
in subsequent bisects if we had a bunch of successful conversions before the
runaway, but as far as I can see that's the tradeoff we need to make in order
to allow both a) processing multiple objects in one subprocess to minimize
process setup/teardown overhead and b) allow timeout kills of infinite looping
processes.
2023-12-05 10:41:06 -05:00
Clifford Yapp d07a5512f6 Max time for a tess run isn't always going to be the initially specified max_time - just pass a fastf_t for more flexibility. 2023-12-05 10:19:56 -05:00
Clifford Yapp a38066b5d8 Limit bisect approach to NMG, where individual operations should be fast (if they're going to work). 2023-12-04 22:20:11 -05:00
Clifford Yapp bb191d9db0 Rough in a bisect method to zero in on bad inputs
If we're going to pass a large number of object into each tessellation
process, a single failure will mean that we don't know which one is the
poison pill.  Because we still want to bulk process as many as possible,
try a bisect that will re-try the conversion with half of each list.
Will keep splitting until individual bad objects are identified.

I suspect in a practical sense we should only do this bisecting for the
NMG method - the fallback methods are quite expensive in individual
processing times by comparison, and the process launching overhead will
almost certainly be noise for CM or SPSR.  Right now I'm testing havoc,
which doesn't get to those methods and has a large number of
fast-to-NMG-process CSG primitives, so we see big wins from large
processing lists.
2023-12-04 21:59:01 -05:00
Clifford Yapp 86d1dd3abf Test using large object lists 2023-12-04 20:58:03 -05:00
Clifford Yapp b219c741a1 Pass multiple objects to the subprocess
Testing indicates launching the process is quite expensive, so we
definitely want to handle multiple objects per run.  To really do this
right we should probably implement a binary search if we encounter an
error, so we can do as many larger "batches" of objects as possible.

Windows is limited to 8191 characters on the command prompt, so that
will probably be the practical cap for how many objects we can pass in
on an argv.
2023-12-04 20:24:11 -05:00
Clifford Yapp 34cb1fc5b4 For debugging, print which object we're processing. 2023-12-04 17:16:55 -05:00
Clifford Yapp eb0bd6bad6 Reduce error handling duplication. 2023-12-04 16:53:12 -05:00
Clifford Yapp 589e4c19e9 Regions code will need significant rework... 2023-12-04 16:33:56 -05:00
Clifford Yapp 5e73430c0c More cleanup in error cases
May want to allow an environment variable or some such to keep the working .g
for debugging in case of problems, but by default clean up after ourselves.
2023-12-04 15:11:51 -05:00
Clifford Yapp 610189787a av array is local to the db_walk_tree stage 2023-12-04 15:07:06 -05:00
Clifford Yapp 50f4d2b1a9 db_diradd won't overwrite on its own - clear confliciting obj first, if there is one. 2023-12-04 14:53:10 -05:00
Clifford Yapp 238d1c4282 Adjust cache filename generation, test out priority queue for dp sorting. 2023-12-04 13:01:40 -05:00
Sam Hollenbeck 46a7555527 Merge branch 'main' into fall-2023-gist-capstone 2023-12-04 10:35:47 -06:00
Sam Hollenbeck 415f1adfc0 Update TODO 2023-12-04 10:29:53 -06:00
Clifford Yapp 2b312386d0 Adjust comments 2023-12-04 09:28:43 -05:00
Clifford Yapp a9cc293f21 Make the hash function more generic than just string data 2023-12-04 09:24:18 -05:00
Sam Hollenbeck 048d012b30 clean up 2023-12-02 03:18:48 -06:00
Clifford Yapp bbdaaa8fff Start refactoring for different temp file approach
Untested as yet - just checkpointing a compiling state.  Instead of
writing out a large number of individual files, look at making one copy
of the original .g file to serve as the working template.  We will
identify unique leaf dp instances, and (in the working copy) overwrite
those solids with successful ged_tessellate output.  We can then perform
the tree walk to prepare Manifold inputs on the working copy, with the
BoT information in the correct place ahead of time.  Only the final
output of the booleval step gets written back to the original .g file -
all other activity will take place in the working copy.

This should also let us support resume without having to write anything
back to the original .g file - we can instead look for a previously
generated working file with the correct name, and have ged_tessellate
look there for state data to do things like avoiding known crashers if
we're resuming a previously incomplete process.  Hopefully the need to
do so will be much rarer - that's the whole point of ged_tessellate, to
isolate the parent controlling process from the risky stages - but we
still want to be able to recover a long conversion in that fashion if we
have to.
2023-12-01 16:50:37 -05:00
Clifford Yapp f7868e2ff6 This 'hash a string' operations is getting used a lot, so try making it a libbu function. 2023-12-01 15:31:55 -05:00
Leofeng7 bb8c4f9534 cleanup 2023-12-01 11:42:33 -06:00
Leofeng7 c7f243ecfa Added some more comments 2023-12-01 11:40:47 -06:00
yida-zou cc2b29aee7 cleaned up FactsHandler.cpp 2023-11-30 17:01:03 -06:00
Sam Hollenbeck 57424a9aab clean up 2023-11-30 15:31:37 -06:00
Clifford Yapp ba3cfa7b34 Make some notes about changes we'll need 2023-11-30 16:30:46 -05:00
Sam Hollenbeck 080600ee80 quick fix 2023-11-30 15:15:34 -06:00
Clifford Yapp 1bbbf192f7 Need to think about location/persistence of the temp file 2023-11-30 15:24:37 -05:00
Clifford Yapp 96ba2d8336 Back up to ecff08e99 - pipes are problematic
The more I research non-blocking pipes in a cross platform context, the worse
it gets. Time to take a step back and see if there's another way to come at
this.

Right now, each unique instance of each primitive in the tree walk is getting
written to its own temp file to be facetized, in order to dupliate the original
tree walk behavior of calling ft_tessellate on the instanced data of the
primitive.  The main advantage of this is that we don't have to communicate
anything other than the tree walk's geometry to the subprocess - matrix
positioning of the input data is handled by the tree walk. However, we end up
creating as many files as we have instances - which can be a LOT of small file
creation and open/close operations.

An alternative would be to make one copy of the .g file as the working copy,
and then do all the non-translated dp object facetizations once in that copy.
If we wanted to do parallel processing of multiple objects, Victor had the idea
to pass multiple objects to ged_tessellate, let it do the parallelization to
minimize the processes needed per object, and in the event of failure recover
by individually re-processing the group that failed to identify which object
was the "poison pill."  The latter involves some bookkeeping, but may be an
overall win.  We could also sort through the dp objects collected by the first
tree pass and identify dp->d_len objects larger than some threshold to be
excluded from parallel processing (as well as potentially memory hungry types
like dsp...)

Once all the dp objects are resolved, in the parent command we would do the
tree walk again and create our rt_db_internals for Manifold by reading the
facetized version of the geometry in from the working .g in lieu of the
original CSG object in the source .g file.  This would allow us to apply the
matrix and create the Manifold data structure, but on the BoT rather than the
original CSG data.
2023-11-30 13:57:50 -05:00
Clifford Yapp 1bae58b375 Don't think I have proper 2-way communication going yet... 2023-11-30 12:35:42 -05:00
Clifford Yapp 5f7b105dd7 Start setting up to test bu_external piping. Still a lot of work here... 2023-11-30 11:10:13 -05:00
Clifford Yapp 1018003acc Note next step
Going to need a focused test of pipe communcation that incorproates timeout and
round tripping.  Will be especially important when trying to figure out how to
make this work on Windows - will need a demonstrated working version on Linux
as a starting point.
2023-11-29 16:42:36 -05:00
Clifford Yapp 7ff1a11c63 Try to zero in on the I/O + timeout problem specifically 2023-11-29 16:16:36 -05:00
Clifford Yapp e23f5b7755 Make a note about packaging the geometry I/O piece separately. 2023-11-29 12:49:15 -05:00
Clifford Yapp 4e55565af3 Start thinking about parent I/O for facetize
As with the child process, we don't want to completely abandon the option to
use files rather than pipes, given the former is much better for incremental
debugging.  We'll also have to sort out how the timeout logic and bu_external
assembly will work using a pipe read.
2023-11-29 12:37:03 -05:00
Clifford Yapp 281733499a Start thinking about how to stream in bu_external
If temp files are going to be super slow, we want to be able to pipe data in
and out unless it's the rare case of some individual object so big we want to
keep its footprint in memory minimal.  We'll need logic on both ends for this,
but start by working on figuring out what the receiving end of ged_tessellate
should look like.  We'll want to preserve the option to use an input .g file as
well (for debugging if nothing else) so we'll also need to keep the .g file
version of the logic.

Note that this isn't tested yet, beyond compiling on Linux - one of the
drawbacks of the piping approach is we need both halves of the equation before
testing...
2023-11-29 11:50:57 -05:00
Clifford Yapp ecff08e991 Clean up temp files after tessellation is done.
Testing with havoc, this is indeed far slower than running the
ft_tessellate calls without calling a separate process - probably due to
the file I/O?.  What I may need to do is try sending inputs and outputs
(perhaps bu_externals?) down a pipe...
2023-11-28 20:20:20 -05:00
Clifford Yapp 980812a4b1 logging hooks should only be needed in the old-school NMG evaluation pipeline... 2023-11-28 19:57:27 -05:00
Leofeng7 51c6a545f8 Merge branch 'main' of https://github.com/samhollenbeck/brlcad 2023-11-28 18:54:49 -06:00
Leofeng7 3df2e25e10 origin and axes 2023-11-28 18:54:03 -06:00
Clifford Yapp df1da3cd8c Got as far as facetizing moss with forked ged_tessellate processes - checkpoint 2023-11-28 16:11:14 -05:00
Clifford Yapp 72870a65bf Tweaks to get syscall thread id building correctly 2023-11-28 15:29:43 -05:00
Clifford Yapp c7fac59171 Translate flags to options 2023-11-28 14:32:20 -05:00
Clifford Yapp b9ed46763f Rename method flags, remove the (hopefully no longer necessary) bu_log hook setup 2023-11-28 10:55:38 -05:00
Sam Hollenbeck 8ff391533d Merge branch 'main' of https://github.com/samhollenbeck/brlcad 2023-11-22 12:20:33 -06:00
Sam Hollenbeck 68d1ab9311 fixed default mass unit correction 2023-11-22 12:20:31 -06:00
Clifford Yapp e4f1f9ecb6 Print help 2023-11-20 14:00:00 -05:00
Clifford Yapp f31d1e181b Revert "Checkpoint an rt_comb_tess experiment"
Backing out the rt_comb_tess experiment - previous commit was simply to store
the work in the history in case it was needed for reference.

This reverts commit d6bb98eda8.
2023-11-20 11:56:14 -05:00
Clifford Yapp d6bb98eda8 Checkpoint an rt_comb_tess experiment
This sets up (more or less) what an rt_comb_tess callback for ft_tessellate
would look like, but also makes it clear why this hasn't been done previously -
due to the function signature of the RT_DECLARE_INTERFACE tess callback it
requires rt_db_internal to have awareness of at least dbip and (at the moment)
dp as well.  While this is not the first time I've wanted those, my
understanding is that conceptually the rt_db_internal entities are normally
"detached" from their source db_i and directory containers.  If they are
supposed to be prepared to persist beyond the survival or updating of their
sources, then the stashed pointers required by this approach may eventually, in
some usage scenario, become pointers to invalid data.

This is something of a dilemma - from an API cleanliness standpoint, an
rt_comb_tess function is the right place to put the "translate a comb object to
NMG" logic.  However, unless we clutter the rt_db_internal struct as we have
here, moving the logic also requires inputs not available in the callback
signature.  My current next step is to consider a change the
RTFUNCTAB_FUNC_TESS signature to pass in a dbip and dp as well.  The
import/export function signatures at least offer a precident for passing in a
dbip to one of the RT_DECLARE_INTERFACE functions, but none of them accepts a
struct directory.  Needs discussion before redoing all of the rt_*_tess
function signatures.
2023-11-20 11:53:11 -05:00
Clifford Yapp 288165ccb9 Merge branch 'main' into facetize 2023-11-20 09:46:22 -05:00
yida-zou d7114c3cce adjusted logos 2023-11-18 22:45:45 -06:00
YUMGUY 45ed6f3746 revert unit changes 2023-11-18 19:23:34 -06:00
Clifford Yapp ae4c61441b Add a note to check if we can implement the db_walk_tree + nmg_boolean logic as an rt_comb_tess callback. Not something we'd want to use for BoT evaluations since we don't want to have to stage BoTs through the NMG containers if we don't have to, but for old-school NMG output... 2023-11-17 19:42:57 -05:00
Clifford Yapp 5391625891 Note utility of CM and possibly useful code
Adapting terra and/or scape might make a good student project, actually
- boil down the code into the core algorithms, update them to use
BRL-CAD data types, and wire the results into facetize (or possibly even
replace the (apparently problematic) rt_dsp_tess routine.  It ought to
be fairly self contained, as projects go.
2023-11-17 19:24:54 -05:00
Clifford Yapp 6a06a6a037 Note a problem with DSP meshing 2023-11-17 19:04:37 -05:00
Clifford Yapp bc9c7a8d9c Adjust some comments 2023-11-17 18:45:33 -05:00
Clifford Yapp 6f063a3a29 Rework SPSR code to accept pre-generated points 2023-11-17 17:48:51 -05:00
Clifford Yapp bb340912e9 Tweak function name 2023-11-17 14:22:44 -05:00
Clifford Yapp c996888041 Point sampling is common to multiple methods - start working on refactoring it into a single preliminary step returning a point set, which can then be reused by multiple methods. 2023-11-17 13:27:54 -05:00
Clifford Yapp 02c92756cf If no methods are specified, try everything 2023-11-17 11:53:36 -05:00
Clifford Yapp bbf1dd76a8 Start organizing how method calling will work 2023-11-17 11:46:13 -05:00
Clifford Yapp 0644da64ca If the bot is already valid, just rename and return. 2023-11-17 11:21:31 -05:00
Clifford Yapp de9a519cd1 Concentrate the NMG output specific logic.
If we're targeting an NMG output, we need to use the old-school libnmg
methods of evaluation (despite their lower success rate.)  Focus the NMG
code on that use case.  If we want to take an NMG output and generate a
bot from that for some reason, we should facetize the NMG output in BoT
mode.  If we're interested in triangles we're going to want to use the
newer logic - NMG mode is for the case where we specifically *don't*
want to step the data down to triangles.
2023-11-17 10:23:11 -05:00
Sam Hollenbeck 6f0f87d2ce Merge branch 'main' of https://github.com/samhollenbeck/brlcad 2023-11-16 23:20:10 -06:00
Sam Hollenbeck 4aa5c8471d End to end testing test file 2023-11-16 23:20:07 -06:00
Sam Hollenbeck 5747c20fe6 Update README.md 2023-11-16 21:34:37 -06:00
Clifford Yapp ff7ff78c15 Simplify - just require enablement of all the various methods so there aren't any surprises when we add a new one. 2023-11-16 21:41:48 -05:00
Clifford Yapp 820bea80c3 Note possible use of pnts+spsr beyond facetize itself 2023-11-16 19:40:29 -05:00
Clifford Yapp 0bafec4b2a Remove dupliate options 2023-11-16 19:31:53 -05:00
Clifford Yapp 9aa601db8f Add abs, rel and norm tolerance options 2023-11-16 19:29:26 -05:00
Clifford Yapp 9a2bf82cd6 We will need separate option parsing here 2023-11-16 19:21:43 -05:00
YUMGUY 2a2fb9b7cb Spacing changes 2023-11-16 17:45:25 -06:00
Yida Zou bba19b5cc7 Update README.md 2023-11-16 17:13:39 -06:00
Yida Zou 10f3930751 Update README.md 2023-11-16 17:12:43 -06:00
Yida Zou c25e20a665 Update README.md 2023-11-16 17:12:12 -06:00
YUMGUY fa0c20af45 organized unit display for dim/area 2023-11-16 17:09:24 -06:00
Sam Hollenbeck 34fa3b1afa Merge branch 'main' of https://github.com/samhollenbeck/brlcad 2023-11-16 15:46:56 -06:00
Sam Hollenbeck ea53fd14e2 title now fills whole line before truncating 2023-11-16 15:46:54 -06:00
Sam Hollenbeck 9d09237659 increase scientific notation size condition 2023-11-16 15:46:20 -06:00
Sam Hollenbeck 5e3e70e445 clean up 2023-11-16 15:45:55 -06:00
Yida Zou ce94abe930 Added arguments to README.md 2023-11-16 15:39:02 -06:00
yida-zou 51a8d22668 updated help descriptions 2023-11-16 15:38:44 -06:00
yida-zou c42c35b772 described help options more accurately 2023-11-16 15:29:41 -06:00
yida-zou 85cfb3ecbe Now defaults to real/account name of user 2023-11-16 15:11:37 -06:00
yida-zou 76c49eae4e Merge branch 'main' of https://github.com/samhollenbeck/brlcad 2023-11-16 14:45:11 -06:00
Clifford Yapp 5f4f2da74a Get things compiling again 2023-11-15 08:23:54 -05:00
Clifford Yapp 44b2100ef6 Checkpoint 2023-11-14 21:59:13 -05:00
Clifford Yapp 356e606d2f Checkpoint - working on how to launch object tessellation as a subprocess 2023-11-14 16:34:50 -05:00
Clifford Yapp e9cfba9597 At least for the moment, need to see the logging output 2023-11-14 13:44:35 -05:00
Clifford Yapp 55b4f999a5 Adjust plate logic, add some debugging output 2023-11-14 10:37:16 -05:00
Clifford Yapp 03eb73dec2 What to do if we need to grab output from a 'successful' op 2023-11-14 10:17:25 -05:00
Clifford Yapp c86897b290 Set the ged pointer 2023-11-14 09:17:57 -05:00
Clifford Yapp 2768ca93da Make a note about potential here for targeted use of subprocesses 2023-11-14 09:12:28 -05:00
Clifford Yapp f9d1df2afa Add some reference notes 2023-11-13 21:59:38 -05:00
Clifford Yapp 5acec85f55 Rather than adding callbacks in the tree state, just make our own (simpler) booltree_leaf_tess 2023-11-13 21:29:04 -05:00
Clifford Yapp 0a1234b74a Adjust error message 2023-11-13 20:05:44 -05:00
Clifford Yapp 40201d7d73 Untested but a rough outline of what half definition will look like 2023-11-13 20:03:35 -05:00
Clifford Yapp a8fa083eab Start thinking about preliminary steps for facetize 2023-11-13 17:13:18 -05:00
Clifford Yapp 140f676702 Add another note to check geogram 2023-11-13 13:38:31 -05:00
Clifford Yapp 56228a9eab Add a note to investigate VSA 2023-11-13 13:16:44 -05:00
Clifford Yapp 1eda9abb55 I think what we're going to want to is keep and reuse the Manifold containers, rather than stepping to/from meshes... 2023-11-13 13:14:14 -05:00
Clifford Yapp 34bf3b1443 Set the ASSETIMPORT define 2023-11-13 13:07:09 -05:00
Clifford Yapp 3f4cc22b36 More main merging - switching to ExportMesh for debugging output 2023-11-13 13:02:38 -05:00
Clifford Yapp 9767cce8ec Merge main into facetize branch 2023-11-13 12:55:26 -05:00
yida-zou 482022c6f8 changed how names are spaced in rectangle header 2023-11-09 17:04:20 -06:00
Yida Zou e13a85fcff Updated gist README.md: updated installation and running instructions. 2023-11-09 15:51:44 -06:00
Sam Hollenbeck 34dd444332 Improved help output 2023-11-09 15:32:59 -06:00
Sam Hollenbeck d361bb04c3 Fix help output 2023-11-09 15:28:47 -06:00
Sam Hollenbeck 50ef40f56b Merge branch 'main' of https://github.com/samhollenbeck/brlcad 2023-11-09 15:28:27 -06:00
Sam Hollenbeck 2b153f2890 [Rohan's Code] Title overflow into notes 2023-11-09 15:26:57 -06:00
yida-zou 0fe5febd46 adjusted transparent image drawer function 2023-11-09 15:20:01 -06:00
yida-zou f53202ecc4 added optional logo filepath argument 2023-11-09 15:09:39 -06:00
Clifford Yapp 5bb68c3b34 Need to see if we can pass the full facetize state through the tree walk 2023-11-09 15:16:23 -05:00
yida-zou 7aa8b9297c Merge branch 'main' of https://github.com/samhollenbeck/brlcad 2023-11-09 13:45:29 -06:00
yida-zou 6a3fca362c Defaulted preparer to owner name. Added ability to override owner name 2023-11-09 13:45:26 -06:00
Sam Hollenbeck 94ce9ac400 Slight size change 2023-11-09 13:22:54 -06:00
Sam Hollenbeck 78d33b41a4 Left align showcase render 2023-11-09 12:49:55 -06:00
Sam Hollenbeck 92e1f1f707 fix function misspelling 2023-11-09 11:45:44 -06:00
Sam Hollenbeck 47c9c300c9 shift hierarchy diagram lower to avoid occlusions 2023-11-09 11:33:33 -06:00
Sam Hollenbeck 940433122e Change "No Material Densities" to "Not Available" 2023-11-09 11:32:30 -06:00
Sam Hollenbeck f1fdf8e2d2 Change Notes "N/A" to "None" 2023-11-09 11:31:50 -06:00
Clifford Yapp 57cae01bcf Checkpoint 2023-11-09 07:22:58 -05:00
yida-zou bcfeadda5f Merge branch 'main' of https://github.com/samhollenbeck/brlcad 2023-11-08 19:00:12 -06:00
yida-zou 01c2e64cf9 made brl-cad logo text easier to see 2023-11-08 19:00:07 -06:00
Clifford Yapp 9c1c1a377e Will need to be able to pass the flags along enabling/disabling fallback methods 2023-11-08 16:47:41 -05:00
Clifford Yapp da99018388 Start working on allowing for a fallback tess clbk
If we wish to try alternatives to the standard librt tessellation
methods as part of the initial primitive tree walk, we'll need a way to
inject that logic into the walking and evaluation process.

We'll also need to be sure we can distinguish between an error, and a
deliberate decision by tessellate not to return a mesh.  In the latter
case we may want to accept that result and proceed, but we need to be
sure the return codes will let us distinguish correctly.  Will probably
have to audit the librt tessellation methods to see what they're doing
in such cases.
2023-11-08 16:23:49 -05:00
Clifford Yapp 5ada4d8ce9 Checkpoint 2023-11-08 15:44:14 -05:00
Clifford Yapp c92cfccaae Correct _nonovlp_brep_facetize function args 2023-11-08 14:55:43 -05:00
Clifford Yapp 95100ade57 Begin reorg of facetize logic
facetize.cpp is getting unwieldy, and there's more to do to improve the
processing.  We want to merge the manifold and nmg methods (we should
simply try manifold first and then nmg if manifold doesn't work) and
attempt the fallback methods on individual primitives if their
individual nmg routines fail (rather than sampling whole large shapes
all the time, try to keep as close to a "standard" nmg bool process as
we can.)  We can still try the all-up CM/SPSR if individual shapes fail,
but hopefully that will become a rare situation.

We will also need, if possible, some means of automatically cleaning up
meshes that are "almost solid" but have small and localized topology
flaws - such meshes are often seen, and we don't want them to be the
reason we can't apply manifold and/or NMG boolean evaluation to the
tree.  Also need to special case half planes - for subtraction or
intersection we can substitute sufficiently large arbs, and they need to
be filtered out when unioned.

All this will require some adjustment to how facetize's pipeline works,
in addition to new support for operations like hole filling.  As a first
step, break logic into multiple files.  It's not working in this form as
yet - this is just a start.
2023-11-08 13:52:47 -05:00
Sam Hollenbeck ceb06c3a2e Make hierarchy section smaller to prevent overlapping 2023-11-06 21:15:28 -06:00
Sam Hollenbeck 25ffa35373 Fixed sizing of ghost render in report 2023-11-05 20:57:59 -06:00
Sam Hollenbeck da1f00dae3 delete old code 2023-11-05 20:42:55 -06:00
Sam Hollenbeck c203716c8f Scientific notation for 10 digit or more numbers 2023-11-05 20:13:50 -06:00
Sam Hollenbeck 16f518a9ec Add rtwizard back for ghost renders 2023-11-05 20:13:18 -06:00
Sam Hollenbeck ccbcebe41e Merge branch 'BRL-CAD:main' into main 2023-11-05 19:13:56 -06:00
Sam Hollenbeck 886c99f625 Made entity summary now summary of primary component 2023-11-03 16:16:34 -05:00
Sam Hollenbeck 50e35b71a0 Added top space before first line in file section 2023-11-03 15:34:19 -05:00
yida-zou 50cc6a930c moved Logo draw location 2023-11-02 15:39:22 -05:00
yida-zou 904c0916b2 fixed merge issues 2023-11-02 15:38:45 -05:00
yida-zou 41230b6cc6 got rid of rgen from cmakelist in gtools folder 2023-11-02 15:29:38 -05:00
yida-zou c9f613aad9 Merge branch 'main' of https://github.com/samhollenbeck/brlcad 2023-11-02 15:25:54 -05:00
yida-zou cf71274340 Merge branch 'main' of https://github.com/samhollenbeck/brlcad 2023-11-02 15:21:54 -05:00
YUMGUY b1df0516e6 Merge branch 'main' of https://github.com/samhollenbeck/brlcad 2023-11-02 15:20:02 -05:00
yida-zou 4a22e3f0c1 added function to display transparent images + BRLCAD logo
Replaced old drawImage functions for Tree
2023-11-02 15:16:10 -05:00
Sam Hollenbeck 916b3b59a8 updated and disabled default units corrector 2023-11-02 08:40:21 -05:00
Sam Hollenbeck 5a3042ef15 Stop truncating zeros 2023-11-02 07:37:28 -05:00
Sam Hollenbeck 2107498cc2 Merge branch 'BRL-CAD:main' into main 2023-11-02 06:46:00 -05:00
Sam Hollenbeck 89a4ecc065 Merge branch 'BRL-CAD:main' into main 2023-10-31 17:32:13 -05:00
Sam Hollenbeck 49e2e27a13 Update TODO 2023-10-31 17:24:54 -05:00
YUMGUY ec873f3a98 Merge branch 'main' of https://github.com/samhollenbeck/brlcad 2023-10-31 16:02:27 -05:00
Sam Hollenbeck 27ee7370dd Fix compile warnings 2023-10-31 15:54:53 -05:00
Sam Hollenbeck 88248631f5 Added MD5 info regardless of classification 2023-10-31 15:48:18 -05:00
Sam Hollenbeck 8e632eb8e4 Update TODO 2023-10-31 15:47:52 -05:00
yida-zou 243942805b Merge branch 'main' of https://github.com/samhollenbeck/brlcad 2023-10-31 15:34:19 -05:00
Sam Hollenbeck c57fd8716e Merge branch 'main' of https://github.com/samhollenbeck/brlcad 2023-10-31 14:44:12 -05:00
Sam Hollenbeck 5cfba98e72 Merge branch 'main' of https://github.com/samhollenbeck/brlcad 2023-10-31 14:43:19 -05:00
YUMGUY 003f6b7bfa concise dimension change 2023-10-30 21:54:08 -05:00
YUMGUY 6b1dcceb0f Merge branch 'main' of https://github.com/samhollenbeck/brlcad 2023-10-29 23:49:35 -05:00
Sam Hollenbeck aeea4a9c91 Added density information check before mass calculation 2023-10-26 15:58:52 -05:00
yida-zou 9108fd9843 fixed border classification colors 2023-10-26 15:53:24 -05:00
yida-zou b0eb85caf5 moved rgen files to gist 2023-10-26 15:25:59 -05:00
yida-zou 389512e63b Merge branch 'main' of https://github.com/samhollenbeck/brlcad 2023-10-26 14:22:27 -05:00
Sam Hollenbeck c0e3f3ba72 Fixed merge migration error 2023-10-26 11:48:28 -05:00
Sam Hollenbeck 18248f4979 fixed merge migration issues 2023-10-26 11:01:16 -05:00
Sam Hollenbeck 9d139d5ecc renamed rgen to gist 2023-10-26 10:24:12 -05:00
rohan-d995 70c3049fa8 Adjusted Notes and Bio
Adjusted to be more dynamic for formatting reasons
2023-10-26 08:58:00 -05:00
yida-zou a26b19aba1 added color classification for security 2023-10-26 08:58:00 -05:00
yida-zou 6e81208a19 Better logos 2023-10-26 08:57:59 -05:00
rohan-d995 0d18880826 Bio Option added
-B "text" arguments will replace the "N/A" with whatever bio information that is needed.
2023-10-26 08:57:20 -05:00
rohan-d995 948eab88ed Adjusted title overflow
Found the critical point in the title overflow and adjusted for it
2023-10-26 08:57:20 -05:00
Sam Hollenbeck b3c2ce1f84 default units are now corrected across all values to the same unit type 2023-10-26 08:57:20 -05:00
Sam Hollenbeck 573b101cb5 default unit conversion corrections (issues with scaling) 2023-10-26 08:57:20 -05:00
yida-zou 4344bd0e41 Moved logo images to rgen folder 2023-10-26 08:57:20 -05:00
Sam Hollenbeck 5491dd3cf8 starting Unit map in InformationGatherer 2023-10-26 08:57:20 -05:00
yida-zou 4ab9cfefd7 added bottom section branding logo 2023-10-26 08:57:20 -05:00
Sam Hollenbeck c0d4762e33 commented out code yida is working on 2023-10-26 08:57:19 -05:00
yida-zou af14c6720d added brlcad logo to top area
Changed justify function to return end of text x coordinate
2023-10-26 08:56:07 -05:00
yida-zou 216a2878c4 got rid of unneeded units label 2023-10-26 08:56:07 -05:00
yida-zou 69b6bf2f3c temp fix for rtwizard not working 2023-10-26 08:56:07 -05:00
yida-zou e98e147989 fixed temppath in options 2023-10-26 08:56:07 -05:00
Sam Hollenbeck a04abff53d Added in rgen subdirectory and updated CMake file 2023-10-26 08:56:07 -05:00
rohan-d995 6e5745e9e8 Adjusted Notes and Bio
Adjusted to be more dynamic for formatting reasons
2023-10-24 16:42:06 -05:00
rohan-d995 3c247daf11 Update FactsHandler.cpp 2023-10-24 15:33:01 -05:00
rohan-d995 00eac7106c Updated name and bio 2023-10-24 15:32:03 -05:00
yida-zou 1b67b7cf0d added color classification for security 2023-10-24 14:59:25 -05:00
yida-zou b13b7ce2b6 Better logos 2023-10-24 14:52:06 -05:00
rohan-d995 44af6c0ba5 Bio Option added
-B "text" arguments will replace the "N/A" with whatever bio information that is needed.
2023-10-20 15:42:20 -05:00
rohan-d995 3537cc7a44 Adjusted title overflow
Found the critical point in the title overflow and adjusted for it
2023-10-20 14:10:35 -05:00
Sam Hollenbeck 31c69eeda7 default units are now corrected across all values to the same unit type 2023-10-19 01:56:10 -05:00
Sam Hollenbeck 5e0e55d414 default unit conversion corrections (issues with scaling) 2023-10-19 01:32:49 -05:00
Sam Hollenbeck e9dc24a731 Merge branch 'main' of https://github.com/samhollenbeck/brlcad 2023-10-18 22:55:22 -05:00
Sam Hollenbeck 40ac43ec1e starting Unit map in InformationGatherer 2023-10-18 22:55:10 -05:00
yida-zou 8b6581d057 Moved logo images to rgen folder 2023-10-18 22:42:02 -05:00
yida-zou 20043d3391 added bottom section branding logo 2023-10-18 21:21:57 -05:00
yida-zou 07b79cc94f Merge branch 'main' of https://github.com/samhollenbeck/brlcad 2023-10-18 21:05:24 -05:00
yida-zou 364b93814c added brlcad logo to top area
Changed justify function to return end of text x coordinate
2023-10-18 21:05:03 -05:00
Sam Hollenbeck 1d9813b86f Removed scientific notation from File Section 2023-10-18 14:23:04 -05:00
Sam Hollenbeck 25119d07dc renaming confusing code (Original Units) 2023-10-18 12:54:56 -05:00
Sam Hollenbeck 46f1afec3b commented out code yida is working on 2023-10-18 11:43:26 -05:00
yida-zou 33b0f70092 got rid of unneeded units label 2023-10-18 10:51:45 -05:00
yida-zou 812a58fe7c temp fix for rtwizard not working 2023-10-18 10:44:24 -05:00
yida-zou 3ec0e0f58d fixed temppath in options 2023-10-18 10:15:12 -05:00
Sam Hollenbeck dbe6cafc77 Added in rgen subdirectory and updated CMake file 2023-10-17 13:33:26 -05:00
Gregory Li 8f63b09116 Merge branch 'main' of github.com:GregoryLi0/brlcad into brep_epa_debug 2022-08-31 11:36:59 +08:00
Gregory Li 5969136200 Use given matrix multiply function 2022-08-24 14:27:17 +08:00
Gregory Li c542ab35ed Solve the initial 90 degrees rotation of +X and +Y 2022-08-21 23:01:08 +08:00
Gregory Li 8b4ee5ad21 use rotation matrix between two coordinate systems. A 90 initial degree rotation still exists. 2022-08-21 22:08:31 +08:00
Gregory Li 6517ca914a divide transition into two rotation and one pan. Rotation according to https://sites.cs.ucsb.edu/~lingqi/teaching/resources/GAMES101_Lecture_04.pdf page 10 2022-08-21 21:34:03 +08:00
Gregory Li 3322c9104d add transform matrix 2022-08-19 23:32:19 +08:00
Gregory Li 4215500832 del repeated codes 2022-08-18 18:37:52 +08:00
Gregory Li 8ea7ffeb3e add a shift for elliptical parabolic NURBS surface 2022-08-18 18:35:24 +08:00
26056 changed files with 1332033 additions and 9278715 deletions

No files matched your search

+2
View File
@@ -0,0 +1,2 @@
# Try to tell GitHub how to handle .asc files
*.asc linguist-language=Tcl
+260
View File
@@ -0,0 +1,260 @@
name: Prepare bext dependencies
description: Restore a compatible bext production artifact or build the pinned revision.
inputs:
platform-channel:
description: Published bext platform channel.
required: true
source-dir:
description: Absolute path to the BRL-CAD source tree.
required: true
output-dir:
description: Absolute path where the bext dependency tree will be prepared.
required: true
build-type:
description: BRL-CAD build configuration that will consume the dependency tree.
required: false
default: Release
artifact-token:
description: Token with Actions read access to BRL-CAD/bext.
required: false
outputs:
bext-sha:
description: The bext revision in the prepared dependency tree.
value: ${{ steps.result.outputs.bext-sha }}
source:
description: Whether preparation used a production artifact, cache, or local build.
value: ${{ steps.result.outputs.source }}
runs:
using: composite
steps:
- name: Resolve bext production artifact
id: resolve
shell: bash
env:
BEXT_BUILD_TYPE: ${{ inputs.build-type }}
BEXT_CHANNEL: ${{ inputs.platform-channel }}
BRLCAD_SOURCE_DIR: ${{ inputs.source-dir }}
GH_TOKEN: ${{ inputs.artifact-token }}
run: |
set -uo pipefail
source_dir="$BRLCAD_SOURCE_DIR"
if command -v cygpath >/dev/null 2>&1; then
source_dir="$(cygpath -u "$source_dir")"
fi
required_sha="$(awk -F'[()]' '/^[[:space:]]*brlcad_bext_init\([0-9a-fA-F]{40}\)/ { print tolower($2) }' "$source_dir/CMakeLists.txt")"
if [[ ! "$required_sha" =~ ^[0-9a-f]{40}$ ]]; then
echo "Expected exactly one brlcad_bext_init(<sha>) call in $source_dir/CMakeLists.txt" >&2
exit 1
fi
repository='BRL-CAD/bext'
marker_name="bext-production-$required_sha"
marker_info="$(gh api "repos/$repository/actions/artifacts?name=$marker_name&per_page=100" \
--jq '[.artifacts[] | select(.expired == false and .name == "'"$marker_name"'")] | sort_by(.created_at) | last | select(. != null) | [.name, .workflow_run.id] | @tsv' 2>/dev/null)" || marker_info=''
selected_sha=''
run_id=''
if [[ -n "$marker_info" ]]; then
selected_sha="$required_sha"
IFS=$'\t' read -r _ run_id <<< "$marker_info"
echo "Found complete bext production artifacts for pinned revision $required_sha."
else
marker_info="$(gh api "repos/$repository/actions/artifacts?per_page=100" \
--jq '[.artifacts[] | select(.expired == false and (.name | test("^bext-production-[0-9a-f]{40}$")))] | sort_by(.created_at) | last | select(. != null) | [.name, .workflow_run.id] | @tsv' 2>/dev/null)" || marker_info=''
if [[ -n "$marker_info" ]]; then
IFS=$'\t' read -r latest_marker run_id <<< "$marker_info"
selected_sha="${latest_marker#bext-production-}"
comparison="$(gh api "repos/$repository/compare/$required_sha...$selected_sha" --jq '.status' 2>/dev/null)" || comparison=''
if [[ "$comparison" == 'ahead' || "$comparison" == 'identical' ]]; then
echo "::warning::Using newer successful bext revision $selected_sha instead of BRL-CAD's pinned revision $required_sha."
else
selected_sha=''
run_id=''
fi
fi
fi
artifact_ready=false
artifact_name=''
if [[ "$RUNNER_OS" == 'Windows' && "$BEXT_BUILD_TYPE" == 'Debug' ]]; then
echo 'Windows Debug requires a Debug bext build; skipping Release production artifacts.'
selected_sha=''
run_id=''
elif [[ -n "$selected_sha" ]]; then
artifact_name="bext-$BEXT_CHANNEL-$selected_sha"
artifact_count="$(gh api "repos/$repository/actions/runs/$run_id/artifacts?name=$artifact_name&per_page=100" \
--jq '[.artifacts[] | select(.expired == false and .name == "'"$artifact_name"'")] | length' 2>/dev/null)" || artifact_count=0
if [[ "$artifact_count" == '1' ]]; then
artifact_ready=true
else
selected_sha=''
run_id=''
artifact_name=''
fi
fi
cache_schema=1
image_version="${ImageVersion:-unknown}"
runner_arch="${RUNNER_ARCH:-unknown}"
fallback_cache_key="bext-$cache_schema-$BEXT_CHANNEL-$BEXT_BUILD_TYPE-$required_sha-$image_version-$runner_arch"
production_cache_key="bext-$cache_schema-$BEXT_CHANNEL-Release-$selected_sha"
if [[ "$artifact_ready" != 'true' ]]; then
echo "No compatible production artifact is available; using the cache/build fallback for $required_sha."
fi
echo "required-sha=$required_sha" >> "$GITHUB_OUTPUT"
echo "selected-sha=$selected_sha" >> "$GITHUB_OUTPUT"
echo "run-id=$run_id" >> "$GITHUB_OUTPUT"
echo "artifact-name=$artifact_name" >> "$GITHUB_OUTPUT"
echo "artifact-ready=$artifact_ready" >> "$GITHUB_OUTPUT"
echo "production-cache-key=$production_cache_key" >> "$GITHUB_OUTPUT"
echo "fallback-cache-key=$fallback_cache_key" >> "$GITHUB_OUTPUT"
- name: Restore production artifact cache
if: steps.resolve.outputs.artifact-ready == 'true'
id: production-cache
uses: actions/cache/restore@v6
with:
path: ${{ inputs.output-dir }}
key: ${{ steps.resolve.outputs.production-cache-key }}
- name: Download bext production artifact
if: steps.resolve.outputs.artifact-ready == 'true' && steps.production-cache.outputs.cache-hit != 'true'
id: download
shell: bash
env:
ARTIFACT_NAME: ${{ steps.resolve.outputs.artifact-name }}
BEXT_CHANNEL: ${{ inputs.platform-channel }}
BEXT_OUTPUT_DIR: ${{ inputs.output-dir }}
BEXT_RUN_ID: ${{ steps.resolve.outputs.run-id }}
GH_TOKEN: ${{ inputs.artifact-token }}
run: |
set -uo pipefail
output_dir="$BEXT_OUTPUT_DIR"
if command -v cygpath >/dev/null 2>&1; then
output_dir="$(cygpath -u "$output_dir")"
fi
download_dir="$RUNNER_TEMP/bext-download-$BEXT_RUN_ID-$BEXT_CHANNEL"
cmake -E rm -rf "$download_dir" "$output_dir"
cmake -E make_directory "$download_dir" "$output_dir"
ready=false
if gh run download "$BEXT_RUN_ID" --repo BRL-CAD/bext --name "$ARTIFACT_NAME" --dir "$download_dir"; then
archive="$download_dir/bext-$BEXT_CHANNEL.tar.gz"
if (cd "$output_dir" && cmake -E tar xzf "$archive") && \
[[ -d "$output_dir/install" && -d "$output_dir/noinstall" && -f "$output_dir/bext-install-manifest.json" ]]; then
ready=true
fi
fi
cmake -E rm -rf "$download_dir"
if [[ "$ready" != 'true' ]]; then
cmake -E rm -rf "$output_dir"
echo '::warning::Unable to download or validate the bext production artifact; using the pinned cache/build fallback.'
fi
echo "ready=$ready" >> "$GITHUB_OUTPUT"
- name: Restore fallback bext cache
if: steps.production-cache.outputs.cache-hit != 'true' && steps.download.outputs.ready != 'true'
id: fallback-cache
uses: actions/cache/restore@v6
with:
path: ${{ inputs.output-dir }}
key: ${{ steps.resolve.outputs.fallback-cache-key }}
- name: Build pinned bext revision
if: steps.production-cache.outputs.cache-hit != 'true' && steps.download.outputs.ready != 'true' && steps.fallback-cache.outputs.cache-hit != 'true'
shell: bash
env:
BEXT_BUILD_TYPE: ${{ inputs.build-type }}
BEXT_OUTPUT_DIR: ${{ inputs.output-dir }}
BEXT_SHA: ${{ steps.resolve.outputs.required-sha }}
run: |
set -euo pipefail
output_dir="$BEXT_OUTPUT_DIR"
if command -v cygpath >/dev/null 2>&1; then
output_dir="$(cygpath -u "$output_dir")"
fi
source_dir="$RUNNER_TEMP/bext-src"
build_dir="$RUNNER_TEMP/bext-build"
cleanup() {
cmake -E rm -rf "$source_dir" "$build_dir"
}
trap cleanup EXIT
cleanup
cmake -E rm -rf "$output_dir"
git clone --filter=blob:none https://github.com/BRL-CAD/bext.git "$source_dir"
git -C "$source_dir" -c advice.detachedHead=false checkout "$BEXT_SHA"
configure_args=(-S "$source_dir" -B "$build_dir" -G Ninja -DENABLE_ALL=ON -DGIT_SHALLOW_CLONE=ON "-DCMAKE_BUILD_TYPE=$BEXT_BUILD_TYPE" "-DCMAKE_INSTALL_PREFIX=$output_dir")
if [[ "$RUNNER_OS" == 'Windows' ]]; then
configure_args+=(-DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe)
elif [[ "$RUNNER_OS" == 'macOS' ]]; then
export CC=clang
export CXX=clang++
fi
cmake "${configure_args[@]}"
cmake --build "$build_dir" --config "$BEXT_BUILD_TYPE" --parallel 2
- name: Validate bext dependency tree
shell: bash
env:
BEXT_OUTPUT_DIR: ${{ inputs.output-dir }}
run: |
set -euo pipefail
output_dir="$BEXT_OUTPUT_DIR"
if command -v cygpath >/dev/null 2>&1; then
output_dir="$(cygpath -u "$output_dir")"
fi
[[ -d "$output_dir/install" && -d "$output_dir/noinstall" && -f "$output_dir/bext-install-manifest.json" ]]
tool="$output_dir/noinstall/bin/strclear"
if [[ "$RUNNER_OS" == 'Windows' ]]; then
[[ -f "$tool.exe" ]]
else
[[ -x "$tool" ]]
fi
- name: Save production artifact cache
if: steps.download.outputs.ready == 'true'
uses: actions/cache/save@v6
with:
path: ${{ inputs.output-dir }}
key: ${{ steps.resolve.outputs.production-cache-key }}
- name: Save fallback bext cache
if: steps.production-cache.outputs.cache-hit != 'true' && steps.download.outputs.ready != 'true' && steps.fallback-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v6
with:
path: ${{ inputs.output-dir }}
key: ${{ steps.resolve.outputs.fallback-cache-key }}
- name: Report bext source
id: result
shell: bash
env:
ARTIFACT_READY: ${{ steps.resolve.outputs.artifact-ready }}
ARTIFACT_SHA: ${{ steps.resolve.outputs.selected-sha }}
DOWNLOAD_READY: ${{ steps.download.outputs.ready }}
FALLBACK_CACHE_HIT: ${{ steps.fallback-cache.outputs.cache-hit }}
PRODUCTION_CACHE_HIT: ${{ steps.production-cache.outputs.cache-hit }}
REQUIRED_SHA: ${{ steps.resolve.outputs.required-sha }}
run: |
if [[ "$PRODUCTION_CACHE_HIT" == 'true' ]]; then
source=production-cache
elif [[ "$DOWNLOAD_READY" == 'true' ]]; then
source=production-artifact
elif [[ "$FALLBACK_CACHE_HIT" == 'true' ]]; then
source=fallback-cache
else
source=local-build
fi
if [[ "$ARTIFACT_READY" == 'true' && ( "$PRODUCTION_CACHE_HIT" == 'true' || "$DOWNLOAD_READY" == 'true' ) ]]; then
sha="$ARTIFACT_SHA"
else
sha="$REQUIRED_SHA"
fi
echo "source=$source" >> "$GITHUB_OUTPUT"
echo "bext-sha=$sha" >> "$GITHUB_OUTPUT"
echo "Prepared bext $sha from $source."
-102
View File
@@ -1,102 +0,0 @@
name: BRL-CAD Analysis
on:
push:
branches: [ main ]
jobs:
linux_static:
name: Clang Static Analyser
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:
- name: Setup - CMake
uses: lukka/get-cmake@latest
# Setup hint from https://github.com/darktable-org/rawspeed/blob/develop/.github/workflows/ci-static-analysis.yml
- name: Clang Static Analyzer Setup
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update
sudo apt-get install clang-tools-14
# We want as many deps pre-installed as we can for this - the analyzer setup slows their compilation
sudo apt-get install libproj-dev libgdal-dev tcl-dev tk-dev itcl3-dev itk3-dev libpng-dev zlib1g-dev libxml2-dev libxslt1-dev xsltproc libxml2-utils astyle xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev
sudo apt-get clean
- name: Checkout
uses: actions/checkout@v4
- name: Run Analyzer
run: |
pwd
export PATH=$ENV{GITHUB_WORKSPACE}:/usr/share/clang/scan-build-14/bin:/usr/share/clang/scan-build-14/libexec:$PATH
mkdir build && cd build && cp ../misc/clang-static-analyzer-run.sh .
./clang-static-analyzer-run.sh
- name: Summary
if: success() || failure()
run: |
sudo apt-get install html2text
html2text build/scan-reports-all/*/index.html
linux_cov:
# See https://app.codecov.io/gh/BRL-CAD/brlcad for analysis results
name: LCOV Coverage testing
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:
- name: Setup - CMake
uses: lukka/get-cmake@latest
- name: Setup
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update
# Get the lcov tool and its dependencies
sudo apt-get install lcov
# We want as many deps pre-installed as we can for this - the analyzer setup slows their compilation
sudo apt-get install libproj-dev libgdal-dev tcl-dev tk-dev itcl3-dev itk3-dev libpng-dev zlib1g-dev libxml2-dev libxslt1-dev xsltproc libxml2-utils astyle xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev
sudo apt-get clean
# - name: Setup - Qt
# uses: jurplel/install-qt-action@v3
# with:
# cache: 'true'
- name: Checkout
uses: actions/checkout@v4
- name: Configure
run: |
export PATH=$ENV{GITHUB_WORKSPACE}:$PATH
cmake -S . -B build -DBRLCAD_ENABLE_COVERAGE=ON
- name: Build
run: |
export PATH=$ENV{GITHUB_WORKSPACE}:$PATH
cd build && make && cd ..
- name: Run Coverage Test
run: |
export PATH=$ENV{GITHUB_WORKSPACE}:$PATH
cd build
find . -name '*.gcda' -exec rm {} \;
make check
lcov --capture --directory . --output-file coverage.info
lcov -r coverage.info \*\/other\/\* > coverage-2.info
lcov -r coverage-2.info \/usr\/\* > coverage_cad.info
rm coverage-*.info
#genhtml coverage_cad.info --output-directory lcov-output
mv coverage_cad.info ..
- name: Upload
uses: codecov/codecov-action@v3
with:
files: ./coverage_cad.info
-232
View File
@@ -1,232 +0,0 @@
# This file defines Continuous Integration (CI) tests for BRL-CAD using the
# Github Actions framework. Currently it defines configurations for Windows,
# Linux and OSX.
#
# Initially we used examples to try and define one common configuration for all
# platforms, but that turned out to be more complex than it was worth. The
# different platforms manifest different issues, and it is easier to keep the
# individual steps simple and address what needs addressing per-platform.
#
# For more information about available platforms for testing, see:
#
# https://docs.github.com/en/free-pro-team@latest/actions/reference/specifications-for-github-hosted-runners
#
# The general rule when building in CI is to go more verbose in output settings
# rather than less, since iterative debugging isn't practical. We also want to
# avoid parallel building - while that will sometimes catch dependency issues,
# it also makes the outputs far harder to interpret when there is a problem.
# Better to do parallel build debugging in an environment were more interactive
# and iterative debugging is available while preserving the readability of the
# CI outputs for other issues.
#
# Note that there is another reason not to do parallel runs; we have had some
# trouble with issues that appear to be related to files not being fully
# written out to disk. To try and help mitigate this, we don't want to stress
# the I/O subsystem any more than necessary:
#
# https://github.com/actions/runner/issues/718
#
name: BRL-CAD
on: [push]
jobs:
windows:
name: Windows Latest MSVC - Ninja
runs-on: windows-latest
strategy:
fail-fast: true
steps:
- name: Setup - CMake
uses: lukka/get-cmake@latest
- name: Setup - Qt
uses: jurplel/install-qt-action@v3
with:
cache: 'true'
- name: Checkout
uses: actions/checkout@v4
- name: Add github workspace to path
# https://github.community/t/deprecated-add-path/136621
run: echo "$ENV{GITHUB_WORKSPACE}" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.1.3
- name: Add cl.exe to PATH
uses: ilammy/msvc-dev-cmd@v1
- name: Configure
run: |
cmake -S . -B build -G Ninja -D CMAKE_C_COMPILER="cl.exe" -D CMAKE_CXX_COMPILER="cl.exe" -D ENABLE_ALL=ON -D CMAKE_BUILD_TYPE=Release -DBRLCAD_ENABLE_QT=ON
# We do the following in order to help ensure files are "flushed"
# to disk before compilation is attempted
# https://superuser.com/a/1553374/1286142
powershell Write-VolumeCache C
powershell Write-VolumeCache D
- name: Build
run: cd build && ninja -j1 -v && ninja check -v && ninja package
# Various other Windows build lines used for various types of testing.
# Preserved for reference, as the iterative time to figure out how to
# perform them was significant...
#run: cmake --build build --config Release --target package
#run: cd build && ninja -j1 -v STEPCODE_BLD && cd src/other/ext/STEPCODE_BLD-prefix/src/STEPCODE_BLD-build && ninja clean && ninja -j1 -v
#run: cmake --build build --config Release --target STEPCODE_BLD && cd build/src/other/ext/STEPCODE_BLD-prefix/src/STEPCODE_BLD-build && msbuild ALL_BUILD.vcxproj -t:clean && msbuild ALL_BUILD.vcxproj -v:diag
# For the moment the space demands are too extreme to enable this
# output for every compile test, but leave the enabling logic present
# in commented out form so it can be enabled as needed.
# - name: Upload Package
# uses: actions/upload-artifact@v2
# with:
# name: BRLCAD_Windows
# path: ${{ github.workspace }}/build/BRL-CAD*exe
windows_std_tools:
name: Windows Latest MSVC - Standard Tools
runs-on: windows-latest
strategy:
fail-fast: true
steps:
- name: Setup - CMake
uses: lukka/get-cmake@latest
- name: Checkout
uses: actions/checkout@v4
- name: Add github workspace to path
# https://github.community/t/deprecated-add-path/136621
run: echo "$ENV{GITHUB_WORKSPACE}" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
- name: Configure
run: |
cmake -S . -B build -D ENABLE_ALL=ON
# We do the following in order to help ensure files are "flushed"
# to disk before compilation is attempted
# https://superuser.com/a/1553374/1286142
powershell Write-VolumeCache C
powershell Write-VolumeCache D
# At least for the moment, the main idea for this particular test is to try and
# verify multi-config building is working as expected - to shorten build times
# but still have a test of the key components, just build MGED
- name: Build
run: |
cmake --build build --config Debug --target mged
cmake --build build --config Release --target mged
linux:
name: Ubuntu Latest GCC
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:
- name: Setup - CMake
uses: lukka/get-cmake@latest
- name: Setup - System
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update
# Install X/OpenGL dev pkgs
sudo apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev
sudo apt-get clean
- name: Setup - Qt
uses: jurplel/install-qt-action@v3
with:
cache: 'true'
- name: Checkout
uses: actions/checkout@v4
- name: Configure
run: |
export PATH=$ENV{GITHUB_WORKSPACE}:$PATH
cmake -S . -G Ninja -B build -D ENABLE_ALL=ON -D CMAKE_BUILD_TYPE=Release -DBRLCAD_ENABLE_QT=ON
- name: Build
run: |
export PATH=$ENV{GITHUB_WORKSPACE}:$PATH
cmake --build build --config Release --target check
cmake --build build --config Release --target package
# For the moment the space demands are too extreme to enable this
# output for every compile test, but leave the enabling logic present
# in commented out form so it can be enabled as needed.
# - name: Upload Package
# uses: actions/upload-artifact@v2
# with:
# name: BRLCAD_Linux
# path: ${{ github.workspace }}/build/BRL-CAD*gz
osx:
name: macOS Latest Clang
runs-on: macos-latest
strategy:
fail-fast: true
steps:
- name: Setup - CMake
uses: lukka/get-cmake@latest
- name: Setup - Qt
uses: jurplel/install-qt-action@v3
with:
cache: 'true'
- name: Checkout
uses: actions/checkout@v4
- name: Configure
run: |
export PATH=$ENV{GITHUB_WORKSPACE}:$PATH
export CC=clang
export CXX=clang++
cmake -S . -G Ninja -B build -D ENABLE_ALL=ON -D CMAKE_BUILD_TYPE=Release -DBRLCAD_ENABLE_QT=ON -D BRLCAD_ENABLE_X11=OFF
- name: Build
run: |
export PATH=$ENV{GITHUB_WORKSPACE}:$PATH
cd build && ninja -j1 && ninja -j1 package
#cmake --build build --config Release --target check
#cmake --build build --config Release --target package
# For the moment the space demands are too extreme to enable this
# output for every compile test, but leave the enabling logic present
# in commented out form so it can be enabled as needed.
# - name: Upload Package
# uses: actions/upload-artifact@v2
# with:
# name: BRLCAD_OSX
# path: ${{ github.workspace }}/build/BRL-CAD*gz
# A full distcheck is too expensive for the runners, but we can run the
# repository integrity check and make sure we can build source archives.
archives:
name: Source Archives
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:
- name: Setup - CMake
uses: lukka/get-cmake@latest
- name: Checkout
uses: actions/checkout@v4
- name: Configure
run: |
export PATH=$ENV{GITHUB_WORKSPACE}:$PATH
cmake -S . -B build_archives -D ENABLE_ALL=ON
- name: Build
run: |
export PATH=$ENV{GITHUB_WORKSPACE}:$PATH
cmake --build build_archives --config Debug --target distcheck-source_archives
+637
View File
@@ -0,0 +1,637 @@
# BRL-CAD's primary distcheck target runs too long and does too much work to
# be suitable as a CI target, even occasionally. To achieve essentially the
# same result, we define individual jobs for each distcheck sub-target and
# distribute them across five serial queues. To avoid the target list going
# stale, this header is followed by jobs generated from the CMake logic.
name: Distcheck
on:
workflow_dispatch:
schedule:
- cron: '30 3 * * 5'
jobs:
bext:
name: Prepare bext
runs-on: ubuntu-24.04
env:
DEBIAN_FRONTEND: noninteractive
steps:
- name: Setup - CMake
uses: lukka/get-cmake@latest
- name: Install apt dependencies
run: |
sudo apt-get update
# Install X/OpenGL dev pkgs
sudo apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev libfontconfig-dev
# Install tools
sudo apt-get install astyle re2c
# Install dependency dev pkgs
sudo apt-get install zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libeigen3-dev libgdal-dev libassimp-dev libopencv-dev tcl-dev tk-dev
# Install XCB/OpenGL dev pkgs for Qt - see:
# https://wiki.qt.io/Building_Qt_6_from_Git
# https://doc.qt.io/qt-6/linux-requirements.html
sudo apt-get install libfontconfig1-dev libfreetype6-dev libx11-dev libx11-xcb-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libxcb-cursor-dev libxcb-glx0-dev libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev libxcb-util-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-xinput-dev libxcb-xrm-dev libxkbcommon-dev libxkbcommon-x11-dev
sudo apt-get install libgl-dev
sudo apt-get install libinput-dev
- name: Checkout
uses: actions/checkout@v6
with:
path: brlcad
- name: Prepare bext dependencies
uses: ./brlcad/.github/actions/prepare-bext
with:
platform-channel: ubuntu-24.04-${{ runner.arch }}-release
source-dir: ${{ github.workspace }}/brlcad
output-dir: ${{ runner.temp }}/bext_output
build-type: Release
artifact-token: ${{ secrets.BEXT_ARTIFACT_TOKEN }}
distcheck-default_build_type:
name: distcheck-default_build_type
runs-on: ubuntu-24.04
needs: [bext]
env:
DEBIAN_FRONTEND: noninteractive
if: ${{ !cancelled() && github.ref == 'refs/heads/main' }}
steps:
- name: Setup - CMake
uses: lukka/get-cmake@latest
- name: Install apt dependencies
run: |
sudo apt-get update
sudo apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev libfontconfig-dev
sudo apt-get install astyle re2c
sudo apt-get install zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libeigen3-dev libgdal-dev libassimp-dev libopencv-dev tcl-dev tk-dev libgl-dev libinput-dev
- name: Checkout
uses: actions/checkout@v6
with:
path: brlcad
- name: Prepare bext dependencies
uses: ./brlcad/.github/actions/prepare-bext
with:
platform-channel: ubuntu-24.04-${{ runner.arch }}-release
source-dir: ${{ github.workspace }}/brlcad
output-dir: ${{ runner.temp }}/bext_output
build-type: Release
artifact-token: ${{ secrets.BEXT_ARTIFACT_TOKEN }}
- name: Directory setup
run: cmake -E make_directory build_distcheck-default_build_type
- name: Configure
run: cmake -S brlcad -B build_distcheck-default_build_type -G Ninja -DBRLCAD_EXT_DIR=${{ runner.temp }}/bext_output
- name: Build
run: cmake --build build_distcheck-default_build_type --target distcheck-default_build_type
- name: Log
if: always()
run: cat build_distcheck-default_build_type/distcheck-default_build_type.log
distcheck-debug:
name: distcheck-debug
runs-on: ubuntu-24.04
needs: [bext]
env:
DEBIAN_FRONTEND: noninteractive
if: ${{ !cancelled() && github.ref == 'refs/heads/main' }}
steps:
- name: Setup - CMake
uses: lukka/get-cmake@latest
- name: Install apt dependencies
run: |
sudo apt-get update
sudo apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev libfontconfig-dev
sudo apt-get install astyle re2c
sudo apt-get install zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libeigen3-dev libgdal-dev libassimp-dev libopencv-dev tcl-dev tk-dev libgl-dev libinput-dev
- name: Checkout
uses: actions/checkout@v6
with:
path: brlcad
- name: Prepare bext dependencies
uses: ./brlcad/.github/actions/prepare-bext
with:
platform-channel: ubuntu-24.04-${{ runner.arch }}-release
source-dir: ${{ github.workspace }}/brlcad
output-dir: ${{ runner.temp }}/bext_output
build-type: Release
artifact-token: ${{ secrets.BEXT_ARTIFACT_TOKEN }}
- name: Directory setup
run: cmake -E make_directory build_distcheck-debug
- name: Configure
run: cmake -S brlcad -B build_distcheck-debug -G Ninja -DCMAKE_BUILD_TYPE=Debug -DBRLCAD_EXT_DIR=${{ runner.temp }}/bext_output
- name: Build
run: cmake --build build_distcheck-debug --config Debug --target distcheck-debug
- name: Log
if: always()
run: cat build_distcheck-debug/distcheck-debug.log
distcheck-release:
name: distcheck-release
runs-on: ubuntu-24.04
needs: [bext]
env:
DEBIAN_FRONTEND: noninteractive
if: ${{ !cancelled() && github.ref == 'refs/heads/main' }}
steps:
- name: Setup - CMake
uses: lukka/get-cmake@latest
- name: Install apt dependencies
run: |
sudo apt-get update
sudo apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev libfontconfig-dev
sudo apt-get install astyle re2c
sudo apt-get install zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libeigen3-dev libgdal-dev libassimp-dev libopencv-dev tcl-dev tk-dev libgl-dev libinput-dev
- name: Checkout
uses: actions/checkout@v6
with:
path: brlcad
- name: Prepare bext dependencies
uses: ./brlcad/.github/actions/prepare-bext
with:
platform-channel: ubuntu-24.04-${{ runner.arch }}-release
source-dir: ${{ github.workspace }}/brlcad
output-dir: ${{ runner.temp }}/bext_output
build-type: Release
artifact-token: ${{ secrets.BEXT_ARTIFACT_TOKEN }}
- name: Directory setup
run: cmake -E make_directory build_distcheck-release
- name: Configure
run: cmake -S brlcad -B build_distcheck-release -G Ninja -DCMAKE_BUILD_TYPE=Release -DBRLCAD_EXT_DIR=${{ runner.temp }}/bext_output
- name: Build
run: cmake --build build_distcheck-release --config Release --target distcheck-release
- name: Log
if: always()
run: cat build_distcheck-release/distcheck-release.log
distcheck-no_unity_debug:
name: distcheck-no_unity_debug
runs-on: ubuntu-24.04
needs: [bext]
env:
DEBIAN_FRONTEND: noninteractive
if: ${{ !cancelled() && github.ref == 'refs/heads/main' }}
steps:
- name: Setup - CMake
uses: lukka/get-cmake@latest
- name: Install apt dependencies
run: |
sudo apt-get update
sudo apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev libfontconfig-dev
sudo apt-get install astyle re2c
sudo apt-get install zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libeigen3-dev libgdal-dev libassimp-dev libopencv-dev tcl-dev tk-dev libgl-dev libinput-dev
- name: Checkout
uses: actions/checkout@v6
with:
path: brlcad
- name: Prepare bext dependencies
uses: ./brlcad/.github/actions/prepare-bext
with:
platform-channel: ubuntu-24.04-${{ runner.arch }}-release
source-dir: ${{ github.workspace }}/brlcad
output-dir: ${{ runner.temp }}/bext_output
build-type: Release
artifact-token: ${{ secrets.BEXT_ARTIFACT_TOKEN }}
- name: Directory setup
run: cmake -E make_directory build_distcheck-no_unity_debug
- name: Configure
run: cmake -S brlcad -B build_distcheck-no_unity_debug -G Ninja -DCMAKE_BUILD_TYPE=Debug -DBRLCAD_EXT_DIR=${{ runner.temp }}/bext_output -DBRLCAD_ENABLE_UNITY_BUILD=OFF
- name: Build
run: cmake --build build_distcheck-no_unity_debug --config Debug --target distcheck-no_unity_debug
- name: Log
if: always()
run: cat build_distcheck-no_unity_debug/distcheck-no_unity_debug.log
distcheck-no_unity_release:
name: distcheck-no_unity_release
runs-on: ubuntu-24.04
needs: [bext]
env:
DEBIAN_FRONTEND: noninteractive
if: ${{ !cancelled() && github.ref == 'refs/heads/main' }}
steps:
- name: Setup - CMake
uses: lukka/get-cmake@latest
- name: Install apt dependencies
run: |
sudo apt-get update
sudo apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev libfontconfig-dev
sudo apt-get install astyle re2c
sudo apt-get install zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libeigen3-dev libgdal-dev libassimp-dev libopencv-dev tcl-dev tk-dev libgl-dev libinput-dev
- name: Checkout
uses: actions/checkout@v6
with:
path: brlcad
- name: Prepare bext dependencies
uses: ./brlcad/.github/actions/prepare-bext
with:
platform-channel: ubuntu-24.04-${{ runner.arch }}-release
source-dir: ${{ github.workspace }}/brlcad
output-dir: ${{ runner.temp }}/bext_output
build-type: Release
artifact-token: ${{ secrets.BEXT_ARTIFACT_TOKEN }}
- name: Directory setup
run: cmake -E make_directory build_distcheck-no_unity_release
- name: Configure
run: cmake -S brlcad -B build_distcheck-no_unity_release -G Ninja -DCMAKE_BUILD_TYPE=Release -DBRLCAD_EXT_DIR=${{ runner.temp }}/bext_output -DBRLCAD_ENABLE_UNITY_BUILD=OFF
- name: Build
run: cmake --build build_distcheck-no_unity_release --config Release --target distcheck-no_unity_release
- name: Log
if: always()
run: cat build_distcheck-no_unity_release/distcheck-no_unity_release.log
distcheck-enableall_debug:
name: distcheck-enableall_debug
runs-on: ubuntu-24.04
needs: [distcheck-default_build_type]
env:
DEBIAN_FRONTEND: noninteractive
if: ${{ !cancelled() && github.ref == 'refs/heads/main' }}
steps:
- name: Setup - CMake
uses: lukka/get-cmake@latest
- name: Install apt dependencies
run: |
sudo apt-get update
sudo apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev libfontconfig-dev
sudo apt-get install astyle re2c
sudo apt-get install zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libeigen3-dev libgdal-dev libassimp-dev libopencv-dev tcl-dev tk-dev libgl-dev libinput-dev
- name: Checkout
uses: actions/checkout@v6
with:
path: brlcad
- name: Prepare bext dependencies
uses: ./brlcad/.github/actions/prepare-bext
with:
platform-channel: ubuntu-24.04-${{ runner.arch }}-release
source-dir: ${{ github.workspace }}/brlcad
output-dir: ${{ runner.temp }}/bext_output
build-type: Release
artifact-token: ${{ secrets.BEXT_ARTIFACT_TOKEN }}
- name: Directory setup
run: cmake -E make_directory build_distcheck-enableall_debug
- name: Configure
run: cmake -S brlcad -B build_distcheck-enableall_debug -G Ninja -DCMAKE_BUILD_TYPE=Debug -DENABLE_ALL=ON -DBRLCAD_EXT_DIR=${{ runner.temp }}/bext_output
- name: Build
run: cmake --build build_distcheck-enableall_debug --config Debug --target distcheck-enableall_debug
- name: Log
if: always()
run: cat build_distcheck-enableall_debug/distcheck-enableall_debug.log
distcheck-enableall_release:
name: distcheck-enableall_release
runs-on: ubuntu-24.04
needs: [distcheck-debug]
env:
DEBIAN_FRONTEND: noninteractive
if: ${{ !cancelled() && github.ref == 'refs/heads/main' }}
steps:
- name: Setup - CMake
uses: lukka/get-cmake@latest
- name: Install apt dependencies
run: |
sudo apt-get update
sudo apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev libfontconfig-dev
sudo apt-get install astyle re2c
sudo apt-get install zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libeigen3-dev libgdal-dev libassimp-dev libopencv-dev tcl-dev tk-dev libgl-dev libinput-dev
- name: Checkout
uses: actions/checkout@v6
with:
path: brlcad
- name: Prepare bext dependencies
uses: ./brlcad/.github/actions/prepare-bext
with:
platform-channel: ubuntu-24.04-${{ runner.arch }}-release
source-dir: ${{ github.workspace }}/brlcad
output-dir: ${{ runner.temp }}/bext_output
build-type: Release
artifact-token: ${{ secrets.BEXT_ARTIFACT_TOKEN }}
- name: Directory setup
run: cmake -E make_directory build_distcheck-enableall_release
- name: Configure
run: cmake -S brlcad -B build_distcheck-enableall_release -G Ninja -DCMAKE_BUILD_TYPE=Release -DENABLE_ALL=ON -DBRLCAD_EXT_DIR=${{ runner.temp }}/bext_output
- name: Build
run: cmake --build build_distcheck-enableall_release --config Release --target distcheck-enableall_release
- name: Log
if: always()
run: cat build_distcheck-enableall_release/distcheck-enableall_release.log
distcheck-prepared_debug:
name: distcheck-prepared_debug
runs-on: ubuntu-24.04
needs: [distcheck-release]
env:
DEBIAN_FRONTEND: noninteractive
if: ${{ !cancelled() && github.ref == 'refs/heads/main' }}
steps:
- name: Setup - CMake
uses: lukka/get-cmake@latest
- name: Install apt dependencies
run: |
sudo apt-get update
sudo apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev libfontconfig-dev
sudo apt-get install astyle re2c
sudo apt-get install zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libeigen3-dev libgdal-dev libassimp-dev libopencv-dev tcl-dev tk-dev libgl-dev libinput-dev
- name: Checkout
uses: actions/checkout@v6
with:
path: brlcad
- name: Prepare bext dependencies
uses: ./brlcad/.github/actions/prepare-bext
with:
platform-channel: ubuntu-24.04-${{ runner.arch }}-release
source-dir: ${{ github.workspace }}/brlcad
output-dir: ${{ runner.temp }}/bext_output
build-type: Release
artifact-token: ${{ secrets.BEXT_ARTIFACT_TOKEN }}
- name: Directory setup
run: cmake -E make_directory build_distcheck-prepared_debug
- name: Configure
run: cmake -S brlcad -B build_distcheck-prepared_debug -G Ninja -DCMAKE_BUILD_TYPE=Debug -DBRLCAD_EXT_DIR=${{ runner.temp }}/bext_output
- name: Build
run: cmake --build build_distcheck-prepared_debug --config Debug --target distcheck-prepared_debug
- name: Log
if: always()
run: cat build_distcheck-prepared_debug/distcheck-prepared_debug.log
distcheck-prepared_release:
name: distcheck-prepared_release
runs-on: ubuntu-24.04
needs: [distcheck-no_unity_debug]
env:
DEBIAN_FRONTEND: noninteractive
if: ${{ !cancelled() && github.ref == 'refs/heads/main' }}
steps:
- name: Setup - CMake
uses: lukka/get-cmake@latest
- name: Install apt dependencies
run: |
sudo apt-get update
sudo apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev libfontconfig-dev
sudo apt-get install astyle re2c
sudo apt-get install zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libeigen3-dev libgdal-dev libassimp-dev libopencv-dev tcl-dev tk-dev libgl-dev libinput-dev
- name: Checkout
uses: actions/checkout@v6
with:
path: brlcad
- name: Prepare bext dependencies
uses: ./brlcad/.github/actions/prepare-bext
with:
platform-channel: ubuntu-24.04-${{ runner.arch }}-release
source-dir: ${{ github.workspace }}/brlcad
output-dir: ${{ runner.temp }}/bext_output
build-type: Release
artifact-token: ${{ secrets.BEXT_ARTIFACT_TOKEN }}
- name: Directory setup
run: cmake -E make_directory build_distcheck-prepared_release
- name: Configure
run: cmake -S brlcad -B build_distcheck-prepared_release -G Ninja -DCMAKE_BUILD_TYPE=Release -DBRLCAD_EXT_DIR=${{ runner.temp }}/bext_output
- name: Build
run: cmake --build build_distcheck-prepared_release --config Release --target distcheck-prepared_release
- name: Log
if: always()
run: cat build_distcheck-prepared_release/distcheck-prepared_release.log
distcheck-no_tcl:
name: distcheck-no_tcl
runs-on: ubuntu-24.04
needs: [distcheck-no_unity_release]
env:
DEBIAN_FRONTEND: noninteractive
if: ${{ !cancelled() && github.ref == 'refs/heads/main' }}
steps:
- name: Setup - CMake
uses: lukka/get-cmake@latest
- name: Install apt dependencies
run: |
sudo apt-get update
sudo apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev libfontconfig-dev
sudo apt-get install astyle re2c
sudo apt-get install zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libeigen3-dev libgdal-dev libassimp-dev libopencv-dev tcl-dev tk-dev libgl-dev libinput-dev
- name: Checkout
uses: actions/checkout@v6
with:
path: brlcad
- name: Prepare bext dependencies
uses: ./brlcad/.github/actions/prepare-bext
with:
platform-channel: ubuntu-24.04-${{ runner.arch }}-release
source-dir: ${{ github.workspace }}/brlcad
output-dir: ${{ runner.temp }}/bext_output
build-type: Release
artifact-token: ${{ secrets.BEXT_ARTIFACT_TOKEN }}
- name: Directory setup
run: cmake -E make_directory build_distcheck-no_tcl
- name: Configure
run: cmake -S brlcad -B build_distcheck-no_tcl -G Ninja -DCMAKE_BUILD_TYPE=Debug -DBRLCAD_EXT_DIR=${{ runner.temp }}/bext_output -DBRLCAD_ENABLE_TCL=OFF
- name: Build
run: cmake --build build_distcheck-no_tcl --config Debug --target distcheck-no_tcl
- name: Log
if: always()
run: cat build_distcheck-no_tcl/distcheck-no_tcl.log
distcheck-no_tk:
name: distcheck-no_tk
runs-on: ubuntu-24.04
needs: [distcheck-enableall_debug]
env:
DEBIAN_FRONTEND: noninteractive
if: ${{ !cancelled() && github.ref == 'refs/heads/main' }}
steps:
- name: Setup - CMake
uses: lukka/get-cmake@latest
- name: Install apt dependencies
run: |
sudo apt-get update
sudo apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev libfontconfig-dev
sudo apt-get install astyle re2c
sudo apt-get install zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libeigen3-dev libgdal-dev libassimp-dev libopencv-dev libgl-dev libinput-dev
- name: Checkout
uses: actions/checkout@v6
with:
path: brlcad
- name: Prepare bext dependencies
uses: ./brlcad/.github/actions/prepare-bext
with:
platform-channel: ubuntu-24.04-${{ runner.arch }}-release
source-dir: ${{ github.workspace }}/brlcad
output-dir: ${{ runner.temp }}/bext_output
build-type: Release
artifact-token: ${{ secrets.BEXT_ARTIFACT_TOKEN }}
- name: Directory setup
run: cmake -E make_directory build_distcheck-no_tk
- name: Configure
run: cmake -S brlcad -B build_distcheck-no_tk -G Ninja -DCMAKE_BUILD_TYPE=Debug -DBRLCAD_EXT_DIR=${{ runner.temp }}/bext_output -DBRLCAD_ENABLE_TK=OFF
- name: Build
run: cmake --build build_distcheck-no_tk --config Debug --target distcheck-no_tk
- name: Log
if: always()
run: cat build_distcheck-no_tk/distcheck-no_tk.log
distcheck-no_strict:
name: distcheck-no_strict
runs-on: ubuntu-24.04
needs: [distcheck-enableall_release]
env:
DEBIAN_FRONTEND: noninteractive
if: ${{ !cancelled() && github.ref == 'refs/heads/main' }}
steps:
- name: Setup - CMake
uses: lukka/get-cmake@latest
- name: Install apt dependencies
run: |
sudo apt-get update
sudo apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev libfontconfig-dev
sudo apt-get install astyle re2c
sudo apt-get install zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libeigen3-dev libgdal-dev libassimp-dev libopencv-dev tcl-dev tk-dev libgl-dev libinput-dev
- name: Checkout
uses: actions/checkout@v6
with:
path: brlcad
- name: Prepare bext dependencies
uses: ./brlcad/.github/actions/prepare-bext
with:
platform-channel: ubuntu-24.04-${{ runner.arch }}-release
source-dir: ${{ github.workspace }}/brlcad
output-dir: ${{ runner.temp }}/bext_output
build-type: Release
artifact-token: ${{ secrets.BEXT_ARTIFACT_TOKEN }}
- name: Directory setup
run: cmake -E make_directory build_distcheck-no_strict
- name: Configure
run: cmake -S brlcad -B build_distcheck-no_strict -G Ninja -DCMAKE_BUILD_TYPE=Debug -DBRLCAD_EXT_DIR=${{ runner.temp }}/bext_output -DBRLCAD_ENABLE_STRICT=OFF
- name: Build
run: cmake --build build_distcheck-no_strict --config Debug --target distcheck-no_strict
- name: Log
if: always()
run: cat build_distcheck-no_strict/distcheck-no_strict.log
distcheck-no_object:
name: distcheck-no_object
runs-on: ubuntu-24.04
needs: [distcheck-prepared_debug]
env:
DEBIAN_FRONTEND: noninteractive
if: ${{ !cancelled() && github.ref == 'refs/heads/main' }}
steps:
- name: Setup - CMake
uses: lukka/get-cmake@latest
- name: Install apt dependencies
run: |
sudo apt-get update
sudo apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev libfontconfig-dev
sudo apt-get install astyle re2c
sudo apt-get install zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libeigen3-dev libgdal-dev libassimp-dev libopencv-dev tcl-dev tk-dev libgl-dev libinput-dev
- name: Checkout
uses: actions/checkout@v6
with:
path: brlcad
- name: Prepare bext dependencies
uses: ./brlcad/.github/actions/prepare-bext
with:
platform-channel: ubuntu-24.04-${{ runner.arch }}-release
source-dir: ${{ github.workspace }}/brlcad
output-dir: ${{ runner.temp }}/bext_output
build-type: Release
artifact-token: ${{ secrets.BEXT_ARTIFACT_TOKEN }}
- name: Directory setup
run: cmake -E make_directory build_distcheck-no_object
- name: Configure
run: cmake -S brlcad -B build_distcheck-no_object -G Ninja -DCMAKE_BUILD_TYPE=Debug -DBRLCAD_EXT_DIR=${{ runner.temp }}/bext_output -DUSE_OBJECT_LIBS=OFF
- name: Build
run: cmake --build build_distcheck-no_object --config Debug --target distcheck-no_object
- name: Log
if: always()
run: cat build_distcheck-no_object/distcheck-no_object.log
distcheck-odd_pathnames:
name: distcheck-odd_pathnames
runs-on: ubuntu-24.04
needs: [distcheck-prepared_release]
env:
DEBIAN_FRONTEND: noninteractive
if: ${{ !cancelled() && github.ref == 'refs/heads/main' }}
steps:
- name: Setup - CMake
uses: lukka/get-cmake@latest
- name: Install apt dependencies
run: |
sudo apt-get update
sudo apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev libfontconfig-dev
sudo apt-get install astyle re2c
sudo apt-get install zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libeigen3-dev libgdal-dev libassimp-dev libopencv-dev tcl-dev tk-dev libgl-dev libinput-dev
- name: Checkout
uses: actions/checkout@v6
with:
path: brlcad
- name: Prepare bext dependencies
uses: ./brlcad/.github/actions/prepare-bext
with:
platform-channel: ubuntu-24.04-${{ runner.arch }}-release
source-dir: ${{ github.workspace }}/brlcad
output-dir: ${{ runner.temp }}/bext_output
build-type: Release
artifact-token: ${{ secrets.BEXT_ARTIFACT_TOKEN }}
- name: Directory setup
run: cmake -E make_directory build_distcheck-odd_pathnames
- name: Configure
run: cmake -S brlcad -B build_distcheck-odd_pathnames -G Ninja -DCMAKE_BUILD_TYPE=Debug -DBRLCAD_EXT_DIR=${{ runner.temp }}/bext_output
- name: Build
run: cmake --build build_distcheck-odd_pathnames --config Debug --target distcheck-odd_pathnames
- name: Log
if: always()
run: cat build_distcheck-odd_pathnames/distcheck-odd_pathnames.log
distcheck-in_src_dir:
name: distcheck-in_src_dir
runs-on: ubuntu-24.04
needs: [distcheck-no_tcl]
env:
DEBIAN_FRONTEND: noninteractive
if: ${{ !cancelled() && github.ref == 'refs/heads/main' }}
steps:
- name: Setup - CMake
uses: lukka/get-cmake@latest
- name: Install apt dependencies
run: |
sudo apt-get update
sudo apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev libfontconfig-dev
sudo apt-get install astyle re2c
sudo apt-get install zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libeigen3-dev libgdal-dev libassimp-dev libopencv-dev tcl-dev tk-dev libgl-dev libinput-dev
- name: Checkout
uses: actions/checkout@v6
with:
path: brlcad
- name: Prepare bext dependencies
uses: ./brlcad/.github/actions/prepare-bext
with:
platform-channel: ubuntu-24.04-${{ runner.arch }}-release
source-dir: ${{ github.workspace }}/brlcad
output-dir: ${{ runner.temp }}/bext_output
build-type: Release
artifact-token: ${{ secrets.BEXT_ARTIFACT_TOKEN }}
- name: Directory setup
run: cmake -E make_directory build_distcheck-in_src_dir
- name: Configure
run: cmake -S brlcad -B build_distcheck-in_src_dir -G Ninja -DCMAKE_BUILD_TYPE=Debug -DBRLCAD_EXT_DIR=${{ runner.temp }}/bext_output
- name: Build
run: cmake --build build_distcheck-in_src_dir --config Debug --target distcheck-in_src_dir
- name: Log
if: always()
run: cat build_distcheck-in_src_dir/distcheck-in_src_dir.log
+85
View File
@@ -0,0 +1,85 @@
# The purpose of this particular test definition is to support on-demand
# interactive command shells. We sometimes see problems that occur only in the
# Github Runner environments, and in order to explore what is happening we need
# an interactive prompt (the alternative is hours-per-cycle submit and test
# loops, which doesn't scale at all.)
#
# Unlike the other BRL-CAD tests, this one is started manually from the Github
# website. For more information see https://mxschmitt.github.io/action-tmate/
#
# The "recommended" way to use this action is for the dev to make a fork of
# the repository, alter the configure and/or build logic below for their
# particular use case (the example below is a libged-only build used to zero
# in on a specific libged behavior) before running.
name: BRL-CAD Linux Interactive Debugging
on:
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false
jobs:
linux:
name: Ubuntu Latest GCC
runs-on: ubuntu-latest
steps:
- name: Setup - CMake
uses: lukka/get-cmake@latest
- name: Setup - System
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update
# Install X/OpenGL dev pkgs
sudo apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev libfontconfig-dev
# Install tools
sudo apt-get install astyle re2c xsltproc libxml2-utils liblief-dev
# Install dependency dev pkgs
sudo apt-get install zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libeigen3-dev libgdal-dev libassimp-dev libopencv-dev tcl-dev tk-dev
# Cleanup (we want to avoid wasting disk space)
sudo apt-get clean
- name: Setup - System Qt Build Requirements
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update
# Install XCB/OpenGL dev pkgs for Qt - see:
# https://wiki.qt.io/Building_Qt_6_from_Git
# https://doc.qt.io/qt-6/linux-requirements.html
sudo apt-get install libfontconfig1-dev libfreetype6-dev libx11-dev libx11-xcb-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libxcb-cursor-dev libxcb-glx0-dev libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev libxcb-util-dev libxcb-xinerama0-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev
sudo apt-get install libgl-dev
sudo apt-get install libinput-dev
sudo apt-get clean
- name: Checkout
uses: actions/checkout@v6
- name: Build Directory setup
run: |
cmake -E make_directory ./build_linux
- name: Configure
run: |
export PATH=$GITHUB_WORKSPACE:$PATH
cmake -S . -G Ninja -B build_linux -DBRLCAD_EXT_PARALLEL=1 -DBRLCAD_COMPONENTS=libged -DBRLCAD_EXTRADOCS=OFF
- name: Build
run: |
export PATH=$GITHUB_WORKSPACE:$PATH
cmake --build build_linux --config Release --target check
- name: Debugging - tmate session
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
uses: mxschmitt/action-tmate@v3
with:
limit-access-to-actor: true
+449
View File
@@ -0,0 +1,449 @@
# This file defines Continuous Integration (CI) tests for BRL-CAD using the
# Github Actions framework that are executed each time a commit is pushed.
# Currently it defines configurations for Windows, Linux and OSX.
#
# For more information about available platforms for testing, see:
#
# https://docs.github.com/en/free-pro-team@latest/actions/reference/specifications-for-github-hosted-runners
#
# The general rule when building in CI is to go more verbose in output settings
# rather than less, since iterative debugging isn't practical. We also want to
# avoid parallel building - while that will sometimes catch dependency issues,
# it also makes the outputs far harder to interpret when there is a problem.
# Better to do parallel build debugging in an environment were more interactive
# and iterative debugging is available while preserving the readability of the
# CI outputs for other issues.
name: Per-push
on:
push:
jobs:
linux:
name: Ubuntu GCC
runs-on: ubuntu-24.04
strategy:
fail-fast: true
env:
DEBIAN_FRONTEND: noninteractive
if: github.event_name == 'push'
steps:
- name: Setup - CMake
uses: lukka/get-cmake@latest
# Install system dependencies
- name: Install apt dependencies
run: |
sudo apt-get update
# Install X/OpenGL dev pkgs
sudo apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev libfontconfig-dev
# Install tools
sudo apt-get install astyle re2c xsltproc libxml2-utils
# Install dependency dev pkgs
sudo apt-get install zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libeigen3-dev libgdal-dev libassimp-dev libopencv-dev tcl-dev tk-dev
# Install XCB/OpenGL dev pkgs for Qt - see:
# https://wiki.qt.io/Building_Qt_6_from_Git
# https://doc.qt.io/qt-6/linux-requirements.html
sudo apt-get install libfontconfig1-dev libfreetype6-dev libx11-dev libx11-xcb-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libxcb-cursor-dev libxcb-glx0-dev libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev libxcb-util-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-xinput-dev libxcb-xrm-dev libxkbcommon-dev libxkbcommon-x11-dev
sudo apt-get install libgl-dev
sudo apt-get install libinput-dev
- name: Checkout
uses: actions/checkout@v6
with:
path: brlcad
- name: Prepare bext dependencies
uses: ./brlcad/.github/actions/prepare-bext
with:
platform-channel: ubuntu-24.04-${{ runner.arch }}-release
source-dir: ${{ github.workspace }}/brlcad
output-dir: ${{ runner.temp }}/bext_output
build-type: Release
artifact-token: ${{ secrets.BEXT_ARTIFACT_TOKEN }}
- name: Directory setup
run: |
cmake -E make_directory ./build_linux
cmake -E make_directory $HOME/.cache
cmake -E make_directory $HOME/.cache/BRL-CAD
- name: Configure
run: |
export PATH=$GITHUB_WORKSPACE:$PATH
cmake -S brlcad -B build_linux -G Ninja -DCMAKE_BUILD_TYPE=Release -DBRLCAD_EXT_DIR=${{ runner.temp }}/bext_output -DBRLCAD_ENABLE_QT=ON
- name: Build
id: build_parallel
run: |
export PATH=$GITHUB_WORKSPACE:$PATH
cmake --build build_linux --config Release --target check -j2
cmake --build build_linux --config Release --target package -j2
continue-on-error: true
- name: Build (serial for diagnostics)
if: steps.build_parallel.outcome == 'failure'
run: |
export PATH=$GITHUB_WORKSPACE:$PATH
cmake --build build_linux --config Release --target check
cmake --build build_linux --config Release --target package
# A full distcheck is too expensive for the runners, but we can run the
# repository integrity check and make sure we can build source archives.
archives:
name: Source Archives
runs-on: ubuntu-24.04
needs: [linux]
strategy:
fail-fast: true
env:
DEBIAN_FRONTEND: noninteractive
if: github.event_name == 'push'
steps:
- name: Setup - CMake
uses: lukka/get-cmake@latest
# Install system dependencies - we do the full setup here, even though
# source archives isn't intended to build the main BRL-CAD, in case
# this check is the one where the bext dependency cache check gets a miss.
# In that case, this check will have to build bext to proceed - and it will
# need the bext environment set up to do so.
- name: Install apt dependencies
run: |
sudo apt-get update
# Install X/OpenGL dev pkgs
sudo apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev libfontconfig-dev
# Install tools
sudo apt-get install astyle re2c xsltproc libxml2-utils
# Install dependency dev pkgs
sudo apt-get install zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libeigen3-dev libgdal-dev libassimp-dev libopencv-dev tcl-dev tk-dev
# Install XCB/OpenGL dev pkgs for Qt - see:
# https://wiki.qt.io/Building_Qt_6_from_Git
# https://doc.qt.io/qt-6/linux-requirements.html
sudo apt-get install libfontconfig1-dev libfreetype6-dev libx11-dev libx11-xcb-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libxcb-cursor-dev libxcb-glx0-dev libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev libxcb-util-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-xinput-dev libxcb-xrm-dev libxkbcommon-dev libxkbcommon-x11-dev
sudo apt-get install libgl-dev
sudo apt-get install libinput-dev
- name: Checkout
uses: actions/checkout@v6
with:
path: brlcad
- name: Prepare bext dependencies
uses: ./brlcad/.github/actions/prepare-bext
with:
platform-channel: ubuntu-24.04-${{ runner.arch }}-release
source-dir: ${{ github.workspace }}/brlcad
output-dir: ${{ runner.temp }}/bext_output
build-type: Release
artifact-token: ${{ secrets.BEXT_ARTIFACT_TOKEN }}
- name: Build
run: |
cmake -E make_directory build_archives
cmake -S brlcad -B build_archives -DCMAKE_BUILD_TYPE=Release -DBRLCAD_EXT_PARALLEL=1 -DBRLCAD_EXT_DIR=${{ runner.temp }}/bext_output
cmake --build build_archives --config Release --target distcheck-source_archives
# A full bext build every time we push is too much, but we can exercise the
# basic bext mechanisms and also the BRLCAD_COMPONENTS subbuild at the same
# time if we do a local bext build of *just* the libbg subset of BRL-CAD. If
# the COMPONENTS mechanism works as it should it won't trigger a full bext
# build, and we'll only be compiling what libbg needs.
componentbext:
name: BRLCAD_COMPONENTS
runs-on: ubuntu-latest
strategy:
fail-fast: true
env:
DEBIAN_FRONTEND: noninteractive
if: github.event_name == 'push'
steps:
- name: Setup - CMake
uses: lukka/get-cmake@latest
# Install system dependencies - we do the full setup here, even though
# source archives isn't intended to build the main BRL-CAD, in case
# this check is the one where the bext dependency cache check gets a miss.
# In that case, this check will have to build bext to proceed - and it will
# need the bext environment set up to do so.
- name: Install apt dependencies
run: |
sudo apt-get update
# Install X/OpenGL dev pkgs
sudo apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev libfontconfig-dev
# Install tools
sudo apt-get install astyle re2c xsltproc libxml2-utils
# Install dependency dev pkgs
sudo apt-get install zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libeigen3-dev libgdal-dev libassimp-dev libopencv-dev tcl-dev tk-dev
# Install XCB/OpenGL dev pkgs for Qt - see:
# https://wiki.qt.io/Building_Qt_6_from_Git
# https://doc.qt.io/qt-6/linux-requirements.html
sudo apt-get install libfontconfig1-dev libfreetype6-dev libx11-dev libx11-xcb-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libxcb-cursor-dev libxcb-glx0-dev libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev libxcb-util-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-xinput-dev libxcb-xrm-dev libxkbcommon-dev libxkbcommon-x11-dev
sudo apt-get install libgl-dev
sudo apt-get install libinput-dev
- name: Checkout
uses: actions/checkout@v6
with:
path: brlcad
- name: Directory setup
run: |
cmake -E make_directory build_components
cmake -E make_directory $HOME/.cache
cmake -E make_directory $HOME/.cache/BRL-CAD
- name: Build
run: |
cmake -S brlcad -B build_components -DCMAKE_BUILD_TYPE=Release -DBRLCAD_COMPONENTS=libbg
cmake --build build_components --config Release
windows:
name: MSVC - Ninja
runs-on: windows-2025
strategy:
fail-fast: true
if: github.event_name == 'push'
steps:
- name: Setup - CMake
uses: lukka/get-cmake@latest
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v3
- name: Add cl.exe to PATH
uses: ilammy/msvc-dev-cmd@v1
- name: Add github workspace to path
shell: pwsh
run: Add-Content -Path $env:GITHUB_PATH -Value $env:GITHUB_WORKSPACE
- name: Checkout
uses: actions/checkout@v6
with:
path: brlcad
- name: Prepare bext dependencies
uses: ./brlcad/.github/actions/prepare-bext
with:
platform-channel: windows-2025-${{ runner.arch }}-release
source-dir: ${{ github.workspace }}/brlcad
output-dir: ${{ runner.temp }}/bext_output
build-type: Release
artifact-token: ${{ secrets.BEXT_ARTIFACT_TOKEN }}
- name: Build Directory setup
run: cmake -E make_directory ./build_winninja
- name: Configure
shell: powershell
run: |
cmake -S brlcad -B build_winninja -G Ninja -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_CXX_COMPILER="cl.exe" -DBRLCAD_EXT_DIR=${{ runner.temp }}\bext_output -DCMAKE_BUILD_TYPE=Release -DBRLCAD_ENABLE_QT=ON
- name: Build
id: build_parallel
shell: powershell
run: |
ninja
working-directory: ${{ github.workspace }}/build_winninja
continue-on-error: true
- name: Build (serial for diagnostics)
if: steps.build_parallel.outcome == 'failure'
shell: powershell
run: |
ninja -j1 -v
working-directory: ${{ github.workspace }}/build_winninja
- name: Check
shell: powershell
run: |
ninja check -v
working-directory: ${{ github.workspace }}/build_winninja
- name: Package
shell: powershell
run: |
ninja package
working-directory: ${{ github.workspace }}/build_winninja
windows_std_tools:
name: MSVC - Standard Tools
needs: [windows]
runs-on: windows-2025
strategy:
fail-fast: true
if: github.event_name == 'push'
steps:
- name: Setup - CMake
uses: lukka/get-cmake@latest
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v3
- name: Add cl.exe to PATH
uses: ilammy/msvc-dev-cmd@v1
- name: Checkout
uses: actions/checkout@v6
with:
path: brlcad
- name: Prepare bext dependencies
uses: ./brlcad/.github/actions/prepare-bext
with:
platform-channel: windows-2025-${{ runner.arch }}-release
source-dir: ${{ github.workspace }}/brlcad
output-dir: ${{ runner.temp }}/bext_output
build-type: Release
artifact-token: ${{ secrets.BEXT_ARTIFACT_TOKEN }}
- name: Build Directory setup
run: |
cmake -E make_directory ./build_winstd
- name: MSVC and Ninja diagnostics
shell: cmd
run: |
where cmake
where ninja
where cl.exe
where msbuild
cmake --version
cl.exe
set INCLUDE
set LIB
set LIBPATH
- name: Configure
shell: cmd
run: |
cmake -S brlcad -B build_winstd -DBRLCAD_EXT_PARALLEL=1 -DBRLCAD_BUNDLED_LIBS=Bundled -DCMAKE_BUILD_TYPE=Release -DBRLCAD_EXT_DIR=%RUNNER_TEMP%\bext_output -DBRLCAD_ENABLE_QT=ON -DBRLCAD_CONFIG_PROBE_DIAGNOSTICS=ON -DBRLCAD_PROBE_SNAPSHOT_FILE=%GITHUB_WORKSPACE%\build_winstd\parallel-probes.txt
- name: Configure probe diagnostics
if: always()
shell: pwsh
run: |
$build = Join-Path $env:GITHUB_WORKSPACE 'build_winstd'
$diagnosticDir = Join-Path $build 'CMakeTmp/probe_diagnostics'
if (Test-Path $diagnosticDir) {
Get-ChildItem -Path $diagnosticDir -File | Sort-Object Name | ForEach-Object {
Write-Host "`n===== $($_.FullName) ====="
Get-Content -Path $_.FullName
}
} else {
Write-Host "No parallel-probe diagnostic directory was created."
}
$cmakeError = Join-Path $build 'CMakeFiles/CMakeError.log'
if (Test-Path $cmakeError) {
Write-Host "`n===== $cmakeError ====="
Get-Content -Path $cmakeError
}
$cache = Join-Path $build 'CMakeCache.txt'
if (Test-Path $cache) {
Write-Host "`n===== selected cache entries ====="
Select-String -Path $cache -Pattern '^(HAVE_CONIO_H|BRLCAD_PROBE_USE_NINJA|BRLCAD_PROBE_NINJA_EXE|BRLCAD_PROBE_VCVARS|BRLCAD_PROBE_VCVARS_ARCH):' | ForEach-Object { $_.Line }
}
- name: Rebuild conio probe verbosely
if: always()
shell: cmd
continue-on-error: true
run: |
if not exist build_winstd\CMakeTmp\INCLUDE_PROBE_build (
echo INCLUDE_PROBE mini-project was not configured.
exit /b 0
)
cmake --build build_winstd\CMakeTmp\INCLUDE_PROBE_build --config Release --target HAVE_CONIO_H --verbose
- name: Build
id: build_parallel
shell: cmd
run: |
cmake --build build_winstd --config Release -j2
continue-on-error: true
- name: Build (serial for diagnostics)
if: steps.build_parallel.outcome == 'failure'
shell: cmd
run: |
cmake --build build_winstd --config Release --target mged
- name: Check
shell: cmd
run: |
cmake --build build_winstd --config Release --target check -j2
- name: Package
shell: cmd
run: |
cmake --build build_winstd --config Release --target package -j2
osx:
name: macOS Clang
needs: [linux]
runs-on: macos-14
strategy:
fail-fast: true
steps:
- name: Setup - CMake
uses: lukka/get-cmake@latest
- name: Install Xquartz
run: |
brew install xquartz --cask
- name: Checkout
uses: actions/checkout@v6
with:
path: brlcad
- name: Prepare bext dependencies
uses: ./brlcad/.github/actions/prepare-bext
with:
platform-channel: macos-14-${{ runner.arch }}-release
source-dir: ${{ github.workspace }}/brlcad
output-dir: ${{ runner.temp }}/bext_output
build-type: Release
artifact-token: ${{ secrets.BEXT_ARTIFACT_TOKEN }}
- name: Build Directory setup
run: |
cmake -E make_directory build_osx
cmake -E make_directory $HOME/.cache
cmake -E make_directory $HOME/.cache/BRL-CAD
- name: Configure
run: |
export PATH=$GITHUB_WORKSPACE:$PATH
export CC=clang
export CXX=clang++
cmake -S brlcad -B build_osx -DCMAKE_BUILD_TYPE=Release -DBRLCAD_EXT_DIR=${{ runner.temp }}/bext_output -DBRLCAD_ENABLE_QT=ON
- name: Build
id: build_parallel
run: |
export PATH=$GITHUB_WORKSPACE:$PATH
make -j2
working-directory: ${{ github.workspace }}/build_osx
continue-on-error: true
- name: Build (serial for diagnostics)
if: steps.build_parallel.outcome == 'failure'
run: |
make
working-directory: ${{ github.workspace }}/build_osx
- name: Check
run: |
export PATH=$GITHUB_WORKSPACE:$PATH
make check
working-directory: ${{ github.workspace }}/build_osx
- name: Package
run: |
export PATH=$GITHUB_WORKSPACE:$PATH
make package
working-directory: ${{ github.workspace }}/build_osx
+400
View File
@@ -0,0 +1,400 @@
# This file defines Continuous Integration (CI) tests for BRL-CAD using the
# Github Actions framework. Currently it defines configurations for Windows,
# Linux and OSX. These tests are run on a fixed schedule, rather than per
# push, and will typically take longer to run.
#
# Tests here are intended to test more expensive integrations and longer
# builds than the ones targeted at per-commit feedback. The tradeoff is
# that a failure in these tests might be cause by any commit within a
# 24 hour block of time, so the developer will need to track down the
# specifics themselves.
name: Scheduled
on:
schedule:
- cron: '0 3 * * *' # daily at 03:00 UTC
workflow_dispatch:
jobs:
linux_bext:
name: Linux - BRL-CAD bext build
runs-on: ubuntu-latest
strategy:
fail-fast: true
env:
DEBIAN_FRONTEND: noninteractive
steps:
- name: Setup - CMake
uses: lukka/get-cmake@latest
# Install system dependencies
- name: Install apt dependencies
run: |
sudo apt-get update
# Install X/OpenGL dev pkgs
sudo apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev libfontconfig-dev
# Install tools
sudo apt-get install astyle re2c xsltproc libxml2-utils
# Install dependency dev pkgs
sudo apt-get install zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libeigen3-dev libgdal-dev libassimp-dev libopencv-dev tcl-dev tk-dev
# Install XCB/OpenGL dev pkgs for Qt - see:
# https://wiki.qt.io/Building_Qt_6_from_Git
# https://doc.qt.io/qt-6/linux-requirements.html
sudo apt-get install libfontconfig1-dev libfreetype6-dev libx11-dev libx11-xcb-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libxcb-cursor-dev libxcb-glx0-dev libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev libxcb-util-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-xinput-dev libxcb-xrm-dev libxkbcommon-dev libxkbcommon-x11-dev
sudo apt-get install libgl-dev
sudo apt-get install libinput-dev
- name: Checkout
uses: actions/checkout@v6
with:
path: brlcad
- name: Directory setup
run: |
cmake -E make_directory build_linux
cmake -E make_directory $HOME/.cache
cmake -E make_directory $HOME/.cache/BRL-CAD
- name: Configure
run: |
export PATH=$GITHUB_WORKSPACE:$PATH
cmake -S brlcad -B build_linux -G Ninja -DCMAKE_BUILD_TYPE=Release -DBRLCAD_EXT_PARALLEL=1 -DBRLCAD_BEXT_CLEANUP=ON -DBRLCAD_ENABLE_QT=ON
- name: Build + Check + Package
run: |
export PATH=$GITHUB_WORKSPACE:$PATH
cmake --build build_linux --config Release --target check
cmake --build build_linux --config Release --target package
windows_bext:
name: MSVC - Ninja - BRL-CAD bext build
needs: [linux_bext]
runs-on: windows-latest
strategy:
fail-fast: true
if: ${{ !cancelled() }}
steps:
- name: Setup - CMake
uses: lukka/get-cmake@latest
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v3
- name: Add cl.exe to PATH
uses: ilammy/msvc-dev-cmd@v1
- name: Add github workspace to path
shell: powershell
run: Add-Content -Path $env:GITHUB_PATH -Value $env:GITHUB_WORKSPACE
- name: Checkout
uses: actions/checkout@v6
with:
path: brlcad
- name: Build Directory setup
run: cmake -E make_directory ./build_winninja
- name: Configure
shell: powershell
run: |
cmake -S brlcad -B build_winninja -G Ninja -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_CXX_COMPILER="cl.exe" -DCMAKE_BUILD_TYPE=Release -DBRLCAD_EXT_PARALLEL=1 -DBRLCAD_BEXT_CLEANUP=ON -DBRLCAD_ENABLE_QT=ON
- name: Build
shell: powershell
run: |
ninja -j1 -v
working-directory: ${{ github.workspace }}/build_winninja
- name: Check
shell: powershell
run: |
ninja check -v
working-directory: ${{ github.workspace }}/build_winninja
- name: Package
shell: powershell
run: |
ninja package
working-directory: ${{ github.workspace }}/build_winninja
windows_std_tools_bext:
name: MSVC - Standard Tools - BRL-CAD bext build
needs: [windows_bext]
runs-on: windows-latest
strategy:
fail-fast: true
if: ${{ !cancelled() }}
steps:
- name: Setup - CMake
uses: lukka/get-cmake@latest
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v3
- name: Add cl.exe to PATH
uses: ilammy/msvc-dev-cmd@v1
- name: Add github workspace to path
shell: cmd
run: echo %GITHUB_WORKSPACE%>>"%GITHUB_PATH%"
- name: Checkout
uses: actions/checkout@v6
with:
path: brlcad
- name: Build Directory setup
run: |
cmake -E make_directory ./build_winstd
- name: Configure
shell: cmd
run: |
where cmake
where ninja
where cl.exe
where msbuild
cmake -S brlcad -B build_winstd -DBRLCAD_EXT_PARALLEL=1 -DBRLCAD_BUNDLED_LIBS=Bundled -DCMAKE_BUILD_TYPE=Release -DBRLCAD_BEXT_CLEANUP=ON -DBRLCAD_ENABLE_QT=ON
- name: Build
shell: cmd
run: |
cmake --build build_winstd --config Release --target mged
- name: Check
shell: cmd
run: |
cmake --build build_winstd --config Release --target check
- name: Package
shell: cmd
run: |
cmake --build build_winstd --config Release --target package
osx_bext:
name: macOS - BRL-CAD bext build
needs: [linux_bext]
runs-on: macos-14
strategy:
fail-fast: true
if: ${{ !cancelled() }}
steps:
- name: Setup - CMake
uses: lukka/get-cmake@latest
- name: Install Xquartz
run: |
brew install xquartz --cask
- name: Checkout
uses: actions/checkout@v6
with:
path: brlcad
- name: Build Directory setup
run: |
cmake -E make_directory build_osx
cmake -E make_directory $HOME/.cache
cmake -E make_directory $HOME/.cache/BRL-CAD
- name: Configure
run: |
export PATH=$GITHUB_WORKSPACE:$PATH
export CC=clang
export CXX=clang++
cmake -S brlcad -B build_osx -DCMAKE_BUILD_TYPE=Release -DBRLCAD_EXT_PARALLEL=1 -DBRLCAD_BEXT_CLEANUP=ON -DBRLCAD_ENABLE_QT=ON
- name: Build
run: |
make
working-directory: ${{ github.workspace }}/build_osx
- name: Check
run: |
make check
working-directory: ${{ github.workspace }}/build_osx
- name: Package
run: |
make package
working-directory: ${{ github.workspace }}/build_osx
linux_static:
name: Clang Static Analyser
needs: [linux_bext]
runs-on: ubuntu-24.04
strategy:
fail-fast: true
env:
DEBIAN_FRONTEND: noninteractive
if: ${{ !cancelled() && github.ref == 'refs/heads/main' }}
steps:
- name: Setup - CMake
uses: lukka/get-cmake@latest
# Setup hint from https://github.com/darktable-org/rawspeed/blob/develop/.github/workflows/ci-static-analysis.yml
- name: Clang Static Analyzer Setup
run: |
sudo apt-get update
sudo apt-get install clang-18 clang-tools-18
# Install X/OpenGL dev pkgs
sudo apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev libfontconfig-dev
# Install tools
sudo apt-get install astyle re2c xsltproc libxml2-utils
# Install dependency dev pkgs
sudo apt-get install zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libeigen3-dev libgdal-dev libassimp-dev libopencv-dev tcl-dev tk-dev
# Install XCB/OpenGL dev pkgs for Qt - see:
# https://wiki.qt.io/Building_Qt_6_from_Git
# https://doc.qt.io/qt-6/linux-requirements.html
sudo apt-get install libfontconfig1-dev libfreetype6-dev libx11-dev libx11-xcb-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libxcb-cursor-dev libxcb-glx0-dev libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev libxcb-util-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-xinput-dev libxcb-xrm-dev libxkbcommon-dev libxkbcommon-x11-dev
sudo apt-get install libgl-dev
sudo apt-get install libinput-dev # Cleanup
- name: Checkout
uses: actions/checkout@v6
with:
path: brlcad
- name: Prepare bext dependencies
uses: ./brlcad/.github/actions/prepare-bext
with:
platform-channel: ubuntu-24.04-${{ runner.arch }}-release
source-dir: ${{ github.workspace }}/brlcad
output-dir: ${{ runner.temp }}/bext_output
build-type: Release
artifact-token: ${{ secrets.BEXT_ARTIFACT_TOKEN }}
- name: Directory setup
run: |
cmake -E make_directory build_clangstatic
cmake -E make_directory $HOME/.cache
cmake -E make_directory $HOME/.cache/BRL-CAD
working-directory: ${{ github.workspace }}/brlcad
- name: Run Analyzer
env:
BRLCAD_EXT_DIR: ${{ runner.temp }}/bext_output
run: |
export PATH=$GITHUB_WORKSPACE:/usr/share/clang/scan-build-18/bin:/usr/share/clang/scan-build-18/libexec:$PATH
cp $GITHUB_WORKSPACE/brlcad/misc/clang-static-analyzer-run.sh .
./clang-static-analyzer-run.sh
working-directory: ${{ github.workspace }}/brlcad/build_clangstatic
- name: Summary
if: success() || failure()
run: |
sudo apt-get install html2text
html2text scan-reports-all/*/index.html
working-directory: ${{ github.workspace }}/brlcad/build_clangstatic
# See https://app.codecov.io/gh/BRL-CAD/brlcad for analysis results
linux_cov:
name: LCOV Coverage testing
needs: [linux_bext]
runs-on: ubuntu-24.04
strategy:
fail-fast: true
env:
DEBIAN_FRONTEND: noninteractive
if: ${{ !cancelled() && github.ref == 'refs/heads/main' }}
steps:
- name: Setup - CMake
uses: lukka/get-cmake@latest
- name: Setup - System
run: |
sudo apt-get update
# Get the lcov tool and its dependencies
sudo apt-get install lcov gdb
# Install X/OpenGL dev pkgs
sudo apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev libfontconfig-dev
# Install tools
sudo apt-get install astyle re2c xsltproc libxml2-utils
# Install dependency dev pkgs
sudo apt-get install zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libeigen3-dev libgdal-dev libassimp-dev libopencv-dev tcl-dev tk-dev
# Install XCB/OpenGL dev pkgs for Qt - see:
# https://wiki.qt.io/Building_Qt_6_from_Git
# https://doc.qt.io/qt-6/linux-requirements.html
sudo apt-get install libfontconfig1-dev libfreetype6-dev libx11-dev libx11-xcb-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libxcb-cursor-dev libxcb-glx0-dev libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev libxcb-util-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-xinput-dev libxcb-xrm-dev libxkbcommon-dev libxkbcommon-x11-dev
sudo apt-get install libgl-dev
sudo apt-get install libinput-dev
- name: Checkout
uses: actions/checkout@v6
with:
path: brlcad
- name: Prepare bext dependencies
uses: ./brlcad/.github/actions/prepare-bext
with:
platform-channel: ubuntu-24.04-${{ runner.arch }}-release
source-dir: ${{ github.workspace }}/brlcad
output-dir: ${{ runner.temp }}/bext_output
build-type: Release
artifact-token: ${{ secrets.BEXT_ARTIFACT_TOKEN }}
- name: Directory setup
run: |
cmake -E make_directory build_lcov
cmake -E make_directory $HOME/.cache
cmake -E make_directory $HOME/.cache/BRL-CAD
- name: Configure
run: |
export PATH=$GITHUB_WORKSPACE:$PATH
cmake -S brlcad -B build_lcov -DBRLCAD_ENABLE_COVERAGE=ON -DCMAKE_BUILD_TYPE=Debug -DBRLCAD_EXT_DIR=${{ runner.temp }}/bext_output -DBRLCAD_ENABLE_QT=ON
- name: Build
id: build_parallel
run: |
export PATH=$GITHUB_WORKSPACE:$PATH
cmake --build build_lcov -j2
continue-on-error: true
- name: Build (serial for diagnostics)
if: steps.build_parallel.outcome == 'failure'
run: |
export PATH=$GITHUB_WORKSPACE:$PATH
cmake --build build_lcov -j1
- name: Run Tests
id: coverage_tests
run: |
find . -name '*.gcda' -exec rm {} \;
cmake --build . --target check
working-directory: ${{ github.workspace }}/build_lcov
- name: Diagnose failed annotation test
if: failure() && steps.coverage_tests.outcome == 'failure'
continue-on-error: true
run: |
set +e
ctest -R '^rt_datum_annot_semantics$' -VV
cat Testing/Temporary/LastTest.log
if command -v gdb >/dev/null 2>&1; then
gdb --quiet --batch \
-ex 'set pagination off' \
-ex run \
-ex 'thread apply all bt full' \
--args ./src/librt/tests/rt_datum_annot_semantics
fi
working-directory: ${{ github.workspace }}/build_lcov
- name: Capture Coverage
run: |
lcov --capture --directory . --output-file coverage.info
lcov -r coverage.info \*\/bext_output\/\* > coverage-2.info
lcov -r coverage-2.info \/usr\/\* > coverage_cad.info
rm coverage-*.info
mv coverage_cad.info ..
working-directory: ${{ github.workspace }}/build_lcov
- name: Upload
uses: codecov/codecov-action@v4
with:
files: ./coverage_cad.info
+23 -7
View File
@@ -1,8 +1,8 @@
# Common build directories used in the source tree
/build
/.build
/*_build
/*-build
/build*
/.build*
/*_build*
/*-build*
/out
# Temporary files
@@ -18,8 +18,24 @@
.DS_Store
.DS_Store?
.vscode
.clang-format
CMakeLists.txt.user
# CMake supports some configuration files to allow users a convenient way to pre-define
# sets of configuration options:
# https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html
/CMakeUserPresets.json
# Visual Studio (note that CMakePresets.json is recommended instead of
# CMakeSettings.json for Visual Studio going forward)
# https://learn.microsoft.com/en-us/cpp/build/cmake-presets-vs
# https://learn.microsoft.com/en-us/cpp/build/customize-cmake-settings
/.vs
.vscode
/CMakeSettings.json
#Qt Creator
CMakeLists.txt.user
# Misc
.clang-format
*__pycache__*
+32
View File
@@ -0,0 +1,32 @@
# Code Quality Standards
Write code as a senior engineer would for long-term maintenance. These are non-negotiable defaults, not suggestions to apply when asked.
## Principles
- **DRY.** Extract duplicate logic. Refactor. Once and only once.
- **Minimize surprises.** Preserve existing style and conventions. Test when you can.
- **No magic values.** Use named constants, enums, or configuration. Every literal needs justification.
- **Minimize scope.** Prefer tightest scope that works - local variables, parameters, encapsulation. Broader scope needs justification.
- **No dead code.** Delete commented-out code, unused variables, unreachable branches. Version control remembers.
- **Comments explain why.** Document intent, constraints, and non-obvious decisions. Use "what" summaries only for complex or non-obvious algorithms. If routine code needs a comment to explain it, the code should be clearer.
- **Clean up what you touch.** Improve code you are changing: rename unclear variables, extract functions, simplify conditionals. Do not mix unrelated cleanup with logic changes - separate concerns, separate commits.
- **Handle errors deliberately.** Whether failing loudly or quietly, make it an intentional choice. No accidental swallowing.
- **YAGNI.** Do not add speculative abstractions, unused parameters, or unplanned extension points. Build what is needed now. Refactor when requirements actually change.
- **Perfection is when there is nothing left to take away.** Prefer reduction over addition, simpler is better. Too clever to debug easily is too clever.
## Before Finishing
Review your changes for code smells, duplicated logic, hardcoded values, overly broad scope, unclear names, missing error handling, unnecessary complexity, etc. Fix issues in the same pass - do not defer cleanup.
## Git
Never commit without permission (ask every time). Never push to remote. Never use `codex`, `chatgpt`, `openai`, `gemini`, `antigravity`, `copilot`, `claude`, `llm`, `ai`, or similar terms in branch names, tag names, commits, PRs, comments, and other metadata. Do not add generated-by notices or otherwise indicate authorship unless user explicitly requests. Do not include specific machine information - full file system paths, machine names, IP addresses, or other identifiable information in commit messages, code, comments or documentation.
## Repository Coding Conventions
The HACKING file in the root of the source tree defines coding conventions specific to BRL-CAD, including versions of common functions that are used in our code base instead of raw standard functions. Review this file before writing code so your changes and additions adhere to BRL-CAD standards.
BRL-CAD code should typically use our ZERO and EQUAL macros rather than raw floating-point equality comparisons to avoid Werror=float-equal compilation failures on expressions such as a == 0.0 (should be ZERO(a)) or b != c (should be !EQUAL(b, c)).
When completing a code change (not for intermediate iterations, but when preparing to hand back a finalized change) use our regress-repository and regress-licenses build targets to check that the result satisfies our internal checkers.
+73 -1
View File
@@ -366,6 +366,10 @@ McDonald, Rob
2013 November
Open Source
Roberts, Mitchell
2014 July
U.S. Army Research Laboratory
Tannous, Marc
2014 December
Open Source (GCI)
@@ -389,6 +393,11 @@ Sieu, Jeff
2017 December
Open Source (GCI)
Baker, Josh
nicknames joshbaker22
2023 August
U.S. Army Research Laboratory
CODE CONTRIBUTIONS
------------------
@@ -599,6 +608,11 @@ nicknames Alexandrus
2010 July
Open Source
Pal, Csanyi
nicknames csanyi_pal
2010 July
Open Source
Hinesley, Brandon
nicknames bhinesley
2011 March
@@ -894,7 +908,7 @@ nicknames chetanshinde911
Open Source (GSoC)
Haydar, Ali
nicknames lois221
nicknames lois221 lgoogl696 LouisGoogl
2019 May
Open Source (GSoC)
@@ -1031,6 +1045,60 @@ Tao, Michael
2023 February
Texas A&M University
Dhawan, Rohan
2023 October
Texas A&M University
Feng, Feng
2023 October
Texas A&M University
Hollenbeck, Sam
nicknames samhollenbeck
2023 October
Texas A&M University
Pham, Timothy
nicknames YUMGUY
2023 October
Texas A&M University
Zou, Yida
nicknames YidaZou
2023 October
Texas A&M University
Reynolds, Timothy
nicknames TheZouave007
2024 February
Texas A&M University
Delbarre, Gaultier
nicknames CoralRocker
2024 March
Texas A&M University
Beckett, Ian
2024 March
Texas A&M University
McLean, Connor
2024 March
Texas A&M University
Reel, Samuel (Sammy)
2024 March
Texas A&M University
Rupesh
nicknames rupes, rupeshca007
2026 March
Open Source
nicknames laithaldaeef
2026 March
Open Source
SPECIAL THANKS
--------------
@@ -1353,6 +1421,10 @@ nicknames r-ricci
2022 January
Open Source
nicknames Meghna45-code
2026 July
Open Source
CORPORATE AND ORGANIZATION SUPPORT
----------------------------------
+26 -183
View File
@@ -15,6 +15,19 @@ on-going issues.
Recent Bugs
-----------
* fbserv as well as -F option handling (e.g., -F0 or -F/dev/wgls) that
is supported across myriad other tools appears to be broken on
Windows in a git bash shell (problem is not seen in Command Prompt.)
Something is concatenating EXEPATH and/or fbserv silently fails with
return codes (e.g., when not specifying -F, only giving the port.)
* recursive bu_parallel() failure, tbd whether cpp11 or pthread impl,
likely because IDs are exceeding MAX_PSW, causing mayhem and chaos.
* rtcheck_handler_cleanup() throws 'invalid handle specified' on Windows
in closing of STDOUT (see FIXME comment). Does not affect normal running,
but a debug build complains.
* very peculiar non-linear memory issue in rt when allocating a large
flat hierarchy of objects. I have three combs, each with 10k
members unioned. Each member is an rcc. Rendering with just one
@@ -25,6 +38,13 @@ Recent Bugs
at allocation stack, rt_ct_get() appears to be allocating 10MB
chunks.
[HARD] Superlinear growth (3 combs -> 18GB) points at an
integer/overflow interaction deep in the space-partitioning cut
allocator (rt_ct_get 10MB chunks), intertwined with bu memory.
Painful to isolate and validate at scale.
[FAN-OUT: poor -- one focused investigator with an allocator/profiler
trace; not parallelizable.]
* rt from mged is not outputting overlap log messages or rt summary.
Stops printing after opendb line. (Observed on Mac)
@@ -32,20 +52,12 @@ Recent Bugs
Backtrace indicates write buffer is full, likely because no output
is going to terminal. (Observed on Mac)
* gcv on a glTF file (at least a binary .glb) crashes hard with a NULL
pointer bomb (workaround: gltf-g succeeds albeit incomplete
conversion). Takes out the entire Terminal app on Mac for some
reason (consistently).
* Running"mged -c test.g" exits automatically on default prompt:
...
Create new database (y|n)[n]?
Warning: no database is currently open!
morrison@Miniagua .build %
* TGC tess fails when we have a near-zero c axis and a larger d
axis, or vice versa.
* MGED crashes trying to open the repository file
doc/docbook/resources/other/standard/xsl/images/important.tif
It is mis-identified as a v4 .g file due to the file header's
@@ -58,10 +70,6 @@ Recent Bugs
* running pkgIndex and/or mkIndex during build appears to be randomly
crashing on Mac using bundled libs
* garbage_collect -c wipes out custom attributes on _GLOBAL
> attr set _GLOBAL foo bar
> garbage_collect -c
* Visual error when drawing using -S -m1 of a region with the same solid
subtracted and then unioned.
@@ -70,20 +78,6 @@ Recent Bugs
> e -S -m1 boxes.r
box1 is not drawn
* When run inside mged, invalid syntax reported on "gqa -p prefix"
despite it being documented as the correct form (and working outside
mged). specifying gqa -pprefix appears to be workaround, though
unintuitive. specifying gqa -p"" annoyingly outputs ""exp_air.plot3
with quotes embedded in the name.
* rtweight reports nan,nan,nan centroid when density is 0
* rtweight/gqa volumes seem wrong with simple sphere test case, with
values consistently and quickly converging less than the actual
volume regardless of the grid size.
* gqa manpage has the wrong indentation on the options write-up.
* raytracing a revolved sketch seems to work fine, but rtarea and gqa
seem to be crashing on that same revolve. curiously, the brep
revolve from the csgbrep proc-db has the same failure as well as the
@@ -94,20 +88,12 @@ Recent Bugs
* running archer "" at least on windows results in a file type dialog
and errors with "can't read "_conv_log": no such variable
* opening a database in archer with the same name as a command doesn't
work.
* in mged, running the 'attach' command (confirmed issues with X and
ogl), closing the window, and then issuing a 'draw' results in mged
crashing.
* killtree / crashes
* killtree reports spurious db_lookup failures saying object does not
exist as it previously deleted it. should keep track of what it
deletes to not output spuriously, or (better) delete transactionally
so it only attempts to lookup and delete once per object.
* object names with a / or \ in them make ls or underlying directory
parsing logic display them incorrectly.
@@ -123,18 +109,9 @@ Recent Bugs
* fbclear -c appears to hang indefinitely inside pkg_bwaitfor,
possible protocol mismatch or capability removed/changed in fbserv.
* dbupgrade -r produces an invalid rhc with the default v5 rhc produced
by MGED with "make rhc rhc"
* apparently all four BRL-CAD Tutorial Series volumes are missing from
our bibliography...
* Tessellating an ETO with a normal tolerance results in stack
smashing due to bad logic in recursive algorithm: set norm 2;
facetize my.eto my.bot;. Observed infinite recursion in both
make_ellipse4() in eto.c and (after adding max recursion test) in
paint_face() in manif.c:190
* mater -d information stored in the .g file doesn't survive a
garbage collection operation.
@@ -150,36 +127,10 @@ Recent Bugs
still being displayed. this causes 'rt' to fly into an infinite
loop, presumably trying to increment rays from the eye position.
* icv dpix support is not cross-platform (it writes out native, reads
in assuming same encoding). regression tests fail on big endian.
* creating an object with a slashes in the name (e.g., cp foo foo/R)
results in an object that cannot be deleted/renamed. bad behavior
presumably extends to any name with path separators.
* mirror command rejects brep solids and turns faces inside-out when
mirroring a comb with brep solids below it.
* rtsil command works if do what usage says and redirect output to
file, but mentions .pix when data is actually .bw; and using the -o
option results in a black image. it is also inconsistent, writing a
black silhouette on a white background, instead of black on white
and missing background color options.
* make sph sph
clone -i 1 -t 1000 0 0 -n 100 sph
kill sph
g line sph*
clone -i 1 -t 0 1000 0 -n 100 line
kill line
g square line*
clone -i 1 -t 0 0 1000 -n 100 square
... never returns ...
This should be merely 1M spheres, but something chokes. Could be
somewhere in the Tk layer. Maybe somewhere in the db layer. Maybe
something is corrupted by clone when it
* If we draw any form, then trace it using rt, then change of database
(by clicking file>open and selecting another database), badness
ensues. One report has quitting the rt window causing a segfault.
@@ -193,31 +144,12 @@ Recent Bugs
in ann3.s annot 0 0 0 1 10 10 3 1
# using numbers for a label results in no label
* make eto eto
tol norm 1
facetize eto.bot eto
[crashes due to excessive recursion]
* crash in rt_bot_xform() due to a bot being marked as having face
normals, but didn't. bot probably written wrong via conversion
to/from obj or asc. found importing teapot.
* rtedge with perspective is wrong. it fills in nearly entire faces,
vertically in particular. it's worse on small sized renders, and
gets better the larger the render size (indicating there's some
neighbor distance coming into play that is not affected by
max_dist). eoes not happen in non-perspective ray-traces.
* a character is (still) sometimes captured by the cursor box. steps
to reproduce:
1) write a word on the mged command prompt ("e.g. hello")
2) select the word to end of line with mouse
3) paste the word (e.g., middle mouse) and press enter
4) type "hello" again and press enter
you should now see an "o" in the yellow cursor box. sometimes
you'll see the "o" after step 3. running "clear" resets the cursor.
* get_regions tcl command doesn't respond well to situations where
child object names in combs have dashes (the "-" character) in
names. It tries to interpret the dash as an argument delimiter.
@@ -239,13 +171,6 @@ Recent Bugs
* Recursive submodel predictably goes infinite, need stack-based
db_walk_tree(): mged> in submodel submodel submodel grid test.g
* running rt -s20 -F file.pix ... does not result in an 20x20 image
being written out. it ends up being 512x512.
* running rt -C255/0/0 -o file.pix ... does not result in the
background color getting used. It does work with -F file.pix, going
through libfb instead of libicv.
* ogl display manager and framebuffer are creating windows with
transparent backgrounds (the glClear color is not being drawn) on
Linux. Presumably a driver-related issue, alpha channel, or expose
@@ -254,9 +179,6 @@ Recent Bugs
private memory -- looks like private memory is not initialized
(observed on Mac 10.6, Windows, and Ubuntu Linux using 7.26).
* pixdiff on Windows is reporting no differences with a pair of files
that pixcmp can see differences in.
* fblabel seems quite busted, at least talking to a /dev/X fbserv, in
that it only draws the first character and eventually displays
rem_read() failures when run in -d debug mode.
@@ -265,12 +187,6 @@ Recent Bugs
after doing an overlay render. it does draw, though, as confirmed
by a forced fb-fb refresh.
* pixborder doesn't account for an edge case where the right edge of
an image is expected to be colored (except for one pixel on the top
edge). Example:
pixborder -b "255 0 0" -t "255 255 255" < pix/moss.pix | pix-fb
* typing 'comb -f -r assembly_name' shuts down mged with the error:
ERROR: bad pointer 0000000000B4CA50: s/b bu_external(x768dbbd0), was bu_vls(x89333bbb), file ..\..\..\brlcad_src\src\libbu\parse.c, line 2443"
And on the mged command line:
@@ -284,11 +200,6 @@ Recent Bugs
* wgl framebuffer is not lingering on windows (regardless of using
wgll or default) when it should
* calling "attr set obj key value" should always result in key getting
set to value, no matter what, as it is the lowest-level attribute
management interface and what the command (correctly) documents.
example demonstrated to not work was: attr set obj rgb 123/123/123
* report of LIBBU not working when accessed by a multithreaded
application on Windows. reportedly due to some problem with the
debug memory queue.
@@ -326,18 +237,16 @@ Recent Bugs
rm -f terra.pix && valgrind bin/rt -o terra.pix -P1 -H3 -s1024 share/brlcad/7.21.0/db/terra.g all.g
[HARD] valgrind-confirmed 8-byte corruption after a build_spec_table()
realloc in find_spec_wgt(), where "bookkeeping seems okay" -- i.e.,
root cause is non-obvious. Classic hard-to-pin data race.
[FAN-OUT: poor -- a single heisenbug needing one careful
investigator, not parallel coverage.]
* mged 'joint' hold command isn't working. looks like the fp_names
book-keeping is fuxored or the db_lookup is returning NULL (or isn't
yet performed).
* src/librt/primitives/bot/g_bot_include.c:rt_bot_bbox() routine isn't
calculating the bbox correctly
* 'exists' command documentation claims more than has been implemented
* rtxray crashes if you specify a -o *.bw output file due to
assumptions in the rt front-end that all output files are .pix
* encountered a crash during rtarea on a (default) facetized version
of the hyp from the proc-db csgbrep tool.
@@ -352,9 +261,6 @@ Recent Bugs
* torus with a near zero inner diameter results in zero-length edges
during tessellation.
* bu_log() with a width specifier does not align like printf().
Example: bu_log("%24s", str);
* report that "keep" sometimes results in a .g file with unknown units;
dbconcat also is reported to set the units to unknown if concatting
a file with unknown units.
@@ -382,10 +288,6 @@ Recent Bugs
* rt -i -s4096 -H16 -F/dev/null boolean-ops.g all
* asc2g of a .asc file containing the first line as a "#" comment
results in a bu_malloc(0) bomb. comment lines should be valid in
.asc files.
* compilation reportedly fails when building Tcl if the path to the
source directory includes a space.
@@ -439,9 +341,6 @@ Recent Bugs
tclscripts/mged/tclIndex for examples:
https://sourceforge.net/tracker/?func=detail&atid=640802&aid=2923199&group_id=105292
* vdeck truncates the region names in the 'regions' file, probably
wrong bu_strlcpy() length.
* hyp tessellation routine creates bot that does not raytrace
* hyp used in a boolean with other objects (even unions) does not
@@ -513,11 +412,6 @@ Recent Bugs
* running 'keep' on too many objects (hundreds is causing a usage
statement (and not doing the keep)
* rtwizard won't display a line overlay if you line object is obscured
by another. Example being to display a vehicle as ghost, crew as
solid, and crew as line. confirmed even when using the other line
occlusion settings.
* fbserv is receiving image data very slowly if the framebuffer is a
remote X24 interface. could reproduce on mac with the following:
@@ -577,9 +471,6 @@ Recent Bugs
ubuntu linux. key events go to the command window even with the
graphics window has focus.
* MGED File->Preferences->Fonts results in error "named font "button
_font" doesn't exist on Linux.
* mged tab-completion doesn't work if the object names have spaces
* Open dialog in MGED seems rather busted for scrolling and selection
@@ -617,16 +508,6 @@ Recent Bugs
* dsp primitive is going into what seems to be an unbounded memory
allocation loop during prep, inside dsp_layers().
* crashes during photonmap raytrace of m35 where right node is invalid
rt -o test.pix -V 1.0 -P4 -J0 -l7 -A0 ~/Desktop/m35.g all.g box.r sph.r
* libfb cannot utilize standard output/error "device" files without
path trickery. it recognizes the /dev/ prefix and presumes it's a
libfb device instead of a filesystem device.
OK: rt -F/./dev/stdout
BAD: rt -F/dev/stdout
* libfb cannot open a file descriptor when piping/redirecting output.
OK: rt -F/./dev/stdout moss.g all.g
@@ -649,8 +530,6 @@ Recent Bugs
* triangulation of some pipe in toyjeep.g fails (rather reliably) on
some given bend. fails in nmg_triangulate model().
* fbhelp sends some of the output to stdout and some to stderr...
* debugbu 2 immediately reports a bu_vls_free() error.. apparently
been a problem since 4.5 days. this occurs because
bu_memdebug_add() is not called unless memory checking is enabled
@@ -667,9 +546,6 @@ Recent Bugs
* Create menu.. create "part" boo hiss..
* wavelet isn't working correctly on a simple image decomposition &
reconstruction.
* fbed is looking for /usr/lib/vfont/nonie.r.12
* mged doesn't check if html_dir does not exist when searching for
@@ -689,11 +565,6 @@ Recent Bugs
* concave arbs give correct wireframe but do not raytrace correctly.
* rtwizard/rtedge creates incorrect "fuzzy" edge overlay when creating
a "Ghost Image with Insert and Lines" that includes a light source
and object close to surface (e.g. moss.g; select plane, light, and
cone for ghost; select cone for insert and lines.)
* mged's solid illuminate doesn't work when Lighting is turned on
* raytrace of zoomed images (e.g., -s64) doesn't work for if_X24
@@ -719,8 +590,6 @@ Recent Bugs
* mged primitive editor doesn't accept/apply values to disk for
certain primitives (e.g. sph)
* photon map cache file doesn't work (seems to crash rt on use)
* enabling perspective mode horks shaded mode, also Z clipping
shouldn't be required to get the shading.
@@ -737,35 +606,9 @@ Recent Bugs
* sketches extruded with non-square AB vectors results in inner sketch
components not getting scaled properly.
* rtcheck is ignoring fastgen tagged geometry since no multioverlap
handler is set.
* bot-bldxf fails in db_walk_tree(), interface may have changed
Older Bugs
----------
* several manpages are missing or out of date for various tools
* X11 framebuffer often fails to display on certain middle bit depth
displays. (e.g. 15 or 16 bit depth)
* mk_lcomb fails on large combinations due to mk_tree_pure() building
a left-heavy tree and wdb_put_internal() then recursively performing
lookup and put calls.
Annoyances
----------
* matrix edits on objects in mged require you to select a primitive
for a coordinate system reference. this can be counterintuitive and
confusing.
* there are frequently modality errors when entering edit mode as
control and middle mouse rebind to model edit instead of view edit.
---
Bugs should be reported to the bug tracker on the project website at
http://sourceforge.net/tracker/?atid=640802&group_id=105292
-1708
View File
File diff suppressed because it is too large. Load diff
+87
View File
@@ -0,0 +1,87 @@
= BRL-CAD Interface Change Policy
:toc: macro
toc::[]
== Scope
This policy defines how BRL-CAD public interfaces may change. Public
interfaces include developer APIs, command-line interfaces, graphical
interfaces, documented commands, installed headers, public macros,
public types, and other behavior users reasonably rely on.
Renaming an application is not minimally impacting: an application
name is the primary way users find and run the tool.
Every public interface change must be either minimally impacting or
formally deprecated.
== Minimally Impacting
A minimally impacting change may be made at any time. A change is
minimally impacting only when it can be represented by the documented
rule language in
link:doc/changes/minimally-impacting.rules[doc/changes/minimally-impacting.rules]
and emitted by the generated update script.
If the rule language cannot express a change, either extend the rule
language so the generated script can perform the update, or treat the
change as formally deprecated.
Minimally impacting path includes:
* recently introduced interfaces that have not yet appeared unchanged
in two releases;
* appreciably broken interfaces that have been unusable for at least
two releases and have no secondary utility;
* elementary mechanical changes such as renames, parameter reordering,
parameter removal, defaulted parameter insertion, equivalent
interface substitutions, and header moves.
For function argument rewrites, BRL-CAD assumes callers are not
relying on preprocessor-generated call syntax and are not passing
nested function calls as arguments to the changed function. That
assumption keeps generated substitutions deterministic and reviewable.
Rule syntax and generated update-script workflow are documented in
link:doc/changes/README.adoc[doc/changes/README.adoc]. The generated
build-tree rendering of minimally impacting changes is
`doc/changes/minimally-impacting.adoc`.
== Formally Deprecated
Any public interface change that is not minimally impacting must
follow the formal deprecation process.
During a major release, such as 7.x to 8.x, any public interface may
change without advance notice. Major version changes imply interface
incompatibility.
During a minor release, such as 7.44.x to 7.46.x, a public interface
must be deprecated beforehand with advance notice in at least two
minor releases and at least 90 days elapsed since the initial release
announcement.
Public interfaces scheduled for change should be listed in
link:doc/changes/deprecated.adoc[doc/changes/deprecated.adoc] and
visibly marked in the source code. Appropriate markings include
`DEPRECATED` declarations, preprocessor warnings, `@DEPRECATED`
comments, runtime warnings when they do not disrupt valid usage, and
documentation updates.
After a deprecation window has completed, removed or significantly
changed interfaces are listed in
link:doc/changes/obsoleted.adoc[doc/changes/obsoleted.adoc].
== Examples
Removing `rt_shootray()` after it has been published and documented in
multiple releases is not minimally impacting unless a generated rule
can update callers to an equivalent interface. Otherwise, it must be
listed as deprecated, marked in the headers, announced in releases,
and only later obsoleted.
Renaming `bu_log()` or adding a defaulted first argument can be
minimally impacting if the change is listed in
`minimally-impacting.rules` and the generated update script rewrites
existing callers.
+2098 -1261
View File
File diff suppressed because it is too large. Load diff
+2 -5
View File
@@ -80,10 +80,7 @@ When referring to BRL-CAD, its source code, documentation, and
libraries, the reference is not meant to include or imply 3rd party
source code, libraries, and/or applications unless specifically stated
otherwise. No endorsement or claim of authorship is implied to any
3rd party asset that is included with BRL-CAD. The majority of the
3rd party source code, libraries, and applications included with
BRL-CAD are located in the src/other/ directory of the source code
distribution.
3rd party asset that is included with BRL-CAD.
Copyright
---------
@@ -101,7 +98,7 @@ arranged. This includes an implicit assignment of copyright for any
and all contributions being made. The following notice should be
prominent in the BRL-CAD sources:
Copyright (c) 1984-2024 United States Government as represented by
Copyright (c) 1984-2026 United States Government as represented by
the U.S. Army Research Laboratory.
Contact
+10767 -1869
View File
File diff suppressed because it is too large. Load diff
+138 -56
View File
@@ -376,8 +376,6 @@ details on subdirectories and authorship not covered here.
Write database library
src/mged/
Multi-device geometry editor
src/other/
External frameworks (Tcl/Tk, libpng, zlib, etc.)
src/proc-db/
Procedural geometry tools, create models programmatically
src/remrt/
@@ -399,14 +397,17 @@ should be POSIX-compliant Bourne Shell Script. The build system uses
the CMake build tool. An initial implementation of a BRL-CAD Geometry
Server is written in PHP.
With release 7.28, BRL-CAD intends to conform strictly with the 2011
ANSI/ISO standards for C and C++ language compilation
(ISO/IEC 9899:2011, i.e. C11 and ISO/IEC 14882:2011, i.e. C++11).
With release 7.38, BRL-CAD intends to conform strictly with the
following ANSI/ISO standards for C and C++ language compilation:
C : ISO/IEC 9899:2011, i.e. C11
C++: ISO/IEC 14882:2017, i.e. C++17
Support for use of necessary non-standard system facilities is
handled by build system declarations and preprocessor defines driven
by build configuration tests. The working feature set for normal
development should be widely supported C++11 features and the subset
of C11 that is also valid (and widely supported) C++11.
development should be widely supported C++17 features and the subset
of C11 that is also valid (and widely supported) C++17.
C++ is used as an implementation language within libraries, but there
are no public C++ APIs in use outside of OpenNURBS. For new work,
@@ -615,7 +616,7 @@ the end of the file:
* indent-tabs-mode: t
* c-file-style: "stroustrup"
* End:
* ex: shiftwidth=4 tabstop=8
* ex: shiftwidth=4 tabstop=8 cino=N-s
*/
In emacs, the 'indent-region' command (bound to C-M-\ by default)
@@ -867,7 +868,7 @@ respective library being tested (e.g., src/libbu/tests):
Note that changes to publicly documented tools and library APIs must
adhere to BRL-CAD's change policy. This means changes to any tests
may require thoughtful deployment. See the CHANGES file for details.
may require thoughtful deployment. See CHANGES.adoc for details.
These tests are run nightly on BRL-CAD's server to catch problems
quickly - developers should be aware of the status of BRL-CAD's tests
@@ -917,9 +918,9 @@ PATCH SUBMISSION GUIDELINES
---------------------------
To contribute to BRL-CAD, begin by submitting pull requests to the
Github project at https://github.com/BRL-CAD/brlcad.
GitHub project at https://github.com/BRL-CAD/brlcad.
For an introduction to the standard Github workflow for forking and
For an introduction to the standard GitHub workflow for forking and
submitting pull requests, see:
https://git-scm.com/book/en/v2/GitHub-Contributing-to-a-Project
@@ -932,8 +933,8 @@ particularly important when working with BRL-CAD. Patches need to be
based on the latest sources and avoid reverting improvements that have
been added to the upstream sources since your fork was created.
Although the Github pull request based workflow is recommended and
preferred, if for any reason you cannot use Github you may also
Although the GitHub pull request based workflow is recommended and
preferred, if for any reason you cannot use GitHub you may also
submit "git format-patch" patches through other channels. See:
https://git-scm.com/docs/git-format-patch
@@ -954,7 +955,7 @@ BUGS & UNEXPECTED BEHAVIOR
When a bug or unexpected behavior is encountered that cannot be
quickly fixed, it needs to be documented in our BUGS file or more
formally reported to the Github issues tracker at:
formally reported to the GitHub issues tracker at:
https://github.com/BRL-CAD/brlcad/issues
@@ -986,7 +987,7 @@ access to be granted:
3) Join the brlcad-devel developer mailing list, introduce yourself.
4) Create a Github account, submit at least pull requests that
4) Create a GitHub account, submit at least pull requests that
demonstrate competency with our coding style, apply flawlessly, and
provide some significant improvement.
@@ -1034,10 +1035,10 @@ developers to address issues as they are encountered regardless of who
introduces the problem.
To assist developers in these efforts, BRL-CAD utilizes Continuous
Integration (CI) testing via the Github Actions infrastructure to
Integration (CI) testing via the GitHub Actions infrastructure to
monitor code health: https://github.com/BRL-CAD/brlcad/actions
Under normal conditions, all developers should strive to keep all
Github Actions tests passing.
GitHub Actions tests passing.
3) Contributors making commits to the repository are required to
uphold the legal conventions and requirements summarized in the
@@ -1257,15 +1258,32 @@ Release steps are as follows:
#####################################################################
# 00: Notify developer mailing list of intention to release.
echo "Release preparations are under way. Trunk sources merged to the RELEASE branch will be reviewed for sync to STABLE and release tagging. Please help test by compiling distcheck-full and running benchmark, mged, and archer." | mail -s "Release preparations commencing" brlcad-devel@lists.sourceforge.net -r "your@subscribed.address"
echo "Release preparations are under way. Trunk sources merged to the RELEASE branch will be reviewed for sync to STABLE and release tagging. Please help test by compiling distcheck and running benchmark, mged, and archer." | mail -s "Release preparations commencing" brlcad-devel@lists.sourceforge.net -r "your@subscribed.address"
#####################################################################
# 01: Sync main to RELEASE branch.
TODO - we probably need to do a re-look at the RELEASE and STABLE setup.
With Git and modern workflows, I'm leaning more towards a temporary
working branch where we shake down for release, then tagging from that
working branch and merging that back into main once complete. For
minor releases we should create a X-XX branch from the X-XX-0 tag, and
any patch releases on that minor series will be handled in and tagged
from the branch. With AI driven change rates, it's unrealistic to
try and put main back into a state where we can call a tag off of it
a patch on an older minor. Needs more thought - should try to hash out
before the next minor release and update the workflow.
git clone git@github.com:BRL-CAD/brlcad.git
cd brlcad
git checkout RELEASE
git merge main
# NOTE - it is not strictly necessary to use the strategy-option,
# but barring some specific reason not to the goal will be to
# have RELEASE match the contents of main. The "theirs"
# strategy option helps simplify that process.
git merge --strategy-option theirs main
# NON-AUTO: The merge may succeed without conflicts. If
# not, you will see the message:
@@ -1311,12 +1329,8 @@ Release steps are as follows:
#####################################################################
# 02: Test the merge.
# NON-AUTO: Confirm versioning in include/conf/.
# BRLCAD_VERSION_AMEND may be defined during CMake for an
# amendment build.
mkdir -p .build && cd .build
cmake .. -DBRLCAD_BUNDLED_LIBS=ON -DCMAKE_BUILD_TYPE=Release && make
cmake .. -DENABLE_ALL=ON -DCMAKE_BUILD_TYPE=Release && make
# NON-AUTO: Manually check rt, mged, and archer.
bin/rt # should report usage with correct library versions
@@ -1328,17 +1342,17 @@ Release steps are as follows:
cd .. && rm -rf .build
#####################################################################
# 03: Commit the merge (if necessary) and push.
# 03: Commit the merge (if necessary).
# Note - we don't push the merge at this stage, since we
# will be using the upstream RELEASE branch when we generate a
# ChangeLog file.
# If merge conflict resolution was needed, make a merge commit:
MSHA1=$(git log -1 main --pretty=format:"%h")
echo $MSHA1
git commit -m "merge of main $MSHA1 to RELEASE branch"
# Whether or not their was a conflict, let upstream know what
# has changed
git push
#####################################################################
# 04: Reprioritize or address remaining TODO items.
@@ -1348,12 +1362,21 @@ Release steps are as follows:
# 05: Review all commits.
# NON-AUTO: Verify all user-visible changes are in NEWS.
# NON-AUTO: Verify all interface changes are in CHANGES.
# NON-AUTO: Verify all interface changes are in CHANGES.adoc or doc/changes/.
# NON-AUTO: Verify usage/options are documented in doc/.
# A useful trick for this step is to use gitk to display all
# commits made since the last time the RELEASE branch was
# updated:
gitk --no-merges origin/RELEASE..RELEASE
#####################################################################
# 06: Update the version numbers.
# NOTE - BRLCAD_VERSION_AMEND may also be defined during CMake
# for an amendment build.
# NON-AUTO: NEWS
# NON-AUTO: README
# NON-AUTO: include/conf/PATCH
@@ -1363,24 +1386,60 @@ Release steps are as follows:
# NON-AUTO: misc/macosx/Resources/Welcome.rtfd/TXT.rtf
#####################################################################
# 07: Update ChangeLog. Use the YYYY-MM-DD of previous NEWS entry.
# 07: Create branch for release in bext repository.
TODO - if we want GNU style changelogs, more work will be needed
as there's not an out of the box solution...
MAJOR=`awk '{print $1}' include/conf/MAJOR`
MINOR=`awk '{print $1}' include/conf/MINOR`
PATCH=`awk '{print $1}' include/conf/PATCH`
cd ..
git clone git@github.com:BRL-CAD/bext.git
cd bext
git checkout RELEASE
git branch rel-$MAJOR-$MINOR-$PATCH
git checkout rel-$MAJOR-$MINOR-$PATCH
git push --set-upstream origin rel-$MAJOR-$MINOR-$PATCH
cd ../brlcad
LAST=`grep -E "\--- [0-9]{4}-[0-9X]{2}-[0-9X]{2}" NEWS | head -n 2 | tail -n 1 | awk '{print $2}'`
echo "LAST=$LAST"
git log --since=$LAST > ChangeLog
#####################################################################
# 08: Update the bext submodule in BRL-CAD's main repository.
# NON-AUTO: Update BEXT_SHA1 hash in CMakeLists.txt (argument
# to brlcad_bext_init function). If already pointing to the
# sha1 being used for the bext rel-$MAJOR-$MINOR-$PATCH branch
# this is a no-op - otherwise, commit the update.
git add CMakeLists.txt
git commit -m "Update bext submodule to SHA1 <hashval>"
#####################################################################
# 09: Update ChangeLog.
# We have held off pushing to upstream RELEASE branch until now,
# so we can use that as an anchor point from which to start the
# ChangeLog logging. If for some reason that won't work, replace
# origin/RELEASE with the sha1 of the previous release's final
# commit in the RELEASE branch.
# We do this instead of date based logging to capture commits that
# may have been originally made before the last release (i.e. older
# commits made in a fork and incorporated into the history via PR)
git log origin/RELEASE..RELEASE > ChangeLog
git add ChangeLog
git commit -m "Update log with commits since $LAST"
git commit -m "Update log with commits being incorporated into rel-$MAJOR-$MINOR-$PATCH"
# Now that we have updated the ChangeLog, push the changes to
# upstream RELEASE branch.
git push
#####################################################################
# 08: Run distcheck-full on at least two platforms.
# 10: Run distcheck on at least two platforms.
mkdir -p .build && cd .build && cmake .. && make distcheck-full
mkdir -p .build && cd .build && cmake .. && make distcheck
#####################################################################
# 09: Sync RELEASE to STABLE branch:
# 11: Sync RELEASE to STABLE branch:
# NON-AUTO: Update the NEWS release date for the current release to today's date
git add NEWS
@@ -1399,27 +1458,32 @@ Release steps are as follows:
# the resolution will be to make STABLE match the state of RELEASE
#####################################################################
# 10: If there are any differences between RELEASE and STABLE trees,
# 12: If there are any differences between RELEASE and STABLE trees,
test the merge. In normal usage STABLE should match RELEASE,
so this is only necessary in special circumstances.
so this is only necessary in unusual circumstances. To check
if there are any differences, use git diff:
git diff RELEASE STABLE
# NON-AUTO: If differences were observed, either correct them
# or (if expected) test:
mkdir .merge && cd .merge
cmake .. -DBRLCAD_BUNDLED_LIBS=ON -DCMAKE_BUILD_TYPE=Release && make distcheck-full && cd .. && rm -rf .merge
cmake .. -DBRLCAD_BUNDLED_LIBS=ON -DCMAKE_BUILD_TYPE=Release && make distcheck && cd .. && rm -rf .merge
#####################################################################
# 11: Let upstream know about the new state of STABLE.
# 13: Let upstream know about the new state of STABLE.
# If merge conflict resolution was needed, make a merge commit:
RSHA1=$(git log -1 RELEASE --pretty=format:"%h")a
echo $RSHA1
git commit -m "merge of RELEASE $RSHA1 to STABLE branch"
# Whether or not their was a conflict, let upstream know what
# has changed
# Let upstream know what has changed
git push
#####################################################################
# 12: Tag the release using "rel-MAJOR-MINOR-PATCH" format:
# 14: Tag the release using "rel-MAJOR-MINOR-PATCH" format:
MAJOR=`awk '{print $1}' include/conf/MAJOR`
MINOR=`awk '{print $1}' include/conf/MINOR`
@@ -1430,7 +1494,7 @@ Release steps are as follows:
git push origin rel-$MAJOR-$MINOR-$PATCH
#####################################################################
# 13: Increment and commit the next BRL-CAD release numbers.
# 15: Increment and commit the next BRL-CAD release numbers.
# Update the include/conf/(MAJOR|MINOR|PATCH) version files
# immediately to odd-numbered minor version or new patch developer
@@ -1450,7 +1514,7 @@ Release steps are as follows:
git push
#####################################################################
# 14: Sync RELEASE changes back to main.
# 16: Sync RELEASE changes back to main.
git checkout main
git merge RELEASE
@@ -1465,22 +1529,40 @@ Release steps are as follows:
git push
#####################################################################
# 15: Obtain a tagged version of the sources from the repository, make
# 17: Obtain a tagged version of the sources from the repository, make
# final distribution tarballs:
git checkout rel-$MAJOR-$MINOR-$PATCH
mkdir .build && cd .build
cmake .. -DBRLCAD_BUNDLED_LIBS=ON -DCMAKE_BUILD_TYPE=Release && make distcheck-full
cmake .. -DBRLCAD_BUNDLED_LIBS=ON -DCMAKE_BUILD_TYPE=Release && make distcheck
#####################################################################
# 16: Upload the source distributions and release notes. Use source
# 18: Upload the source distributions and release notes. Use source
# tarballs to create binaries.
------------- TODO - need new procedures for Github... ------------
# NON-AUTO: Select the new tag at https://github.com/BRL-CAD/brlcad/releases/new
#
# Upload the NEWS entries and description for the web page's
# release notes. Attach the tar.gz, tar.bz2 and .zip files as
# the initial archives. Releases may be edited to add new files,
# so go ahead and publish the release to have our default webpage
# correctly reflect the most recent release.
TODO - It would be nice to have some curated scripts for binary creation.
For Linux I usually set up a fresh Rocky Linux image with a clean environment
and install just what is needed to try and get a "this will probably run
anywhere" binary, but as a manual process that's a pain - maybe there's a way
to script qemu to do the job for us...
Windows is still completely manual. The .msi installer depends on an older
version of WiX, and I don't know of another good solution there - we probably need
to investigate whether we could produce MSIX packages instead.
Mac - TODO.
#####################################################################
# 17: Notify binary platform maintainers:
# 19: Notify binary platform maintainers:
T2 package maintainer
http://t2-project.org/packages/brlcad.html
@@ -1507,7 +1589,7 @@ Release steps are as follows:
https://fedoraproject.org/wiki/User:Germano#Contact
#####################################################################
# 18: Announce the new release.
# 20: Announce the new release.
The NEWS file should generally be used as a basis for making release
announcements though the announcements almost always require
@@ -1586,7 +1668,7 @@ Multiple platform major release and announcements:
copyboy@cadcam-insider.com
#####################################################################
# 19: Sit back and enjoy a beverage for a job well done.
# 21: Sit back and enjoy a beverage for a job well done.
+187 -298
View File
@@ -1,23 +1,21 @@
The Installation Guide to BRL-CAD
=================================
This document covers the installing BRL-CAD from either a source or
binary distribution. Please see REPORTING PROBLEMS to troubleshoot.
This document covers the installing BRL-CAD from either a source or binary
distribution. Please see REPORTING PROBLEMS to troubleshoot.
Some platforms have additional platform-specific documentation
provided in the doc/ directory with additional information. This
presently includes the following:
Some platforms have additional platform-specific documentation provided in the
doc/ directory with additional information. This presently includes the
following:
doc/README.AIX -- IBM's Advanced Interactive eXecutive OS
doc/README.BSD -- FreeBSD, NetBSD, OpenBSD, etc.
doc/README.IRIX -- SGI IRIX and IRIX64
doc/README.Linux -- Various Linux distributions
doc/README.MacOSX -- Apple Mac OS X
doc/README.Linux -- Various Linux distributions
doc/README.MacOSX -- Apple Mac OS X
doc/README.Solaris -- Oracle Solaris, OpenIndiana (Illumos), etc.
doc/README.Windows -- Microsoft Windows
doc/README.VAX -- Virtual Address eXtension architecture from DEC.
One of the original BRL-CAD platforms. These
days, re-created using the simh simulator.
doc/README.Windows -- Microsoft Windows
TABLE OF CONTENTS
@@ -36,32 +34,32 @@ TABLE OF CONTENTS
QUICK SOURCE INSTALL
--------------------
See https://brlcad.org/wiki/Compiling for a platform-specific
walk-through including instructions for building on Windows.
See https://brlcad.org/wiki/Compiling for a platform-specific walk-through
including instructions for building on Windows.
Required tools:
- Git must be 2.17 or later
- CMake must be 3.12 or later
- Compiler must be C++11-compliant
- If using Visual Studio, version 2015 (14.0+) or later
- If using GCC/G++, version 4.8.1 or later
- If using LLVM/Clang 3.3 or later
- If using Intel, version 2015 (15.0+) or later
- CMake must be 3.26 or later
- Compiler must be C++17-compliant
- If using Visual Studio, version 2019 (16.8+) or later
- If using GCC/G++, version 7 or later
- If using LLVM/Clang 5 or later
- If using Intel, version 19.0.1 or later
Steps to compile, test, and install an optimized BRL-CAD on
non-Windows platforms:
Steps to compile, test, and install an optimized BRL-CAD on non-Windows
platforms:
git clone https://github.com/BRL-CAD/brlcad.git
mkdir brlcad/build
cd brlcad/build
cmake .. -DBRLCAD_BUNDLED_LIBS=ON -DCMAKE_BUILD_TYPE=Release
cmake .. -DENABLE_ALL=ON -DCMAKE_BUILD_TYPE=Release
make -j4
make check
sudo make install
Once installed, run bin/mged or bin/archer to launch BRL-CAD's GUI
apps. See POST-INSTALLATION for instruction adding bin/ folder to
your system PATH to more easily run geometry converters.
Once installed, run bin/mged or bin/archer to launch BRL-CAD's GUI apps. See
POST-INSTALLATION for instruction adding bin/ folder to your system PATH to
more easily run geometry converters.
INSTALLING FROM BINARY
@@ -76,56 +74,54 @@ and Windows etc.
Generic Binary Distributions:
For the unspecialized binary distributions that are basically
compressed tarballs of the installation root, they should contain the
entire hierarchy of the distribution. To put that hierarchy in its
"installed" location, you just create the directory and move the
expanded tarball contents:
For binary distributions that are simply compressed tarballs of the
installation root, they should contain the entire hierarchy of the
distribution. To put that hierarchy in its "installed" location, you just
create the directory and move the expanded tarball contents:
gunzip BRL-CAD_7.2.4_Linux_ia64.tar.gz
tar -xvf BRL-CAD_7.2.4_Linux_ia64.tar
sudo mkdir /usr/brlcad/rel-7.2.4
sudo mv BRL-CAD_7.2.4_Linux_ia64/* /usr/brlcad/rel-7.2.4/
gunzip BRL-CAD_X.Y.Z_Linux_ia64.tar.gz
tar -xvf BRL-CAD_X.Y.Z_Linux_ia64.tar
sudo mkdir /usr/brlcad/rel-X.Y.Z
sudo mv BRL-CAD_X.Y.Z_Linux_ia64/* /usr/brlcad/rel-7.X.Y/
Of course, there are other compression options possible including zip
and bzip2. By default, BRL-CAD expects to be installed into
/usr/brlcad/rel-7.2.4. On some platforms the binary may be relocatable,
but this is not guaranteed. It's recommended that you start from a source
distribution if you would like to install into an alternate installation
location. That said, if you do desire to install and/or run BRL-CAD from
a different location, give it a try...on some platforms it will work.
Of course, there are other compression options possible including zip and
bzip2. By default, BRL-CAD expects to be installed into /usr/brlcad/rel-X.Y.Z.
On some platforms the binary may be relocatable, but this is not guaranteed.
It's recommended that you start from a source distribution if you would like to
install into an alternate installation location. That said, if you do desire
to install and/or run BRL-CAD from a different location, give it a try...on
some platforms it will work.
Something to be aware of, even if a binary distribution IS relocatable:
it will use its local copies of things like libraries only so long as the
"final" installed target directory that the build was compiled for
does not contain a BRL-CAD installation. Due to the way path logic
is set, an installed copy of a library in the correct location will
always be loaded first, regardless of the presence of a "local" copy.
Something to be aware of, even if a binary distribution IS relocatable: it will
use its local copies of things like libraries only so long as the "final"
installed target directory that the build was compiled for does not contain a
BRL-CAD installation. Due to the way path logic is set, an installed copy of a
library in the correct location will always be loaded first, regardless of the
presence of a "local" copy.
Mac OS X Disk Mounting Image:
Mount the .dmg and run the Installer .pkg contained therein. This
will install into /usr/brlcad/rel-X.Y.Z and will only require
confirming that your environment is set up properly (i.e. add
/usr/brlcad/rel-X.Y.Z/bin to your path) as described in the Quick
Installation section.
Mount the .dmg and run the Installer .pkg contained therein. This will install
into /usr/brlcad/rel-X.Y.Z and will only require confirming that your
environment is set up properly (i.e. add /usr/brlcad/rel-X.Y.Z/bin to your
path) as described in the Quick Installation section.
Validating checksums:
The integrity of distributed files can be verified using checksums
that are published with released files. Files on SourceForge's file
release system can be found by clicking the 'i' button at the end of
each file's name. If you re-distribute BRL-CAD, checksums should be
retained with the files so others can validate origination.
The integrity of distributed files can be verified using checksums that are
published with released files. Released files and their checksums are
available from the GitHub releases page (https://github.com/BRL-CAD/brlcad/releases). If you
re-distribute BRL-CAD, checksums should be retained with the files so others
can validate origination.
INSTALLING FROM SOURCE
----------------------
There are a couple of ways to obtain the BRL-CAD sources, usually via
one of the following starting points:
There are a couple of ways to obtain the BRL-CAD sources, usually via one of
the following starting points:
1) from a Git checkout, or
2) from a source distribution tarball
@@ -138,31 +134,68 @@ you need/want will determine which configuration options you should
use. See the CONFIGURATION OPTIONS section below for details on how
to go about selecting which options are appropriate for you.
By default, the default configuration will prepare the build system
to perform a Debug build and install into the /usr/brlcad/dev-X.Y.Z
directory. The CMAKE_INSTALL_PREFIX option may be used to change
that directory, or a Release build type may be specified to install to
/usr/brlcad/rel-X.Y.Z - more on this below. The
tradition of non-system installation paths goes back a couple of decades
and is a convenient means to isolate the BRL-CAD solid modeling
system from your system, resolves conflicts, facilitates uninstalls,
and simplifies upgrades. The default configuration is performed by
running `cmake'. It is not required to do the build in a directory
different from your source directory, but it is much cleaner and
*highly* recommended - this guide will illustrate the build process
with the assumption that the BRL-CAD source code is in the directory
brlcad-7.2.4 and the directory intended to hold the build output is
brlcad-build, located in the same parent directory as brlcad-7.2.4:
BRL-CAD's dependencies are managed in a separate repository, located at
https://github.com/BRL-CAD/bext By default BRL-CAD's configure process will
download and manage the necessary dependencies, avoiding the need for user
awareness of the bext repository, but there are a number of scenarios where it
is advantageous for developers to adjust how this process works.
The full dependency stack of BRL-CAD, with all optional and experimental
features enabled, is a VERY large and long compile. Therefore, the bext build
outputs can be built as their own separate, external project to allow for reuse
of the compiled outputs. Building bext separately means BRL-CAD won't get a
chance to customize what is and is not built, but the trade-off is that outputs
can be built once and reused over and over. Doing so can significantly shorten
time spent configuring BRL-CAD builds - reusing bext compiled outputs is
recommended for serious developers.
Various useful configurations for working with bext:
* Get a git clone that has everything which might be needed (large,
but useful for offline building)
git clone --recurse-submodules https://github.com/BRL-CAD/brlcad
* Have prebuilt bext outputs to reuse - BRL-CAD will simply copy and prepare
the pre-existing files
cmake .. -DBRLCAD_EXT_DIR=/home/user/bext_output
* Already have an existing bext clone but want BRL-CAD to build bext outputs
cmake .. -DBRLCAD_EXT_SOURCE_DIR=/home/user/bext
* Download, build and bundle only what is needed for librt
cmake .. -DBRLCAD_COMPONENTS=librt
* Build and bundle only what is needed, but don't require internet for bext clone
cmake .. -DBRLCAD_EXT_SOURCE_DIR=/home/user/bext -DBRLCAD_COMPONENTS=librt
By default, the build system will prepare a Debug build and install into the
/usr/brlcad/dev-X.Y.Z directory. The CMAKE_INSTALL_PREFIX option may be used
to change that directory, or a Release build type may be specified to install
to /usr/brlcad/rel-X.Y.Z - more on this below. The tradition of non-system
installation paths goes back a couple of decades and is a convenient means to
isolate the BRL-CAD solid modeling system from your system, resolves conflicts,
facilitates uninstalls, and simplifies upgrades. The default configuration is
performed by running `cmake'. It is not required to do the build in a
directory different from your source directory, but it is much cleaner and
*highly* recommended - this guide will illustrate the build process with the
assumption that the BRL-CAD source code is in the directory brlcad-X.Y.Z and
the directory intended to hold the build output is brlcad-build, located in the
same parent directory as brlcad-X.Y.Z:
.
./brlcad-7.2.4
./brlcad-X.Y.Z
./brlcad-build
To start the build process, cd into brlcad-build and run CMake,
pointing it to the source directory:
cd brlcad-build
cmake ../brlcad-7.2.4
cmake ../brlcad-X.Y.Z
As mentioned earlier, CMake uses two "build types", controlled by
the CMAKE_BUILD_TYPE variable, that are useful for specific purposes:
@@ -187,69 +220,23 @@ override the ../brlcad-install default. Build types are a convenient way
to bundle sets of settings, but they do not prevent overrides if a more
custom setup is needed.
By default, all components and functionality will be built.
Note that BRL-CAD does require and include several 3rd party
components. If your system does not include a sufficient version of
those required 3rd party components, they will be automatically
configured for compilation.
If the autodetection mechanisms fail to produce a working configuration,
the next simplest approach is typically to enable ALL the third party
components - this is typically a well tested configuration, but will
increase both the build time and final install size of BRL-CAD on
the system. To set this variable on the command line, use -D to
define BRLCAD_BUNDLED_LIBS for CMake:
define ENABLE_ALL for CMake:
-DBRLCAD_BUNDLED_LIBS=Bundled
If the graphical interface (cmake-gui) is in use, it will list this
and other common options by default, allowing the user change them
graphically. This is often quicker and more convenient than
defining options on the command line, but both will work.
You can also force on or off any individual 3rd party library by
setting the BRL-CAD variable for that feature to either on or off:
-DBRLCAD_<LIBRARY>=ON
Other variables control BRL-CAD features. For example, to NOT
enable functionality using OpenGL, set
-DBRLCAD_ENABLE_OPENGL=OFF
-DENABLE_ALL=ON
To obtain an optimized build (for example, for BRL-CAD Benchmark
performance evaluation), enable BRLCAD_FLAGS_OPTIMIZATION:
-DBRLCAD_FLAGS_OPTIMIZATION=ON
Profile-guided optimization builds are possible via two-pass
compilation. Compile with this flag set, run the benchmark suite,
clean the build, and then compile again with this flag set. Supported
compilers will utilize data from the first pass to guide optimization,
typically resulting in a significant performance increase:
-DBRLCAD_PGO=ON
See the CONFIGURATION OPTIONS below for more details on all of the
possible settings.
You can specify options or preferences you want to always use by
default. For example, to always enable all local libs the following
line can be added to your own configuration file:
set(BRLCAD_BUNDLED_LIBS "Bundled" CACHE STRING "Enable all local libs")
You can define your own configuration file in one of three ways. The
build system will search for the file in this order:
${BRLCAD_SOURCE_DIR}/../BRL-CAD_CONFIG.GLOBAL
${BRLCAD_SOURCE_DIR}/BRL-CAD_CONFIG.GLOBAL
the file defined in the environment variable "BRLCAD_USER_GLOBAL_CONFIG_FILE"
The build system will use the first file defined that exists.
Once configured, you should be able to successfully build BRL-CAD via
make:
@@ -342,19 +329,16 @@ Please report any bugs, support requests, or feature requests to:
https://github.com/BRL-CAD/brlcad/issues
CONFIGURATION OPTIONS
---------------------
--- BRLCAD_BUNDLED_LIBS ---
--- ENABLE_ALL ---
Enables compilation of all 3rd party sources that are provided within a BRL-CAD
source distribution. If used this option sets all other 3rd party library
build flags to ON by default. However, that setting can be overridden by
manually setting individual variables. Default is "AUTO" - 3rd party sources
are compiled only if they are not detected as being available and functioning
as expected.
Aliases: ENABLE_ALL
If set to ON, and the BRL-CAD configure process is managing the bext
dependencies, instructs bext to default to building local copies of the
dependencies it will enable per the BRL-CAD feature settings, rather than
searching for system versions.
--- BRLCAD_ENABLE_OPENGL ---
@@ -366,6 +350,41 @@ if it is, default is to enable.
Aliases: ENABLE_OPENGL
--- BRLCAD_X11_PROVIDER ---
Selects the X11 implementation used by BRL-CAD, Tk, Qt, and OpenGL. Accepted
values are AUTO, SYSTEM, and XMIN. AUTO is the default and deliberately
resolves to SYSTEM so installing Xmin cannot change an existing build.
XMIN selects an installed Xmin client SDK for deterministic GUI testing
without a host X server. The SDK must provide Xmin::ToolkitX11; OpenGL builds
also need Xmin::GL. Set Xmin_ROOT to the SDK installation prefix. Tk and Qt
must be built for the same provider because their public X11 APIs conceal
provider-private state; mixing Xmin and system client libraries is not ABI
safe and is rejected during configuration.
When BRL-CAD manages bext, it derives the matching bext SDK prefix from the
selected Xmin package. Bext then applies its version-matched Tk and Qt patches
automatically to whichever bundled toolkits are selected. No external patch
paths are needed.
A typical Xmin configuration is:
cmake .. -DBRLCAD_X11_PROVIDER=XMIN \
-DXmin_ROOT=/path/to/xmin-prefix
Bext retains advanced TK_EXTRA_PATCHES, TK_CONFIGURE_ARGS, QT_EXTRA_PATCHES,
and QT_XMIN_ROOT controls for custom profiles. The standard BRL-CAD Xmin
configuration does not need them. Refer to bext's Xmin profile documentation
before changing the bundled Tk or Qt revision.
--- BRLCAD_COMPONENTS ---
Semicolon separated list of components to enable for building - see
src/source_dirs.cmake for a list of the components that may be specified.
--- BRLCAD_ENABLE_RUNTIME_DEBUG ---
Enables support for application and library debugging facilities.
@@ -379,6 +398,26 @@ Aliases: ENABLE_RUNTIME_DEBUG, ENABLE_RUN_TIME_DEBUG, ENABLE_RUNTIME_DEBUGGING
ENABLE_RUN_TIME_DEBUGGING
--- BRLCAD_EXT_DIR ---
If specified, BRL-CAD will look in this directory for bext compiled outputs to
bundle and use during the build.
--- BRLCAD_EXT_SOURCE_DIR ---
If specified, BRL-CAD will look in this directory for bext source files. Use
this when you have a pre-existing bext clone and don't want BRL-CAD's configure
process to pull down another copy, but are still looking to have the BRL-CAD
configure process manage producing bext build outputs.
--- BRLCAD_EXT_PARALLEL ---
This number, when specified, describes how many compilation threads to use
when compiling bext sources. Default is 8.
--- BRLCAD_DEBUGGING ---
Add compiler flags to aid in program debugging. Defaults to ON.
@@ -387,6 +426,17 @@ Aliases: ENABLE_DEBUG, ENABLE_FLAGS_DEBUG, ENABLE_DEBUG_FLAGS
BRLCAD_FLAGS_DEBUG
--- BRLCAD_PGO ---
Enable profile-guided optimization build flags. Defaults to OFF.
Profile-guided optimization builds are possible via two-pass
compilation. Compile with this flag set, run the benchmark suite,
clean the build, and then compile again with this flag set. Supported
compilers will utilize data from the first pass to guide optimization,
typically resulting in a significant performance increase:
--- BRLCAD_WARNINGS ---
Use extra warning flags when compiling C/C++ code. Defaults to ON.
@@ -417,171 +467,10 @@ Aliases: ENABLE_ALL_CXX
--- BRLCAD_EXTRADOCS ---
The core option that enables and disables building of BRL-CAD's
DocBook based documentation (includes manuals and man pages for
commands, among other things). Defaults to ON, but only HTML and MAN
formats are enabled by default - PDF must be enabled separately by use
of this option or one of its aliases. Note that you may set
environment variable APACHE_FOP to point to your locally installed fop
executable file (which on Linux is usually a shell script with 0755
permissions).
AsciiDoc based documentation (includes manuals and man pages for
commands, among other things). It is built with BRL-CAD's bundled
asciiquack processor into HTML and man-page (troff) formats. Defaults
to ON for a full build and OFF for reduced target sets.
Aliases: ENABLE_DOCS, ENABLE_EXTRA_DOCS, ENABLE_DOCBOOK
Aliases: ENABLE_DOCS, ENABLE_EXTRA_DOCS
--- BRLCAD_ASTYLE ---
Option for enabling and disabling compilation of the Artistic Style
(astyle) utility provided with BRL-CAD's source distribution. Default is
AUTO,
responsive to the toplevel BRLCAD_BUNDLED_LIBS option and testing
first for a system version if BRLCAD_BUNDLED_LIBS is also AUTO.
Aliases: ENABLE_ASTYLE
--- BRLCAD_XSLTPROC ---
Option for enabling and disabling compilation of the xsltproc XML
transformation utility provided with BRL-CAD's source distribution.
Used for DocBook documentation processing. Default is AUTO,
responsive to the toplevel BRLCAD_BUNDLED_LIBS option and testing
first for a system version if BRLCAD_BUNDLED_LIBS is also AUTO.
Depends on BRLCAD_EXTRADOCS.
Aliases: ENABLE_XSLTPROC
--- BRLCAD_XMLLINT ---
Option for enabling and disabling compilation of the xmllint XML
validation utility provided with BRL-CAD's source distribution. Used
for DocBook documentation validation. Default is AUTO, responsive to
the toplevel BRLCAD_BUNDLED_LIBS option and testing first for a system
version if BRLCAD_BUNDLED_LIBS is also AUTO.
Aliases: ENABLE_XMLLINT
--- BRLCAD_ZLIB ---
Option for enabling and disabling compilation of the zlib library
provided with BRL-CAD's source distribution. Default is AUTO,
responsive to the toplevel BRLCAD_BUNDLED_LIBS option and testing
first for a system version if BRLCAD_BUNDLED_LIBS is also AUTO.
Aliases: ENABLE_ZLIB, ENABLE_LIBZ
--- BRLCAD_REGEX ---
Option for enabling and disabling compilation of the Regular
Expression Library provided with BRL-CAD's source distribution.
Default is AUTO, responsive to the toplevel BRLCAD_BUNDLED_LIBS option
and testing first for a system version if BRLCAD_BUNDLED_LIBS is also
AUTO.
Aliases: ENABLE_REGEX
--- BRLCAD_NETPBM ---
Option for enabling and disabling compilation of the netpbm library
provided with BRL-CAD's source code. Default is AUTO, responsive to
the toplevel BRLCAD_BUNDLED_LIBS option and testing first for a system
version if BRLCAD_BUNDLED_LIBS is also AUTO.
Aliases: ENABLE_NETPBM
--- BRLCAD_PNG ---
Option for enabling and disabling compilation of the Portable Network
Graphics library provided with BRL-CAD's source distribution. Default
is AUTO, responsive to the toplevel BRLCAD_BUNDLED_LIBS option and
testing first for a system version if BRLCAD_BUNDLED_LIBS is also
AUTO.
Aliases: ENABLE_PNG
--- BRLCAD_SC ---
Option for enabling and disabling compilation of the NIST Step Class
Libraries provided with BRL-CAD's source code. Default is AUTO,
responsive to the toplevel BRLCAD_BUNDLED_LIBS option and testing
first for a system version if BRLCAD_BUNDLED_LIBS is also AUTO.
Aliases: ENABLE_SCL, ENABLE_STEP, ENABLE_STEP_CLASS_LIBRARIES
--- BRLCAD_SQLITE3 ---
Option for enabling and disabling compilation of the sqlite3 database command
and library provided with BRL-CAD's source distribution. Default is AUTO,
responsive to the toplevel BRLCAD_BUNDLED_LIBS option and testing first for a
system version if BRLCAD_BUNDLED_LIBS is also AUTO.
Aliases: ENABLE_SQLITE3, ENABLE_SQLITE3
--- BRLCAD_PROJ ---
Option for enabling and disabling compilation of the PROJ geographic
projection library provided with BRL-CAD's source code. Default
is AUTO, responsive to the toplevel BRLCAD_BUNDLED_LIBS option and
testing first for a system version if BRLCAD_BUNDLED_LIBS is also
AUTO.
Aliases: ENABLE_PROJ
--- BRLCAD_GDAL ---
Option for enabling and disabling compilation of the GDAL geographic
library provided with BRL-CAD's source code. Default
is AUTO, responsive to the toplevel BRLCAD_BUNDLED_LIBS option and
testing first for a system version if BRLCAD_BUNDLED_LIBS is also
AUTO.
Aliases: ENABLE_GDAL
--- BRLCAD_ASSETIMPORT ---
Option for enabling and disabling compilation of the Open
Asset Import Library provided with BRL-CAD's source code. Default
is AUTO, responsive to the toplevel BRLCAD_BUNDLED_LIBS option and
testing first for a system version if BRLCAD_BUNDLED_LIBS is also
AUTO.
Aliases: ENABLE_ASSETIMPORT
--- BRLCAD_OPENMESH ---
Option for enabling and disabling compilation of the OpenMesh
Library provided with BRL-CAD's source code. Default
is AUTO, responsive to the toplevel BRLCAD_BUNDLED_LIBS option and
testing first for a system version if BRLCAD_BUNDLED_LIBS is also
AUTO.
Aliases: ENABLE_OPENMESH
--- BRLCAD_TCL ---
Option for enabling and disabling compilation of the Tcl library
provided with BRL-CAD's source code. Default is AUTO, responsive to
the toplevel BRLCAD_BUNDLED_LIBS option and testing first for a system
version if BRLCAD_BUNDLED_LIBS is also AUTO.
Aliases: ENABLE_TCL
*** Note - Do not add or edit configuration option descriptions and alias
lists in this file - those entries are auto-generated from information in
the toplevel CMakeLists.txt file and src/other/CMakeLists.txt - any changes
should be made in those files. The CMake configuration process will
automatically re-generate INSTALL with the new descriptions and alias
information.
+3677
View File
File diff suppressed because it is too large. Load diff
+504 -10
View File
@@ -10,10 +10,503 @@ descriptive text that emphasizes or further describes significant
changes made. See document footer for additional details.
----------------------------------------------------------------------
--- 202X-XX-XX Release 7.XX.X ---
--- 20XX-XX-XX Release 7.46.0 ---
----------------------------------------------------------------------
* updated dbconcat to use prefix/suffix str for conflicts - Cliff Yapp
* improved pixscale & bwscale scaling and image piping - Sean Morrison
* restored pixdiff behavior on .pix, added -b for .bw - Sean Morrison
* updated MGED and Archer for Tcl 8.6.18 and Itcl/Itk 4 - Cliff Yapp
* fixed writes to fileless geometry databases - Cliff Yapp
* fixed nastran-g handling of large property IDs - Rupesh, Cliff Yapp
* fixed dxf-g invalid polyface index crashes - Meghna45-code, Cliff Yapp
* fixed Archer primitive editors under Itcl 4 - Cliff Yapp
* fixed Archer shutdown menu cleanup errors - Cliff Yapp
* fixed MGED Build Pattern dialog under Itcl 4 - Cliff Yapp
* fixed TclCAD framebuffer listing and deletion - Cliff Yapp
* fixed MGED Build Pattern progress updates - Cliff Yapp
* fixed MGED search -exec reentry and Ctrl-C crashes - Cliff Yapp
* fixed MGED asynchronous commands and clone progress - Cliff Yapp
* accelerated large and repeated MGED path drawing - Cliff Yapp
* fixed ARB7 inside solid construction - Cliff Yapp
* fixed direct ARB face and edge-direction editing - Cliff Yapp
* fixed rtwizard startup with framebuffer contention - Cliff Yapp
* fixed Archer annotation line display updates - Cliff Yapp
* fixed Archer sketch scale drift in non-mm databases - Cliff Yapp
* fixed toggle arrow callbacks during setup - Cliff Yapp
* fixed Tcl dialogs with multi-word titles and messages - Cliff Yapp
* fixed Archer Tank Wizard gun generation - Cliff Yapp
* fixed MGED and Archer sketch arc tangency editing - Cliff Yapp
* fixed Archer ARB4 point 3 editing - Cliff Yapp
* fixed ARB4 storage from make and mk_arb4 - Cliff Yapp
* fixed ARB4 and ARB6 center point calculations - Cliff Yapp
* fixed concurrent MGED and rtwizard framebuffer use - Cliff Yapp
* fixed MGED ShotVis editing and reload failures - Cliff Yapp
* fixed Tcl widget geometry and selection defects - Cliff Yapp
* fixed MGED BoT editor property handling - Cliff Yapp
* fixed MGED LOD dialog and adaptive BoT wireframes - Cliff Yapp
* fixed MGED Plot, PostScript, and manual launch tools - Cliff Yapp
* fixed MGED Overlap Tool multi-object result handling - Cliff Yapp
* eliminated 16-fold redundant gchecker grid analysis - Cliff Yapp
* fixed Archer tree handling for object names with spaces - Cliff Yapp
* fixed RtWizard multi-object edge occlusion handling - Cliff Yapp
* fixed RtWizard title, About, and preference handling - Cliff Yapp
* fixed MGED startup file false legacy-syntax warnings - Cliff Yapp
* fixed MGED saved-view deletion and collaboration sync - Cliff Yapp
* fixed MGED font preferences apply and persistence - Cliff Yapp
* fixed Archer combination edits changing Boolean trees - Cliff Yapp
* fixed Archer command-line help startup crash - Cliff Yapp
* fixed MGED Geometry Browser menu and close behavior - Cliff Yapp
* fixed MGED collaboration view unshare crash - Cliff Yapp
* added an override for Archer's preference file location - Cliff Yapp
* fixed embedded Archer display and mode menus - Cliff Yapp
* added Archer -h and --help command-line options - Cliff Yapp
* fixed Archer Help opening the documentation menu - Sean Morrison
* added arrange nest command for packing database objects - Sean Morrison
* new mkbuilding tool for parametric/OSM/CityJSON models - Sean Morrison
* cross-platform BINUNIF and DSP byte-order handling - Sean Morrison
* improved several cv default behaviors (s, 32, 64, n) - Sean Morrison
* fixed invalid bot handling bug applying matrices - Sean Morrison
* improved glTF import robustness via gcv - Sean Morrison
* fixed bot dump glTF/GLB export; -F is now rejected - Cliff Yapp
* faster NMG solid ray tracing (10-20x faster) - Sean Morrison
* preserved primitive colors in shaded BoT and B-Rep drawing - Cliff Yapp
* preserved B-Rep attributes through in-place geometry edits - Cliff Yapp
* fixed gcv filter arguments containing one-character values - Cliff Yapp
* improved iges-g importer robustness - Cliff Yapp
* expanded g-iges native CSG and B-Rep export support - Cliff Yapp
* added IGES import and export support to gcv - Cliff Yapp
* rt -b query option now supports a single value index - Sean Morrison
* fixed .dpix file format portability and icv support - Sean Morrison
* expanded pixscale support for piped image data - Sean Morrison
* fixed HYP volume and ARBN totals reported by analyze - Cliff Yapp
* corrected rtarea sampling and exposed-area calculations - Cliff Yapp
* bot split now groups results and preserves mesh data - Cliff Yapp
* bot decimate now preserves normals, UVs, and plate data - Cliff Yapp
* added raytracing support for annotation objects - Cliff Yapp
* fixed MGED X embedded framebuffer display manager crash - Cliff Yapp
* added annotate command for managing annotation objects - Cliff Yapp
* added repair command for supported invalid primitives - Cliff Yapp
* changed default new-region material code from 1 to 0 - Keith Bowman
* added comb support to bb -o oriented bounding boxes - Cliff Yapp
* added -t tight bounding box option to bb command - Cliff Yapp
* added az (-a) and el (-e) option implementations to gqa - Cliff Yapp
* added center command support for centering on an object - Cliff Yapp
* greatly expanded JT import and added basic JT export - Sean Morrison
* added csg-g/g-scad OpenSCAD CSG importer/exporter - Erik Greenwald
* improved art light, color, output, & region handling - Sean Morrison
* added preliminary OpenSCAD import support - Sean Morrison
* expanded IGES BREP/NURBS import and export support - Sean Morrison
* expanded STEP AP203 import support with faceted BREP - Sean Morrison
* added STEP AP203e2, AP214, and AP242 import/export - Cliff Yapp
* added STEP CSG round trips and AP242 PMI import - Cliff Yapp
* improved STEP assembly, topology repair, and reporting - Cliff Yapp
* new adrt CLI utility with path, spall, and cut modes - Sean Morrison
* new CLI+GUI prototype BRL-CAD application launcher - Sean Morrison
* added option validation to image & framebuffer tools - Sean Morrison
* added contributor, API, command, & raytracing guides - Sean Morrison
* added and updated command and library manual pages - Sean Morrison
* added parashot gravity trajectory path generator - Sean Morrison
* added metaball point scaling (via metaball_move_pnt) - Sean Morrison
* all raytracing apps now report object prep failures - Sean Morrison
* improved fast4-g robustness and error reporting - Cliff Yapp
* improved robustness of g-vrml plate mode handling - Cliff Yapp
* fixed MGED ARB5 point, pipe, and sketch editing - Cliff Yapp
* added pnts write -f xyz export option - Chris McGregor
* added support for tick drawing on MGED model axis - Cliff Yapp
* added naca456 left and paired wing generation - Cliff Yapp
* added patch-g -j option, specify object thicknesses - Sean Morrison
* fixed fbcolor color ramp bug drawing the last color - Sean Morrison
* fixed gist -Q quick preview option - Sean Morrison
* rt preserves eye_pt setting in command scripts - Sean Morrison
* rt -l8 heat graphs now measure CPU time - Sean Morrison
* documented gqa centroid & moments of inertia options - Sean Morrison
* pixdiff now calculates pixel differences on bw files - Sean Morrison
* fixed bwcrop single-axis crops and pixembed edge fill - Sean Morrison
* fixed isize in non-mm databases - Josh Baker
* fixed metaball adjust clearing points on errors - Sean Morrison
* fixed benchmark+pixcmp correctness validation bug - Sean Morrison
* fbhelp writes help to stdout and rest to stderr - Sean Morrison
* FB now supports /dev/stdout and /dev/stderr devices - Sean Morrison
* fixed mged rt -C + -o background color to file bug - Sean Morrison
* fixed rt -C255/0/0 -o file.pix background color bug - Sean Morrison
* added rtsil foreground & background -c set options - Sean Morrison
* added rtsil -o support for bw output - Sean Morrison
* added cutting plane animation generation to rtwizard - Cliff Yapp
* fixed pixdiff bug on Windows - Sean Morrison
* fixed MGED startup window placement on Windows - Chris McGregor
* fixed pixborder utility right-side edge bug - Sean Morrison
* fixed 'wavelet' image processing tool on Windows - Sean Morrison
* quieted mged killtree spurious lookup failure output - Sean Morrison
* fixed ray tracing small images to disk framebuffers - Sean Morrison
* improved raytracing performance of CSG-heavy regions - Sean Morrison
* fixed OBJ conversion bug importing unnamed groups - Sean Morrison
* fixed k-g conversion of BoT vertex normals - laithaldaeef
* new doc guide, a visual overview of BRL-CAD objects - Sean Morrison
* improved triangle quality produced by bot remesh - Cliff Yapp
* updated numerous manpage command references - Josh Baker
* fixed submodel paths relative to parent databases - Sean Morrison
* improved performance making huge combinations - Sean Morrison
* added make -t primitive type listing - Chris McGregor
* added gcv import conversion support for vrml/wrl 1.0 - Sean Morrison
* fixed gcv appending to existing geometry databases - Sean Morrison
* added CSS names, hex, HSL/HSV to libbu color parsing - Sean Morrison
* improved OpenNURBS B-Rep import and adjustment safety - Cliff Yapp
* improved Debian application menus and MIME associations - Jordi Sayol
* updated Clipper2 dependency to v1.5.4 - Cliff Yapp
* updated Eigen dependency to v5.0.1 - Cliff Yapp
* updated GDAL dependency to v3.13.3 - Cliff Yapp
* updated GeometricTools dependency to v8.2 - Cliff Yapp
* updated Itk dependency to v4.2.7 - Cliff Yapp
* updated LMDB dependency to v1.0.1 - Cliff Yapp
* updated Manifold dependency to v3.5.3 - Cliff Yapp
* updated OpenCV dependency to v5.0.0 - Cliff Yapp
* updated OpenNURBS dependency to v8.34.26223.11001 - Cliff Yapp
* updated PROJ dependency to v9.8.1 - Cliff Yapp
* updated PoissonRecon dependency to v18.75 - Cliff Yapp
* updated Tcl/Tk dependency to v8.6.18, using bundled Itcl - Cliff Yapp
* updated libjpeg-turbo dependency to v3.2.0 - Cliff Yapp
* updated libosmesa dependency to SHA1 bfa90de - Cliff Yapp
* updated libpng dependency to v1.6.58 - Cliff Yapp
* updated libtiff dependency to v4.7.2 - Cliff Yapp
* updated netpbm dependency to v10.86.50 - Cliff Yapp
* updated oneTBB dependency to v2023.1.0 - Cliff Yapp
* updated pugixml dependency to v1.16 - Cliff Yapp
* updated sqlite3 dependency to v3.53.4 - Cliff Yapp
* updated stepcode dependency to SHA1 ed686ee1d - Cliff Yapp
* updated tinygltf dependency to v3.0.1 - Cliff Yapp
* updated zlib dependency to v1.3.2 - Cliff Yapp
----------------------------------------------------------------------
--- 2026-07-23 Release 7.44.0 ---
----------------------------------------------------------------------
This release expands geometry processing, conversion, and rendering
capabilities including a new proximity search 'near' command, ARB
repair, BoT exterior extraction, Cauchy-Crofton validation in lint,
and more reliable facetization pipeline. Ray tracers now auto-select
a default object or report available top-levels when none is named.
Rendering advancements include perspective edge rendering, timing heat
maps, PNTS ray tracing, and faster opaque and lighting-heavy renders.
GCV adds preliminary import support for VTK ASCII, X3D BREP/NURBS, and
JT import support, while OBJ preserves material colors. Procedural
tools now generate shells, gears, lattices, terrain, propellers,
wings, trees, and parameterized tires with tread presets.
MGED gains full-text doc searching and more robust command I/O; gist
1-page reports are more informative; and ICV adds richer reporting,
animation, comparison, and image metadata features. DocBook
documentation was converted to AsciiDoc, adding over 220 manual pages
and extensively improving existing docs.
* fixed search -exec infinite looping with creations - Chris McGregor
* fixed NOCOS mode plate mode bot creation - Meghna45-code
* fixed search -exec multithreaded output - Cliff Yapp, Chris McGregor
* improved as2g importing speed for large inputs - Cliff Yapp
* gist pages now include file size in header - Sean Morrison
* added preliminary support for mirroring brep objects - Sean Morrison
* fixed dbupgrade corruption of RHC entities - Sean Morrison
* fixed archer bug opening database named same as cmd - Sean Morrison
* fixed mged bug where pasted text captured by prompt - Sean Morrison
* added -k/-K manpage full text keyword search options - Sean Morrison
* rm ged command now behaves like the system rm, kills objects&paths
- Cliff Yapp, Sean Morrison
* fixed gqa exactly symmetric volumetric estimates - Sean Morrison
* added support to rtedge for perspective renderings - Sean Morrison
* rt -l8 rendering time heat graphs - Stephen Kennedy, Sean Morrison
* added 'icv anim' for APNG and MJPEG animation files - Clifford Yapp
* added BREP/NURBS import support to gcv x3d importer - Sean Morrison
* added BRL-CAD Taxonomy article on naming conventions - Sean Morrison
* added new documentation on adrt rendering - Sean Morrison
* added snail & seashell procedural geometry generator - Sean Morrison
* additional 3D geometry model examples - Csanyi Pal, Lee Butler
* fixed fbgamma bug specifying three channel values - Sean Morrison
* fixed fbgrid -o old grid mode uninitialized data bug - Sean Morrison
* added gcv import support for VTK's ascii file format - Sean Morrison
* improved ray tracing performance on opaque objects - Sean Morrison
* expanded autoview command with support for objects - Sean Morrison
* added new rt -c "autoview object1 object2" option - Sean Morrison
* killall no longer outputs kill lookup failures - Sean Morrison
* added new manual pages for over 30 tools & utilities - Sean Morrison
* fixed mged/rt/gui apps on Mac w/ ogl device windows - Sean Morrison
* modified gist long title printing to maximally fit - Sean Morrison
* fixed gist hierarchy bug with matrix on top subcombs - Sean Morrison
* modified gist hierarchy summary to include counts - Sean Morrison
* gist hierarchy no longer displays air as black boxes - Sean Morrison
* added get/put/adjust/g2asc support for datum objects - Sean Morrison
* added gcv & g-obj color .mtl material export support - Sean Morrison
* improved DSP raytrace consistency, robustness, & speed - Cliff Yapp
* added arb repair command to fix various ARB8 issues - Cliff Yapp
* fixed convex hull tolerance handling for thin shapes - Cliff Yapp
* fixed vdeck truncating/overflowing long region names - Sean Morrison
* fixed rtweight nan centroid for zero-density regions - Sean Morrison
* fixed rt -l7 photon mapping-based rendering crashes - Sean Morrison
* fixed mged instability/crash after mged help command - Sean Morrison
* new mged 'near' command to find proximity objects - Sean Morrison
* fixed sketch/view polygon coordinate offsets - Cliff Yapp
* added new manual pages for over 110 GED commands - Sean Morrison
* improved facetize tolerance and coplanar face handling - Cliff Yapp
* added support for alternate plane forms to rt -k option - Cliff Yapp
* improved ~85 manual page synopses, docs, & examples - Sean Morrison
* fixed bug in gqa material object lookup - Cliff Yapp
* fixed bug in rtweight material object lookup - Cliff Yapp
* added support for writing out .jpg files to libicv/rt - Cliff Yapp
* converted DocBook documentation files to AsciiDoc - Cliff Yapp
* added MGED Pattern GUI patterns to clone command - Cliff Yapp
* improved performance of search cmd's -above option - Cliff Yapp
* added -d depth limit to npush cmd, improved robustness - Cliff Yapp
* address race condition with bu_nsemaphores in libbu - Cliff Yapp
* fixed potential DSP corner case rendering crash - Cliff Yapp
* fixed multithreaded crashing with noise-using shaders - Cliff Yapp
* corrected the exposed region count report in rtarea - Cliff Yapp
* fixed icv support for RLE image format - Cliff Yapp
* added similarity grouping identification mode to gdiff - Cliff Yapp
* added preliminary JT mesh import support to gcv - Sean Morrison
* improved gcv asc v5 reader to handle brep input - Cliff Yapp
* improved DSP primitive's default facetize behavior - Cliff Yapp
* fixed gcv appending to existing databases - Sean Morrison
* improved NMG->bot conv speed for all triangle case - Cliff Yapp
* added SPSR meshing support to the pnts command - Cliff Yapp
* rt tools auto-select an object when none is given - Sean Morrison
* added metadata-aware image diff & nirt analysis - Cliff Yapp
* added basic PNTS point-cloud ray tracing - Sean Morrison
* improved nirt behavior in Windows bash consoles - Cliff Yapp
* added g2asc/asc2g support for PNTS, DSP, and EBM - Sean Morrison
* updated gct mesh decimation dependency to mmesh - Cliff Yapp
* added procedural wing, propeller & tree generators - Cliff Yapp
* added ISO tire dimensions & named tread presets - Cliff Yapp
* added specimen, terrain, & voxelize proc-db tools - Sean Morrison
* added gear, helicoil, lattice, loftwing proc-db - Sean Morrison
* added authenticated IPC/TLS to fbserv & remrt/rtsrv - Cliff Yapp
* improved rtwizard concurrency & remrt on Windows - Cliff Yapp
* added simplification control options to bot extrude - Cliff Yapp
* added bot exterior subcommand - Cliff Yapp
* fixed 'search -type sph' not returning sph's - Chris McGregor
* fixed gist crashing with bad/unknown units - Chris McGregor
* add gist '-d' to allow user-specified density file - Chris McGregor
* added Cauchy-Crofton area/volume & lint validation - Cliff Yapp
* updated geogram dependency from v1.9.0 to v1.9.6 - Cliff Yapp
* updated Manifold dependency from v2.5.1 to v3.2.1 - Cliff Yapp
* updated SPSR dependency from v16.10 to v18.74 - Cliff Yapp
* updated Embree dependency from v4.3.2 to v4.4.1 - Sean Morrison
* updated ISPC dependency from v1.24.0 to v1.30.0 - Sean Morrison
* updated oneTBB dependency from v2021.12.0 to v2023.0.0 - Sean Morrison
* updated OSPRay dependency from v3.1.0 to v3.2.0 - Sean Morrison
* updated rkcommon dependency from v1.13.0 to v1.15.2 - Sean Morrison
* updated LIEF dependency from v0.15.1 to v0.17.6 - Cliff Yapp
* updated Qt dependency from v6.10.2 to v6.11.1 - Cliff Yapp
* added Bullet dependency v3.27 - Cliff Yapp
----------------------------------------------------------------------
--- 2026-03-13 Release 7.42.2 ---
----------------------------------------------------------------------
Follow-on patch release to 7.42.0 correcting a couple of corner case
BoT raytracing behaviors, incorporating behaviorial fixes for a number
of commands, updating dependencies, and various documentation updates.
* fixed BoT crash when invalid data present - Chris McGregor
* updated stepcode to upstream SHA1 74b6fe4 - Cliff Yapp
* replaced yedit with brledit as libbu fallback editor - Cliff Yapp
* updated libtiff dependency to v4.7.1 - Cliff Yapp
* updated OpenCV dependency to v4.13.0 - Cliff Yapp
* updated PUGIXML dependency to v1.15 - Cliff Yapp
* updated LMDB dependency to v0.9.35 - Cliff Yapp
* updated libjpeg-turbo dependency to v3.1.3 - Cliff Yapp
* updated sqlite dependency to v3.51.2 - Cliff Yapp
* updated assimp dependency to v6.0.4 - Cliff Yapp
* updated GDAL dependency to v3.12.1 - Cliff Yapp
* updated PROJ dependency to v9.7.1 - Cliff Yapp
* updated libpng dependency to v1.6.54 - Cliff Yapp
* improved get/adjust/attr help text - Josh Baker
* created manpage for 'adjust' command - Josh Baker
* improved 'B' manpage options and usage - Josh Baker
* improved 'voxelize' manpage usage and examples - Josh Baker
* improved 'draw' manpage options and usage - Josh Baker
* improved 'get' manpage - Josh Baker
* improved 'view' manpage options, usage, and examples - Josh Baker
* improved 'gqa' command usage and help text - Josh Baker
* corrected various manpage typos and spacing - Josh Baker
* fixed open cmd reporting when database not open - Cliff Yapp
* updated g2asc to exit if input file == output file - Cliff Yapp
* updated asc2g to exit if input file == output file - Cliff Yapp
* fixed default file-create behavior of open command - Cliff Yapp
* fixed bot -h crash when database not open - Cliff Yapp
* fixed libged nirt cmd -c backout option support - Cliff Yapp
* fixed bot subcmd help printing - Cliff Yapp
* corrected BoT shotline behavior when starting ray pt in mesh
- Sean Morrison Chris McGregor Cliff Yapp
* fixed gist never returning on some models - Chris McGregor
* improved gist weight gathering speed and accuracy - Chris McGregor
----------------------------------------------------------------------
--- 2025-08-11 Release 7.42.0 ---
----------------------------------------------------------------------
Polygonal BoT ray tracing is now dramatically faster. Integration of
a new spatial partition acceleration method (HLBVH) into librt's BoT
ray tracing pipeline yields substantial speedups, better multicore
scaling, and reduced memory overhead across all BRL-CAD ray tracing of
scenes with BoTs. In general, new overall performence is typicaly in
the 2-25x range depending on the model, scene, and other factors. The
culmination of many efforts, the improvement was verified, validated,
and performance tested against numerous real and test models to
confirm gains and assert correctness. As a result, users no longer
need to tune TIE or ADRT-specific settings as both are fully obsoleted
and replaced.
This release expands Arbitrary Polyhedron support with 8 vertices
(i.e., ARB8-only, not ARB7/6/5/4) to include concave definitions.
Surfaces must (still) be planar and not self-intersect, but polyhedral
edges creating concavities are now supported for ray tracing.
MGED's nirt command use of .mgedrc qray settings was restored, which
affects output styling (e.g., showing/hiding attributes). To restore
default behavior, delete .mgedrc in your home directory or remove
existing qray settings manually.
* increased app parallelism ceiling to 4096 threads - Sean Morrison
* removed obsolete nirt -T BoT spatial partition option - Cliff Yapp
* added support for concave arb8 primitive definitions - Sean Morrison
* added example geometry model showcasing all types - Mitchell Roberts
* fixed mged crash when switching databases after rt - Sean Morrison
* mitigated multithreading contention on >32 core cpus - Sean Morrison
* clarified material_name not found warning in rtweight - Cliff Yapp
* fixed stat command crash with invalid path specifiers - Cliff Yapp
* improved search std attr table in man page - Cliff Yapp
* updated MGED nirt man page to reference cmdline version - Cliff Yapp
* fixed raytracing crash with empty BoT solid in tree - Cliff Yapp
* cleaned up nirt -L format listing output - Cliff Yapp
* fixed MGED nirt command's use of .mgedrc qray formats - Cliff Yapp
* improved MGED nirt cmd handling for large object lists - Cliff Yapp
* removed requirement to launch nirt with objects listed - Cliff Yapp
* improved k-g LS-DYNA keyword file geometry importer - Ali Haydar
* added bot support for plate mode thickness get/set cmds - Cliff Yapp
* fixed dbconcat treatment of a '/' prefix character - Cliff Yapp
* fixed bb '-o' oriented bounding box option in MGED - Chris McGregor
* added manual page for pixcmp, bwish, btclsh - Sean Morrison
* fixed "ted" text edit and "make_pnts" GED commands - Cliff Yapp
* renamed MGED x command to solid_report for clarity - Sean Morrison
* fixed Archer "Center View" button and vslew GED command - Cliff Yapp
* added support for console text editing on Windows - Cliff Yapp
* added bb '-m' option for outputting midpoint - Chris McGregor
* fixed sed crash when editing a brep object in MGED - Cliff Yapp
* fixed primitive & matrix edit GUIs in MGED ("x -1") - Sean Morrison
* added (align, dir and print) subcommands to 'view' - Chris McGregor
* added (autoview, lookat, saveview) to 'view' - Chris McGregor
* fixed mged 'process' command on read-only databases - Sean Morrison
* replaced ADRT with HLBVH-acclerated BoT tracing - Timothy Reynolds
* accelerated BoT ray tracing HLBVH integration across all librt apps
- Timothy Reynolds, Connor McLean, Ian Beckett, Samuel Reed,
- Gaultier Debarre, Sean Morrison, Chris McGregor, Cliff Yapp
* various manpage and help text updates - Josh Baker
* fixed -exec behavior with 'flat' search in mged - Chris McGregor
* improved logging behavior from multiple threads - Kenneth Davis
* removed libgdiam dependency - Chris McGregor
* updated strclear dependency to latest bsd upstream - Cliff Yapp
* updated Assimp to v5.4.3, with patch for CVE-2025-2151 - Cliff Yapp
* updated OpenNURBS dependency to v8.10.24228.13001 - Cliff Yapp
* updated GeometricTools dependency to 7adae93f8 - Cliff Yapp
* updated GDAL dependency to v3.9.2 - Cliff Yapp
* updated PROJ dependency to v9.5.0 - Cliff Yapp
* updated SQLite dependency to v3.46.1 - Cliff Yapp
* updated lmdb dependency to 9c9d345 - Cliff Yapp
* updated libtiff dependency to v4.7.0 - Cliff Yapp
* updated netpbm dependency to v10.86.42 - Cliff Yapp
* updated LIEF dependency to v0.15.1 - Cliff Yapp
* updated libpng dependency to v1.6.44 - Cliff Yapp
----------------------------------------------------------------------
--- 2024-09-24 Release 7.40.2 ---
----------------------------------------------------------------------
* various manpage and help text updates - Josh Baker
* improved gist -F default behavior - Chris McGregor
* fixed gist crashing with halfspaces in component - Chris McGregor
* fixed lint BoT check testing - Cliff Yapp
* improved overlap checker dialog behavior - Chris McGregor
* fixed rtwizard tree visuals in gist - Chris McGregor
----------------------------------------------------------------------
--- 2024-08-16 Release 7.40.0 ---
----------------------------------------------------------------------
This major release of BRL-CAD improves the robustness of the facetize
command. Building on work begun in 7.38.0, for the first time BRL-CAD
is able to successfully facetize all of BRL-CAD's example geometries.
This involves a major change to the processing pipeline of the
facetize command, allowing handling of individual primitives to be
fault tolerant and automatically attempting fallback methods.
Historically BRL-CAD facetize has attempted to produce output meshes
even when individual operations fail by silently skipping over failing
inputs, but now this behavior is changed to a stricter policy of
halting when individual elements of the process do not succeed.
This release also incorporates the tool 'gist' for generating a one
page graphical overview and summary of the contents of a .g database.
This tool is the culmination of work by multiple student teams from
Texas A&M University and incorporates automatic layout features to
produce geometry-appropriate visual arrangements.
Also new in this release are capabilities for testing and repairing
triangle meshes. The lint command will now validate solid BoT
behavior with the raytracer, and the 'bot repair' command is able to
perform hole filling operations on some categories of non-manifold
BoTs. Another related new feature allows users to generate explicit
volumetric BoTs using plate mode BoTs as inputs via the 'bot extrude'
command.
This release introduces a major change in the management of 3rd party
dependencies. The src/other directory has been replaced by an
external repository specifically tasked with the job of managing 3rd
party libraries. By default BRL-CAD will download and build necessary
dependencies as part of its build automatically. However, note that
an internet connection is required by default to access this
repository. See the INSTALL file for more details and options for
preparing to build without internet availability.
Developers requiring only a subset of BRL-CAD (for example, if a
project only needs librt and its dependencies) can now define subsets
of BRL-CAD to build with the BRLCAD_COMPONENTS variable. See INSTALL
for more information.
* added new k-g LS-DYNA .k file to .g importer - Daniel Roßberg
* improved obj-g import naming - Chris McGregor
* added importer attr to stl-g and obj-g BoT objects - Cliff Yapp
* improved object name generation for stl-g importer - Cliff Yapp
* updated 3dm-g input attribute: converter -> importer - Cliff Yapp
* fixed mged 'search -or' filter behavior - Cliff Yapp, Chris McGregor
* major improvements to 'gist' features and usability
- Rohan Dhawan, Leo Feng, Sam Hollenbeck, Timothy Pham,
- Yida Zou, Chris McGregor
* updated pinewood.g test model - Josh Baker
* updated edcodes man page and help text - Josh Baker
* update mvall man page - Josh Baker
* updated OpenCV library to version 4.10.0 - Cliff Yapp
* updated GDAL library to version 3.9.0 - Cliff Yapp
* improved 3dm-g error message when file does not exist - Cliff Yapp
* added new BoT raytracing validity checks to lint cmd - Cliff Yapp
* removed upper limit on MGED pnts cmd point count - Cliff Yapp
* added a -t option to bot flip to check BoT orientation - Cliff Yapp
* fixed shaded drawing of CW BoT solids - Cliff Yapp
* added reair man page - Josh Baker
* added 'help reair' mged command help text - Josh Baker
* added experimental 'imgdiff' command-line tool - Cliff Yapp
* updated OpenNURBS library to version 8.8.24166.15000 - Cliff Yapp
* improved 'help lc' mged command help text - Josh Baker
* added 'help lint' mged command help text - Josh Baker
* added man pages for 'bot check' and 'bot extrude' cmds - Cliff Yapp
* enhanced bot extrude command to output a BoT mesh - Cliff Yapp
* added bot check manifold cmd for bot validity testing - Cliff Yapp
* added bot repair command for filling holes in meshes - Cliff Yapp
* added Utah RLE image reading and writing to libicv - Cliff Yapp
* added "standardize" option to GED attr command - Cliff Yapp
* added -L option to dbconcat for lazy prefix/suffix use - Cliff Yapp
----------------------------------------------------------------------
@@ -146,7 +639,8 @@ Lastly, the "smooth" command will smooth the BoT's topology.
* fixed nirt -f (fmt) to work within MGED - Chris McGregor
* fixed nirt of objects with hyphens in name - Chris McGregor
* correct facetall.sh to automatically restart on failure - Cliff Yapp
* updated nirt to backout of geometry by default - Chris McGregor
* added nirt -c flag to use view center, not backout - Chris McGregor
----------------------------------------------------------------------
--- 2022-11-23 Release 7.34.0 ---
@@ -168,7 +662,7 @@ the stage for the aforementioned major feature developments.
* removed 'nburst' rewrite with burst now deprecated - Cliff Yapp
* fixed bot_merge with oriented plate mode bots - Sean Morrison
* bot_dump infers output type from filename extension - Sean Morrison
* readded MGED viewring, sweep, collab, & rateknob menus - Cliff Yapp
* re-added MGED viewring, sweep, collab, & rateknob menus - Cliff Yapp
* fixed a crash when shaded NURBS brep drawing fails - Cliff Yapp
* added new man pages for brep, process, and ps commands - Cliff Yapp
* added new man page for 3dm-g Rhino3D importer - Cliff Yapp
@@ -349,7 +843,7 @@ infrastructure with BRL-CAD's imminent migration to Git.
* improved behavior of MGED overlap checker GUI - Nick Reed
* fixed startup dimensions of overlap checker window - Nick Reed
* fixed rtedge line drawing color when using -W flag - Cliff Yapp
* added -F option to lint cmd to test specifc solid types - Cliff Yapp
* added -F option to lint cmd to test specific solid types - Cliff Yapp
* added support to MGED for zooming with mouse wheel - Cliff Yapp
* fixed solid editing wireframe drawing in MGED - Nick Reed
* added .r suffixes to region names in 3dm-g conversion - Cliff Yapp
@@ -686,7 +1180,7 @@ performance ray tracing pipeline.
* improved datum wireframes (yellow) and fixed arrowheads - Cliff Yapp
* added initial manual page for 'burst' ray dispatch tool - Cliff Yapp
* improved wireframe display list performance - Keith Bowman
* added draw -S for simplied wireframes, no subtractions - Cliff Yapp
* added draw -S for simplified wireframes, no subtractions - Cliff Yapp
* added draw -L# to draw bounding boxes for large objects - Cliff Yapp
* added 3dm-g instance reference and definition import - Jon Engbert
* minor rtwizard graphical user interface reorganization - Cliff Yapp
@@ -910,7 +1404,7 @@ tracing infrastructure including CPU thread affinity locking for
faster performance, more consistent grazing hit behavior, expanded
volume and surface area calculations, numerous bug fixes, and more
robust NURBS evaluation. Following BRL-CAD's interface deprecation
policy (see CHANGES file), the Jove text editor is no longer being
policy (see CHANGES.adoc), the Jove text editor is no longer being
bundled. Numerous converters receive robustness improvements
including the STEP, Patch, and 3DM importers.
@@ -1587,7 +2081,7 @@ undo support and graphical editing, are expanded upon.
* pipe now validates independent of parameter order - Daniel Roßberg
* added '-r' color randomize option to 3dm-g importer - Cliff Yapp
* enhanced '-v' verbosity option in 3dm-g importer - Cliff Yapp
* readded -A & -o attribute options to 'draw' and 'erase' - Bob Parker
* re-added -A & -o attribute options to 'draw' and 'erase' - Bob Parker
* fixed bug in 'E' command to show object names - John Anderson
* initial obj-g geometry importer - Erik Greenwald
* Pro/E export plugin creates a 'Proe_Name' attribute - Bob Parker
@@ -3259,8 +3753,8 @@ future. For those situations, developers using the BRL-CAD libraries
may need to update to new API features in order to link with newer
versions of BRL-CAD.
See the CHANGES file for a transcript of features that are deprecated
or have already become obsolete.
See doc/changes/deprecated.adoc and doc/changes/obsoleted.adoc for
features that are deprecated or have already become obsolete.
---
See doc/history.txt for more historic information on BRL-CAD. There
+3 -3
View File
@@ -1,6 +1,6 @@
BRL-CAD
Release 7.38.2
http://brlcad.org/
BRL-CAD
Release 7.44.2
http://brlcad.org/
BRL-CAD is a powerful cross-platform open source combinatorial
solid modeling system that includes an interactive 3D solid geometry
+412 -533
View File
File diff suppressed because it is too large. Load diff
+66 -51
View File
@@ -1,87 +1,102 @@
add_subdirectory(ref)
include_directories(${BU_INCLUDE_DIRS})
add_definitions(-DCONSOLE)
BRLCAD_ADDEXEC(pixcmp pixcmp.c libbu)
set(BARK_SOURCES
benchmark.c
compute.c
run.c
clean.c
brlcad_addexec(pixcmp pixcmp.c libbu)
brlcad_add_test(
NAME bench_pixcmp_tolerance
COMMAND
${CMAKE_COMMAND} "-DPIXCMP=$<TARGET_FILE:pixcmp>" "-DTEST_DIR=${CMAKE_CURRENT_BINARY_DIR}"
-P "${CMAKE_CURRENT_SOURCE_DIR}/pixcmp_test.cmake"
)
BRLCAD_ADDEXEC(bark "${BARK_SOURCES}" libbu NO_STRICT NO_INSTALL TEST_USESDATA)
set(BARK_SOURCES benchmark.c compute.c run.c clean.c)
brlcad_addexec(bark "${BARK_SOURCES}" "libbu;${M_LIBRARY}" NO_STRICT NO_INSTALL TEST_USESDATA)
configure_file(run.sh "${CMAKE_CURRENT_BINARY_DIR}/benchmark" COPYONLY)
install(PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/benchmark" DESTINATION ${BIN_DIR})
DISTCLEAN("${CMAKE_CURRENT_BINARY_DIR}/benchmark")
if(BUILD_TESTING)
configure_file(run.sh "${CMAKE_CURRENT_BINARY_DIR}/benchmark" COPYONLY)
install(PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/benchmark" DESTINATION ${BIN_DIR})
endif(BUILD_TESTING)
distclean("${CMAKE_CURRENT_BINARY_DIR}/benchmark")
# TODO - with CMake 3.20, add_custom_command supports generator expressions in
# OUTPUT, so once we can require that version we should look at retiring this
# use of CMAKE_CFG_INTDIR
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/benchmark-${CMAKE_CFG_INTDIR}-done
COMMAND "${CMAKE_COMMAND}" -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/run.sh $<TARGET_FILE_DIR:bark>/benchmark
COMMAND "${CMAKE_COMMAND}" -E touch ${CMAKE_CURRENT_BINARY_DIR}/benchmark-${CMAKE_CFG_INTDIR}-done
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/run.sh
if(BUILD_TESTING)
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/benchmark-done
COMMAND "${CMAKE_COMMAND}" -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/run.sh $<TARGET_FILE_DIR:bark>/benchmark
COMMAND "${CMAKE_COMMAND}" -E touch ${CMAKE_CURRENT_BINARY_DIR}/benchmark-done
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/run.sh
)
add_custom_target(benchmark_cp ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/benchmark-${CMAKE_CFG_INTDIR}-done)
set_target_properties(benchmark_cp PROPERTIES FOLDER "Benchmark")
if(CMAKE_CONFIGURATION_TYPES)
foreach(CFG_TYPE ${CMAKE_CONFIGURATION_TYPES})
string(TOUPPER "${CFG_TYPE}" CFG_TYPE_UPPER)
DISTCLEAN(${CMAKE_BINARY_DIR_${CFG_TYPE_UPPER}}/${BIN_DIR}/benchmark)
endforeach(CFG_TYPE ${CMAKE_CONFIGURATION_TYPES})
else(CMAKE_CONFIGURATION_TYPES)
DISTCLEAN(${CMAKE_BINARY_DIR}/${BIN_DIR}/benchmark)
endif(CMAKE_CONFIGURATION_TYPES)
add_custom_target(benchmark_cp ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/benchmark-done)
set_target_properties(benchmark_cp PROPERTIES FOLDER "Benchmark")
endif(BUILD_TESTING)
distclean(${CMAKE_BINARY_DIR}/${BIN_DIR}/benchmark)
file(WRITE "${CMAKE_BINARY_DIR}/CMakeTmp/benchmsg.cmake" "message(\"---\")\n")
file(APPEND "${CMAKE_BINARY_DIR}/CMakeTmp/benchmsg.cmake" "message(\"Run 'make benchmark-clean' in the bench directory to delete the logic\")\n")
file(APPEND "${CMAKE_BINARY_DIR}/CMakeTmp/benchmsg.cmake" "message(\"and image files generated during the benchmark analysis.\")\n")
file(WRITE "${CMAKE_BINARY_DIR}/CMakeTmp/benchmsg.cmake" "message(\"---\")\n")
file(
APPEND
"${CMAKE_BINARY_DIR}/CMakeTmp/benchmsg.cmake"
"message(\"Run 'make benchmark-clean' in the bench directory to delete the logic\")\n"
)
file(
APPEND
"${CMAKE_BINARY_DIR}/CMakeTmp/benchmsg.cmake"
"message(\"and image files generated during the benchmark analysis.\")\n"
)
CMAKEFILES(
cmakefiles(
CMakeLists.txt
lgt.sh
pixcmp_test.cmake
run.sh
try.sh
viewdiff.sh
)
)
if(SH_EXEC AND TARGET m35.g)
if(SH_EXEC AND TARGET m35.g AND BUILD_TESTING)
# CTest enabled short run of the benchmark suite
BRLCAD_ADD_TEST(NAME benchmark COMMAND ${SH_EXEC} "$<TARGET_FILE_DIR:bark>/benchmark" run TIMEFRAME=1)
brlcad_add_test(NAME benchmark COMMAND ${SH_EXEC} "$<TARGET_FILE_DIR:bark>/benchmark" run TIMEFRAME=1)
set_tests_properties(benchmark PROPERTIES LABELS "Benchmark")
add_custom_target(benchmark-check
add_custom_target(
benchmark-check
COMMAND ${CMAKE_CTEST_COMMAND} -L Benchmark --output-on-failure
DEPENDS rt pixcmp BENCHMARK_PIX_cp PIX_LOG_cp benchmark_cp
)
add_dependencies(benchmark-check bldg391.g m35.g moss.g sphflake.g star.g world.g)
)
add_dependencies(
benchmark-check
bldg391.g
m35.g
moss.g
sphflake.g
star.g
world.g
)
set_target_properties(benchmark-check PROPERTIES FOLDER "Benchmark")
if(TARGET check)
add_dependencies(check benchmark-check)
endif(TARGET check)
# Full run of the benchmark suite
add_custom_target(benchmark
add_custom_target(
benchmark
COMMAND ${SH_EXEC} $<TARGET_FILE_DIR:bark>/benchmark run
COMMAND ${CMAKE_COMMAND} -P "${CMAKE_BINARY_DIR}/CMakeTmp/benchmsg.cmake"
DEPENDS rt pixcmp BENCHMARK_PIX_cp PIX_LOG_cp benchmark_cp
)
add_dependencies(benchmark bldg391.g m35.g moss.g sphflake.g star.g world.g)
)
add_dependencies(
benchmark
bldg391.g
m35.g
moss.g
sphflake.g
star.g
world.g
)
set_target_properties(benchmark PROPERTIES FOLDER "Benchmark")
# benchmark cleanup targets
add_custom_target(benchmark-clean
${SH_EXEC} ${CMAKE_BINARY_DIR}/bin/benchmark clean
)
add_custom_target(benchmark-clean ${SH_EXEC} ${CMAKE_BINARY_DIR}/bin/benchmark clean)
set_target_properties(benchmark-clean PROPERTIES FOLDER "Benchmark")
add_custom_target(benchmark-clobber
${SH_EXEC} ${CMAKE_BINARY_DIR}/bin/benchmark clobber
)
add_custom_target(benchmark-clobber ${SH_EXEC} ${CMAKE_BINARY_DIR}/bin/benchmark clobber)
set_target_properties(benchmark-clobber PROPERTIES FOLDER "Benchmark")
endif(SH_EXEC AND TARGET m35.g)
endif(SH_EXEC AND TARGET m35.g AND BUILD_TESTING)
# Local Variables:
# tab-width: 8
+8 -6
View File
@@ -1,7 +1,7 @@
/* B E N C H M A R K . C
* BRL-CAD
*
* Copyright (c) 2011-2024 United States Government as represented by
* Copyright (c) 2011-2026 United States Government as represented by
* the U.S. Army Research Laboratory.
*
* Redistribution and use in source and binary forms, with or without
@@ -67,7 +67,7 @@
int bu_exec(const char *program, void *data, struct bu_vls *out, struct bu_vls *err) {if (!program || !out || !err || !data) return 1; return 0;}
int bu_grep(const char *pattern, const char *input, int(*callback)(const char *line, void *data), void *data) {if (!pattern || !input || !data) return 1; if (!callback) bu_log("TODO: need default callback!!!\n"); return 0;}
int bu_file_glob(const char *pattern, char **paths) {if (!pattern || !paths) return 1; return 0;}
char *format_elapsed(double elapsed) {if (elapsed > 0) return "0 1 2"; return "-0 -1 -2";}
const char *format_elapsed(double elapsed) {if (elapsed > 0) return "0 1 2"; return "-0 -1 -2";}
int perf(const struct bu_vls *vp, const char *items, const char *args[]) {if (!vp || !items || !args) return -1; return 0;}
double calculate_vgr(const struct bu_vls *summary) {if (!summary) return -0.0; return 0.0;}
extern int bench(const char *cmd);
@@ -237,7 +237,7 @@ set_if_unset(void (*echo)(const char *, ...), void (*verbose)(const char *, ...)
}
setval = getenv(var);
echo("Using [%s] for %s\n", setval, var);
echo("Using [%s] for %s\n", setval ? setval : "", var);
}
@@ -562,7 +562,7 @@ main(int ac, char *av[])
{
int fd;
const char *logfile;
bu_vls_printf(&str, "run-%d-benchmark.log", bu_process_id());
bu_vls_printf(&str, "run-%d-benchmark.log", bu_pid());
logfile = bu_vls_addr(&str);
bu_setenv("LOGFILE", logfile, 1);
fd = open(logfile, O_WRONLY|O_CREAT, S_IRUSR | S_IWUSR);
@@ -589,6 +589,7 @@ main(int ac, char *av[])
{
struct bu_vls v = BU_VLS_INIT_ZERO;
char rfc2822[1024] = {0};
const char *logfile = getenv("LOGFILE");
#ifdef HAVE_SYS_UTSNAME_H
struct utsname n;
time_t t = time(NULL);
@@ -604,7 +605,7 @@ main(int ac, char *av[])
echo("B R L - C A D B E N C H M A R K\n");
echo("=================================\n");
echo("Running %s on %s\n", av[0], rfc2822);
echo("Logging output to %s\n", getenv("LOGFILE"));
echo("Logging output to %s\n", logfile ? logfile : "disabled");
echo("%s\n\n", bu_vls_addr(&v));
}
@@ -653,6 +654,7 @@ main(int ac, char *av[])
bu_setenv("PIX", bu_path_dirname(getenv("PIX")), 1);
}
const char *pix_env = getenv("PIX");
bu_vls_printf(&vp,
"%s "
"%s "
@@ -661,7 +663,7 @@ main(int ac, char *av[])
"%s/../../pix "
"%s/../../../pix "
"./pix",
getenv("PIX"), pix, thisp, thisp, thisp, thisp);
pix_env ? pix_env : "", pix, thisp, thisp, thisp, thisp);
bu_argv_from_string(argv, 32, bu_vls_addr(&vp));
look_for(verbose_echo, directory, "a benchmark reference log directory", "LOG", (const char **)argv);
bu_vls_trunc(&vp, 0);
+1 -1
View File
@@ -1,7 +1,7 @@
/* C L E A N . C
* BRL-CAD
*
* Copyright (c) 2011-2024 United States Government as represented by
* Copyright (c) 2011-2026 United States Government as represented by
* the U.S. Army Research Laboratory.
*
* Redistribution and use in source and binary forms, with or without
+1 -1
View File
@@ -1,7 +1,7 @@
/* C O M P U T E . C
* BRL-CAD
*
* Copyright (c) 2011-2024 United States Government as represented by
* Copyright (c) 2011-2026 United States Government as represented by
* the U.S. Army Research Laboratory.
*
* Redistribution and use in source and binary forms, with or without
-198
View File
@@ -1,198 +0,0 @@
#!/bin/sh
# L G T . S H
# BRL-CAD
#
# Copyright (c) 2004-2024 United States Government as represented by
# the U.S. Army Research Laboratory.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
#
# 3. The name of the author may not be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
###
# A Shell script to test LGT
# @(#)$Header$ (BRL)
# Ensure /bin/sh
export PATH || (echo "This isn't sh."; sh $0 $*; kill $$)
path_to_lgt_sh=`dirname $0`
expected="$path_to_lgt_sh/../src/lgt/lgt"
if ! test -f "$expected" ; then
echo "Can't find LGT"
exit 1
fi
# force locale setting to C so things like date output as expected
LC_ALL=C
LGT="$expected"
DB="$path_to_lgt_sh/../db"
CMP="$path_to_lgt_sh/pixcmp"
if test ! -f $CMP ; then
cake pixcmp
fi
# Alliant NFS hack
if test x${MACHINE} = xfx ; then
cp ${LGT} /tmp/lgt
cp ${CMP} /tmp/pixcmp
LGT=/tmp/lgt
CMP=/tmp/pixcmp
fi
# This test of LGT assumes a "live" framebuffer here.
if test x$FB_FILE = x ; then
echo "Environment variable FB_FILE must be set to a real framebuffer"
echo "for this test of LGT to operate correctly."
exit 1
fi
# Run the first set of tests
${LGT} ${DB}/lgt-test.g all.g << EOF
# read light source data base
v ../db/lgt-test.ldb
# read material data base
w ../db/lgt-test.mdb
# force display window to be 512x512 pixels, should cause 8-to-1 zoom
T 512
# clear frame buffer
E
# set maximum bounces to 20
K 20
# turn hidden-line drawing off
k 0
# configure grid: 64 rays across
G 64 0 0 0.0
# turn perspective off
p 0
# change background to mauve
b 111 66 66
# read key frame
j ../db/lgt-test.key
# display view #3
R
# save image in file
H lgt3a.pix
# change frame buffer to disk file
o lgt3b.pix
# save a script of previous commands, to produce the "b" version.
S script3
# disable reading of key frame file
j
# change frame buffer back to default
o
# configure grid: 2.45 mm cells, centered about model origin, view size 225 mm
G 2.45 1 1 225.0
# change background to firebrick
b 142 35 35
# force frame buffer size to be 455 pixels across, should cause 4-to-1 zoom
T 455
# set automatic perspective at 0.25
p 0.25
# set anti-aliasing over-sampling factor to 2
A 2
# set maximum bounces to 20
K 20
# display view #1
R
# save image in file
H lgt1a.pix
# change frame buffer to disk file
o lgt1b.pix
# save a script
S script1
# change frame buffer back to default
o
# turn off anti-aliasing
A 1
# revert to auto-sizing of frame buffer
T 0
# set automatic perspective at 0.25
p 0.25
# select hidden-line drawing, reverse video
k 2
# configure grid: 128 rays across, centered at model RPP, view size 225mm
G 128 0 0 225.0
# display view #2
R
# save image in file
H lgt2a.pix
# change frame buffer to disk file
o lgt2b.pix
# save a script
S script2
# change frame buffer back to default
o
# bye
q
EOF
if test $? = 0 ; then
:
else
echo "Abnormal lgt exit"
exit 1
fi
# Run the second set of tests. The scripts were created above.
./script1 < /dev/null &&
./script2 < /dev/null &&
./script3 < /dev/null || { echo "Script test failed."; exit 1; }
FAIL=0
for i in 1 2 3 ; do
if ${CMP} "$path_to_lgt_sh/../pix/lgt${i}.pix" lgt${i}a.pix ; then
:
else
echo "Test $i A failed."
FAIL=1
fi
if ${CMP} "$path_to_lgt_sh/../pix/lgt${i}.pix" lgt${i}b.pix
then
:
else
echo "Test $i B failed."
FAIL=1
fi
done
if test "$FAIL" -eq 0 ; then
echo "LGT Tested OK."
exit 0
fi
echo "*** LGT does NOT work on this platform ***"
exit 2
# Local Variables:
# mode: sh
# tab-width: 8
# sh-indentation: 4
# sh-basic-offset: 4
# indent-tabs-mode: t
# End:
# ex: shiftwidth=4 tabstop=8
+34 -31
View File
@@ -1,7 +1,7 @@
/* P I X C M P . C
* BRL-CAD
*
* Copyright (c) 2004-2024 United States Government as represented by
* Copyright (c) 2004-2026 United States Government as represented by
* the U.S. Army Research Laboratory.
*
* This program is free software; you can redistribute it and/or
@@ -36,6 +36,15 @@
#endif
#include "bio.h"
// TODO - replace with std::filesystem::is_fifo
#ifndef S_ISFIFO
# ifdef S_IFIFO
# define S_ISFIFO(mode) (((mode) & S_IFMT) == S_IFIFO)
# else
# define S_ISFIFO(mode) (0)
# endif
#endif
#include <errno.h>
#include "bu/app.h"
#include "bu/getopt.h"
@@ -151,44 +160,38 @@ compare_rgb(int r1, int g1, int b1, int r2, int g2, int b2, size_t *matching, si
&& (b1 == b2 && b1 != -1))
{
result = MATCHING;
(*matching)++;
} else if (r1 == -1 || r2 == -1 || g1 == -1 || g2 == -1 || b1 == -1 || b2 == -1) {
/* image sizes don't match (or other I/O error) */
result = MISSING;
(*missing)++;
} else if (((r1 != r2) && (g1 == g2) && (b1 == b2))
|| ((r1 == r2) && (g1 != g2) && (b1 == b2))
|| ((r1 == r2) && (g1 == g2) && (b1 != b2)))
{
/* off by one channel */
} else {
/* at least this */
result = OFF_BY_ONE;
/* but maybe more */
if (r1 != r2) {
if ((r1 > r2 ? r1 - r2 : r2 - r1) > 1) {
result = OFF_BY_MANY;
(*offmany)++;
} else {
result = OFF_BY_ONE;
(*off1)++;
}
} else if (g1 != g2) {
if ((g1 > g2 ? g1 - g2 : g2 - g1) > 1) {
result = OFF_BY_MANY;
(*offmany)++;
} else {
result = OFF_BY_ONE;
(*off1)++;
}
} else if (b1 != b2) {
if ((b1 > b2 ? b1 - b2 : b2 - b1) > 1) {
result = OFF_BY_MANY;
(*offmany)++;
} else {
result = OFF_BY_ONE;
(*off1)++;
}
}
} else {
result = OFF_BY_MANY;
if (g1 != g2) {
if ((g1 > g2 ? g1 - g2 : g2 - g1) > 1) {
result = OFF_BY_MANY;
}
}
if (b1 != b2) {
if ((b1 > b2 ? b1 - b2 : b2 - b1) > 1) {
result = OFF_BY_MANY;
}
}
}
if (result == OFF_BY_ONE) {
(*off1)++;
} else if (result == OFF_BY_MANY) {
(*offmany)++;
} else if (result == MATCHING) {
(*matching)++;
} else {
(*missing)++;
}
return result;
@@ -337,7 +340,7 @@ main(int argc, char *argv[])
bu_log("Warning - f2 fstat failed: %s\n", strerror(errno));
}
bu_log("FILE1_size(%zu) FILE1_skip(%zu) FILE2_size(%zu) FILE2_skip(%zu)\n", (size_t)sf1.st_size, f1_skip, (size_t)sf2.st_size, f2_skip);
/* bu_log("FILE1_size(%zu) FILE1_skip(%zu) FILE2_size(%zu) FILE2_skip(%zu)\n", (size_t)sf1.st_size, f1_skip, (size_t)sf2.st_size, f2_skip); */
if (!quiet && ((sf1.st_size - f1_skip) != (sf2.st_size - f2_skip))) {
bu_log("WARNING: Different image sizes detected\n");
+80
View File
@@ -0,0 +1,80 @@
# Exercise pixcmp's pixel tolerance and exit-status contract with small,
# deliberately readable byte streams.
if(NOT PIXCMP OR NOT TEST_DIR)
message(FATAL_ERROR "PIXCMP and TEST_DIR are required")
endif()
function(check_pixcmp name input1 input2 expected_status expected_summary)
set(file1 "${TEST_DIR}/pixcmp_${name}_1.pix")
set(file2 "${TEST_DIR}/pixcmp_${name}_2.pix")
file(WRITE "${file1}" "${input1}")
file(WRITE "${file2}" "${input2}")
execute_process(
COMMAND "${PIXCMP}" ${ARGN} "${file1}" "${file2}"
OUTPUT_VARIABLE output
ERROR_VARIABLE errors
RESULT_VARIABLE status
)
file(REMOVE "${file1}" "${file2}")
if(NOT "${status}" STREQUAL "${expected_status}")
message(
FATAL_ERROR
"${name}: pixcmp returned ${status}, expected ${expected_status}\nstdout: ${output}\nstderr: ${errors}"
)
endif()
string(REGEX REPLACE "[ \t\r\n]+" " " normalized_output "${output}")
string(STRIP "${normalized_output}" normalized_output)
string(FIND "${normalized_output}" "${expected_summary}" summary_position)
if(summary_position EQUAL -1)
message(
FATAL_ERROR
"${name}: expected summary '${expected_summary}'\nactual stdout: ${output}\nstderr: ${errors}"
)
endif()
endfunction()
set(exact_pixel "pixcmp pixels: 1 matching, 0 off by 1, 0 off by many")
set(tolerated_pixel "pixcmp pixels: 0 matching, 1 off by 1, 0 off by many")
set(rejected_pixel "pixcmp pixels: 0 matching, 0 off by 1, 1 off by many")
check_pixcmp(exact "ABC" "ABC" 0 "${exact_pixel}")
check_pixcmp(one_channel_within_tolerance "ABC" "BBC" 1 "${tolerated_pixel}")
check_pixcmp(two_channels_within_tolerance "ABC" "BCC" 1 "${tolerated_pixel}")
check_pixcmp(three_channels_within_tolerance "ABC" "@CB" 1 "${tolerated_pixel}")
# Keep the tolerated channel first in two cases to catch short-circuiting that
# would fail to inspect a later channel outside the tolerance.
check_pixcmp(red_outside_tolerance "ABC" "CCD" 2 "${rejected_pixel}")
check_pixcmp(green_outside_tolerance "ABC" "BDD" 2 "${rejected_pixel}")
check_pixcmp(blue_outside_tolerance "ABC" "BCE" 2 "${rejected_pixel}")
check_pixcmp(
missing_pixel
"ABC"
"ABCDEF"
2
"pixcmp pixels: 1 matching, 0 off by 1, 0 off by many, 1 missing"
)
check_pixcmp(
byte_within_tolerance
"A"
"B"
1
"pixcmp bytes: 0 matching, 1 off by 1, 0 off by many"
-b
)
check_pixcmp(
byte_outside_tolerance
"A"
"C"
2
"pixcmp bytes: 0 matching, 0 off by 1, 1 off by many"
-b
)
+11 -10
View File
@@ -1,28 +1,29 @@
set(BENCHMARK_PIX
set(
BENCHMARK_PIX
bldg391.pix
m35.pix
moss.pix
sphflake.pix
star.pix
world.pix
)
)
set(PIX_LOG
set(
PIX_LOG
bldg391.log
m35.log
moss.log
sphflake.log
star.log
world.log
)
)
BRLCAD_ADDDATA(BENCHMARK_PIX pix)
BRLCAD_ADDDATA(PIX_LOG pix)
brlcad_adddata(BENCHMARK_PIX pix)
brlcad_adddata(PIX_LOG pix)
CMAKEFILES(${BENCHMARK_PIX})
CMAKEFILES(${PIX_LOG})
CMAKEFILES(CMakeLists.txt)
cmakefiles(${BENCHMARK_PIX})
cmakefiles(${PIX_LOG})
cmakefiles(CMakeLists.txt)
# Local Variables:
# tab-width: 8
+1 -1
View File
@@ -1,7 +1,7 @@
/* R U N . C
* BRL-CAD
*
* Copyright (c) 2011-2024 United States Government as represented by
* Copyright (c) 2011-2026 United States Government as represented by
* the U.S. Army Research Laboratory.
*
* Redistribution and use in source and binary forms, with or without
+43 -21
View File
@@ -2,7 +2,7 @@
# R U N . S H
# BRL-CAD
#
# Copyright (c) 2004-2024 United States Government as represented by
# Copyright (c) 2004-2026 United States Government as represented by
# the U.S. Army Research Laboratory.
#
# Redistribution and use in source and binary forms, with or without
@@ -105,6 +105,13 @@ case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
*) ECHO_N= ECHO_C='\c' ECHO_T= ;;
esac
# Use a local cache
BU_DIR_CACHE="`pwd`/cache-$$-benchmark"
rm -rf $BU_DIR_CACHE && mkdir $BU_DIR_CACHE
export BU_DIR_CACHE
LIBRT_CACHE="`pwd`/rtcache-$$-benchmark"
rm -rf $LIBRT_CACHE && mkdir $LIBRT_CACHE
export LIBRT_CACHE
#######################
# log to tty and file #
@@ -743,9 +750,9 @@ run ( ) {
\"${DB}/${run_geomname}.g\" ${run_geometry} 1>&2 <<EOF
$run_view
EOF
retval=$?
$VERBOSE_ECHO "DEBUG: Running $RT returned $retval"
return $retval
run_retval=$?
$VERBOSE_ECHO "DEBUG: Running $RT returned $run_retval"
return $run_retval
}
@@ -979,6 +986,7 @@ bench ( ) {
bench_frame=0
bench_rtfms=""
bench_percent=100
bench_retval=0
bench_start_time="`date '+%H %M %S'`"
bench_overall_elapsed=-1
@@ -1002,7 +1010,10 @@ $bench_view
start $bench_frame;
end;
EOF
retval=$?
bench_raytrace_retval=$?
if test $bench_raytrace_retval != 0 ; then
bench_retval=$bench_raytrace_retval
fi
if test $bench_frame -ne 0 ; then
if test -f ${bench_testname}.pix.$bench_frame ; then
@@ -1076,7 +1087,7 @@ EOF
fi
# did we fail?
if test $retval != 0 ; then
if test $bench_raytrace_retval != 0 ; then
$ECHO "RAYTRACE ERROR"
break
fi
@@ -1141,27 +1152,34 @@ EOF
ls -la *.pix*
fi
$VERBOSE_ECHO "DEBUG: $CMP $PIX/${bench_testname}.pix ${bench_testname}.pix"
cmp_result="`eval \\\"${CMP}\\\" \\\"${PIX}/${bench_testname}.pix\\\" ${bench_testname}.pix 2>&1 | grep pixels`"
ret=$?
cmp_result="`eval \\\"${CMP}\\\" \\\"${PIX}/${bench_testname}.pix\\\" ${bench_testname}.pix 2>&1`"
bench_cmp_retval=$?
$ECHO "$cmp_result"
pixels_result="`echo \\\"$cmp_result\\\" | grep pixels`"
if test "x$pixels_result" = "x" ; then
$ECHO "$cmp_result"
else
$ECHO "$pixels_result"
fi
if test $ret = 0 ; then
if test $bench_cmp_retval = 0 ; then
# perfect match
$ECHO ${bench_testname}.pix: answers are RIGHT
elif test $ret = 1 ; then
elif test $bench_cmp_retval = 1 ; then
# off by one, acceptable
$ECHO ${bench_testname}.pix: answers are RIGHT
elif test $ret = 2 ; then
elif test $bench_cmp_retval = 2 ; then
# off by many, unacceptable
$ECHO ${bench_testname}.pix: WRONG WRONG WRONG WRONG WRONG WRONG
bench_retval=$bench_cmp_retval
else
# some other failure
$ECHO ${bench_testname}.pix: BENCHMARK COMPARISON FAILURE
bench_retval=$bench_cmp_retval
fi
$VERBOSE_ECHO "DEBUG: Done benchmark testing on $bench_testname"
return $retval
return $bench_retval
}
@@ -1309,7 +1327,7 @@ perf ( ) {
start="`date '+%H %M %S'`"
$ECHO "Running the BRL-CAD Benchmark tests... please wait ..."
$ECHO
ret=0
benchmark_retval=0
bench moss all.g $RTARGS << EOF
viewsize 1.572026215e+02;
@@ -1319,7 +1337,7 @@ viewrot -5.735764503e-01 8.191520572e-01 0.000000000e+00 0.000000000e+00
7.424039245e-01 5.198368430e-01 4.226182699e-01 0.000000000e+00
0.000000000e+00 0.000000000e+00 0.000000000e+00 1.000000000e+00 ;
EOF
ret=`expr $ret + $?`
benchmark_retval=`expr $benchmark_retval + $?`
bench world all.g $RTARGS << EOF
viewsize 1.572026215e+02;
@@ -1329,7 +1347,7 @@ viewrot -5.735764503e-01 8.191520572e-01 0.000000000e+00 0.000000000e+00
7.424039245e-01 5.198368430e-01 4.226182699e-01 0.000000000e+00
0.000000000e+00 0.000000000e+00 0.000000000e+00 1.000000000e+00 ;
EOF
ret=`expr $ret + $?`
benchmark_retval=`expr $benchmark_retval + $?`
bench star all $RTARGS << EOF
viewsize 2.500000000e+05;
@@ -1339,7 +1357,7 @@ viewrot -6.733560560e-01 6.130643360e-01 4.132114880e-01 0.000000000e+00
4.896120540e-01 7.885590550e-01 -3.720948210e-01 0.000000000e+00
0.000000000e+00 0.000000000e+00 0.000000000e+00 1.000000000e+00 ;
EOF
ret=`expr $ret + $?`
benchmark_retval=`expr $benchmark_retval + $?`
bench bldg391 all.g $RTARGS << EOF
viewsize 1.800000000e+03;
@@ -1349,7 +1367,7 @@ viewrot -5.735764503e-01 8.191520572e-01 0.000000000e+00 0.000000000e+00
7.424039245e-01 5.198368430e-01 4.226182699e-01 0.000000000e+00
0.000000000e+00 0.000000000e+00 0.000000000e+00 1.000000000e+00;
EOF
ret=`expr $ret + $?`
benchmark_retval=`expr $benchmark_retval + $?`
bench m35 all.g $RTARGS <<EOF
viewsize 6.787387985e+03;
@@ -1359,14 +1377,14 @@ viewrot -5.527838919e-01 8.332423558e-01 1.171090926e-02 0.000000000e+00
6.800964482e-01 4.429747496e-01 5.841593895e-01 0.000000000e+00
0.000000000e+00 0.000000000e+00 0.000000000e+00 1.000000000e+00 ;
EOF
ret=`expr $ret + $?`
benchmark_retval=`expr $benchmark_retval + $?`
bench sphflake scene.r $RTARGS <<EOF
viewsize 2.556283261452611e+04;
orientation 4.406810841785839e-01 4.005093234738861e-01 5.226451688385938e-01 6.101102288499644e-01;
eye_pt 2.418500583758302e+04 -3.328563644344796e+03 8.489926952850350e+03;
EOF
ret=`expr $ret + $?`
benchmark_retval=`expr $benchmark_retval + $?`
$ECHO
$ECHO "... Done."
@@ -1374,7 +1392,7 @@ $ECHO
$ECHO "Total testing time elapsed: `eval \\\"$ELP\\\" $start`"
# see if we fail
if test ! "x$ret" = "x0" ; then
if test ! "x$benchmark_retval" = "x0" ; then
$ECHO
$ECHO "THE BENCHMARK ANALYSIS DID NOT COMPLETE SUCCESSFULLY."
$ECHO
@@ -1615,6 +1633,10 @@ else
fi
$ECHO
# Cleanup
rm -rf "$BU_DIR_CACHE"
rm -rf "$LIBRT_CACHE"
$ECHO "Output was saved to $LOGFILE from `pwd`"
$ECHO "Benchmark testing complete."
+1 -1
View File
@@ -2,7 +2,7 @@
# T R Y . S H
# BRL-CAD
#
# Copyright (c) 2004-2024 United States Government as represented by
# Copyright (c) 2004-2026 United States Government as represented by
# the U.S. Army Research Laboratory.
#
# Redistribution and use in source and binary forms, with or without
+1 -1
View File
@@ -2,7 +2,7 @@
# V I E W D I F F . S H
# BRL-CAD
#
# Copyright (c) 2004-2024 United States Government as represented by
# Copyright (c) 2004-2026 United States Government as represented by
# the U.S. Army Research Laboratory.
#
# Redistribution and use in source and binary forms, with or without
+543
View File
@@ -0,0 +1,543 @@
BRL-CAD B-Rep Tessellation Improvement Plan
===========================================
Date: 2026-07-17
1. Objective
------------
Produce deterministic, watertight, orientable manifold meshes from valid closed
NURBS B-Reps, with explicit and measurable geometric quality guarantees. The
conversion-quality path must either return a certified mesh or fail with a
specific diagnostic. It must never silently emit a mesh marked solid when the
result has not passed all required checks.
The existing fast tessellator should remain available for shaded display. It
should not be evolved into, or presented as, a conversion-quality tessellator:
its face-local vertex indexing means coincident samples on adjacent faces are
not topologically shared.
2. Central Design Decision
--------------------------
Do not triangulate every face directly in its native rectangular NURBS UV
domain.
Instead, introduce an explicit chart layer:
B-Rep topology
-> one or more topology-correct charts per face
-> constrained triangulation in chart coordinates
-> evaluation through chart -> native UV -> 3D surface
-> global assembly using explicit topology IDs
-> manifold and geometric certification
The chart domain must have the topology of the represented surface region.
Periodic seams and singularities are chart topology, not floating-point
coincidences to repair after triangulation.
For a cone, the first prototype should use a triangular or wedge chart. The
base is one chart boundary, the two sides are periodic copies of the seam, and
the apex is one chart vertex. Chart interior points map back to the original
rectangular native UV domain for surface evaluation. No boundary edge handed
to detria should collapse to one 3D point.
A triangle is not a universal replacement for a quad:
* Cone: triangular/wedge chart, or several angular wedges.
* Sphere: triangular pole caps plus one or more regular middle charts.
* Cylinder: regular periodic chart with explicit seam identification.
* Torus: a multi-chart atlas or explicit identifications in both periodic
directions.
* General trimmed faces: decomposition into certified disk-like charts, with
trims split where they cross chart boundaries.
Do not change the underlying NURBS representation merely to tessellate it.
Charts are adapters to native UV.
3. Findings Driving This Plan
-----------------------------
3.1 Current singularity handling has the wrong topology
The quality path subdivides singular trim segments in 2D even when all samples
map to the same 3D pole. Detria triangulates the resulting 2D strip, after
which BRL-CAD merges vertices by ON_3dPoint pointer identity and discards
degenerate triangles. Holes, duplicate triangles, and bad edge incidence are
then repaired heuristically. A valid manifold cannot be made reliable with
this ordering.
Relevant implementation:
* src/libbrep/cdt/cdt.cpp, especially singular-trim splitting around line 487.
* src/libbrep/cdt/edge.cpp, shared B-Rep edge discretization around line 1022.
* src/libbrep/cdt/mesh.cpp, face triangulation and repair.
3.2 Projection repair is handling invalid charts, not only difficult geometry
On failing NIST cases, local LSCM/mean-value and best-fit-plane projections
produce mixed triangle orientations or self-intersecting constrained polygons.
Detria then correctly rejects intersecting constraints. Retrying a different
projection does not address the source topology problem.
The implementation called LSCM is a positive-weight spring/mean-value-style
parameterization with circular or elliptical boundary placement. It does not
validate all conditions needed for injectivity, it does not adequately check
solver convergence, and its current result checks do not prove the absence of
fold-overs.
3.3 UV aspect normalization changes Delaunay decisions
The quality path anisotropically scales high-aspect UV domains toward a square.
Nonuniform scaling does not preserve Delaunay triangulations. It changes
incircle tests and selected diagonals and is therefore a metric choice, not
numerical conditioning.
Use translation and uniform, preferably power-of-two, scaling only to condition
coordinate range. Obtain good 3D triangles using the surface metric, adaptive
sampling, and constrained local optimization.
3.4 Several sources of nondeterminism and platform sensitivity exist
* Surface jitter is assigned while iterating pointer-ordered containers, so
allocation order changes which patch receives which perturbation.
* Other work queues and sets use pointer values as ordering keys.
* The detria translation unit is not currently compiled with all strict
floating-point options required by its robust predicates.
* An experimental facetize caller does not fully initialize its tolerance
structure.
* The vendored detria predates upstream changes to collinear-prefix handling
and expansion arithmetic.
3.5 Present final validation is necessary but not sufficient
bg_trimesh_solid2 verifies indexed degeneracy and two oppositely directed uses
of every edge. It does not establish geometric nondegeneracy, valid vertex
links, lack of self-intersections, surface error, normal error, connectedness,
outward orientation, or acceptable triangle quality.
4. Target Data Model
--------------------
Replace implicit topology based on ON_3dPoint pointers with explicit stable
identifiers. At minimum, distinguish:
* TopoVertexID: a vertex in global B-Rep/output topology.
* BrepEdgeID: a B-Rep edge.
* EdgeSampleID: one sample in the canonical ordered discretization of a B-Rep
edge.
* FaceChartID: one chart associated with a B-Rep face.
* ChartVertexID: a vertex in a chart; several chart vertices may intentionally
map to the same TopoVertexID at a seam or singularity.
* MeshVertexID, HalfedgeID, and TriangleID in the assembled output mesh.
Coordinates are attributes of these entities, not their identity.
Each B-Rep edge must be sampled once through a global edge manager. Both
adjacent face charts reference exactly the same EdgeSampleID sequence, with
opposite traversal direction. If refinement inserts an edge sample, both
adjacent charts must be invalidated or updated together.
The assembled output should use a halfedge structure or an equivalent data
structure that makes edge incidence and vertex-link validation explicit.
5. Work Plan
------------
Phase 0: Establish a reproducible baseline
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0.1 Build an end-to-end test driver around ON_Brep_CDT_Tessellate and
ON_Brep_CDT_Mesh. It must be able to:
* select individual solids and faces;
* set all tessellation tolerances explicitly;
* write the chart constraints, sampled points, and output mesh on failure;
* run validation independently of frontends such as facetize;
* produce stable textual summaries suitable for CTest comparison.
0.2 Register the ten cone fixtures and the primary solids in all NIST database
files as regression tests. Add smaller extracted regressions for every failure
so normal testing does not depend only on large databases.
0.3 Record, for every test:
* result status and failure stage;
* vertex, edge, and triangle counts;
* open, overused, and misoriented edge counts;
* invalid vertex-link count;
* degenerate and intersecting triangle counts;
* maximum surface and edge approximation errors;
* minimum angle and relevant aspect measures;
* runtime and refinement counts.
Exit criterion:
* Every baseline case has a repeatable result and a deterministic diagnostic
artifact when it fails.
Phase 1: Correctness, determinism, and fail-closed behavior
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1.1 Fix known local defects before changing the architecture:
* In edge.cpp, correct the condition that tests trim1 twice rather than testing
trim1 and trim2.
* In mesh.cpp duplicate-triangle handling, compute the second direction from
the second triangle rather than calling tnorm(orig) twice.
* In cdt.cpp mesh export, index fmeshes using active_faces[fi].
* Update the closest-distance accumulator in the closest-point helper.
* Preserve orientation when comparing normals; do not erase it with an
unconditional absolute dot product.
* Make status initialization, update, and reuse semantics explicit.
* Invalidate and rebuild all tolerance-dependent data when tolerances change.
* Fully initialize bg_tess_tol in every caller.
* Require every frontend to accept only the defined success status.
* Never mark a BoT solid after a non-solid or failed return.
* Fail before tessellation when required closed-manifold B-Rep topology is
invalid.
* Destroy all state-owned diagnostic allocations.
1.2 Eliminate pointer-address ordering from all algorithms. Sort and queue by
stable B-Rep, chart, edge, sample, and triangle IDs.
1.3 Remove random UV jitter. Robust predicates must handle collinearity.
Where a geometric policy is needed for exactly coincident or on-constraint
points, resolve it topologically and report the decision.
1.4 Introduce explicit result codes and structured diagnostics. Suggested
categories:
* invalid input B-Rep topology;
* invalid tolerance configuration;
* chart construction failure;
* invalid planar straight-line graph;
* detria failure;
* adaptive refinement limit;
* manifold assembly failure;
* geometric validation failure;
* success.
Exit criteria:
* Repeated runs produce identical constraints and topology.
* Frontends never export or label failed results as solids.
* Known local defects have focused regression tests.
Phase 2: Harden detria and the libbg wrapper
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Detria should remain the constrained Delaunay triangulation engine. Its role
should be tightly bounded: triangulate an already valid planar straight-line
graph in a topology-correct chart.
2.1 src/libbg/detria.hpp has been udpated to the current reviewed upstream version.
Important changes:
* long collinear and nearly collinear initial point sequences;
* guarded expansion-array advancement in robust arithmetic.
Upstream references:
* https://github.com/Kimbatt/detria
* https://github.com/Kimbatt/detria/blob/master/DOCS.md
* https://github.com/Kimbatt/detria/commit/610840e27320199fa4d9de40d8565ddafadceb8d
* https://github.com/Kimbatt/detria/commit/2eaf7f8
2.2 Compile the translation unit instantiating detria with strict
floating-point semantics:
* GCC/Clang: no fast-math, -ffp-contract=off, -frounding-math, and initially no
LTO for that translation unit.
* MSVC: /fp:strict, or at minimum never /fp:fast.
Test LTO separately on each supported compiler before allowing it for this
translation unit.
2.3 Add wrapper preflight:
* validate all indices before dereferencing them;
* reject nonfinite coordinates;
* remove zero-length constraint segments;
* detect exact coordinate duplicates;
* coalesce duplicates only when they have the same semantic topology;
* promote a Steiner point lying on a constraint into the constraint sequence,
or discard it according to a documented policy;
* detect nonincident crossing constraints and return an invalid-chart error;
* condition coordinate range only with translation and uniform power-of-two
scaling;
* preserve semantic IDs through index compaction.
2.4 Add wrapper postconditions:
* every required constraint appears exactly as required in the output;
* every output index is valid;
* triangle orientations follow the requested convention;
* no indexed or geometric zero-area triangle is present;
* coverage and area agree with the chart polygon within a defined tolerance;
* no unexpected boundary or nonmanifold edge is present.
2.5 Add adversarial detria tests covering:
* short and very long collinear prefixes;
* nearly collinear points across a range of ULP separations;
* cocircular and nearly cocircular points;
* duplicate coordinate identities;
* Steiner points exactly and nearly on constraints;
* crossing constraints;
* holes and nested invalid loops;
* huge and tiny coordinate exponents;
* input-order permutations;
* translations, rotations, and uniform power-of-two scaling.
Do not require a particular diagonal for cocircular polygons unless BRL-CAD
defines a deterministic tie-break. Validate Delaunay, constraint, and manifold
properties instead.
Exit criteria:
* Detria tests pass under Debug, optimized Release, supported sanitizers, and
all primary compilers.
* Invalid inputs are classified before or at the wrapper boundary and never
enter higher-level mesh repair as mysterious missing triangles.
Phase 3: Introduce topology-correct charts
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3.1 Add a FaceChart abstraction containing:
* a chart domain and its boundary loops;
* mappings from chart vertices and edges to global topology IDs;
* chart -> native UV evaluation;
* native UV -> chart mapping where available;
* singular and periodic boundary metadata;
* trim fragments assigned to the chart;
* validity checks for simple boundaries and a nonfolded interior.
3.2 Implement classification of each face and surface:
* regular nonperiodic;
* periodic in U or V;
* periodic in both directions;
* one collapsed boundary;
* two collapsed boundaries;
* irregular trim topology requiring decomposition.
Use B-Rep topology and surface properties, not only coordinate equality, to
identify seams and singularities.
3.3 Implement the cone prototype:
* construct one triangular/wedge chart for the lateral face;
* represent the apex once in the chart;
* represent the two periodic seam sides separately in chart space but map them
to the same ordered global topology IDs;
* map chart points to native cone UV for exact surface evaluation;
* remove singular-trim oversplitting for this chart type;
* ensure detria never receives a collapsed boundary segment;
* assemble and certify all cone fixtures across scale and orientation changes.
3.4 Expand to:
* spherical pole caps;
* cylinders and other single-periodic regular surfaces;
* tori and doubly periodic surfaces;
* trimmed singular surfaces;
* faces requiring multiple charts.
3.5 Split trim curves at chart boundaries. Each trim fragment must be
represented by one ordered chart constraint sequence with explicit global IDs.
Do not merge chart seam copies by coordinate comparison.
Exit criteria:
* No chart supplied to detria has a collapsed constraint edge.
* Cone and sphere poles are represented by explicit topology rather than
post-triangulation vertex collapse.
* Adjacent faces share the exact same boundary sample IDs.
* The cone fixture suite passes full manifold and geometry certification.
Phase 4: Geometric adaptive refinement and triangle quality
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4.1 Use detria for the initial constrained triangulation of a valid chart.
4.2 Measure error against the original B-Rep geometry, including:
* curve chord error for constrained edge segments;
* surface chord error at triangle edge midpoints and centroids;
* normal deviation;
* variation of the first fundamental form/Jacobian over a triangle;
* minimum 3D angle;
* 3D aspect and size relative to local feature scale.
4.3 Refine face interiors by inserting chart-space Steiner points selected from
the worst geometric error. Re-run constrained triangulation or perform a
locally certified insertion.
4.4 Refine shared B-Rep edges only through the global edge manager. A new
sample must be inserted into the ordered edge sequence used by both adjacent
charts before either face can be finalized.
4.5 Replace anisotropic global UV normalization. If a quality objective is
anisotropic, derive it from the surface metric and use local sampling or edge
flips. Numerical conditioning remains a uniform transformation only.
4.6 After the required geometric tolerance is met, improve quality with
constraint-preserving operations such as:
* metric-aware edge flips;
* additional Steiner points;
* surface-constrained vertex relocation where topology permits it.
Every operation must be transactional and retain the error and manifold
guarantees.
Exit criteria:
* Results meet explicit chord and normal tolerances.
* Quality is stable under different native UV aspect ratios for equivalent 3D
geometry.
* Shared-edge refinement cannot create a T-junction.
Phase 5: Replace heuristic repair with certified assembly
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5.1 Assemble all chart triangles using explicit global topology IDs into a
halfedge mesh.
5.2 Make patch replacement transactional. A replacement is committed only if:
* its boundary exactly matches the removed patch boundary IDs;
* every new triangle is valid and correctly oriented;
* its vertex links and edge incidence are valid;
* it introduces no geometric intersections;
* it meets surface and quality tolerances.
5.3 Retire projection repair paths once the corresponding chart types are
implemented. Retain a parameterization fallback only for a patch already
proved to be a topological disk. Require positive orientation for every mapped
triangle, a solver residual check, and a simple nonintersecting boundary before
calling detria.
5.4 Eliminate arbitrary orientation tie-breaks and repair loops whose progress
is based only on a changed triangle set. Bound every refinement and repair
operation with a clear failure code and diagnostic artifact.
Exit criteria:
* Standard successful tessellations do not rely on post-hoc hole or orientation
repair.
* Any remaining repair operation preserves its boundary and is locally
certified before commit.
Phase 6: Full certification and conversion gate
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Before returning conversion-quality success, verify:
Topology:
* every mesh edge has exactly two oppositely oriented incident faces;
* every vertex link is one cycle for a closed manifold component;
* no T-junctions or duplicate directed halfedges exist;
* component count and Euler characteristic agree with the intended B-Rep;
* all required B-Rep edge sample sequences appear in the output.
Geometry:
* every triangle has scale-aware nonzero area;
* nonadjacent triangles do not intersect;
* edge and surface approximation errors meet the requested tolerances;
* normal deviations meet the requested tolerance;
* orientation is consistent and outward where the B-Rep supplies enough
information to determine it.
Quality:
* report minimum angle and aspect statistics;
* enforce defined minimum quality requirements, or return a distinct result
stating that topology and tolerance passed but quality did not;
* prevent unbounded refinement by reporting the limiting feature or tolerance.
Only after these checks may a caller mark the result as BOT_SOLID.
6. Test Matrix
-------------
Run the complete regression set under:
* GCC and Clang on Linux;
* MSVC on Windows;
* x86-64 and ARM64 where available;
* Debug and optimized Release;
* LTO enabled and disabled;
* ASan and UBSan, plus MSan for detria and parameterization tests where
practical;
* repeated executions with allocator perturbation.
Apply geometric transformations and topology-preserving reorderings:
* model scales from approximately 1e-12 through 1e12 where OpenNURBS and
BRL-CAD tolerances permit meaningful representation;
* large translations;
* arbitrary rotations;
* uniform power-of-two scale changes;
* reversed or permuted face, loop, edge, and input point ordering;
* small ULP perturbations around collinear, cocircular, seam, and pole cases.
The property result should be invariant even where the exact valid Delaunay
diagonal is not unique.
7. Initial Acceptance Targets
-----------------------------
The first useful architecture milestone is complete when:
1. All ten existing cone fixtures tessellate using the new cone chart, without
singular-boundary oversplitting or post-CDT pole collapse.
2. All ten outputs pass full topology, vertex-link, self-intersection, and
geometric error validation.
3. Results are invariant under input reordering, repeated execution, supported
compilers, and representative scale/rotation transforms.
4. The same global edge sample sequence is demonstrably used by both faces
adjacent to every nonsingular B-Rep edge.
5. Detria receives only preflighted simple constraints and runs with strict
floating-point semantics.
6. Failure produces a bounded, classified result and a reproducible chart
artifact rather than entering an open-ended repair loop.
After the cone milestone, require the same gates for spheres, periodic regular
surfaces, and then the complete NIST set.
8. Priority Order
-----------------
1. Reproducible end-to-end tests and diagnostic artifacts.
2. Local correctness bugs, initialized state, deterministic ordering, and
fail-closed frontends.
3. Detria update, strict compilation, wrapper preflight, and adversarial tests.
4. Explicit topology IDs and the cone triangular-chart prototype.
5. Sphere and periodic-surface chart support.
6. Metric-driven adaptive refinement and triangle-quality improvement.
7. Certified halfedge assembly and removal of heuristic projection repairs.
8. Full NIST and cross-platform certification.
Do not spend substantial effort tuning best-fit projection, UV jitter, or
post-triangulation singularity repair before the chart and explicit-topology
layers exist. Those mechanisms operate after the information needed for a
reliable solution has already been lost.
Vendored
-173
View File
@@ -1,173 +0,0 @@
#!/bin/sh
#
# This is a simple script to translate autotools style
# configure options into CMake variables. The resulting
# translation is then run as a CMake configure.
srcpath=$(dirname $0)
options="$srcpath"
while [ "$1" != "" ]
do
case $1
in
--enable-all) options="$options -DBRLCAD_BUNDLED_LIBS=BUNDLED";
shift;;
--disable-all) options="$options -DBRLCAD_BUNDLED_LIBS=SYSTEM";
shift;;
--enable-opengl) options="$options -DBRLCAD_ENABLE_OPENGL=ON";
shift;;
--disable-opengl) options="$options -DBRLCAD_ENABLE_OPENGL=OFF";
shift;;
--enable-runtime-debug) options="$options -DBRLCAD_ENABLE_RUNTIME_DEBUG=ON";
shift;;
--disable-runtime-debug) options="$options -DBRLCAD_ENABLE_RUNTIME_DEBUG=OFF";
shift;;
--enable-run-time-debug) options="$options -DBRLCAD_ENABLE_RUNTIME_DEBUG=ON";
shift;;
--disable-run-time-debug) options="$options -DBRLCAD_ENABLE_RUNTIME_DEBUG=OFF";
shift;;
--enable-runtime-debugging) options="$options -DBRLCAD_ENABLE_RUNTIME_DEBUG=ON";
shift;;
--disable-runtime-debugging) options="$options -DBRLCAD_ENABLE_RUNTIME_DEBUG=OFF";
shift;;
--enable-run-time-debugging) options="$options -DBRLCAD_ENABLE_RUNTIME_DEBUG=ON";
shift;;
--disable-run-time-debugging) options="$options -DBRLCAD_ENABLE_RUNTIME_DEBUG=OFF";
shift;;
--enable-debug) options="$options -DBRLCAD_DEBUGGING=ON";
shift;;
--disable-debug) options="$options -DBRLCAD_DEBUGGING=OFF";
shift;;
--enable-flags-debug) options="$options -DBRLCAD_DEBUGGING=ON";
shift;;
--disable-flags-debug) options="$options -DBRLCAD_DEBUGGING=OFF";
shift;;
--enable-debug-flags) options="$options -DBRLCAD_DEBUGGING=ON";
shift;;
--disable-debug-flags) options="$options -DBRLCAD_DEBUGGING=OFF";
shift;;
--brlcad-flags-debug) options="$options -DBRLCAD_DEBUGGING=ON";
shift;;
--brlcad-flags-debug) options="$options -DBRLCAD_DEBUGGING=OFF";
shift;;
--enable-warnings) options="$options -DBRLCAD_WARNINGS=ON";
shift;;
--disable-warnings) options="$options -DBRLCAD_WARNINGS=OFF";
shift;;
--enable-compiler-warnings) options="$options -DBRLCAD_WARNINGS=ON";
shift;;
--disable-compiler-warnings) options="$options -DBRLCAD_WARNINGS=OFF";
shift;;
--brlcad-enable-compiler-warnings) options="$options -DBRLCAD_WARNINGS=ON";
shift;;
--brlcad-disable-compiler-warnings) options="$options -DBRLCAD_WARNINGS=OFF";
shift;;
--enable-strict) options="$options -DBRLCAD_ENABLE_STRICT=ON";
shift;;
--disable-strict) options="$options -DBRLCAD_ENABLE_STRICT=OFF";
shift;;
--enable-strict-compile) options="$options -DBRLCAD_ENABLE_STRICT=ON";
shift;;
--disable-strict-compile) options="$options -DBRLCAD_ENABLE_STRICT=OFF";
shift;;
--enable-strict-compile-flags) options="$options -DBRLCAD_ENABLE_STRICT=ON";
shift;;
--disable-strict-compile-flags) options="$options -DBRLCAD_ENABLE_STRICT=OFF";
shift;;
--enable-all-cxx) options="$options -DENABLE_ALL_CXX_COMPILE=ON";
shift;;
--disable-all-cxx) options="$options -DENABLE_ALL_CXX_COMPILE=OFF";
shift;;
--enable-docs) options="$options -DBRLCAD_EXTRADOCS=ON";
shift;;
--disable-docs) options="$options -DBRLCAD_EXTRADOCS=OFF";
shift;;
--enable-extra-docs) options="$options -DBRLCAD_EXTRADOCS=ON";
shift;;
--disable-extra-docs) options="$options -DBRLCAD_EXTRADOCS=OFF";
shift;;
--enable-docbook) options="$options -DBRLCAD_EXTRADOCS=ON";
shift;;
--disable-docbook) options="$options -DBRLCAD_EXTRADOCS=OFF";
shift;;
--enable-astyle) options="$options -DBRLCAD_ASTYLE=BUNDLED";
shift;;
--disable-astyle) options="$options -DBRLCAD_ASTYLE=SYSTEM";
shift;;
--enable-xsltproc) options="$options -DBRLCAD_XSLTPROC=BUNDLED";
shift;;
--disable-xsltproc) options="$options -DBRLCAD_XSLTPROC=SYSTEM";
shift;;
--enable-xmllint) options="$options -DBRLCAD_XMLLINT=BUNDLED";
shift;;
--disable-xmllint) options="$options -DBRLCAD_XMLLINT=SYSTEM";
shift;;
--enable-zlib) options="$options -DBRLCAD_ZLIB=BUNDLED";
shift;;
--disable-zlib) options="$options -DBRLCAD_ZLIB=SYSTEM";
shift;;
--enable-libz) options="$options -DBRLCAD_ZLIB=BUNDLED";
shift;;
--disable-libz) options="$options -DBRLCAD_ZLIB=SYSTEM";
shift;;
--enable-regex) options="$options -DBRLCAD_REGEX=BUNDLED";
shift;;
--disable-regex) options="$options -DBRLCAD_REGEX=SYSTEM";
shift;;
--enable-netpbm) options="$options -DBRLCAD_NETPBM=BUNDLED";
shift;;
--disable-netpbm) options="$options -DBRLCAD_NETPBM=SYSTEM";
shift;;
--enable-png) options="$options -DBRLCAD_PNG=BUNDLED";
shift;;
--disable-png) options="$options -DBRLCAD_PNG=SYSTEM";
shift;;
--enable-scl) options="$options -DBRLCAD_SC=BUNDLED";
shift;;
--disable-scl) options="$options -DBRLCAD_SC=SYSTEM";
shift;;
--enable-step) options="$options -DBRLCAD_SC=BUNDLED";
shift;;
--disable-step) options="$options -DBRLCAD_SC=SYSTEM";
shift;;
--enable-step-class-libraries) options="$options -DBRLCAD_SC=BUNDLED";
shift;;
--disable-step-class-libraries) options="$options -DBRLCAD_SC=SYSTEM";
shift;;
--enable-sqlite3) options="$options -DBRLCAD_SQLITE3=BUNDLED";
shift;;
--disable-sqlite3) options="$options -DBRLCAD_SQLITE3=SYSTEM";
shift;;
--enable-sqlite3) options="$options -DBRLCAD_SQLITE3=BUNDLED";
shift;;
--disable-sqlite3) options="$options -DBRLCAD_SQLITE3=SYSTEM";
shift;;
--enable-proj) options="$options -DBRLCAD_PROJ=BUNDLED";
shift;;
--disable-proj) options="$options -DBRLCAD_PROJ=SYSTEM";
shift;;
--enable-gdal) options="$options -DBRLCAD_GDAL=BUNDLED";
shift;;
--disable-gdal) options="$options -DBRLCAD_GDAL=SYSTEM";
shift;;
--enable-assetimport) options="$options -DBRLCAD_ASSETIMPORT=BUNDLED";
shift;;
--disable-assetimport) options="$options -DBRLCAD_ASSETIMPORT=SYSTEM";
shift;;
--enable-openmesh) options="$options -DBRLCAD_OPENMESH=BUNDLED";
shift;;
--disable-openmesh) options="$options -DBRLCAD_OPENMESH=SYSTEM";
shift;;
--enable-tcl) options="$options -DBRLCAD_TCL=BUNDLED";
shift;;
--disable-tcl) options="$options -DBRLCAD_TCL=SYSTEM";
shift;;
--prefix=*) inputstr=$1;
options="$options -DCMAKE_INSTALL_PREFIX=${inputstr#--prefix=}";
shift;;
*) echo "Warning: unknown option $1";
shift;;
esac
done
echo cmake $options
cmake $options
BIN
View File
Binary file not shown.
+229 -141
View File
@@ -1,28 +1,18 @@
# There is quite a bit of shared logic for the various converters when it comes
# to building .g outputs, so we use a single function to manage the process and
# handle format-specific bits internally. TODO - we probably need to add
# optional argument support here later to support (say) specifying a specific
# COMGEOM or STEP format version...
function(ADD_G_TARGET in_model folder)
function(G_TARGET in_model folder)
# Initialize
set(MODEL_TYPE "UNKNOWN")
set(CONV_SUCCESS_CODES 0)
# Get our root path
if(CMAKE_CONFIGURATION_TYPES)
set(bin_root "${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}")
else(CMAKE_CONFIGURATION_TYPES)
set(bin_root "${CMAKE_BINARY_DIR}")
endif(CMAKE_CONFIGURATION_TYPES)
# Regardless of what we decide, let CMake know about the file
cmakefiles(${CMAKE_CURRENT_SOURCE_DIR}/${in_model})
# Find our conversion type
set(model_types "3dm;asc;comgeom;fg4;stp")
foreach(mt ${model_types})
if("${MODEL_TYPE}" STREQUAL "UNKNOWN")
if("${in_model}" MATCHES ".${mt}$")
set(MODEL_TYPE "${mt}")
string(REGEX REPLACE "([0-9a-z]*).${mt}" "\\1" in_model_root "${in_model}")
set(MODEL_TYPE "${mt}")
string(REGEX REPLACE "([0-9a-z]*).${mt}" "\\1" in_model_root "${in_model}")
endif("${in_model}" MATCHES ".${mt}$")
endif("${MODEL_TYPE}" STREQUAL "UNKNOWN")
endforeach(mt ${model_types})
@@ -30,110 +20,169 @@ function(ADD_G_TARGET in_model folder)
message(FATAL_ERROR "Unable to identify input model type for file ${in_model}")
endif("${MODEL_TYPE}" STREQUAL "UNKNOWN")
# Make sure variables are set up for configure_file
set(in_model_root "${in_model_root}")
# Find our output file and path
string(REPLACE "${CMAKE_SOURCE_DIR}/" "" rel_dir "${CMAKE_CURRENT_SOURCE_DIR}")
set(output_file ${DATA_DIR}/${rel_dir}/${in_model_root}.g)
set(CONV_OUTPUT_PATH "${CMAKE_BINARY_DIR}/${output_file}")
set(log_file ${CMAKE_CURRENT_BINARY_DIR}/${in_model_root}.log)
# Make sure the output db target directories are there
if(CMAKE_CONFIGURATION_TYPES)
foreach(CFG_TYPE ${CMAKE_CONFIGURATION_TYPES})
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/${CFG_TYPE}/${DATA_DIR}/${rel_dir}")
endforeach(CFG_TYPE ${CMAKE_CONFIGURATION_TYPES})
else(CMAKE_CONFIGURATION_TYPES)
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/${DATA_DIR}/${rel_dir}")
endif(CMAKE_CONFIGURATION_TYPES)
# Make sure the output db target directory is there
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/${DATA_DIR}/${rel_dir}")
#############################################################################
# Build logic
#############################################################################
# The 3DM conversion is rather different than the general pattern at the
# moment (However, the 3dm approach is probably the "wave of the future" in
# the sense that it uses libgcv...)
# Rhino 3DM file
if(${MODEL_TYPE} STREQUAL "3dm")
set(INPUT_FILE "${CMAKE_CURRENT_SOURCE_DIR}/${in_model}")
set(OUTPUT_FILE "${output_file}")
# Use the model name for the script, since the output file is specific to this input
configure_file("${CMAKE_SOURCE_DIR}/db/conv_run.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/${in_model_root}.cmake" @ONLY)
DISTCLEAN("${CMAKE_CURRENT_BINARY_DIR}/${in_model_root}.cmake")
# Define the target
if(NOT TARGET 3dm-g)
return()
endif(NOT TARGET 3dm-g)
set(CONV_ARGS "-o \"${CMAKE_BINARY_DIR}/${output_file}\" \"${CMAKE_CURRENT_SOURCE_DIR}/${in_model}\"")
configure_file("${CMAKE_SOURCE_DIR}/db/to_g.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/${in_model_root}.cmake" @ONLY)
distclean("${CMAKE_CURRENT_BINARY_DIR}/${in_model_root}.cmake")
# Custom command to generate the output
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BUILD_DIR_SCRIPT}/${output_file}
COMMAND ${CMAKE_COMMAND} -E remove "${CMAKE_CURRENT_BUILD_DIR_SCRIPT}/${output_file}"
OUTPUT ${CMAKE_BINARY_DIR}/${output_file}
COMMAND ${CMAKE_COMMAND} -E remove "${CMAKE_BINARY_DIR}/${output_file}"
COMMAND ${CMAKE_COMMAND} -DEXEC=$<TARGET_FILE:3dm-g> -P "${CMAKE_CURRENT_BINARY_DIR}/${in_model_root}.cmake"
DEPENDS 3dm-g ${CMAKE_CURRENT_SOURCE_DIR}/${in_model}
)
)
endif(${MODEL_TYPE} STREQUAL "3dm")
# The rest of the conversions follow the simpler/older pattern:
# BRL-CAD ASCII database
if(${MODEL_TYPE} STREQUAL "asc")
if (BRLCAD_ENABLE_TCL)
set(CONV_ARGS "\"${CMAKE_CURRENT_SOURCE_DIR}/${in_model}\" \"${CMAKE_BINARY_DIR}/${output_file}\"")
configure_file("${CMAKE_SOURCE_DIR}/db/to_g.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/${in_model_root}.cmake" @ONLY)
distclean("${CMAKE_CURRENT_BINARY_DIR}/${in_model_root}.cmake")
if(BRLCAD_ENABLE_TCL)
if(NOT TARGET asc2g)
return()
endif(NOT TARGET asc2g)
# Custom command to generate the output
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BUILD_DIR_SCRIPT}/${output_file}
COMMAND asc2g "${CMAKE_CURRENT_SOURCE_DIR}/${in_model}" ${CMAKE_CURRENT_BUILD_DIR_SCRIPT}/${output_file}
DEPENDS asc2g "${CMAKE_CURRENT_SOURCE_DIR}/${in_model}"
)
else (BRLCAD_ENABLE_TCL)
OUTPUT ${CMAKE_BINARY_DIR}/${output_file}
COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_BINARY_DIR}/${output_file}
COMMAND ${CMAKE_COMMAND} -DEXEC=$<TARGET_FILE:asc2g> -P "${CMAKE_CURRENT_BINARY_DIR}/${in_model_root}.cmake"
DEPENDS asc2g "${CMAKE_CURRENT_SOURCE_DIR}/${in_model}"
)
else(BRLCAD_ENABLE_TCL)
if(NOT TARGET gcv)
return()
endif(NOT TARGET gcv)
# Custom command to generate the output
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BUILD_DIR_SCRIPT}/${output_file}
COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_CURRENT_BUILD_DIR_SCRIPT}/${output_file}
COMMAND gcv "${CMAKE_CURRENT_SOURCE_DIR}/${in_model}" ${CMAKE_CURRENT_BUILD_DIR_SCRIPT}/${output_file}
DEPENDS gcv "${CMAKE_CURRENT_SOURCE_DIR}/${in_model}"
)
endif (BRLCAD_ENABLE_TCL)
OUTPUT ${CMAKE_BINARY_DIR}/${output_file}
COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_BINARY_DIR}/${output_file}
COMMAND ${CMAKE_COMMAND} -DEXEC=$<TARGET_FILE:gcv> -P "${CMAKE_CURRENT_BINARY_DIR}/${in_model_root}.cmake"
DEPENDS gcv "${CMAKE_CURRENT_SOURCE_DIR}/${in_model}"
)
endif(BRLCAD_ENABLE_TCL)
endif(${MODEL_TYPE} STREQUAL "asc")
# COMGEOM (pre BRL-CAD Geometry Information For Targets (GIFT) files)
if(${MODEL_TYPE} STREQUAL "comgeom")
if(NOT TARGET comgeom-g)
return()
endif(NOT TARGET comgeom-g)
set(CONV_ARGS "-v 5 \"${CMAKE_CURRENT_SOURCE_DIR}/${in_model}\" \"${CMAKE_BINARY_DIR}/${output_file}\"")
configure_file("${CMAKE_SOURCE_DIR}/db/to_g.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/${in_model_root}.cmake" @ONLY)
distclean("${CMAKE_CURRENT_BINARY_DIR}/${in_model_root}.cmake")
# Custom command to generate the output
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BUILD_DIR_SCRIPT}/${output_file}
COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_CURRENT_BUILD_DIR_SCRIPT}/${output_file}
COMMAND comgeom-g -v 5 ${CMAKE_CURRENT_SOURCE_DIR}/${in_model} ${CMAKE_CURRENT_BUILD_DIR_SCRIPT}/${output_file} > ${log_file} 2>&1
OUTPUT ${CMAKE_BINARY_DIR}/${output_file}
COMMAND ${CMAKE_COMMAND} -E remove "${CMAKE_BINARY_DIR}/${output_file}"
COMMAND ${CMAKE_COMMAND} -DEXEC=$<TARGET_FILE:comgeom-g> -P "${CMAKE_CURRENT_BINARY_DIR}/${in_model_root}.cmake"
DEPENDS comgeom-g ${CMAKE_CURRENT_SOURCE_DIR}/${in_model}
)
)
endif(${MODEL_TYPE} STREQUAL "comgeom")
# FASTGEN 4
if(${MODEL_TYPE} STREQUAL "fg4")
if(NOT TARGET fast4-g)
return()
endif(NOT TARGET fast4-g)
set(CONV_ARGS "\"${CMAKE_CURRENT_SOURCE_DIR}/${in_model}\" \"${CMAKE_BINARY_DIR}/${output_file}\"")
configure_file("${CMAKE_SOURCE_DIR}/db/to_g.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/${in_model_root}.cmake" @ONLY)
distclean("${CMAKE_CURRENT_BINARY_DIR}/${in_model_root}.cmake")
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BUILD_DIR_SCRIPT}/${output_file}
COMMAND fast4-g ${CMAKE_CURRENT_SOURCE_DIR}/${in_model} ${CMAKE_CURRENT_BUILD_DIR_SCRIPT}/${output_file} > ${log_file} 2>&1
OUTPUT ${CMAKE_BINARY_DIR}/${output_file}
COMMAND ${CMAKE_COMMAND} -E remove "${CMAKE_BINARY_DIR}/${output_file}"
COMMAND ${CMAKE_COMMAND} -DEXEC=$<TARGET_FILE:fast4-g> -P "${CMAKE_CURRENT_BINARY_DIR}/${in_model_root}.cmake"
DEPENDS fast4-g ${CMAKE_CURRENT_SOURCE_DIR}/${in_model}
)
)
endif(${MODEL_TYPE} STREQUAL "fg4")
# STEP AP203
if(${MODEL_TYPE} STREQUAL "stp")
if (BRLCAD_ENABLE_STEP)
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BUILD_DIR_SCRIPT}/${output_file}
COMMAND step-g -O ${CMAKE_CURRENT_BUILD_DIR_SCRIPT}/${output_file} ${CMAKE_CURRENT_SOURCE_DIR}/${in_model} > ${log_file} 2>&1
DEPENDS step-g ${CMAKE_CURRENT_SOURCE_DIR}/${in_model}
)
else (BRLCAD_ENABLE_STEP)
CMAKEFILES(${CMAKE_CURRENT_SOURCE_DIR}/${in_model})
endif (BRLCAD_ENABLE_STEP)
if(NOT TARGET step-g)
return()
endif(NOT TARGET step-g)
set(CONV_ARGS "-O \"${CMAKE_BINARY_DIR}/${output_file}\" \"${CMAKE_CURRENT_SOURCE_DIR}/${in_model}\"")
# step-g uses status 1 for useful, deliberately published partial output.
# Installed sample databases should retain that geometry; statuses 2 and
# above, or a missing output file, remain build failures.
set(CONV_SUCCESS_CODES "0;1")
configure_file("${CMAKE_SOURCE_DIR}/db/to_g.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/${in_model_root}.cmake" @ONLY)
distclean("${CMAKE_CURRENT_BINARY_DIR}/${in_model_root}.cmake")
# Custom command to generate the output
add_custom_command(
OUTPUT ${CMAKE_BINARY_DIR}/${output_file}
COMMAND ${CMAKE_COMMAND} -E remove "${CMAKE_BINARY_DIR}/${output_file}"
COMMAND ${CMAKE_COMMAND} -DEXEC=$<TARGET_FILE:step-g> -P "${CMAKE_CURRENT_BINARY_DIR}/${in_model_root}.cmake"
DEPENDS step-g ${CMAKE_CURRENT_SOURCE_DIR}/${in_model}
)
endif(${MODEL_TYPE} STREQUAL "stp")
if(NOT ${MODEL_TYPE} STREQUAL "stp" OR BRLCAD_ENABLE_STEP)
add_custom_target(${in_model_root}.g ALL DEPENDS ${CMAKE_CURRENT_BUILD_DIR_SCRIPT}/${output_file})
set_target_properties(${in_model_root}.g PROPERTIES FOLDER "${folder}")
# If we got this far, do the target, install and clean-up rules
add_custom_target(${in_model_root}.g ALL DEPENDS ${CMAKE_BINARY_DIR}/${output_file})
set_target_properties(${in_model_root}.g PROPERTIES FOLDER "${folder}")
# Install logic
if(BRLCAD_INSTALL_EXAMPLE_GEOMETRY)
install(FILES ${CMAKE_CURRENT_BUILD_DIR_INSTALL}/${output_file} DESTINATION ${DATA_DIR}/${rel_dir})
endif(BRLCAD_INSTALL_EXAMPLE_GEOMETRY)
if(BRLCAD_INSTALL_EXAMPLE_GEOMETRY)
install(FILES ${CMAKE_BINARY_DIR}/${output_file} DESTINATION ${DATA_DIR}/${rel_dir})
endif(BRLCAD_INSTALL_EXAMPLE_GEOMETRY)
# Clean-up
set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES "${log_file}")
DISTCLEAN("${log_file}")
endif(NOT ${MODEL_TYPE} STREQUAL "stp" OR BRLCAD_ENABLE_STEP)
set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES "${log_file}")
distclean("${log_file}")
endfunction(G_TARGET in_model folder)
endfunction(ADD_G_TARGET in_model folder)
function(PIX_TARGET in_image folder)
if(NOT TARGET png-pix)
return()
endif(NOT TARGET png-pix)
set(G_BENCHMARK_MODELS
cmakefiles(${CMAKE_CURRENT_SOURCE_DIR}/${in_image})
get_filename_component(in_image_root "${in_image}" NAME_WE)
string(REPLACE "${CMAKE_SOURCE_DIR}/" "" rel_dir "${CMAKE_CURRENT_SOURCE_DIR}")
set(output_file ${DATA_DIR}/${rel_dir}/${in_image_root}.pix)
set(output_path "${CMAKE_BINARY_DIR}/${output_file}")
set(conversion_file "${CMAKE_CURRENT_BINARY_DIR}/${in_image_root}_pix.cmake")
set(PIX_INPUT "${CMAKE_CURRENT_SOURCE_DIR}/${in_image}")
set(PIX_OUTPUT "${output_path}")
set(PIX_LABEL "${in_image_root}.pix")
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/${DATA_DIR}/${rel_dir}")
configure_file("${CMAKE_SOURCE_DIR}/db/to_pix.cmake.in" "${conversion_file}" @ONLY)
distclean("${conversion_file}")
add_custom_command(
OUTPUT ${output_path}
COMMAND ${CMAKE_COMMAND} -E remove "${output_path}"
COMMAND ${CMAKE_COMMAND} -DEXEC=$<TARGET_FILE:png-pix> -P "${conversion_file}"
DEPENDS png-pix "${PIX_INPUT}"
)
add_custom_target(${in_image_root}.pix ALL DEPENDS ${output_path})
set_target_properties(${in_image_root}.pix PROPERTIES FOLDER "${folder}")
if(BRLCAD_INSTALL_EXAMPLE_GEOMETRY)
install(FILES ${output_path} DESTINATION ${DATA_DIR}/${rel_dir})
endif(BRLCAD_INSTALL_EXAMPLE_GEOMETRY)
distclean("${output_path}")
endfunction(PIX_TARGET in_image folder)
set(
G_BENCHMARK_MODELS
bldg391.asc
m35.asc
moss.asc
@@ -142,11 +191,14 @@ set(G_BENCHMARK_MODELS
world.asc
)
set(G_SAMPLE_MODELS
set(
G_SAMPLE_MODELS
aet.asc
arb8_showcase.asc
annual_gift_man.asc
axis.asc
bearing.asc
bicycle_wheel.asc
boolean-ops.asc
castle.asc
cornell.asc
@@ -156,6 +208,8 @@ set(G_SAMPLE_MODELS
cube.asc
demo.asc
die.asc
earth.asc
gaia.asc
galileo.asc
goliath.asc
havoc.asc
@@ -163,8 +217,10 @@ set(G_SAMPLE_MODELS
ktank.asc
lgt-test.asc
operators.asc
photo_holder.asc
pic.asc
pinewood.asc
primitives.asc
prim.asc
radialgrid.asc
rounds.asc
@@ -183,83 +239,115 @@ add_subdirectory(comgeom)
add_subdirectory(nist)
add_subdirectory(faa)
pix_target(earth.png "BRL-CAD Geometry Models/Sample")
if(BRLCAD_INSTALL_EXAMPLE_GEOMETRY)
brlcad_adddata(earth.png db)
endif(BRLCAD_INSTALL_EXAMPLE_GEOMETRY)
foreach(g_input ${G_BENCHMARK_MODELS})
ADD_G_TARGET(${g_input} "BRL-CAD Geometry Models/Benchmark")
g_target(${g_input} "BRL-CAD Geometry Models/Benchmark")
endforeach(g_input ${G_BENCHMARK_MODELS})
foreach(g_input ${G_SAMPLE_MODELS})
ADD_G_TARGET(${g_input} "BRL-CAD Geometry Models/Sample")
g_target(${g_input} "BRL-CAD Geometry Models/Sample")
endforeach(g_input ${G_SAMPLE_MODELS})
if(BRLCAD_INSTALL_EXAMPLE_GEOMETRY)
BRLCAD_ADDDATA(terra.bin db)
endif(BRLCAD_INSTALL_EXAMPLE_GEOMETRY)
if(BRLCAD_INSTALL_EXAMPLE_GEOMETRY AND TARGET gcv)
brlcad_adddata(1647260.dsp db)
brlcad_adddata(ebm_logo.bw db)
brlcad_adddata(terra.bin db)
brlcad_adddata(vol_data.bw db)
endif(BRLCAD_INSTALL_EXAMPLE_GEOMETRY AND TARGET gcv)
if(SH_EXEC)
set(conversion_g_files)
set(conversion_g_files_fp)
set(conversion_deps_list)
if(TARGET mged OR TARGET gcv)
set(conversion_g_files)
set(conversion_g_files_fp)
set(conversion_deps_list)
macro(Sh_Conversion_Test gfile depends_list)
if (TARGET mged)
add_custom_target(convert-${gfile} COMMAND ${SH_EXEC} ${CMAKE_SOURCE_DIR}/sh/conversion.sh GED=$<TARGET_FILE:mged> ${CMAKE_BINARY_DIR}/${DATA_DIR}/db/${gfile})
else ()
add_custom_target(convert-${gfile} COMMAND ${SH_EXEC} ${CMAKE_SOURCE_DIR}/sh/conversion.sh GED=$<TARGET_FILE:gcv> ${CMAKE_BINARY_DIR}/${DATA_DIR}/db/${gfile})
endif (TARGET mged)
set_target_properties(convert-${gfile} PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD 1)
set_target_properties(convert-${gfile} PROPERTIES FOLDER "BRL-CAD Conversion Tests")
set(conversion_g_files ${conversion_g_files} ${gfile})
if(NOT "${depends_list}" STREQUAL "")
add_dependencies(convert-${gfile} ${depends_list})
set(conversion_deps_list ${conversion_deps_list} ${depends_list})
endif(NOT "${depends_list}" STREQUAL "")
endmacro(Sh_Conversion_Test)
macro(Sh_Conversion_Test gfile depends_list)
if(TARGET mged)
add_custom_target(
convert-${gfile}
COMMAND
${SH_EXEC} ${CMAKE_SOURCE_DIR}/sh/conversion.sh GED=$<TARGET_FILE:mged>
${CMAKE_BINARY_DIR}/${DATA_DIR}/db/${gfile}
)
else()
add_custom_target(
convert-${gfile}
COMMAND
${SH_EXEC} ${CMAKE_SOURCE_DIR}/sh/conversion.sh GED=$<TARGET_FILE:gcv>
${CMAKE_BINARY_DIR}/${DATA_DIR}/db/${gfile}
)
endif(TARGET mged)
set_target_properties(convert-${gfile} PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD 1)
set_target_properties(convert-${gfile} PROPERTIES FOLDER "BRL-CAD Conversion Tests")
set(conversion_g_files ${conversion_g_files} ${gfile})
if(NOT "${depends_list}" STREQUAL "")
add_dependencies(convert-${gfile} ${depends_list})
set(conversion_deps_list ${conversion_deps_list} ${depends_list})
endif(NOT "${depends_list}" STREQUAL "")
endmacro(Sh_Conversion_Test)
foreach(g_input ${G_BENCHMARK_MODELS})
get_filename_component(GROOT "${g_input}" NAME_WE)
if (TARGET mged)
Sh_Conversion_Test(${GROOT}.g "mged")
else ()
Sh_Conversion_Test(${GROOT}.g "gcv")
endif (TARGET mged)
endforeach(g_input ${G_BENCHMARK_MODELS})
foreach(g_input ${G_SAMPLE_MODELS})
get_filename_component(GROOT "${g_input}" NAME_WE)
if (TARGET mged)
Sh_Conversion_Test(${GROOT}.g "mged")
else ()
Sh_Conversion_Test(${GROOT}.g "gcv")
endif (TARGET mged)
endforeach(g_input ${G_SAMPLE_MODELS})
foreach(g_input ${G_BENCHMARK_MODELS})
get_filename_component(GROOT "${g_input}" NAME_WE)
if(TARGET mged)
sh_conversion_test(${GROOT}.g "mged")
else()
sh_conversion_test(${GROOT}.g "gcv")
endif(TARGET mged)
endforeach(g_input ${G_BENCHMARK_MODELS})
foreach(g_input ${G_SAMPLE_MODELS})
get_filename_component(GROOT "${g_input}" NAME_WE)
if(TARGET mged)
sh_conversion_test(${GROOT}.g "mged")
else()
sh_conversion_test(${GROOT}.g "gcv")
endif(TARGET mged)
endforeach(g_input ${G_SAMPLE_MODELS})
list(REMOVE_DUPLICATES conversion_deps_list)
foreach(gfile ${conversion_g_files})
set(conversion_g_files_fp ${conversion_g_files_fp} "${CMAKE_BINARY_DIR}/${DATA_DIR}/db/${gfile}")
endforeach(gfile ${conversion_g_files})
if (TARGET mged)
add_custom_target(convert COMMAND ${SH_EXEC} ${CMAKE_SOURCE_DIR}/sh/conversion.sh GED=$<TARGET_FILE:mged> ${conversion_g_files_fp})
else ()
add_custom_target(convert COMMAND ${SH_EXEC} ${CMAKE_SOURCE_DIR}/sh/conversion.sh GED=$<TARGET_FILE:gcv> ${conversion_g_files_fp})
endif (TARGET mged)
set_target_properties(convert PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD 1)
set_target_properties(convert PROPERTIES FOLDER "BRL-CAD Conversion Tests")
add_dependencies(convert ${conversion_deps_list})
list(REMOVE_DUPLICATES conversion_deps_list)
foreach(gfile ${conversion_g_files})
set(conversion_g_files_fp ${conversion_g_files_fp} "${CMAKE_BINARY_DIR}/${DATA_DIR}/db/${gfile}")
endforeach(gfile ${conversion_g_files})
if(TARGET mged)
add_custom_target(
convert
COMMAND ${SH_EXEC} ${CMAKE_SOURCE_DIR}/sh/conversion.sh GED=$<TARGET_FILE:mged> ${conversion_g_files_fp}
)
else()
add_custom_target(
convert
COMMAND ${SH_EXEC} ${CMAKE_SOURCE_DIR}/sh/conversion.sh GED=$<TARGET_FILE:gcv> ${conversion_g_files_fp}
)
endif(TARGET mged)
set_target_properties(convert PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD 1)
set_target_properties(convert PROPERTIES FOLDER "BRL-CAD Conversion Tests")
add_dependencies(convert ${conversion_deps_list})
endif(TARGET mged OR TARGET gcv)
endif(SH_EXEC)
CMAKEFILES(
cmakefiles(
${G_BENCHMARK_MODELS}
${G_SAMPLE_MODELS}
1647260.dsp
CMakeLists.txt
aet.rt
conv_run.cmake.in
cornell.rt
cube.rt
traffic_light.rt
db.php
ebm_logo.bw
earth.png
include/ctype.inc
include/debug.inc
terra.bin
)
to_g.cmake.in
to_pix.cmake.in
traffic_light.rt
vol_data.bw
)
# Local Variables:
# tab-width: 8
+205
View File
@@ -0,0 +1,205 @@
title {ARB8 Unit Test Showcase}
units mm
attr set {_GLOBAL}
put {SpanningUnitCube} arb8 V1 {-1 -1 -1} V2 {1 -1 -1} V3 {1 1 -1} V4 {-1 1 -1} V5 {-1 -1 1} V6 {1 -1 1} V7 {1 1 1} V8 {-1 1 1}
put {SpanningUnitCube.r} comb region yes tree {l SpanningUnitCube}
attr set {SpanningUnitCube.r} {region} {R} {region_id} {8400} {material_id} {1} {los} {100} {rgb} {250/245/180} {oshader} {plastic}
put {UnitCube_Q1} arb8 V1 {0 0 0} V2 {1 0 0} V3 {1 1 0} V4 {0 1 0} V5 {0 0 1} V6 {1 0 1} V7 {1 1 1} V8 {0 1 1}
put {UnitCube_Q1.r} comb region yes tree {l UnitCube_Q1}
attr set {UnitCube_Q1.r} {region} {R} {region_id} {8401} {material_id} {1} {los} {100} {rgb} {255/106/106} {oshader} {plastic}
put {UnitCube_Q2} arb8 V1 {-1 0 0} V2 {0 0 0} V3 {0 1 0} V4 {-1 1 0} V5 {-1 0 1} V6 {0 0 1} V7 {0 1 1} V8 {-1 1 1}
put {UnitCube_Q2.r} comb region yes tree {l UnitCube_Q2}
attr set {UnitCube_Q2.r} {region} {R} {region_id} {8402} {material_id} {1} {los} {100} {rgb} {255/170/92} {oshader} {plastic}
put {UnitCube_Q3} arb8 V1 {-1 -1 0} V2 {0 -1 0} V3 {0 0 0} V4 {-1 0 0} V5 {-1 -1 1} V6 {0 -1 1} V7 {0 0 1} V8 {-1 0 1}
put {UnitCube_Q3.r} comb region yes tree {l UnitCube_Q3}
attr set {UnitCube_Q3.r} {region} {R} {region_id} {8403} {material_id} {1} {los} {100} {rgb} {255/224/102} {oshader} {plastic}
put {UnitCube_Q4} arb8 V1 {0 -1 0} V2 {1 -1 0} V3 {1 0 0} V4 {0 0 0} V5 {0 -1 1} V6 {1 -1 1} V7 {1 0 1} V8 {0 0 1}
put {UnitCube_Q4.r} comb region yes tree {l UnitCube_Q4}
attr set {UnitCube_Q4.r} {region} {R} {region_id} {8404} {material_id} {1} {los} {100} {rgb} {191/224/64} {oshader} {plastic}
put {UnitCube_Q5} arb8 V1 {0 0 -1} V2 {1 0 -1} V3 {1 1 -1} V4 {0 1 -1} V5 {0 0 0} V6 {1 0 0} V7 {1 1 0} V8 {0 1 0}
put {UnitCube_Q5.r} comb region yes tree {l UnitCube_Q5}
attr set {UnitCube_Q5.r} {region} {R} {region_id} {8405} {material_id} {1} {los} {100} {rgb} {105/206/107} {oshader} {plastic}
put {UnitCube_Q6} arb8 V1 {-1 0 -1} V2 {0 0 -1} V3 {0 1 -1} V4 {-1 1 -1} V5 {-1 0 0} V6 {0 0 0} V7 {0 1 0} V8 {-1 1 0}
put {UnitCube_Q6.r} comb region yes tree {l UnitCube_Q6}
attr set {UnitCube_Q6.r} {region} {R} {region_id} {8406} {material_id} {1} {los} {100} {rgb} {82/197/194} {oshader} {plastic}
put {UnitCube_Q7} arb8 V1 {-1 -1 -1} V2 {0 -1 -1} V3 {0 0 -1} V4 {-1 0 -1} V5 {-1 -1 0} V6 {0 -1 0} V7 {0 0 0} V8 {-1 0 0}
put {UnitCube_Q7.r} comb region yes tree {l UnitCube_Q7}
attr set {UnitCube_Q7.r} {region} {R} {region_id} {8407} {material_id} {1} {los} {100} {rgb} {92/146/255} {oshader} {plastic}
put {UnitCube_Q8} arb8 V1 {0 -1 -1} V2 {1 -1 -1} V3 {1 0 -1} V4 {0 0 -1} V5 {0 -1 0} V6 {1 -1 0} V7 {1 0 0} V8 {0 0 0}
put {UnitCube_Q8.r} comb region yes tree {l UnitCube_Q8}
attr set {UnitCube_Q8.r} {region} {R} {region_id} {8408} {material_id} {1} {los} {100} {rgb} {165/122/255} {oshader} {plastic}
put {Elongated_X1} arb8 V1 {-1 0 0} V2 {1 0 0} V3 {1 1 0} V4 {-1 1 0} V5 {-1 0 1} V6 {1 0 1} V7 {1 1 1} V8 {-1 1 1}
put {Elongated_X1.r} comb region yes tree {l Elongated_X1}
attr set {Elongated_X1.r} {region} {R} {region_id} {8409} {material_id} {1} {los} {100} {rgb} {255/120/120} {oshader} {plastic}
put {Elongated_X2} arb8 V1 {-1 -1 0} V2 {1 -1 0} V3 {1 0 0} V4 {-1 0 0} V5 {-1 -1 1} V6 {1 -1 1} V7 {1 0 1} V8 {-1 0 1}
put {Elongated_X2.r} comb region yes tree {l Elongated_X2}
attr set {Elongated_X2.r} {region} {R} {region_id} {8410} {material_id} {1} {los} {100} {rgb} {214/72/72} {oshader} {plastic}
put {Elongated_Y1} arb8 V1 {0 -1 0} V2 {1 -1 0} V3 {1 1 0} V4 {0 1 0} V5 {0 -1 1} V6 {1 -1 1} V7 {1 1 1} V8 {0 1 1}
put {Elongated_Y1.r} comb region yes tree {l Elongated_Y1}
attr set {Elongated_Y1.r} {region} {R} {region_id} {8411} {material_id} {1} {los} {100} {rgb} {255/191/94} {oshader} {plastic}
put {Elongated_Y2} arb8 V1 {-1 -1 0} V2 {0 -1 0} V3 {0 1 0} V4 {-1 1 0} V5 {-1 -1 1} V6 {0 -1 1} V7 {0 1 1} V8 {-1 1 1}
put {Elongated_Y2.r} comb region yes tree {l Elongated_Y2}
attr set {Elongated_Y2.r} {region} {R} {region_id} {8412} {material_id} {1} {los} {100} {rgb} {214/150/60} {oshader} {plastic}
put {Elongated_Z1} arb8 V1 {0 0 -1} V2 {1 0 -1} V3 {1 1 -1} V4 {0 1 -1} V5 {0 0 1} V6 {1 0 1} V7 {1 1 1} V8 {0 1 1}
put {Elongated_Z1.r} comb region yes tree {l Elongated_Z1}
attr set {Elongated_Z1.r} {region} {R} {region_id} {8413} {material_id} {1} {los} {100} {rgb} {114/210/255} {oshader} {plastic}
put {Elongated_Z2} arb8 V1 {-1 0 -1} V2 {0 0 -1} V3 {0 1 -1} V4 {-1 1 -1} V5 {-1 0 1} V6 {0 0 1} V7 {0 1 1} V8 {-1 1 1}
put {Elongated_Z2.r} comb region yes tree {l Elongated_Z2}
attr set {Elongated_Z2.r} {region} {R} {region_id} {8414} {material_id} {1} {los} {100} {rgb} {63/152/214} {oshader} {plastic}
put {ReverseUnitCube} arb8 V1 {0 0 0} V2 {0 1 0} V3 {1 1 0} V4 {1 0 0} V5 {0 0 1} V6 {0 1 1} V7 {1 1 1} V8 {1 0 1}
put {ReverseUnitCube.r} comb region yes tree {l ReverseUnitCube}
attr set {ReverseUnitCube.r} {region} {R} {region_id} {8415} {material_id} {1} {los} {100} {rgb} {230/230/230} {oshader} {plastic}
put {TopSlanted} arb8 V1 {0 0 0} V2 {1 0 0} V3 {1 1 0} V4 {0 1 0} V5 {0.2 0.2 1} V6 {1.2 0.2 1} V7 {1.2 1.2 1} V8 {0.2 1.2 1}
put {TopSlanted.r} comb region yes tree {l TopSlanted}
attr set {TopSlanted.r} {region} {R} {region_id} {8416} {material_id} {1} {los} {100} {rgb} {255/164/132} {oshader} {plastic}
put {UnevenSlanted} arb8 V1 {0 0 0} V2 {1 0 0} V3 {1 1 0} V4 {0 1 0} V5 {0.1 0.3 1} V6 {1.1 0.3 1} V7 {1.3 1.3 1} V8 {0.1 1.3 1}
put {UnevenSlanted.r} comb region yes tree {l UnevenSlanted}
attr set {UnevenSlanted.r} {region} {R} {region_id} {8417} {material_id} {1} {los} {100} {rgb} {255/132/178} {oshader} {plastic}
put {OppositeSlanted} arb8 V1 {0 0 0} V2 {1 0 0} V3 {1 1 0} V4 {0 1 0} V5 {-0.2 0.2 1} V6 {0.8 0.2 1} V7 {0.8 1.2 1} V8 {-0.2 1.2 1}
put {OppositeSlanted.r} comb region yes tree {l OppositeSlanted}
attr set {OppositeSlanted.r} {region} {R} {region_id} {8418} {material_id} {1} {los} {100} {rgb} {210/132/255} {oshader} {plastic}
put {PlanarARB6} arb8 V1 {0 0 0} V2 {1 0 0} V3 {1 1 0} V4 {0.5 0.5 0} V5 {0 0 1} V6 {1 0 1} V7 {1 1 1} V8 {0.5 0.5 1}
put {PlanarARB6.r} comb region yes tree {l PlanarARB6}
attr set {PlanarARB6.r} {region} {R} {region_id} {8419} {material_id} {1} {los} {100} {rgb} {165/152/255} {oshader} {plastic}
put {ConcavePlanar} arb8 V1 {0 0 0} V2 {1 0 0} V3 {1 1 0} V4 {0.6 0.4 0} V5 {0 0 1} V6 {1 0 1} V7 {1 1 1} V8 {0.6 0.4 1}
put {ConcavePlanar.r} comb region yes tree {l ConcavePlanar}
attr set {ConcavePlanar.r} {region} {R} {region_id} {8420} {material_id} {1} {los} {100} {rgb} {124/219/168} {oshader} {plastic}
put {MoreConcavePlanar} arb8 V1 {0 0 0} V2 {1 0 0} V3 {0.3 0.3 0} V4 {0 1 0} V5 {0 0 1} V6 {1 0 1} V7 {0.3 0.3 1} V8 {0 1 1}
put {MoreConcavePlanar.r} comb region yes tree {l MoreConcavePlanar}
attr set {MoreConcavePlanar.r} {region} {R} {region_id} {8421} {material_id} {1} {los} {100} {rgb} {61/184/132} {oshader} {plastic}
put {TwistedCubeNonPlanar} arb8 V1 {0 0 0} V2 {1 0 0} V3 {1 1 0} V4 {0 1 0} V5 {-0.183 0.317 1} V6 {0.683 -0.183 1} V7 {1.183 0.683 1} V8 {0.317 1.183 1}
put {TwistedCubeNonPlanar.r} comb region yes tree {l TwistedCubeNonPlanar}
attr set {TwistedCubeNonPlanar.r} {region} {R} {region_id} {8422} {material_id} {1} {los} {100} {rgb} {120/233/255} {oshader} {plastic}
put {LongConvexPlanar} arb8 V1 {4281 -119 1531} V2 {4281 78 1531} V3 {3322 78 1475} V4 {3322 -119 1475} V5 {4275 -119 1629} V6 {4275 78 1649} V7 {3315 78 1593} V8 {3315 -119 1573}
put {LongConvexPlanar.r} comb region yes tree {l LongConvexPlanar}
attr set {LongConvexPlanar.r} {region} {R} {region_id} {8423} {material_id} {1} {los} {100} {rgb} {255/216/128} {oshader} {plastic}
put {TaperedConvexPlanar} arb8 V1 {122.749 2.4 40.725} V2 {122.749 -7.4 40.725} V3 {122.611 -5 43.244} V4 {122.611 0 43.244} V5 {105.434 2.4 39.708} V6 {105.434 -7.4 39.708} V7 {105.295 -5 42.228} V8 {105.295 0 42.228}
put {TaperedConvexPlanar.r} comb region yes tree {l TaperedConvexPlanar}
attr set {TaperedConvexPlanar.r} {region} {R} {region_id} {8424} {material_id} {1} {los} {100} {rgb} {255/172/104} {oshader} {plastic}
put {BigConcavePlanar} arb8 V1 {500 -500 -500} V2 {500 500 -500} V3 {500 -169.922 -304.688} V4 {500 -500 500} V5 {400 -500 -500} V6 {400 500 -500} V7 {400 -169.922 -304.688} V8 {400 -500 500}
put {BigConcavePlanar.r} comb region yes tree {l BigConcavePlanar}
attr set {BigConcavePlanar.r} {region} {R} {region_id} {8425} {material_id} {1} {los} {100} {rgb} {255/115/87} {oshader} {plastic}
put {WarpedNonPlanar} arb8 V1 {0 0 0} V2 {1 0 0.1} V3 {1.1 1 0} V4 {0 1.1 -0.1} V5 {0.1 0 1} V6 {1 0.1 1.1} V7 {1.1 1.1 0.9} V8 {0 1 1}
put {WarpedNonPlanar.r} comb region yes tree {l WarpedNonPlanar}
attr set {WarpedNonPlanar.r} {region} {R} {region_id} {8426} {material_id} {1} {los} {100} {rgb} {255/99/156} {oshader} {plastic}
put {TwistedTopNonPlanar} arb8 V1 {0 0 0} V2 {1 0 -0.1} V3 {1.1 1.1 0} V4 {0 1.2 0.1} V5 {0.2 0 0.9} V6 {1 0.1 1.2} V7 {1.2 1.2 0.8} V8 {0 1 1}
put {TwistedTopNonPlanar.r} comb region yes tree {l TwistedTopNonPlanar}
attr set {TwistedTopNonPlanar.r} {region} {R} {region_id} {8427} {material_id} {1} {los} {100} {rgb} {216/118/255} {oshader} {plastic}
put {ComplexNonPlanar} arb8 V1 {0 0 0} V2 {0.8 0 0.1} V3 {1.1 0.9 0.2} V4 {0.1 1.1 -0.2} V5 {0.2 -0.2 0.8} V6 {1 0 1.1} V7 {1.1 0.9 0.9} V8 {0 1 0.9}
put {ComplexNonPlanar.r} comb region yes tree {l ComplexNonPlanar}
attr set {ComplexNonPlanar.r} {region} {R} {region_id} {8428} {material_id} {1} {los} {100} {rgb} {139/132/255} {oshader} {plastic}
put {ConcaveNonPlanar} arb8 V1 {0 0 0} V2 {1 0 0} V3 {1 1 0} V4 {0 1 0} V5 {0 0 1} V6 {0.4 0.4 1} V7 {1 1 1} V8 {0 1 1}
put {ConcaveNonPlanar.r} comb region yes tree {l ConcaveNonPlanar}
attr set {ConcaveNonPlanar.r} {region} {R} {region_id} {8429} {material_id} {1} {los} {100} {rgb} {110/207/255} {oshader} {plastic}
put {MoreConcaveNonPlanar} arb8 V1 {0 0 0} V2 {1 0 -0.05} V3 {1 1 0.03} V4 {0.7 0.3 0.32} V5 {0 0 1} V6 {1 0 1.1} V7 {1 1 0.92} V8 {0.7 0.3 0.7}
put {MoreConcaveNonPlanar.r} comb region yes tree {l MoreConcaveNonPlanar}
attr set {MoreConcaveNonPlanar.r} {region} {R} {region_id} {8430} {material_id} {1} {los} {100} {rgb} {89/188/197} {oshader} {plastic}
put {MostConcaveNonPlanar} arb8 V1 {0.2 0 0} V2 {1 0.3 0.1} V3 {1.1 1 -0.25} V4 {0.4 0.6 0} V5 {0 0.2 1} V6 {0.9 0 1.25} V7 {1 0.8 0.6} V8 {0.4 0.3 0.8}
put {MostConcaveNonPlanar.r} comb region yes tree {l MostConcaveNonPlanar}
attr set {MostConcaveNonPlanar.r} {region} {R} {region_id} {8431} {material_id} {1} {los} {100} {rgb} {71/226/179} {oshader} {plastic}
put {LargeSaddlePlanar} arb8 V1 {1000 -1000 -1000} V2 {1000 1000 -900} V3 {1000 1000 1100} V4 {1000 -1000 1000} V5 {-1000 -1000 -900} V6 {-1000 1000 -1000} V7 {-1000 1000 1000} V8 {-1000 -1000 1100}
put {LargeSaddlePlanar.r} comb region yes tree {l LargeSaddlePlanar}
attr set {LargeSaddlePlanar.r} {region} {R} {region_id} {8432} {material_id} {1} {los} {100} {rgb} {198/242/117} {oshader} {plastic}
put {groundplane} arb8 V1 {-1100 -800 -190} V2 {1100 -800 -190} V3 {1100 800 -190} V4 {-1100 800 -190} V5 {-1100 -800 -170} V6 {1100 -800 -170} V7 {1100 800 -170} V8 {-1100 800 -170}
put {groundplane.r} comb region yes tree {l groundplane}
attr set {groundplane.r} {region} {R} {region_id} {8433} {material_id} {1} {los} {100} {rgb} {240/240/240} {oshader} {stack {{checker {b {190 190 190} s 20}} {plastic {di .85 sp .15}}}}
put {lightpanel} arb8 V1 {-260 -160 1640} V2 {260 -160 1640} V3 {260 160 1640} V4 {-260 160 1640} V5 {-260 -160 1660} V6 {260 -160 1660} V7 {260 160 1660} V8 {-260 160 1660}
put {light.r} comb region yes tree {l lightpanel}
attr set {light.r} {region} {R} {region_id} {8434} {material_id} {1} {los} {100} {rgb} {255/255/245} {oshader} {light {s 32 v 0}} {shader} {light {s 32 v 0}}
put {SpanningUnitCube.place} comb region no tree {l SpanningUnitCube.r {49.4183462128 -6.50277282681 33.3997156149 -520 16.0569940398 56.3810489085 -12.7808554638 340 -30 19.4651295794 48.177886322 20 0 0 0 1}}
put {UnitCube_Q1.place} comb region no tree {l UnitCube_Q1.r {95.3783673293 -58.1118549187 43.8859814008 -372.171276719 66.7846517861 98.6327164348 -14.5395163089 396.483654405 -29.030627472 35.9805442786 110.736728785 16.1566772042 0 0 0 1}}
put {UnitCube_Q2.place} comb region no tree {l UnitCube_Q2.r {-95.3783673293 -58.1118549187 43.8859814008 -748.981217092 66.7846517861 -98.6327164348 14.5395163089 547.361506317 29.030627472 35.9805442786 110.736728785 16.1566772042 0 0 0 1}}
put {UnitCube_Q3.place} comb region no tree {l UnitCube_Q3.r {-95.3783673293 72.8090108537 1.34721346343 -720.363255156 -66.7846517861 -88.341657059 46.2121403301 107.408195052 29.030627472 35.9805442786 110.736728785 52.1372214828 0 0 0 1}}
put {UnitCube_Q4.place} comb region no tree {l UnitCube_Q4.r {95.3783673293 72.8090108537 1.34721346343 -343.553314783 -66.7846517861 88.341657059 -46.2121403301 308.746644227 -29.030627472 35.9805442786 110.736728785 52.1372214828 0 0 0 1}}
put {UnitCube_Q5.place} comb region no tree {l UnitCube_Q5.r {39.8232820043 -110.312342921 -25.402622104 -418.792147629 109.413568075 30.603715996 38.6274991197 505.434410305 -29.030627472 -35.9805442786 110.736728785 52.8739502678 0 0 0 1}}
put {UnitCube_Q6.place} comb region no tree {l UnitCube_Q6.r {-39.8232820043 -110.312342921 -25.402622104 -576.121413559 109.413568075 -30.603715996 -38.6274991197 606.824195257 29.030627472 -35.9805442786 110.736728785 52.8739502678 0 0 0 1}}
put {UnitCube_Q7.place} comb region no tree {l UnitCube_Q7.r {-39.8232820043 104.175846754 44.2888153308 -544.343942924 -109.413568075 -47.4636006473 13.2618903102 52.063058013 29.030627472 -35.9805442786 110.736728785 16.8934059891 0 0 0 1}}
put {UnitCube_Q8.place} comb region no tree {l UnitCube_Q8.r {39.8232820043 104.175846754 44.2888153308 -387.014676995 -109.413568075 47.4636006473 -13.2618903102 195.678336425 -29.030627472 -35.9805442786 110.736728785 16.8934059891 0 0 0 1}}
put {Elongated_X1.place} comb region no tree {l Elongated_X1.r {52.9768555715 8.7044814766 26.7896393402 702.252939592 0 57.0633909777 -18.5410196625 320.738814342 -28.1682937672 16.3707486802 50.3839837041 6.62263380786 0 0 0 1}}
put {Elongated_X2.place} comb region no tree {l Elongated_X2.r {-53.927642778 8.12784805209 -25.0149441426 336.571396097 0 -57.0633909777 -18.5410196625 320.738814342 -26.3022688073 -16.664558085 51.2882360724 -53.9763970787 0 0 0 1}}
put {Elongated_Y1.place} comb region no tree {l Elongated_Y1.r {24.8029823249 -45.5382654557 30.1840760513 592.506470812 53.190167245 27.696794106 -1.92190132524 487.570947797 -12.4747014491 27.5527489651 51.8191841717 -29.6722413613 0 0 0 1}}
put {Elongated_Y2.place} comb region no tree {l Elongated_Y2.r {-24.8029823249 50.4884080186 -20.8742119261 418.035614801 -53.190167245 -17.0811791223 21.8869693709 129.256350935 12.4747014491 27.5527489651 51.8191841717 10.3277586387 0 0 0 1}}
put {Elongated_Z1.place} comb region no tree {l Elongated_Z1.r {-28.1907786236 -48.449629644 21.3989109057 458.320204134 48.827860881 -14.3810251633 31.7651714468 495.981662898 -20.5212085995 32.3391326817 46.1850678792 29.0910379589 0 0 0 1}}
put {Elongated_Z2.place} comb region no tree {l Elongated_Z2.r {28.5316954889 37.2470428028 37.3978629734 615.642326343 -49.4183462128 33.7844747485 4.0541735977 125.193508762 -18.5410196625 -32.7302164431 46.7435933735 -7.9054016097 0 0 0 1}}
put {ReverseUnitCube.place} comb region no tree {l ReverseUnitCube.r {103.433991196 -60.555851917 5.86500332073 -784.3715713 48.2320622081 88.6693278124 64.8954426786 -345.89841635 -37.082039325 -53.5792786803 100.767967408 14.9466752985 0 0 0 1}}
put {TopSlanted.place} comb region no tree {l TopSlanted.r {96.3287340793 15.3039561576 -22.0581938655 -655.950517209 -20.4753045059 95.0207291039 -23.4909119866 -277.981798765 17.3648177667 27.1449805028 94.6657970834 -64.0387775034 0 0 0 1}}
put {UnevenSlanted.place} comb region no tree {l UnevenSlanted.r {88.2050542109 -14.8789457562 22.785860616 -499.054900804 21.9919900071 84.4965683945 -29.9565078782 -299.239309022 -16.0290625539 34.053736387 84.2859552411 -35.8590156121 0 0 0 1}}
put {OppositeSlanted.place} comb region no tree {l OppositeSlanted.r {82.3639103546 42.0405555876 -38.0628159361 -319.138489526 -47.5528258148 87.7679736664 -5.95915728267 -275.660075233 30.9016994375 23.0081395245 92.2806073208 -60.3058671501 0 0 0 1}}
put {PlanarARB6.place} comb region no tree {l PlanarARB6.r {115.594480895 8.17480470115 31.1622937968 -837.465789697 20.3824258028 71.3324119214 -94.3199010171 -433.697468354 -24.9494028981 96.1501928109 67.3250898065 -79.2629398596 0 0 0 1}}
put {ConcavePlanar.place} comb region no tree {l ConcavePlanar.r {107.244094838 -4.19493374266 53.6759411037 -678.362551099 -34.8457187174 85.7908832775 76.3262748569 -498.635719709 -41.0424171991 -83.7993250412 75.4532511765 6.69424553188 0 0 0 1}}
put {MoreConcavePlanar.place} comb region no tree {l MoreConcavePlanar.r {98.2385703033 -68.8300310449 3.40736424785 -456.407951753 52.2343743832 70.4997088106 -81.8618420903 -455.436120552 44.9527912099 68.4997655761 87.6757017563 -114.564129271 0 0 0 1}}
put {TwistedCubeNonPlanar.place} comb region no tree {l TwistedCubeNonPlanar.r {58.6764988003 -36.5971430924 54.1750992397 -318.127227474 52.8325568251 69.4213241451 -10.3259123031 -490.963984334 -38.5099104061 39.4785086222 68.3787827407 -18.6736904784 0 0 0 1}}
put {WarpedNonPlanar.place} comb region no tree {l WarpedNonPlanar.r {85.9669900169 48.3491658661 16.4934771193 257.879375705 -34.7329185229 78.9947205011 -50.5317573791 -244.078112398 -37.4606593416 37.7119648521 84.7024598739 -20.4894479677 0 0 0 1}}
put {TwistedTopNonPlanar.place} comb region no tree {l TwistedTopNonPlanar.r {83.4930920481 -37.5301552898 11.8785977012 485.889009209 27.1285501058 75.0409121486 46.407039684 -331.825549179 -28.5246456346 -38.4845294501 78.9049785729 30.8077668357 0 0 0 1}}
put {ComplexNonPlanar.place} comb region no tree {l ComplexNonPlanar.r {68.2221969569 -62.1661301805 -1.34690754179 691.058658649 49.5663274432 55.5767314233 -54.5446254664 -272.725927774 37.5449208993 39.589256647 74.4565627193 -51.9703252094 0 0 0 1}}
put {ConcaveNonPlanar.place} comb region no tree {l ConcaveNonPlanar.r {99.563920506 36.7265877365 56.0194920247 243.844999866 -52.9390755862 104.63063394 25.4928365894 -473.592197472 -41.0424171991 -45.8648906522 103.014231036 -8.05346159232 0 0 0 1}}
put {MoreConcaveNonPlanar.place} comb region no tree {l MoreConcaveNonPlanar.r {91.7377293852 -5.0835848262 49.4652906758 450.703650116 19.4994563335 99.1649372544 -25.9722011215 -480.696791205 -45.7430761867 32.0771132385 88.131144304 -21.4358692855 0 0 0 1}}
put {MostConcaveNonPlanar.place} comb region no tree {l MostConcaveNonPlanar.r {58.9095344445 52.9796505277 11.0825710686 635.568645257 -49.4309686252 45.9860647701 42.9169102771 -452.26445478 22.0509884654 -38.4504678375 66.5981638694 5.79810832812 0 0 0 1}}
put {LongConvexPlanar.place} comb region no tree {l LongConvexPlanar.r {0.115561944047 0.0319553637337 0.0324930028006 -639.003248908 -0.0245634494865 0.1182771118 -0.0289597166373 280.951739329 -0.0383872042702 0.0205154324115 0.116348798857 4.47834436767 0 0 0 1}}
put {TaperedConvexPlanar.place} comb region no tree {l TaperedConvexPlanar.r {5.7378157661 -3.26643327706 1.91741052485 -591.929831404 2.55464017008 5.90709171549 2.41840036102 -236.823025558 -2.7964018087 -1.30585617557 6.14357028226 90.775965566 0 0 0 1}}
put {BigConcavePlanar.place} comb region no tree {l BigConcavePlanar.r {0.0998972458041 0.0482115762187 -0.0457841042204 -194.953760612 -0.0576757017563 0.103947290059 -0.0163851858765 -114.04593421 0.033076482698 0.0356455440104 0.109705703974 -4.88441721412 0 0 0 1}}
put {LargeSaddlePlanar.place} comb region no tree {l LargeSaddlePlanar.r {0.0470204253358 -0.0323394992732 0.0029227573361 149.853862133 0.0293816227061 0.0445634112955 0.0203992338904 -141.019961695 -0.01382410832 -0.0152828427629 0.0532976065944 41.3351196703 0 0 0 1}}
put {arb8_quadrants.c} comb region no tree {u {u {u {u {u {u {u {u {l SpanningUnitCube.place} {l UnitCube_Q1.place}} {l UnitCube_Q2.place}} {l UnitCube_Q3.place}} {l UnitCube_Q4.place}} {l UnitCube_Q5.place}} {l UnitCube_Q6.place}} {l UnitCube_Q7.place}} {l UnitCube_Q8.place}}
attr set {arb8_quadrants.c} {inherit} {1}
put {arb8_axes.c} comb region no tree {u {u {u {u {u {l Elongated_X1.place} {l Elongated_X2.place}} {l Elongated_Y1.place}} {l Elongated_Y2.place}} {l Elongated_Z1.place}} {l Elongated_Z2.place}}
attr set {arb8_axes.c} {inherit} {1}
put {arb8_planar.c} comb region no tree {u {u {u {u {u {u {u {l ReverseUnitCube.place} {l TopSlanted.place}} {l UnevenSlanted.place}} {l OppositeSlanted.place}} {l PlanarARB6.place}} {l ConcavePlanar.place}} {l MoreConcavePlanar.place}} {l TwistedCubeNonPlanar.place}}
attr set {arb8_planar.c} {inherit} {1}
put {arb8_nonplanar.c} comb region no tree {u {u {u {u {u {l WarpedNonPlanar.place} {l TwistedTopNonPlanar.place}} {l ComplexNonPlanar.place}} {l ConcaveNonPlanar.place}} {l MoreConcaveNonPlanar.place}} {l MostConcaveNonPlanar.place}}
attr set {arb8_nonplanar.c} {inherit} {1}
put {arb8_large_planars.c} comb region no tree {u {u {u {l LongConvexPlanar.place} {l TaperedConvexPlanar.place}} {l BigConcavePlanar.place}} {l LargeSaddlePlanar.place}}
attr set {arb8_large_planars.c} {inherit} {1}
put {arb8_small_gallery.c} comb region no tree {u {u {u {l arb8_quadrants.c} {l arb8_axes.c}} {l arb8_planar.c}} {l arb8_nonplanar.c}}
attr set {arb8_small_gallery.c} {inherit} {1}
put {arb8_large_gallery.c} comb region no tree {l arb8_large_planars.c}
attr set {arb8_large_gallery.c} {inherit} {1}
put {arb8_showcase} comb region no tree {u {u {u {l arb8_small_gallery.c} {l arb8_large_gallery.c}} {l groundplane.r}} {l light.r}}
attr set {arb8_showcase} {inherit} {1}
+350
View File
@@ -0,0 +1,350 @@
title {Small bicycle wheel by lbutler}
units in
put {rcastooth.s28_1_1_29} comb region no tree {l rcastooth.s {1 0 0 53.4214 0 1 0 -37.1824 0 0 1 0 0 0 0 1}}
put {rcastooth.s18_1_1_19} comb region no tree {l rcastooth.s {1 0 0 34.6765 0 1 0 -25.1939 0 0 1 0 0 0 0 1}}
put {rcastooth.s27_1_1_28} comb region no tree {l rcastooth.s {1 0 0 44.8431 0 1 0 -47.175 0 0 1 0 0 0 0 1}}
put {rcastooth.s17_1_1_18} comb region no tree {l rcastooth.s {1 0 0 25.1939 0 1 0 -34.6765 0 0 1 0 0 0 0 1}}
put {rcastooth.s26_1_1_27} comb region no tree {l rcastooth.s {1 0 0 55.6095 0 1 0 -13.1797 0 0 1 0 0 0 0 1}}
put {rcastooth.s16_1_1_17} comb region no tree {l rcastooth.s {1 0 0 34.0469 0 1 0 -13.1898 0 0 1 0 0 0 0 1}}
put {rcastooth.s25_1_1_26} comb region no tree {l rcastooth.s {1 0 0 51.0711 0 1 0 -25.6489 0 0 1 0 0 0 0 1}}
put {rcastooth.s15_1_1_16} comb region no tree {l rcastooth.s {1 0 0 26.9831 0 1 0 -24.5983 0 0 1 0 0 0 0 1}}
put {rcastooth.s24_1_1_25} comb region no tree {l rcastooth.s {1 0 0 43.7794 0 1 0 -36.7353 0 0 1 0 0 0 0 1}}
put {rcastooth.s29_1_1_30} comb region no tree {l rcastooth.s {1 0 0 59.8127 0 1 0 -25.6676 0 0 1 0 0 0 0 1}}
put {rhspkh2_1_1_18} comb region no tree {l rhspkh2 {1 0 0 1.18e-05 0 1 0 -7.67456 0 0 1 0 0 0 0 1}}
put {rcastooth.s14_1_1_15} comb region no tree {l rcastooth.s {1 0 0 29.8752 0 1 0 -13.3013 0 0 1 0 0 0 0 1}}
put {rcastooth.s23_1_1_24} comb region no tree {l rcastooth.s {1 0 0 34.1276 0 1 0 -45.8413 0 0 1 0 0 0 0 1}}
put {rhspkh2_1_1_17} comb region no tree {l rhspkh2 {1 0 0 -2.62489 0 1 0 -14.8863 0 0 1 0 0 0 0 1}}
put {rcastooth.s19_1_1_20} comb region no tree {l rcastooth.s {1 0 0 40.7647 0 1 0 -13.2452 0 0 1 0 0 0 0 1}}
put {rhspkh2_1_1_16} comb region no tree {l rhspkh2 {1 0 0 -7.55799 0 1 0 -20.7653 0 0 1 0 0 0 0 1}}
put {rhspkh2_1_1_15} comb region no tree {l rhspkh2 {1 0 0 -14.2043 0 1 0 -24.6026 0 0 1 0 0 0 0 1}}
put {rcastooth.s13_1_1_14} comb region no tree {l rcastooth.s {1 0 0 21.8822 0 1 0 -24.3027 0 0 1 0 0 0 0 1}}
put {rcastooth.s22_1_1_23} comb region no tree {l rcastooth.s {1 0 0 47.3876 0 1 0 -13.2774 0 0 1 0 0 0 0 1}}
put {rhspkh2_1_1_14} comb region no tree {l rhspkh2 {1 0 0 -21.7623 0 1 0 -25.9353 0 0 1 0 0 0 0 1}}
put {rhspkh2_1_1_13} comb region no tree {l rhspkh2 {1 0 0 -29.3202 0 1 0 -24.6026 0 0 1 0 0 0 0 1}}
put {rcastooth.s12_1_1_13} comb region no tree {l rcastooth.s {1 0 0 25.5268 0 1 0 -13.3975 0 0 1 0 0 0 0 1}}
put {rcastooth.s21_1_1_22} comb region no tree {l rcastooth.s {1 0 0 42.0481 0 1 0 -25.57 0 0 1 0 0 0 0 1}}
put {rcastooth.s30_1_1_31} comb region no tree {l rcastooth.s {1 0 0 63.7552 0 1 0 -13.102 0 0 1 0 0 0 0 1}}
put {rhspkh2_1_1_12} comb region no tree {l rhspkh2 {1 0 0 -35.9666 0 1 0 -20.7654 0 0 1 0 0 0 0 1}}
put {rhspkh2_1_1_11} comb region no tree {l rhspkh2 {1 0 0 -40.8997 0 1 0 -14.8863 0 0 1 0 0 0 0 1}}
put {rcastooth.s11_1_1_12} comb region no tree {l rcastooth.s {1 0 0 16.3767 0 1 0 -23.7258 0 0 1 0 0 0 0 1}}
put {rcastooth.s20_1_1_21} comb region no tree {l rcastooth.s {1 0 0 33.5901 0 1 0 -35.9663 0 0 1 0 0 0 0 1}}
put {rhspkh2_1_1_10} comb region no tree {l rhspkh2 {1 0 0 -43.5246 0 1 0 -7.67456 0 0 1 0 0 0 0 1}}
put {rcastooth.s10_1_1_11} comb region no tree {l rcastooth.s {1 0 0 20.8336 0 1 0 -13.389 0 0 1 0 0 0 0 1}}
put {rhspkh2_1_1_9} comb region no tree {l rhspkh2 {1 0 0 -43.5246 0 1 0 4e-07 0 0 1 0 0 0 0 1}}
put {rhspkh2_1_1_8} comb region no tree {l rhspkh2 {1 0 0 -40.8997 0 1 0 7.21172 0 0 1 0 0 0 0 1}}
put {rhspkh2_1_1_7} comb region no tree {l rhspkh2 {1 0 0 -35.9666 0 1 0 13.0907 0 0 1 0 0 0 0 1}}
put {rhspkh2_1_1_6} comb region no tree {l rhspkh2 {1 0 0 -29.3202 0 1 0 16.928 0 0 1 0 0 0 0 1}}
put {rhspkh2_1_1_5} comb region no tree {l rhspkh2 {1 0 0 -21.7623 0 1 0 18.2607 0 0 1 0 0 0 0 1}}
put {rhspkh2_1_1_4} comb region no tree {l rhspkh2 {1 0 0 -14.2043 0 1 0 16.928 0 0 1 0 0 0 0 1}}
put {rhspkh2_1_1_3} comb region no tree {l rhspkh2 {1 0 0 -7.55799 0 1 0 13.0908 0 0 1 0 0 0 0 1}}
put {rhspkh2_1_1_2} comb region no tree {l rhspkh2 {1 0 0 -2.62489 0 1 0 7.21172 0 0 1 0 0 0 0 1}}
put {rhspkh2_1_1_1} comb region no tree {l rhspkh2 {1 0 0 1.18e-05 0 1 0 4e-07 0 0 1 0 0 0 0 1}}
put {rhspkh_1_1_18} comb region no tree {l rhspkh {1 0 0 -1.3327 0 1 0 -7.55796 0 0 1 0 0 0 0 1}}
put {rhspkh_1_1_17} comb region no tree {l rhspkh {1 0 0 -5.1699 0 1 0 -14.2043 0 0 1 0 0 0 0 1}}
put {rhspkh_1_1_16} comb region no tree {l rhspkh {1 0 0 -11.049 0 1 0 -19.1374 0 0 1 0 0 0 0 1}}
put {rhspkh_1_1_15} comb region no tree {l rhspkh {1 0 0 -18.2607 0 1 0 -21.7623 0 0 1 0 0 0 0 1}}
put {rhspkh_1_1_14} comb region no tree {l rhspkh {1 0 0 -25.9353 0 1 0 -21.7623 0 0 1 0 0 0 0 1}}
put {rhspkh_1_1_13} comb region no tree {l rhspkh {1 0 0 -33.147 0 1 0 -19.1374 0 0 1 0 0 0 0 1}}
put {rhspkh_1_1_12} comb region no tree {l rhspkh {1 0 0 -39.0261 0 1 0 -14.2043 0 0 1 0 0 0 0 1}}
put {rhspkh_1_1_11} comb region no tree {l rhspkh {1 0 0 -42.8633 0 1 0 -7.55796 0 0 1 0 0 0 0 1}}
put {rhspkh_1_1_10} comb region no tree {l rhspkh {1 0 0 -44.196 0 1 0 -4.57038e-12 0 0 1 0 0 0 0 1}}
put {rcastooth.s9_1_1_10} comb region no tree {l rcastooth.s {1 0 0 18.4941 0 1 0 -13.4368 0 0 1 0 0 0 0 1}}
put {rcastooth.s} tgc V {0 0 -0.3755760995733843365940174} H {0 0 2.57364612783325474865137} A {0 -4.762499999999999289457264 0} B {4.762499999999999289457264 0 0} C {0 -4.762499999999999289457264 0} D {4.762499999999999289457264 0 0}
put {rcassette.r} comb region yes tree {u {u {u {u {l rcas11t.c1} {l rcas12t.c1}} {u {l rcas14t.c1} {l rcas16t.c1}}} {u {u {l rcas18t.c1} {l rcas21t.c1}} {u {l rcas24t.c1} {l rcas28t.c1}}}} {u {l rcas32t.c1} {l rcas.s2}}}
attr set {rcassette.r} {region} {R} {region_id} {1002} {material_id} {1} {los} {100}
put {rhspkh_1_1_9} comb region no tree {l rhspkh {1 0 0 -42.8633 0 1 0 7.55796 0 0 1 0 0 0 0 1}}
put {rhspkh_1_1_8} comb region no tree {l rhspkh {1 0 0 -39.0261 0 1 0 14.2043 0 0 1 0 0 0 0 1}}
put {rhspkh_1_1_7} comb region no tree {l rhspkh {1 0 0 -33.147 0 1 0 19.1374 0 0 1 0 0 0 0 1}}
put {rhspkh_1_1_6} comb region no tree {l rhspkh {1 0 0 -25.9353 0 1 0 21.7623 0 0 1 0 0 0 0 1}}
put {rhspkh_1_1_5} comb region no tree {l rhspkh {1 0 0 -18.2607 0 1 0 21.7623 0 0 1 0 0 0 0 1}}
put {rhspkh_1_1_4} comb region no tree {l rhspkh {1 0 0 -11.049 0 1 0 19.1374 0 0 1 0 0 0 0 1}}
put {rhspkh_1_1_3} comb region no tree {l rhspkh {1 0 0 -5.1699 0 1 0 14.2043 0 0 1 0 0 0 0 1}}
put {rhspkh_1_1_2} comb region no tree {l rhspkh {1 0 0 -1.3327 0 1 0 7.55796 0 0 1 0 0 0 0 1}}
put {rhspkh_1_1_1} comb region no tree {l rhspkh}
put {rcastooth.s8_1_1_9} comb region no tree {l rcastooth.s {1 0 0 7.06413 0 1 0 -21.7412 0 0 1 0 0 0 0 1}}
put {rcastooth.s7_1_1_8} comb region no tree {l rcastooth.s {1 0 0 -7.06413 0 1 0 -21.7412 0 0 1 0 0 0 0 1}}
put {rcastooth.s6_1_1_7} comb region no tree {l rcastooth.s {1 0 0 -18.4941 0 1 0 -13.4368 0 0 1 0 0 0 0 1}}
put {rcastooth.s5_1_1_6} comb region no tree {l rcastooth.s {1 0 0 -22.86 0 1 0 -4.72798e-12 0 0 1 0 0 0 0 1}}
put {rcastooth.s4_1_1_5} comb region no tree {l rcastooth.s {1 0 0 -18.4941 0 1 0 13.4368 0 0 1 0 0 0 0 1}}
put {rcastooth.s3_1_1_4} comb region no tree {l rcastooth.s {1 0 0 -7.06413 0 1 0 21.7412 0 0 1 0 0 0 0 1}}
put {rcastooth.s2_1_1_3} comb region no tree {l rcastooth.s {1 0 0 7.06413 0 1 0 21.7412 0 0 1 0 0 0 0 1}}
put {rcastooth.s1_1_1_2} comb region no tree {l rcastooth.s {1 0 0 18.4941 0 1 0 13.4368 0 0 1 0 0 0 0 1}}
put {rcas28t.s1-1} comb region no tree {u {u {u {u {u {l rcastooth.s_1_1_8} {l rcastooth.s1_1__7}} {u {l rcastooth.s2_1__7} {l rcastooth.s3_1__7}}} {u {u {l rcastooth.s4_1__7} {l rcastooth.s5_1__7}} {u {l rcastooth.s6_1__7} {l rcastooth.s7_1__7}}}} {u {u {u {l rcastooth.s8_1__7} {l rcastooth.s9_1__7}} {u {l rcastooth.s10_1_6} {l rcastooth.s11_1_5}}} {u {u {l rcastooth.s12_1_5} {l rcastooth.s13_1_4}} {u {l rcastooth.s14_1_4} {l rcastooth.s15_1_3}}}}} {u {u {u {u {l rcastooth.s16_1_3} {l rcastooth.s17_1_2}} {u {l rcastooth.s18_1_2} {l rcastooth.s19_1_2}}} {u {u {l rcastooth.s20_1_1} {l rcastooth.s21_1_1}} {u {l rcastooth.s22_1_1} {l rcastooth.s23_1_1_24}}}} {u {u {l rcastooth.s24_1_1_25} {l rcastooth.s25_1_1_26}} {l rcastooth.s26_1_1_27}}}}
put {rcas18t.s1-1} comb region no tree {u {u {u {u {u {l rcastooth.s_1_1_5} {l rcastooth.s1_1__4}} {u {l rcastooth.s2_1__4} {l rcastooth.s3_1__4}}} {u {u {l rcastooth.s4_1__4} {l rcastooth.s5_1__4}} {u {l rcastooth.s6_1__4} {l rcastooth.s7_1__4}}}} {u {u {u {l rcastooth.s8_1__4} {l rcastooth.s9_1__4}} {u {l rcastooth.s10_1_3} {l rcastooth.s11_1_2}}} {u {u {l rcastooth.s12_1_2} {l rcastooth.s13_1_1}} {u {l rcastooth.s14_1_1} {l rcastooth.s15_1_1_16}}}}} {l rcastooth.s16_1_1_17}}
put {rcas16t.s1-1} comb region no tree {u {u {u {u {l rcastooth.s_1_1_4} {l rcastooth.s1_1__3}} {u {l rcastooth.s2_1__3} {l rcastooth.s3_1__3}}} {u {u {l rcastooth.s4_1__3} {l rcastooth.s5_1__3}} {u {l rcastooth.s6_1__3} {l rcastooth.s7_1__3}}}} {u {u {u {l rcastooth.s8_1__3} {l rcastooth.s9_1__3}} {u {l rcastooth.s10_1_2} {l rcastooth.s11_1_1}}} {u {u {l rcastooth.s12_1_1} {l rcastooth.s13_1_1_14}} {l rcastooth.s14_1_1_15}}}}
put {rcas24t.s1-1} comb region no tree {u {u {u {u {u {l rcastooth.s_1_1_7} {l rcastooth.s1_1__6}} {u {l rcastooth.s2_1__6} {l rcastooth.s3_1__6}}} {u {u {l rcastooth.s4_1__6} {l rcastooth.s5_1__6}} {u {l rcastooth.s6_1__6} {l rcastooth.s7_1__6}}}} {u {u {u {l rcastooth.s8_1__6} {l rcastooth.s9_1__6}} {u {l rcastooth.s10_1_5} {l rcastooth.s11_1_4}}} {u {u {l rcastooth.s12_1_4} {l rcastooth.s13_1_3}} {u {l rcastooth.s14_1_3} {l rcastooth.s15_1_2}}}}} {u {u {u {l rcastooth.s16_1_2} {l rcastooth.s17_1_1}} {u {l rcastooth.s18_1_1} {l rcastooth.s19_1_1}}} {u {u {l rcastooth.s20_1_1_21} {l rcastooth.s21_1_1_22}} {l rcastooth.s22_1_1_23}}}}
put {rcas14t.s1-1} comb region no tree {u {u {u {u {l rcastooth.s_1_1_3} {l rcastooth.s1_1__2}} {u {l rcastooth.s2_1__2} {l rcastooth.s3_1__2}}} {u {u {l rcastooth.s4_1__2} {l rcastooth.s5_1__2}} {u {l rcastooth.s6_1__2} {l rcastooth.s7_1__2}}}} {u {u {u {l rcastooth.s8_1__2} {l rcastooth.s9_1__2}} {u {l rcastooth.s10_1_1} {l rcastooth.s11_1_1_12}}} {l rcastooth.s12_1_1_13}}}
put {rcas32t.s1-1} comb region no tree {u {u {u {u {u {l rcastooth.s_1_1_9} {l rcastooth.s1_1__8}} {u {l rcastooth.s2_1__8} {l rcastooth.s3_1__8}}} {u {u {l rcastooth.s4_1__8} {l rcastooth.s5_1__8}} {u {l rcastooth.s6_1__8} {l rcastooth.s7_1__8}}}} {u {u {u {l rcastooth.s8_1__8} {l rcastooth.s9_1__8}} {u {l rcastooth.s10_1_7} {l rcastooth.s11_1_6}}} {u {u {l rcastooth.s12_1_6} {l rcastooth.s13_1_5}} {u {l rcastooth.s14_1_5} {l rcastooth.s15_1_4}}}}} {u {u {u {u {l rcastooth.s16_1_4} {l rcastooth.s17_1_3}} {u {l rcastooth.s18_1_3} {l rcastooth.s19_1_3}}} {u {u {l rcastooth.s20_1_2} {l rcastooth.s21_1_2}} {u {l rcastooth.s22_1_2} {l rcastooth.s23_1_1}}}} {u {u {u {l rcastooth.s24_1_1} {l rcastooth.s25_1_1}} {u {l rcastooth.s26_1_1} {l rcastooth.s27_1_1_28}}} {u {u {l rcastooth.s28_1_1_29} {l rcastooth.s29_1_1_30}} {l rcastooth.s30_1_1_31}}}}}
put {rcas12t.s1-1} comb region no tree {u {u {u {u {l rcastooth.s_1_1_2} {l rcastooth.s1_1__1}} {u {l rcastooth.s2_1__1} {l rcastooth.s3_1__1}}} {u {u {l rcastooth.s4_1__1} {l rcastooth.s5_1__1}} {u {l rcastooth.s6_1__1} {l rcastooth.s7_1__1}}}} {u {u {l rcastooth.s8_1__1} {l rcastooth.s9_1__1}} {l rcastooth.s10_1_1_11}}}
put {rcas21t.s1-1} comb region no tree {u {u {u {u {u {l rcastooth.s_1_1_6} {l rcastooth.s1_1__5}} {u {l rcastooth.s2_1__5} {l rcastooth.s3_1__5}}} {u {u {l rcastooth.s4_1__5} {l rcastooth.s5_1__5}} {u {l rcastooth.s6_1__5} {l rcastooth.s7_1__5}}}} {u {u {u {l rcastooth.s8_1__5} {l rcastooth.s9_1__5}} {u {l rcastooth.s10_1_4} {l rcastooth.s11_1_3}}} {u {u {l rcastooth.s12_1_3} {l rcastooth.s13_1_2}} {u {l rcastooth.s14_1_2} {l rcastooth.s15_1_1}}}}} {u {u {l rcastooth.s16_1_1} {l rcastooth.s17_1_1_18}} {u {l rcastooth.s18_1_1_19} {l rcastooth.s19_1_1_20}}}}
put {rcas11t.s1-1} comb region no tree {u {u {u {u {l rcastooth.s_1_1_1} {l rcastooth.s1_1_1_2}} {u {l rcastooth.s2_1_1_3} {l rcastooth.s3_1_1_4}}} {u {u {l rcastooth.s4_1_1_5} {l rcastooth.s5_1_1_6}} {u {l rcastooth.s6_1_1_7} {l rcastooth.s7_1_1_8}}}} {u {l rcastooth.s8_1_1_9} {l rcastooth.s9_1_1_10}}}
put {rcastooth.s9_1__8} comb region no tree {l rcastooth.s {1 0 0 -16.3143 0 1 0 63.0097 0 0 1 0 0 0 0 1}}
put {rcastooth.s8_1__8} comb region no tree {l rcastooth.s {1 0 0 -3.29663 0 1 0 65.004 0 0 1 0 0 0 0 1}}
put {rcastooth.s9_1__7} comb region no tree {l rcastooth.s {1 0 0 -28.575 0 1 0 49.4934 0 0 1 0 0 0 0 1}}
put {rcastooth.s7_1__8} comb region no tree {l rcastooth.s {1 0 0 9.85606 0 1 0 64.3369 0 0 1 0 0 0 0 1}}
put {rcastooth.s8_1__7} comb region no tree {l rcastooth.s {1 0 0 -16.3908 0 1 0 54.7491 0 0 1 0 0 0 0 1}}
put {rcastooth.s9_1__6} comb region no tree {l rcastooth.s {1 0 0 -38.1747 0 1 0 31.0574 0 0 1 0 0 0 0 1}}
put {rcastooth.s6_1__8} comb region no tree {l rcastooth.s {1 0 0 22.6052 0 1 0 61.0359 0 0 1 0 0 0 0 1}}
put {rcastooth.s7_1__7} comb region no tree {l rcastooth.s {1 0 0 -3.32298 0 1 0 57.0533 0 0 1 0 0 0 0 1}}
put {rcastooth.s8_1__6} comb region no tree {l rcastooth.s {1 0 0 -28.3799 0 1 0 40.2051 0 0 1 0 0 0 0 1}}
put {rcastooth.s5_1__8} comb region no tree {l rcastooth.s {1 0 0 34.4289 0 1 0 55.2361 0 0 1 0 0 0 0 1}}
put {rcastooth.s9_1__5} comb region no tree {l rcastooth.s {1 0 0 -40.7647 0 1 0 13.2452 0 0 1 0 0 0 0 1}}
put {rcastooth.s6_1__7} comb region no tree {l rcastooth.s {1 0 0 9.92399 0 1 0 56.2818 0 0 1 0 0 0 0 1}}
put {rcastooth.s7_1__6} comb region no tree {l rcastooth.s {1 0 0 -16.4803 0 1 0 46.371 0 0 1 0 0 0 0 1}}
put {rcastooth.s4_1__8} comb region no tree {l rcastooth.s {1 0 0 44.8431 0 1 0 47.175 0 0 1 0 0 0 0 1}}
put {rcastooth.s8_1__5} comb region no tree {l rcastooth.s {1 0 0 -34.6765 0 1 0 25.1939 0 0 1 0 0 0 0 1}}
put {rcastooth.s5_1__7} comb region no tree {l rcastooth.s {1 0 0 22.636 0 1 0 52.4761 0 0 1 0 0 0 0 1}}
put {rcastooth.s9_1__4} comb region no tree {l rcastooth.s {1 0 0 -35.8908 0 1 0 -6.70915 0 0 1 0 0 0 0 1}}
put {rcastooth.s6_1__6} comb region no tree {l rcastooth.s {1 0 0 -3.35838 0 1 0 49.0978 0 0 1 0 0 0 0 1}}
put {rcastooth.s3_1__8} comb region no tree {l rcastooth.s {1 0 0 53.4214 0 1 0 37.1824 0 0 1 0 0 0 0 1}}
put {rcastooth.s7_1__5} comb region no tree {l rcastooth.s {1 0 0 -25.1939 0 1 0 34.6765 0 0 1 0 0 0 0 1}}
put {rcastooth.s4_1__7} comb region no tree {l rcastooth.s {1 0 0 34.1276 0 1 0 45.8413 0 0 1 0 0 0 0 1}}
put {rcastooth.s8_1__4} comb region no tree {l rcastooth.s {1 0 0 -35.8908 0 1 0 6.70915 0 0 1 0 0 0 0 1}}
put {rcastooth.s5_1__6} comb region no tree {l rcastooth.s {1 0 0 10.0126 0 1 0 48.1832 0 0 1 0 0 0 0 1}}
put {rcastooth.s2_1__8} comb region no tree {l rcastooth.s {1 0 0 59.8127 0 1 0 25.6676 0 0 1 0 0 0 0 1}}
put {rcastooth.s9_1__3} comb region no tree {l rcastooth.s {1 0 0 -26.4569 0 1 0 -19.222 0 0 1 0 0 0 0 1}}
put {rcastooth.s6_1__5} comb region no tree {l rcastooth.s {1 0 0 -13.2452 0 1 0 40.7647 0 0 1 0 0 0 0 1}}
put {rcastooth.s3_1__7} comb region no tree {l rcastooth.s {1 0 0 43.7794 0 1 0 36.7353 0 0 1 0 0 0 0 1}}
put {rcastooth.s7_1__4} comb region no tree {l rcastooth.s {1 0 0 -31.0436 0 1 0 19.2214 0 0 1 0 0 0 0 1}}
put {rcastooth.s4_1__6} comb region no tree {l rcastooth.s {1 0 0 22.641 0 1 0 43.6951 0 0 1 0 0 0 0 1}}
put {rcastooth.s1_1__8} comb region no tree {l rcastooth.s {1 0 0 63.7552 0 1 0 13.102 0 0 1 0 0 0 0 1}}
put {rcastooth.s8_1__3} comb region no tree {l rcastooth.s {1 0 0 -31.9879 0 1 0 -6.79923 0 0 1 0 0 0 0 1}}
put {rcastooth.s5_1__5} comb region no tree {l rcastooth.s {1 0 0 -2.18745e-10 0 1 0 42.8625 0 0 1 0 0 0 0 1}}
put {rcastooth.s2_1__7} comb region no tree {l rcastooth.s {1 0 0 51.0711 0 1 0 25.6489 0 0 1 0 0 0 0 1}}
put {rcastooth.s9_1__2} comb region no tree {l rcastooth.s {1 0 0 -10.2229 0 1 0 -26.9556 0 0 1 0 0 0 0 1}}
put {rcastooth.s6_1__4} comb region no tree {l rcastooth.s {1 0 0 -22.0037 0 1 0 29.1376 0 0 1 0 0 0 0 1}}
put {rcastooth.s3_1__6} comb region no tree {l rcastooth.s {1 0 0 33.5901 0 1 0 35.9663 0 0 1 0 0 0 0 1}}
put {rcastooth.s7_1__3} comb region no tree {l rcastooth.s {1 0 0 -31.9879 0 1 0 6.79923 0 0 1 0 0 0 0 1}}
put {rcastooth.s4_1__5} comb region no tree {l rcastooth.s {1 0 0 13.2452 0 1 0 40.7647 0 0 1 0 0 0 0 1}}
put {rcastooth.s1_1__7} comb region no tree {l rcastooth.s {1 0 0 55.6095 0 1 0 13.1797 0 0 1 0 0 0 0 1}}
put {rcastooth.s8_1__2} comb region no tree {l rcastooth.s {1 0 0 -21.5788 0 1 0 -19.1172 0 0 1 0 0 0 0 1}}
put {rcastooth.s5_1__4} comb region no tree {l rcastooth.s {1 0 0 -9.99212 0 1 0 35.1187 0 0 1 0 0 0 0 1}}
put {rcastooth.s2_1__6} comb region no tree {l rcastooth.s {1 0 0 42.0481 0 1 0 25.57 0 0 1 0 0 0 0 1}}
put {rcastooth.s9_1__1} comb region no tree {l rcastooth.s {1 0 0 10.2878 0 1 0 -22.527 0 0 1 0 0 0 0 1}}
put {rcastooth.s6_1__3} comb region no tree {l rcastooth.s {1 0 0 -26.4569 0 1 0 19.222 0 0 1 0 0 0 0 1}}
put {rcastooth.s3_1__5} comb region no tree {l rcastooth.s {1 0 0 25.1939 0 1 0 34.6765 0 0 1 0 0 0 0 1}}
put {rcastooth.s7_1__2} comb region no tree {l rcastooth.s {1 0 0 -27.9913 0 1 0 -6.89923 0 0 1 0 0 0 0 1}}
put {rcastooth.s4_1__4} comb region no tree {l rcastooth.s {1 0 0 3.36895 0 1 0 36.3567 0 0 1 0 0 0 0 1}}
put {rcastooth.s1_1__6} comb region no tree {l rcastooth.s {1 0 0 47.3876 0 1 0 13.2774 0 0 1 0 0 0 0 1}}
put {rcastooth.s8_1__1} comb region no tree {l rcastooth.s {1 0 0 -3.52443 0 1 0 -24.5129 0 0 1 0 0 0 0 1}}
put {rcastooth.s5_1__3} comb region no tree {l rcastooth.s {1 0 0 -16.3513 0 1 0 28.3212 0 0 1 0 0 0 0 1}}
put {rcastooth.s2_1__5} comb region no tree {l rcastooth.s {1 0 0 34.6765 0 1 0 25.1939 0 0 1 0 0 0 0 1}}
put {rcastooth.s6_1__2} comb region no tree {l rcastooth.s {1 0 0 -27.9913 0 1 0 6.89923 0 0 1 0 0 0 0 1}}
put {rcastooth.s3_1__4} comb region no tree {l rcastooth.s {1 0 0 16.275 0 1 0 32.6846 0 0 1 0 0 0 0 1}}
put {rcastooth.s7_1__1} comb region no tree {l rcastooth.s {1 0 0 -16.2176 0 1 0 -18.7161 0 0 1 0 0 0 0 1}}
put {rcastooth.s4_1__3} comb region no tree {l rcastooth.s {1 0 0 -3.41834 0 1 0 32.5234 0 0 1 0 0 0 0 1}}
put {rcastooth.s1_1__5} comb region no tree {l rcastooth.s {1 0 0 40.7647 0 1 0 13.2452 0 0 1 0 0 0 0 1}}
put {rcastooth.s5_1__2} comb region no tree {l rcastooth.s {1 0 0 -21.5788 0 1 0 19.1172 0 0 1 0 0 0 0 1}}
put {rcastooth.s2_1__4} comb region no tree {l rcastooth.s {1 0 0 26.9831 0 1 0 24.5983 0 0 1 0 0 0 0 1}}
put {rcastooth.s6_1__1} comb region no tree {l rcastooth.s {1 0 0 -23.7618 0 1 0 -6.97711 0 0 1 0 0 0 0 1}}
put {rcastooth.s3_1__3} comb region no tree {l rcastooth.s {1 0 0 10.1056 0 1 0 31.1019 0 0 1 0 0 0 0 1}}
put {rcastooth.s4_1__2} comb region no tree {l rcastooth.s {1 0 0 -10.2229 0 1 0 26.9556 0 0 1 0 0 0 0 1}}
put {rcastooth.s1_1__4} comb region no tree {l rcastooth.s {1 0 0 34.0469 0 1 0 13.1898 0 0 1 0 0 0 0 1}}
put {rcastooth.s5_1__1} comb region no tree {l rcastooth.s {1 0 0 -23.7618 0 1 0 6.97711 0 0 1 0 0 0 0 1}}
put {rcastooth.s2_1__3} comb region no tree {l rcastooth.s {1 0 0 21.8822 0 1 0 24.3027 0 0 1 0 0 0 0 1}}
put {rcastooth.s_1_1_9} comb region no tree {l rcastooth.s {1 0 0 65.0875 0 1 0 0 0 0 1 0 0 0 0 1}}
put {rcastooth.s3_1__2} comb region no tree {l rcastooth.s {1 0 0 3.47495 0 1 0 28.6188 0 0 1 0 0 0 0 1}}
put {rcastooth.s4_1__1} comb region no tree {l rcastooth.s {1 0 0 -16.2176 0 1 0 18.7161 0 0 1 0 0 0 0 1}}
put {rcastooth.s1_1__3} comb region no tree {l rcastooth.s {1 0 0 29.8752 0 1 0 13.3013 0 0 1 0 0 0 0 1}}
put {rcastooth.s2_1__2} comb region no tree {l rcastooth.s {1 0 0 16.3767 0 1 0 23.7258 0 0 1 0 0 0 0 1}}
put {rcastooth.s_1_1_8} comb region no tree {l rcastooth.s {1 0 0 57.15 0 1 0 0 0 0 1 0 0 0 0 1}}
put {rcastooth.s3_1__1} comb region no tree {l rcastooth.s {1 0 0 -3.52443 0 1 0 24.5129 0 0 1 0 0 0 0 1}}
put {rcastooth.s1_1__2} comb region no tree {l rcastooth.s {1 0 0 25.5268 0 1 0 13.3975 0 0 1 0 0 0 0 1}}
put {rcastooth.s2_1__1} comb region no tree {l rcastooth.s {1 0 0 10.2878 0 1 0 22.527 0 0 1 0 0 0 0 1}}
put {rcastooth.s_1_1_7} comb region no tree {l rcastooth.s {1 0 0 49.2125 0 1 0 0 0 0 1 0 0 0 0 1}}
put {rcastooth.s1_1__1} comb region no tree {l rcastooth.s {1 0 0 20.8336 0 1 0 13.389 0 0 1 0 0 0 0 1}}
put {rcastooth.s_1_1_6} comb region no tree {l rcastooth.s {1 0 0 42.8625 0 1 0 0 0 0 1 0 0 0 0 1}}
put {rcastooth.s_1_1_5} comb region no tree {l rcastooth.s {1 0 0 36.5125 0 1 0 0 0 0 1 0 0 0 0 1}}
put {rcastooth.s_1_1_4} comb region no tree {l rcastooth.s {1 0 0 32.7025 0 1 0 0 0 0 1 0 0 0 0 1}}
put {rcastooth.s_1_1_3} comb region no tree {l rcastooth.s {1 0 0 28.829 0 1 0 0 0 0 1 0 0 0 0 1}}
put {rcastooth.s_1_1_2} comb region no tree {l rcastooth.s {1 0 0 24.765 0 1 0 0 0 0 1 0 0 0 0 1}}
put {rcastooth.s_1_1_1} comb region no tree {l rcastooth.s {1 0 0 22.86 0 1 0 0 0 0 1 0 0 0 0 1}}
put {rcas28t.s1} tgc V {0 0 0} H {0 0 1.651000000000000023092639} A {0 -57.14999999999999857891453 0} B {57.14999999999999857891453 0 0} C {0 -57.14999999999999857891453 0} D {57.14999999999999857891453 0 0}
put {rcas18t.s1} tgc V {0 0 0} H {0 0 1.651000000000000023092639} A {0 -36.51249999999999573674359 0} B {36.51249999999999573674359 0 0} C {0 -36.51249999999999573674359 0} D {36.51249999999999573674359 0 0}
put {spkl_1_1_9} comb region no tree {l spkl {0.766044 0.642788 0 0 -0.642788 0.766044 0 0 0 0 1 0 0 0 0 1}}
put {spkk_1_1_9} comb region no tree {l spkk {0.766044 0.642788 0 0 -0.642788 0.766044 0 0 0 0 1 0 0 0 0 1}}
put {rcas16t.s1} tgc V {0 0 0} H {0 0 1.651000000000000023092639} A {0 -32.70250000000000056843419 0} B {32.70250000000000056843419 0 0} C {0 -32.70250000000000056843419 0} D {32.70250000000000056843419 0 0}
put {spkj_1_1_9} comb region no tree {l spkj {0.766044 0.642788 0 0 -0.642788 0.766044 0 0 0 0 1 0 0 0 0 1}}
put {spkl_1_1_8} comb region no tree {l spkl {0.173648 0.984808 0 0 -0.984808 0.173648 0 0 0 0 1 0 0 0 0 1}}
put {spki_1_1_9} comb region no tree {l spki {0.766044 0.642788 0 0 -0.642788 0.766044 0 0 0 0 1 0 0 0 0 1}}
put {rcas24t.s1} tgc V {0 0 0} H {0 0 1.651000000000000023092639} A {0 -49.21249999999999857891453 0} B {49.21249999999999857891453 0 0} C {0 -49.21249999999999857891453 0} D {49.21249999999999857891453 0 0}
put {spkk_1_1_8} comb region no tree {l spkk {0.173648 0.984808 0 0 -0.984808 0.173648 0 0 0 0 1 0 0 0 0 1}}
put {spkj_1_1_8} comb region no tree {l spkj {0.173648 0.984808 0 0 -0.984808 0.173648 0 0 0 0 1 0 0 0 0 1}}
put {rcas14t.s1} tgc V {0 0 0} H {0 0 1.651000000000000023092639} A {0 -28.82899999999999707256393 0} B {28.82899999999999707256393 0 0} C {0 -28.82899999999999707256393 0} D {28.82899999999999707256393 0 0}
put {spkl_1_1_7} comb region no tree {l spkl {-0.5 0.866025 0 0 -0.866025 -0.5 0 0 0 0 1 0 0 0 0 1}}
put {rcas32t.s1} tgc V {0 0 0} H {0 0 1.651000000000000023092639} A {0 -65.08749999999999147348717 0} B {65.08749999999999147348717 0 0} C {0 -65.08749999999999147348717 0} D {65.08749999999999147348717 0 0}
put {spki_1_1_8} comb region no tree {l spki {0.173648 0.984808 0 0 -0.984808 0.173648 0 0 0 0 1 0 0 0 0 1}}
put {spkk_1_1_7} comb region no tree {l spkk {-0.5 0.866025 0 0 -0.866025 -0.5 0 0 0 0 1 0 0 0 0 1}}
put {spkj_1_1_7} comb region no tree {l spkj {-0.5 0.866025 0 0 -0.866025 -0.5 0 0 0 0 1 0 0 0 0 1}}
put {spkl_1_1_6} comb region no tree {l spkl {-0.939693 0.34202 0 0 -0.34202 -0.939693 0 0 0 0 1 0 0 0 0 1}}
put {rcas12t.s1} tgc V {0 0 0} H {0 0 1.651000000000000023092639} A {0 -24.76499999999999701572051 0} B {24.76499999999999701572051 0 0} C {0 -24.76499999999999701572051 0} D {24.76499999999999701572051 0 0}
put {rcas21t.s1} tgc V {0 0 0} H {0 0 1.651000000000000023092639} A {0 -42.86249999999999715782906 0} B {42.86249999999999715782906 0 0} C {0 -42.86249999999999715782906 0} D {42.86249999999999715782906 0 0}
put {spki_1_1_7} comb region no tree {l spki {-0.5 0.866025 0 0 -0.866025 -0.5 0 0 0 0 1 0 0 0 0 1}}
put {spkk_1_1_6} comb region no tree {l spkk {-0.939693 0.34202 0 0 -0.34202 -0.939693 0 0 0 0 1 0 0 0 0 1}}
put {rcas11t.s1} tgc V {0 0 0} H {0 0 1.651000000000000023092639} A {0 -22.85999999999999943156581 0} B {22.85999999999999943156581 0 0} C {0 -22.85999999999999943156581 0} D {22.85999999999999943156581 0 0}
put {spkj_1_1_6} comb region no tree {l spkj {-0.939693 0.34202 0 0 -0.34202 -0.939693 0 0 0 0 1 0 0 0 0 1}}
put {spkl_1_1_5} comb region no tree {l spkl {-0.939693 -0.34202 0 0 0.34202 -0.939693 0 0 0 0 1 0 0 0 0 1}}
put {spki_1_1_6} comb region no tree {l spki {-0.939693 0.34202 0 0 -0.34202 -0.939693 0 0 0 0 1 0 0 0 0 1}}
put {spkk_1_1_5} comb region no tree {l spkk {-0.939693 -0.34202 0 0 0.34202 -0.939693 0 0 0 0 1 0 0 0 0 1}}
put {spkj_1_1_5} comb region no tree {l spkj {-0.939693 -0.34202 0 0 0.34202 -0.939693 0 0 0 0 1 0 0 0 0 1}}
put {spkl_1_1_4} comb region no tree {l spkl {-0.5 -0.866025 0 0 0.866025 -0.5 0 0 0 0 1 0 0 0 0 1}}
put {spki_1_1_5} comb region no tree {l spki {-0.939693 -0.34202 0 0 0.34202 -0.939693 0 0 0 0 1 0 0 0 0 1}}
put {spkk_1_1_4} comb region no tree {l spkk {-0.5 -0.866025 0 0 0.866025 -0.5 0 0 0 0 1 0 0 0 0 1}}
put {spkj_1_1_4} comb region no tree {l spkj {-0.5 -0.866025 0 0 0.866025 -0.5 0 0 0 0 1 0 0 0 0 1}}
put {spkl_1_1_3} comb region no tree {l spkl {0.173648 -0.984808 0 0 0.984808 0.173648 0 0 0 0 1 0 0 0 0 1}}
put {spki_1_1_4} comb region no tree {l spki {-0.5 -0.866025 0 0 0.866025 -0.5 0 0 0 0 1 0 0 0 0 1}}
put {spkk_1_1_3} comb region no tree {l spkk {0.173648 -0.984808 0 0 0.984808 0.173648 0 0 0 0 1 0 0 0 0 1}}
put {spkj_1_1_3} comb region no tree {l spkj {0.173648 -0.984808 0 0 0.984808 0.173648 0 0 0 0 1 0 0 0 0 1}}
put {spkl_1_1_2} comb region no tree {l spkl {0.766044 -0.642788 0 0 0.642788 0.766044 0 0 0 0 1 0 0 0 0 1}}
put {spki_1_1_3} comb region no tree {l spki {0.173648 -0.984808 0 0 0.984808 0.173648 0 0 0 0 1 0 0 0 0 1}}
put {spkk_1_1_2} comb region no tree {l spkk {0.766044 -0.642788 0 0 0.642788 0.766044 0 0 0 0 1 0 0 0 0 1}}
put {spkj_1_1_2} comb region no tree {l spkj {0.766044 -0.642788 0 0 0.642788 0.766044 0 0 0 0 1 0 0 0 0 1}}
put {rcastooth.s19_1_3} comb region no tree {l rcastooth.s {1 0 0 -49.3857 0 1 0 -42.3962 0 0 1 0 0 0 0 1}}
put {spkl_1_1_1} comb region no tree {l spkl}
put {spki_1_1_2} comb region no tree {l spki {0.766044 -0.642788 0 0 0.642788 0.766044 0 0 0 0 1 0 0 0 0 1}}
put {spkk_1_1_1} comb region no tree {l spkk}
put {spkj_1_1_1} comb region no tree {l spkj}
put {spki_1_1_1} comb region no tree {l spki}
put {rcastooth.s18_1_3} comb region no tree {l rcastooth.s {1 0 0 -56.909 0 1 0 -31.5871 0 0 1 0 0 0 0 1}}
put {rcastooth.s19_1_2} comb region no tree {l rcastooth.s {1 0 0 -16.3908 0 1 0 -54.7491 0 0 1 0 0 0 0 1}}
put {rcastooth.s16_1_4} comb region no tree {l rcastooth.s {1 0 0 -64.7536 0 1 0 -6.58479 0 0 1 0 0 0 0 1}}
put {rcastooth.s17_1_3} comb region no tree {l rcastooth.s {1 0 0 -62.1025 0 1 0 -19.4848 0 0 1 0 0 0 0 1}}
put {rcastooth.s18_1_2} comb region no tree {l rcastooth.s {1 0 0 -28.575 0 1 0 -49.4934 0 0 1 0 0 0 0 1}}
put {rcastooth.s14_1_5} comb region no tree {l rcastooth.s {1 0 0 -62.1025 0 1 0 19.4848 0 0 1 0 0 0 0 1}}
put {rcastooth.s19_1_1} comb region no tree {l rcastooth.s {1 0 0 22.641 0 1 0 -43.6951 0 0 1 0 0 0 0 1}}
put {rcastooth.s15_1_4} comb region no tree {l rcastooth.s {1 0 0 -64.7536 0 1 0 6.58479 0 0 1 0 0 0 0 1}}
put {rcastooth.s16_1_3} comb region no tree {l rcastooth.s {1 0 0 -47.7481 0 1 0 -31.4044 0 0 1 0 0 0 0 1}}
put {rcastooth.s12_1_6} comb region no tree {l rcastooth.s {1 0 0 -49.3857 0 1 0 42.3962 0 0 1 0 0 0 0 1}}
put {rcastooth.s17_1_2} comb region no tree {l rcastooth.s {1 0 0 -39.2187 0 1 0 -41.5694 0 0 1 0 0 0 0 1}}
put {rcastooth.s13_1_5} comb region no tree {l rcastooth.s {1 0 0 -56.909 0 1 0 31.5871 0 0 1 0 0 0 0 1}}
put {rcastooth.s18_1_1} comb region no tree {l rcastooth.s {1 0 0 10.0126 0 1 0 -48.1832 0 0 1 0 0 0 0 1}}
put {rcastooth.s14_1_4} comb region no tree {l rcastooth.s {1 0 0 -56.7636 0 1 0 -6.63471 0 0 1 0 0 0 0 1}}
put {rcastooth.s10_1_7} comb region no tree {l rcastooth.s {1 0 0 -28.6642 0 1 0 58.4359 0 0 1 0 0 0 0 1}}
put {rrim.s1sh} tgc V {177.7999999999999829469743 0 11.81099999999999994315658} H {38.09999999999999431565811 0 0} A {0 0 -2.285999999999999587885213} B {0 2.285999999999999587885213 0} C {0 0 -2.285999999999999587885213} D {0 2.285999999999999587885213 0}
put {rcastooth.s15_1_3} comb region no tree {l rcastooth.s {1 0 0 -53.7034 0 1 0 -19.5465 0 0 1 0 0 0 0 1}}
put {rcastooth.s11_1_6} comb region no tree {l rcastooth.s {1 0 0 -39.8404 0 1 0 51.4696 0 0 1 0 0 0 0 1}}
put {rcas28t.c1} comb region no tree {- {l rcas28t.s1 {1 0 0 0 0 1 0 0 0 0 1 31.892875 0 0 0 1}} {l rcas28t.s1-1 {1 0 0 0 0 1 0 0 0 0 1 31.892875 0 0 0 1}}}
put {rcastooth.s16_1_2} comb region no tree {l rcastooth.s {1 0 0 -16.4803 0 1 0 -46.371 0 0 1 0 0 0 0 1}}
put {rcastooth.s12_1_5} comb region no tree {l rcastooth.s {1 0 0 -53.7034 0 1 0 19.5465 0 0 1 0 0 0 0 1}}
put {rcas18t.c1} comb region no tree {- {l rcas18t.s1 {1 0 0 0 0 1 0 0 0 0 1 18.2245 0 0 0 1}} {l rcas18t.s1-1 {1 0 0 0 0 1 0 0 0 0 1 18.2245 0 0 0 1}}}
put {rcastooth.s17_1_1} comb region no tree {l rcastooth.s {1 0 0 -3.35838 0 1 0 -49.0978 0 0 1 0 0 0 0 1}}
put {rcastooth.s26_1_1} comb region no tree {l rcastooth.s {1 0 0 34.4289 0 1 0 -55.2361 0 0 1 0 0 0 0 1}}
put {rcastooth.s13_1_4} comb region no tree {l rcastooth.s {1 0 0 -56.7636 0 1 0 6.63471 0 0 1 0 0 0 0 1}}
put {rcastooth.s14_1_3} comb region no tree {l rcastooth.s {1 0 0 -38.1747 0 1 0 -31.0574 0 0 1 0 0 0 0 1}}
put {rcastooth.s10_1_6} comb region no tree {l rcastooth.s {1 0 0 -39.2187 0 1 0 41.5694 0 0 1 0 0 0 0 1}}
put {rcastooth.s15_1_2} comb region no tree {l rcastooth.s {1 0 0 -28.3799 0 1 0 -40.2051 0 0 1 0 0 0 0 1}}
put {rcastooth.s11_1_5} comb region no tree {l rcastooth.s {1 0 0 -47.7481 0 1 0 31.4044 0 0 1 0 0 0 0 1}}
put {rcas16t.c1} comb region no tree {- {l rcas16t.s1 {1 0 0 0 0 1 0 0 0 0 1 13.668375 0 0 0 1}} {l rcas16t.s1-1 {1 0 0 0 0 1 0 0 0 0 1 13.668375 0 0 0 1}}}
put {rcastooth.s16_1_1} comb region no tree {l rcastooth.s {1 0 0 13.2452 0 1 0 -40.7647 0 0 1 0 0 0 0 1}}
put {rcastooth.s25_1_1} comb region no tree {l rcastooth.s {1 0 0 22.6052 0 1 0 -61.0359 0 0 1 0 0 0 0 1}}
put {rcastooth.s12_1_4} comb region no tree {l rcastooth.s {1 0 0 -48.7541 0 1 0 -6.7011 0 0 1 0 0 0 0 1}}
put {rcas24t.c1} comb region no tree {- {l rcas24t.s1 {1 0 0 0 0 1 0 0 0 0 1 27.33675 0 0 0 1}} {l rcas24t.s1-1 {1 0 0 0 0 1 0 0 0 0 1 27.33675 0 0 0 1}}}
put {rcastooth.s13_1_3} comb region no tree {l rcastooth.s {1 0 0 -45.1383 0 1 0 -19.6063 0 0 1 0 0 0 0 1}}
put {rcastooth.s14_1_2} comb region no tree {l rcastooth.s {1 0 0 -13.2452 0 1 0 -40.7647 0 0 1 0 0 0 0 1}}
put {rcastooth.s10_1_5} comb region no tree {l rcastooth.s {1 0 0 -45.1383 0 1 0 19.6063 0 0 1 0 0 0 0 1}}
put {rcas14t.c1} comb region no tree {- {l rcas14t.s1 {1 0 0 0 0 1 0 0 0 0 1 9.11225 0 0 0 1}} {l rcas14t.s1-1 {1 0 0 0 0 1 0 0 0 0 1 9.11225 0 0 0 1}}}
put {rcas32t.c1} comb region no tree {- {l rcas32t.s1 {1 0 0 0 0 1 0 0 0 0 1 36.449 0 0 0 1}} {l rcas32t.s1-1 {1 0 0 0 0 1 0 0 0 0 1 36.449 0 0 0 1}}}
put {rcastooth.s15_1_1} comb region no tree {l rcastooth.s {1 0 0 2.2761e-10 0 1 0 -42.8625 0 0 1 0 0 0 0 1}}
put {rcastooth.s24_1_1} comb region no tree {l rcastooth.s {1 0 0 9.85606 0 1 0 -64.3369 0 0 1 0 0 0 0 1}}
put {rcastooth.s11_1_4} comb region no tree {l rcastooth.s {1 0 0 -48.7541 0 1 0 6.7011 0 0 1 0 0 0 0 1}}
put {rcastooth.s12_1_3} comb region no tree {l rcastooth.s {1 0 0 -34.6765 0 1 0 -25.1939 0 0 1 0 0 0 0 1}}
put {rcastooth.s13_1_2} comb region no tree {l rcastooth.s {1 0 0 -25.1939 0 1 0 -34.6765 0 0 1 0 0 0 0 1}}
put {rcas12t.c1} comb region no tree {- {l rcas12t.s1 {1 0 0 0 0 1 0 0 0 0 1 4.556125 0 0 0 1}} {l rcas12t.s1-1 {1 0 0 0 0 1 0 0 0 0 1 4.556125 0 0 0 1}}}
put {rcastooth.s22_1_2} comb region no tree {l rcastooth.s {1 0 0 -16.3143 0 1 0 -63.0097 0 0 1 0 0 0 0 1}}
put {rcas21t.c1} comb region no tree {- {l rcas21t.s1 {1 0 0 0 0 1 0 0 0 0 1 22.780625 0 0 0 1}} {l rcas21t.s1-1 {1 0 0 0 0 1 0 0 0 0 1 22.780625 0 0 0 1}}}
put {rcastooth.s14_1_1} comb region no tree {l rcastooth.s {1 0 0 16.275 0 1 0 -32.6846 0 0 1 0 0 0 0 1}}
put {rcastooth.s23_1_1} comb region no tree {l rcastooth.s {1 0 0 -3.29663 0 1 0 -65.004 0 0 1 0 0 0 0 1}}
put {rcastooth.s10_1_4} comb region no tree {l rcastooth.s {1 0 0 -42.8625 0 1 0 -8.86496e-12 0 0 1 0 0 0 0 1}}
put {rcas11t.c1} comb region no tree {- {l rcas11t.s1} {l rcas11t.s1-1}}
put {rcastooth.s11_1_3} comb region no tree {l rcastooth.s {1 0 0 -40.7647 0 1 0 -13.2452 0 0 1 0 0 0 0 1}}
put {rcastooth.s12_1_2} comb region no tree {l rcastooth.s {1 0 0 -9.99212 0 1 0 -35.1187 0 0 1 0 0 0 0 1}}
put {rcastooth.s21_1_2} comb region no tree {l rcastooth.s {1 0 0 -28.6642 0 1 0 -58.4359 0 0 1 0 0 0 0 1}}
put {rcastooth.s13_1_1} comb region no tree {l rcastooth.s {1 0 0 3.36895 0 1 0 -36.3567 0 0 1 0 0 0 0 1}}
put {rcastooth.s22_1_1} comb region no tree {l rcastooth.s {1 0 0 22.636 0 1 0 -52.4761 0 0 1 0 0 0 0 1}}
put {rcastooth.s10_1_3} comb region no tree {l rcastooth.s {1 0 0 -31.0436 0 1 0 -19.2214 0 0 1 0 0 0 0 1}}
put {rcastooth.s11_1_2} comb region no tree {l rcastooth.s {1 0 0 -22.0037 0 1 0 -29.1376 0 0 1 0 0 0 0 1}}
put {rcastooth.s20_1_2} comb region no tree {l rcastooth.s {1 0 0 -39.8404 0 1 0 -51.4696 0 0 1 0 0 0 0 1}}
put {rcastooth.s12_1_1} comb region no tree {l rcastooth.s {1 0 0 10.1056 0 1 0 -31.1019 0 0 1 0 0 0 0 1}}
put {rcastooth.s21_1_1} comb region no tree {l rcastooth.s {1 0 0 9.92399 0 1 0 -56.2818 0 0 1 0 0 0 0 1}}
put {rcastooth.s10_1_2} comb region no tree {l rcastooth.s {1 0 0 -16.3512 0 1 0 -28.3212 0 0 1 0 0 0 0 1}}
put {rcastooth.s11_1_1} comb region no tree {l rcastooth.s {1 0 0 -3.41834 0 1 0 -32.5234 0 0 1 0 0 0 0 1}}
put {rcastooth.s20_1_1} comb region no tree {l rcastooth.s {1 0 0 -3.32298 0 1 0 -57.0533 0 0 1 0 0 0 0 1}}
put {rcastooth.s10_1_1} comb region no tree {l rcastooth.s {1 0 0 3.47495 0 1 0 -28.6188 0 0 1 0 0 0 0 1}}
put {rtire.s1-1} eto V {0 0 11.81099999999999994315658} N {0 0 25.39999999999999857891453} C {15.87499999999999822364316 0 0} r 222.25 r_d 14.28749999999999964472863
put {spokes.r} comb region yes tree {u {u {l spoke_A} {l spoke_b}} {u {l spoke_c} {l spoke_d}}}
attr set {spokes.r} {region} {R} {region_id} {1000} {material_id} {1} {los} {100}
put {rrim.s29sh_1_1_29} comb region no tree {l rrim.s1sh {0.173648 0.984808 0 0 -0.984808 0.173648 0 0 0 0 1 0 0 0 0 1}}
put {rrim.s19sh_1_1_19} comb region no tree {l rrim.s1sh {-1 -9.79318e-12 0 0 9.79318e-12 -1 0 0 0 0 1 0 0 0 0 1}}
put {rrim.s28sh_1_1_28} comb region no tree {l rrim.s1sh {-1.46898e-11 1 0 0 -1 -1.46898e-11 0 0 0 0 1 0 0 0 0 1}}
put {rrim.s18sh_1_1_18} comb region no tree {l rrim.s1sh {-0.984808 -0.173648 0 0 0.173648 -0.984808 0 0 0 0 1 0 0 0 0 1}}
put {rrim.s27sh_1_1_27} comb region no tree {l rrim.s1sh {-0.173648 0.984808 0 0 -0.984808 -0.173648 0 0 0 0 1 0 0 0 0 1}}
put {rrim.s36sh_1_1_36} comb region no tree {l rrim.s1sh {0.984808 0.173648 0 0 -0.173648 0.984808 0 0 0 0 1 0 0 0 0 1}}
put {rrim.s17sh_1_1_17} comb region no tree {l rrim.s1sh {-0.939693 -0.34202 0 0 0.34202 -0.939693 0 0 0 0 1 0 0 0 0 1}}
put {rrim.s26sh_1_1_26} comb region no tree {l rrim.s1sh {-0.34202 0.939693 0 0 -0.939693 -0.34202 0 0 0 0 1 0 0 0 0 1}}
put {rrim.s35sh_1_1_35} comb region no tree {l rrim.s1sh {0.939693 0.34202 0 0 -0.34202 0.939693 0 0 0 0 1 0 0 0 0 1}}
put {rrim.s16sh_1_1_16} comb region no tree {l rrim.s1sh {-0.866025 -0.5 0 0 0.5 -0.866025 0 0 0 0 1 0 0 0 0 1}}
put {rrim.s25sh_1_1_25} comb region no tree {l rrim.s1sh {-0.5 0.866025 0 0 -0.866025 -0.5 0 0 0 0 1 0 0 0 0 1}}
put {rrim.s34sh_1_1_34} comb region no tree {l rrim.s1sh {0.866025 0.5 0 0 -0.5 0.866025 0 0 0 0 1 0 0 0 0 1}}
put {rrim.s15sh_1_1_15} comb region no tree {l rrim.s1sh {-0.766044 -0.642788 0 0 0.642788 -0.766044 0 0 0 0 1 0 0 0 0 1}}
put {rrim.s24sh_1_1_24} comb region no tree {l rrim.s1sh {-0.642788 0.766044 0 0 -0.766044 -0.642788 0 0 0 0 1 0 0 0 0 1}}
put {rrim.s33sh_1_1_33} comb region no tree {l rrim.s1sh {0.766044 0.642788 0 0 -0.642788 0.766044 0 0 0 0 1 0 0 0 0 1}}
put {rrim.s14sh_1_1_14} comb region no tree {l rrim.s1sh {-0.642788 -0.766044 0 0 0.766044 -0.642788 0 0 0 0 1 0 0 0 0 1}}
put {rrim.s23sh_1_1_23} comb region no tree {l rrim.s1sh {-0.766044 0.642788 0 0 -0.642788 -0.766044 0 0 0 0 1 0 0 0 0 1}}
put {rrim.s32sh_1_1_32} comb region no tree {l rrim.s1sh {0.642788 0.766044 0 0 -0.766044 0.642788 0 0 0 0 1 0 0 0 0 1}}
put {rrim.s13sh_1_1_13} comb region no tree {l rrim.s1sh {-0.5 -0.866025 0 0 0.866025 -0.5 0 0 0 0 1 0 0 0 0 1}}
put {rrim.s22sh_1_1_22} comb region no tree {l rrim.s1sh {-0.866025 0.5 0 0 -0.5 -0.866025 0 0 0 0 1 0 0 0 0 1}}
put {rrim.s31sh_1_1_31} comb region no tree {l rrim.s1sh {0.5 0.866025 0 0 -0.866025 0.5 0 0 0 0 1 0 0 0 0 1}}
put {rrim.s12sh_1_1_12} comb region no tree {l rrim.s1sh {-0.34202 -0.939693 0 0 0.939693 -0.34202 0 0 0 0 1 0 0 0 0 1}}
put {rrim.s21sh_1_1_21} comb region no tree {l rrim.s1sh {-0.939693 0.34202 0 0 -0.34202 -0.939693 0 0 0 0 1 0 0 0 0 1}}
put {rrim.s30sh_1_1_30} comb region no tree {l rrim.s1sh {0.34202 0.939693 0 0 -0.939693 0.34202 0 0 0 0 1 0 0 0 0 1}}
put {rrim.s11sh_1_1_11} comb region no tree {l rrim.s1sh {-0.173648 -0.984808 0 0 0.984808 -0.173648 0 0 0 0 1 0 0 0 0 1}}
put {rrim.s20sh_1_1_20} comb region no tree {l rrim.s1sh {-0.984808 0.173648 0 0 -0.173648 -0.984808 0 0 0 0 1 0 0 0 0 1}}
put {rrim.s10sh_1_1_10} comb region no tree {l rrim.s1sh {4.89659e-12 -1 0 0 1 4.89659e-12 0 0 0 0 1 0 0 0 0 1}}
put {rrim.s1-4} comb region no tree {- {l rrii} {l rri}}
put {rrim.s1-3} comb region no tree {u {u {u {u {u {u {l rrim.s1sh_1_1_1} {l rrim.s2sh_1_1_2}} {u {l rrim.s3sh_1_1_3} {l rrim.s4sh_1_1_4}}} {u {u {l rrim.s5sh_1_1_5} {l rrim.s6sh_1_1_6}} {u {l rrim.s7sh_1_1_7} {l rrim.s8sh_1_1_8}}}} {u {u {u {l rrim.s9sh_1_1_9} {l rrim.s10sh_1_1_10}} {u {l rrim.s11sh_1_1_11} {l rrim.s12sh_1_1_12}}} {u {u {l rrim.s13sh_1_1_13} {l rrim.s14sh_1_1_14}} {u {l rrim.s15sh_1_1_15} {l rrim.s16sh_1_1_16}}}}} {u {u {u {u {l rrim.s17sh_1_1_17} {l rrim.s18sh_1_1_18}} {u {l rrim.s19sh_1_1_19} {l rrim.s20sh_1_1_20}}} {u {u {l rrim.s21sh_1_1_21} {l rrim.s22sh_1_1_22}} {u {l rrim.s23sh_1_1_23} {l rrim.s24sh_1_1_24}}}} {u {u {u {l rrim.s25sh_1_1_25} {l rrim.s26sh_1_1_26}} {u {l rrim.s27sh_1_1_27} {l rrim.s28sh_1_1_28}}} {u {u {l rrim.s29sh_1_1_29} {l rrim.s30sh_1_1_30}} {u {l rrim.s31sh_1_1_31} {l rrim.s32sh_1_1_32}}}}}} {u {u {l rrim.s33sh_1_1_33} {l rrim.s34sh_1_1_34}} {u {l rrim.s35sh_1_1_35} {l rrim.s36sh_1_1_36}}}}
put {rrim.s1-2} tgc V {0 0 25.19983160980545022766819} H {0 0 -13.38883160980544850815477} A {0 197.3801853527571950053243 0} B {197.3801853527571950053243 0 0} C {0 192.8812499999999943156581 0} D {192.8812499999999943156581 0 0}
put {rrim.s1-1} tgc V {0 0 -1.453479018435659853025754} H {0 0 14.75836748475629534027576} A {0 -197.3384002078076662201056 0} B {197.3384002078076662201056 0 0} C {0 -192.3792713486825789459544 0} D {192.3792713486825789459544 0 0}
put {rhub.s5-1} comb region no tree {u {u {u {u {u {l rhspkh_1_1_1} {l rhspkh_1_1_2}} {u {l rhspkh_1_1_3} {l rhspkh_1_1_4}}} {u {u {l rhspkh_1_1_5} {l rhspkh_1_1_6}} {u {l rhspkh_1_1_7} {l rhspkh_1_1_8}}}} {u {u {u {l rhspkh_1_1_9} {l rhspkh_1_1_10}} {u {l rhspkh_1_1_11} {l rhspkh_1_1_12}}} {u {u {l rhspkh_1_1_13} {l rhspkh_1_1_14}} {u {l rhspkh_1_1_15} {l rhspkh_1_1_16}}}}} {u {l rhspkh_1_1_17} {l rhspkh_1_1_18}}}
put {rhub.s3-1} comb region no tree {u {u {u {u {u {l rhspkh2_1_1_1} {l rhspkh2_1_1_2}} {u {l rhspkh2_1_1_3} {l rhspkh2_1_1_4}}} {u {u {l rhspkh2_1_1_5} {l rhspkh2_1_1_6}} {u {l rhspkh2_1_1_7} {l rhspkh2_1_1_8}}}} {u {u {u {l rhspkh2_1_1_9} {l rhspkh2_1_1_10}} {u {l rhspkh2_1_1_11} {l rhspkh2_1_1_12}}} {u {u {l rhspkh2_1_1_13} {l rhspkh2_1_1_14}} {u {l rhspkh2_1_1_15} {l rhspkh2_1_1_16}}}}} {u {l rhspkh2_1_1_17} {l rhspkh2_1_1_18}}}
put {rhub.s1-1} tgc V {0 0 -1.587500000000000133226763} H {0 0 149.2249999999999943156581} A {0 -2.540000000000000035527137 0} B {2.540000000000000035527137 0 0} C {0 -2.540000000000000035527137 0} D {2.540000000000000035527137 0 0}
put {rrimi.s2} tgc V {0 0 1.016000000000000014210855} H {0 0 21.59000000000000341060513} A {0 -208.5339999999999633928383 0} B {208.5339999999999633928383 0 0} C {0 -208.5339999999999633928383 0} D {208.5339999999999633928383 0 0}
put {rtire.s1} eto V {0 0 11.81099999999999994315658} N {0 0 25.39999999999999857891453} C {17.46249999999999857891453 0 0} r 222.25 r_d 15.875
put {rrimi.s1} tgc V {0 0 2.032000000000000028421709} H {0 0 19.55799999999999982946974} A {0 -211.1374999999999602096068 0} B {211.1374999999999602096068 0 0} C {0 -211.1374999999999602096068 0} D {211.1374999999999602096068 0 0}
put {rtire.r1} comb region yes tree {- {- {l rtire.s1 {1 0 0 0 0 1 0 0 0 0 1 61.214 0 0 0 1}} {l rrim.s1 {1 0 0 0 0 1 0 0 0 0 1 61.214 0 0 0 1}}} {l rtire.s1-1 {1 0 0 0 0 1 0 0 0 0 1 61.214 0 0 0 1}}}
attr set {rtire.r1} {color} {33/33/33} {shader} {stack {{fbmbump {o 4 s 5 a 30}} {plastic {}}}} {region} {R} {region_id} {1002} {material_id} {1} {los} {100}
put {spoke_d} comb region no tree {u {u {u {u {l spkj_1_1_1} {l spkj_1_1_2}} {u {l spkj_1_1_3} {l spkj_1_1_4}}} {u {u {l spkj_1_1_5} {l spkj_1_1_6}} {u {l spkj_1_1_7} {l spkj_1_1_8}}}} {l spkj_1_1_9}}
put {spoke_c} comb region no tree {u {u {u {u {l spki_1_1_1} {l spki_1_1_2}} {u {l spki_1_1_3} {l spki_1_1_4}}} {u {u {l spki_1_1_5} {l spki_1_1_6}} {u {l spki_1_1_7} {l spki_1_1_8}}}} {l spki_1_1_9}}
put {spoke_b} comb region no tree {u {u {u {u {l spkl_1_1_1} {l spkl_1_1_2}} {u {l spkl_1_1_3} {l spkl_1_1_4}}} {u {u {l spkl_1_1_5} {l spkl_1_1_6}} {u {l spkl_1_1_7} {l spkl_1_1_8}}}} {l spkl_1_1_9}}
put {spoke_A} comb region no tree {u {u {u {u {l spkk_1_1_1} {l spkk_1_1_2}} {u {l spkk_1_1_3} {l spkk_1_1_4}}} {u {u {l spkk_1_1_5} {l spkk_1_1_6}} {u {l spkk_1_1_7} {l spkk_1_1_8}}}} {l spkk_1_1_9}}
put {rhspkh2} tgc V {21.7622817260637724245953 3.83727743008382748968188 35.05199999999999249666871} H {0 0 3.809999999999999609201495} A {0.2756664820462519926991263 -1.563382307906880042125408 0} B {1.563382307906880042125408 0.2756664820462519926991263 0} C {0.2756664820462519926991263 -1.563382307906880042125408 0} D {1.563382307906880042125408 0.2756664820462519926991263 0}
put {rrim.s1} tgc V {0 0 0} H {0 0 23.62199999999999988631316} A {0 -209.5499999999999829469743 0} B {209.5499999999999829469743 0 0} C {0 -209.5499999999999829469743 0} D {209.5499999999999829469743 0 0}
put {rhub.s5} tgc V {0 0 91.5669999999999930651029} H {0 0 3.174999999999999822364316} A {0 -26.86049999999999826627572 0} B {26.8605000000000018189894 0 0} C {0 -26.86049999999999826627572 0} D {26.8605000000000018189894 0 0}
put {rrim.r1} comb region yes tree {- {- {- {- {l rrim.s1 {1 0 0 0 0 1 0 0 0 0 1 61.214 0 0 0 1}} {l rrim.s1-1 {1 0 0 0 0 1 0 0 0 0 1 61.214 0 0 0 1}}} {l rrim.s1-2 {1 0 0 0 0 1 0 0 0 0 1 61.214 0 0 0 1}}} {l rrim.s1-3 {1 0 0 0 0 1 0 0 0 0 1 61.214 0 0 0 1}}} {l rrim.s1-4 {1 0 0 0 0 1 0 0 0 0 1 61.214 0 0 0 1}}}
attr set {rrim.r1} {region} {R} {region_id} {1001} {material_id} {1} {los} {100}
put {rhub.s4} tgc V {0 0 38.73499999999999232613845} H {0 0 52.83200000000000073896445} A {0 -15.04950000000000009947598 0} B {15.04950000000000009947598 0 0} C {0 -15.04950000000000009947598 0} D {15.04950000000000009947598 0 0}
put {rhub.s3} tgc V {0 0 35.5599999999999951683094} H {0 0 3.174999999999999822364316} A {0 -26.86049999999999826627572 0} B {26.8605000000000018189894 0 0} C {0 -26.86049999999999826627572 0} D {26.8605000000000018189894 0 0}
put {rhub.s2} tgc V {0 0 12.69999999999999928945726} H {0 0 22.85999999999999943156581} A {0 -6.349999999999999644728632 0} B {6.349999999999999644728632 0 0} C {0 -11.42999999999999971578291 0} D {11.42999999999999971578291 0 0}
put {rcas.s2} tgc V {0 0 0} H {0 0 38.09999999999999431565811} A {0 -17.7799999999999975841547 0} B {17.7799999999999975841547 0 0} C {0 -17.7799999999999975841547 0} D {17.7799999999999975841547 0 0}
put {rhub.s1} tgc V {0 0 0} H {0 0 146.0499999999999829469743} A {0 -4.889499999999999957367436 0} B {4.889499999999999957367436 0 0} C {0 -4.889499999999999957367436 0} D {4.889499999999999957367436 0 0}
put {rhub.r1} comb region yes tree {u {u {u {u {- {l rhub.s1} {l rhub.s1-1}} {l rhub.s2}} {- {l rhub.s3} {l rhub.s3-1}}} {l rhub.s4}} {- {l rhub.s5} {l rhub.s5-1}}}
attr set {rhub.r1} {color} {35/35/35} {shader} {plastic} {region} {R} {region_id} {1001} {material_id} {1} {los} {100}
put {rhspkh} tgc V {22.09799999999999897681846 0 91.43999999999999772626325} H {0 0 3.809999999999999609201495} A {0 -1.587499999999999911182158 0} B {1.587499999999999911182158 0 0} C {0 -1.587499999999999911182158 0} D {1.587499999999999911182158 0 0}
put {rwheel} comb region no tree {u {u {u {l rcassette.r {1 0 0 0 0 -1 0 0 0 0 -1 139.7 0 0 0 1}} {l rhub.r1}} {u {l rrim.r1} {l rtire.r1}}} {l spokes.r}}
put {rri.s3} tor V {0 0 23.62199999999999988631316} H {0 0 0.9999999999999998889776975} r_a 196.8499999999999943156581 r_h 6.349999999999999644728632
put {rri.s2} tor V {0 0 0} H {0 0 0.9999999999999998889776975} r_a 196.8499999999999943156581 r_h 6.349999999999999644728632
put {rri.s1} tgc V {0 0 5.080000000000000071054274} H {0 0 13.97000000000000063948846} A {0 -196.8499999999999658939487 0} B {196.8499999999999943156581 0 0} C {0 -196.8499999999999658939487 0} D {196.8499999999999943156581 0 0}
put {rrim.s9sh_1_1_9} comb region no tree {l rrim.s1sh {0.173648 -0.984808 0 0 0.984808 0.173648 0 0 0 0 1 0 0 0 0 1}}
put {rrim.s8sh_1_1_8} comb region no tree {l rrim.s1sh {0.34202 -0.939693 0 0 0.939693 0.34202 0 0 0 0 1 0 0 0 0 1}}
put {rrim.s7sh_1_1_7} comb region no tree {l rrim.s1sh {0.5 -0.866025 0 0 0.866025 0.5 0 0 0 0 1 0 0 0 0 1}}
put {rrim.s6sh_1_1_6} comb region no tree {l rrim.s1sh {0.642788 -0.766044 0 0 0.766044 0.642788 0 0 0 0 1 0 0 0 0 1}}
put {rrim.s5sh_1_1_5} comb region no tree {l rrim.s1sh {0.766044 -0.642788 0 0 0.642788 0.766044 0 0 0 0 1 0 0 0 0 1}}
put {rrim.s4sh_1_1_4} comb region no tree {l rrim.s1sh {0.866025 -0.5 0 0 0.5 0.866025 0 0 0 0 1 0 0 0 0 1}}
put {rrim.s3sh_1_1_3} comb region no tree {l rrim.s1sh {0.939693 -0.34202 0 0 0.34202 0.939693 0 0 0 0 1 0 0 0 0 1}}
put {rrim.s2sh_1_1_2} comb region no tree {l rrim.s1sh {0.984808 -0.173648 0 0 0.173648 0.984808 0 0 0 0 1 0 0 0 0 1}}
put {rrim.s1sh_1_1_1} comb region no tree {l rrim.s1sh}
put {spkl} pipe V0 { 20.76709480285642683838887 7.551670837402355118683772 90.65737819671632280460472 } O0 1.337557689563829255163796 I0 -0 R0 1.778000000000000024868996 V1 { 20.77675991058347904072434 7.551670837402345348721155 91.2437280654907425514466 } O1 3.550397189753127680234002 I1 -0 R1 1.778000000000000024868996 V2 { 20.76548395156863691113358 7.551670837402342684185896 92.05237541198734163572226 } O2 1.778000000000000024868996 I2 -0 R2 1.778000000000000024868996 V3 { 20.76709480285642328567519 7.551670837402365776824809 97.27797698974610796085472 } O3 1.778000000000000024868996 I3 -0 R3 1.778000000000000024868996 V4 { 96.65107727050778407829057 -168.714120483398488659077 72.89613189697269035605132 } O4 1.778000000000000024868996 I4 -0 R4 1.778000000000000024868996
put {spkk} pipe V0 { 22.11288281250000409272616 0.01288681030274606807706217 95.60269165039063921085472 } O0 1.785138282554655120293319 I0 -0 R0 6.598046874999998756550212 V1 { 22.11288281250000409272616 0.01288681030274606807706217 95.03567199707032386868377 } O1 4.070271197360822768018807 I1 -0 R1 6.598046874999998756550212 V2 { 22.11288281250001475086719 0.01288681030274606807706217 93.65678329467775142802566 } O2 1.778000000000000024868996 I2 -0 R2 6.598046874999998756550212 V3 { 22.10339501953125207478479 0.08911623464794377058595387 90.33015632036135400539933 } O3 1.778000000000000024868996 I3 -0 R3 2.496955272208652765186798 V4 { 33.55725402832030823674359 192.3227569580077442878974 73.30678124999998601651896 } O4 1.778000000000000024868996 I4 -0 R4 6.598046874999998756550212
put {spkj} pipe V0 { 19.1582472419363760707256 10.97847094045843441278976 39.25328368547360469165142 } O0 1.074875597385660741522884 I0 -0 R0 1.778000000000000024868996 V1 { 19.15824724193638672886664 10.97847094045843441278976 38.81835383775631953540142 } O1 3.552089230759687854543927 I1 -0 R1 1.778000000000000024868996 V2 { 19.15824724193635120172985 10.97847094045843441278976 38.33187674882810114240783 } O2 1.778000000000000024868996 I2 -0 R2 1.778000000000000024868996 V3 { 19.15824724193635830715721 10.97847094045843441278976 32.88719939592282770490783 } O3 1.778000000000000024868996 I3 -0 R3 1.778000000000000024868996 V4 { 124.1515304565429431704615 -148.5849227905274005934189 73.63529357316897971941216 } O4 1.778000000000000024868996 I4 -0 R4 1.778000000000000024868996
put {spki} pipe V0 { 21.85159059520787394603758 3.839178032743594037867751 34.56892814042966932674972 } O0 1.778000000000000024868996 I0 -0 R0 1.778000000000000024868996 V1 { 21.85159059520787749875126 3.839178032743594037867751 34.81377753618162529392066 } O1 3.311175825425637153642811 I1 -0 R1 1.778000000000000024868996 V2 { 21.85159059520787749875126 3.839178032743594037867751 35.07151374223631279392066 } O2 1.777999999999999802824391 I2 -0 R2 1.778000000000000024868996 V3 { 21.85159059520787394603758 3.848843140470644463846384 39.34188050630491062520377 } O3 1.777999999999999802824391 I3 -0 R3 1.778000000000000024868996 V4 { 0 192.9928710937499261035555 72.84086766820408342937299 } O4 1.777999999999999802824391 I4 -0 R4 1.778000000000000024868996
put {rrii} comb region no tree {u {l rrimi.s1} {l rrimi.s2}}
put {rri} comb region no tree {u {u {l rri.s1} {l rri.s2}} {l rri.s3}}
+6 -5
View File
@@ -1,4 +1,5 @@
set(CHESS_PARTS
set(
CHESS_PARTS
bishop.asc
chessboard.asc
king.asc
@@ -6,16 +7,16 @@ set(CHESS_PARTS
pawn.asc
queen.asc
rook.asc
)
)
foreach(piece ${CHESS_PARTS})
ADD_G_TARGET(${piece} "BRL-CAD Geometry Models/Sample/Chess")
g_target(${piece} "BRL-CAD Geometry Models/Sample/Chess")
endforeach(piece ${CHESS_PARTS})
CMAKEFILES(
cmakefiles(
${CHESS_PARTS}
CMakeLists.txt
)
)
# Local Variables:
# tab-width: 8
+3 -5
View File
@@ -1,12 +1,10 @@
set(COMGEOM_V5_MODELS
ADA073408.comgeom
)
set(COMGEOM_V5_MODELS ADA073408.comgeom)
foreach(comgeom_input ${COMGEOM_V5_MODELS})
ADD_G_TARGET(${comgeom_input} "BRL-CAD Geometry Models/Sample")
g_target(${comgeom_input} "BRL-CAD Geometry Models/Sample")
endforeach(comgeom_input ${COMGEOM_V5_MODELS})
CMAKEFILES(
cmakefiles(
${COMGEOM_V5_MODELS}
CMakeLists.txt
README_ADA073408
-41
View File
@@ -1,41 +0,0 @@
string(REPLACE "\\" "" GCV_EXEC "${EXEC}")
set(INPUT_FILE "@INPUT_FILE@")
set(OUTPUT_FILE "@OUTPUT_FILE@")
set(BIN_DIR "@BIN_DIR@")
# NOTE: OUTPUT_FILE needs to be defined in terms of a path relative to the root
# of the build diretory, not as an absolute path. Since that root may change
# at runtime in multiconfig builds, the full output path cannot be encoded
# directly into the generated script.
get_filename_component(OF_ABS "${OUTPUT_FILE}" ABSOLUTE)
if ("${OF_ABS}" STREQUAL "${OUTPUT_FILE}")
message(FATAL_ERROR "Absoute output file path \"${OUTPUT_FILE}\" supplied for conversion of \"${INPUT_FILE}\" - path must be relative.")
endif ("${OF_ABS}" STREQUAL "${OUTPUT_FILE}")
# Because the build directory changes at runtime in multiconfig builds, we
# need to deduce its current value from GCV_EXEC.
get_filename_component(CBDIR "${GCV_EXEC}" DIRECTORY)
string(REGEX REPLACE "${BIN_DIR}$" "" CROOT "${CBDIR}")
# BRLCAD_ROOT is the hammer that makes certain we are running
# things found in the build directory.
set(ENV{BRLCAD_ROOT} "${CROOT}")
# Now that we know the root, finalize the full path output file location
set(OUTPUT_FILE "${CROOT}/${OUTPUT_FILE}")
execute_process(
COMMAND "${GCV_EXEC}" -o "${OUTPUT_FILE}" "${INPUT_FILE}"
RESULT_VARIABLE conv_result OUTPUT_VARIABLE conv_log ERROR_VARIABLE conv_log
)
if(conv_result)
message(FATAL_ERROR "[geometry conversion] Failure: ${conv_result}\n${GCV_EXEC} -o \"${OUTPUT_FILE}\" \"${INPUT_FILE}\"\n\n${conv_log}")
endif(conv_result)
# Local Variables:
# tab-width: 8
# mode: cmake
# indent-tabs-mode: t
# End:
# ex: shiftwidth=2 tabstop=8
+1 -1
View File
@@ -2,7 +2,7 @@
# C U B E . R T
# BRL-CAD
#
# Copyright (c) 2004-2024 United States Government as represented by
# Copyright (c) 2004-2026 United States Government as represented by
# the U.S. Army Research Laboratory.
#
# Redistribution and use in source and binary forms, with or without
+1 -1
View File
@@ -2,7 +2,7 @@
/* D B . P H P
* BRL-CAD
*
* Copyright (c) 2004-2024 United States Government as represented by
* Copyright (c) 2004-2026 United States Government as represented by
* the U.S. Army Research Laboratory.
*
* This library is free software; you can redistribute it and/or
+39
View File
@@ -0,0 +1,39 @@
title {Earth Model v1.1 by starseeker}
units km
put {mesosphere.s} ell V {0 0 0} A {6468100000 0 0} B {0 6468100000 0} C {0 0 6446800000}
put {mesosphere.c} comb region no tree {- {l mesosphere.s} {l stratosphere.s}}
attr set {mesosphere.c} {shader} {glass {tr 0.85}}
put {atmosphere.c} comb region no tree {u {u {- {l mesosphere.c} {l slice-earth-2.s}} {- {l stratosphere.c} {l slice-earth-2.s}}} {- {l troposphere.c} {l slice-earth-2.s}}}
put {outer-core.s} ell V {0 0 0} A {-2394906651.625486850738525 1382699999.999999523162842 0} B {-1382699999.999999523162842 -2394906651.625486850738525 0} C {0 0 2750000000}
put {inner-core.s} ell V {0 0 0} A {-1047890738.579170942306519 604999999.9999997615814209 0} B {-604999999.9999997615814209 -1047890738.579170942306519 0} C {0 0 1210000000}
put {inner-core.r} comb region yes tree {n {l inner-core.s} {l slice-earth-2.s}}
attr set {inner-core.r} {color} {255/255/255} {shader} {plastic {sp 0.9 di 0.1}} {region} {R} {region_id} {1003} {material_id} {1} {los} {100}
put {lower-mantle-core-subtract.c} comb region no tree {u {l outer-core.s} {l inner-core.s}}
put {upper-mantle-core-subtract.c} comb region no tree {u {u {l lower-mantle.s} {l outer-core.s}} {l inner-core.s}}
put {slice-earth-outcore.s} arb8 V1 {1000000 1000000 1000000} V2 {1500000000 11550000000 1500000000} V3 {11550000000 1500000000 1500000000} V4 {1000000 1000000 1000000} V5 {1500000000 1500000000 11550000000} V6 {1500000000 1500000000 11550000000} V7 {1500000000 1500000000 11550000000} V8 {1500000000 1500000000 11550000000}
put {crust-core-subtract.c} comb region no tree {u {u {l upper-mantle.s} {l lower-mantle.s}} {u {l outer-core.s} {l inner-core.s}}}
put {outer-core-display.r} comb region yes tree {- {n {l outer-core.s} {l slice-earth-2.s}} {l inner-core.s}}
attr set {outer-core-display.r} {color} {254/255/178} {shader} {plastic} {region} {R} {region_id} {1002} {material_id} {1} {los} {100}
put {slice-earth-lowman.s} arb8 V1 {1000000 1000000 1000000} V2 {1000000000 11550000000 1000000000} V3 {11550000000 1000000000 1000000000} V4 {1000000 1000000 1000000} V5 {1000000000 1000000000 11550000000} V6 {1000000000 1000000000 11550000000} V7 {1000000000 1000000000 11550000000} V8 {1000000000 1000000000 11550000000}
put {earth-cutaway.c} comb region no tree {- {l earth-crust.c} {l slice-earth.s}}
put {earth-display.c} comb region no tree {u {u {u {u {u {l earth-cutaway.c} {l cutout-earth-backdrop.c}} {- {l upper-mantle-display.r} {l slice-earth-upman.s}}} {- {l lower-mantle-display.r} {l slice-earth-lowman.s}}} {- {l outer-core-display.r} {l slice-earth-outcore.s}}} {l inner-core.r}}
put {stratosphere.s} ell V {0 0 0} A {6428100000 0 0} B {0 6428100000 0} C {0 0 6406800000}
put {stratosphere.c} comb region no tree {- {l stratosphere.s} {l troposphere.s}}
attr set {stratosphere.c} {shader} {glass {tr 0.8}}
put {cutout-earth-backdrop.c} comb region no tree {n {l cutout-earth.c} {l earth-crust.s}}
put {lower-mantle.s} ell V {0 0 0} A {-4900404747.314247131347656 2829249999.999999046325684 0} B {-2829249999.999999046325684 -4900404747.314247131347656 0} C {0 0 5640000000}
put {upper-mantle.s} ell V {0 0 0} A {-5474406384.942572593688965 3160649999.999999046325684 0} B {-3160649999.999999046325684 -5474406384.942572593688965 0} C {0 0 6300000000}
put {slice-earth-2.s} arb8 V1 {1000000 1000000 1000000} V2 {1000000 11550000000 1000000} V3 {11550000000 1000000 1000000} V4 {1000000 1000000 1000000} V5 {1000000 1000000 11550000000} V6 {1000000 1000000 11550000000} V7 {1000000 1000000 11550000000} V8 {1000000 1000000 11550000000}
put {slice-earth-upman.s} arb8 V1 {1000000 1000000 1000000} V2 {500000000 11550000000 500000000} V3 {11550000000 500000000 500000000} V4 {1000000 1000000 1000000} V5 {500000000 500000000 11550000000} V6 {500000000 500000000 11550000000} V7 {500000000 500000000 11550000000} V8 {500000000 500000000 11550000000}
put {cutout-earth.c} comb region no tree {- {l slice-earth.s} {l slice-earth-2.s}}
put {troposphere.s} ell V {0 0 0} A {6396100000 0 0} B {0 6396100000 0} C {0 0 6374800000}
put {earth-crust.s} ell V {0 0 0} A {-5523596627.877529144287109 3189049999.999999046325684 0} B {-3189049999.999999046325684 -5523596627.877529144287109 0} C {0 0 6356800000}
put {troposphere.c} comb region no tree {- {l troposphere.s} {l earth-crust.s}}
attr set {troposphere.c} {shader} {stack {{cloud {}} {glass {tr 0.65}}}}
put {earth-crust.c} comb region no tree {- {l earth-crust.s} {l crust-core-subtract.c}}
attr set {earth-crust.c} {shader} {texture {file earth.pix w 2048 n 1024}}
put {slice-earth.s} arb8 V1 {0 0 0} V2 {0 11500000000 0} V3 {11500000000 0 0} V4 {0 0 0} V5 {0 0 11500000000} V6 {0 0 11500000000} V7 {0 0 11500000000} V8 {0 0 11500000000}
put {lower-mantle-display.r} comb region yes tree {- {n {l lower-mantle.s} {l slice-earth-2.s}} {l lower-mantle-core-subtract.c}}
attr set {lower-mantle-display.r} {color} {255/255/0} {shader} {plastic} {region} {R} {region_id} {1001} {material_id} {1} {los} {100}
put {upper-mantle-display.r} comb region yes tree {- {n {l upper-mantle.s} {l slice-earth-2.s}} {l upper-mantle-core-subtract.c}}
attr set {upper-mantle-display.r} {color} {254/160/60} {shader} {plastic} {region} {R} {region_id} {1000} {material_id} {1} {los} {100}
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

BIN
View File
Binary file not shown.
+4 -7
View File
@@ -1,17 +1,14 @@
set(FAA_SAMPLE_MODELS
Business_Jet.fg4
Generic_Twin.fg4
)
set(FAA_SAMPLE_MODELS Business_Jet.fg4 Generic_Twin.fg4)
foreach(faa_input ${FAA_SAMPLE_MODELS})
ADD_G_TARGET(${faa_input} "BRL-CAD Geometry Models/Sample")
g_target(${faa_input} "BRL-CAD Geometry Models/Sample")
endforeach(faa_input ${FAA_SAMPLE_MODELS})
CMAKEFILES(
cmakefiles(
${FAA_SAMPLE_MODELS}
CMakeLists.txt
README
)
)
# Local Variables:
# tab-width: 8
+78680
View File
File diff suppressed because it is too large. Load diff
+3473 -11817
View File
File diff suppressed because it is too large. Load diff
+30 -4
View File
@@ -1,4 +1,5 @@
set(NIST_SAMPLE_MODELS
set(
NIST_SAMPLE_MODELS
NIST_MBE_PMI_1.stp
NIST_MBE_PMI_2.stp
NIST_MBE_PMI_3.stp
@@ -10,10 +11,35 @@ set(NIST_SAMPLE_MODELS
)
foreach(im ${NIST_SAMPLE_MODELS})
ADD_G_TARGET(${im} "BRL-CAD Geometry Models/Sample")
g_target(${im} "BRL-CAD Geometry Models/Sample")
endforeach(im ${NIST_SAMPLE_MODELS})
CMAKEFILES(
# NIST 6 face 51 contains an unrelated seam excursion at a spherical pole.
# It must retain the native rigorous result without invoking mesh repair.
if(BUILD_TESTING AND TARGET brep-audit AND TARGET NIST_MBE_PMI_6.g)
brlcad_add_test(
NAME brep_cdt_nist6_native
COMMAND
brep-audit
--mode
quality
--valid-solids-only
--memory-limit-mib
4096
"${CMAKE_BINARY_DIR}/${DATA_DIR}/db/nist/NIST_MBE_PMI_6.g"
Document_item.s
)
set_tests_properties(
brep_cdt_nist6_native
PROPERTIES
REQUIRED_FILES "${CMAKE_BINARY_DIR}/${DATA_DIR}/db/nist/NIST_MBE_PMI_6.g"
TIMEOUT 90
)
add_dependencies(check NIST_MBE_PMI_6.g)
add_dependencies(unit NIST_MBE_PMI_6.g)
endif()
cmakefiles(
${NIST_SAMPLE_MODELS}
CMakeLists.txt
README
@@ -29,7 +55,7 @@ CMAKEFILES(
pdf/9.pdf
pdf/10.pdf
pdf/11.pdf
)
)
# Local Variables:
# tab-width: 8
+27
View File
@@ -0,0 +1,27 @@
title {Photo holder by csanyi_pal}
units mm
put {keretgyurf.s} eto V {0 0 175} N {0 0 0.9866229999999999167314968} C {0 0 4.933115000000001693081231} r 156 r_d 2.959869000000000749395213
put {keretgyura.s} eto V {0 0 25} N {0 0 0.9863332009625119800588777} C {0 0 4.931666004812560011316691} r 156 r_d 2.95899960288753804960038
put {kartonekhk.s} tgc V {0 0 20} H {0 0 160} A {0 -162 0} B {162 0 0} C {0 -162 0} D {162 0 0}
put {kartonekhb.s} tgc V {0 0 20} H {0 0 160} A {0 -161 0} B {161 0 0} C {0 -161 0} D {161 0 0}
put {uvegszelo.s} arb8 V1 {0 0 0} V2 {-273.2568000000004531102604 -199.463712010076335445774 0} V3 {-273.2568000000004531102604 -199.4637120100763070240646 200} V4 {-2.137306219959771470627159E-14 1.560125977964318386935442E-14 199.9999999999999715782906} V5 {-273.2568000000009078576113 199.4637120100766765062872 0} V6 {-273.2568000000009078576113 199.4637120100766765062872 0} V7 {-273.2568000000009078576113 199.4637120100766765062872 200.0000000000001705302566} V8 {-273.2568000000009078576113 199.4637120100766765062872 200.0000000000001705302566}
put {kereteehj.s} tgc V {-144.7437920000004965004337 58.16567399999996013093551 20} H {0 0 160} A {1.791839747726502229951961 4.667902132486008603962091 0} B {-2.800741279491604895923729 1.075103848635900805064125 0} C {1.791839747726502229951961 4.667902132486008603962091 0} D {-2.800741279491604895923729 1.075103848635900805064125 0}
put {kereteehb.s} tgc V {-144.6299540000000831696525 -58.43016799999981714108799 20} H {0 0 160} A {1.873032967079560906498159 -4.635919272833937121447434 0} B {2.781551563700361828779251 1.123819780247735433675871 0} C {1.873032967079560906498159 -4.635919272833937121447434 0} D {2.781551563700361828779251 1.123819780247735433675871 0}
put {kereteehjkicsi.s} tgc V {-144.736713000000236206688 58.16567399999982512781571 25} H {0 0 150} A {1.791839747726502229951961 4.667902132486008603962091 0} B {-2.800741279491604895923729 1.075103848635900805064125 0} C {1.791839747726502229951961 4.667902132486008603962091 0} D {-2.800741279491604895923729 1.075103848635900805064125 0}
put {keptarto.c} comb region no tree {u {u {l uveglap.r} {l karton.r}} {l keret.r}}
put {kereteehbkicsi.s} tgc V {-144.6299510000000339005055 -58.43016799999985266822478 25.00000000000002842170943} H {0 0 150} A {1.873032967079560906498159 -4.635919272833937121447434 0} B {2.781551563700361828779251 1.123819780247735433675871 0} C {1.873032967079560906498159 -4.635919272833937121447434 0} D {2.781551563700361828779251 1.123819780247735433675871 0}
put {uvegekhk.s} tgc V {0 0 0} H {0 0 200} A {0 -160 0} B {160 0 0} C {0 -160 0} D {160 0 0}
put {uvegekhb.s} tgc V {0 0 0} H {0 0 200} A {0 -156 0} B {156 0 0} C {0 -156 0} D {156 0 0}
put {uveglap.r} comb region yes tree {n {- {l uvegekhk.s} {l uvegekhb.s}} {l uvegszelo.s}}
attr set {uveglap.r} {color} {254/240/254} {shader} {glass} {region} {R} {region_id} {1000} {material_id} {1} {los} {100}
put {kartonkozepenlyuk.s} ell V {-161.3665119999998296407284 9.880522794467734402637521E-15 100.0809629999999117444531} A {7.347638122934263549268508E-16 12 0} B {-12 7.347638122934263549268508E-16 0} C {0 0 12}
put {karton.r} comb region yes tree {u {- {- {- {- {n {- {l kartonekhk.s} {l kartonekhb.s}} {l kartonszelok.s}} {l kartongmbab.s}} {l kartongmbaj.s}} {l kartongmbfk.s}} {l kartonkozepenlyuk.s}} {- {- {- {n {- {l kartonekhb.s} {l uvegekhk.s}} {l kartonszelok.s}} {l kartonszelob.s}} {l kartongmbab.s}} {l kartongmbaj.s}}}
attr set {karton.r} {color} {255/255/255} {shader} {plastic} {region} {R} {region_id} {1003} {material_id} {1} {los} {100}
put {keretszelokozepen.s} arb8 V1 {0 0 0} V2 {-166.3083958664467161270295 -67.15610201701679216057528 0} V3 {-166.3083958664467161270295 -67.15610201701677794972056 214.8175999999999135070539} V4 {-1.578905978938171909047631E-16 1.426081241349886421227616E-14 214.8175999999999419287633} V5 {-166.659954164212450677951 67.12896928889989567323937 0} V6 {-166.659954164212450677951 67.12896928889989567323937 0} V7 {-166.659954164212450677951 67.12896928889990988409409 214.8175999999999987721822} V8 {-166.659954164212450677951 67.12896928889990988409409 214.8175999999999987721822}
put {keret.r} comb region yes tree {- {u {u {u {u {u {u {u {u {u {n {l keretgyura.s} {l kereteehb.s}} {l kereteehbkicsi.s}} {n {l keretgyura.s} {l kereteehj.s}}} {l kereteehjkicsi.s}} {n {l keretgyurf.s} {l kereteehb.s}}} {l kereteehbkicsi.s}} {n {l keretgyurf.s} {l kereteehj.s}}} {l kereteehjkicsi.s}} {n {l keretgyura.s} {l keretszelokozepen.s}}} {- {n {l keretgyurf.s} {l keretszelokozepen.s}} {l uveglap.r}}} {l uveglap.r}}
attr set {keret.r} {color} {255/240/120} {shader} {plastic} {region} {R} {region_id} {1001} {material_id} {1} {los} {100}
put {kartonszelok.s} arb8 V1 {0 0 0} V2 {-168.0589500000000384716259 -71.77879269107120308035519 0} V3 {-168.0589500000000384716259 -71.77879269107113202608161 224.0785999999999660303729} V4 {-1.631395896368632521173223E-29 1.592174214692930869044001E-14 224.0786000000000228737917} V5 {-168.0589500000001237367542 71.77879269107125992377405 0} V6 {-168.0589500000001237367542 71.77879269107125992377405 0} V7 {-168.0589500000001237367542 71.77879269107127413462877 224.0786000000000797172106} V8 {-168.0589500000001237367542 71.77879269107127413462877 224.0786000000000797172106}
put {kartonszelob.s} arb8 V1 {0 0 0} V2 {-166.4836399999998661769496 -63.37119199999997221084413 0} V3 {-166.4836399999998661769496 -63.37119199999995799998942 214.8175999999999135070539} V4 {-1.757644366536248560321584E-29 1.526370851934186986541124E-14 214.8175999999999419287633} V5 {-166.4836399999998661769496 63.37119199999997221084413 0} V6 {-166.4836399999998661769496 63.37119199999997221084413 0} V7 {-166.4836399999998661769496 63.37119199999999352712621 214.8175999999999987721822} V8 {-166.4836399999998661769496 63.37119199999999352712621 214.8175999999999987721822}
put {kartongmbfk.s} ell V {-161.2951809999994736699591 9.876155174676486577133334E-15 180.0822759999995525959093} A {7.347638122934263549268508E-16 12 0} B {-12 7.347638122934263549268508E-16 0} C {0 0 12}
put {kartongmbaj.s} ell V {-148.5169369999997002196324 -63.37174099999977983088684 19.92848799999995890175342} A {7.347638122934263549268508E-16 12 0} B {-12 7.347638122934263549268508E-16 0} C {0 0 12}
put {kartongmbab.s} ell V {-147.9239789999987806368154 63.24422300000000518593879 20.08229800000001219473234} A {7.347638122934263549268508E-16 12 0} B {-12 7.347638122934263549268508E-16 0} C {0 0 12}
+23123 -29302
View File
File diff suppressed because it is too large. Load diff
+360
View File
@@ -0,0 +1,360 @@
title {Examples of nearly all primitives in BRL-CAD, by Mitchell Roberts, Christopher McGregor, & Joshua Baker}
units mm
put {ars_bicone.s} ars NC 3 PPC 9 C0 { { 0 0 0 } { 0 0 0 } { 0 0 0 } { 0 0 0 } { 0 0 0 } { 0 0 0 } { 0 0 0 } { 0 0 0 } { 0 0 0 } } C1 { { 500 0 500 } { 353.5533909999999764295353 353.5533909999999764295353 500 } { 0 500 500 } { -353.5533909999999764295353 353.5533909999999764295353 500 } { -500 0 500 } { -353.5533909999999764295353 -353.5533909999999764295353 500 } { 0 -500 500 } { 353.5533909999999764295353 -353.5533909999999764295353 500 } { 500 0 500 } } C2 { { 0 0 1000 } { 0 0 1000 } { 0 0 1000 } { 0 0 1000 } { 0 0 1000 } { 0 0 1000 } { 0 0 1000 } { 0 0 1000 } { 0 0 1000 } }
put {ars_bicone.r} comb region yes tree {l ars_bicone.s}
attr set {ars_bicone.r} {region} {R} {region_id} {1032} {material_id} {1} {los} {100} {color} {217/222/255}
put {superell.s} superell V {0 0 125} A {500 0 0} B {0 250 0} C {0 0 125} n 1 e 1
put {superell.r} comb region yes tree {l superell.s}
attr set {superell.r} {region} {R} {region_id} {1041} {material_id} {1} {los} {100} {color} {87/177/118}
put {metaball.s} metaball method 1 thresh 1 PL { {277.7777780000033089891076 499.9999995555554050952196 500.0000003333334461785853 222.2222222222222285381577 1} {722.222222444448561873287 499.9999995555554050952196 500.0000003333334461785853 222.2222222222222285381577 1} }
put {metaball.r} comb region yes tree {l metaball.s}
attr set {metaball.r} {region} {R} {los} {100} {material_id} {1} {region_id} {1031} {color} {167/193/254}
put {revolve.s} revolve V {2457.106780999999955383828 8957.106781000000410131179 707.1067809999999553838279} axis {0 1 0} R {0 0 1} ang 3.141592653589793115997963 sk_name sketch
put {revolve.r} comb region yes tree {l revolve.s}
attr set {revolve.r} {region} {R} {los} {100} {material_id} {1} {region_id} {1012} {color} {140/140/244}
put {extrude.s} extrude V {0 0 0} H {0 0 200} A {0 1 0} B {1 0 0} S sketch
put {extrude.r} comb region yes tree {l extrude.s}
attr set {extrude.r} {region} {R} {los} {100} {material_id} {1} {region_id} {1039} {color} {133/62/107}
put {geometry} comb region no tree {u {u {u {u {u {u {l arb8.r} {l 3ptarb.r {1 0 0 0 0 1 0 1750 0 0 1 0 0 0 0 1}}} {u {l box.r {1 0 0 0 0 1 0 3500 0 0 1 0 0 0 0 1}} {l rpp.r {1 0 0 0 0 1 0 5250 0 0 1 0 0 0 0 1}}}} {u {u {l arb7.r {1 0 0 0 0 1 0 7000 0 0 1 0 0 0 0 1}} {l arb6.r {1 0 0 0 0 1 0 8750 0 0 1 0 0 0 0 1}}} {u {l concave_arb.r {1 0 0 0 0 1 0 10500 0 0 1 0 0 0 0 1}} {l raw.r {1 0 0 1750 0 1 0 0 0 0 1 0 0 0 0 1}}}}} {u {u {u {l arb5.r {1 0 0 1750 0 1 0 1750 0 0 1 0 0 0 0 1}} {l arb4.r {1 0 0 1750 0 1 0 3500 0 0 1 0 0 0 0 1}}} {u {l arbn.r {1 0 0 1750 0 1 0 5250 0 0 1 0 0 0 0 1}} {l ars.r {1 0 0 1750 0 1 0 7000 0 0 1 0 0 0 0 1}}}} {u {u {l revolve.r} {l hrt.r {1 0 0 1750 0 1 0 10500 0 0 1 500 0 0 0 1}}} {u {l ell.r {1 0 0 3500 0 1 0 0 0 0 1 0 0 0 0 1}} {l sph.r {1 0 0 3500 0 1 0 1750 0 0 1 0 0 0 0 1}}}}}} {u {u {u {u {l ellg.r {1 0 0 3500 0 1 0 3500 0 0 1 0 0 0 0 1}} {l ell1.r {1 0 0 3500 0 1 0 5250 0 0 1 0 0 0 0 1}}} {u {l ehy.r {1 0 0 3500 0 1 0 7000 0 0 1 0 0 0 0 1}} {l epa.r {1 0 0 3500 0 1 0 8750 0 0 1 0 0 0 0 1}}}} {u {u {l tgc.r {1 0 0 5250 0 1 0 0 0 0 1 0 0 0 0 1}} {l rcc.r {1 0 0 5250 0 1 0 1750 0 0 1 0 0 0 0 1}}} {u {l rec.r {1 0 0 5250 0 1 0 3500 0 0 1 0 0 0 0 1}} {l rhc.r {1 0 0 5250 0 1 0 5250 0 0 1 0 0 0 0 1}}}}} {u {u {u {l rpc.r {1 0 0 5250 0 1 0 7000 0 0 1 0 0 0 0 1}} {l tec.r {1 0 0 5250 0 1 0 8750 0 0 1 0 0 0 0 1}}} {u {l trc.r {1 0 0 7000 0 1 0 0 0 0 1 0 0 0 0 1}} {l tor.r {1 0 0 7000 0 1 0 1750 0 0 1 0 0 0 0 1}}}} {u {u {l eto.r {1 0 0 7000 0 1 0 3500 0 0 1 0 0 0 0 1}} {l part.r {1 0 0 7000 0 1 0 5250 0 0 1 0 0 0 0 1}}} {u {l pipe.r {1 0 0 7000 0 1 0 7000 0 0 1 0 0 0 0 1}} {l metaball.r {1 0 0 7000 0 1 0 8750 0 0 1 0 0 0 0 1}}}}}}} {u {u {u {u {l ars_bicone.r {1 0 0 8750 0 1 0 0 0 0 1 0 0 0 0 1}} {l bot.r {1 0 0 8750 0 1 0 1750 0 0 1 0 0 0 0 1}}} {u {l brep.r {1 0 0 8750 0 1 0 3500 0 0 1 0 0 0 0 1}} {l cline.r {1 0 0 8750 0 1 0 5250 0 0 1 0 0 0 0 1}}}} {u {u {l nmg.r {1 0 0 8750 0 1 0 7000 0 0 1 0 0 0 0 1}} {l dsp.r {1 0 0 8750 0 1 0 8750 0 0 1 0 0 0 0 1}}} {u {l ebm.r {1 0 0 10500 0 1 0 0 0 0 1 0 0 0 0 1}} {l extrude.r {1 0 0 10500 0 1 0 1750 0 0 1 0 0 0 0 1}}}}} {u {u {u {l grip.r {1 0 0 10500 0 1 0 3500 0 0 1 0 0 0 0 1}} {l superell.r {1 0 0 10500 0 1 0 5250 0 0 1 0 0 0 0 1}}} {u {l hyp.r {1 0 0 10500 0 1 0 7000 0 0 1 0 0 0 0 1}} {l vol.r {1 0 0 10500 0 1 0 8750 0 0 1 0 0 0 0 1}}}} {u {l welcome_annot.r {1 0 0 0 0 1 0 0 0 0 1 3500 0 0 0 1}} {l half.r}}}}}
put {welcome_annot.s} annot V {0 0 0} VL { {0 0} {0 0} } SL { { line S 0 E 1 } { txt R 0 P 5 L {Welcome to BRL-CAD} S 10 A 0 } }
put {welcome_annot.r} comb region yes tree {l welcome_annot.s}
attr set {welcome_annot.r} {region} {R} {region_id} {1044} {material_id} {1} {los} {100} {color} {208/199/231}
put {submodel} submodel file {} treetop geometry meth 0
put {3ptarb.s} arb8 V1 {0 0 0} V2 {0 1000 0} V3 {200 1000 1000} V4 {200 0 1000} V5 {1000 0 200} V6 {1000 1000 200} V7 {1000 1000 800} V8 {1000 0 800}
put {3ptarb.r} comb region yes tree {l 3ptarb.s}
attr set {3ptarb.r} {region} {R} {los} {100} {material_id} {1} {region_id} {1001} {color} {128/206/236}
put {small_geometry} comb region no tree {u {u {l datum.r} {l pnts.r {1 0 0 10 0 1 0 0 0 0 1 0 0 0 0 1}}} {l joint.r}}
put {joint.s} joint V {0 10 0} RP1 none RP2 none V1 {1 0 0} V2 {0 1 0} A 1
put {joint.r} comb region yes tree {l joint.s}
attr set {joint.r} {region} {R} {region_id} {2002} {material_id} {1} {los} {100} {color} {123/189/56}
put {datum.s} datum data { {point 0 0 0}}
put {datum.r} comb region yes tree {l datum.s}
attr set {datum.r} {region} {R} {region_id} {2000} {material_id} {1} {los} {100} {color} {89/91/192}
put {cline.s} cline V {0 0 0} H {0 0 1000} R 500 T 100
put {cline.r} comb region yes tree {l cline.s}
attr set {cline.r} {region} {R} {region_id} {1035} {material_id} {1} {los} {100} {color} {158/120/242}
put {script} script type dummy
put {sketch} sketch V {0 0 0} A {1 0 0} B {0 1 0} VL { {0 0} {0 0} {500 1000} {0 1000} {100 900} {100 400} {350 900} } SL { { line S 0 E 2 } { line S 1 E 3 } { line S 3 E 2 } { line S 4 E 4 } { line S 4 E 5 } { line S 4 E 6 } { line S 6 E 5 } }
put {pnts.s} pnts count 3 type 7 scale 1 data { {0 0 3 1 0 0 1 1 0 0} {0 0 1 0 1 0 0.25 0 1 0} {0 0 0 0 0 1 0.5 0 0 1} }
put {pnts.r} comb region yes tree {l pnts.s}
attr set {pnts.r} {region} {R} {region_id} {2001} {material_id} {1} {los} {100} {color} {96/242/93}
put {part.s} part V {285.7142860000000155196176 285.7142860000000155196176 285.7142860000000155196176} H {0 0 571.4285714285714448124054} r_v 285.7142857142857224062027 r_h 142.8571428571428612031013
put {part.r} comb region yes tree {l part.s}
attr set {part.r} {region} {R} {los} {100} {material_id} {1} {region_id} {1029} {color} {50/181/89}
put {grip.s} grip V {0 250 250} N {1 0 0} L 999.0063767276445787501871
put {grip.r} comb region yes tree {l grip.s}
attr set {grip.r} {region} {R} {region_id} {1040} {material_id} {1} {los} {100} {color} {104/163/177}
put {brep.s} brep "M0QgR2VvbWV0cnkgRmlsZSBGb3JtYXQgICAgICAgIDQBAAAAfgAAACBSdW50aW1lOiBPTjo6
UnVudGltZUVudmlyb25tZW50OjpXaW5kb3dzIDNETSBJL08gcHJvY2Vzc29yOiBPcGVuTlVS
QlMgdG9vbGtpdCB2ZXJzaW9uIDI0MTg1NzY2ODggKGNvbXBpbGVkIG9uIE1heSAxMSAyMDI2
KQoaABQAABAGAQAAJgAAoN6AEAwhgAAgpQAAABAVAAAAYwBoAHIAaQBzAHQAbwBwAGgAZQBy
AC4AagAuAG0AYwBnAHIAZQBnAAAAGwAAAAMAAAAUAAAAEgAAAAUAAAB+AAAABAAAAKgAAAAV
AAAAYwBoAHIAaQBzAHQAbwBwAGgAZQByAC4AagAuAG0AYwBnAHIAZQBnAAAAGwAAAAMAAAAU
AAAAEgAAAAUAAAB+AAAABAAAAKgAAAABAAAATcMgbiSAACBBAAAAEBgAAABCAFIATAAtAEMA
QQBEACAAQgAtAFIAZQBwACAAcAByAGkAbQBpAHQAaQB2AGUAAAAAAAAAAAAAAAVdgMj/////
AAAAABUAABBOBQAAMYAAIDgAAABmAAAAAgAAAPyp8dJNYlA/OZ1SokbfkT97FK5H4XqEPwAA
AAADAAAA/Knx0k1iUD8AAAAAcxK4BTKAACCSAAAAFQAAAAAAAAAAAQAAAAAAAAAAAAAAAAAA
AAAAAAAtQxzr4jYaPwAAAAAAAAAAAAAAAAAAGEAAAAAAAAAAAIdE50oYV9Y/AAAAAAAA8D+H
ROdKGFfWP4dE50oYV7Y/AAAAAAIAAAAAAAAAAAAAAAAAAQCAAEAWAAAAAQAAAAMAAAAEAAAA
AgAAAAAABl0LsNcRAGEzgAAgkgAAABUBAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAALUMc
6+I2Gj8AAAAAAAAAAAAAAAAAAAAAEAAAAAAAAACHROdKGFfWPwAAAAAAAPA/h0TnShhX1j+H
ROdKGFe2PwAAAAABAAAAAJqZmZmZmek/AAEAgABAFgAAAAEAAAADAAAABAAAAAIAAAAAAAZd
C7Cy2r7ZNIAAIG8AAAASAAAAAAAA8D8AAAAAAADwPwAAAAAAAPA/AAAAAAAA8D8AAAAAAADw
PwAAAAAAAPA/AAAAAAAA8D8AAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAA
APA/AQAAAAAAAPA/AYoskH41gAAgCAAAAAAAAAAc30QhNoAAIAgAAAAAAAAAHN9EITeAACAI
AAAAAAAAABzfRCE4AACgAAAAADmAACAMAAAA/////wAAAAD/////OoAAIAwAAAAAAAAAAAAA
AGnfImU8AACgAQAAAD2AACBxAAAAZwAAAAAAAAAgAwAAWAIAAAAAAAAAAAAA////AAAAAAAA
AAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAQAAAOgDAADoAwAAAAAA
AAAA6D8AAAAAAABSQAgAAACgoKAAAMkUlYw/gAAgKQAAABAAAAAAAADwPwAAAAAAAPA/RgAA
AAUAAAABAAAAAQAAAAEAAACE6criMgEAoAAAAAAzAQCgAAAAADSBACAxAgAAFwAAAAAAAPA/
/////wAAAAD/////AAAAAACAAEBAAAAAAQAAAAAAAABmAAAAAgAAAPyp8dJNYlA/OZ1Sokbf
kT97FK5H4XqEPwAAAAADAAAA/Knx0k1iUD8AAAAARBpSBwAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAgABAlAAAAAEAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADwPwAAAAAAAAAA
AAAAAAAA8D8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAALaKvB4AAIAAQBEAAAABAAAAAAAAAAABAAAAYvheahUAAAAAAAAAAAEAAAAA
AAAAAAAAAAAAAAAAAAAALUMc6+I2Gj8AAAAAAAAAAAAAAAAAABhAAAAAAAAAAACHROdKGFfW
PwAAAAAAAPA/h0TnShhX1j+HROdKGFe2PwAAAAACAAAAAAAAAAAAAAAAAAEAgABAFgAAAAEA
AAADAAAABAAAAAIAAAAAAAZdC7DoUQyt8tcsQ7YcMdKCkYeiAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAABxf4XX/////wAAAAAWAAAQCAAAAP////8AAAAAJQAAEAgAAAD/////AAAAABAA
ABAIAAAA/////wAAAAAjAAAQCAAAAP////8AAAAAEQAAEOkAAABQgAAg2QAAAPp/AgDNAAAA
+/8CABQAAAATmICVhenTEb/lABCDASLwO0cHHfz/AgChAAAAHwAAAAAAAAAA//////////8A
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPA/CAAAAEQAZQBmAGEAdQBsAHQAAAAB////////
//8AAAAAAAAAAADoUQyt8tcsQ7YcMdKCkYeiAAAAAAAAAAAAAAAAAAAAAAEAgABAEAAAAAEA
AAAAAAAAAAAAAACKcOAAAAAAAAAAAAAAAAAAAAAAAK8HT6z/fwKAAAAAAAAAAAD/////AAAA
ABgAABAIAAAA/////wAAAAAZAAAQCAAAAP////8AAAAAIAAAEAgAAAD/////AAAAABIAABAI
AAAA/////wAAAAAiAAAQCAAAAP////8AAAAAIQAAEAgAAAD/////AAAAABMAABDPDwAAcIAA
IL8PAABxAACCEAAAAPp/AgAJDwAA+/8CABQAAADF27VgYObTEb/kABCDASLwmFHJzPz/AgDd
DgAAMgCAAED9AgAAEAQAAAABAAAA+n8CALEAAAD7/wIAFAAAAN3U105H6dMRv+UAEIMBIvAQ
8nhw/P8CAIUAAAAQAgAAAAAAAAACAAAAAgAAAAAAAAAAAAAAAAAAAAAA8D8AAAAAAAAAAAAA
AAAAAAAAAAAAAAAA8L8AAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAA8D8CAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAPA/AAAAAAAAAAAxzI75/38CgAAAAAABAAAA+n8CALEA
AAD7/wIAFAAAAN3U105H6dMRv+UAEIMBIvAQ8nhw/P8CAIUAAAAQAgAAAAAAAAACAAAAAgAA
AAAAAAAAAAAAAAAAAAAA8D8AAAAAAAAAAAAAAAAAAAAAAAAAAAAA8L8AAAAAAAAAAAAAAAAA
AAAAAgAAAAAAAAAAAAAAAAAAAAAA8D8CAAAAAAAAAAAA8D8AAAAAAAAAAAAAAAAAAPA/AAAA
AAAA8D/xQq7i/38CgAAAAAABAAAA+n8CALEAAAD7/wIAFAAAAN3U105H6dMRv+UAEIMBIvAQ
8nhw/P8CAIUAAAAQAgAAAAAAAAACAAAAAgAAAAAAAAAAAAAAAAAAAAAA8D8AAAAAAAAAAAAA
AAAAAAAAAAAAAAAA8L8AAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAA8D8CAAAA
AAAAAAAA8D8AAAAAAADwPwAAAAAAAAAAAAAAAAAA8D/wKxmb/38CgAAAAAABAAAA+n8CALEA
AAD7/wIAFAAAAN3U105H6dMRv+UAEIMBIvAQ8nhw/P8CAIUAAAAQAgAAAAAAAAACAAAAAgAA
AAAAAAAAAAAAAAAAAAAA8D8AAAAAAAAAAAAAAAAAAAAAAAAAAAAA8L8AAAAAAAAAAAAAAAAA
AAAAAgAAAAAAAAAAAAAAAAAAAAAA8D8CAAAAAAAAAAAAAAAAAAAAAADwPwAAAAAAAAAAAAAA
AAAAAAAwpTmA/38CgAAAAAA7htYFAIAAQGYBAAAQAQAAAAEAAAD6fwIAUQEAAPv/AgAUAAAA
3dTXTkfp0xG/5QAQgwEi8BDyeHD8/wIAJQEAABADAAAAAQAAAAMAAAAFAAAAAAAAAAAAAAAA
AAAAAADwPwAAAAAAAAAAAAAAAAAAAAAAAAAAAADwvwAAAAAAAAAAAAAAAAAAAAAGAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAOA/AAAAAAAA4D8AAAAAAADwPwAAAAAAAPA/BQAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPA/ZUAYsNoYdkAAAAAAAAAAAAAAAAAAAAAAzDt/
Zp6g5j8AAAAAAEB/QAAAAAAAAAAAAAAAAABAf0AAAAAAAADwP2VAGLDaGHZAAAAAAAAAAABl
QBiw2hiGQMw7f2aeoOY/AAAAAAAAAAAAAAAAAAAAAAAAAAAAQI9AAAAAAAAA8D/ksnLK/38C
gAAAAAAkMd8+AIAAQMIGAAAQAQAAAAEAAAD6fwIArQYAAPv/AgAUAAAA3tTXTkfp0xG/5QAQ
gwEi8OJGsFn8/wIAgQYAABADAAAAAQAAAAMAAAADAAAACQAAAAUAAAAAAAAAAAAAAAAAAAAA
APA/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAPC/AAAAAAAAAAAAAAAAAAAAAAoAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAA0D8AAAAAAADQPwAAAAAAAOA/AAAAAAAA4D8AAAAAAADoPwAAAAAA
AOg/AAAAAAAA8D8AAAAAAADwPwYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4D8AAAAAAADg
PwAAAAAAAPA/AAAAAAAA8D8tAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8D9l
QBiw2hh2QAAAAAAAAAAAAAAAAAAAAADMO39mnqDmPwAAAAAAQH9AAAAAAAAAAAAAAAAAAEB/
QAAAAAAAAPA/ZUAYsNoYdkAAAAAAAAAAAGVAGLDaGIZAzDt/Zp6g5j8AAAAAAAAAAAAAAAAA
AAAAAAAAAABAj0AAAAAAAADwPwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMw7f2aeoOY/AAAA
AABAb0AAAAAAAEBvQAAAAAAAAAAAAAAAAAAA4D9lQBiw2hh2QGVAGLDaGHZAZUAYsNoYdkDM
O39mnqDmPwAAAAAAQG9AAAAAAABAb0AAAAAAAEB/QAAAAAAAAOA/AAAAAAAAAAAAAAAAAAAA
AGVAGLDaGIZAzDt/Zp6g5j8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADwPwAAAAAA
AAAAZUAYsNoYdkAAAAAAAAAAAMw7f2aeoOY/AAAAAAAAAAAAAAAAAEB/QAAAAAAAQH9AAAAA
AAAA8D8AAAAAAAAAAGVAGLDaGHZAZUAYsNoYhkDMO39mnqDmPwAAAAAAAAAAAAAAAAAAAAAA
AAAAAECPQAAAAAAAAPA/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAzDt/Zp6g5j8AAAAAAEBv
wAAAAAAAQG9AAAAAAAAAAAAAAAAAAADgP2VAGLDaGHbAZUAYsNoYdkBlQBiw2hh2QMw7f2ae
oOY/AAAAAABAb8AAAAAAAEBvQAAAAAAAQH9AAAAAAAAA4D8AAAAAAAAAAAAAAAAAAAAAZUAY
sNoYhkDMO39mnqDmPwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPA/ZUAYsNoYdsAA
AAAAAAAAAAAAAAAAAAAAzDt/Zp6g5j8AAAAAAEB/wAAAAAAAAAAAAAAAAABAf0AAAAAAAADw
P2VAGLDaGHbAAAAAAAAAAABlQBiw2hiGQMw7f2aeoOY/AAAAAAAAAAAAAAAAAAAAAAAAAAAA
QI9AAAAAAAAA8D8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADMO39mnqDmPwAAAAAAQG/AAAAA
AABAb8AAAAAAAAAAAAAAAAAAAOA/ZUAYsNoYdsBlQBiw2hh2wGVAGLDaGHZAzDt/Zp6g5j8A
AAAAAEBvwAAAAAAAQG/AAAAAAABAf0AAAAAAAADgPwAAAAAAAAAAAAAAAAAAAABlQBiw2hiG
QMw7f2aeoOY/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8D8AAAAAAAAAAGVAGLDa
GHbAAAAAAAAAAADMO39mnqDmPwAAAAAAAAAAAAAAAABAf8AAAAAAAEB/QAAAAAAAAPA/AAAA
AAAAAABlQBiw2hh2wGVAGLDaGIZAzDt/Zp6g5j8AAAAAAAAAAAAAAAAAAAAAAAAAAABAj0AA
AAAAAADwPwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMw7f2aeoOY/AAAAAABAb0AAAAAAAEBv
wAAAAAAAAAAAAAAAAAAA4D9lQBiw2hh2QGVAGLDaGHbAZUAYsNoYdkDMO39mnqDmPwAAAAAA
QG9AAAAAAABAb8AAAAAAAEB/QAAAAAAAAOA/AAAAAAAAAAAAAAAAAAAAAGVAGLDaGIZAzDt/
Zp6g5j8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADwP2VAGLDaGHZAAAAAAAAAAAAA
AAAAAAAAAMw7f2aeoOY/AAAAAABAf0AAAAAAAAAAAAAAAAAAQH9AAAAAAAAA8D9lQBiw2hh2
QAAAAAAAAAAAZUAYsNoYhkDMO39mnqDmPwAAAAAAAAAAAAAAAAAAAAAAAAAAAECPQAAAAAAA
APA/e/At1f9/AoAAAAAAJDHfPgCAAEBhAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAj0ABAAAA
AAAAAAAAAAAAAAAADDXl1gCAAEBRAAAAEAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
APA/AAAAAAEAAAACAAAAAQAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8D+Dbp3pAIAA
QBkCAAAQBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADwP/////8AAAAAAAAAAAAAAAAEAAAA
BAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADwPwAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAA
AADwPwAAAAAAAAAAAQAAAAAAAAADAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAADwPwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAIAAAACAAAAAAAAAAAAAAAAAAAAAADwP/////8BAAAAAQAAAAAAAAAEAAAABgAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADwPwAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAADwPwAA
AAABAAAAAAAAAAEAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AADwPwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALt3
NS0AgABAKQAAABABAAAAAAAAAAQAAAAAAAAAAQAAAAIAAAADAAAAAQAAAAAAAABzz7mMAIAA
QDEAAAARAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABR8ILj
AAAAAABAf8AAAAAAAEB/wAAAAAAAAAAAAAAAAABAf0AAAAAAAEB/QAAAAAAAQI9AAIAAQAUA
AAAAje8C0gCAAEAFAAAAAI3vAtIAAAAAIFhGvv9/AoAAAAAAcoAAApIAAAAY2uyzF7oXRU6e
Z6K42b5SDQAAAAD/////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAPA/AQAAAAAAAAAFAAAAYgBy
AGUAcAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////AAAAAAAAgABAFwAA
AAEAAAADAAAAAAAAAAAAAAABAQA4eE4E0Akd+H8AAIIAAAAAAAAAAP////8AAAAAJgAAEAgA
AAD/////AAAAABcAABBSEgAAgIAAIDEAAABYLVkWL0odQL9eO4d0HBsbgoAAIBUAAAABAAAA
AAAAAAEEAAAA3oAQDBersrkvs3AvgQAAIAkSAAAEAAAA/REAADx4bWw+DQoJPHJlbmRlci1j
b250ZW50LW1hbmFnZXItZG9jdW1lbnQ+DQoJCTxjb250ZW50Pg0KCQkJPGVudmlyb25tZW50
Lz4NCgkJPC9jb250ZW50Pg0KCQk8ZGVmYXVsdC1jb250ZW50LXNlY3Rpb24vPg0KCQk8c2V0
dGluZ3M+DQoJCQk8bmFtZWQtdmlld3M+DQoJCQkJPHNvcnQtbW9kZSB0eXBlPSJzdHJpbmci
Lz4NCgkJCTwvbmFtZWQtdmlld3M+DQoJCQk8bmFtZWQtY3BsYW5lcz4NCgkJCQk8c29ydC1t
b2RlIHR5cGU9InN0cmluZyIvPg0KCQkJPC9uYW1lZC1jcGxhbmVzPg0KCQkJPG5hbWVkLXBv
c2l0aW9ucz4NCgkJCQk8c29ydC1tb2RlIHR5cGU9InN0cmluZyIvPg0KCQkJPC9uYW1lZC1w
b3NpdGlvbnM+DQoJCQk8bmFtZWQtc25hcHNob3RzPg0KCQkJCTxzb3J0LW1vZGUgdHlwZT0i
c3RyaW5nIi8+DQoJCQk8L25hbWVkLXNuYXBzaG90cz4NCgkJCTxtaXNjZWxsYW5lb3VzPg0K
CQkJCTxjdXN0b20taW1hZ2Utc2l6ZS1pcy1wcmVzZXQgdHlwZT0iYm9vbCI+ZmFsc2U8L2N1
c3RvbS1pbWFnZS1zaXplLWlzLXByZXNldD4NCgkJCQk8c21hcnQtbWVyZ2UtbmFtZS1jb2xs
aXNpb24tc3VwcHJlc3M+DQoJCQkJCTxpbXBvcnQgdHlwZT0iYm9vbCI+ZmFsc2U8L2ltcG9y
dD4NCgkJCQkJPHBhc3RlIHR5cGU9ImJvb2wiPmZhbHNlPC9wYXN0ZT4NCgkJCQk8L3NtYXJ0
LW1lcmdlLW5hbWUtY29sbGlzaW9uLXN1cHByZXNzPg0KCQkJPC9taXNjZWxsYW5lb3VzPg0K
CQkJPGV4Y2x1ZGVkLXJlbmRlci1lbmdpbmVzPg0KCQkJCTx1dWlkcyB0eXBlPSJzdHJpbmci
Lz4NCgkJCTwvZXhjbHVkZWQtcmVuZGVyLWVuZ2luZXM+DQoJCQk8ZmlsdGVycz4NCgkJCQk8
bmFtZS1maWx0ZXIgdHlwZT0ic3RyaW5nIi8+DQoJCQkJPG5hbWUtZmlsdGVyLWludmVydCB0
eXBlPSJib29sIj5mYWxzZTwvbmFtZS1maWx0ZXItaW52ZXJ0Pg0KCQkJCTxzaG93LXVuYXNz
aWduZWQtbWF0ZXJpYWxzIHR5cGU9ImJvb2wiPnRydWU8L3Nob3ctdW5hc3NpZ25lZC1tYXRl
cmlhbHM+DQoJCQkJPHNob3ctdjQtbWF0ZXJpYWxzIHR5cGU9ImJvb2wiPnRydWU8L3Nob3ct
djQtbWF0ZXJpYWxzPg0KCQkJCTxzaG93LWhpZGRlbi1tYXRlcmlhbHMgdHlwZT0iYm9vbCI+
ZmFsc2U8L3Nob3ctaGlkZGVuLW1hdGVyaWFscz4NCgkJCQk8c2hvdy1yZWZlcmVuY2UtbWF0
ZXJpYWxzIHR5cGU9ImJvb2wiPmZhbHNlPC9zaG93LXJlZmVyZW5jZS1tYXRlcmlhbHM+DQoJ
CQk8L2ZpbHRlcnM+DQoJCQk8cG9zdC1lZmZlY3RzLW5ldz4NCgkJCQk8ZWFybHkvPg0KCQkJ
CTx0b25lLW1hcHBpbmcvPg0KCQkJCTxsYXRlLz4NCgkJCTwvcG9zdC1lZmZlY3RzLW5ldz4N
CgkJCTxyZW5kZXJpbmc+DQoJCQkJPHJlbmRlci1jaGFubmVscz4NCgkJCQkJPGxpc3QgdHlw
ZT0ic3RyaW5nIj40NTNBOUExQy05MzA3LTQ5NzYtQjI4Mi00RUFENEQ1Mzk4Nzk7Qjc1MkNF
MEItQzIxOS00QkRELUIxMzQtMjY0MjVFMUM0MzMxPC9saXN0Pg0KCQkJCQk8bW9kZSB0eXBl
PSJzdHJpbmciPmF1dG9tYXRpYzwvbW9kZT4NCgkJCQk8L3JlbmRlci1jaGFubmVscz4NCgkJ
CQk8ZW1iZWQtc3VwcG9ydC1maWxlcy1vbiB0eXBlPSJib29sIj50cnVlPC9lbWJlZC1zdXBw
b3J0LWZpbGVzLW9uPg0KCQkJCTx1c2UtZGl0aGVyaW5nIHR5cGU9ImJvb2wiPmZhbHNlPC91
c2UtZGl0aGVyaW5nPg0KCQkJCTxkaXRoZXJpbmcgdHlwZT0ic3RyaW5nIj5mbG95ZC1zdGVp
bmJlcmc8L2RpdGhlcmluZz4NCgkJCQk8Y3VzdG9tLWVudi1mb3ItcmVmbC1hbmQtcmVmciB0
eXBlPSJ1dWlkIj4wMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDA8L2N1c3Rv
bS1lbnYtZm9yLXJlZmwtYW5kLXJlZnI+DQoJCQkJPGN1c3RvbS1lbnYtZm9yLXJlZmwtYW5k
LXJlZnItb24gdHlwZT0iYm9vbCI+dHJ1ZTwvY3VzdG9tLWVudi1mb3ItcmVmbC1hbmQtcmVm
ci1vbj4NCgkJCQk8dXNlLXBvc3QtcHJvY2Vzcy1nYW1tYSB0eXBlPSJib29sIj50cnVlPC91
c2UtcG9zdC1wcm9jZXNzLWdhbW1hPg0KCQkJCTxnYW1tYSB0eXBlPSJmbG9hdCI+Mi4yMDAw
MDAwNDc2ODM3MjwvZ2FtbWE+DQoJCQkJPHVzZS1saW5lYXItd29ya2Zsb3cgdHlwZT0iYm9v
bCI+dHJ1ZTwvdXNlLWxpbmVhci13b3JrZmxvdz4NCgkJCTwvcmVuZGVyaW5nPg0KCQkJPHN1
bj4NCgkJCQk8ZW5hYmxlLWFsbG93ZWQgdHlwZT0iYm9vbCI+dHJ1ZTwvZW5hYmxlLWFsbG93
ZWQ+DQoJCQkJPGVuYWJsZS1vbiB0eXBlPSJib29sIj5mYWxzZTwvZW5hYmxlLW9uPg0KCQkJ
CTxtYW51YWwtY29udHJvbC1hbGxvd2VkIHR5cGU9ImJvb2wiPnRydWU8L21hbnVhbC1jb250
cm9sLWFsbG93ZWQ+DQoJCQkJPG1hbnVhbC1jb250cm9sLW9uIHR5cGU9ImJvb2wiPmZhbHNl
PC9tYW51YWwtY29udHJvbC1vbj4NCgkJCQk8aW50ZW5zaXR5IHR5cGU9ImRvdWJsZSI+MTwv
aW50ZW5zaXR5Pg0KCQkJCTxzaGFkb3ctaW50ZW5zaXR5IHR5cGU9ImRvdWJsZSI+MTwvc2hh
ZG93LWludGVuc2l0eT4NCgkJCQk8ZGF5bGlnaHQtc2F2aW5nLW9uIHR5cGU9ImJvb2wiPmZh
bHNlPC9kYXlsaWdodC1zYXZpbmctb24+DQoJCQkJPGRheWxpZ2h0LXNhdmluZy1taW51dGVz
IHR5cGU9ImludCI+NjA8L2RheWxpZ2h0LXNhdmluZy1taW51dGVzPg0KCQkJCTx5ZWFyIHR5
cGU9ImludCI+MjAyNjwveWVhcj4NCgkJCQk8bW9udGggdHlwZT0iaW50Ij4zPC9tb250aD4N
CgkJCQk8ZGF5IHR5cGU9ImludCI+MjE8L2RheT4NCgkJCQk8dGltZSB0eXBlPSJkb3VibGUi
PjEyLjAwMDAwMDAxPC90aW1lPg0KCQkJCTxzdW4tYXppbXV0aCB0eXBlPSJkb3VibGUiPjE2
OC4yNjkzODg1ODYxMDg8L3N1bi1hemltdXRoPg0KCQkJCTxzdW4tYWx0aXR1ZGUgdHlwZT0i
ZG91YmxlIj44OS42MDE4MzIwMzY3Mzc8L3N1bi1hbHRpdHVkZT4NCgkJCQk8c2t5bGlnaHQt
b24gdHlwZT0iYm9vbCI+dHJ1ZTwvc2t5bGlnaHQtb24+DQoJCQkJPHNreWxpZ2h0LXNoYWRv
dy1pbnRlbnNpdHkgdHlwZT0iZG91YmxlIj4xPC9za3lsaWdodC1zaGFkb3ctaW50ZW5zaXR5
Pg0KCQkJCTxza3lsaWdodC1jdXN0b20tZW52aXJvbm1lbnQtb24gdHlwZT0iYm9vbCI+dHJ1
ZTwvc2t5bGlnaHQtY3VzdG9tLWVudmlyb25tZW50LW9uPg0KCQkJCTxza3lsaWdodC1jdXN0
b20tZW52aXJvbm1lbnQgdHlwZT0idXVpZCI+MDAwMDAwMDAtMDAwMC0wMDAwLTAwMDAtMDAw
MDAwMDAwMDAwPC9za3lsaWdodC1jdXN0b20tZW52aXJvbm1lbnQ+DQoJCQkJPG9ic2VydmVy
LXRpbWV6b25lIHR5cGU9ImRvdWJsZSI+MDwvb2JzZXJ2ZXItdGltZXpvbmU+DQoJCQk8L3N1
bj4NCgkJCTxzYWZlLWZyYW1lPg0KCQkJCTxvbiB0eXBlPSJib29sIj5mYWxzZTwvb24+DQoJ
CQkJPHBlcnNwZWN0aXZlLW9ubHkgdHlwZT0iYm9vbCI+dHJ1ZTwvcGVyc3BlY3RpdmUtb25s
eT4NCgkJCQk8ZmllbGQtZGlzcGxheS1vbiB0eXBlPSJib29sIj5mYWxzZTwvZmllbGQtZGlz
cGxheS1vbj4NCgkJCQk8bGl2ZS1mcmFtZT4NCgkJCQkJPG9uIHR5cGU9ImJvb2wiPnRydWU8
L29uPg0KCQkJCTwvbGl2ZS1mcmFtZT4NCgkJCQk8YWN0aW9uLWZyYW1lPg0KCQkJCQk8b24g
dHlwZT0iYm9vbCI+dHJ1ZTwvb24+DQoJCQkJCTx4LXNjYWxlIHR5cGU9ImRvdWJsZSI+MC45
PC94LXNjYWxlPg0KCQkJCQk8eS1zY2FsZSB0eXBlPSJkb3VibGUiPjAuOTwveS1zY2FsZT4N
CgkJCQkJPGxpbmsgdHlwZT0iYm9vbCI+dHJ1ZTwvbGluaz4NCgkJCQk8L2FjdGlvbi1mcmFt
ZT4NCgkJCQk8dGl0bGUtZnJhbWU+DQoJCQkJCTxvbiB0eXBlPSJib29sIj50cnVlPC9vbj4N
CgkJCQkJPHgtc2NhbGUgdHlwZT0iZG91YmxlIj4wLjg8L3gtc2NhbGU+DQoJCQkJCTx5LXNj
YWxlIHR5cGU9ImRvdWJsZSI+MC44PC95LXNjYWxlPg0KCQkJCQk8bGluayB0eXBlPSJib29s
Ij50cnVlPC9saW5rPg0KCQkJCTwvdGl0bGUtZnJhbWU+DQoJCQk8L3NhZmUtZnJhbWU+DQoJ
CQk8Z3JvdW5kLXBsYW5lPg0KCQkJCTxvbiB0eXBlPSJib29sIj50cnVlPC9vbj4NCgkJCQk8
c2hvdy11bmRlcnNpZGUgdHlwZT0iYm9vbCI+ZmFsc2U8L3Nob3ctdW5kZXJzaWRlPg0KCQkJ
CTxhbHRpdHVkZSB0eXBlPSJkb3VibGUiPjA8L2FsdGl0dWRlPg0KCQkJCTxhdXRvLWFsdGl0
dWRlIHR5cGU9ImJvb2wiPnRydWU8L2F1dG8tYWx0aXR1ZGU+DQoJCQkJPHNoYWRvdy1vbmx5
IHR5cGU9ImJvb2wiPnRydWU8L3NoYWRvdy1vbmx5Pg0KCQkJCTxtYXRlcmlhbCB0eXBlPSJz
dHJpbmciLz4NCgkJCQk8dGV4dHVyZS1zaXplIHR5cGU9InZlY3RvcjJkIj4xLDE8L3RleHR1
cmUtc2l6ZT4NCgkJCQk8dGV4dHVyZS1vZmZzZXQgdHlwZT0idmVjdG9yMmQiPjAsMDwvdGV4
dHVyZS1vZmZzZXQ+DQoJCQkJPHRleHR1cmUtcm90YXRpb24gdHlwZT0iZG91YmxlIj4wPC90
ZXh0dXJlLXJvdGF0aW9uPg0KCQkJCTxvZmZzZXQtbG9jayB0eXBlPSJib29sIj5mYWxzZTwv
b2Zmc2V0LWxvY2s+DQoJCQkJPHJlcGVhdC1sb2NrIHR5cGU9ImJvb2wiPnRydWU8L3JlcGVh
dC1sb2NrPg0KCQkJPC9ncm91bmQtcGxhbmU+DQoJCTwvc2V0dGluZ3M+DQoJCTxtYXRlcmlh
bC1zZWN0aW9uLz4NCgkJPGVudmlyb25tZW50LXNlY3Rpb24vPg0KCQk8dGV4dHVyZS1zZWN0
aW9uLz4NCgk8L3JlbmRlci1jb250ZW50LW1hbmFnZXItZG9jdW1lbnQ+DQo8L3htbD4NCgAA
AAD/////AAAAAP9/AAAEAAAA6CoAAA==
"
put {brep.r} comb region yes tree {u {l brep.s} {l brep.s}}
attr set {brep.r} {region} {R} {color} {130/101/230} {region_id} {1034} {los} {100} {material_id} {1}
put {pipe.s} pipe V0 { 250 250 0 } O0 250 I0 62.5 R0 250 V1 { 250 250 1000 } O1 250 I1 62.5 R1 250 V2 { 250 1000 1000 } O2 250 I2 62.5 R2 250
put {arbn.s} arbn N 8 P0 {1 0 0 1000} P1 {-1 0 0 -1.230164343724027276039124e-07} P2 {0 1 0 1000} P3 {0 -1 0 -1.230164343724027276039124e-07} P4 {0 0 1 999.9999998769834519407596} P5 {0 0 -1 0} P6 {0.5773502691896258420811705 0.5773502691896258420811705 0.5773502691896258420811705 1366.025636883611468874733} P7 {-0.5773502691896258420811705 -0.5773502691896258420811705 -0.5773502691896258420811705 -366.0251707562993033207022}
put {pipe.r} comb region yes tree {l pipe.s}
attr set {pipe.r} {region} {R} {los} {100} {material_id} {1} {region_id} {1030} {color} {145/91/98}
put {ellg.s} ell V {500.0040789999999901738192 428.1779119999999920764822 447.2072439999996618098521} A {461.8839834023437447285687 0 -230.9419917011718723642844} B {-191.4869837025394474494533 0 -382.9739674050788948989066} C {0 428.1779123652725616011594 0}
put {arbn.r} comb region yes tree {l arbn.s}
attr set {arbn.r} {region} {R} {los} {100} {material_id} {1} {region_id} {1010} {color} {252/67/137}
put {ellg.r} comb region yes tree {l ellg.s}
attr set {ellg.r} {region} {R} {los} {100} {material_id} {1} {region_id} {1016} {color} {251/126/80}
put {half.s} half N {0 0 1} d 0
put {half.r} comb region yes tree {l half.s}
attr set {half.r} {region} {R} {region_id} {1045} {material_id} {1} {los} {100} {color} {209/92/189}
put {arb8.s} arb8 V1 {0 0 0} V2 {200 1000 200} V3 {0 1000 1000} V4 {0 200 1000} V5 {1000 0 0} V6 {1000 1000 200} V7 {1000 800 1000} V8 {1000 0 800}
put {arb7.s} arb8 V1 {0 0 0} V2 {0 1000 0} V3 {0 1000 1000} V4 {0 0 500} V5 {1000 0 0} V6 {1000 1000 0} V7 {1000 1000 500} V8 {1000 0 0}
put {ell1.s} ell V {500 250 250} A {500 0 0} B {0 0 -250} C {0 250 0}
put {arb8.r} comb region yes tree {l arb8.s}
attr set {arb8.r} {region} {R} {los} {100} {material_id} {1} {region_id} {1000} {color} {131/240/191}
put {arb6.s} arb8 V1 {0 0 0} V2 {0 1000 0} V3 {0 1000 1000} V4 {0 0 500} V5 {1000 500 0} V6 {1000 500 0} V7 {1000 500 1000} V8 {1000 500 1000}
put {arb7.r} comb region yes tree {l arb7.s}
attr set {arb7.r} {region} {R} {los} {100} {material_id} {1} {region_id} {1004} {color} {174/247/214}
put {arb5.s} arb8 V1 {0 0 0} V2 {0 1000 0} V3 {0 1000 1000} V4 {0 0 1000} V5 {1000 500 500} V6 {1000 500 500} V7 {1000 500 500} V8 {1000 500 500}
put {ell1.r} comb region yes tree {l ell1.s}
attr set {ell1.r} {region} {R} {los} {100} {material_id} {1} {region_id} {1017} {color} {93/63/153}
put {arb6.r} comb region yes tree {l arb6.s}
attr set {arb6.r} {region} {R} {los} {100} {material_id} {1} {region_id} {1005} {color} {245/131/176}
put {arb4.s} arb8 V1 {0 0 0} V2 {0 1000 0} V3 {0 1000 1000} V4 {0 1000 1000} V5 {1000 1000 0} V6 {1000 1000 0} V7 {1000 1000 0} V8 {1000 1000 0}
put {arb5.r} comb region yes tree {l arb5.s}
attr set {arb5.r} {region} {R} {los} {100} {material_id} {1} {region_id} {1008} {color} {180/213/147}
put {arb4.r} comb region yes tree {l arb4.s}
attr set {arb4.r} {region} {R} {los} {100} {material_id} {1} {region_id} {1009} {color} {113/79/99}
put {other} comb region no tree {u {l script} {l submodel}}
put {hyp.s} hyp V {0 0 0} H {0 0 1000} A {0 500 0} b 250 bnr 0.4000000000000000222044605
put {hrt.s} hrt V {0 0 0} X {500 0 0} Y {0 500 0} Z {0 0 500} d 250
put {box.s} arb8 V1 {1000 0 0} V2 {1000 714.2857142857142207503784 0} V3 {714.2857142857142207503784 714.2857142857142207503784 714.2857142857143344372162} V4 {714.2857142857142207503784 0 714.2857142857143344372162} V5 {285.7142857142856655627838 0 0} V6 {285.7142857142856655627838 714.2857142857142207503784 0} V7 {0 714.2857142857142207503784 714.2857142857143344372162} V8 {0 0 714.2857142857143344372162}
put {tor.s} tor V {100 500 500} H {1 0 0} r_a 400 r_h 100
put {hyp.r} comb region yes tree {l hyp.s}
attr set {hyp.r} {region} {R} {region_id} {1042} {material_id} {1} {los} {100} {color} {53/113/151}
put {tor.r} comb region yes tree {l tor.s}
attr set {tor.r} {region} {R} {los} {100} {material_id} {1} {region_id} {1027} {color} {189/193/244}
put {hrt.r} comb region yes tree {l hrt.s}
attr set {hrt.r} {region} {R} {region_id} {1013} {material_id} {1} {los} {100} {color} {72/218/122}
put {box.r} comb region yes tree {l box.s}
attr set {box.r} {region} {R} {los} {100} {material_id} {1} {region_id} {1002} {color} {70/252/253}
put {rpp.s} arb8 V1 {1000 0 0} V2 {1000 1000 0} V3 {1000 1000 1000} V4 {1000 0 1000} V5 {0 0 0} V6 {0 1000 0} V7 {0 1000 1000} V8 {0 0 1000}
put {ehy.s} ehy V {250 500 0} H {0 0 1000} A {0 1 0} r_1 500 r_2 250 c 250
put {ars.s} ars NC 5 PPC 201 C0 { { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.000499999999988176569 63.88983200000004814000931 } { 450.0004649999999628562364 1000.0Line truncated
put {rpp.r} comb region yes tree {l rpp.s}
attr set {rpp.r} {region} {R} {los} {100} {material_id} {1} {region_id} {1003} {color} {187/224/64}
put {bot.s} bot mode surf orient no flags {} V { { 684.9736396987113948853221 18.76819928610230903132106 20.04880080852696977444793 } { 686.0922267442093698264216 18.89948440687502539958587 20.04880080852696977444793 } { 683.2654786473392505286029 18.89948440687502539958587 19.99754852276900152219241 } { 683.2654786473392505286029 18.87948528862963115670937 20.04880080852696977444793 } { 683.1712828004034463447169 18.89948440687502539958587 20.04880080852696977444793 } { 684.9736396987113948853221 18.74087321817246731825435 21.75694367888257119147966 } { 683.2654786473392505286029 18.57249882356284587103801 21.75694367888257119147966 } { 681.5573357769835638464428 18.89948440687502539958587 21.34894348565997290734231 } { 681.5573357769835638464428 18.79650712892783559482268 21.75694367888257119147966 } { 683.2654786473392505286029 18.62471470319991340147681 23.46510473025476528619038 } { 684.2718342774473967438098 18.89948440687502539958587 23.46510473025476528619038 } { 681.5573357769835638464428 18.52466456892318547033938 23.46510473025476528619038 } { 679.8491747256114194897236 18.71989232503139533037029 23.46510473025476528619038 } { 681.5573357769835638464428 18.79259821036168887076201 25.17324760061037380864946 } { 679.8491747256114194897236 18.76478125498400828519152 25.17324760061037380864946 } { 679.0160841835746623473824 18.89948440687502539958587 25.17324760061037380864946 } { 681.5573357769835638464428 18.89948440687502539958587 25.50903279595052453032622 } { 688.3899254394226545628044 20.57493780940771088694419 14.92435401644356574024641 } { 689.6407884710972666653106 20.60764545824722304701027 14.92435401644356574024641 } { 688.3899254394226545628044 20.60764545824722304701027 14.88921011138143057905836 } { 688.1771530023081595572876 20.60764545824721949429659 14.92435401644356574024641 } { 691.8062384516587144389632 20.42023553927129952967334 16.63249688679916715727813 } { 692.1566502748428320046514 20.60764545824722304701027 16.63249688679916715727813 } { 691.8062384516587144389632 20.60764545824722304701027 16.12737370297030281562911 } { 690.0980864907947989195236 20.60764545824722304701027 14.94582579703248370606161 } { 690.0980864907947989195236 19.65741462634224845373865 16.63249688679916715727813 } { 688.3899254394226545628044 19.53589271147660966221338 16.63249688679916715727813 } { 686.6817825690669678806444 20.60764545824721949429659 15.27475674911943315237295 } { 686.6817825690669678806444 19.76088279173727357829193 16.63249688679916715727813 } { 684.9736396987113948853221 20.60764545824721949429659 16.08150299812200501037296 } { 684.9736396987113948853221 20.16108332884417819741429 16.63249688679916715727813 } { 683.7491300505791969044367 20.60764545824721949429659 16.63249688679916715727813 } { 691.8062384516587144389632 20.60764545824722304701027 17.54903829496894474004876 } { 690.0980864907947989195236 19.65839640123793330417357 18.34065793817136125198886 } { 691.5036517926058650118648 20.60764545824722304701027 18.34065793817136125198886 } { 688.3899254394226545628044 19.24599640200134231804441 18.34065793817136125198886 } { 686.6817825690669678806444 19.2391603397647301676443 18.34065793817136125198886 } { 684.9736396987113948853221 19.34702831117374444147572 18.34065793817136125198886 } { 683.2654786473392505286029 19.6520512264491671317046 18.34065793817136125198886 } { 681.5573357769835638464428 20.60764545824721949429659 17.74084801995885385395013 } { 681.5573357769835638464428 20.18695491544708175979395 18.34065793817136125198886 } { 690.0980864907947989195236 20.60764545824722304701027 19.81161126613660883322154 } { 688.3899254394226545628044 19.59398105947117940672797 20.04880080852696977444793 } { 686.6817825690669678806444 18.98635330412637500785422 20.04880080852696977444793 } { 681.5573357769835638464428 19.27919493828868979790059 20.04880080852696977444793 } { 679.8491747256114194897236 20.60764545824721949429659 19.02731857261863979147165 } { 679.8491747256114194897236 19.91120343687628491124997 20.04880080852696977444793 } { 678.488998331709012745705 20.60764545824721949429659 20.04880080852696977444793 } { 688.3899254394226545628044 20.31285845531012412834571 21.75694367888257119147966 } { 686.6817825690669678806444 19.32750189935961060427871 21.75694367888257119147966 } { 679.8491747256114194897236 19.25723227025193295958161 21.75694367888257119147966 } { 678.1410318552558464944013 19.88045933782814245205373 21.75694367888257119147966 } { 687.82722297606358097255 20.60764545824721949429659 23.46510473025476528619038 } { 684.9736396987113948853221 19.12105645601739212224857 23.46510473025476528619038 } { 678.1410318552558464944013 19.24795995179270136077321 23.46510473025476528619038 } { 676.4328889849001598122413 20.10348586829744732540348 23.46510473025476528619038 } { 686.6817825690669678806444 20.60764545824721949429659 24.99658266243720561305963 } { 684.9736396987113948853221 19.77162777254002890003903 25.17324760061037380864946 } { 686.5319528113758451581Line truncated
put {ehy.r} comb region yes tree {l ehy.s}
attr set {ehy.r} {region} {R} {los} {100} {material_id} {1} {region_id} {1018} {color} {212/204/85}
put {eto.s} eto V {500 500 130.6019369999999923948053} N {0 0 6.156634374604447401679863} C {92.34951561906670747248427 0 92.34951561906670747248427} r 369.3980624762668298899371 r_d 46.17475780953335373624213
put {dsp.s} dsp file {1647260.dsp} name {1647260.dsp} src {f} w {1143} n {1388} sm {0} cut {a} stom {10000 0 0 1364.023870490491390228271 0 10000 0 1364.023870490529816379421 0 0 1000 1364.023870490529816379421 0 0 0 6821.483649182485351047944}
put {raw.s} arb8 V1 {1000 0 0} V2 {1000 1000 0} V3 {1000 1000 1000} V4 {1000 0 1000} V5 {0 500 0} V6 {0 500 0} V7 {0 500 1000} V8 {0 500 1000}
put {ars.r} comb region yes tree {l ars.s}
attr set {ars.r} {region} {R} {los} {100} {material_id} {1} {region_id} {1011} {color} {178/178/124}
put {vol.s} vol file {vol_data.bw} name {vol_data.bw} src f w 347 n 200 d 146 lo 35 hi 255 size {1 1 4} mat {1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0.5840000000420479953078257}
put {bot.r} comb region yes tree {l bot.s}
attr set {bot.r} {region} {R} {color} {232/189/179} {region_id} {1033} {los} {100} {material_id} {1}
put {dsp.r} comb region yes tree {l dsp.c}
attr set {dsp.r} {region} {R} {color} {146/250/181} {region_id} {1037} {los} {100} {material_id} {1}
put {eto.r} comb region yes tree {l eto.s}
attr set {eto.r} {color} {93/135/89} {region} {R} {region_id} {1028} {material_id} {1} {los} {100}
put {raw.r} comb region yes tree {u {l raw.s} {l raw.s}}
attr set {raw.r} {region} {R} {los} {100} {material_id} {1} {region_id} {1007} {color} {176/222/127}
put {vol.r} comb region yes tree {l vol.s}
attr set {vol.r} {region} {R} {los} {100} {material_id} {1} {region_id} {1043} {color} {136/111/67}
put {sph.s} ell V {500 500 500} A {500 0 0} B {0 500 0} C {0 0 500}
put {sph.r} comb region yes tree {l sph.s}
attr set {sph.r} {region} {R} {los} {100} {material_id} {1} {region_id} {1015} {color} {112/107/94}
put {trc.s} tgc V {500 500 0} H {0 0 666.6666666666667424578918} A {0 -500 0} B {500 0 0} C {0 -166.666666666666685614473 0} D {166.666666666666685614473 0 0}
put {ell.s} ell V {500 250 125} A {500 0 0} B {0 250 0} C {0 0 125}
put {nmg.s} nmg V { { 500 17.03708685546587275894126 370.5904774487394774951099 } { 629.409522551260579348309 17.03708685546587275894126 500 } { 500.0000000000000568434189 0 500 } { 370.5904774487394774951099 17.03708685546587275894126 500 } { 500 17.03708685546587275894126 629.409522551260579348309 } { 676.7766952966368307897937 66.98729810778064575060853 323.2233047033631123667874 } { 750 66.98729810778064575060853 500 } { 499.9999999999999431565811 66.98729810778064575060853 250.0000000000000284217094 } { 323.2233047033631123667874 66.98729810778064575060853 323.2233047033631692102063 } { 250.0000000000000284217094 66.98729810778064575060853 500.0000000000000568434189 } { 323.2233047033631692102063 66.98729810778064575060853 676.7766952966368307897937 } { 500 66.98729810778064575060853 750 } { 676.7766952966368307897937 66.98729810778064575060853 676.7766952966368307897937 } { 806.1862178478971827644273 146.4466094067262815769936 323.2233047033629418365308 } { 853.5533905932737752664252 146.4466094067262815769936 500 } { 676.7766952966369444766315 146.4466094067262815769936 193.813782152102703548735 } { 499.9999999999999431565811 146.4466094067262815769936 146.4466094067262247335748 } { 323.2233047033629418365308 146.4466094067262815769936 193.8137821521027603921539 } { 193.813782152102703548735 146.4466094067262815769936 323.2233047033630555233685 } { 146.4466094067262247335748 146.4466094067262815769936 500.0000000000000568434189 } { 193.813782152102703548735 146.4466094067262815769936 676.7766952966368307897937 } { 323.2233047033631692102063 146.4466094067262815769936 806.186217847897296451265 } { 500 146.4466094067262815769936 853.5533905932737752664252 } { 676.7766952966369444766315 146.4466094067262815769936 806.186217847897296451265 } { 806.186217847897296451265 146.4466094067262815769936 676.7766952966368307897937 } { 900.0515725956327059975592 250.0000000000001136868377 334.2932129822038405109197 } { 933.0127018922194110928103 250.0000000000001136868377 500 } { 806.186217847897296451265 250.0000000000001136868377 193.8137821521026467053161 } { 665.7067870177960458022426 250.0000000000001136868377 99.94842740436729400244076 } { 499.9999999999999431565811 250.0000000000001136868377 66.98729810778064575060853 } { 334.2932129822038405109197 250.0000000000001136868377 99.94842740436735084585962 } { 193.8137821521026467053161 250.0000000000001136868377 193.8137821521027603921539 } { 99.94842740436718031560304 250.0000000000001136868377 334.293212982204124728014 } { 66.98729810778064575060853 250.0000000000001136868377 500.0000000000000568434189 } { 99.9484274043672371590219 250.0000000000001136868377 665.7067870177959321154049 } { 193.8137821521027603921539 250.0000000000001136868377 806.186217847897296451265 } { 334.2932129822040678845951 250.0000000000001136868377 900.0515725956327059975592 } { 500 250.0000000000001136868377 933.0127018922194110928103 } { 665.7067870177959321154049 250.0000000000001136868377 900.0515725956327059975592 } { 806.186217847897296451265 250.0000000000001136868377 806.186217847897296451265 } { 900.0515725956327059975592 250.0000000000001136868377 665.7067870177959321154049 } { 959.3250256749994377969415 370.5904774487395343385288 350.7562521855071508980473 } { 982.9629131445342409278965 370.5904774487395343385288 500 } { 890.7252043867597421922255 370.5904774487395343385288 216.1215222494320755686203 } { 783.8784777505677539011231 370.5904774487395343385288 109.2747956132400872775179 } { 649.2437478144926217282773 370.5904774487395343385288 40.67497432500050535963965 } { 499.9999999999998863131623 370.5904774487395343385288 17.0370868554658159155224 } { 350.7562521855072077414661 370.5904774487395343385288 40.67497432500056220305851 } { 216.1215222494321324120392 370.5904774487395343385288 109.2747956132402009643556 } { 109.2747956132401441209367 370.5904774487395343385288 216.1215222494322460988769 } { 40.67497432500056220305851 370.5904774487395343385288 350.7562521855071508980473 } { 17.0370868554658159155224 370.5904774487395343385288 500.0000000000000568434189 } { 40.67497432500056220305851 370.5904774487395343385288 649.243747814492735415115 } { 109.2747956132402009643556 370.5904774487395343385288 783.8784777505678675879608 } { 216.1215222494322460988769 370.5904774487395343385288 890.7252043867598558790633 } { 350.756252185507264584885 370.5904774487395343385288 959.3250256749995514837792 } { 500.0000000000000568434189 370.5904774487395343385288 982.9629131445342409278965 } { 649.243747814492735415115 370.5904774487395343385288 959.3250256749994377969415 } { 783.8784777505677539011231 370.5904774487395343385288 890.7252043867598558790633 } { 890.7252043867598558790633 370.5904774487395343385288 783.8784777505677539011231 } { 959.3250256749994377969415 370.5904774487395343385288 649.243747814492735415115 } { 982.9629131445342409278965 500.0000000000000568434189 370.5904774487396480253665 } { 1000 500.0000000000000568434189 500 } { 933.0127018922191837191349 500.000Line truncated
put {ell.r} comb region yes tree {l ell.s}
attr set {ell.r} {region} {R} {los} {100} {material_id} {1} {region_id} {1014} {color} {248/176/135}
put {trc.r} comb region yes tree {l trc.s}
attr set {trc.r} {region} {R} {los} {100} {material_id} {1} {region_id} {1026} {color} {248/63/238}
put {rpc.s} rpc V {500 0 0} H {0 0 1000} B {0 1000 0} r 500
put {nmg.r} comb region yes tree {l nmg.s}
attr set {nmg.r} {region} {R} {region_id} {1036} {material_id} {1} {los} {100} {color} {74/251/201}
put {rpc.r} comb region yes tree {l rpc.s}
attr set {rpc.r} {region} {R} {los} {100} {material_id} {1} {region_id} {1024} {color} {127/60/147}
put {ebm.s} ebm F ebm_logo.bw W 256 N 256 H 50 M { 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0.2560000000000000053290705 }
put {rhc.s} rhc V {500 0 0} H {0 0 1000} B {0 1000 0} r 500 c 200
put {tgc.s} tgc V {500 500 0} H {0 0 1000} A {0 500 0} B {250 0 0} C {0 250 0} D {500 0 0}
put {ebm.r} comb region yes tree {l ebm.s}
attr set {ebm.r} {region} {R} {color} {192/204/114} {region_id} {1038} {los} {100} {material_id} {1}
put {epa.s} epa V {333.3333333333334849157836 500 0} H {0 0 666.6666666666667424578918} A {0 1 0} r_1 500 r_2 333.3333333333333712289459
put {tec.s} tgc V {500 250 0} H {0 0 1000} A {0 250 0} B {500 0 0} C {0 125 0} D {250 0 0}
put {rhc.r} comb region yes tree {l rhc.s}
attr set {rhc.r} {region} {R} {los} {100} {material_id} {1} {region_id} {1023} {color} {160/107/89}
put {tgc.r} comb region yes tree {l tgc.s}
attr set {tgc.r} {region} {R} {los} {100} {material_id} {1} {region_id} {1020} {color} {73/148/116}
put {rec.s} tgc V {250 125 0} H {0 0 1000} A {250 0 0} B {0 125 0} C {250 0 0} D {0 125 0}
put {epa.r} comb region yes tree {l epa.s}
attr set {epa.r} {region} {R} {los} {100} {material_id} {1} {region_id} {1019} {color} {221/200/169}
put {tec.r} comb region yes tree {l tec.s}
attr set {tec.r} {region} {R} {los} {100} {material_id} {1} {region_id} {1025} {color} {121/121/80}
put {rcc.s} tgc V {177.0948520000001735752448 177.0948519999999462015694 112.0046189999999910469342} H {387.9953811228198787830479 387.9953811228198787830479 775.9907622456397575660958} A {0 -173.5168094293127865057613 86.75840471465639325288066} B {177.0948520406521140557743 -35.41897040813041996898392 -70.83794081626083993796783} C {0 -173.5168094293127865057613 86.75840471465639325288066} D {177.0948520406521140557743 -35.41897040813041996898392 -70.83794081626083993796783}
put {rec.r} comb region yes tree {u {l rec.s} {l rec.s}}
attr set {rec.r} {region} {R} {los} {100} {material_id} {1} {region_id} {1022} {color} {97/154/244}
put {rcc.r} comb region yes tree {u {l rcc.s} {l rcc.s}}
attr set {rcc.r} {region} {R} {los} {100} {material_id} {1} {region_id} {1021} {color} {171/80/130}
put {dsp.c} comb region no tree {n {l dsp.s} {l rpp.s}}
put {concave_arb.s} arb8 V1 {1000 0 0} V2 {1000 1000 0} V3 {1000 250 250} V4 {1000 0 1000} V5 {0 0 0} V6 {0 999.9999999999997726263246 0} V7 {0 250 250} V8 {0 0 999.9999999999996589394868}
put {concave_arb.r} comb region yes tree {l concave_arb.s}
attr set {concave_arb.r} {region} {R} {region_id} {1006} {material_id} {1} {los} {100} {color} {50/150/255}
+58
View File
@@ -0,0 +1,58 @@
# Make sure the converter executable exists
string(REPLACE "\\" "" CONV_EXEC "${EXEC}")
if(NOT EXISTS "${CONV_EXEC}")
message(FATAL_ERROR "Invalid geometry converter executable specified: ${CONV_EXEC}")
endif(NOT EXISTS "${CONV_EXEC}")
# Use local cache directories for the conversion
set(CBDIR "@CMAKE_CURRENT_BINARY_DIR@")
set(CSDIR "@CMAKE_CURRENT_SOURCE_DIR@")
set(BU_DIR_CACHE ${CBDIR}/cache_@in_model_root@)
set(LIBRT_CACHE ${CBDIR}/rtcache_@in_model_root@)
set(ENV{BU_DIR_CACHE} ${BU_DIR_CACHE})
set(ENV{LIBRT_CACHE} ${LIBRT_CACHE})
file(REMOVE_RECURSE "${BU_DIR_CACHE}")
file(REMOVE_RECURSE "${LIBRT_CACHE}")
file(MAKE_DIRECTORY "${BU_DIR_CACHE}")
file(MAKE_DIRECTORY "${LIBRT_CACHE}")
# Deduce the current BRLCAD_ROOT value from the conversion executable path.
# Setting BRLCAD_ROOT is the hammer that makes certain we are running things
# found in the build directory.
get_filename_component(CEDIR "${CONV_EXEC}" DIRECTORY)
set(BIN_DIR "@BIN_DIR@")
string(REGEX REPLACE "${BIN_DIR}$" "" CROOT "${CEDIR}")
file(TO_CMAKE_PATH "${CROOT}" CROOT)
string(REGEX REPLACE "/$" "" CROOT "${CROOT}")
set(ENV{BRLCAD_ROOT} "${CROOT}")
# Now that we know the root, finalize the full path output file location and
# run the conversion.
execute_process(
COMMAND "${CONV_EXEC}" @CONV_ARGS@
RESULT_VARIABLE conv_result
OUTPUT_VARIABLE conv_log
ERROR_VARIABLE conv_log
)
set(conv_success_codes "@CONV_SUCCESS_CODES@")
list(FIND conv_success_codes "${conv_result}" conv_result_index)
if(conv_result_index EQUAL -1 OR NOT EXISTS "@CONV_OUTPUT_PATH@")
set(CARGS @CONV_ARGS@)
message(FATAL_ERROR "[@in_model_root@] Failure: ${conv_result}\n${CONV_EXEC} ${CARGS}\"\n\n${conv_log}")
endif()
# Cleanup
execute_process(
COMMAND "@CMAKE_COMMAND@" -E rm -rf ${BU_DIR_CACHE}
)
execute_process(
COMMAND "@CMAKE_COMMAND@" -E rm -rf ${LIBRT_CACHE}
)
# Local Variables:
# tab-width: 8
# mode: cmake
# indent-tabs-mode: t
# End:
# ex: shiftwidth=2 tabstop=8
+27
View File
@@ -0,0 +1,27 @@
# Make sure the converter executable exists.
string(REPLACE "\\" "" CONV_EXEC "${EXEC}")
if(NOT EXISTS "${CONV_EXEC}")
message(FATAL_ERROR "Invalid pix converter executable specified: ${CONV_EXEC}")
endif(NOT EXISTS "${CONV_EXEC}")
set(IN_FILE "@PIX_INPUT@")
set(OUT_FILE "@PIX_OUTPUT@")
set(CONV_LABEL "@PIX_LABEL@")
execute_process(
COMMAND "${CONV_EXEC}" "${IN_FILE}"
RESULT_VARIABLE conv_result
OUTPUT_FILE "${OUT_FILE}"
ERROR_VARIABLE conv_log
)
if(conv_result)
message(FATAL_ERROR "[${CONV_LABEL}] Failure: ${conv_result}\n${CONV_EXEC} ${IN_FILE} > ${OUT_FILE}\n\n${conv_log}")
endif(conv_result)
# Local Variables:
# tab-width: 8
# mode: cmake
# indent-tabs-mode: t
# End:
# ex: shiftwidth=2 tabstop=8
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -1298,7 +1298,7 @@
@TECHREPORT{Ross92,
author = {Ross, Adam},
title = {3D Geometric Target Analysis of The Advanced Field Artillary System (AFAS)},
title = {3D Geometric Target Analysis of The Advanced Field Artillery System (AFAS)},
year = {1992},
month = aug,
publisher = {The U.S. Army Ballistic Research Laboratory},
+28 -18
View File
@@ -1,8 +1,10 @@
verbose_add_subdirectory(doc docbook)
verbose_add_subdirectory(doc asciidoc)
verbose_add_subdirectory(doc changes)
verbose_add_subdirectory(doc html)
verbose_add_subdirectory(doc legal)
set(documentation_DATA
set(
documentation_DATA
BRL-CAD.bib
GITHUB
IDEAS
@@ -11,10 +13,9 @@ set(documentation_DATA
README.MacOSX
README.Windows
README.BSD
README.Solaris
README.VAX
checklist.txt
description.txt
optimization_ideas.adoc
notes/TODO.BREP
notes/TODO.shaded_displays
notes/apitrace.txt
@@ -26,13 +27,15 @@ set(documentation_DATA
notes/editors.txt
notes/history.txt
notes/hypot.txt
notes/itcl4_migration.txt
notes/mater.txt
notes/matrix.txt
pre_BRL-CAD.bib
)
ADD_DOC(documentation_DATA ".")
)
add_doc(documentation_DATA ".")
set(documentation_mged_old_DATA
set(
documentation_mged_old_DATA
mged/a.tex
mged/adc.ps
mged/all.tex
@@ -202,15 +205,20 @@ set(documentation_mged_old_DATA
notes/rounding.txt
notes/tool_categories.txt
old-mged.tr
)
ADD_DOC(documentation_mged_old_DATA mged_old)
)
add_doc(documentation_mged_old_DATA mged_old REQUIRED "mged")
configure_file(pad_file.xml.in "${CMAKE_CURRENT_BINARY_DIR}/pad_file.xml" @ONLY)
DISTCLEAN("${CMAKE_CURRENT_BINARY_DIR}/pad_file.xml")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/pad_file.xml" DESTINATION ${DOC_DIR})
if(TARGET mged)
configure_file(pad_file.xml.in "${CMAKE_CURRENT_BINARY_DIR}/pad_file.xml" @ONLY)
distclean("${CMAKE_CURRENT_BINARY_DIR}/pad_file.xml")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/pad_file.xml" DESTINATION ${DOC_DIR})
endif(TARGET mged)
CMAKEFILES(
cmakefiles(
CMakeLists.txt
README.Solaris
README.VAX
README.adoc
STARTERS
STRATEGY
git/bisect.txt
@@ -226,6 +234,7 @@ CMAKEFILES(
git/merging.txt
git/mime_types.txt
git/usability.txt
inventory.adoc
notes/bsd_semaphore_bug.txt
notes/cmake_paths/CMakeLists.txt
notes/cmake_paths/README.txt
@@ -235,11 +244,12 @@ CMAKEFILES(
notes/csv_to_comgeom.txt
notes/implicit_constraints.txt
notes/lcov.txt
notes/struct_resource_removal.txt
pad_file.xml.in
)
)
# Generic C/C++ examples
CMAKEFILES(
cmakefiles(
notes/c_cxx_patterns/01_basic_C/CMakeLists.txt
notes/c_cxx_patterns/01_basic_C/main.c
notes/c_cxx_patterns/01_basic_C/nlib.c
@@ -262,10 +272,10 @@ CMAKEFILES(
notes/c_cxx_patterns/05_PImpl_CXX/nlib.h
notes/c_cxx_patterns/CMakeLists.txt
notes/c_cxx_patterns/README
)
)
# Notes about parser generators
CMAKEFILES(
cmakefiles(
notes/parsers/bison_to_lemon.txt
notes/parsers/flex_to_re2c.txt
notes/parsers/templates/CMakeLists.txt
@@ -274,7 +284,7 @@ CMAKEFILES(
notes/parsers/templates/parser.lemon
notes/parsers/templates/scanner.perplex
notes/parsers/writing_perplex_lemon_parsers.txt
)
)
# Local Variables:
# tab-width: 8
+3 -3
View File
@@ -64,10 +64,10 @@ you will be able to compile BRL-CAD.
Following the build instructions in the INSTALL file. You will need:
gcc (6+, e.g. 6.0.3)
g++ (6+, e.g. 6.0.3)
gcc (8+, e.g. 8.0.3)
g++ (8+, e.g. 8.0.3)
make (e.g. gnu make 3.8.0)
cmake (3.0.2 or newer)
cmake (3.20 or newer)
All three of those have implicit dependencies on other packages.
+1 -1
View File
@@ -81,7 +81,7 @@ online may prove fruitful.
So far, if parallel building doesn't work due to the above issue a
non-parallel build will still succeed. Another workaround is to build
just subdirectories (e.g. src/other, doc, etc.) individually and then
just subdirectories (e.g. src, doc, etc.) individually and then
do a toplevel make in non-parallel mode to finalize the build.
+18 -20
View File
@@ -1,11 +1,11 @@
*** ARCHIVED -- legacy platform, no longer supported (retained for
*** historical reference). This document is not installed and is kept
*** only to preserve the historical record.
BRL-CAD on Solaris README
=========================
In recent years, there have been a variety of Solaris-style operating
systems that have appeared, following Sun's open-source release of
OpenSolaris. OpenSolaris itself doesn't seem to be especially active, but
another derivative system called OpenIndiana has appeared, based on the
illumos kernel - the Solaris file will be the place to add any notes
needed to build on such derivative systems, as well as Solaris proper.
There have been a variety of Solaris-style operating systems that appeared
following Sun's open-source release of OpenSolaris.
Kitware does not provide a pre-compiled binary for CMake on Solaris
type systems. To bootstrap from the source code, try the following:
@@ -26,22 +26,20 @@ bin directory to your path:
csh: setenv PATH /home/user/cmake-install/bin:$PATH
bash: export PATH=/home/user/cmake-install/bin:$PATH
From there, you should be good to build BRL-CAD. The most recent tests
From there, you can proceed with building BRL-CAD. The most recent tests
of the Sun Studio compiler suggest that there are issues to resolve,
so (unless you want to fix those issues, which would be welcome!) you
probably want to use the GCC compiler suite to build BRL-CAD as well:
CC=gcc CXX=g++ cmake ../brlcad
If while compiling you encounter an error "Text relocation remains
against symbol" along with some number of lines following, it usually
means that the build has attempted to link a static system library
into a shared library being compiled (e.g. attempting to link a system
libz.a into the png library distributed in src/other/libpng being
compiled as libpng.so). If this happens, it likely indicates a problem
with the CMake build logic and should be reported as a bug - you may also
need to install a shared version of the library. Another possibility
would be to add -mipure-text to the linker flags.
If while compiling you encounter an error "Text relocation remains against
symbol" along with some number of lines following, it usually means that the
build has attempted to link a static system library into a shared library being
compiled. If this happens, it likely indicates a problem with the CMake build
logic and should be reported as a bug - you may also need to install a shared
version of the library. Another possibility would be to add -mipure-text to
the linker flags.
OpenIndiana
-----------
@@ -55,7 +53,7 @@ pkg install pkg:/developer/versioning/subversion
pkg install pkg:/system/header
pkg install pkg:/developer/lexer/flex
(Note that gcc-7 building doesn't work as of 2017-08-23 - the above
install list is a starting point, but the repo currently doesn't
build and isn't close to building. It may be an older gcc would
have better luck...)
(Note that gcc-7 building doesn't work as of 2017-08-23 - the above install
list is a starting point, but the repo currently doesn't build and isn't close
to building. UPDATE - as of 2024 a *much* newer compiler will be needed...
C++17 support is now required.)
+4
View File
@@ -1,3 +1,7 @@
*** ARCHIVED -- legacy platform, no longer supported (retained for
*** historical reference). This document is not installed and is kept
*** only to preserve the historical record.
BRL-CAD on VAX README
=====================
+77
View File
@@ -0,0 +1,77 @@
= BRL-CAD: Open Source Solid Modeling
:toc: macro
:toc-title:
:icons: font
:experimental:
// Attributes for easy maintenance
:project-url: https://brlcad.org
:docs-url: https://brl-cad.github.io/docs
:repo-url: https://github.com/BRL-CAD/brlcad
:chat-url: https://brlcad.zulipchat.com
image:https://img.shields.io/badge/license-BSD/LGPL-blue.svg["License"]
image:https://img.shields.io/badge/status-active-brightgreen.svg["Status"]
BRL-CAD is a powerful open-source cross-platform solid modeling system that includes interactive geometry editing, high-performance ray-tracing for rendering and geometric analysis, image and signal-processing tools, a system performance analysis benchmark suite, and libraries for robust geometric manipulation.
For more than 40 years, BRL-CAD has been a primary solid modeling system used by the U.S. military to model weapons systems for vulnerability and lethality analyses.
---
toc::[]
== Key Features
* **CSG Modeling:** Constructive Solid Geometry (CSG) provides precise Boolean operations on primitives.
* **High Performance:** Multi-threaded ray-tracing and a high-performance memory allocator.
* **Hybrid Representation:** Supports both CSG and B-Rep (NURBS) geometry.
* **Extensive Toolset:** Over 400 specialized command-line utilities for geometry processing.
* **Legacy of Stability:** Proven in production environments since 1979.
== Getting Started
=== Prerequisites
To build BRL-CAD from source, you will need:
* **CMake** (3.26+)
* **C/C++ Compiler** (GCC, Clang, or MSVC)
* **Build Tools** (Make, Ninja, or Visual Studio)
=== Quick Build (Unix/macOS)
[source,bash]
----
mkdir build
cd build
cmake .. -DBRLCAD_BUNDLED_LIBS=ON -DCMAKE_BUILD_TYPE=Release
make -j$(nproc)
----
[NOTE]
====
For detailed installation instructions across different platforms, please refer to our link:{docs-url}/install[Installation Guide].
====
== Documentation
We have consolidated our extensive documentation (formerly a mix of DocBook/XML, MediaWiki, troff, plain text, and more) onto **AsciiDoc**, with the authoritative sources under `doc/asciidoc/`.
* **Tutorials:** link:{docs-url}/tutorials[Browse the Manuals]
* **Developer Guides:** link:{docs-url}/hacking and link:{repo-url}/blob/main/HACKING
* **Wiki:** {project-url}/wiki[snapshot that is a little out of date]
* **Etc:** link:{docs-url}[Not everything, but a lot]
== Contributing
BRL-CAD is a community-driven project. We welcome contributions in the form of bug reports, feature requests, code, and documentation.
1. **Chat with Us:** Connect with us on Zulip link:{chat-url}.
2. **Find Issues:** Check our link:{repo-url}/issues[Issue Tracker].
3. **Submit a PR:** We follow a standard Fork-and-Pull Request workflow.
[IMPORTANT]
.Documentation Contributors
We're prototyping the use of **AsciiDoc** for all project documentation in a separate "docs" repo.
== License
BRL-CAD is free and open-source software. Most components are licensed under the **BSD** or **LGPL** licenses. See the `COPYING` file for more details.
+1 -1
View File
@@ -32,7 +32,7 @@ Difficulty:
Prerequisites:
* Basic familiarity with C++ STL
References:
* src/other/step
* https://github.com/BRL-CAD/stepcode
* src/conv/step
* include
* http://www.sgi.com/tech/stl/
+2 -2
View File
@@ -7,7 +7,7 @@
BRL-CAD Development Strategy
This is a living document that defines and aims to help maintain a
consistent develpment strategy for addressing BRL-CAD requirements.
consistent development strategy for addressing BRL-CAD requirements.
It recognizes areas of strategic importance, outlines projects to
bolster those areas, and identifies specific actionable objectives.
@@ -234,7 +234,7 @@ bolster those areas, and identifies specific actionable objectives.
**** TODO create data caching test cases (1)
**** TODO implement libbu data caching (1)
*** implment LIBRT object caching (4)
*** implement LIBRT object caching (4)
**** TODO serialize BoT prep data to cache (1)
**** TODO serialize NURBS prep data to cache (1)
**** TODO serialize tess/plot data to cache (2)
+22
View File
@@ -0,0 +1,22 @@
include(${BRLCAD_CMAKE_DIR}/AsciiDoc.cmake)
verbose_add_subdirectory(asciidoc toplevel)
verbose_add_subdirectory(asciidoc system)
verbose_add_subdirectory(asciidoc articles)
verbose_add_subdirectory(asciidoc books)
verbose_add_subdirectory(asciidoc devguides)
verbose_add_subdirectory(asciidoc lessons)
verbose_add_subdirectory(asciidoc presentations)
verbose_add_subdirectory(asciidoc specifications)
cmakefiles(
CMakeLists.txt
README.adoc
)
# Local Variables:
# tab-width: 8
# mode: cmake
# indent-tabs-mode: t
# End:
# ex: shiftwidth=2 tabstop=8
+58
View File
@@ -0,0 +1,58 @@
= BRL-CAD AsciiDoc Documentation
:toc: left
:toclevels: 2
== Overview
This directory contains BRL-CAD documentation in AsciiDoc format. The `.adoc`
files here are the authoritative documentation sources and are committed to
version control. The one-time conversion from the original DocBook 5 XML
sources is complete, and those legacy XML sources have been removed; edit the
`.adoc` files directly.
The `.adoc` files are built into HTML and man-page outputs at compile time
using **asciiquack**, BRL-CAD's self-contained AsciiDoc processor.
== Directory Structure
[source]
----
doc/asciidoc/
├── articles/ General articles
├── books/ Long-form books
├── devguides/ Developer guides
├── lessons/ Tutorial lessons
├── presentations/ Presentation slides
├── specifications/ Format specifications
└── system/
├── man1/ Section 1 man pages (command-line tools)
├── man3/ Section 3 man pages (C library functions)
├── man5/ Section 5 man pages (file formats)
└── mann/ Section n man pages (MGED commands)
----
== Build Outputs
When `BRLCAD_EXTRADOCS=ON` is set at CMake configuration time:
* Man pages (`system/man*/`) are built by asciiquack with `-b manpage` and
installed under `${MAN_DIR}/man*/`.
* Articles, books, and other prose (`articles/`, `books/`, etc.) are built
with `-b html5` and installed under `${DOC_DIR}/html/asciidoc/`.
The build logic is in `brlcad/misc/CMake/AsciiDoc.cmake`.
== Authoritative Sources
The `.adoc` files in this directory are the authoritative documentation
sources. The one-time conversion from the retired DocBook 5 XML sources is
complete, so there is no conversion step to re-run: make all documentation
changes by editing the `.adoc` files directly.
[NOTE]
====
Documentation is built only when CMake is configured with
`BRLCAD_EXTRADOCS=ON`. With the default configuration the documentation
targets are skipped, so remember to enable this option when working on or
verifying documentation.
====
+488
View File
@@ -0,0 +1,488 @@
set(
articles_EN
TEMPLATE.adoc
about.adoc
adrt_pathtrace.adoc
build_pattern.adoc
build_region.adoc
camo_shader.adoc
ebm_primitive.adoc
gcv.adoc
ged.adoc
main_menu.adoc
mged.adoc
mgedrc.adoc
nirt.adoc
object_types.adoc
oed.adoc
overlap_tool.adoc
pipes.adoc
procedural_geometry.adoc
projection_shader.adoc
renderer_showcase.adoc
taxonomy.adoc
tire.adoc
)
if(BRLCAD_EXTRADOCS)
add_asciidoc("HTML" articles_EN "articles" "")
endif(BRLCAD_EXTRADOCS)
set(
articles_EN_IMAGES
images/Lee_tux.gif
images/build_pattern_fig01.png
images/build_pattern_fig02.png
images/build_pattern_fig03.png
images/build_pattern_fig04.png
images/build_pattern_fig05.png
images/build_pattern_fig06.png
images/build_pattern_fig07.png
images/build_region_fig01.png
images/build_region_fig02.png
images/build_region_fig03.png
images/build_region_fig04.png
images/ebm_primitive_fig01.png
images/ebm_primitive_fig02.png
images/ebm_primitive_fig03.png
images/gcv_architecture.png
images/gcv_unsupported_tessellation.png
images/gcv_using_gdiff.png
images/mgedrc_fig01.png
images/mgedrc_fig02.png
images/mgedrc_fig03.png
images/moss_ssm.gif
images/nirt_fig01.png
images/nirt_fig02.png
images/nirt_fig03.png
images/nirt_fig04.png
images/nirt_fig05.png
images/nirt_fig06.png
images/nirt_fig07.png
images/nirt_fig08.png
images/nirt_fig09.png
images/nirt_fig10.png
images/nirt_fig11.png
images/nirt_fig12.png
images/nirt_fig13.png
images/nirt_fig14.png
images/nirt_fig15.png
images/nirt_fig16.png
images/nirt_fig17.png
images/nirt_fig18.png
images/nirt_fig19.png
images/nirt_fig20.png
images/nirt_fig21.png
images/nirt_fig22.png
images/nirt_fig23.png
images/nirt_fig24.png
images/oed_fig01.png
images/oed_fig02.png
images/oed_fig03.png
images/oed_fig04.png
images/oed_fig05.png
images/oed_fig06.png
images/oed_fig07.png
images/oed_fig08.png
images/oed_fig09.png
images/oed_fig10.png
images/oed_fig11.png
images/oed_fig12.png
images/oed_fig13.png
images/overlap_tool_fig01.gif
images/overlap_tool_fig02.gif
images/overlap_tool_fig03.png
images/pipes_fig01.png
images/pipes_fig02.png
images/pipes_fig03.png
images/pipes_fig04.png
images/pipes_fig05.png
images/pipes_fig06.png
images/pipes_fig07.png
images/pipes_fig08.png
images/pipes_fig09.png
images/pipes_fig10.png
images/pipes_fig11.png
images/pipes_fig12.png
images/pipes_fig13.png
images/projection_shader_fig01.png
images/projection_shader_fig02.png
images/projection_shader_fig03.png
images/projection_shader_fig04.png
images/projection_shader_fig05.png
images/projection_shader_fig06.png
images/projection_shader_fig07.png
images/tire_fig01.png
images/tire_fig02.png
images/tire_fig03.png
images/tire_fig04.png
images/tire_fig05.png
images/tire_fig06.png
images/tire_fig07.png
images/tire_fig08.png
images/tire_fig09.png
images/tire_fig10.png
images/tire_fig11.png
images/tire_fig12.png
images/tire_fig13.png
images/tire_fig14.png
images/base.gif
images/bool.gif
images/coord-axes.gif
images/cup_and_mug.gif
images/cup_and_mug_small.gif
images/cup_out+in.gif
images/cup_outside.gif
images/cup_w_handle.gif
images/faceplate.gif
images/faceplate_menu.gif
images/faceplate_menu_sm.gif
images/faceplate_sm.gif
images/fillet.gif
images/fillet.jpg
images/handle.gif
images/handle.jpg
images/mug_camo.gif
images/mug_camo.jpg
images/mug_green.gif
images/mug_green.jpg
images/prims.gif
images/rim.gif
images/rim.jpg
images/gallery_terragen.png
images/gallery_voxelize.png
images/gallery_lattice.png
images/gallery_loftwing.png
images/gallery_loftwing_prop.png
images/gallery_gears.png
images/gallery_helicoil.png
images/gallery_specimen.png
images/gallery_seashell.png
images/gallery_seashell_nautilus.png
images/gallery_sphflake.png
images/gallery_donuts.png
images/gallery_menger.png
images/gallery_pyramid.png
images/gallery_torii.png
images/gallery_masonry_frame.png
images/gallery_masonry_sheetrock.png
images/gallery_masonry_brick.png
images/gallery_masonry_bm.png
images/gallery_brickwall.png
images/gallery_mkbuilding.png
images/gallery_cchannel.png
images/gallery_ringworld.png
images/gallery_vegetation.png
images/gallery_clutter.png
images/gallery_metaball.png
images/gallery_molecule.png
images/gallery_pdb-g.png
images/gallery_pipe.png
images/gallery_pipetest.png
images/gallery_tube.png
images/gallery_lens.png
images/gallery_brep_simple.png
images/gallery_brep_cube.png
images/gallery_brep_cobb.png
images/gallery_brep_surface.png
images/gallery_brep_trimmed.png
images/gallery_brep_invalid.png
images/gallery_breplicator.png
images/gallery_csgbrep.png
images/gallery_surfaceintersect.png
images/gallery_spltest.png
images/gallery_tea.png
images/gallery_wavy.png
images/gallery_kurt.png
images/gallery_sketch.png
images/gallery_wdb_example.png
images/gallery_globe.png
images/gallery_bottest.png
images/gallery_pix2g.png
images/gallery_bolt.png
images/gallery_coil.png
images/gallery_fence.png
images/gallery_gastank.png
images/gallery_handle.png
images/gallery_human.png
images/gallery_picket_fence.png
images/gallery_tire.png
images/gallery_window.png
images/gallery_window_frame.png
images/gallery_wire.png
images/renderer_gallery_rt_l0.png
images/renderer_gallery_rt_l1.png
images/renderer_gallery_rt_l2.png
images/renderer_gallery_rt_l3.png
images/renderer_gallery_rt_l4.png
images/renderer_gallery_rt_l5.png
images/renderer_gallery_rt_l6.png
images/renderer_gallery_rt_l7.png
images/renderer_gallery_rt_l8.png
images/renderer_gallery_rt_haze.png
images/renderer_gallery_rt_cutaway.png
images/renderer_gallery_rtedge_default.png
images/renderer_gallery_rtedge_colored.png
images/renderer_gallery_rtedge_regions.png
images/renderer_gallery_rthide.png
images/renderer_gallery_rtdepth.png
images/renderer_gallery_rtxray.png
images/adrt_castle_path.png
images/adrt_castle_rt.png
images/adrt_castle_rt_ao.png
images/adrt_chess_path.png
images/adrt_chess_rt.png
images/adrt_chess_rt_ao.png
images/adrt_cornell_path.png
images/adrt_cornell_phong.png
images/adrt_toyjeep_depth.png
images/adrt_toyjeep_normal.png
images/adrt_toyjeep_path.png
images/adrt_toyjeep_phong.png
images/adrt_toyjeep_rt.png
images/adrt_toyjeep_rt_ao.png
images/adrt_toyjeep_spall.png
images/objtype_arb8.png
images/objtype_arb8_variety.png
images/objtype_arbn.png
images/objtype_arbn_variety.png
images/objtype_ars.png
images/objtype_bot.png
images/objtype_bot_variety.png
images/objtype_brep.png
images/objtype_cline.png
images/objtype_comb_variety.png
images/objtype_dsp.png
images/objtype_ebm.png
images/objtype_ehy.png
images/objtype_ehy_variety.png
images/objtype_ell.png
images/objtype_ell_variety.png
images/objtype_epa.png
images/objtype_epa_variety.png
images/objtype_eto.png
images/objtype_eto_variety.png
images/objtype_extrude.png
images/objtype_half.png
images/objtype_hrt.png
images/objtype_hrt_variety.png
images/objtype_hyp.png
images/objtype_hyp_variety.png
images/objtype_metaball.png
images/objtype_metaball_variety.png
images/objtype_nmg.png
images/objtype_part.png
images/objtype_part_variety.png
images/objtype_pipe.png
images/objtype_pipe_variety.png
images/objtype_pnts.png
images/objtype_rcc.png
images/objtype_rec.png
images/objtype_revolve.png
images/objtype_rhc.png
images/objtype_rhc_variety.png
images/objtype_rpc.png
images/objtype_rpc_variety.png
images/objtype_sph.png
images/objtype_submodel.png
images/objtype_superell.png
images/objtype_superell_variety.png
images/objtype_tgc.png
images/objtype_tgc_variety.png
images/objtype_tor.png
images/objtype_tor_variety.png
images/objtype_trc.png
images/objtype_vol.png
)
if(TARGET mged OR TARGET qged OR TARGET archer)
if(BRLCAD_EXTRADOCS)
add_doc(articles_EN_IMAGES html/articles/images)
add_asciidoc("HTML" articles_EN articles articles_EN_IMAGES_cp)
endif(BRLCAD_EXTRADOCS)
endif(TARGET mged OR TARGET qged OR TARGET archer)
# Procedural geometry gallery -- opt-in regeneration of the committed snapshot.
#
# The .adoc article and the gallery_*.png images above are a committed snapshot
# (consumed by the normal doc build like any other article). This target
# rebuilds that snapshot from the actual built tools via a pure-CMake generator
# (no shell, python, or platform assumptions). It is opt-in and excluded from
# the default build; a developer regenerates, reviews the diff, and commits.
option(BRLCAD_GENERATE_GALLERY "Regenerate the procedural geometry gallery snapshot" OFF)
if(BRLCAD_GENERATE_GALLERY AND TARGET rt AND TARGET mged)
# Demo generator programs to build before regenerating (those that exist).
set(
GALLERY_DEMO_TARGETS
terragen voxelize lattice loftwing gears helicoil specimen seashell sphflake donuts
menger pyramid torii masonry brickwall mkbuilding cchannel ringworld
vegetation clutter metaball molecule pdb-g pipe pipetest tube lens
brep_simple brep_cube brep_cobb brep_surface brep_trimmed brep_invalid
breplicator csgbrep surfaceintersect spltest tea wavy kurt sketch
wdb_example globe bottest pix2g bolt coil fence gastank handle human
picket_fence tire window window_frame wire
)
set(gallery_deps rt mged)
foreach(t ${GALLERY_DEMO_TARGETS})
if(TARGET ${t})
list(APPEND gallery_deps ${t})
endif(TARGET ${t})
endforeach(t)
add_custom_target(
procedural-gallery-snapshot
COMMAND
${CMAKE_COMMAND} -DRT=$<TARGET_FILE:rt> -DMGED=$<TARGET_FILE:mged>
-DBINDIR=$<TARGET_FILE_DIR:rt>
-DMANIFEST=${CMAKE_CURRENT_SOURCE_DIR}/gallery/gallery_manifest.cmake
-DIMGDIR=${CMAKE_CURRENT_SOURCE_DIR}/images
-DADOC=${CMAKE_CURRENT_SOURCE_DIR}/procedural_geometry.adoc
-DINPUTDIR=${CMAKE_CURRENT_SOURCE_DIR}/gallery/inputs
-DWORKDIR=${CMAKE_CURRENT_BINARY_DIR}/gallery_work -DSIZE=512
"-DTITLE=BRL-CAD Procedural Geometry Gallery"
-P ${CMAKE_CURRENT_SOURCE_DIR}/gallery/generate_gallery.cmake
DEPENDS ${gallery_deps}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Regenerating procedural geometry gallery snapshot (images + adoc)"
VERBATIM
USES_TERMINAL
)
set_target_properties(procedural-gallery-snapshot PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD 1)
endif(BRLCAD_GENERATE_GALLERY AND TARGET rt AND TARGET mged)
# Renderer showcase gallery -- opt-in regeneration of the committed snapshot.
#
# Like the procedural geometry gallery above, the .adoc article and
# renderer_gallery_*.png images are normal committed documentation. This target
# refreshes those products from the built renderers and sample Cornell box so a
# developer can review and commit the resulting diff.
option(BRLCAD_GENERATE_RENDERER_GALLERY "Regenerate the renderer showcase gallery snapshot" OFF)
if(
BRLCAD_GENERATE_RENDERER_GALLERY
AND TARGET rt
AND TARGET rtedge
AND TARGET rtdepth
AND TARGET rtxray
AND TARGET rthide
AND TARGET bw-png
AND TARGET fbclear
AND TARGET plot3-fb
AND TARGET fb-png
AND TARGET cornell.g
)
add_custom_target(
renderer-gallery-snapshot
COMMAND
${CMAKE_COMMAND}
-DRT=$<TARGET_FILE:rt>
-DRTEDGE=$<TARGET_FILE:rtedge>
-DRTDEPTH=$<TARGET_FILE:rtdepth>
-DRTXRAY=$<TARGET_FILE:rtxray>
-DRTHIDE=$<TARGET_FILE:rthide>
-DBWPNG=$<TARGET_FILE:bw-png>
-DFBCLEAR=$<TARGET_FILE:fbclear>
-DPLOT3FB=$<TARGET_FILE:plot3-fb>
-DFBPNG=$<TARGET_FILE:fb-png>
-DMANIFEST=${CMAKE_CURRENT_SOURCE_DIR}/renderer_gallery/renderer_gallery_manifest.cmake
-DIMGDIR=${CMAKE_CURRENT_SOURCE_DIR}/images
-DADOC=${CMAKE_CURRENT_SOURCE_DIR}/renderer_showcase.adoc
-DWORKDIR=${CMAKE_CURRENT_BINARY_DIR}/renderer_gallery_work
-DDB=${CMAKE_BINARY_DIR}/${DATA_DIR}/db/cornell.g
-DSIZE=512
"-DTITLE=BRL-CAD Renderer Showcase"
-P ${CMAKE_CURRENT_SOURCE_DIR}/renderer_gallery/generate_renderer_gallery.cmake
DEPENDS
rt
rtedge
rtdepth
rtxray
rthide
bw-png
fbclear
plot3-fb
fb-png
cornell.g
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Regenerating renderer showcase gallery snapshot (images + adoc)"
VERBATIM
USES_TERMINAL
)
set_target_properties(renderer-gallery-snapshot PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD 1)
endif()
# ADRT path-tracing gallery -- opt-in regeneration of the committed snapshot.
#
# Like the galleries above, the adrt_pathtrace.adoc article is hand-written and
# the adrt_*.png images are committed documentation. This target refreshes the
# images from the built `adrt`, `rt`, and `mged` tools and the sample databases
# so a developer can review and commit the resulting diff.
option(BRLCAD_GENERATE_ADRT_GALLERY "Regenerate the ADRT path-tracing snapshot" OFF)
if(
BRLCAD_GENERATE_ADRT_GALLERY
AND TARGET adrt
AND TARGET rt
AND TARGET mged
AND TARGET toyjeep.g
AND TARGET castle.g
AND TARGET cornell-kunigami.g
AND TARGET chessboard.g
)
add_custom_target(
adrt-pathtrace-snapshot
COMMAND
${CMAKE_COMMAND}
-DADRT=$<TARGET_FILE:adrt>
-DRT=$<TARGET_FILE:rt>
-DMGED=$<TARGET_FILE:mged>
-DDB=${CMAKE_BINARY_DIR}/${DATA_DIR}/db
-DIMGDIR=${CMAKE_CURRENT_SOURCE_DIR}/images
-DWORKDIR=${CMAKE_CURRENT_BINARY_DIR}/adrt_gallery_work
-DSIZE=512
-P ${CMAKE_CURRENT_SOURCE_DIR}/adrt_gallery/generate_adrt_gallery.cmake
DEPENDS
adrt
rt
mged
toyjeep.g
castle.g
cornell-kunigami.g
chessboard.g
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Regenerating ADRT path-tracing snapshot (images)"
VERBATIM
USES_TERMINAL
)
set_target_properties(adrt-pathtrace-snapshot PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD 1)
endif()
cmakefiles(
CMakeLists.txt
${articles_EN}
${articles_EN_IMAGES}
images/tire_fig12.svg
images/tire_fig13.svg
gallery/gallery_manifest.cmake
gallery/generate_gallery.cmake
renderer_gallery/renderer_gallery_manifest.cmake
renderer_gallery/generate_renderer_gallery.cmake
adrt_gallery/generate_adrt_gallery.cmake
gallery/inputs/pipe.stdin
gallery/inputs/wire.stdin
gallery/inputs/tube.stdin
gallery/inputs/moss64.pix
gallery/inputs/caffeine.pdb
gallery/inputs/mol-cube.dat
images/objtype_src/README.adoc
images/objtype_src/objtype_lib.py
images/objtype_src/gen_object_types.py
)
add_subdirectory(hy)
add_subdirectory(it)
add_subdirectory(ru)
# Local Variables:
# tab-width: 8
# mode: cmake
# indent-tabs-mode: t
# End:
# ex: shiftwidth=2 tabstop=8
+83
View File
@@ -0,0 +1,83 @@
= Article Title
Firstname Middlename Lastname <devs@brlcad.org>
:doctype: article
:toc:
:toclevels: 3
[[some-descriptive-tag]]
First paragraph goes here.
....
benchmark TIMEFRAME=1 run
....
[NOTE]
====
The preceding _benchmark_ command example can get a lot more complex.
====
When you run the *benchmark* with the *help* option, you might see this output:
....
sean@gcc1-power7 bin]$benchmark help
Usage: ./benchmark [command(s)] [OPTION=value] [RT_OPTIONS]
Available commands:
clean
...
....
Another paragraph with embedded list is shown here. Each paragraph gets its own para and should be wrapped for readability and localized context diff comparisons. A list of items:
* Bullet item 1.
* Bullet item 2.
[[another-tag-for-main-body]]
== Breaking up the flow into sections
You can use sections to group sections of your document together, but they are not necessary.
.Example embedded image text.
image::http://brlcad.org/images/logo/BRL-CAD_gear_logo_w_name_256.png[width=256]
Another image, but rendered inline image:http://brlcad.org/images/logo/BRL-CAD_gear_logo_64x64.png[width=64] with the paragraph text.
More paragraphs...
[cols="2*"]
|===
|Type
|Description
|ell
|Generalized Ellipsoid
|arb8
|Arbitrary Regular Polyhedron with up to 8 vertices
|===
[CAUTION]
====
There's a lot more you can do with AsciiDoc. Consult the reference documentation for syntax and examples:
* https://docs.asciidoctor.org/asciidoc/latest/[AsciiDoc Language Documentation]
* https://docs.asciidoctor.org/asciidoc/latest/syntax-quick-reference/[AsciiDoc Syntax Quick Reference]
====
+25
View File
@@ -0,0 +1,25 @@
= About BRL-CAD
Christopher Sean Morrison <devs@brlcad.org>
:doctype: article
:toc:
:toclevels: 3
[[article-body]]
BRL-CAD is a powerful cross-platform Open Source combinatorial Constructive Solid Geometry (CSG) solid modeling system that includes interactive 3D solid geometry editing, high-performance ray-tracing support for rendering and geometric analysis, network-distributed framebuffer support, image and signal-processing tools, path-tracing and photon mapping support for realistic image synthesis, a system performance analysis benchmark suite, an embedded scripting interface, and libraries for robust high-performance geometric representation and analysis.
For more than 20 years, BRL-CAD has been the primary tri-service solid modeling CAD system used by the U.S. military to model weapons systems for vulnerability and lethality analyses. The solid modeling system is frequently used in a wide range of military, academic, and industrial applications including in the design and analysis of vehicles, mechanical parts, and architecture. The package has also been used in radiation dose planning, medical visualization, computer graphics education, CSG concepts and modeling education, and system performance benchmark testing among other purposes.
BRL-CAD supports a great variety of geometric representations including an extensive set of traditional CSG primitive implicit solids such as boxes, ellipsoids, cones, and tori, as well as explicit solids made from closed collections of Uniform B-Spline Surfaces, Non-Uniform Rational B-Spline (NURBS) surfaces, n-Manifold Geometry (NMG), and purely faceted mesh geometry. All geometric objects may be combined using boolean set-theoretic CSG operations including union, intersection, and difference.
BRL-CAD has been under active development with a portability heritage that includes systems such as a DEC VAX-11/780 running 4.3 BSD; DECStations running ULTRIX; Silicon Graphics 3030, 4D "IRIS", O2, Onyx, and Origin systems running various versions of IRIX; Sun Microsystems Sun-3 and Sun-4 Sparcs running SunOS; the Cray 1, Cray X-MP, Cray Y-MP, and Cray 2 running UNICOS; DEC Alpha AXP running OSF/1; Apple Macintosh II running A/UX; iPSC/860 Hypercube running NX/2; the Alliant FX/8, FX/80, and FX/2800; Gould/Encore SEL PowerNode6000/9000 and NP1; NeXT workstations; IBM RS/6000; HPPA 9000/700 running HPUX; Ardent/Stardent; Encore Multi-Max; and much more.
BRL-CAD is a collection of more than 400 tools, utilities, and applications comprising more than a million lines of source code. The package is intentionally designed to be extensively cross-platform and is actively developed on and maintained for many common operating system environments including BSD, Linux, Solaris, Mac OS X, and Windows among others. BRL-CAD is distributed in binary and source code form as free open source software (FOSS), provided under Open Source Initiative (OSI) approved license terms.
[NOTE]
====
Mike Muuss began the initial architecture and design of BRL-CAD back in 1979. Development as a unified package began in 1983. The first public release was made in 1984. BRL-CAD became an open source project on 21 December 2004.
====
@@ -0,0 +1,115 @@
# generate_adrt_gallery.cmake -- regenerate the ADRT path-tracing snapshot.
#
# Run via: cmake -DADRT=... -DRT=... -DMGED=... -DDB=<share/db dir>
# -DIMGDIR=... -DWORKDIR=... -DSIZE=512
# -P generate_adrt_gallery.cmake
#
# Reproduces the committed images for doc/asciidoc/articles/adrt_pathtrace.adoc:
# path-traced renders from the standalone `adrt` tool alongside `rt` full
# lighting and `rt` ambient occlusion, for the sample toyjeep, chessboard,
# castle, and Cornell box models. Cross-platform: uses only cmake tooling.
cmake_minimum_required(VERSION 3.20)
foreach(v ADRT RT MGED DB IMGDIR WORKDIR)
if(NOT DEFINED ${v})
message(FATAL_ERROR "generate_adrt_gallery: -D${v}=... is required")
endif()
endforeach()
if(NOT DEFINED SIZE)
set(SIZE 512)
endif()
set(RENDER_TIMEOUT 1800)
set(AO "set ambSamples=128")
file(MAKE_DIRECTORY "${WORKDIR}")
file(MAKE_DIRECTORY "${IMGDIR}")
set(N_OK 0)
set(N_FAIL 0)
set(FAILED "")
# Run a render command whose -o target is "${IMGDIR}/<out>", and report on it.
function(render label out)
set(img "${IMGDIR}/${out}")
file(REMOVE "${img}")
execute_process(
COMMAND ${ARGN}
WORKING_DIRECTORY "${WORKDIR}" TIMEOUT ${RENDER_TIMEOUT}
RESULT_VARIABLE rc OUTPUT_VARIABLE log ERROR_VARIABLE log)
if(EXISTS "${img}")
file(SIZE "${img}" isz)
else()
set(isz 0)
endif()
if(isz GREATER 0 AND rc EQUAL 0)
message(STATUS "[${label}] wrote ${out} (${isz} bytes)")
math(EXPR N_OK "${N_OK} + 1" )
else()
message(WARNING "[${label}] FAILED (rc=${rc}):\n${log}")
math(EXPR N_FAIL "${N_FAIL} + 1")
list(APPEND FAILED "${out}")
endif()
set(N_OK "${N_OK}" PARENT_SCOPE)
set(N_FAIL "${N_FAIL}" PARENT_SCOPE)
set(FAILED "${FAILED}" PARENT_SCOPE)
endfunction()
# --- Toy jeep: path trace, rt comparison, and adrt shading modes ------------
set(TJ "${DB}/toyjeep.g")
render(toyjeep_path adrt_toyjeep_path.png
${ADRT} -s${SIZE} -H256 -p12 -a35 -e25 -o "${IMGDIR}/adrt_toyjeep_path.png" "${TJ}" all)
render(toyjeep_normal adrt_toyjeep_normal.png
${ADRT} -s${SIZE} -m normal -p12 -a35 -e25 -o "${IMGDIR}/adrt_toyjeep_normal.png" "${TJ}" all)
render(toyjeep_phong adrt_toyjeep_phong.png
${ADRT} -s${SIZE} -m phong -p12 -a35 -e25 -o "${IMGDIR}/adrt_toyjeep_phong.png" "${TJ}" all)
render(toyjeep_depth adrt_toyjeep_depth.png
${ADRT} -s${SIZE} -m depth -p12 -a35 -e25 -o "${IMGDIR}/adrt_toyjeep_depth.png" "${TJ}" all)
render(toyjeep_rt adrt_toyjeep_rt.png
${RT} -s${SIZE} -a35 -e25 -A0.4 -o "${IMGDIR}/adrt_toyjeep_rt.png" "${TJ}" all)
render(toyjeep_rt_ao adrt_toyjeep_rt_ao.png
${RT} -s${SIZE} -a35 -e25 -A1.1 -c "${AO}" -o "${IMGDIR}/adrt_toyjeep_rt_ao.png" "${TJ}" all)
# --- Chessboard: bright sky lifts the flat, light-colored tiles -------------
set(CH "${DB}/chess/chessboard.g")
render(chess_path adrt_chess_path.png
${ADRT} -s${SIZE} -H768 -p12 -a40 -e35 -C 255/255/255 -o "${IMGDIR}/adrt_chess_path.png" "${CH}" board.g)
render(chess_rt adrt_chess_rt.png
${RT} -s${SIZE} -a40 -e35 -A0.4 -o "${IMGDIR}/adrt_chess_rt.png" "${CH}" board.g)
render(chess_rt_ao adrt_chess_rt_ao.png
${RT} -s${SIZE} -a40 -e35 -A1.1 -c "${AO}" -o "${IMGDIR}/adrt_chess_rt_ao.png" "${CH}" board.g)
# --- Castle: facetize the CSG to a colored BoT, then path trace -------------
# The castle is one region unioning many instanced solids; on-the-fly NMG
# evaluation fails, so convert it once with the Manifold facetizer. rt still
# traces the original CSG natively for the comparison images.
set(CFAC "${WORKDIR}/castle_fac.g")
file(REMOVE "${CFAC}")
configure_file("${DB}/castle.g" "${CFAC}" COPYONLY)
execute_process(COMMAND ${MGED} -c "${CFAC}" facetize -o castle_only all.g/castle
TIMEOUT ${RENDER_TIMEOUT} RESULT_VARIABLE frc OUTPUT_VARIABLE flog ERROR_VARIABLE flog)
execute_process(COMMAND ${MGED} -c "${CFAC}" r castle_r u castle_only
TIMEOUT 120 OUTPUT_QUIET ERROR_QUIET)
execute_process(COMMAND ${MGED} -c "${CFAC}" mater castle_r plastic 255 255 100 0
TIMEOUT 120 OUTPUT_QUIET ERROR_QUIET)
render(castle_path adrt_castle_path.png
${ADRT} -s${SIZE} -H256 -p12 -a135 -e30 -o "${IMGDIR}/adrt_castle_path.png" "${CFAC}" castle_r)
render(castle_rt adrt_castle_rt.png
${RT} -s${SIZE} -a135 -e30 -A0.4 -o "${IMGDIR}/adrt_castle_rt.png" "${DB}/castle.g" castle)
render(castle_rt_ao adrt_castle_rt_ao.png
${RT} -s${SIZE} -a135 -e30 -A1.1 -c "${AO}" -o "${IMGDIR}/adrt_castle_rt_ao.png" "${DB}/castle.g" castle)
# --- Cornell box: global illumination from the emissive ceiling panel -------
set(CB "${DB}/cornell-kunigami.g")
render(cornell_path adrt_cornell_path.png
${ADRT} -s${SIZE} -H512 -E 278,370.9,-454 -L 278,274,279 -p25 -o "${IMGDIR}/adrt_cornell_path.png" "${CB}" all.g)
render(cornell_phong adrt_cornell_phong.png
${ADRT} -s${SIZE} -m phong -E 278,370.9,-454 -L 278,274,279 -p25 -o "${IMGDIR}/adrt_cornell_phong.png" "${CB}" all.g)
message(STATUS "")
message(STATUS "ADRT path-tracing snapshot: ${N_OK} rendered, ${N_FAIL} failed.")
if(FAILED)
string(REPLACE ";" ", " failstr "${FAILED}")
message(STATUS "Failed: ${failstr}")
endif()
+220
View File
@@ -0,0 +1,220 @@
= Path Tracing with ADRT
:doctype: article
:toc:
:toclevels: 3
ADRT (the _Advanced Distributed Ray Tracer_) is BRL-CAD's triangle-based
rendering engine. Alongside the usual scanline shaders it carries a
Monte-Carlo *path tracer* that computes global illumination -- soft ambient
light, contact shadows, and diffuse color bleeding -- by tracing many random
light paths per pixel. This article explains how ADRT is put together and
walks through producing path-traced images with the standalone `adrt`
command, comparing the result to `rt`'s ambient-occlusion lighting.
.Path-traced global illumination: the Cornell box rendered with `adrt -m path`
image::images/adrt_cornell_path.png[Cornell box path traced,384]
== How ADRT works
ADRT is layered on top of BRL-CAD's *TIE* (Triangle Intersection Engine), the
same SIMD-friendly kd-tree ray tracer used by `rtwizard`, `nirt`'s mesh mode,
and the geometry viewers. Because TIE only intersects triangles, ADRT first
*tessellates* geometry:
* Bags-of-triangles (BoT) are handed to TIE directly.
* Every other solid (CSG primitives, NMG, etc.) is tessellated to triangles as
the database tree is walked. Region colors are carried onto the resulting
meshes, and regions whose material shader is a light source (the classic
`light` shader or an OSL `emitter`) are marked *emissive*.
Rendering itself lives in *librender* (`src/adrt/librender`), a small library of
interchangeable shaders selected by name:
[cols="1,4"]
|===
|`path` |Monte-Carlo path tracer (global illumination)
|`phong` |Direct Phong lighting from the eye
|`normal` |Surface normals encoded as RGB
|`depth` |Camera-space depth
|`flat` |Flat region color
|`component`, `cut`, `flos`, `grid`, `spall`, `surfel` |Analysis shaders
|===
Several front ends drive that library:
* *`adrt`* -- a single-process, headless renderer that writes an image file.
This is the tool used throughout this article.
* *`isst`* -- an interactive Tcl/Tk + OpenGL viewer for real-time fly-throughs.
* *`adrt_master`* / *`adrt_slave`* -- a networked master/worker pair (the
"distributed" in ADRT) that farms tiles out to compute nodes for an external
observer.
== Rendering a path-traced image
The `adrt` command loads a `.g` database, frames the requested objects, renders
one frame, and writes the image (the extension selects the format):
----
adrt [options] model.g object [object ...]
----
[cols="1,4"]
|===
|`-o file` |Output image; extension picks the format (default `adrt.png`)
|`-s N` |Square image size in pixels (default 512); or `-w`/`-n` for width/height
|`-m mode` |Shader: `path`, `phong`, `normal`, `depth`, `flat` (default `path`)
|`-H N` |Path-tracer samples per pixel (default 32) -- more samples, less noise
|`-a` / `-e` |View azimuth / elevation in degrees (default 35 / 25)
|`-E x,y,z` |Explicit eye point in model units (overrides `-a`/`-e`)
|`-L x,y,z` |Explicit look-at point (default: model center)
|`-p fov` |Perspective half-angle in degrees (default 25)
|`-C r/g/b` |Environment/sky color, 0-255 (default `230/237/255`)
|`-P N` |Render threads (default: all CPUs)
|===
A first render of the sample toy jeep:
----
adrt -s 512 -H 256 -a 35 -e 25 -o toyjeep.png toyjeep.g all
----
`adrt` reports the triangle count, load time, and render time, then writes the
PNG. The camera is a perspective camera aimed at the model center; `-a`/`-e`
orbit it and `-p` sets the field of view. For scenes that are not simply
oriented -- an enclosed, Y-up Cornell box, for instance -- give an explicit eye
and look-at point instead:
----
adrt -s 512 -H 512 -E 278,370.9,-454 -L 278,274,279 -p 25 \
-o cornell.png cornell-kunigami.g all.g
----
=== The environment and ambient light
Rays that leave the scene without hitting anything pick up light from a built-in
environment: a vertical gradient of the sky color, full strength overhead and
dimming toward the ground. This "overcast sky" is what illuminates open
scenes. With diffuse surfaces it produces physically-based *ambient occlusion*
for free -- up-facing faces catch the bright sky while crevices and undersides
fall into shadow -- and it also paints the graduated background. `-C` tunes the
sky color and brightness (a brighter sky lifts flat, light-colored surfaces).
Enclosed scenes such as the Cornell box see no sky; there, the emissive light
region is the only source, and the interior is lit entirely by bounced,
indirect light.
== Path tracing versus `rt` ambient occlusion
`rt`, BRL-CAD's production CSG ray tracer, approximates indirect shading with an
*ambient occlusion* pass, enabled with a nonzero ambient factor and a sample
count:
----
rt -A1.1 -c "set ambSamples=128" -s512 -a35 -e25 -o out.png model.g object
----
The panels below compare, for the same view, ADRT's path tracer against `rt`
with full lighting only and `rt` with ambient occlusion added. ADRT's path
tracer resolves the sky illumination and soft inter-surface shadowing in a
single physically-based pass; `rt`'s ambient occlusion darkens cavities on top
of its direct lighting model.
.Toy jeep -- `adrt -m path` / `rt` full lighting / `rt` ambient occlusion
[cols="1,1,1",frame=none,grid=none]
|===
|image:images/adrt_toyjeep_path.png[adrt path,256]
|image:images/adrt_toyjeep_rt.png[rt plain,256]
|image:images/adrt_toyjeep_rt_ao.png[rt AO,256]
|*adrt path traced*
|*rt full lighting*
|*rt ambient occlusion*
|===
.Chessboard -- `adrt -m path` / `rt` full lighting / `rt` ambient occlusion
[cols="1,1,1",frame=none,grid=none]
|===
|image:images/adrt_chess_path.png[adrt path,256]
|image:images/adrt_chess_rt.png[rt plain,256]
|image:images/adrt_chess_rt_ao.png[rt AO,256]
|*adrt path traced*
|*rt full lighting*
|*rt ambient occlusion*
|===
== Global illumination: the Cornell box
The Cornell box is the classic test of indirect lighting: a closed room lit only
by a small ceiling panel. ADRT detects the emissive light region and lets the
path tracer bounce that light around the room. Compared with the direct-only
`phong` shader, the path-traced image adds the glowing light source, soft
shadows beneath the blocks, and *color bleeding* -- the red floor and blue walls
tint the neighboring surfaces.
.Cornell box -- `adrt -m path` (global illumination) versus `adrt -m phong` (direct only)
[cols="1,1",frame=none,grid=none]
|===
|image:images/adrt_cornell_path.png[adrt path,320]
|image:images/adrt_cornell_phong.png[adrt phong,320]
|*Path traced:* area light, soft shadows, color bleeding
|*Phong:* direct lighting only, no indirect light
|===
== Complex CSG: facetize first
ADRT tessellates as it loads, but a few heavily-booleaned models do not survive
on-the-fly NMG evaluation -- the sample `castle`, whose whole structure is one
region unioning dozens of instanced solids, is one. `rt` traces it natively as
CSG, but for ADRT the robust path is to convert it to a triangle mesh once with
the Manifold-based facetizer, then render the mesh:
----
# in mged, on a working copy of the database
facetize -o castle_bot all.g/castle
adrt -s 512 -H 256 -a 135 -e 30 -o castle.png castle.g castle_bot
----
.Castle -- facetized then `adrt -m path` / `rt` full lighting / `rt` ambient occlusion
[cols="1,1,1",frame=none,grid=none]
|===
|image:images/adrt_castle_path.png[adrt path,256]
|image:images/adrt_castle_rt.png[rt plain,256]
|image:images/adrt_castle_rt_ao.png[rt AO,256]
|*adrt path traced*
|*rt full lighting*
|*rt ambient occlusion*
|===
== Other shading modes
The same `adrt` invocation reaches librender's analysis shaders through `-m`,
useful for inspecting form and orientation without lighting:
[cols="1,1,1",frame=none,grid=none]
|===
|image:images/adrt_toyjeep_phong.png[phong,256]
|image:images/adrt_toyjeep_normal.png[normal,256]
|image:images/adrt_toyjeep_depth.png[depth,256]
|*`-m phong`* direct lighting
|*`-m normal`* surface normals
|*`-m depth`* camera depth
|===
== Notes and limitations
* The path tracer is a straightforward forward tracer with no next-event
estimation or denoising. Raise `-H` to reduce Monte-Carlo noise; large
perfectly-diffuse, high-albedo surfaces are the noisiest.
* Materials are approximated: regions render as opaque diffuse surfaces using
their region color, `light`/`emitter` regions become area lights, and
specular/refractive shaders are not yet modeled.
* Only triangle-representable geometry contributes; non-tessellatable solids
(for example infinite half-spaces) are skipped.
[NOTE]
====
The images in this article are a committed snapshot. Developers can regenerate
them from the built tools by configuring with
`-DBRLCAD_GENERATE_ADRT_GALLERY=ON` and building the `adrt-pathtrace-snapshot`
target.
====
+147
View File
@@ -0,0 +1,147 @@
= Using the Build Pattern Tool
Lee A Butler; Eric W Edwards; Dwayne L Kregel
:doctype: article
:toc:
:toclevels: 3
[[build_pattern_generalinfo]]
== General Pattern Information
As mentioned previously, the Build Pattern tool automates the process of making copies of existing geometry in rectangular, spherical, or cylindrical patterns. The user can choose to pattern at any of three depths of duplication: top, regions, and primitives.
The Build Pattern tool is run from the graphical user interface (GUI) (under the Tools menu); it currently has no command-line equivalent. The bottom of the pattern control GUI is a usage dialog box that lists pertinent information about each item on the GUI as the user mouses over the text.
There are many input fields. Some stand alone, and others belong to series that work together to provide the needed information for a specific option. Each series is denoted by a diamond-shaped check box. If the diamond is highlighted red, then all fields in that series are required. All required fields must be filled in for the pattern tool to work properly. It is also important to note that all dimensions must be in millimeters and that no commas should be used in number strings.
The Build Pattern tool is designed to work from a prototype geometry object. That is to say, the object that is patterned is not included in the resultant pattern.
[[build_pattern_names]]
== Pattern Names
As shown in Figure E-1, the tool appends three numbers to all patterned objects (unless you are using the increment option for primitives, in which case, the numbers for regions and primitives are incremented by the increment amount). For rectangular patterns, the first number is the X axis offset, the second is the Y axis offset, and the third is the Z axis offset. For spherical patterns, the first number references the azimuth, the second references the elevation, and the third references the radii. For cylindrical patterns, the first number references the radii, the second number references the height, and the third number references the azimuth.
[[build_pattern_fields]]
== Common Fields for all Patterns:
There are several fields in the pattern tool GUI that are common to all types of patterns.
The Group Name field is for the name of the combination to be created (or appended to) by a pattern call.
The Source String and Replacement String fields must be used together. The source string is the set of characters in each element of the patterned object to be changed. The replacement string is the set of characters that will replace the source string.
.Example of pattern-generated assembly names.
image::../articles/images/build_pattern_fig01.png[]
The Increment field is only for use when duplicating to the primitive level. It is added to the leftmost number field of each primitive. To determine the increment, examine the primitives of the object(s) you wish to pattern and find the largest span. For example, to create a pattern to the primitive level with the following primitives (which may or may not be in regions or assemblies):
....
part.s22 part.s22-1 part.s23 part.s24 part.s24+1 part.s24-1 part.s25,
....
one needs to determine the span. Note that the leftmost numbers in these primitives range from 22 to 25. The span is the count of distinct leftmost numbers taken inclusively, from the lowest through the highest: 22, 23, 24, and 25 -- four values in all. It is computed as (highest - lowest) + 1, that is, (25 - 22) + 1 = 4. If we use an increment of four, each leftmost number is shifted up by four (22 becomes 26, 23 becomes 27, and so on), and we will get the following set of primitives.
....
part.s26 part.s26-1 part.s27 part.s28 part.s28+1 part.s28-1 part.s29
....
Although it is acceptable to use a greater increment, gaps in numbers may be troublesome if one is using this capability extensively.
Finally, the Objects field is used for the names of all the items to be patterned.
[[build_pattern_stringsub]]
== String Substitution
It is also possible to create a pattern in which a string of characters in each element in the object is changed (e.g., "l_" -> "r_"). This is useful for symmetry applications (e.g., left - right) or series (e.g., 1 - n). Each element of the object must have the source string so the user must be thorough and name each primitive, region, and assembly properly. Consider the following example: image:../articles/images/build_pattern_fig07.png[]
Top-level duplications copy the patterned object and reference its entire structure with matrices, as follows:
....
/pattern group
/COPIED assemblies [MATRICES]
/assemblies
/regions
/primitives
....
Region-level duplications copy all assembly and regions and reference from the region level down with matrices.
....
/pattern group
/COPIED assemblies
/COPIED regions [MATRICES]
/primitives
....
Primitive-level duplications copy the entire tree structure to the primitive level without matrices using an increment on all primitives.
....
/pattern group
/COPIED assemblies NO MATRICES
/COPIED regions
/COPIED primitives
....
[[build_pattern_recpatterns]]
== Rectangular Patterns
The rectangular pattern GUI (shown in Figure E-2) is designed to facilitate one-, two-, or three-dimensional rectangular patterns. The default X, Y, and Z directions are positive along each axis. In order to create a rectangle that is not axis aligned, these vectors may be changed with the condition that each must remain precisely perpendicular to the other two. If the Use Directions series is checked, the user specifies the number of copies and the Delta between copies for each axis. If the Use Lists series is checked, the user can specify a list of deltas along each axis.
.The user interface for building rectangular patterns.
image::../articles/images/build_pattern_fig02.png[]
[[build_pattern_spherical]]
== Spherical Patterns
The spherical pattern GUI (shown in Figure E-3) facilitates sphere-shaped patterns rotated around a center vertex using user-specified radii with azimuth and elevation angles. As shown in Figure E-4, the patterned objects--in this case, a series of arrows--may be oriented as built around the sphere or rotated by azimuth and/or elevation such that they are oriented toward the pattern center using the Rotate Azimuth and Rotate Elevation check boxes.
As shown in Figure E-4, the Pattern Center field is the coordinate at the center of the pattern. The Object Center field is a user-defined coordinate used to locate the object(s) relative to the pattern center. It acts as the key point for any transformations to the pattern object(s).
The Starting Azimuth and Starting Elevation fields follow the same right-hand-rule Cartesian coordinate conventions as Multi-Device Geometry Editor (MGED) viewing. The Starting Radius is the distance from the Pattern Center to the object center at the user-specified azimuths and elevations.
If the Create Az/El series is checked, the user defines the number of azimuths and elevations and the deltas between each. If the Use Lists series is checked, the user must specify a list of azimuths and/or elevations.
The Create Radii and Use Radii List series define offsets from the Starting Radius, allowing the user to create a pattern of concentric spheres. If Create Radii is checked, the user specifies the Number of Radii and the Radius Delta in order to construct a number of equally offset sphere patterns. If the Use Radii List is checked, the user specifies a list of radius offsets.
.The user interface for building spherical patterns.
image::../articles/images/build_pattern_fig03.png[]
Without the Rotate Azimuth or Rotate Elevation boxes checked, the patterned objects are oriented as built without any rotations. Notice, for example, that every arrow in Figure E-5 points to the left. Notice also that for each patterned arrow, the Object Center (here specified as the tip of the arrow) is located on the circle outline at a distance of one Starting Radius from the Pattern Center. If we set the Object Center to the coordinate at the base of the arrow, the base would then lie on the circular outline. Wherever the Object Center is set is the point at which MGED works with the Object Center coordinate to place and rotate patterned objects.
.Examples of different spherical pattern orientations.
image::../articles/images/build_pattern_fig04.png[]
.Implementation of spherical patterns.
image::../articles/images/build_pattern_fig05.png[]
[[build_pattern_cylind]]
== Cylindrical Patterns
The cylindrical pattern GUI (shown in Figure E-6) facilitates the creation of cylinder-shaped patterns with user-defined center, direction, height, azimuth, and radii inputs. The Base Center is the vertex of the cylinder shape. The Object Center is a user-defined coordinate used to locate the object(s) relative to the Base Center and Height Direction. It acts as the key point for any transformations to the pattern object(s). The Height Direction is the vector along which the cylinder runs. The Starting Height is the offset from the Base Center along the Height Direction that the pattern will place the Object Center.
.The user interface for building cylindrical patterns.
image::../articles/images/build_pattern_fig06.png[]
+73
View File
@@ -0,0 +1,73 @@
= Using the build_region Command
Lee A Butler; Eric W Edwards; Dwayne L Kregel
:doctype: article
:toc:
:toclevels: 3
Just as the Build Pattern tool can help automate the process of building multiple occurrences of objects, the build_region command can help automate the process of creating regions. The command (which currently has no graphical user interface equivalent) uses meaning assigned by the user in the primitive name based on the intended use of the primitive.
The user includes the Boolean operation and relational information in the name of the primitive using a simple naming convention. The naming convention is designed around the following two assumptions:
* The same text "tag" is used for all primitives in a region.
* A sequential numbering pattern is used.
For example, let's say we want to build the four rounded corners of a "tub" region for a toy metal wagon assembly (see Figure F-1). We could choose something such as "wgn"--an abbreviated form of "wagon"--as the tag. This tag is short, easy to type, and representative of the final assembly name. Our primitives would therefore be of the form wgn.s#.
[[build_region5]]
.The rounded corners of a toy wagon.
image::../articles/images/build_region_fig01.png[]
Next, we create an arb8 for one long side of the wagon tub. It is named wgn.s1. After that, we create an rcc for one corner of the tub. It is named wgn.s2. To get a hollow quarter cylinder, we need to subtract a cylinder and intersect a bounding box (see Figure F-2). In order to relate the subtraction and intersecting primitives with wgn.s2, they will each share the same root name, wgn.s2. The subtraction primitive will be named wgn.s2-1, and the intersecting primitive will be named wgn.s2+1.
[[build_region7]]
.Arb8, cylinder, and two Boolean primitives.
image::../articles/images/build_region_fig02.png[]
Now we have created the following four primitives:
....
wgn.s1 wgn.s2 wgn.s2+1 wgn.s2-1
....
If we separate the primitives sequentially as follows,
....
wgn.s1
wgn.s2 wgn.s2+1 wgn.s2-1,
....
we can begin to see the Boolean structure falling out of the naming convention
....
u wgn.s1
u wgn.s2 + wgn.s2+1 - wgn.s2-1
....
If we wanted to make a second subtraction from wgn.s2--say, for a drain hole in the corner of the wagon--we would name that primitive wgn.s2-2, as shown in <<build_region9>>. We can break this name down as follows: the root name `wgn` identifies the region; `.s2` is the base solid the operation applies to; and the trailing `-2` marks this as the second subtraction from that solid (the first having been `wgn.s2-1`).
[[build_region9]]
.The region and the subtraction primitives.
image::../articles/images/build_region_fig03.png[]
Note that the root name stays the same so we can maintain the relationship, and the second number (associated with the Boolean operation) is incremented sequentially.
[[build_region11]]
.Raytraced image with hole.
image::../articles/images/build_region_fig04.png[]
Obviously, the overall success or failure of the build_region command depends on primitives being named properly. But if they are, the command can organize them in one automated step, creating complex regions in just a few keystrokes.
Another modeling benefit of the build_region tool is that it allows the user to quickly organize primitives. Assume, for example, that we have used the aforementioned naming convention to construct a complicated region. If there was a subsection of the region that we needed to, say, keep out for another assembly, delete from our database, move slightly, or copy, it would be a simple matter to create a new region with just those primitives that we needed.
+103
View File
@@ -0,0 +1,103 @@
= Camouflage shader
:doctype: article
:toc:
:toclevels: 3
[[Introduction]]
== Introduction
The "camo" shader creates a pseudo-random tri-color camouflage pattern on the object using a fractal noise pattern. This is a procedural shader based upon a fractal noise function known as fractional brownian motion or fBm.
The fractal noise function produces a pseudo- random number in the range [-1.0 ... 1.0] from the 3-space coordinates of a point in the bounding volume of the region. This noise value is used to determine the color of the object at the given location.
.Table 1
[cols="2*"]
|===
|Noise Value
|Object Color
|nv < thresh1
|color 1
|nv < thresh1 and nv < thresh2
|color 2
|nv > thresh2
|color 3
|===
The fractal pattern has infinite resolution. As a result, the borders of the color splashes never become pixelated, no mater how close the eyepoint is to the surface.
.Table 2
[cols="3*"]
|===
|parameter
|Abbreviation
|Default Value
3+|Noise Parameters
|lacunarity
|l
|2.1753974
|H
|H
|1.0
|octaves
|o
|4.0
|size
|s
|1.0
|vscale
|v
|1.0/1.0/1.0
|delta
|d
|1000/1000/1000
3+|*Shader Specific Parameters*
|thresh1
|t1
|-0.25
|thresh2
|t2
|0.25
|color1
|c1
|97/74/41
|color2
|c2
|26/77/10
|color3
|c3
|38/38/38
|===
*Lacunarity*
The grid on which the noise function is built is scaled by this value for each successive octave of noise which will be combined to produce the final result.
*Octaves*
The number of times the noise grid will be scaled and recombined to produce the final noise function
*Size, Vscale*
If *size* is set it is used as a scalar which defines the size of the noise grid on the object. So if t2=0.5 and size=5mm then splotches of color3 would tend to be no larger than 5-10mm. If non-uniform scaling is required, Vscale can specify the grid size in X, Y and Z.
*Delta*
This specifies a translation in noise space for the origin of region space. Since the origin of noise space is reflected 8 ways, it is undesirable to have that portion of noise space overlap with region space.
[[Limitations]]
== Limitations
Because of the continuous nature of the fractal noise space, it is impossible to get a splash of color1 directly adjacent to a splash of color3.
+57
View File
@@ -0,0 +1,57 @@
= Using the Extruded Bitmap Primitive
Lee A Butler; Eric W Edwards; Dwayne L Kregel
:doctype: article
:toc:
:toclevels: 3
The extruded bitmap (ebm) primitive allows the user to make a three-dimensional (3-D) shape from a two-dimensional black-and-white image. This feature can be helpful when dealing with complex outlines, text, or other complicated shapes captured as images.
For example, the ebm could be used if one wanted to model 3-D letters, such as in a company name, onto the side of a simulated wall or building. Note also that the same image used for the projection can, with some extra processing, form the basis for the ebm (see Figures C-1-C-3).
[[ebm3]]
.Example of the .bw image used for ebm.
image::../articles/images/ebm_primitive_fig01.png[]
[[ebm4]]
.Example of ebm.
image::../articles/images/ebm_primitive_fig02.png[]
[[ebm5]]
.Example of the ebm with projection shader added.
image::../articles/images/ebm_primitive_fig03.png[]
To make an ebm, the image file must be a black and white (.bw) file. A .bw image is a grayscale raw image file with only one channel. Each pixel can be turned on or off, but it has no color data. As shown in Figures C-2 and C-3, the white part of the image may be extruded in a straight line in the +Z direction to whatever length the user specifies. Regardless of the complexity of the geometry, all of the extruded shapes form a single ebm primitive.
To enter an ebm in a database, the in command must be used. The arguments are as shown in the following example:
[[ebm8]]
[cols="7*"]
[%noheader]
|===
|in
|sample.ebm
|ebm
|image.bw
|600
|800
|1
|Make a shape.
|Name it sample.
|Make it an ebm.
|Use the image.bw image file.
|The image is 600 pixels wide.
|The image is 800 pixels high.
|Extrude the shape 1 inch (or whatever working units are in effect at the time) in the +Z direction.
|===
[NOTE]
====
Points to Remember About the ebm
* The ebm cannot be created with the make, create, or inside commands.
* The desired width and height of the ebm are input as pixel values, but the extrusion distance can be expressed in any working units.
* Extrusions are made in the +Z direction, although after an ebm is made, the shape can be rotated, translated, or scaled.
* When extruded, all shapes form a single ebm primitive.
====
@@ -0,0 +1,108 @@
# gallery_manifest.cmake -- data table for the procedural geometry gallery.
#
# Pure-CMake data file consumed by generate_gallery.cmake. ALL per-demo
# knowledge lives here so the generator stays generic (no `mged tops` parsing,
# no platform branches).
#
# Each demo is one bracket-argument string in GALLERY_DEMO_<i>, with fields
# separated by '|'. Bracket args ([=[ ... ]=]) preserve embedded quotes,
# semicolons, and commas verbatim, so captions need no escaping. The caption
# is the LAST field; the generator takes everything after the 9th '|' as the
# caption (so semicolons in captions are safe).
#
# Fields (in order):
# name image basename -> gallery_<name>.png
# section group heading (drives .adoc sections, in first-seen order)
# driver exec | stdin:<inputfile> | tomged | mgedcmd:<cmd>
# exe target/binary basename (resolved via ensearch)
# args argument template; @OUT@ = chosen .g path, @IN:<file>@ = input data path
# gfile database to render: @OUT@ (the chosen .g) or @GLOB@ (lone *.g in workdir)
# objects space-separated render objects
# autoview space-separated objects for `-c "autoview ..."`, or empty
# render ao (default, adds -c "set ambSamples=64") | noao
# caption one-line description
set(GALLERY_DEMO_COUNT 61)
# ---- New demonstrations -----------------------------------------------------
set(GALLERY_DEMO_0 [=[terragen|New demonstrations|exec|terragen|@OUT@|@OUT@|all|terrain.r water.r|ao|Fractal DSP terrain island with reflective water and a cloud environment-map sky; rendered with the new rt autoview command framing terrain+water.]=])
set(GALLERY_DEMO_1 [=[voxelize|New demonstrations|exec|voxelize|@OUT@|@OUT@|all||ao|Demonstrates BRL-CAD's "vol" (3-D volume) and "ebm" (extruded bitmap) primitives by sampling a procedural 3-D scalar field (a triply-periodic gyroid by default) over a regular grid. It writes sidecar .vol/.ebm data files and builds an orange voxel isosurface (with a cutaway box) plus a blue extruded height-field companion.]=])
set(GALLERY_DEMO_2 [=[lattice|New demonstrations|exec|lattice|@OUT@|@OUT@|all||ao|A full geodesic-sphere space-frame built by instancing one unit strut prototype across every de-duplicated geodesic edge, with joint spheres.]=])
set(GALLERY_DEMO_3 [=[loftwing|New demonstrations|exec|loftwing|@OUT@|@OUT@|all||ao|A lofted NACA 4-digit airfoil wing (ARS) with taper, twist, sweep, and dihedral and a full root section.]=])
set(GALLERY_DEMO_4 [=[loftwing_prop|New demonstrations|exec|loftwing|@OUT@ --mode prop|@OUT@|all||ao|Propeller mode of loftwing: one strongly twisted NACA blade instanced around a central hub to form a 3-blade propeller.]=])
set(GALLERY_DEMO_5 [=[gears|New demonstrations|exec|gears|@OUT@|@OUT@|all|ground.r|ao|Builds a meshing involute spur-gear train, demonstrating the sketch->extrude procedural-modeling workflow in libwdb: each gear is one extruded involute tooth profile unioned in rotated copies around a hub with a central bore, laid left-to-right so the teeth interlock, plus a ground plane and a light under a top group "all".]=])
set(GALLERY_DEMO_6 [=[helicoil|New demonstrations|exec|helicoil|@OUT@|@OUT@|all|coil.r|ao|Procedurally builds helical pipe solids (spring, screw, or DNA double helix) swept along a helix centerline via mk_pipe(); the default "spring" mode renders a chrome coil spring on a ground plane with a light, assembled into a top-level group "all".]=])
set(GALLERY_DEMO_7 [=[specimen|New demonstrations|exec|specimen|@OUT@|@OUT@|all|ground.r|ao|Analytic-primitive specimen shelf (rpc, rhc, epa, ehy, hyp, eto, hrt, arbn, particle, tor, tgc, ell); rt autoview frames the shelf.]=])
set(GALLERY_DEMO_59 [=[seashell|New demonstrations|exec|seashell|@OUT@|@OUT@|all||ao|A shelf of procedurally grown seashells. Each shell is one watertight BoT solid: a superformula generating curve (the aperture cross-section) is swept along a logarithmic helico-spiral, with the coil radius, axial rise, and cross-section all scaling by the same exponential growth factor per whorl -- the self-similar "gnomonic" growth a real mollusk uses -- so successive whorls nest without intersecting. Four species (a planispiral nautilus, a rounded-pentagon-mouthed conch, a tall fluted turret/auger, and a round snail) come from one parametric model, each with analytically smoothed vertex normals and rounded, tapered ends.]=])
set(GALLERY_DEMO_60 [=[seashell_nautilus|New demonstrations|exec|seashell|@OUT@ --mode nautilus|@OUT@|all||ao|Single hero shell from the seashell generator: a pearly planispiral nautilus. The logarithmic-spiral sweep of a growing elliptical aperture reproduces the classic equiangular whorl, closed into a ray-traceable BoT solid with smooth shading.]=])
# ---- Fractals & recursion ---------------------------------------------------
set(GALLERY_DEMO_8 [=[sphflake|Fractals & recursion|exec|sphflake|-d 3 -f @OUT@|@OUT@|scene.r|depth0.r depth1.r depth2.r depth3.r|ao|Recursive mirror-sphere flake fractal; rendered with rt autoview framing the flake (depth0-3.r) over a checkered plane.]=])
set(GALLERY_DEMO_9 [=[donuts|Fractals & recursion|exec|donuts|-o @OUT@|@OUT@|scene.r|depth0.r depth1.r depth2.r depth3.r|ao|Recursive torus "donut flake" fractal; rendered with rt autoview framing the flake regions.]=])
set(GALLERY_DEMO_10 [=[menger|Fractals & recursion|exec|menger|-o @OUT@|@OUT@|menger|sponge.r|ao|A Menger sponge fractal carved from a cube with the recursive exterior (subtractive) pattern, on a ground plane with two lights.]=])
set(GALLERY_DEMO_11 [=[pyramid|Fractals & recursion|exec|pyramid|5|@GLOB@|tree||ao|Generates a recursive 3-D Sierpinski-style pyramid built from ARB4 tetrahedra, subdividing each pyramid into 4 smaller ones per level (inspired by Glassner's SigGraph paper).]=])
set(GALLERY_DEMO_12 [=[torii|Fractals & recursion|exec|torii|@OUT@|@OUT@|all||ao|An interwoven chain-mail weave of interlocking torii with a radial gradient of tube thickness (and color). Adjacent rings thread each other's holes without the solid tubes ever intersecting (verified 0 overlaps), so the whole sheet is a single, articulating, fully 3D-printable piece of mail.]=])
# ---- Architecture & structural ----------------------------------------------
set(GALLERY_DEMO_13 [=[masonry_frame|Architecture & structural|exec|masonry|-t frame -u ft -w 12,8 -o 3,0,5,7 -n wall|@GLOB@|r.wall.studs||ao|masonry wall generator, wood-frame wall type: studs, plates, and framing around a window opening.]=])
set(GALLERY_DEMO_14 [=[masonry_sheetrock|Architecture & structural|exec|masonry|-t sheetrock -u ft -w 12,8 -o 3,0,5,7 -n wall|@GLOB@|r.wall.sr1||ao|masonry wall generator, sheetrock wall type.]=])
set(GALLERY_DEMO_15 [=[masonry_brick|Architecture & structural|exec|masonry|-t brick -u in -w 96,48 -n wall|@GLOB@|r.wall.b||ao|masonry wall generator, brick wall type (prototype brick).]=])
set(GALLERY_DEMO_16 [=[masonry_bm|Architecture & structural|exec|masonry|-t bm -u in -w 96,48 -m 0.25 -n wall|@GLOB@|r.wall.b||ao|masonry wall generator, mortar-brick wall type: brick with horizontal and vertical mortar joints.]=])
set(GALLERY_DEMO_17 [=[brickwall|Architecture & structural|tomged|brickwall||@OUT@|g.brick||ao|Builds a brick wall: emits mged commands that create RPP brick solids arranged in rows (with optional mortar slabs between them) to fill a specified wall width and height. Output is a stream of mged commands on stdout, not a .g directly.]=])
set(GALLERY_DEMO_18 [=[mkbuilding|Architecture & structural|exec|mkbuilding|@OUT@|@OUT@|house||ao|Generates a physically dimensioned building with material-separated walls, slabs, framed openings, roof, and optional structural members; JSON, OSM, and CityJSON specifications can produce full building catalogs.]=])
set(GALLERY_DEMO_19 [=[cchannel|Architecture & structural|exec|cchannel|-f @OUT@ -H 0.2|@OUT@|channel.r||ao|Creates a section of fully configurable C-channel (structural metal beam). Default is a 1" diameter by 12" long section of American standard C-channel, here generated with a row of drilled holes.]=])
set(GALLERY_DEMO_20 [=[ringworld|Architecture & structural|exec|ringworld|-o @OUT@|@OUT@|all.g||ao|Generates a "ringworld" as imagined by Larry Niven: a central sun sphere and a large CSG ring (built from three RCCs) orbiting it, combined into a top-level group all.g.]=])
# ---- Organic, molecular & scenery -------------------------------------------
set(GALLERY_DEMO_21 [=[vegetation|Organic, molecular & scenery|exec|vegetation|@OUT@ 20 30000 300 0.1 42|@GLOB@|plant.r||ao|Procedurally generates plant-like geometry (trees/shrubbery) from particle primitives built recursively with random branching and growth parameters, including an optional repeatability seed.]=])
set(GALLERY_DEMO_22 [=[clutter|Organic, molecular & scenery|exec|clutter||@GLOB@|clut||ao|Generates procedural "clutter" made of primitive geometric objects: a grid of detail cells on a ground plane, each holding a random stack of spheres, crystals, or mixed primitives (boxes, cylinders, cones, ellipsoids), all enclosed by concentric torus rings and lit by four corner lights.]=])
set(GALLERY_DEMO_23 [=[metaball|Organic, molecular & scenery|exec|metaball|-o @OUT@|@OUT@|meatballs.r||ao|Programmatically creates and combines metaball ("blobby") primitives: it generates three sets of randomly-placed iso-method metaballs via libwdb, then reads them back and merges all their points into one combined "mega metaball" via librt.]=])
set(GALLERY_DEMO_24 [=[molecule|Organic, molecular & scenery|stdin:mol-cube.dat|molecule|Cube|@GLOB@|molecule||ao|Ball-and-stick molecule (spheres for atoms, cylinders for bonds) read from a G. Adams .dat file -- here a bonded cube of atoms with a central hub.]=])
set(GALLERY_DEMO_25 [=[pdb-g|Organic, molecular & scenery|exec|pdb-g|@IN:caffeine.pdb@ @OUT@|@OUT@|all_atoms.r||ao|Reads a Protein Data Bank (PDB) text file and converts each atom into a 1mm-radius sphere, grouping them into a single combination to produce a BRL-CAD geometry database of the molecule (caffeine).]=])
# ---- Mechanical & engineering -----------------------------------------------
set(GALLERY_DEMO_26 [=[pipe|Mechanical & engineering|stdin:pipe.stdin|pipe|-t demo @OUT@|@OUT@|demo.pipe demo.fluid||ao|Generates piping (fuel/hydraulic lines, etc.) in MGED format from a routed sequence of 3D points, building both tubing regions and inner fluid regions, with automatically generated elbow regions wherever the pipe changes direction.]=])
set(GALLERY_DEMO_27 [=[pipetest|Mechanical & engineering|exec|pipetest||@GLOB@|p1 p2 p3 pipe1||ao|Generates a test database of pipe and particle primitives: three particle solids (spherical, cylindrical, and conical) plus a multi-segment straight pipe and a bent pipe traced around a cube's faces.]=])
set(GALLERY_DEMO_28 [=[tube|Mechanical & engineering|stdin:tube.stdin|tube||@GLOB@|g0||ao|Generates a gun-tube (cannon barrel) as a procedural spline/cylinder whose core lies on the X axis, optionally deformed per-frame from projectile firing data. With no stdin data it emits the static frame-0 geometry from a built-in center-of-mass table.]=])
set(GALLERY_DEMO_29 [=[lens|Mechanical & engineering|exec|lens|@OUT@|@OUT@|lens_DCX_f600.0_d200.0.r||ao|Generates basic optical lenses (plano/double convex or concave) by using the lensmaker's equation to derive the geometry from inputs like type, diameter, focal length, refractive index, and thickness.]=])
# ---- NURBS, B-rep, splines & surfaces ---------------------------------------
set(GALLERY_DEMO_30 [=[brep_simple|NURBS, B-rep, splines & surfaces|exec|brep_simple||@GLOB@|cube.r||ao|Creates a single twisted-cube B-Rep solid directly via the openNURBS API (8 vertices, 12 edges, 6 faces) and writes it to a BRL-CAD database, demonstrating NURBS B-Rep construction.]=])
set(GALLERY_DEMO_31 [=[brep_cube|NURBS, B-rep, splines & surfaces|exec|brep_cube||@GLOB@|cube.r||ao|Creates a twisted-cube B-Rep solid (8 vertices, 12 edges, 6 faces) by directly using the openNURBS API, then writes it to a BRL-CAD database. Copied almost verbatim from the openNURBS example_brep.cpp to explore B-Rep creation.]=])
set(GALLERY_DEMO_32 [=[brep_cobb|NURBS, B-rep, splines & surfaces|exec|brep_cobb|@OUT@|@OUT@|cobb.r||ao|A Cobb NURBS unit sphere tiled with six rational Bezier patches.]=])
set(GALLERY_DEMO_33 [=[brep_surface|NURBS, B-rep, splines & surfaces|exec|brep_surface|-H 1.0|@GLOB@|brep_surface.r||ao|Creates a single plate-mode NURBS (B-Rep) surface with a given thickness, defined by four control points, and writes it as a region to a .g database.]=])
set(GALLERY_DEMO_34 [=[brep_trimmed|NURBS, B-rep, splines & surfaces|exec|brep_trimmed||@GLOB@|brep_trimmed.r||ao|Generates a single B-rep NURBS surface (a flat 10x10 square patch) with both an outer trimming loop and an interior rectangular trim/hole, demonstrating ON_Brep construction of trimmed surfaces.]=])
set(GALLERY_DEMO_35 [=[brep_invalid|NURBS, B-rep, splines & surfaces|exec|brep_invalid||@GLOB@|brep_invalid.r||ao|Creates a single trimmed NURBS B-rep surface (one face of a Cobb sphere) with a deliberately invalid inner trim loop, to test/demonstrate handling of invalid trim geometry.]=])
set(GALLERY_DEMO_36 [=[breplicator|NURBS, B-rep, splines & surfaces|exec|breplicator||@GLOB@|brep||ao|breplicator is a test tool for the BREP (boundary representation) primitive in librt; it builds a single closed 6-faced NURBS solid (an arb8-shaped box) via mk_brep() and writes it to a database.]=])
set(GALLERY_DEMO_37 [=[csgbrep|NURBS, B-rep, splines & surfaces|exec|csgbrep||@GLOB@|all.g||ao|A reference gallery of CSG/implicit primitives, each also converted to a brep, grouped under a single top object.]=])
set(GALLERY_DEMO_38 [=[surfaceintersect|NURBS, B-rep, splines & surfaces|exec|surfaceintersect|@OUT@|@OUT@|all||ao|Writes the two twisted-cube NURBS B-rep surfaces (red and blue). The experimental surface-surface intersection is behind a -x flag (off by default, as it currently crashes).]=])
set(GALLERY_DEMO_39 [=[spltest|NURBS, B-rep, splines & surfaces|exec|spltest|@OUT@|@OUT@|spltest||ao|A NURBS spline test: a valid order-2 B-spline surface built from a 3x3 control mesh with a gently lifted center.]=])
set(GALLERY_DEMO_40 [=[tea|NURBS, B-rep, splines & surfaces|exec|tea||@GLOB@|UtahTeapot||ao|Converts the Utah Teapot description from the IEEE CG&A database into BRL-CAD spline (NURBS) format, producing the classic closed-bottom teapot as a B-spline solid.]=])
set(GALLERY_DEMO_41 [=[wavy|NURBS, B-rep, splines & surfaces|exec|wavy||@GLOB@|wavy||ao|Creates a random wavy surface modeled as a B-spline (NURBS) surface, generating a 10x10 grid of points with randomized height and interpolating them into a spline solid.]=])
set(GALLERY_DEMO_42 [=[kurt|NURBS, B-rep, splines & surfaces|exec|kurt||@GLOB@|all||ao|Builds a surface from a multi-valued cubic function sampled over an 18x18 grid, triangulated into a BoT height-field sheet.]=])
set(GALLERY_DEMO_43 [=[sketch|NURBS, B-rep, splines & surfaces|exec|sketch||@GLOB@|all||noao|Builds a 2D sketch (line/arc/bezier segments) and extrudes it into a renderable solid via mk_extrusion.]=])
# ---- Primitives, BoT & API basics -------------------------------------------
set(GALLERY_DEMO_44 [=[wdb_example|Primitives, BoT & API basics|exec|wdb_example|@OUT@|@OUT@|box_n_ball.r||ao|Demonstrates creating a BRL-CAD geometry database from C code using the libwdb API: it writes a sphere (ball.s) and an rpp/box (box.s), then unions them into a green plastic region named box_n_ball.r.]=])
set(GALLERY_DEMO_45 [=[globe|Primitives, BoT & API basics|exec|globe|@OUT@|@OUT@|globe.r land.c||ao|Creates a set of concentric spherical "shells" (like an onion) that together form a unified solid sphere: a green solid land core surrounded by progressively transparent blue air layers.]=])
set(GALLERY_DEMO_46 [=[bottest|Primitives, BoT & API basics|exec|bottest|@OUT@|@OUT@|bot_u_surf bot_ccw_surf bot_cw_surf bot_u_solid bot_ccw_solid bot_cw_solid bot_u_plate bot_ccw_plate bot_cw_plate bot_solid_dup_vs bot_solid_dup_fs||ao|Generates a set of test BOT (Bag of Triangles) solids in a .g database, covering every BOT mode/orientation combination: surface, solid, and plate types in unoriented/CCW/CW orientations, plus BOTs with duplicate vertices and faces for fuse/condense testing.]=])
set(GALLERY_DEMO_47 [=[pix2g|Primitives, BoT & API basics|exec|pix2g|@IN:moss64.pix@ @OUT@ 64 64|@OUT@|image.c||ao|pix2g generates geometry from a pixmap (.pix) image: it creates one colored sphere per pixel arranged on a grid, where each sphere's color matches the corresponding pixel's RGB value, producing a 3D point-cloud rendition of the image.]=])
# ---- src/shapes -- parametric shape generators ------------------------------
set(GALLERY_DEMO_48 [=[bolt|src/shapes -- parametric shape generators|exec|bolt|-o3 -fbolt.g -n1 -hd30 -hh20 -wd45 -wh4 -sd14 -sh90|@GLOB@|bolta||ao|bolt is a BRL-CAD libwdb program that creates a bolt (in mm). It can build four types: a bolt head, head + washer, head + washer + stem, or head + stem. The head is a hex (two arb8 solids), the washer and stem are RCCs.]=])
set(GALLERY_DEMO_49 [=[coil|src/shapes -- parametric shape generators|mgedcmd:coil mycoil|coil||@OUT@|mycoil||ao|Coil Generator -- a program to create coils (helical springs) using the BRL-CAD pipe primitive.]=])
set(GALLERY_DEMO_50 [=[fence|src/shapes -- parametric shape generators|exec|fence|-o @OUT@ -L 2000 -N 1200 -j 400 -R 30 -r 5 -a 30 -c "70 90 110"|@OUT@|fence.r||ao|A chain-link fence generator. Every parameter (height, length, pole radius/spacing, wire radius, mesh twist angle, materials/colors) can be adjusted; it builds vertical RCC poles plus a woven zig-zag wire mesh between them.]=])
set(GALLERY_DEMO_51 [=[gastank|src/shapes -- parametric shape generators|exec|gastank|-fgastank.g -n1 -H800 -w1200 -d500 -r120|@GLOB@|tnka||ao|A solid gas tank with all edges and corners rounded, composed of 3 arb8s, 8 spheres, and 12 cylinders, centered at the origin (dimensions in mm). Introduced in BRL-CAD release 4.4.]=])
set(GALLERY_DEMO_52 [=[handle|src/shapes -- parametric shape generators|exec|handle|-fhandle.g -n1 -l200 -H120 -r130 -r215|@GLOB@|hana||ao|handle is a BRL-CAD libwdb sample program that constructs a handle (in millimeters) from three cylinders, two tori, and two arb8s, with its base centered at (0,0,0) and its height extending in the +Z direction. Introduced in BRL-CAD release 4.4.]=])
set(GALLERY_DEMO_53 [=[human|src/shapes -- parametric shape generators|exec|human|-A -n Body|@GLOB@|Body||ao|Generator for human models based on height (and other anthropometric parameters). It procedurally builds an articulated humanoid body assembled from primitives (head, neck, torso, arms with shoulder/elbow/wrist joints, hands, thighs/calves with knee joints, and feet), defaulting to a standing 50th-percentile man.]=])
set(GALLERY_DEMO_54 [=[picket_fence|src/shapes -- parametric shape generators|exec|picket_fence|@OUT@ fence_ 1000 30 0 0 0 3000 0 0 4500 2000 0|@OUT@|fence_sec0.c fence_sec1.c||ao|picket_fence builds a wooden picket fence: vertical pointed-top pickets (arb8 posts with wedge-cut tops) joined by two horizontal stringer rails, laid out along a sequence of x/y/z waypoints so the fence can follow a multi-segment path. Rendered as brown plastic pickets with two rails across two fence sections.]=])
set(GALLERY_DEMO_55 [=[tire|src/shapes -- parametric shape generators|mgedcmd:tire|tire||@OUT@|tire-215-55R17||ao|tire is BRL-CAD's Tire Generator, a program to create basic tire shapes (with an optional wheel). The rendered model is a default ISO 215/55R17 passenger tire mounted on a wheel hub.]=])
set(GALLERY_DEMO_56 [=[window|src/shapes -- parametric shape generators|exec|window|-fwindow.g -n1 -H1618 -w1000 -d100 -r80|@GLOB@|wina||ao|window constructs a window with all edges and corners rounded, composed of two arb8s and four cylinders, built using libwdb in millimeters. The front of the window is centered at the origin and extends in the negative X-direction by the window depth.]=])
set(GALLERY_DEMO_57 [=[window_frame|src/shapes -- parametric shape generators|exec|window_frame|-fwindow_frame.g -n1 -H1618 -w1000 -d100 -r80 -i120|@GLOB@|wfra||ao|window_frame constructs a window frame with all edges and corners rounded, composed of 4 arb8s and 8 cylinders (in millimeters). The front of the frame is centered at the origin and extends in the negative x-direction by its depth.]=])
set(GALLERY_DEMO_58 [=[wire|src/shapes -- parametric shape generators|stdin:wire.stdin|wire||@GLOB@|wires||ao|wire creates wiring or fuel lines from user-supplied endpoint coordinates and line radii. It builds a continuous tube as a chain of truncated cones (segments) joined by spheres at the vertices, grouped under a "wires" combination -- here a four-turn helix.]=])
# ---- Not rendered (documented in "Known limitations", no image) -------------
set(GALLERY_NR_COUNT 3)
set(GALLERY_NR_0 [=[nmgmodel|Intentionally non-manifold NMG exercising 3-, 2-, 1-, and 0-manifold features (a holed/voided block plus dangling faces, wires, and a lone vertex). It generates valid geometry, but the libnmg raytracer aborts on it (BU_ASSERT in isect.c), so it cannot be raytraced.]=])
set(GALLERY_NR_1 [=[tea_nmg|Utah teapot as a t-NURBS NMG (closed bottom). The vertex-fuse fix lets it write geometry, but rt aborts importing the t-NURBS NMG (NMG_CK_DISKMAGIC) -- a librt limitation with t-NURBS NMG, not a usage issue.]=])
set(GALLERY_NR_2 [=[gtimes|A ray-trace/database timing benchmark: it opens an existing .g repeatedly and prints timings for db_open, db_dirbuild, db_update_nref, tops, and db_close. It produces no geometry.]=])
@@ -0,0 +1,294 @@
# generate_gallery.cmake -- regenerate the procedural geometry gallery snapshot.
#
# Run via: cmake -DRT=... -DMGED=... -DBINDIR=... -DMANIFEST=... -DIMGDIR=...
# -DADOC=... -DINPUTDIR=... -DWORKDIR=... -DSIZE=512
# -DTITLE=... -P generate_gallery.cmake
#
# Drives every demo (manifest row) to produce a .g, ray traces it to a 512px
# PNG with rt, and emits the AsciiDoc article. Cross-platform: uses only
# cmake / execute_process / file / string -- no bash, cmd, python, or shell.
# Tool argv is passed directly (no shell), so quoting bugs are impossible.
cmake_minimum_required(VERSION 3.20)
# ---- required inputs --------------------------------------------------------
foreach(v RT MGED MANIFEST IMGDIR ADOC INPUTDIR WORKDIR)
if(NOT DEFINED ${v})
message(FATAL_ERROR "generate_gallery: -D${v}=... is required")
endif()
endforeach()
if(NOT DEFINED SIZE)
set(SIZE 512)
endif()
if(NOT DEFINED TITLE)
set(TITLE "BRL-CAD Procedural Geometry Gallery")
endif()
if(NOT DEFINED BINDIR)
get_filename_component(BINDIR "${RT}" DIRECTORY)
endif()
set(GEN_TIMEOUT 300) # seconds for a single geometry-generation step
set(RENDER_TIMEOUT 1800) # seconds for a single rt render
include("${MANIFEST}")
file(MAKE_DIRECTORY "${WORKDIR}")
file(MAKE_DIRECTORY "${IMGDIR}")
# ---- helpers ----------------------------------------------------------------
# Split a |-delimited record into D_name D_section D_driver D_exe D_args
# D_gfile D_objects D_autoview D_render D_caption. Caption (last field) is the
# verbatim remainder, so embedded semicolons/commas are preserved.
function(parse_demo rec)
set(remaining "${rec}")
foreach(fn name section driver exe args gfile objects autoview render)
string(FIND "${remaining}" "|" p)
if(p LESS 0)
set(D_${fn} "${remaining}" PARENT_SCOPE)
set(remaining "")
else()
string(SUBSTRING "${remaining}" 0 ${p} v)
set(D_${fn} "${v}" PARENT_SCOPE)
math(EXPR np "${p} + 1")
string(SUBSTRING "${remaining}" ${np} -1 remaining)
endif()
endforeach()
set(D_caption "${remaining}" PARENT_SCOPE)
endfunction()
# Locate a demo executable by basename in BINDIR (handles the .exe suffix).
function(resolve_exe name outvar)
foreach(cand "${name}" "${name}.exe")
if(EXISTS "${BINDIR}/${cand}")
set(${outvar} "${BINDIR}/${cand}" PARENT_SCOPE)
return()
endif()
endforeach()
set(${outvar} "" PARENT_SCOPE)
endfunction()
# Substitute @OUT@ and @IN:<file>@ tokens in a single argv element. @OUT@ is
# substituted as a RELATIVE filename (the demo runs with WORKING_DIRECTORY set
# to its work dir), so legacy generators with small fixed-size filename buffers
# do not truncate a long absolute path. @IN: paths stay absolute.
function(subst_tokens tok outrel outvar)
if(tok MATCHES "^@IN:(.+)@$")
set(${outvar} "${INPUTDIR}/${CMAKE_MATCH_1}" PARENT_SCOPE)
else()
string(REPLACE "@OUT@" "${outrel}" tok "${tok}")
set(${outvar} "${tok}" PARENT_SCOPE)
endif()
endfunction()
# ---- main loop --------------------------------------------------------------
set(SECTION_ORDER "") # ordered unique list of section names (no ';' in names)
set(N_OK 0)
set(N_FAIL 0)
set(FAILED "")
math(EXPR LAST "${GALLERY_DEMO_COUNT} - 1")
foreach(i RANGE 0 ${LAST})
parse_demo("${GALLERY_DEMO_${i}}")
set(wd "${WORKDIR}/${D_name}")
file(REMOVE_RECURSE "${wd}")
file(MAKE_DIRECTORY "${wd}")
set(out_rel "${D_name}.g") # relative name passed to demo args (@OUT@)
set(outg "${wd}/${out_rel}") # absolute path for gfile resolution / mged
resolve_exe("${D_exe}" exepath)
if(NOT exepath)
message(WARNING "[${D_name}] executable '${D_exe}' not found in ${BINDIR} -- skipping")
list(APPEND FAILED "${D_name} (no exe)")
math(EXPR N_FAIL "${N_FAIL} + 1")
continue()
endif()
# Build the resolved argv list (quotes respected, tokens substituted).
separate_arguments(rawargs UNIX_COMMAND "${D_args}")
set(finalargs "")
foreach(tok ${rawargs})
subst_tokens("${tok}" "${out_rel}" rtok)
list(APPEND finalargs "${rtok}")
endforeach()
# ---- run the generator step by driver -------------------------------------
set(rc 0)
set(genout "")
if(D_driver STREQUAL "exec")
execute_process(
COMMAND "${exepath}" ${finalargs}
WORKING_DIRECTORY "${wd}" TIMEOUT ${GEN_TIMEOUT}
RESULT_VARIABLE rc OUTPUT_VARIABLE genout ERROR_VARIABLE genout)
elseif(D_driver MATCHES "^stdin:(.+)$")
set(infile "${INPUTDIR}/${CMAKE_MATCH_1}")
execute_process(
COMMAND "${exepath}" ${finalargs}
WORKING_DIRECTORY "${wd}" TIMEOUT ${GEN_TIMEOUT}
INPUT_FILE "${infile}"
RESULT_VARIABLE rc OUTPUT_VARIABLE genout ERROR_VARIABLE genout)
elseif(D_driver STREQUAL "tomged")
# capture exe stdout (mged command stream), then pipe into mged
execute_process(
COMMAND "${exepath}" ${finalargs}
WORKING_DIRECTORY "${wd}" TIMEOUT ${GEN_TIMEOUT}
OUTPUT_FILE "${wd}/cmds.mged" ERROR_VARIABLE genout RESULT_VARIABLE rc)
if(rc EQUAL 0)
execute_process(
COMMAND "${MGED}" -c "${outg}"
WORKING_DIRECTORY "${wd}" TIMEOUT ${GEN_TIMEOUT}
INPUT_FILE "${wd}/cmds.mged" OUTPUT_VARIABLE genout ERROR_VARIABLE genout
RESULT_VARIABLE rc)
endif()
elseif(D_driver MATCHES "^mgedcmd:(.+)$")
set(gedcmd "${CMAKE_MATCH_1}")
file(WRITE "${wd}/cmds.mged" "${gedcmd}\nq\n")
execute_process(
COMMAND "${MGED}" -c "${outg}"
WORKING_DIRECTORY "${wd}" TIMEOUT ${GEN_TIMEOUT}
INPUT_FILE "${wd}/cmds.mged" OUTPUT_VARIABLE genout ERROR_VARIABLE genout
RESULT_VARIABLE rc)
else()
message(WARNING "[${D_name}] unknown driver '${D_driver}' -- skipping")
list(APPEND FAILED "${D_name} (bad driver)")
math(EXPR N_FAIL "${N_FAIL} + 1")
continue()
endif()
# ---- resolve the database to render ---------------------------------------
if(D_gfile STREQUAL "@OUT@")
set(gpath "${outg}")
elseif(D_gfile STREQUAL "@GLOB@")
file(GLOB gg "${wd}/*.g")
list(LENGTH gg ng)
if(ng EQUAL 0)
set(gpath "")
else()
list(GET gg 0 gpath)
if(ng GREATER 1)
message(WARNING "[${D_name}] ${ng} .g files in workdir; using ${gpath}")
endif()
endif()
else()
set(gpath "${wd}/${D_gfile}")
endif()
if(NOT gpath OR NOT EXISTS "${gpath}")
message(WARNING "[${D_name}] generation failed (rc=${rc}, no .g). Output:\n${genout}")
list(APPEND FAILED "${D_name} (no .g)")
math(EXPR N_FAIL "${N_FAIL} + 1")
continue()
endif()
# ---- render with rt -------------------------------------------------------
set(imgpath "${IMGDIR}/gallery_${D_name}.png")
file(REMOVE "${imgpath}") # rt refuses to overwrite an existing -o target
set(rtcmd "${RT}" "-s${SIZE}")
if(NOT D_render STREQUAL "noao")
list(APPEND rtcmd -c "set ambSamples=64")
endif()
if(NOT D_autoview STREQUAL "")
list(APPEND rtcmd -c "autoview ${D_autoview}")
endif()
list(APPEND rtcmd -A1 -o "${imgpath}" "${gpath}")
separate_arguments(objlist UNIX_COMMAND "${D_objects}")
foreach(o ${objlist})
list(APPEND rtcmd "${o}")
endforeach()
execute_process(
COMMAND ${rtcmd}
WORKING_DIRECTORY "${wd}" TIMEOUT ${RENDER_TIMEOUT}
RESULT_VARIABLE rc OUTPUT_VARIABLE rtout ERROR_VARIABLE rtout)
set(ok FALSE)
if(EXISTS "${imgpath}")
file(SIZE "${imgpath}" isz)
if(isz GREATER 3000)
set(ok TRUE)
endif()
endif()
if(ok)
message(STATUS "[${D_name}] rendered ${imgpath} (${isz} bytes)")
math(EXPR N_OK "${N_OK} + 1")
else()
message(WARNING "[${D_name}] rt render failed (rc=${rc}). Output:\n${rtout}")
list(APPEND FAILED "${D_name} (render)")
math(EXPR N_FAIL "${N_FAIL} + 1")
endif()
# ---- stash result for adoc emission ---------------------------------------
set(R_${i}_name "${D_name}")
set(R_${i}_section "${D_section}")
set(R_${i}_caption "${D_caption}")
set(R_${i}_ok "${ok}")
if(NOT D_section IN_LIST SECTION_ORDER)
list(APPEND SECTION_ORDER "${D_section}")
endif()
endforeach()
# ---- emit the AsciiDoc article ---------------------------------------------
set(AO_LINE "rt -s${SIZE} -c \"set ambSamples=64\" [-c \"autoview <objs>\"] -A1 -o <name>.png <db>.g <objects>")
set(adoc "= ${TITLE}\n")
string(APPEND adoc ":doctype: article\n")
string(APPEND adoc ":toc:\n")
string(APPEND adoc ":toclevels: 2\n")
string(APPEND adoc "\n")
string(APPEND adoc "This gallery shows the procedural-geometry demonstration programs in BRL-CAD's\n")
string(APPEND adoc "`src/proc-db` and `src/shapes` directories. Each model is built from source by its\n")
string(APPEND adoc "generator program and then ray traced with `rt` -- no hand modeling. The renders are\n")
string(APPEND adoc "auto-framed and auto-lit by the ray tracer using ambient occlusion:\n")
string(APPEND adoc "\n----\n${AO_LINE}\n----\n")
string(APPEND adoc "\n")
string(APPEND adoc "Some renders use the `rt -c \"autoview <objs>\"` command to frame a sub-scene (for\n")
string(APPEND adoc "example, to exclude a distant light source from the view).\n")
string(APPEND adoc "\n")
string(APPEND adoc "NOTE: This article and its images are a committed snapshot. Developers can regenerate\n")
string(APPEND adoc "them from the built tools by configuring with `-DBRLCAD_GENERATE_GALLERY=ON` and\n")
string(APPEND adoc "building the `procedural-gallery-snapshot` target.\n")
foreach(sec ${SECTION_ORDER})
string(APPEND adoc "\n== ${sec}\n\n")
string(APPEND adoc "[cols=\"1,3\"]\n[%noheader]\n|===\n")
foreach(i RANGE 0 ${LAST})
if(DEFINED R_${i}_ok AND R_${i}_ok AND R_${i}_section STREQUAL sec)
set(nm "${R_${i}_name}")
string(APPEND adoc "|image:images/gallery_${nm}.png[${nm},${SIZE}]\n")
string(APPEND adoc "|*${nm}*: ${R_${i}_caption}\n")
endif()
endforeach()
string(APPEND adoc "|===\n")
endforeach()
# Known limitations
if(DEFINED GALLERY_NR_COUNT AND GALLERY_NR_COUNT GREATER 0)
string(APPEND adoc "\n== Known limitations\n\n")
string(APPEND adoc "A few programs are part of the source tree but are not shown above, because the\n")
string(APPEND adoc "geometry they produce cannot be ray traced in the current tree:\n\n")
math(EXPR NRLAST "${GALLERY_NR_COUNT} - 1")
foreach(j RANGE 0 ${NRLAST})
set(rec "${GALLERY_NR_${j}}")
string(FIND "${rec}" "|" p)
string(SUBSTRING "${rec}" 0 ${p} nrname)
math(EXPR np "${p} + 1")
string(SUBSTRING "${rec}" ${np} -1 nrreason)
string(APPEND adoc "* *${nrname}* -- ${nrreason}\n")
endforeach()
endif()
file(WRITE "${ADOC}" "${adoc}")
# ---- summary ----------------------------------------------------------------
message(STATUS "")
message(STATUS "Gallery snapshot: ${N_OK} rendered, ${N_FAIL} failed/skipped.")
if(FAILED)
string(REPLACE ";" ", " failstr "${FAILED}")
message(STATUS "Failed/skipped: ${failstr}")
endif()
message(STATUS "Article written: ${ADOC}")
@@ -0,0 +1,26 @@
HEADER CAFFEINE (1,3,7-TRIMETHYLXANTHINE) FORMULA C8H10N4O2
HETATM 1 N1 CAF A 1 -1.250 1.250 0.000 1.00 0.00 N
HETATM 2 C2 CAF A 1 0.000 1.500 0.000 1.00 0.00 C
HETATM 3 O2 CAF A 1 1.200 1.300 0.000 1.00 0.00 O
HETATM 4 N3 CAF A 1 1.500 0.000 0.000 1.00 0.00 N
HETATM 5 C4 CAF A 1 1.000 -1.000 0.000 1.00 0.00 C
HETATM 6 C5 CAF A 1 0.000 -1.500 0.000 1.00 0.00 C
HETATM 7 C6 CAF A 1 -1.000 -1.000 0.000 1.00 0.00 C
HETATM 8 O6 CAF A 1 -1.800 -2.000 0.000 1.00 0.00 O
HETATM 9 N7 CAF A 1 -1.500 0.000 0.000 1.00 0.00 N
HETATM 10 C8 CAF A 1 -2.300 1.000 0.000 1.00 0.00 C
HETATM 11 H8 CAF A 1 -3.000 1.200 0.000 1.00 0.00 H
HETATM 12 N9 CAF A 1 -2.900 2.100 0.000 1.00 0.00 N
HETATM 13 CM1 CAF A 1 -1.800 2.200 0.000 1.00 0.00 C
HETATM 14 HM1A CAF A 1 -1.000 2.500 0.000 1.00 0.00 H
HETATM 15 HM1B CAF A 1 -2.400 2.900 0.000 1.00 0.00 H
HETATM 16 HM1C CAF A 1 -2.200 1.300 0.000 1.00 0.00 H
HETATM 17 CM3 CAF A 1 2.200 0.500 0.000 1.00 0.00 C
HETATM 18 HM3A CAF A 1 2.700 1.200 0.000 1.00 0.00 H
HETATM 19 HM3B CAF A 1 2.800 -0.200 0.000 1.00 0.00 H
HETATM 20 HM3C CAF A 1 1.900 0.800 0.000 1.00 0.00 H
HETATM 21 CM7 CAF A 1 -2.300 -0.500 0.000 1.00 0.00 C
HETATM 22 HM7A CAF A 1 -3.200 -0.700 0.000 1.00 0.00 H
HETATM 23 HM7B CAF A 1 -1.800 -1.300 0.000 1.00 0.00 H
HETATM 24 HM7C CAF A 1 -2.800 0.100 0.000 1.00 0.00 H
END
@@ -0,0 +1,32 @@
0 0 Carbon 40 40 40
0 1 Center 230 60 60
1 0 -4.0 -4.0 -4.0 1.2 0
1 1 4.0 -4.0 -4.0 1.2 0
1 2 4.0 4.0 -4.0 1.2 0
1 3 -4.0 4.0 -4.0 1.2 0
1 4 -4.0 -4.0 4.0 1.2 0
1 5 4.0 -4.0 4.0 1.2 0
1 6 4.0 4.0 4.0 1.2 0
1 7 -4.0 4.0 4.0 1.2 0
1 8 0.0 0.0 0.0 1.8 1
2 0 1
2 1 2
2 2 3
2 3 0
2 4 5
2 5 6
2 6 7
2 7 4
2 0 4
2 1 5
2 2 6
2 3 7
2 8 0
2 8 1
2 8 2
2 8 3
2 8 4
2 8 5
2 8 6
2 8 7
3
Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

@@ -0,0 +1,8 @@
mm
50 5
0 0 0
300 0 0
300 300 0
300 300 300
0 300 300
0 300 600
@@ -0,0 +1,204 @@
wire.g
101
300.0000 0.0000 0.0000
25.0000
290.5749 74.6070 15.0000
25.0000
262.8920 144.5261 30.0000
25.0000
218.6906 205.3641 45.0000
25.0000
160.7480 253.2984 60.0000
25.0000
92.7051 285.3170 75.0000
25.0000
18.8372 299.4080 90.0000
25.0000
-56.2144 294.6862 105.0000
25.0000
-127.7338 271.4481 120.0000
25.0000
-191.2272 231.1540 135.0000
25.0000
-242.7051 176.3356 150.0000
25.0000
-278.9329 110.4374 165.0000
25.0000
-297.6344 37.6000 180.0000
25.0000
-297.6344 -37.6000 195.0000
25.0000
-278.9329 -110.4374 210.0000
25.0000
-242.7051 -176.3356 225.0000
25.0000
-191.2272 -231.1540 240.0000
25.0000
-127.7338 -271.4481 255.0000
25.0000
-56.2144 -294.6862 270.0000
25.0000
18.8372 -299.4080 285.0000
25.0000
92.7051 -285.3170 300.0000
25.0000
160.7480 -253.2984 315.0000
25.0000
218.6906 -205.3641 330.0000
25.0000
262.8920 -144.5261 345.0000
25.0000
290.5749 -74.6070 360.0000
25.0000
300.0000 -0.0000 375.0000
25.0000
290.5749 74.6070 390.0000
25.0000
262.8920 144.5261 405.0000
25.0000
218.6906 205.3641 420.0000
25.0000
160.7480 253.2984 435.0000
25.0000
92.7051 285.3170 450.0000
25.0000
18.8372 299.4080 465.0000
25.0000
-56.2144 294.6862 480.0000
25.0000
-127.7338 271.4481 495.0000
25.0000
-191.2272 231.1540 510.0000
25.0000
-242.7051 176.3356 525.0000
25.0000
-278.9329 110.4374 540.0000
25.0000
-297.6344 37.6000 555.0000
25.0000
-297.6344 -37.6000 570.0000
25.0000
-278.9329 -110.4374 585.0000
25.0000
-242.7051 -176.3356 600.0000
25.0000
-191.2272 -231.1540 615.0000
25.0000
-127.7338 -271.4481 630.0000
25.0000
-56.2144 -294.6862 645.0000
25.0000
18.8372 -299.4080 660.0000
25.0000
92.7051 -285.3170 675.0000
25.0000
160.7480 -253.2984 690.0000
25.0000
218.6906 -205.3641 705.0000
25.0000
262.8920 -144.5261 720.0000
25.0000
290.5749 -74.6070 735.0000
25.0000
300.0000 -0.0000 750.0000
25.0000
290.5749 74.6070 765.0000
25.0000
262.8920 144.5261 780.0000
25.0000
218.6906 205.3641 795.0000
25.0000
160.7480 253.2984 810.0000
25.0000
92.7051 285.3170 825.0000
25.0000
18.8372 299.4080 840.0000
25.0000
-56.2144 294.6862 855.0000
25.0000
-127.7338 271.4481 870.0000
25.0000
-191.2272 231.1540 885.0000
25.0000
-242.7051 176.3356 900.0000
25.0000
-278.9329 110.4374 915.0000
25.0000
-297.6344 37.6000 930.0000
25.0000
-297.6344 -37.6000 945.0000
25.0000
-278.9329 -110.4374 960.0000
25.0000
-242.7051 -176.3356 975.0000
25.0000
-191.2272 -231.1540 990.0000
25.0000
-127.7338 -271.4481 1005.0000
25.0000
-56.2144 -294.6862 1020.0000
25.0000
18.8372 -299.4080 1035.0000
25.0000
92.7051 -285.3170 1050.0000
25.0000
160.7480 -253.2984 1065.0000
25.0000
218.6906 -205.3641 1080.0000
25.0000
262.8920 -144.5261 1095.0000
25.0000
290.5749 -74.6070 1110.0000
25.0000
300.0000 -0.0000 1125.0000
25.0000
290.5749 74.6070 1140.0000
25.0000
262.8920 144.5261 1155.0000
25.0000
218.6906 205.3641 1170.0000
25.0000
160.7480 253.2984 1185.0000
25.0000
92.7051 285.3170 1200.0000
25.0000
18.8372 299.4080 1215.0000
25.0000
-56.2144 294.6862 1230.0000
25.0000
-127.7338 271.4481 1245.0000
25.0000
-191.2272 231.1540 1260.0000
25.0000
-242.7051 176.3356 1275.0000
25.0000
-278.9329 110.4374 1290.0000
25.0000
-297.6344 37.6000 1305.0000
25.0000
-297.6344 -37.6000 1320.0000
25.0000
-278.9329 -110.4374 1335.0000
25.0000
-242.7051 -176.3356 1350.0000
25.0000
-191.2272 -231.1540 1365.0000
25.0000
-127.7338 -271.4481 1380.0000
25.0000
-56.2144 -294.6862 1395.0000
25.0000
18.8372 -299.4080 1410.0000
25.0000
92.7051 -285.3170 1425.0000
25.0000
160.7480 -253.2984 1440.0000
25.0000
218.6906 -205.3641 1455.0000
25.0000
262.8920 -144.5261 1470.0000
25.0000
290.5749 -74.6070 1485.0000
25.0000
300.0000 -0.0000 1500.0000
25.0000
+880
View File
@@ -0,0 +1,880 @@
= The Geometry Conversion Library
Jon Engbert
:doctype: article
:toc:
:toclevels: 3
== Introduction
The Geometry Conversion Library (GCV or libgcv) provides a unified API for geometry conversion capabilities under a plugin-based architecture.
The GCV public API is declared in C headers located within `include/gcv/`. The single `include/gcv.h` header includes the entire GCV public API.
== Architecture
The Geometry Conversion Library consists of a stream-based API for geometry conversion and associated operations. Input and output are provided by "reader" and "writer" converters (provided by plugins). Intermediate operations are provided by "filters". Readers and writers are types of filters that provide input and output support for model formats, while basic filters apply transformations to models and geometry.
Geometry is stored in an in-memory BRL-CAD database (`struct db_i` in `include/rt/db_instance.h`) during the intermediate steps of conversion. For writer filters, this database is marked read-only and its geometry should not be modified. All names within a BRL-CAD database must be unique.
.GCV architecture
image::../articles/images/gcv_architecture.png[]
== Building GCV
GCV can be built in a similar manner as other BRL-CAD libraries. After configuring with CMake, building the `libgcv` target will produce a dynamic library. For Unix-based systems, the procedure should be similar to the following:
....
$ cd brlcad
$ mkdir build
$ cd build
$ cmake ..
$ make libgcv
....
Plugins can be built under `gcv_ _plugin_name_` targets, or collectively under the `gcv_plugins` target.
The command-line utility can be built under the `gcv` target. At this time, the `gcv` program is not installed automatically; the binary will be placed into `build/src/conv/gcv/`.
== Example: Using GCV in an application
The following code illustrates a basic use of GCV from within an application. Note that there may be multiple filters providing import/export capabilities for a given format; the below code simply selects the first matching filter encountered.
.gcv_app.c
[example]
====
[source,c]
----
#include "common.h"
#include "bu/log.h"
#include "bu/mime.h"
#include "gcv.h"
/* Convert the file at 'in_path' to the file at 'out_path', selecting the
* first registered reader and writer filter that match the file types
* inferred from the two path extensions. Returns 0 on success. */
int
convert(const char *in_path, const char *out_path)
{
struct gcv_context context;
const struct gcv_filter *in_filter, *out_filter;
bu_mime_model_t in_type, out_type;
/* Infer the model file types from the filename extensions. */
in_type = (bu_mime_model_t)bu_file_mime(in_path, BU_MIME_MODEL);
out_type = (bu_mime_model_t)bu_file_mime(out_path, BU_MIME_MODEL);
/* A context holds the conversion state, including an in-memory
* database used for the intermediate representation. */
gcv_context_init(&context);
/* Look up a reader for the input type and a writer for the output
* type. find_filter() returns the first matching registered filter,
* or NULL if none is available. */
in_filter = find_filter(GCV_FILTER_READ, in_type, in_path, &context);
out_filter = find_filter(GCV_FILTER_WRITE, out_type, NULL, &context);
if (!in_filter || !out_filter) {
bu_log("No filter available for the requested conversion\n");
gcv_context_destroy(&context);
return 1;
}
/* Read the input into the context's in-memory database. Passing NULL
* for the options selects the defaults from gcv_opts_default(). The
* argc/argv pair would carry any filter-specific option strings.
* gcv_execute() returns 1 on success and 0 on failure. */
if (!gcv_execute(&context, in_filter, NULL, 0, NULL, in_path)) {
bu_log("Read filter '%s' failed for '%s'\n", in_filter->name, in_path);
gcv_context_destroy(&context);
return 1;
}
/* Write the in-memory database out through the selected writer. */
if (!gcv_execute(&context, out_filter, NULL, 0, NULL, out_path)) {
bu_log("Write filter '%s' failed for '%s'\n", out_filter->name, out_path);
gcv_context_destroy(&context);
return 1;
}
gcv_context_destroy(&context);
return 0;
}
----
====
== GCV Public API
The public API for interacting with GCV filter plugins is summarized below.
.GCV public filter API
[cols="2*"]
[%noheader]
|===
|`struct gcv_context`
|Stores the conversion state. Plugins may store messages in the `bu_avs_t` member `messages`.
|`gcv_context_init()`
|Initialize a `struct gcv_context`. Creates an in-memory `struct db_i` for conversion data.
|`gcv_context_destroy()`
|Frees memory associated with a `struct gcv_context`.
|`struct gcv_filter`
|Stores characteristics of a filter.
|`struct gcv_opts`
|Store generic options applying to all filters.
|`gcv_opts_default()`
|Initialize a `struct gcv_opts` with default values.
|`gcv_list_filters()`
|Returns a pointer to a `const struct bu_ptbl` containing all registered filters as `const struct gcv_filter` pointers.
|`gcv_execute()`
|Perform a filter operation on a `struct gcv_context`. Returns `1` on success and `0` on failure. If `gcv_options` is `NULL`, the defaults will be used as set by `gcv_opts_default()`. The parameters `argc` and `argv` are used for option parsing as specified by the struct gcv_filter.
|===
== The Internal Plugin API
The GCV plugin API is declared in `include/gcv/api.h`. Plugins provide an externally-visible `const struct gcv_plugin` defining their filters, which are described by `struct gcv_filter`.
.The gcv_filter struct
[cols="2*"]
[%noheader]
|===
|`name`
|Specifies a unique name for the filter, allowing it to be identified by application code.
|`filter_type`
|Specifies the type of filter.
|`create_opts_fn`
|Optional pointer to a function that allocates and initializes `struct bu_opt_desc` data and an opaque pointer for storing the option data. If non-`NULL`, `free_opts_fn` must also be specified. This member is private for use by libgcv and the associated plugin.
|`free_opts_fn`
|Optional pointer to a function that frees any opaque pointer allocated by `create_opts_fn`. This member is private for use by libgcv and the associated plugin.
|`filter_fn`
|Pointer to a function which performs the filter operation. The `db_i` passed to a writer function within a `gcv_context` is marked read-only (the pointer is to a non-`const` struct due to in-memory data that may be modified). Filters of type `GCV_FILTER_FILTER` receive a `NULL` value for `target`. Must return `1` on success and `0` on failure. This member is private for use by libgcv and the associated plugin.
|===
As shown in the above table, filters may initialize data structures for processing command-line style option strings via `bu_opt`. Please refer to `include/bu/opt.h` for full documentation on the `bu_opt` API.
=== Utility Functions
In addition to availability of the rest of the BRL-CAD API, the Geometry Conversion Library provides a number of utility functions that may be useful during plugin development.
.GCV utility functions
[cols="2*"]
[%noheader]
|===
|`gcv_bot_is_solid()`, `gcv_bot_is_closed()`, `gcv_bot_is_orientable()`
|Performs topological tests for determining whether a given triangular mesh is a manifold, orientable, closed fan satisfying requisite conditions for object solidity. `gcv_bot_is_solid()` is equivalent to `gcv_bot_is_closed && gcv_bot_is_orientable()`
|`gcv_facetize()`
|Produces a triangular mesh tessellation of the object at the given database path using the specified tolerances. Note that if the object at the given path is a combination, a single mesh will be produced from all objects within its tree, and so calling gcv_facetize() on a tree unnecessarily high in the hierarchy and containing many objects is more likely to fail during Boolean evaluation.
|===
There are also many relevant functions provided by the BRL-CAD API, including a new mesh decimation function.
.BRL-CAD mesh decimation API
[cols="2*"]
[%noheader]
|===
|`rt_bot_decimate_gct()`
|Fast implementation of an iterative mesh decimation algorithm.
|===
== Developing a Minimal Plugin
=== Basic Code
The following steps will implement a minimal plugin providing a reader filter.
. Add the following line to `misc/mime_cad.types`. This file is used to generate `include/bu/mime.h`:
+
----
model/foo bar
----
+
This will associate the file extension `.bar` with a new `BU_MIME_MODEL_FOO` value of `bu_mime_model_t`.
. Create the following file at `src/libgcv/plugins/foo/CMakeLists.txt`:
+
.CMakeLists.txt
[example]
====
----
LIBGCV_ADD_PLUGIN(foo "foo_read.c" "librt;libbu")
----
====
. Create the following file at `src/libgcv/plugins/foo/foo_read.c`:
+
.foo_read.c
[example]
====
[source,c]
----
#include "common.h"
#include "bu/log.h"
#include "bu/mime.h"
#include "gcv/api.h"
#include "wdb.h"
/* The reader callback. For a GCV_FILTER_READ filter, 'target' is the
* path of the input file, and geometry should be written into the
* in-memory database reachable through context->dbip. Return 1 on
* success and 0 on failure. */
static int
foo_read(struct gcv_context *context, const struct gcv_opts *gcv_options,
const void *UNUSED(options_data), const char *target)
{
struct rt_wdb *wdbp;
if (gcv_options->verbosity_level)
bu_log("Reading foo file: %s\n", target);
/* Open the context's in-memory database for writing. */
wdbp = wdb_dbopen(context->dbip, RT_WDB_TYPE_DB_INMEM);
mk_id_units(wdbp, "Converted from foo format", "mm");
/* ... parse 'target' and create objects with the wdb (mk_*) API,
* e.g. mk_sph(), mk_bot(), mk_lcomb() ... */
return 1;
}
/* Describe the filter: a unique name, its type, the model type it
* handles, and the callbacks. This reader defines no filter-specific
* options, so the create/free option hooks and data_supported are NULL. */
static const struct gcv_filter gcv_conv_foo_read = {
"FOO Reader", GCV_FILTER_READ, BU_MIME_MODEL_FOO, NULL,
NULL, NULL, foo_read
};
/* A plugin exports a NULL-terminated array of its filters ... */
static const struct gcv_filter * const filters[] = {&gcv_conv_foo_read, NULL};
/* ... referenced by a struct gcv_plugin ... */
static const struct gcv_plugin gcv_plugin_info_s = { filters };
/* ... which libgcv discovers by dlsym()-ing this exported entry point. */
COMPILER_DLLEXPORT const struct gcv_plugin *
gcv_plugin_info(void) { return &gcv_plugin_info_s; }
----
====
=== Traversing the Database
BRL-CAD provides the `db_walk_tree()` function for traversing the database in hierarchical order. You can specify your own visitor callbacks as documented in `include/rt/tree.h`, or use the region-end functions provided by GCV (`include/gcv/util.h`) to tessellate geometry at the region level.
.GCV region-end tessellation callbacks
[cols="2*"]
[%noheader]
|===
|`gcv_region_end()`
|Apply Boolean evaluation to region-level tessellated meshes using the default NMG Boolean evaluator, replacing each region-level node and its subtree of tessellated leaf meshes with a single BoT structure that is then passed to the specified callback. The `client_data` pointer should point to a `struct gcv_region_end_data`. The individual leaf nodes must already be tessellated into BoTs. This can be done by specifying a `leaf_func` such as `rt_booltree_leaf_tess()`. In the case of failure, an error message is emitted via `bu_log()` and the callback is not invoked. Any use of `bu_bomb()` produced by the callback is trapped and an error message is displayed while continuing the tree walk.
|`gcv_bottess_region_end()`
|Boolean evaluator roughly based on UnBBoolean's j3dbool (and associated papers). Does not take a callback.
|`gcv_region_end_mc()`
|Experimental variant of `gcv_region_end()` based on the marching-cubes algorithm. Tessellates leaves internally and does not require a `leaf_func`.
|===
The following example implements a filter that tessellates all geometry into BoT mesh objects and counts the total number of faces.
.tessellation_statistics.c
[example]
====
[source,c]
----
#include "common.h"
#include "bu/log.h"
#include "bu/mime.h"
#include "nmg.h"
#include "rt/geom.h"
#include "raytrace.h"
#include "gcv/api.h"
#include "gcv/util.h"
/* State shared with the region-end callback. */
struct tess_stats {
size_t face_count;
};
/* Invoked once per region by gcv_region_end() after the region's leaf
* meshes have been Boolean-evaluated into a single NMG region 'r'. Here
* we simply tally the outward-facing (OT_SAME) faces. This routine must
* be prepared to run in parallel. */
static void
count_region_faces(struct nmgregion *r, const struct db_full_path *UNUSED(pathp),
struct db_tree_state *UNUSED(tsp), void *client_data)
{
struct tess_stats *stats = (struct tess_stats *)client_data;
struct shell *s;
NMG_CK_REGION(r);
for (BU_LIST_FOR(s, shell, &r->s_hd)) {
struct faceuse *fu;
for (BU_LIST_FOR(fu, faceuse, &s->fu_hd)) {
if (fu->orientation != OT_SAME)
continue;
bu_semaphore_acquire(BU_SEM_GENERAL);
stats->face_count++;
bu_semaphore_release(BU_SEM_GENERAL);
}
}
}
/* A GCV_FILTER_FILTER receives a NULL target and operates on the geometry
* already present in context->dbip. Return 1 on success, 0 on failure. */
static int
tessellation_statistics(struct gcv_context *context, const struct gcv_opts *gcv_options,
const void *UNUSED(options_data), const char *UNUSED(target))
{
struct tess_stats stats = {0};
struct gcv_region_end_data end_data;
struct db_tree_state tree_state;
struct model *the_model = nmg_mm();
/* Configure the tree-walk state: tolerances come from the conversion
* options, and ts_m provides the NMG model used during tessellation. */
RT_DBTS_INIT(&tree_state);
tree_state.ts_tol = &gcv_options->calculational_tolerance;
tree_state.ts_ttol = &gcv_options->tessellation_tolerance;
tree_state.ts_m = &the_model;
/* gcv_region_end() expects its client_data to point at this struct. */
end_data.write_region = count_region_faces;
end_data.vlfree = &rt_vlfree;
end_data.client_data = &stats;
/* Walk every top-level object. Leaves are tessellated to BoTs by
* rt_booltree_leaf_tess(); gcv_region_end() then Boolean-evaluates
* each region and invokes our callback with the result. */
(void)db_walk_tree(context->dbip, (int)gcv_options->num_objects,
(const char **)gcv_options->object_names, 1, &tree_state,
NULL, gcv_region_end, rt_booltree_leaf_tess, &end_data);
bu_log("Total faces after tessellation: %zu\n", stats.face_count);
return 1;
}
static const struct gcv_filter gcv_conv_tess_stats = {
"Tessellation Statistics", GCV_FILTER_FILTER, BU_MIME_MODEL_AUTO, NULL,
NULL, NULL, tessellation_statistics
};
----
====
=== Converting Unsupported Entities
Although BRL-CAD supports a wide array of common geometric primitives, you may encounter objects that can't be directly imported or exported into an analogous entity. In these cases, conversion filters usually tessellate the incompatible geometry (typically during export) or convert it into an approximation or a composite of several other primitives (often during import).
.Tessellation of incompatible entities
image::../articles/images/gcv_unsupported_tessellation.png[]
=== Comparing Geometry
When developing a filter, it is often useful to be able to compare different models during testing. This capability is provided by the `gdiff` tool. There are two versions of `gdiff`: the standalone command-line version and the `gdiff` provided within the MGED interface.
The command-line `gdiff` quickly produces a textual summary for a two- or three- way diff of several BRL-CAD databases. Documentation for this utility is available under `brlman gdiff`.
The `gdiff` command available within the MGED interface provides a different capability. It uses BRL-CAD's ray tracer to produce a visual display of the differences between two objects within the same database. To compare geometry from separate databases, you can first merge the databases using the `dbconcat` command from within MGED. See `brlman dbconcat` for full documentation.
.Usage of MGED's gdiff utility
[cols="2*"]
|===
|Usage:
|`gdiff [OPTION]... obj1 obj2`
|`--tol=#`, `-t#`
|Tolerance in millimeters.
|`--ray-diff`, `-R`
|Test for differences with raytracing.
|`--view-left`, `-l`
|Visualize volumes added only by left object.
|`--view-both`, `-b`
|Visualize volumes common to both objects.
|`--view-right`, `-r`
|Visualize volumes added only by right object.
|`--grazing`, `-G`
|Report differences in grazing hits (raytracing mode).
|===
.Using MGED's gdiff utility
image::../articles/images/gcv_using_gdiff.png[]
=== Creating Unit Tests
BRL-CAD provides a library of standard models that may be used for unit tests, located under `$BRLCAD_ROOT/share/db/` (note that these files are generated during the build process). Unit tests can be integrated into the build system using the `add_test` CMake command.
== Example: Extending an Application
The following example will leverage the filter in the above plugin example, `tessellation_statistics.c`, to implement a function that counts the number of faces in a model after tessellation.
.gcv_embedded.c
[example]
====
[source,c]
----
#include "common.h"
#include "bu/log.h"
#include "bu/mime.h"
#include "gcv.h"
/* Defined in tessellation_statistics.c, above. */
extern const struct gcv_filter gcv_conv_tess_stats;
/* Load the geometry file at 'in_path' into a fresh context, then run the
* tessellation-statistics filter over it. A GCV_FILTER_FILTER operates
* on the geometry already in the context, so its target is NULL.
* Returns 0 on success. */
int
report_tessellation_stats(const char *in_path)
{
struct gcv_context context;
const struct gcv_filter *in_filter;
bu_mime_model_t in_type;
gcv_context_init(&context);
/* Import the input model into the context's in-memory database. */
in_type = (bu_mime_model_t)bu_file_mime(in_path, BU_MIME_MODEL);
in_filter = find_filter(GCV_FILTER_READ, in_type, in_path, &context);
if (!in_filter || !gcv_execute(&context, in_filter, NULL, 0, NULL, in_path)) {
bu_log("Failed to read '%s'\n", in_path);
gcv_context_destroy(&context);
return 1;
}
/* Run the filter; it tallies the faces and reports via bu_log(). */
if (!gcv_execute(&context, &gcv_conv_tess_stats, NULL, 0, NULL, NULL)) {
bu_log("Tessellation-statistics filter failed\n");
gcv_context_destroy(&context);
return 1;
}
gcv_context_destroy(&context);
return 0;
}
----
====
== The GCV Frontend
GCV includes a command-line front-end utility, `gcv`, implemented in `src/conv/gcv/gcv.c`. Full documentation is available under `brlman gcv` and `gcv --help`.
.Basic usage of the gcv utility
[example]
====
....
$ gcv --input=a.stl --output=b.fg4
Input file format: BU_MIME_MODEL_STL
Output file format: BU_MIME_MODEL_VND_FASTGEN
Input file path: a.stl
Output file path: b.fg4
Converting Part: all_cpu_cpw6_cw_cpubox_cpubox.a
Using solid name: s.all_cpu_cpw6_cw_cpubox_cpubox.a
Making region (all_cpu_cpw6_cw_cpubox_cpubox.a)
...
....
====
.Generic options
[example]
====
....
$ gcv --input=a.fg4 --output=b.vrml --input-and-output-opts --verbosity=1 --output-only-opts --objects=comp_0001.r
....
====
.Filter-specific options
[example]
====
....
$ gcv --input=a.fg4 --output=b.obj --input-only-opts --colors=a.fg4.colors --output-only-opts --vertex-normals
....
====
.Specifying conversion formats
[example]
====
....
$ gcv --input=infile.txt --output=outfile.obj --input-format=stl
....
====
== Conversion Filters
GCV currently contains support for import and export into five model formats, detailed below.
.Conversion formats supported by GCV
[cols="2*"]
|===
|Format
|File Extension
|BRL-CAD
|`.g`
|FASTGEN4
|`.fg4`
|WaveFront Object
|`.obj`
|StereoLithography
|`.stl`
|Virtual Reality Modeling Language
|`.vrml`
|===
=== Common Conversion Options
The `gcv_opts` struct stores generic options applying to many filters, detailed below. Not all options may be applicable to or respected by every filter.
.Conversion formats supported by GCV
[cols="2*"]
[%noheader]
|===
|`debug_mode`
|Print debugging info if set to `1`. Default is `0`.
|`verbosity_level`
|Verbosity level. The default, level `0`, is "quiet" (only error messages are produced).
|`scale_factor`
|Specify the scale factor to be applied during import or export, as units per mm. Default is `1.0`.
|`calculational_tolerance`
|Calculational tolerance. Defaults to the RT defaults. If you use a non-default value, you should set the ray tracer tolerance to match it when using the resulting model.
|`tessellation_tolerance`
|Tessellation tolerance. The default value is: `abs = 0.0` `rel = 1.0e-2` `norm = 0.0`
|`tessellation_algorithm`
|Specify use of either the default, marching-cubes, or bottess-based tessellation algorithm.
|`max_cpus`
|Maximum number of processors to utilize where possible. Default is `0`, specifying the maximum available during execution.
|`num_objects`
|Number of objects to convert. If `0` (the default), all top-level objects will be converted.
|`object_names`
|Names of objects to convert (must have `num_objects` elements). Default is `NULL`.
|`default_name`
|Name assigned to objects without names. Defaults to "`unnamed`".
|`bu_debug_flag`
|Debug flag for libbu (see `include/bu/debug.h`), applied via bitwise-OR with the original value. The original debug flag will be restored after conversion. Defaults to `0`.
|`rt_debug_flag`
|Debug flag for librt (see `include/rt/debug.h`), applied via bitwise-OR with the original value. The original debug flag will be restored after conversion. Defaults to `0`.
|`nmg_debug_flag`
|Debug flag for libnmg (see `include/nmg.h`), applied via bitwise-OR with the original value. The original debug flag will be restored after conversion. Defaults to `0`.
|===
.Using struct gcv_opts
[example]
====
----
static int
apply_filter_with_options(struct gcv_context *context, const struct gcv_filter *filter, const char *target)
{
struct gcv_opts options;
const char *argv[] = { "--colors=colors.dat", "--continue" };
const size_t argc = sizeof(argv) / sizeof(argv[0]);
gcv_opts_default(&options);
options->debug_mode = 1;
return gcv_execute(context, filter, &options, argc, argv, target);
}
----
====
=== FASTGEN4 Reader
.FASTGEN4 reader options
[cols="2*"]
[%noheader]
|===
|`--colors=_path_`
|Path to a file specifying component colors.
|`--muves=_path_`
|Create a MUVES input file containing any CHGCOMP and CBACKING components.
|`--plot=_path_`
|Create a libplot3 plot file of all CTRI and CQUAD elements processed.
|`--sections=_list_`
|Process only a list ("`3001, 4082, 5347`") or a range ("`2315 - 3527`") of section IDs.
|===
=== FASTGEN4 Writer
At this time, the FASTGEN4 writer plugin does not make use of any filter-specific options.
=== OBJ Reader
.OBJ reader options
[cols="2*"]
[%noheader]
|===
|`--continue`
|Continue processing on nmg-bomb. Conversion will fall back to native BoT mode if a fatal error occurs when using the nmg or BoT-via-nmg modes.
|`--fuse-vertices`
|Fuse vertices that are near enough to be considered identical. Can make the solidity detection more reliable, but may significantly increase processing time during the conversion.
|`--grouping=_mode_`
|Select which OBJ face grouping is used to create BRL-CAD primitives. `group` = group (default) `material` = material `none` = none `object` = object `texture` = texture
|`--conversion-mode=_mode_`
|Select the conversion mode. `bot` = native BoT (default) `nmg` = NMG `nmgbot` = BoT via NMG
|`--bot-plate-thickness=_thickness_`
|Thickness (mm) used when a BoT is not a closed volume and it's converted as a plate or plate-nocos BoT.
|`--bot-ignore-normals`
|Ignore the normals defined in the input file when using native BoT conversion mode.
|`--bot-open-type=_type_`
|Select the type used for BoTs that aren't closed volumes. `surface` = surface (default) `plate` = plate `nocos` = plate-nocos
|`--bot-plot`
|Creates a plot/overlay (`.plot3`) file of open edges for BoTs that aren't closed volumes. `_bot_name_.plot3` will be created in the current directory and will overwrite any existing file with the same name.
|`--bot-orientation=_mode_`
|Select the BoT orientation mode. `unoriented` = unoriented (default) `ccw` = counterclockwise `cw` = clockwise
|===
=== OBJ Writer
.OBJ writer options
[cols="2*"]
[%noheader]
|===
|`--vertex-normals`
|Output vertex normals.
|`--usemtl`
|Place `usemtl` statements in the output file. These statements are fictional (they do not refer to any material database). The materials named provide information about the material codes assigned to the objects in the BRL-CAD database. The material names will be of the form "`_aircode___los___material_`", where _aircode_ is the code number for the air represented by that region, if it does represent air; otherwise, this will be `0`. The _los_ is the Line Of Sight thickness (`0` to `100`) assigned to the region, and _material_ is the material code number assigned.
|===
=== STL Reader
.STL reader options
[cols="2*"]
[%noheader]
|===
|`--binary`
|Specify that the input file is in binary STL format (the default assumes ASCII).
|`--starting-ident=_number_`
|Specify the starting ident for the regions created. The default is `1000`. This number will be incremented for each region, unless `--constant-ident` is specified.
|`--constant-ident`
|Specify that the starting ident should remain constant.
|`--material=_code_`
|Specify the material code that will be assigned to all created regions (the default is `0`).
|===
=== STL Writer
.STL writer options
[cols="2*"]
[%noheader]
|===
|`--binary`
|Write output as a binary STL file. The default is ASCII. In the case of ASCII output, the region name is specified on the "solid" line of the STL file. In the case of binary output, all the regions are output as a single STL part.
|`--output-dir`
|Specify that the output path should be a directory. Each region converted is written to a separate file. File names are constructed from the full path names of each region (the path from the specified object to the region). Any "`/`" characters in the path name are replaced by "`@`" characters and "`.`" and white space are replaced by "`_`" characters.
|===
=== VRML Reader
The native VRML reader accepts both VRML 1.0 and VRML97/2.0 files. VRML 1.0
imports preserve ordered property state, separator scoping, `DEF`/`USE`
instances, transformations, material colors, analytic cube, cone, cylinder,
and sphere geometry, and indexed polygon meshes. Concave polygons are
triangulated, and per-face material bindings are emitted as separate colored
regions.
VRML constructs that do not have a BRL-CAD equivalent or are not
implemented yet, including cameras, lights, textures, text, line sets,
and point sets, are accepted but do not produce objects. External
content referenced by `WWWInline` is not fetched during conversion.
The VRML reader plugin does not make use of any filter-specific options.
=== VRML Writer
.VRML writer options
[cols="2*"]
[%noheader]
|===
|`--bot-dump`
|BoT dump. Mutually exclusive with `--evaluate-all`.
|`--evaluate-all`
|Evaluate all, CSG and BoTs. Mutually exclusive with `--bot-dump`.
|===
=== Open Asset Import Library Reader
The Open Asset Import Library (assimp) is an open source library integrated into GCV, capable of loading and converting geometry from 45 3D file-formats.
.Conversion extensions supported by Asset Import Library reader
[cols="3*"]
[%noheader]
|===
|.3d
|.gltf / .glb (1.0)
|.obj
|.3ds
|.gltf (2.0)
|.off
|.3mf
|.hmp
|.ogex
|.ac
|.ifc
|.ply
|.ac3d
|.lwo
|.pmx
|.acc
|.lws
|.q3o
|.ase
|.lxo
|.q3s
|.b3d
|.md2
|.raw
|.blend
|.md3
|.sib
|.bvh
|.md5
|.smd
|.cms
|.mdc
|.stl
|.cob
|.mdl
|.x
|.dae
|.mesh / .mesh.xml
|.x3d
|.dxf
|.ms3d
|.xgl
|.fbx
|.nff
|.zgl
|===
.Asset Import Library reader options
[cols="2*"]
[%noheader]
|===
|`--starting-ident=_number_`
|Specify the starting ident for the regions created. The default is `1000`. This number will be incremented for each region, unless `--constant-ident` is specified.
|`--constant-ident`
|Specify that the starting ident should remain constant.
|`--material=_code_`
|Specify the material code that will be assigned to all created regions (the default is `0`).
|`--format=_file_fmt_`
|Specify the file format for conversion. By default, this is inferred from the file extension.
|===
.Specifying the Asset Import reader
[example]
====
NOTE: As the Asset Import library handles many formats, some of which are also handled by other conversion methods, it currently must be explicitly called to invoke. The format itself is then inferred from the files extension.
....
$ gcv --input-format=assetimport input_file.ext output_file.ext
....
====
=== Open Asset Import Library Writer
The Open Asset Import Library (assimp) is an open source library integrated into GCV, capable of exporting to 15 different 3D file-formats.
.Conversion extensions supported by Asset Import Library writer
[cols="3*"]
[%noheader]
|===
|.3ds
|.fbx
|.pbrt
|.3mf
|.glb
|.ply
|.assbin (assetimport binary)
|.gltf
|.stl
|.assxml (assetimport xml)
|.json
|.stp
|.dae
|.obj
|.x3d
|===
.Asset Import Library writer options
[cols="2*"]
[%noheader]
|===
|`--format=_file_fmt_`
|Specify the file format for conversion. By default, this is inferred from the file extension.
|===
.Specifying the Asset Import writer
[example]
====
NOTE: As the Asset Import library handles many formats, some of which are also handled by other conversion methods, it currently must be explicitly called to invoke. The format itself is then inferred from the files extension.
....
$ gcv --output-format=assetimport input_file.ext output_file.ext
....
====
+620
View File
@@ -0,0 +1,620 @@
= GED: An Interactive Solid Modeling System
Michael J. Muuss <mulferts@austin.dsccc.com>; Keith A. Applin; J. Robert Suckling; Gary S. Moss; Earl P. Weaver; Charles A. Stanley
:doctype: article
:toc:
:toclevels: 3
[[Preface]]
== Preface
For many years the production and modification of target descriptions, no matter what method used, has been a slow, labor-intensive procedure. In an effort to improve the response time of target descriptions, the Ballistic Research Laboratory (BRL) has developed an interactive solid modeling system. This system is called the Graphics Editor (GED) and is designed to replace the traditional manual method of production and modification of target descriptions. GED presently applies to the combinatorial geometry (COMGEOM) solid modeling technique. Using GED, the target descriptions are interactively viewed, modified, and constructed with immediate visual feedback at each step. The GED system virtually eliminates explicit numerical input and opens a new dimension in the target description process.
[[INTRODUCTION]]
== INTRODUCTION
As the Army's lead laboratory for vulnerability technology, the Ballistic Research Laboratory (BRL) constantly performs vulnerability analyses for a wide variety of military systems. Vital to these vulnerability studies are three dimensional computer models of the physical characteristics of these systems. These computer models are generally called target descriptions. Since the mid 1960's, BRL has used a solid modeling technique called combinatorial geometry (COMGEOM) to model targets. The COMGEOM technique uses logic operations to combine basic geometric shapes or primitives to produce the three-dimensional target description. The COMGEOM target descriptions are processed by the Geometric Information For Targets
_(GIFT)\u1,2\d_
----
\u1\d Lawrence W. Bain, Mathew J. Reisinger, "The GIFT Code User Manual; Vol I,
Introduction and Input Requirements," BRL Report No. 1802, July 1975. (AD# B0060371)
----
----
\u2\d Gary G. Kuehl, Lawrence W. Bain, Mathew J. Reisinger, "The GIFT Code User
Manual; Vol II, the Output Options," ARRADCOM Technical Report No. ARBRL-TR-02189,
September 1979. (AD# A078364)
----
code for use in follow-on vulnerability assessment codes.
Target descriptions are basically large collections of numerical data which traditionally have been handled manually in a batch environment. Hence, the production and modification of target descriptions has been a slow, labor-intensive process. In 1980, BRL initiated an effort to improve the response time of the target description process by applying interactive computer graphics techniques. As a result of this work unit, BRL has developed the Graphics EDitor (GED), an interactive solid modeling system based on the COMGEOM technique. Using GED an analyst can view, build, and modify target descriptions interactively by manipulating the graphical representation, thus providing immediate visual feedback on a vector display device. The GED system is designed to replace the manual method of production and modification of target descriptions.
This report is intended to serve as a user manual for the GED system. The process of viewing and editing a description using GED is covered in detail. The internal data structure is also covered, as it is an important part in the overall design of the GED system.
[[COMGEOM_BACKGROUND]]
== COMGEOM BACKGROUND
Since the GED system is presently based on the COMGEOM solid modeling technique, a brief overview of the COMGEOM technique is required to effectively use GED. For more detailed information on the COMGEOM technique see references 1 and 2.
The COMGEOM technique utilizes two basic entities - a solid and a region. A solid is defined as one of fifteen basic geometric shapes or primitives. Table I contains a list of these fifteen solids. The individual parameters of each solid define the solid's location, size, and orientation. A region is a combination of one or more solids and is defined as the volume occupied by the resulting combination of solids. Solids are combined into regions using any of three logic operations: union(OR), intersection(+), or difference(-). The union of two solids is defined as the volume in either of the solids. The difference of two solids is defined as the volume of the first solid minus the volume of the second solid. The intersection of two solids is defined as the volume common to both solids. Figure 1 presents a graphical representation of these operations. Any number of solids may be combined to produce a region. As far as the COMGEOM technique is concerned, only a region can represent a component of the target. The solids are only building blocks to be combined into regions. Since regions represent the components of the target system, they are further identified by code numbers. These code numbers either identify the region as a target component (nonzero item code) or as air (nonzero air code). Any volume not defined as a region is assumed to be "universal air" and is given an air code of "01". If it is necessary to distinguish between universal "01" air and any other kind of air, then that volume must be defined as a region and given an air code other than "01". Normally, regions cannot occupy the same volume (overlap), but regions identified with air codes can overlap with any region identified as a component (i.e. one that has a nonzero item code). Regions identified with different air codes however, can not overlap.
[[COMPUTER_GRAPHICS]]
== COMPUTER GRAPHICS
Computer graphics is one of the fastest growing fields in the computer industry. Computer graphics has applications in many diverse areas, from electronic games to medicine, from cartoons to the space industry. Just what is interactive computer graphics and why is it so versatile? Human visual perception is quite keen and communications with a computer are generally faster and easier with images or displays rather than with numbers. Furthermore, by driving the display image with the computer, one can actually communicate with the computer through the display itself. This technology is called interactive computer graphics. The user converses with the computer through the display using devices such as light pens, data tablets, function switches, and control dials. The response of the computer is immediately reflected on the display. Thus a fast channel of communication is available between person and machine.
[[APPROACH_TO_THE_PROBLEM]]
== APPROACH TO THE PROBLEM
To speed up the model description process, a faster more efficient method of manipulating the large masses of data involved in a target description is needed. Interactive computer graphics seems to provide the capability of handling such data in an efficient, relatively fast manner. The key to the whole situation is SOFTWARE - the missing link between the target description problem and a possible solution.
In view of this fact, existing software graphics packages were evaluated with respect to their utility in the target description process. Quite an exhaustive search of commercially available systems was conducted and none were found which completely satisfied our requirements. A study was then initiated to examine the feasibility of producing the required graphics software in-house. The result of this study was a preliminary version of GED which, using existing hardware, quite convincingly demonstrated the feasibility of such an undertaking\u3\d.
----
\u3\d Michael John Muuss, Earl P. Weaver, "Interactive Construction of
COMGEOM Targets - A Feasibility Study", report to be published.
----
It was then decided to develop GED into a full production code and to acquire the hardware necessary for full implementation of the system. The production level GED code has been used since January 1982 to build target descriptions interactively at BRL.
[[GED_OVERVIEW]]
== GED OVERVIEW
The main function of the GED system is to edit target descriptions with immediate visual feedback. Hence, GED produces images both suitable for editing and capable of being displayed in real time. When an object is displayed, the solids combined to model the object are drawn. No attempt is made to produce edge representations of regions or to remove hidden lines. At the present, such an undertaking would take away from the "real time" displays now enjoyed.
The GED is a modular code written in the C programming language which presently runs under the BRL UNIX Networking System\u4\d.
----
\u4\d Michael John Muuss, "BRLNET - The Implementation of a
Multi-processor UNIX System", a final report of work done under ARO
Project Number 1127, August 27, 1980.
----
The workstations presently used are Vector General (VG) 3DI vector refresh systems driven by DEC PDP-11/34 or PDP-11/70 computers. Peripheral devices include a joystick, a pen and data tablet, function switches, and control dials. These peripheral devices and functions of each are discussed in later sections.
Overall control of GED is maintained via the keyboard. The keyboard commands perform general housekeeping functions and allow one to control what is displayed, create/modify combinations, list solid parameters, etc. The keyboard commands are discussed in a later section.
[[GED_INTERNAL_DATA_STRUCTURE]]
== GED INTERNAL DATA STRUCTURE
One of the critical aspects of a graphics software package is its internal data structure. Since the target description problem deals with such large volumes of data, the importance of the data structure here is emphasized. Thus it is felt that an introduction to the internal data structure of GED is important for any potential user.
The GED internal data structure is hierarchical in nature with each node or position in the hierarchy being occupied by an OBJECT. An OBJECT is the GED basic data unit and is defined as either a SOLID or a COMBINATION. A SOLID is one of the generalized COMGEOM primitive types while a COMBINATION is a group of objects. Each member object of a combination has a transformation associated with it. Any object not at the top of an hierarchy is referenced by (is a member of) a higher combination and each such reference has an associated transformation. The bottom object of every hierarchy path is a solid. This hierarchical data structure allows actual subsystems of a target to be grouped together and edited as a unit without worrying about individual parts. To display any object, each path in the object's hierarchy is traveled to its bottom position where a solid is located. The transformations are accumulated for each path traversed and then applied to the solid at the bottom of the path. The solid is then drawn. The hierarchy is traversed recursively until all objects are drawn. Let's use a high explosive projectile as an example. Figure 2 depicts the hierarchy involved. If one were to display the combination "heround", six solids would be drawn on the screen. Table II lists each solid name, the transformation applied to the solid's parameters, and the path used to reach the solid.
One very useful type of combination is the INSTANCE. An instance is a referral to an object (solid or combination) without the object itself being duplicated. To produce an instance of an object, a combination is created with the object being instanced as a member object. As with any other combination, this member has an associated transformation, hence it can be edited as a unit. The instance is most useful when an object appears many times in a description. The desired number of instances are made and positioned in the description. Any future changes in the object require that only the original (prototype) be changed. The modifications of the prototype object will then be automatically reflected in all the instances of that object.
[[KEYBOARD_COMMANDS]]
== KEYBOARD COMMANDS
To execute GED, one simply types "ged file", where "file" is the data file to be edited. The GED keyboard commands are used to maintain overall control of the system and to perform general housekeeping functions. Each command is invoked by entering a single character followed by other parameters (if necessary) separated by spaces. In most cases, the response on the screen will be the word "done" once the command is completed. This response is not printed for the commands where the results of the command are readily visible on the screen.
In the following pages, the GED keyboard commands will be presented and discussed. Examples will be given in appropriate cases. Table III, at the end of this section, presents a summary of the GED keyboard commands and the function of each.
*c oldsolid newsolid*
This command is used to produce and display a copy of a solid. In this case, the solid "oldsolid" will be copied into a solid called "newsolid". A new identical solid record is added to the data file. The solid parameters are copied as they appear in the solid record.
----
Examples: c arb8 hullbot.s
c arb8 turrettop.s
c tgc wheelrim.s
c tor tire1.s
----
*n old new*
This command is used to rename objects in the data file. In this case, the object "old" will be renamed "new". A note of caution: the name is changed only in the object record itself, not in any member records. Thus if the object "old" appears as a member of any other object, the name will not be changed there.
----
Examples: n test hull
n g00 air
n g1 turret
----
*Z*
This command clears (Zaps) the screen of all displayed objects.
*g group obj1 obj2 ..... objn*
This command creates or appends to a combination record and is used to group objects together either for editing or displaying purposes. In this case, "obj1" through "objn" are added as members to the combination "group". If "group" does not exist, it is created and "obj1" through "objn" are added as members.
----
Examples: g shell hull turret
g tank wheels engine crew shell
g tank track
r region op1 sol1 op2 sol2 .... opn soln
----
This command is used to create regions or append to regions. If "region" exists, then solids "sol1" through "soln" are added as members with "op1" through "opn" as the defining operations. If "region" does not exist, then it is created and solids "sol1" through "soln" are added as members with "op1" through "opn" as the defining operations. A region is merely a combination record with a flag set and is distinguished from other combinations (groups) since it has meaning to the COMGEOM solid modeling system.
When a region is created, the item and air codes are set equal to zero. To change the item and air codes use the "I" command. Note: In the past all members of a region had to be solids, but recently regions have been allowed as members of regions. Hence, the names "soli" can also be regions now.
----
Examples: r hulltop.r + hulltop.s - hullleft.s - hullright.s
r gun + gun.s - gunin.s
r gunair + gunin.s
----
*i object combname brname*
This command is used to make an instance of an object. An instance of an object is produced by creating a combination and making the object a member. In this case, an instance of "object" is made by creating the combination record "combname" (if "combname" does not already exist) and adding "object" as a member. This member also has a second name "brname" added to the member record, which can be thought of as the name of this branch in the hierarchical data structure. If "combname" already exists, then "object" is added as the next member and "brname" is added as the branch name.
An instance is used to refer to an object, without making actual copies of the object. Instances are useful when one is adding a certain component to a target description many times. Furthermore, any modifications to an object which has been instanced need only be done in the original (prototype) object. These modifications will then be automatically reflected in all the instances of the object.
----
Examples: i heround ammo he1
i heround ammo he2
i heat ammo heat1
i heat ammo heat2
----
*f face distance*
This command allows the user to project a face of an arb (arbitrary polyhedron) being edited a normal distance to create a new arb. The value of "face" is 4 digits such as 1256. If the face is projected in the wrong direction use a negative "distance". One use for this command is for producing armor plates of a desired thickness.
----
Examples: f 1234 20
f 2367 34.75
f 2367 -34.75
----
*l object*
This command is used to list information about objects in the data file. The information listed depends on what type of record "object" is. If "object" is a combination record, then the members are listed. If "object" is a solid record, then the GED general solid type and the parameters as presently in the data file are listed. Note: only the solid parameters as they exist in the solid record are listed, no transformation matrix is applied. Hence, if the solid was edited as a member of a combination, the "l" command will not reflect the editing in the listed parameters.
----
Examples: l hull
l turret
l turtop.s
l arb8
----
*mirror -[axis] oldsolid newsolid*
This command is used to create and display a new solid record which is the mirror image of an existing solid. The mirror image is about an axis and is created by changing the signs on the solid's parameters depending on which axis the solid is mirrored about. In this case, a mirror image of the solid "oldsolid" will created about the axis indicated by "axis" and the new solid record will be called "newsolid". The only acceptable values for the parameter "axis" are "x", "y", and "z".
----
Examples: mirror -y tur.left.s tur.right.s
mirror -z tur.top.s tur.bot.s
mirror -x tur.front.s tur.back.s
----
*p dx [dy] [dz]*
This command allows a user in the SOLID EDITING mode to input exact parameter modifications by the keyboard. The meaning of the values typed after the p command varies depending on what solid editing feature is being used. Examples of this command will be given in the discussion on solid editing.
*D comb mem1 mem2 .... memn*
This command allows one to delete members from a combination record. In this case, members "mem1" through "memn" will be deleted from the combination "comb".
----
Examples: D tank hull wheels
D region1 solid8 solid112
D turtop.r tursidel.s tursider.s turback.s
----
*I region item air*
This command allows one to change the item or air code numbers of a region. If the air code ("air") is not included, a zero is assumed. To change the air code, a zero item code should be used (see second example below).
----
Examples:
I region1 105
I region7 0 2
I region11 129 0
----
*e object*
This command is used to display (draw) objects on the screen. In this case, "object" will be displayed on the screen. Note that "object" must be found in the table of contents.
*d object*
This command is used to drop (delete) objects from the display. In this case, "object" will be deleted from the screen display. This command is opposite of the "e" command.
*k object*
This command is used to remove (kill) objects from the data file. In this case, "object" will be removed from the data file. Note the distinction between the "d" command which deletes objects from the display and the "k" command which removes objects from the data file.
*t*
This command produces a list of the table of contents of all objects in the data file. The objects are listed a screenfull at a time. A carriage return will produce the next screenfull.
*a arbname rot fb*
This command is used to create and display a new arb8 solid record. This new arb8 has two square (5 units x 5 units) parallel faces which are 0.5 units apart. These parallel faces are in planes whose orientations are defined by the two input angles - the rotation (rot) angle and the fallback (fb) angle. The orientation of armor plates are frequently defined using rotation and fallback angles. The vertex of this new arb8 is located in the center of the screen.
----
Examples: a hullsec3.s 45 30
a tursec2.s 90 20
a topglacis.s 0 60
----
*x*
This command is the display debug command. It will produce a list of all objects that have been displayed , the paths traversed to draw the objects, and whether or not the objects are displayed in the present view.
*q*
This command is used to quit the graphics editor code. This is the normal halt.
[[PERIPHERAL_DEVICES]]
== PERIPHERAL DEVICES
Before we discuss the features of GED, we will introduce the hardware devices used to implement them. These devices are the "tools of the trade" for the GED user. We will discuss only basic operational characteristics here. Specific use of these devices will be covered in the later sections on the viewing and editing features of GED.
The JOYSTICK is a mechanical device used to do the rotations in GED. Any movement of the stick left or right rotates the display about the x-axis. Any movement of the stick up or down rotates the display about the y-axis. When the joystick is twisted in a clockwise or counterclockwise direction, the display rotates about the z-axis. Any combination motion of the stick will produce a "combined" rotation about the appropriate axes. All of these motions have a spring return to a null center position.
The FUNCTION SWITCH box contains thirty-two buttons. When any of the buttons is pressed, an action occurs or condition is set. Figure 3 depicts the functions programmed for each button. The buttons in the shaded area are used for editing while the rest are used for viewing the display. The exact functions assigned to these buttons will be discussed in the sections on viewing the display and on editing.
The CONTROL DIALS (knobs) are used to send digital information to the computer. As a knob is turned, a succession of numbers are available for use by the computer. Figure 4 depicts the functions assigned to each of the ten knobs. The exact functions of each of these knobs will be discussed in the angle distance cursor section and in the viewing features section.
The DATA TABLET is a graphics input device containing an X-Y coordinate grid which corresponds to the grid on the screen. Information is entered using a pen-like stylus. The distance this pen is from the tablet is important. If the pen tip is within one half inch of the tablet surface, the cursor location on the screen corresponds to the X,Y location of the pen on the tablet. This condition is called the "near" position. If the pen is more than one half inch from the tablet surface, the cursor remains located in the center of the screen. When the pen is pressed against the tablet surface, the pressure switch is activated and a bit is set which is a signal used by GED. The exact meaning of the pen near and pen press depends on what is being done and will be covered in the appropriate sections of this report.
[[ANGLE_DISTANCE_CURSOR]]
== ANGLE DISTANCE CURSOR (ADC)
The angle distance cursor is a construction aid used to measure angles and distances. It should be noted that all measurements are made in the projected space of the screen, so one should measure only in a view normal to the surface where the measurement is to take place. The ADC is placed on (or removed from) the display by pushing the "ADC" function switch button (see Figure 3). The ADC consists of three cursors which cover the entire screen. Figure 5 depicts the ADC as it appears on the screen. All the cursors are centered at the same point and can be moved to any location on the screen. Two of these cursors rotate for angle measuring purposes. Angle cursor 1 is solid while angle cursor 2 is dashed. Angle cursor 1 has movable tic marks for measuring distances on the screen. The two angle cursors move with the horizontal and vertical lines of the main cursor. The resulting effect is the moving of the center point horizontally or vertically. The ADC is controlled by the bottom row of the control dial knobs (see Figure 4) :
----
Knob 6 moves the center in the horizontal direction
Knob 7 moves the center in the vertical direction
Knob 8 rotates angle cursor 1 (alpha)
Knob 9 rotates angle cursor 2 (beta)
Knob 10 moves the tic marks
----
Whenever the ADC is on the screen, there is a readout at the bottom of the screen listing pertinent information about the ADC. This information includes the angles that angle cursors 1 and 2 have been rotated (alpha and beta), the distance the tic marks are from the center of the ADC, and the location of the center of the ADC. This information is continually updated on the screen.
[[VIEWING_FUNCTIONS]]
== VIEWING FUNCTIONS
The GED viewing features are designed to allow one to examine a target description in close detail. Any of the viewing features can be invoked at any time. It should be noted, that these functions do not change the actual data, only the way these data are displayed.
Six standard views (front, rear, top, bottom, left, and right) and one oblique view (azimuth 35, elevation 25) are each assigned to the function buttons (see Figure 3). Hence, any of these views is immediately available at the press of the appropriate function button. The views available are not limited to these standard views however, as the display can be rotated to any view by using the joystick. By pressing the function button labeled "save view" (see Figure 3), the present viewing aspect angle of the display is saved. At any time, the saved view can be immediately returned to the screen by pressing the "restore view" function button (see Figure 3). The "restore view" button will be lit whenever a view has been saved. The function button labeled "reset" (see Figure 3), restores the display to the default view (front) when pressed.
The display can be panned or slewed on the screen in two ways - using the data tablet and pen or by using the control knobs. When one is editing, the tablet and pen are not available for slewing, hence one must use the control knobs to slew the display. If one is NOT editing, then whenever the pen is pressed, the display moves in the direction of an imaginary vector drawn from the center of the screen to the cursor location on the screen. Recall that there is a one-to-one correspondence between the pen location and the cursor location. The longer this vector, the faster the display will move. To slew the display using the control knobs, one uses the knobs labeled "slew x" or "slew y" (see Figure 4). The null positions on these knobs is in the center or straight up. If the "slew x" knob is turned clockwise of center, the display will move to the right. If it is turned counterclockwise, the display will move to the left. For the "slew y" control knob, clockwise of the center moves the display up and counterclockwise moves the display down. The further these knobs are turned from center, the faster the display moves.
One can zoom the display by using the control knob labeled "zoom" (see Figure 4). Again the null position of this knob is center or straight up. Turning this knob clockwise of center causes the display to increase in size producing a zoom-in effect. Turning this knob counterclockwise of center causes the display to decrease in size or zoom-out. Again, the further the "zoom" knob is turned from center, the faster the zooming will occur.
The viewing features of GED also include a slice mode. To invoke the slice feature, one presses the "slice mode" function button (see Figure 3). An imaginary slicing plane, parallel to the screen, can then be moved about by turning the first control knob (see Figure 4). Turning this knob clockwise moves the imaginary plane into the screen and counterclockwise moves the plane out of the screen. All portions of the display in front of the plane are eliminated from the display. The result of moving this plane into the screen is a slicing effect with the parts of the display closest disappearing first. To leave the slice mode, just press the "slice mode" button again.
[[SELECTING_OBJECTS_FOR_EDITING]]
== SELECTING OBJECTS FOR EDITING
Before we discuss the editing features of GED, we will discuss how one selects objects for editing. To be edited, an object must be displayed on the screen. Since the object to be edited may be only a small portion of the display, a procedure is needed to select an object from the many objects being displayed. This procedure relies on the hierarchical structure of the GED data base. As stated before, when objects are displayed, every path of every object is traversed and the bottom object, which is always a solid, is drawn. Hence one can think of each solid drawn not as one solid, but as the unique path used to reach that solid. As an example, the six paths (solids) for the sample object "heround" were presented in Table II.
To select an object for editing, one first must enter the illuminate mode by pressing the function button labeled "illuminate" (see Figure 3). The data tablet and pen are then used to select the object. The surface of the data tablet is divided into imaginary horizontal strips. Each of these strips corresponds to a path (solid) drawn on the screen. For example, if the sample "heround" were displayed, the tablet surface would be divided into six horizontal strips. The pen is used in the "near" mode (within one half inch of tablet surface) to illuminate the paths. The path corresponding to the pen location is written in the upper right hand corner of the screen. The solid at the bottom of this path is illuminated (drawn brighter) on the screen. In this manner one can "scan" the complete display by simply moving the pen up and down the tablet in the near mode. Hence, the illuminate mode is also quite useful just to identify objects in a description. However, the primary purpose of the illumination mode is to select objects for editing.
The actual selecting of an object for editing is a two-step process. First, one selects the path desired, then one selects the particular object of interest from that path. One "selects" by pressing the pen on the tablet surface. When a path is selected, the word PATH followed by the members of that path is written in the upper right of the screen. At that point, one is ready to select a specific member (object) from that path for editing. Again, the tablet is used for this selection. The tablet surface is now divided into as many rows (zones) as there are members in the selected path. When the pen, in the near mode, is in a path member's assigned zone on the tablet, that member's name will be illuminated in the path listing. When the specific member to be edited is illuminated, it is selected by pressing the pen. The word EDIT will now appear in the upper right of the screen ahead of the path listing. One is now ready to edit this selected object.
The only way out of the EDIT mode is to accept or reject any editing performed. This is done by pressing the function buttons labeled "accept" or "reject" (see Figure 3). If at any time in the selection process an incorrect object is selected, just press the "reject" button and begin the selection process again.
[[OBJECT_EDITING]]
== OBJECT EDITING
The heart of the GED system is its editing features. The editing features are divided into two classes: object editing and solid editing. Object editing is designed to allow one to change the location, size, and orientation of an object. Recall that an object is defined as the basic data unit of the GED system and includes both combinations and solids. In the case of a solid, one needs to change not only its location, size, and orientation, but also its "shape". Changing the shape of a solid means changing any of its individual parameters. Hence, solid editing is handled separately.
Any object in the data file may be selected for object editing. The object is picked using the object selection procedure discussed earlier. Recall that in the GED data structure, all members of combinations have transformation matrices associated with them, allowing assemblies to be edited as units. Object editing is the vehicle for performing such tasks. All object editing is done using homogeneous transformation matrices. When the editing is accepted, new transformation matrices are created in all appropriate member locations. If the object happens to be a single-member path (solid) then the matrix is applied to the solid's parameters. Otherwise, all object editing is stored in transformation matrices in the data base.
Once an object is selected for editing, the second row of function buttons (see Figure 3) is used to select the editing to be done. Then either the data tablet and pen or the joystick are used to perform the actual editing.
To SCALE a selected object, one first presses the function button labeled "scale object". The data tablet and pen are then used to scale the object. The object is scaled about the target origin, thus unless the object is centered at the origin, some translation of the object will occur. The location of the pen on the tablet when pressed determines the scale factor used. If the pen is above the center of the screen, the scale factor will be greater than one. The further the pen is located above the center, the larger the scale factor. Likewise, if the pen is located below the vertical center, the scale factor will be less than one and the further below the center, the smaller the scale factor. As long as the pen is pressed, the object will continue to increase or decrease in size.
To ROTATE a selected object, one first presses the function button labeled "rotate object". The joystick is then used to rotate the object. The object is rotated about the center of the view (screen). If one wishes to rotate the object about another point of interest, the entire display can be slewed until the desired point is positioned at the center of the screen.
To TRANSLATE a selected object, one has three function buttons from which to select (see Figure 3). The data tablet and pen are then used to translate the object. The center of the object "follows" the pen (cursor) location whenever the pen is pressed. The three function buttons define the direction allowed for movement of the object. The button labeled with a horizontal arrow (<--->), allows the object to follow only the horizontal location of the pen. The vertical location of the object does not change. The function button labeled with a vertical arrow ( ), allows the object to follow only the vertical location of the pen. The horizontal location of the object does not change. The function labeled with crossed arrows (<--->) allows the object to follow the X,Y location of the pen.
The object editing features can be invoked in any order and at any time once an object has been selected for editing. During object editing, any of the viewing features, such as changing views, zooming, and slewing, can be used and in fact are usually quite useful. Again, the only way to exit the object editing mode is to accept or reject the editing. If the "reject" button is pressed, the object will return to its pre-edit state. If the "accept" button is pressed, the data base will be changed to reflect the object editing performed.
[[SOLID_EDITING]]
== SOLID EDITING
The solid editing feature allows the user to interactively translate, rotate, scale, and modify individual parameters of a solid. Whenever one is in the solid edit mode, the parameters of the solid being edited are listed and continually updated at the bottom of the screen. Certain parameters are also labeled on the solid being edited. Solid editing is generally used to "build" objects by producing solids of the desired shape and size in the correct orientation and position. Once the object is built, object editing is used to scale, orient, and position the object in the description. The general philosophy of solid editing is to first create a copy of a prototype solid with the desired name and then to edit this solid. The prototype solids should not be edited. As an example, suppose one were to build the sample object "heround" mentioned earlier. To produce the base of the shell, one would need a cylindrical shaped solid. The prototype solid is the TGC (see Table I), so one would type:
*c tgc shellcase.s*
A new solid record called shellcase.s would be created and displayed on the screen. This shellcase.s solid would then be edited using solid editing to produce the exact solid parameters desired. The solid record tgc would be unchanged and available for copying the next time a cylindrical solid is needed.
The procedure for solid editing is quite similar to that for object editing. First, the solid must be selected for editing. A solid is selected for editing using the illuminate mode, just as in object editing, except a solid must be selected. Recall that the bottom object in every hierarchy path is a solid. Second, one must push the function button labeled "solid edit" (see Figure 3). This button sets up the solid edit mode: the solid parameters are listed at the bottom of the screen, pertinent solid parameters are labeled on the display, the solid editing function buttons are activated, and a menu header depending on the solid type is written on the right side of the screen. The meaning of the menu will be discussed shortly. Third, one selects (by pressing the appropriate function buttons) and performs the editing desired. Finally, one exits the solid editing mode by accepting or rejecting the editing performed, just as in object editing.
Recall, in the section on object editing it was mentioned that since a solid is indeed an object, a solid can be edited (translated, rotated, and scaled) as an object. Hence, the solid editing mode is really only necessary to perform parameter modifications. However, much of the object editing is done about the target or screen center, which can be annoying when editing a solid. Also, precise parameter modifications are possible (using the "p" keyboard command) in solid editing. Thus it was deemed desirable to include translation, rotation, and scaling in solid editing also.
Solid TRANSLATION allows the user to place the solid being edited anywhere in the description. To invoke this option, one presses the function button labeled "solid trans" (see Figure 3). To move the solid, use the data tablet and pen. Whenever the pen is pressed, the VERTEX of the solid moves to that location on the screen. One can read the actual coordinates of the vertex on the bottom of the screen, along with the other parameters. If the actual desired coordinates of the vertex are known, one can place the solid exactly using the "p" keyboard command. For example, to place a solid's vertex at the coordinates (x, y, z) one would type
*p x y z*
The solid would then jump to this location.
The solid SCALE feature allows the user to scale the solid being edited to any desirable size. The scaling is done about the vertex of the solid, hence NO translation of the solid occurs. The scaling is performed using the data tablet and pen, just as in object scaling. One can input an exact scale factor using the "p" keyboard command. For example, typing
*p factor*
will scale the solid by an amount equal to "factor". The value of "factor" is absolute - the original solid is scaled. The size of the original solid is defined when the "solid scale" function button is pressed. By setting "factor" equal to one, the original size solid will be displayed on the screen.
Solid ROTATION allows the user to rotate the solid being edited to any desired orientation. The rotation is performed about the vertex of the solid. To select this option, one presses the function button labeled "solid rotate" (see Figure 3). The actual rotation is done using the joystick. One can input exact angles to rotate the solid by using the "p" keyboard command. For example, typing
*p alpha beta gamma*
will rotate the solid "alpha" degrees about the x-axis, "beta" degrees about the y-axis, and "gamma" degrees about the z-axis. Alpha, beta, and gamma are measured from the original "zero" orientation of the solid, defined when the "solid edit" function button was pressed. Hence, typing
*p 0 0 0*
will always return the solid to its original position (its position when the current solid editing session began).
The PARAMETER editing feature allows the user to modify any of the parameters which comprise the selected solid. To invoke this feature, one presses the function button labeled "menu" (see Figure 3). A menu (listing) of parameters to edit will then appear on the right side of the screen under the menu header. The contents of this menu of course depend on the type of solid being edited. To select an item (parameter) from this menu, one uses the data tablet and pen. The immediate region (strip) surrounding each item of the menu "belongs" to that item. Whenever the pen is in one of these regions, that menu item will get brighter in the menu listing on the screen. A menu item is picked by pressing the pen when that item name is illuminated. It should be noted that whenever the pen is in the "menu area", the code assumes the user is attempting to pick a menu item. Hence, the menu area of the screen (the far right edge) can NOT be used by the pen for editing while the menu is on the screen.
For parameter editing, the solid type determines the menu items. The GED code recognizes four general solid types for parameter editing. All the specific solid types which fall into one of these general classes are treated as the general type. For example, all the cylindrical solid types are treated as the general type - the TGC. In the following paragraphs, we will discuss parameter editing for each of these general types of solids.
[[ARB_PARAMETER_EDITING]]
=== ARB PARAMETER EDITING
The GENERAL ARB class of solids represents all the convex polyhedrons (RPP, BOX, RAW, and ARBs). The ARBs comprise five classes of polyhedrons each with a characteristic number of vertices. These are the ARB8, ARB7, ARB6, ARB5, and ARB4, where the ARB8 has eight vertices, etc. GED handles all these ARBs as ARB8s, but with some vertices equal. All the eight vertices of the GENERAL ARB are labeled on the screen, although in certain cases (RAW,ARB7,ARB6,ARB5,ARB4) some vertices will be equal. Figure 6 depicts typical ARBs as they would be displayed and labeled during solid editing.
To edit the ARB vertices, EDGES are moved. Hence, the GENERAL ARB menu is a list of edges to move:
----
GENERAL ARB MENU
move edge 12
move edge 23
move edge 34
move edge 14
move edge 15
move edge 26
move edge 56
move edge 67
move edge 78
move edge 58
move edge 37
move edge 48
----
The edge to be moved is selected from this menu and is then moved using the data tablet and pen. When the pen is pressed, the line containing the selected edge is moved so it goes through the pen location and is parallel to the original edge. The endpoints of the new edge are then calculated to remain in the "bounding" planes of that edge. In the case of the ARB8, for example, the bounding planes for edge 58 are planes 4378 and 1265 (see Figure 6).
The information printed on the bottom of the screen is the x, y, z coordinates of the eight vertices:
----
vertex coordinates
1,2 x1 y1 z1 x2 y2 y3
3,4 x3 y3 z3 x4 y4 z4
5,6 x5 y5 z5 x6 y6 z6
7,8 x7 y7 z7 x8 y8 z8
----
These values are continually updated during solid editing.
The user can force the line containing an edge through any point using the "p" keyboard command. Hence typing
*p x y z*
will force the line containing the edge being edited to pass through the point (x, y, z). No check is made for concave ARBs or for ARBs with crossed edges. Visual feedback from the display is considered adequate to detect these situations.
[[TGC_PARAMETER_EDITING]]
=== TGC PARAMETER EDITING
The TGC general class of solids includes all the cylindrical COMGEOM solids. The defining parameters of the TGC are two base vectors (A and B), a height vector (H), two top vectors (C and D), and the vertex (V). Reference 1 contains more information on these parameters. The top vectors C and D are directed the same as the base vectors A and B respectively, hence the top vectors are defined only by their lengths (c and d). Figure 7 depicts these parameters on typical TGCs. When a TGC is edited in the solid editing mode, only vectors A and B are labeled on the display.
All the vectors (A,B,C,D,H) of the TGC can be scaled during parameter editing. In addition, the height vector (H) and the base (AxB) can be rotated. These parameter editing options are reflected in the TGC menu:
----
TGC MENU
scale H
scale A
scale B
scale c
scale d
rotate H
rotate AxB
----
The scaling of the lengths of the vectors is done using the data tablet and pen in the same manner as object editing. Exact vector lengths can be achieved easily using the "p" keyboard command. If one is scaling a vector, then typing
*p x*
will make the vector being scaled have a length equal to "x".
To rotate vector H or surface AxB, one uses the joystick. Since vectors C and D have the same direction as vectors A and B respectively, the top and bottom surfaces of the TGC will remain parallel. Hence rotating the base surface (AxB) will also rotate the top surface. The "p" keyboard command is not used with the parameter rotation of the TGC.
During solid editing, the parameters of the TGC are constantly updated on the bottom of the screen:
----
V x y z
H x y z |H| a b g rot fb
A x y z |A|
B x y z |B|
c |c|
d |d|
----
_AxB a b g rot fb_
where "a", "b", "g" are the direction cosines and "rot" and "fb" are the rotation and fallback angles of the listed vector.
[[ELLG_PARAMETER_EDITING]]
=== ELLG PARAMETER EDITING
The ELLG general class represents all the ellipsoidal solids, including spheres and ellipsoids of revolution. The defining parameters of the ELLG are three mutually perpendicular vectors (A, B, and C) and the vertex (V). Reference 1 contains a more complete definition of these parameters. Figure 8 depicts typical ELLGs with these parameters labeled. When an ELLG is being edited, only vectors A and B are labeled on the display.
The parameter editing of the ELLG consists of scaling the lengths of the vectors A, B, C. These parameter editing options are listed in the menu:
----
ELLG MENU
scale A
scale B
scale C
----
The scaling of these vectors is done using the data tablet and pen in exactly the same manner as in object scaling. The "p" keyboard command again can be used to produce a vector of desired length.
The parameters of the ELLG are continually updated on the bottom of the screen during solid editing:
----
V x y z
A x y z |A| a b g rot fb
B x y z |B| a b g rot fb
C x y z |C| a b g rot fb
----
where "a", "b", "g" are the direction cosines and "rot" and "fb" are the rotation and fallback angles of the listed vector.
[[TOR_PARAMETER_EDITING]]
=== TOR PARAMETER EDITING
The TOR general class of solids contains only one type of torus, one with circular cross-sections. The defining parameters of the TOR are two radii (r1 and r2), a normal vector (N), and the vertex (V). The scalar r1 is the distance from the vertex to the midpoint of the circular cross section. The scalar r2 is the radius of the circular cross-section. The vector N is used to orient the torus. Reference 1 contains a more detailed definition of these parameters. Figure 9 depicts these parameters. During solid editing, none of these parameters are labeled on the screen.
The parameter editing of the TOR consists of scaling the radii, hence the menu contains only two members:
----
TORUS MENU
scale radius 1
scale radius 2
----
As before, the scaling of these radii are done using the data tablet and pen and the "p" keyboard command can be used to produce a radius of any desired length.
The parameters of the TOR are continually updated on the bottom of the screen during solid editing:
----
V x y z
r1 |r1|
r2 |r2|
N x y z a b g rot fb
----
where "a", "b", "g" are the direction cosines and "rot" and "fb" are the rotation and fallback angles of the vector N.
Table IV presents a summary of parameter editing for each of the general solid classes.
[[CONCLUSION]]
== CONCLUSION
BRL has developed the Army's first interactive solid modeling system, called GED. GED performs two basic functions: viewing and editing. The standard viewing capabilities of zooming, slewing, slicing, and rotation are available. Likewise, all the standard editing features are also available. The user easily traverses the hierarchical data structure, applying the editing functions of rotation, translation, and scaling to any position in the hierarchy. The hierarchical structure can be modified and regrouped and regions created and modified. Specific parameter editing can also be applied to the solids to produce any shape solid desired. GED has made great gains in reducing the bottleneck the target description process has been creating in the vulnerability process at BRL.
+19
View File
@@ -0,0 +1,19 @@
set(articles_HY about_hy.adoc)
if(TARGET mged OR TARGET qged OR TARGET archer)
if(BRLCAD_EXTRADOCS)
add_asciidoc("HTML" articles_HY articles/hy articles_EN_IMAGES_cp)
endif(BRLCAD_EXTRADOCS)
endif(TARGET mged OR TARGET qged OR TARGET archer)
cmakefiles(
CMakeLists.txt
${articles_HY}
)
# Local Variables:
# tab-width: 8
# mode: cmake
# indent-tabs-mode: t
# End:
# ex: shiftwidth=2 tabstop=8
+25
View File
@@ -0,0 +1,25 @@
= Օգտվողի մասին BRL-CAD
Christopher Sean Morrison <devs@brlcad.org>; Karen Mgebrova
:doctype: article
:toc:
:toclevels: 3
[[article-body]]
BRL-CAD հզոր խաչաձեւ հարթակի Open Source համակցական կառուցողական Պինդ Geometry (CSG) մոդելավորման ամուր համակարգ, որը ներառում է ինտերակտիվ 3D ամուր երկրաչափություն խմբագրում, բարձր կատարողական ճառագայթների-հետեւել աջակցություն ցուցաբերելու եւ երկրաչափական վերլուծություն, ցանցային բաշխված framebuffer աջակցություն, պատկերի եւ ազդանշանի մշակման գործիքների ուղին, տեղանքի պլանը գծելը եւ պրոտոնների քարտեզագրման աջակցություն իրական պատկերի սինթեզ է, որ համակարգի կատարողականի վերլուծությունը ելակետային Suite է, ներդրված scripting ինտերֆեյսի եւ գրադարանների համար առողջ արագագործ երկրաչափական ներկայացուցչության եւ վերլուծություն:
Ավելի քան 20 տարի, BRL-CAD եղել է հիմնական tri ծառայության ամուր մոդելավորում CAD համակարգի կողմից օգտագործվում է ԱՄՆ ռազմական եւ մոդելի զենք համակարգեր Խոցելիության եւ lethality վերլուծություններ: Կոշտ մոդելավորում համակարգը հաճախ օգտագործվում է մի շարք ռազմական, գիտական ​​եւ արդյունաբերական կիրառություններ այդ թվում `նախագծման եւ վերլուծություն տրանսպորտային միջոցների, մեխանիկական մասերի, եւ ճարտարապետությունը. Փաթեթը է նաեւ օգտագործվել ճառագայթման դոզան պլանավորման, բժշկական արտացոլման, համակարգչային գրաֆիկայի կրթության, CSG հայեցակարգերի եւ մոդելավորման կրթության եւ համակարգի կատարողականի ելակետային փորձարկման ի թիվս այլ նպատակների համար.
BRL-CAD աջակցում է մեծ տեսականի, այդ թվում `երկրաչափական ներկայացուցչությունների լայն շարք ավանդական CSG պարզունակ անուղղակի չոր, ինչպիսիք են տներ, ellipsoids, cones, եւ tori, ինչպես նաեւ բացահայտ չոր պատրաստված փակ հավաքածուներից միասնական B-Spline մակերեսներին, ոչ Uniform բանական B-Spline (NURBS) մակերեսների, N-Ջրաբաշխիչ Geometry (NMG), եւ զուտ faceted ցանց երկրաչափություն. Բոլոր երկրաչափական օբյեկտները կարող են համատեղվել օգտագործում են Բուլյան սահմանված-տեսական CSG գործողությունների, այդ թվում միության, խաչմերուկում, եւ տարբերությունը.
BRL-CAD եղել են ակտիվ զարգացման հետ դյուրատարություն ժառանգություն, որը ներառում է այնպիսի համակարգերը, որպես Դեկտեմբեր VAX-11/780 անընդմեջ 4.3 BSD, DECStations վազում ULTRIX, Սիլիկոնային գրաֆիկա 3030, 4D «Իրիս», O2, օնիքս, եւ ծագման համակարգերի վազում տարբեր տարբերակները IRIX, Sun Microsystems Sun, 3 – րդ եւ Sun-4 Sparcs վազում SunOS է, Cray 1, Cray X-պատգամավոր, Cray Y-պատգամավոր, եւ Cray 2 վազում UNICOS, Դեկտեմբեր Alpha AXP վազում OSF / 1, Apple Macintosh II վարման A / UX; iPSC/860 Hypercube վազում NX / 2, իսկ արտարժութային Alliant / 8, FX/80, եւ FX/2800. Gould / Encore sel PowerNode6000/9000 եւ NP1, ՀԱՋՈՐԴ workstations, IBM RS/6000, HPPA 9000/700 վազում HPUX, վառ / Stardent, Encore Multi-Max եւ շատ ավելին.
BRL-CAD մի հավաքածու է ավելի քան 400 գործիքներ, կոմունալ ծառայությունների, եւ ծրագրեր կազմող ավելի քան մեկ միլիոն գծերը կոդով.Փաթեթը, որը դիտավորյալ նախատեսված է լայնորեն խաչաձեւ պլատֆորմը, եւ ակտիվորեն զարգանում են եւ պահպանվում են ընդհանուր օպերացիոն համակարգ միջավայրում այդ թվում `BSD, Linux, Solaris, Mac OS X, եւ Windows եւ այլն: BRL-CAD, որը բաժանվում է երկուական եւ կոդով ձեւը, ինչպես նաեւ անվճար բաց կոդով ծրագրային ապահովում (FOSS), նախատեսված Open Source նախաձեռնություն (OSI) կողմից լիցենզիայի պայմանները:
[NOTE]
====
Mike Muuss սկսեց սկզբնական ճարտարապետության եւ նախագծման BRL-CAD դեռեւս 1979 թ. Մշակում, որպես միասնական փաթեթի սկսվել է 1983 թ. Առաջին հրապարակային թողարկումն իրականացվել է 1984 թ. BRL-CAD դարձավ բաց կոդով նախագիծ է 21 դեկտեմբերի 2004 թ.
====
Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Loaded 100 of 26056 files, more files were not shown because too many files have changed in this diff. Show more