feat: node graph overlay; move to opencadcodec/opencadkernel/opencadgraph

The codec and kernel repositories and crates are renamed opencadcodec and
opencadkernel. Inside OCS they are depended on under short keys, so code
reads `codec::`, `kernel::` and the new `graph::` (opencadgraph, the node
graph engine). File-format and protocol spellings stay as they were: the
ACIS product id `acadrust`, the ACADRUST_* switches and the plugin
version keys `acadrust_version` / `acadrust_source`.

A button left of MCP on the command line opens a translucent node graph
over the viewport, with a palette of object, input, math, logic, list,
text and geometry nodes added by click or drag. An object node owns
drawing entities and its rows are the Properties panel's own rows for
them: the single-object page is extracted from refresh_properties as
entity_property_sections, values use the control protocol's
property_json, and writes go through set_property_value with a property
target override, so the panel, MCP and the graph share one read/write
path. A list reaching an object row makes one entity per element. Each
graph action is one undo step; the canvas pans and zooms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Hakan SevenandClaude Opus 5.5 committed 2026-09-25 07:34:23 +03:00
1 parent 56c04408d6
commit f537aff75c
430 files changed
+9925 -8540

No files matched your search

+91 -91
View File
@@ -1,9 +1,9 @@
// GPU rendering primitives, shader::Program / shader::Primitive impls,
// and entity render-style helpers for the Scene.
use acadrust::tables::LineType;
use acadrust::types::{Color as AcadColor, LineWeight};
use acadrust::{CadDocument, EntityType, Handle};
use codec::tables::LineType;
use codec::types::{Color as AcadColor, LineWeight};
use codec::{CadDocument, EntityType, Handle};
use glam::Mat4;
use iced::mouse;
use iced::widget::shader::{self, Viewport};
@@ -239,9 +239,9 @@ pub struct ViewportData {
/// so `prepare` can patch just those entities' slabs. `None` ⇒ full build.
pub(in crate::scene) wire_patch: Option<(u64, Arc<crate::scene::WireGpuPatch>)>,
/// Selected handles only (no hover) — solid meshes tint these blue.
pub(in crate::scene) selected_handles: Arc<rustc_hash::FxHashSet<acadrust::Handle>>,
pub(in crate::scene) selected_handles: Arc<rustc_hash::FxHashSet<codec::Handle>>,
/// Currently hovered selectable unit — solid meshes tint it orange.
pub(in crate::scene) hover_handles: Arc<rustc_hash::FxHashSet<acadrust::Handle>>,
pub(in crate::scene) hover_handles: Arc<rustc_hash::FxHashSet<codec::Handle>>,
/// Bumped on selection / hover change. Paired with `wire_content_id` to
/// decide when the xray overlay batch needs rebuilding.
pub(in crate::scene) selection_generation: u64,
@@ -274,7 +274,7 @@ pub struct Primitive {
}
/// Flags the render pipeline consumes, derived from
/// [`acadrust::entities::ViewportRenderMode`]. Each shaded variant fills
/// [`codec::entities::ViewportRenderMode`]. Each shaded variant fills
/// 3D faces and meshes; the pure wireframes drop the fill and keep only
/// edges. The optimized 2-D wireframe retains planar SOLID interiors and
/// entity draw order; the 3-D wireframe uses true depth and outlines them.
@@ -297,9 +297,9 @@ pub struct RenderModeFlags {
}
pub fn render_mode_flags(
mode: acadrust::entities::ViewportRenderMode,
mode: codec::entities::ViewportRenderMode,
) -> RenderModeFlags {
use acadrust::entities::ViewportRenderMode as M;
use codec::entities::ViewportRenderMode as M;
match mode {
M::Wireframe2D => RenderModeFlags {
face3d_fill: false,
@@ -672,11 +672,11 @@ impl shader::Primitive for Primitive {
// scanned/parses all resident wires repeatedly here even
// though WireArena emits just one changed entity.
let mut regular_changed: rustc_hash::FxHashMap<
acadrust::Handle,
codec::Handle,
Vec<&crate::scene::WireModel>,
> = rustc_hash::FxHashMap::default();
let mut mesh_changed: rustc_hash::FxHashMap<
acadrust::Handle,
codec::Handle,
Vec<&crate::scene::WireModel>,
> = rustc_hash::FxHashMap::default();
if let Some(patch) = patch {
@@ -767,7 +767,7 @@ impl shader::Primitive for Primitive {
wire.name
.parse::<u64>()
.ok()
.map(acadrust::Handle::new)
.map(codec::Handle::new)
})
.collect();
} else if inner.wire_arena_fallback_kind == Some(false) {
@@ -804,7 +804,7 @@ impl shader::Primitive for Primitive {
wire.name
.parse::<u64>()
.ok()
.map(acadrust::Handle::new)
.map(codec::Handle::new)
})
.collect();
} else if inner.wire_arena_fallback_kind == Some(true) {
@@ -1936,8 +1936,8 @@ fn normalized_direction(value: [f64; 3], fallback: [f32; 3]) -> [f32; 3] {
}
fn solar_direction(
sun: &acadrust::objects::Sun,
geo: &acadrust::objects::GeoData,
sun: &codec::objects::Sun,
geo: &codec::objects::GeoData,
) -> Option<[f32; 3]> {
if sun.julian_day < 1_000_000 {
return None;
@@ -2036,7 +2036,7 @@ text_atlas={:.1} wire_arena={:.1} block_geometry={:.1}",
}
impl Scene {
fn model_tile_vport(&self, index: usize) -> Option<&acadrust::tables::VPort> {
fn model_tile_vport(&self, index: usize) -> Option<&codec::tables::VPort> {
let rect = self.model_tiles.borrow().get(index)?.rect;
let lower_left = [rect.x as f64, (1.0 - rect.y - rect.height) as f64];
let upper_right = [
@@ -2084,8 +2084,8 @@ impl Scene {
})
}
fn geolocation(&self) -> Option<&acadrust::objects::GeoData> {
use acadrust::objects::ObjectType;
fn geolocation(&self) -> Option<&codec::objects::GeoData> {
use codec::objects::ObjectType;
crate::entities::object_data::geo_objects(&self.object_data_cache)
.iter()
@@ -2105,9 +2105,9 @@ impl Scene {
target_block: Handle,
frozen: &rustc_hash::FxHashSet<Handle>,
) -> Vec<SceneLight> {
use acadrust::objects::{ClassObjectData, ObjectType};
use codec::objects::{ClassObjectData, ObjectType};
fn converted(scene: &Scene, light: &acadrust::entities::Light) -> Option<SceneLight> {
fn converted(scene: &Scene, light: &codec::entities::Light) -> Option<SceneLight> {
if !light.status {
return None;
}
@@ -2353,8 +2353,8 @@ impl Scene {
None => self.document.objects.get(&light.handle).is_some_and(|object| {
matches!(
object,
acadrust::objects::ObjectType::ClassObject(value)
if matches!(&value.data, acadrust::objects::ClassObjectData::Sun(_))
codec::objects::ObjectType::ClassObject(value)
if matches!(&value.data, codec::objects::ClassObjectData::Sun(_))
) && (!settings.sun_handle.is_valid()
|| settings.sun_handle == light.handle)
}),
@@ -2507,13 +2507,13 @@ impl Scene {
[r as f32 / 255.0, g as f32 / 255.0, b as f32 / 255.0]
})
};
let from_entity = |value: &acadrust::entities::Viewport| ViewportLightingSettings {
let from_entity = |value: &codec::entities::Viewport| ViewportLightingSettings {
force_default: value.default_lighting,
default_type: value.default_lighting_type,
ambient: ambient(&value.ambient_color),
sun_handle: value.sun_handle,
};
let from_table = |value: &acadrust::tables::VPort| ViewportLightingSettings {
let from_table = |value: &codec::tables::VPort| ViewportLightingSettings {
force_default: value.use_default_lights,
default_type: value.default_lighting_type,
ambient: ambient(&value.ambient_color),
@@ -2784,7 +2784,7 @@ impl Scene {
}
fn resolve_document_render_environment(&self) -> CachedDocumentRenderEnvironment {
use acadrust::objects::{ClassObjectData, ObjectType};
use codec::objects::{ClassObjectData, ObjectType};
let mut result = CachedDocumentRenderEnvironment::default();
@@ -2823,8 +2823,8 @@ impl Scene {
(env, pre)
} else {
let mut best_env: Option<(acadrust::Handle, &acadrust::objects::RenderEnvironment)> = None;
let mut best_preset: Option<(acadrust::Handle, &acadrust::objects::RenderSettings)> = None;
let mut best_env: Option<(codec::Handle, &codec::objects::RenderEnvironment)> = None;
let mut best_preset: Option<(codec::Handle, &codec::objects::RenderSettings)> = None;
for (handle, object) in &self.document.objects {
if let ObjectType::ClassObject(value) = object {
@@ -2950,7 +2950,7 @@ impl Scene {
canvas: [f32; 4],
depth: usize,
) -> ViewportBackgroundSettings {
use acadrust::objects::{ClassObjectData, ObjectType};
use codec::objects::{ClassObjectData, ObjectType};
if depth > 4 || !handle.is_valid() {
return ViewportBackgroundSettings::canvas(canvas);
@@ -3336,7 +3336,7 @@ impl Scene {
boundary_exterior: None,
boundary_sources: None,
boundary_paths: None,
style: acadrust::entities::HatchStyleType::Normal,
style: codec::entities::HatchStyleType::Normal,
pattern: pattern.clone(),
name: "PLOTSTYLE".to_string(),
color,
@@ -3385,7 +3385,7 @@ pub(in crate::scene) fn linetype_name_for<'a>(document: &'a CadDocument, e: &'a
pub(in crate::scene) fn linetype_name_for_common_viewport<'a>(
document: &'a CadDocument,
common: &'a acadrust::entities::EntityCommon,
common: &'a codec::entities::EntityCommon,
viewport: Option<Handle>,
) -> &'a str {
let elt = &common.linetype;
@@ -3395,7 +3395,7 @@ pub(in crate::scene) fn linetype_name_for_common_viewport<'a>(
document,
&common.layer,
viewport,
acadrust::objects::KnownXRecordKind::LayerViewportLinetypeOverride,
codec::objects::KnownXRecordKind::LayerViewportLinetypeOverride,
)
.and_then(|value| value.as_handle())
{
@@ -3435,8 +3435,8 @@ fn viewport_override(
document: &CadDocument,
layer_name: &str,
viewport: Option<Handle>,
kind: acadrust::objects::KnownXRecordKind,
) -> Option<acadrust::objects::XRecordValue> {
kind: codec::objects::KnownXRecordKind,
) -> Option<codec::objects::XRecordValue> {
let viewport = viewport.filter(|handle| handle.is_valid())?;
let layer = document.layers.get(layer_name)?;
document
@@ -3447,7 +3447,7 @@ fn viewport_override(
pub(crate) fn render_style_for_common_viewport(
document: &CadDocument,
common: &acadrust::entities::EntityCommon,
common: &codec::entities::EntityCommon,
viewport: Option<Handle>,
) -> ([f32; 4], f32, [f32; 8], f32, u8) {
let layer_name = &common.layer;
@@ -3457,7 +3457,7 @@ pub(crate) fn render_style_for_common_viewport(
.filter(|handle| handle.is_valid())
.and_then(|handle| document.objects.get(&handle))
.and_then(|object| match object {
acadrust::objects::ObjectType::BookColor(book) => Some(&book.color),
codec::objects::ObjectType::BookColor(book) => Some(&book.color),
_ => None,
});
let ec = book_color.unwrap_or(&common.color);
@@ -3467,7 +3467,7 @@ pub(crate) fn render_style_for_common_viewport(
document,
layer_name,
viewport,
acadrust::objects::KnownXRecordKind::LayerViewportColorOverride,
codec::objects::KnownXRecordKind::LayerViewportColorOverride,
)
.and_then(|value| value.as_i32())
.map(AcadColor::from_true_color_value)
@@ -3495,10 +3495,10 @@ pub(crate) fn render_style_for_common_viewport(
document,
layer_name,
viewport,
acadrust::objects::KnownXRecordKind::LayerViewportAlphaOverride,
codec::objects::KnownXRecordKind::LayerViewportAlphaOverride,
)
.and_then(|value| value.as_i32())
.map(|value| acadrust::types::Transparency::from_alpha_value(value as u32))
.map(|value| codec::types::Transparency::from_alpha_value(value as u32))
} else {
None
};
@@ -3525,7 +3525,7 @@ pub(crate) fn render_style_for_common_viewport(
document,
layer_name,
viewport,
acadrust::objects::KnownXRecordKind::LayerViewportLineweightOverride,
codec::objects::KnownXRecordKind::LayerViewportLineweightOverride,
)
.and_then(|value| value.as_i32())
.map(|value| LineWeight::from_value(value as i16))
@@ -3554,13 +3554,13 @@ pub(crate) fn render_style_for_viewport(
pub(crate) fn has_resolved_book_color_common(
document: &CadDocument,
common: &acadrust::entities::EntityCommon,
common: &codec::entities::EntityCommon,
) -> bool {
common
.color_book_handle
.filter(|handle| handle.is_valid())
.and_then(|handle| document.objects.get(&handle))
.is_some_and(|object| matches!(object, acadrust::objects::ObjectType::BookColor(_)))
.is_some_and(|object| matches!(object, codec::objects::ObjectType::BookColor(_)))
}
pub(crate) fn has_resolved_book_color(document: &CadDocument, e: &EntityType) -> bool {
@@ -3608,7 +3608,7 @@ pub(crate) fn layer_render_style_viewport(
document,
layer_name,
viewport,
acadrust::objects::KnownXRecordKind::LayerViewportColorOverride,
codec::objects::KnownXRecordKind::LayerViewportColorOverride,
)
.and_then(|value| value.as_i32())
.map(AcadColor::from_true_color_value)
@@ -3625,10 +3625,10 @@ pub(crate) fn layer_render_style_viewport(
document,
layer_name,
viewport,
acadrust::objects::KnownXRecordKind::LayerViewportAlphaOverride,
codec::objects::KnownXRecordKind::LayerViewportAlphaOverride,
)
.and_then(|value| value.as_i32())
.map(|value| acadrust::types::Transparency::from_alpha_value(value as u32))
.map(|value| codec::types::Transparency::from_alpha_value(value as u32))
.or_else(|| layer.map(|layer| layer.transparency))
.map(|transparency| 1.0 - transparency.as_percent() as f32)
.unwrap_or(1.0)
@@ -3643,7 +3643,7 @@ pub(crate) fn layer_render_style_viewport(
document,
layer_name,
viewport,
acadrust::objects::KnownXRecordKind::LayerViewportLinetypeOverride,
codec::objects::KnownXRecordKind::LayerViewportLinetypeOverride,
)
.and_then(|value| value.as_handle())
.and_then(|handle| document.line_types.iter().find(|line_type| line_type.handle == handle))
@@ -3660,7 +3660,7 @@ pub(crate) fn layer_render_style_viewport(
document,
layer_name,
viewport,
acadrust::objects::KnownXRecordKind::LayerViewportLineweightOverride,
codec::objects::KnownXRecordKind::LayerViewportLineweightOverride,
)
.and_then(|value| value.as_i32())
.map(|value| LineWeight::from_value(value as i16))
@@ -4053,7 +4053,7 @@ impl Scene {
for index in [pair_start, pair_start + 1] {
let high = edges[index];
let low = edges_low.get(index).copied().unwrap_or([0.0; 3]);
let local = acadrust::types::Vector3::new(
let local = codec::types::Vector3::new(
high[0] as f64 + low[0] as f64,
high[1] as f64 + low[1] as f64,
high[2] as f64 + low[2] as f64,
@@ -4131,7 +4131,7 @@ impl Scene {
continue;
}
let context_scale = match self.document.objects.get(&scale) {
Some(acadrust::objects::ObjectType::Scale(value)) => {
Some(codec::objects::ObjectType::Scale(value)) => {
(value.inverse_factor() / self.annotation_scale_unit_factor()) as f32
}
_ => annotation_scale,
@@ -4177,7 +4177,7 @@ impl Scene {
pub fn build_viewports(
&self,
bounds: Rectangle,
model_render_mode: acadrust::entities::ViewportRenderMode,
model_render_mode: codec::entities::ViewportRenderMode,
_hover_region: Option<usize>,
show_viewcube: bool,
show_interaction: bool,
@@ -4240,7 +4240,7 @@ impl Scene {
&self,
bounds: Rectangle,
tile_idx: usize,
model_render_mode: acadrust::entities::ViewportRenderMode,
model_render_mode: codec::entities::ViewportRenderMode,
show_viewcube: bool,
show_interaction: bool,
viewcube_text_color: [f32; 4],
@@ -4387,7 +4387,7 @@ impl Scene {
// borders — NOT the projected viewport content (the GPU content
// viewports draw that themselves).
self.paper_sheet_wires_arc()
} else if inst.handle == acadrust::Handle::NULL {
} else if inst.handle == codec::Handle::NULL {
self.entity_wires_arc()
} else {
self.model_wires_for_viewport_arc(inst.handle, full.height)
@@ -4479,7 +4479,7 @@ impl Scene {
// incremental patch's base id receives the same tag, preserving the
// arena fast path after the first mode switch.
let wire_mode_tag = u64::from(
inst.render_mode == acadrust::entities::ViewportRenderMode::Wireframe3D,
inst.render_mode == codec::entities::ViewportRenderMode::Wireframe3D,
);
let wire_content_id = base_wire_content_id
.wrapping_mul(2)
@@ -4535,7 +4535,7 @@ impl Scene {
// layers too, matching the already-filtered resident wire set.
let vp_frozen: rustc_hash::FxHashSet<Handle> = if !inst.paper_sheet
&& inst.tile_idx.is_none()
&& inst.handle != acadrust::Handle::NULL
&& inst.handle != codec::Handle::NULL
{
match self.document.get_entity(inst.handle) {
Some(EntityType::Viewport(vp)) => vp.frozen_layers.iter().cloned().collect(),
@@ -4741,13 +4741,13 @@ impl Scene {
0x1000_0000_0000_0000
} else if inst.paper_sheet {
0x2000_0000_0000_0000 | self.current_layout_block_handle().value()
} else if inst.handle == acadrust::Handle::NULL {
} else if inst.handle == codec::Handle::NULL {
0x4000_0000_0000_0000 | self.current_layout_block_handle().value()
} else {
0x3000_0000_0000_0000 | inst.handle.value()
};
let draw_depths = if inst.render_mode
== acadrust::entities::ViewportRenderMode::Wireframe3D
== codec::entities::ViewportRenderMode::Wireframe3D
{
Arc::clone(&self.no_draw_depths)
} else {
@@ -4795,7 +4795,7 @@ impl Scene {
// rectangle and need no stencil boundary.
let clip_boundary_ndc = if !inst.paper_sheet
&& inst.tile_idx.is_none()
&& inst.handle != acadrust::Handle::NULL
&& inst.handle != codec::Handle::NULL
&& self.current_layout != "Model"
{
Arc::new(self.viewport_clip_boundary_ndc(inst.handle, uo, vo, us, vs))
@@ -4912,7 +4912,7 @@ impl Scene {
// ── Linetype pattern helper ───────────────────────────────────────────────
pub(crate) fn resolve_pattern(
table: &acadrust::tables::Table<LineType>,
table: &codec::tables::Table<LineType>,
name: &str,
scale: f32,
) -> (f32, [f32; 8]) {
@@ -4958,7 +4958,7 @@ pub(crate) fn resolve_pattern(
/// Whether a wire belongs to a Face3D entity, by document handle lookup —
/// so no changes to WireModel are needed.
#[allow(dead_code)]
fn is_face3d_wire(w: &WireModel, document: &acadrust::CadDocument) -> bool {
fn is_face3d_wire(w: &WireModel, document: &codec::CadDocument) -> bool {
w.name
.parse::<u64>()
.ok()
@@ -4973,7 +4973,7 @@ fn is_face3d_wire(w: &WireModel, document: &acadrust::CadDocument) -> bool {
#[allow(dead_code)]
fn split_face3d_wires(
wires: &[WireModel],
document: &acadrust::CadDocument,
document: &codec::CadDocument,
) -> (Vec<WireModel>, Vec<WireModel>) {
let face3d_handles: rustc_hash::FxHashSet<u64> = document
.entities()
@@ -5017,9 +5017,9 @@ fn split_face3d_wires_with_handles(
#[cfg(test)]
mod layer0_inherit_tests {
use super::*;
use acadrust::entities::Line;
use acadrust::tables::Layer;
use acadrust::types::{Color, Transparency};
use codec::entities::Line;
use codec::tables::Layer;
use codec::types::{Color, Transparency};
// ACI: 1 = red, 3 = green, 7 = white. Distinct, so the assertions below
// can tell "inherited the insert layer" from "kept layer 0".
@@ -5139,9 +5139,9 @@ mod layer0_inherit_tests {
let mut scene = Scene::new();
assert!(!scene.has_face3d());
scene.add_entity(EntityType::Line(acadrust::entities::Line::from_points(
acadrust::types::Vector3::new(0.0, 0.0, 0.0),
acadrust::types::Vector3::new(10.0, 10.0, 0.0),
scene.add_entity(EntityType::Line(codec::entities::Line::from_points(
codec::types::Vector3::new(0.0, 0.0, 0.0),
codec::types::Vector3::new(10.0, 10.0, 0.0),
)));
assert!(!scene.has_face3d());
@@ -5158,17 +5158,17 @@ mod layer0_inherit_tests {
assert_eq!(bg.fog_params, bg2.fog_params);
// Test multiple Face3D additions and removals
let face1 = acadrust::entities::Face3D::new(
acadrust::types::Vector3::new(0.0, 0.0, 0.0),
acadrust::types::Vector3::new(10.0, 0.0, 0.0),
acadrust::types::Vector3::new(10.0, 10.0, 0.0),
acadrust::types::Vector3::new(0.0, 10.0, 0.0),
let face1 = codec::entities::Face3D::new(
codec::types::Vector3::new(0.0, 0.0, 0.0),
codec::types::Vector3::new(10.0, 0.0, 0.0),
codec::types::Vector3::new(10.0, 10.0, 0.0),
codec::types::Vector3::new(0.0, 10.0, 0.0),
);
let face2 = acadrust::entities::Face3D::new(
acadrust::types::Vector3::new(10.0, 0.0, 0.0),
acadrust::types::Vector3::new(20.0, 0.0, 0.0),
acadrust::types::Vector3::new(20.0, 10.0, 0.0),
acadrust::types::Vector3::new(10.0, 10.0, 0.0),
let face2 = codec::entities::Face3D::new(
codec::types::Vector3::new(10.0, 0.0, 0.0),
codec::types::Vector3::new(20.0, 0.0, 0.0),
codec::types::Vector3::new(20.0, 10.0, 0.0),
codec::types::Vector3::new(10.0, 10.0, 0.0),
);
let fh1 = scene.add_entity(EntityType::Face3D(face1));
assert!(scene.has_face3d());
@@ -5186,11 +5186,11 @@ mod layer0_inherit_tests {
assert!(!scene.has_face3d(), "has_face3d must become false when all Face3Ds are removed");
// bump_geometry_no_blocks must also invalidate has_face3d
let fh3 = scene.add_entity(EntityType::Face3D(acadrust::entities::Face3D::new(
acadrust::types::Vector3::new(0.0, 0.0, 0.0),
acadrust::types::Vector3::new(1.0, 1.0, 1.0),
acadrust::types::Vector3::new(2.0, 2.0, 2.0),
acadrust::types::Vector3::new(3.0, 3.0, 3.0),
let fh3 = scene.add_entity(EntityType::Face3D(codec::entities::Face3D::new(
codec::types::Vector3::new(0.0, 0.0, 0.0),
codec::types::Vector3::new(1.0, 1.0, 1.0),
codec::types::Vector3::new(2.0, 2.0, 2.0),
codec::types::Vector3::new(3.0, 3.0, 3.0),
)));
assert!(scene.has_face3d());
scene.document.remove_entity(fh3);
@@ -5200,18 +5200,18 @@ mod layer0_inherit_tests {
#[test]
fn split_face3d_wires_correctness_and_parity() {
let mut doc = acadrust::CadDocument::new();
let face = acadrust::entities::Face3D::new(
acadrust::types::Vector3::new(0.0, 0.0, 0.0),
acadrust::types::Vector3::new(10.0, 0.0, 0.0),
acadrust::types::Vector3::new(10.0, 10.0, 0.0),
acadrust::types::Vector3::new(0.0, 10.0, 0.0),
let mut doc = codec::CadDocument::new();
let face = codec::entities::Face3D::new(
codec::types::Vector3::new(0.0, 0.0, 0.0),
codec::types::Vector3::new(10.0, 0.0, 0.0),
codec::types::Vector3::new(10.0, 10.0, 0.0),
codec::types::Vector3::new(0.0, 10.0, 0.0),
);
let face_h = doc.add_entity(EntityType::Face3D(face)).unwrap();
let line = acadrust::entities::Line::from_points(
acadrust::types::Vector3::new(0.0, 0.0, 0.0),
acadrust::types::Vector3::new(5.0, 5.0, 0.0),
let line = codec::entities::Line::from_points(
codec::types::Vector3::new(0.0, 0.0, 0.0),
codec::types::Vector3::new(5.0, 5.0, 0.0),
);
let line_h = doc.add_entity(EntityType::Line(line)).unwrap();
@@ -5283,7 +5283,7 @@ mod layer0_inherit_tests {
fn render_environment_objects_cache_and_apply() {
let mut scene = Scene::new();
let mut renv = acadrust::objects::RenderEnvironment::default();
let mut renv = codec::objects::RenderEnvironment::default();
renv.fog_enabled = true;
renv.fog_color = [100, 150, 200];
renv.fog_background_enabled = true;
@@ -5295,8 +5295,8 @@ mod layer0_inherit_tests {
let handle = Handle::new(42);
scene.document.objects.insert(
handle,
acadrust::objects::ObjectType::ClassObject(acadrust::objects::ClassObject::new(
acadrust::objects::ClassObjectData::RenderEnvironment(renv),
codec::objects::ObjectType::ClassObject(codec::objects::ClassObject::new(
codec::objects::ClassObjectData::RenderEnvironment(renv),
)),
);
scene.object_data_cache = crate::entities::object_data::build_cache(&scene.document);