feat: preserve adaptive sketch profiles and curved modeling workflows
This commit is contained in:
1 parent
4c4a0449a4
commit
4e595deff2
62 files changed
+7114
-362
No files matched your search
@@ -9,6 +9,8 @@ pub struct OffsetChain {
|
||||
pub outputs: Vec<String>,
|
||||
pub distance: f64,
|
||||
pub closed: bool,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub topology: Option<crate::offset_topology::OffsetTopology>,
|
||||
}
|
||||
|
||||
impl Sketch {
|
||||
@@ -57,7 +59,11 @@ impl Sketch {
|
||||
}
|
||||
|
||||
fn refresh_analytic_offsets(&mut self) -> Result<(), SketchError> {
|
||||
for offset in self.offsets.clone() {
|
||||
for index in 0..self.offsets.len() {
|
||||
if self.refresh_convex_offset(index)? {
|
||||
continue;
|
||||
}
|
||||
let offset = self.offsets.get(index).cloned().ok_or_else(|| SketchError::Invalid("missing offset chain".into()))?;
|
||||
if offset.sources.len() != offset.outputs.len() || offset.sources.len() > 10_000 || !offset.distance.is_finite() {
|
||||
return Err(SketchError::Invalid("damaged offset chain".into()));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user