diff --git a/src/qelmt/dynamictext.rs b/src/qelmt/dynamictext.rs index a9e0422..8b15f22 100644 --- a/src/qelmt/dynamictext.rs +++ b/src/qelmt/dynamictext.rs @@ -69,7 +69,7 @@ impl From<&DynamicText> for XMLElement { // 计算基础位置(不考虑旋转) // txt.x和txt.y现在是左下角位置 let left_x = txt.x; - // align_x 是对齐点的x坐标,后面加的数字是考虑到QET中boundingRect的没有完全贴合文本内容 + // align_x 是对齐点的x坐标 let mut align_x = match txt.h_alignment { HAlignment::Left => txt.align_x, HAlignment::Center => txt.align_x, @@ -83,13 +83,13 @@ impl From<&DynamicText> for XMLElement { VAlignment::Bottom => txt.y - pt_size + pt_size / 2.0, }; - // align_y 是对齐点的y坐标,后面加的数字是考虑到QET中boundingRect的没有完全贴合文本内容 + // align_y 是对齐点的y坐标 let mut align_y = match txt.v_alignment { VAlignment::Top => txt.align_y, VAlignment::Center => txt.align_y, VAlignment::Bottom => txt.align_y }; - + if txt.h_alignment == HAlignment::Left && txt.v_alignment==VAlignment::Bottom { align_x = txt.x; align_y = txt.y; diff --git a/src/qelmt/mod.rs b/src/qelmt/mod.rs index 5d7c653..a2da2ea 100644 --- a/src/qelmt/mod.rs +++ b/src/qelmt/mod.rs @@ -611,6 +611,19 @@ impl<'a> ObjectsBuilder<'a> { return Err("Entity is not visible"); } + + // ORIENT 图层在部分 DXF 中仅用于放置定位参考的三角形标记, + // 这些辅助线不应该出现在导出的 QET 元件内。 + if self + .ent + .common + .layer + .as_str() + .eq_ignore_ascii_case("orient") + { + return Err("Skip orientation helper layer"); + } + // 获取线型名称 let line_type_name: String = self.ent.common.line_type_name.clone();