Point clouds: lighting, 2D visual style, real-time density

Points carry their world normal: POINTCLOUDLIGHTING lights them in the
shaded visual styles (1 lit from both sides, 2 with back faces dark),
from the view (POINTCLOUDLIGHTSOURCE 0) or the default lights (1).
The 2D wireframe style draws no cloud points: a found cloud shows its
extents and "Point clouds are not displayed in 2D visual style.",
or nothing with POINTCLOUD2DVSDISPLAY 1. While the view moves only
POINTCLOUDRTDENSITY per cent of the points are drawn; the points are
stored in an order where every leading part samples the whole cloud.
The colour map dialog lists its schemes by name.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
ramox81andClaude Opus 5.5 committed 2026-09-30 14:54:03 +03:00
1 parent ee0d4aedb5
commit b69ae291bb
10 files changed
+202 -22

No files matched your search

+19 -6
View File
@@ -474,6 +474,17 @@ fn point_cloud_clip_lines(data: &PointCloudData) -> Vec<[f64; 3]> {
/// the scan file; the box only picks the cloud, unless the file cannot be
/// found: then the box shows, with the saved path written across it.
fn point_cloud_ex_lines(data: &PointCloudExData, document: &codec::CadDocument) -> Vec<[f64; 3]> {
let mut points = point_cloud_ex_box(data);
if crate::scene::model::point_cloud::resolve_source(document, data).is_none() {
let saved = crate::scene::model::point_cloud::definition(document, data)
.map(|definition| definition.source_filename.clone())
.unwrap_or_default();
append_missing_cloud_label(&mut points, data, &saved);
}
points
}
fn point_cloud_ex_box(data: &PointCloudExData) -> Vec<[f64; 3]> {
let corners = codec::entities::point_cloud_ex_corners(data).map(|c| [c.x, c.y, c.z]);
let mut points = Vec::new();
for a in 0..8 {
@@ -483,12 +494,14 @@ fn point_cloud_ex_lines(data: &PointCloudExData, document: &codec::CadDocument)
}
}
}
if crate::scene::model::point_cloud::resolve_source(document, data).is_none() {
let saved = crate::scene::model::point_cloud::definition(document, data)
.map(|definition| definition.source_filename.clone())
.unwrap_or_default();
append_missing_cloud_label(&mut points, data, &saved);
}
points
}
/// A cloud in the 2D wireframe visual style, which draws no points: its
/// extents box with the reference's message across the base.
pub(crate) fn point_cloud_2d_style_lines(data: &PointCloudExData) -> Vec<[f64; 3]> {
let mut points = point_cloud_ex_box(data);
append_missing_cloud_label(&mut points, data, "Point clouds are not displayed in 2D visual style.");
points
}