forked from 1b-agent/opencadstudio-upstream
plot styles: the CTB/STB model and codec come from the codec crate
Cargo: codec d36331d, kernel 60f086b, graph 74aac56. The table model and its file codec now live in `codec::plot_style` (opencadcodec#53) and are re-exported here. What stays is where tables come from: the plot styles folder, the session registry, the shipped tables, and saving to disk, as the `PlotStyleTableExt` trait. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1070361c0a
commit
74df9ff84a
15 files changed
+55
-981
No files matched your search
Generated
+4
-4
@@ -4373,7 +4373,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "opencadcodec"
|
||||
version = "0.6.0"
|
||||
source = "git+https://github.com/HakanSeven12/opencadcodec.git?rev=eaa6d79#eaa6d79155b7364196bb3bfde37a03f2d9cc375f"
|
||||
source = "git+https://github.com/HakanSeven12/opencadcodec.git?rev=d36331d#d36331d9e4f01576cdd29e8420caeb6503675c2c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bitflags 2.13.1",
|
||||
@@ -4396,7 +4396,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "opencadgraph"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/HakanSeven12/opencadgraph.git?rev=9c17779#9c17779c9858e96f928166daa21c75aecc7e43e0"
|
||||
source = "git+https://github.com/HakanSeven12/opencadgraph.git?rev=74aac56#74aac563a09388489834a1cbafc1b3893a739802"
|
||||
dependencies = [
|
||||
"opencadkernel",
|
||||
"serde_json",
|
||||
@@ -4405,7 +4405,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "opencadkernel"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/HakanSeven12/opencadkernel.git?rev=bb355ca#bb355ca908dad6dba2e556bc85e3cebbb7e3cb60"
|
||||
source = "git+https://github.com/HakanSeven12/opencadkernel.git?rev=60f086b#60f086bd6200924f9f96f31de4722d1216bb29b9"
|
||||
dependencies = [
|
||||
"cavalier_contours",
|
||||
"opencadcodec",
|
||||
@@ -4416,7 +4416,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "opencadkernel-constraints"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/HakanSeven12/opencadkernel.git?rev=bb355ca#bb355ca908dad6dba2e556bc85e3cebbb7e3cb60"
|
||||
source = "git+https://github.com/HakanSeven12/opencadkernel.git?rev=60f086b#60f086bd6200924f9f96f31de4722d1216bb29b9"
|
||||
dependencies = [
|
||||
"nalgebra",
|
||||
]
|
||||
|
||||
+4
-4
@@ -37,10 +37,10 @@ rfd = "0.17"
|
||||
clap = { version = "4", features = ["derive", "string"] }
|
||||
env_logger = "0.11"
|
||||
log = "0.4"
|
||||
codec = { package = "opencadcodec", git = "https://github.com/HakanSeven12/opencadcodec.git", rev = "eaa6d79", features = ["serde"] }
|
||||
kernel = { package = "opencadkernel", git = "https://github.com/HakanSeven12/opencadkernel.git", rev = "bb355ca", features = ["acis", "offset"] }
|
||||
kernel-constraints = { package = "opencadkernel-constraints", git = "https://github.com/HakanSeven12/opencadkernel.git", rev = "bb355ca" }
|
||||
graph = { package = "opencadgraph", git = "https://github.com/HakanSeven12/opencadgraph.git", rev = "9c17779" }
|
||||
codec = { package = "opencadcodec", git = "https://github.com/HakanSeven12/opencadcodec.git", rev = "d36331d", features = ["serde"] }
|
||||
kernel = { package = "opencadkernel", git = "https://github.com/HakanSeven12/opencadkernel.git", rev = "60f086b", features = ["acis", "offset"] }
|
||||
kernel-constraints = { package = "opencadkernel-constraints", git = "https://github.com/HakanSeven12/opencadkernel.git", rev = "60f086b" }
|
||||
graph = { package = "opencadgraph", git = "https://github.com/HakanSeven12/opencadgraph.git", rev = "74aac56" }
|
||||
dwg-thumbnailer = { path = "crates/dwg-thumbnailer" }
|
||||
# Shared SAVE serialization dispatch + web-worker wire format: one
|
||||
# implementation for the inline (fallback/native) path and the worker path.
|
||||
|
||||
@@ -15,7 +15,7 @@ serde_json = { version = "1", optional = true }
|
||||
# Pulled in only by the `host` feature, which adds the `opencadcodec`-typed
|
||||
# `HostApi` runtime surface. The default crate stays dependency-free so engine
|
||||
# crates and external tooling can depend on the manifest/ribbon contract cheaply.
|
||||
codec = { package = "opencadcodec", git = "https://github.com/HakanSeven12/opencadcodec.git", rev = "eaa6d79", optional = true, features = ["serde"] }
|
||||
codec = { package = "opencadcodec", git = "https://github.com/HakanSeven12/opencadcodec.git", rev = "d36331d", optional = true, features = ["serde"] }
|
||||
|
||||
# Runtime IPC and serialization (host feature only).
|
||||
interprocess = { version = "2", optional = true }
|
||||
@@ -39,7 +39,7 @@ serde_json = "1"
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
cargo-lock = "11"
|
||||
# opencadcodec is scanned at build time to generate the embedded type registry.
|
||||
codec = { package = "opencadcodec", git = "https://github.com/HakanSeven12/opencadcodec.git", rev = "eaa6d79", features = ["serde"] }
|
||||
codec = { package = "opencadcodec", git = "https://github.com/HakanSeven12/opencadcodec.git", rev = "d36331d", features = ["serde"] }
|
||||
|
||||
[dev-dependencies]
|
||||
serde_json = "1"
|
||||
@@ -10,6 +10,6 @@ publish = false
|
||||
# exactly one implementation. No UI/app dependencies — only the codec + serde.
|
||||
|
||||
[dependencies]
|
||||
codec = { package = "opencadcodec", git = "https://github.com/HakanSeven12/opencadcodec.git", rev = "eaa6d79", features = ["serde"] }
|
||||
codec = { package = "opencadcodec", git = "https://github.com/HakanSeven12/opencadcodec.git", rev = "d36331d", features = ["serde"] }
|
||||
bincode = "1.3"
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
@@ -8,7 +8,7 @@ publish = false
|
||||
crate-type = ["cdylib"]
|
||||
|
||||
[dependencies]
|
||||
codec = { package = "opencadcodec", git = "https://github.com/HakanSeven12/opencadcodec.git", rev = "eaa6d79", features = ["serde"] }
|
||||
codec = { package = "opencadcodec", git = "https://github.com/HakanSeven12/opencadcodec.git", rev = "d36331d", features = ["serde"] }
|
||||
bincode = "1.3"
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
console_error_panic_hook = "0.1"
|
||||
|
||||
Generated
+1
-1
@@ -1264,7 +1264,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "opencadcodec"
|
||||
version = "0.6.0"
|
||||
source = "git+https://github.com/HakanSeven12/opencadcodec.git?rev=eaa6d79#eaa6d79155b7364196bb3bfde37a03f2d9cc375f"
|
||||
source = "git+https://github.com/HakanSeven12/opencadcodec.git?rev=d36331d#d36331d9e4f01576cdd29e8420caeb6503675c2c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bitflags",
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
use super::*;
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
use crate::io::plot_style::PlotStyleTableExt as _;
|
||||
|
||||
impl OpenCADStudio {
|
||||
pub(super) fn dispatch_fileops(&mut self, cmd: &str, i: usize) -> Option<Task<Message>> {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
use crate::io::plot_style::PlotStyleTableExt as _;
|
||||
use super::*;
|
||||
use crate::scene::model::object::PropValue;
|
||||
|
||||
|
||||
@@ -66,6 +66,7 @@ pub use settings::MAX_SELECTED_GRIPS;
|
||||
/// as they are; only these two names are reachable externally.
|
||||
pub use settings::{CursorType, IsoPlane};
|
||||
|
||||
use crate::io::plot_style::PlotStyleTableExt as _;
|
||||
use document::DocumentTab;
|
||||
|
||||
use crate::modules::ModuleEvent;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
//! `file` arms and helpers, split out of the original `update.rs` (#mechanical decomposition).
|
||||
|
||||
#![allow(unused_imports)]
|
||||
use crate::io::plot_style::PlotStyleTableExt as _;
|
||||
use super::util::*;
|
||||
use super::{format_size, VIEWCUBE_HIT_SIZE};
|
||||
use crate::app::helpers::{
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
use crate::io::plot_style::PlotStyleTableExt as _;
|
||||
use super::{ArrowKey, Message, OpenCADStudio, TextEntryMode};
|
||||
use crate::command::CadCommand;
|
||||
use crate::scene::VIEWCUBE_DRAW_PX;
|
||||
|
||||
@@ -51,6 +51,8 @@ pub mod windows_media;
|
||||
pub mod xref;
|
||||
pub mod xref_model;
|
||||
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
use crate::io::plot_style::PlotStyleTableExt as _;
|
||||
use crate::scene::DerivedCaches;
|
||||
use codec::entities::EntityType;
|
||||
// The path-based readers are native-only; web parsing runs through the
|
||||
|
||||
@@ -2700,6 +2700,7 @@ pub(crate) fn pdf_stream_text(bytes: &[u8]) -> String {
|
||||
|
||||
#[cfg(all(test, not(target_arch = "wasm32")))]
|
||||
mod tests {
|
||||
use crate::io::plot_style::PlotStyleTableExt as _;
|
||||
use super::*;
|
||||
|
||||
fn test_page(wires: Vec<PlotWire>) -> PdfPageInput {
|
||||
|
||||
+31
-968
File diff suppressed because it is too large.
Load diff
@@ -1,6 +1,7 @@
|
||||
// GPU rendering primitives, shader::Program / shader::Primitive impls,
|
||||
// and entity render-style helpers for the Scene.
|
||||
|
||||
use crate::io::plot_style::PlotStyleTableExt as _;
|
||||
use codec::tables::LineType;
|
||||
use codec::types::{Color as AcadColor, LineWeight};
|
||||
use codec::{CadDocument, EntityType, Handle};
|
||||
|
||||
Reference in new issue
Block a user