|
@@ -83,20 +83,22 @@ impl From<HatchPattern> for HatchFlag {
|
|
|
|
|
|
impl From<HatchFlag> for HatchPattern {
|
|
impl From<HatchFlag> for HatchPattern {
|
|
fn from(value: HatchFlag) -> Self {
|
|
fn from(value: HatchFlag) -> Self {
|
|
- if value.bidirectional_pattern() != 0 {
|
|
|
|
- HatchPattern::Bidirectional
|
|
|
|
- } else if value.ring_pattern() != 0 {
|
|
|
|
|
|
+ if value.ring_pattern() != 0 {
|
|
HatchPattern::Ring
|
|
HatchPattern::Ring
|
|
- } else if value.continuous_pattern() != 0 {
|
|
|
|
- HatchPattern::Continuous
|
|
|
|
- } else if value.gong_pattern() != 0 {
|
|
|
|
- HatchPattern::Gong
|
|
|
|
} else if value.background_pattern() != 0 {
|
|
} else if value.background_pattern() != 0 {
|
|
HatchPattern::Background
|
|
HatchPattern::Background
|
|
} else if value.fill_pattern() != 0 {
|
|
} else if value.fill_pattern() != 0 {
|
|
HatchPattern::Fill
|
|
HatchPattern::Fill
|
|
} else if value.zigzag_pattern() != 0 {
|
|
} else if value.zigzag_pattern() != 0 {
|
|
HatchPattern::Zigzag
|
|
HatchPattern::Zigzag
|
|
|
|
+ } else if value.gong_pattern() != 0 {
|
|
|
|
+ HatchPattern::Gong
|
|
|
|
+ } else if value.bidirectional_pattern() != 0 {
|
|
|
|
+ if value.continuous_pattern() != 0 {
|
|
|
|
+ HatchPattern::Continuous
|
|
|
|
+ } else {
|
|
|
|
+ HatchPattern::Bidirectional
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
HatchPattern::Directional
|
|
HatchPattern::Directional
|
|
}
|
|
}
|
|
@@ -408,26 +410,29 @@ impl Display for Hatch {
|
|
if setting.enabled.into() {
|
|
if setting.enabled.into() {
|
|
write!(
|
|
write!(
|
|
f,
|
|
f,
|
|
- "\nHatch #{}: Count: {}, Pen: {}, Pattern: {}, All Calc: {}, Follow Edge Once: {}, Edge Offset: {:.2}, Line Spacing: {:.2}",
|
|
|
|
|
|
+ "\nHatch #{}: All Calc: {}, Follow Edge Once: {}, Cross Hatch: {}, Pattern: {}, Angle: {:.2}, Pen: {}, Count: {}, Line Space: {:.2}, Avg Distribte Line: {}",
|
|
index,
|
|
index,
|
|
- setting.count,
|
|
|
|
- setting.pen,
|
|
|
|
- HatchPattern::from(*setting.flags),
|
|
|
|
setting.flags.all_calc() != 0,
|
|
setting.flags.all_calc() != 0,
|
|
setting.flags.follow_edge_once() != 0,
|
|
setting.flags.follow_edge_once() != 0,
|
|
- setting.edge_offset,
|
|
|
|
- setting.line_spacing,
|
|
|
|
|
|
+ setting.flags.cross_hatch() != 0,
|
|
|
|
+ HatchPattern::from(*setting.flags),
|
|
|
|
+ *setting.angle,
|
|
|
|
+ *setting.pen,
|
|
|
|
+ *setting.count,
|
|
|
|
+ *setting.line_spacing,
|
|
|
|
+ setting.flags.average_distribute_line() != 0,
|
|
)?;
|
|
)?;
|
|
write!(
|
|
write!(
|
|
f,
|
|
f,
|
|
- "\n Start Offset: {:.2}, End Offset: {:.2}, Angle: {:.2}, Rotate Angle: {:.2}, Line Reduction: {:.2}, Loop Count: {}, Loop Distance: {:.2}",
|
|
|
|
- setting.start_offset,
|
|
|
|
- setting.end_offset,
|
|
|
|
- setting.angle,
|
|
|
|
- setting.rotate_angle,
|
|
|
|
- setting.line_reduction,
|
|
|
|
- setting.loop_count,
|
|
|
|
- setting.loop_distance,
|
|
|
|
|
|
+ "\n Edge Offset: {:.2}, Start Offset: {:.2}, End Offset: {:.2}, Line Reduction: {:.2}, Loop Count: {}, Loop Distance: {:.2}, Auto Rotate: {}, Auto Rotate Angle: {:.2}",
|
|
|
|
+ *setting.edge_offset,
|
|
|
|
+ *setting.start_offset,
|
|
|
|
+ *setting.end_offset,
|
|
|
|
+ *setting.line_reduction,
|
|
|
|
+ *setting.loop_count,
|
|
|
|
+ *setting.loop_distance,
|
|
|
|
+ setting.flags.auto_rotate_hatch_angle() != 0,
|
|
|
|
+ *setting.rotate_angle,
|
|
)?;
|
|
)?;
|
|
}
|
|
}
|
|
}
|
|
}
|