fix: correct polyline arc direction, text precision, Face3D edge color, buffer chunking
- fix: polyline arc center sign was inverted (- → +) causing arcs to render on the wrong side in LwPolyline and Polyline2D - fix: store glyph strokes in local space with f64 origin so world_offset subtraction uses f64 precision; prevents blocky text at large UTM coordinates - fix: Face3D fill darkened to 45% so edge wires are visually distinct from fill - fix: wire batch vertex buffer chunked to 256 MB GPU limit (was panic on large files) - fix: gpu_face3d_edges changed from Option<WireGpu> to Vec<WireGpu> to support chunks Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
02203dba93
commit
1a19a841e6
11 changed files with 136 additions and 113 deletions
|
|
@ -5,7 +5,7 @@ use crate::command::EntityTransform;
|
|||
use crate::entities::common::{edit_prop as edit, ro_prop as ro, square_grip};
|
||||
use crate::entities::text_support::resolve_text_style;
|
||||
use crate::entities::traits::{Grippable, PropertyEditable, Transformable, TruckConvertible};
|
||||
use crate::scene::acad_to_truck::{TruckEntity, TruckObject};
|
||||
use crate::scene::acad_to_truck::{TextStroke, TruckEntity, TruckObject};
|
||||
use crate::scene::object::{GripApply, GripDef, PropSection};
|
||||
use crate::scene::wire_model::SnapHint;
|
||||
use crate::scene::{cxf, transform};
|
||||
|
|
@ -26,8 +26,9 @@ impl TruckConvertible for AttributeDefinition {
|
|||
self.default_value.clone()
|
||||
};
|
||||
let wf = (self.width_factor as f32).max(0.01);
|
||||
let origin = [self.insertion_point.x, self.insertion_point.y];
|
||||
let strokes = cxf::tessellate_text_ex(
|
||||
[self.insertion_point.x as f32, self.insertion_point.y as f32],
|
||||
[0.0, 0.0],
|
||||
self.height as f32,
|
||||
self.rotation as f32,
|
||||
wf * resolved.width_factor.max(0.01),
|
||||
|
|
@ -36,7 +37,7 @@ impl TruckConvertible for AttributeDefinition {
|
|||
&display,
|
||||
);
|
||||
Some(TruckEntity {
|
||||
object: TruckObject::Text(strokes),
|
||||
object: TruckObject::Text(vec![TextStroke { strokes, origin }]),
|
||||
snap_pts: vec![(snap_pt, SnapHint::Insertion)],
|
||||
tangent_geoms: vec![],
|
||||
key_vertices: vec![],
|
||||
|
|
@ -128,8 +129,9 @@ impl TruckConvertible for AttributeEntity {
|
|||
);
|
||||
let resolved = resolve_text_style(&self.text_style, document);
|
||||
let wf = (self.width_factor as f32).max(0.01);
|
||||
let origin = [self.insertion_point.x, self.insertion_point.y];
|
||||
let strokes = cxf::tessellate_text_ex(
|
||||
[self.insertion_point.x as f32, self.insertion_point.y as f32],
|
||||
[0.0, 0.0],
|
||||
self.height as f32,
|
||||
self.rotation as f32,
|
||||
wf * resolved.width_factor.max(0.01),
|
||||
|
|
@ -138,7 +140,7 @@ impl TruckConvertible for AttributeEntity {
|
|||
&self.value,
|
||||
);
|
||||
Some(TruckEntity {
|
||||
object: TruckObject::Text(strokes),
|
||||
object: TruckObject::Text(vec![TextStroke { strokes, origin }]),
|
||||
snap_pts: vec![(snap_pt, SnapHint::Insertion)],
|
||||
tangent_geoms: vec![],
|
||||
key_vertices: vec![],
|
||||
|
|
|
|||
Loading…
Reference in a new issue