jww-parser-mbt 2025.12.1 → 2025.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +19 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +19 -25
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -10484,6 +10484,9 @@ function f4ah6o$jww_parser$dxf$$to_string(doc) {
|
|
|
10484
10484
|
output = `${output}0\nEOF\n`;
|
|
10485
10485
|
return output;
|
|
10486
10486
|
}
|
|
10487
|
+
function f4ah6o$jww_parser$dxf$$cos(_tmp) {
|
|
10488
|
+
return Math.cos(_tmp);
|
|
10489
|
+
}
|
|
10487
10490
|
function f4ah6o$jww_parser$dxf$$get_block_name(jww_doc, def_number) {
|
|
10488
10491
|
const _arr = jww_doc.block_defs;
|
|
10489
10492
|
const _len = _arr.length;
|
|
@@ -10541,6 +10544,9 @@ function f4ah6o$jww_parser$dxf$$map_line_type(pen_style) {
|
|
|
10541
10544
|
function f4ah6o$jww_parser$dxf$$rad_to_deg(rad) {
|
|
10542
10545
|
return rad * 180 / 3.141592653589793;
|
|
10543
10546
|
}
|
|
10547
|
+
function f4ah6o$jww_parser$dxf$$sin(_tmp) {
|
|
10548
|
+
return Math.sin(_tmp);
|
|
10549
|
+
}
|
|
10544
10550
|
function f4ah6o$jww_parser$dxf$$convert_entity(entity, jww_doc) {
|
|
10545
10551
|
const base = f4ah6o$jww_parser$core$$Entity$base(entity);
|
|
10546
10552
|
const layer_name = f4ah6o$jww_parser$dxf$$get_layer_name(jww_doc, base.layer_group, base.layer);
|
|
@@ -10570,40 +10576,28 @@ function f4ah6o$jww_parser$dxf$$convert_entity(entity, jww_doc) {
|
|
|
10570
10576
|
radius: _arc.radius
|
|
10571
10577
|
});
|
|
10572
10578
|
else if (_arc.flatness !== 1) {
|
|
10573
|
-
|
|
10574
|
-
|
|
10575
|
-
|
|
10576
|
-
|
|
10577
|
-
|
|
10578
|
-
|
|
10579
|
-
|
|
10580
|
-
const _tmp = _arc.radius * _arc.flatness;
|
|
10581
|
-
const _tmp$2 = 1 / _arc.flatness;
|
|
10582
|
-
const _tmp$3 = _arc.tilt_angle + 1.5707963267948966;
|
|
10583
|
-
major_radius$2 = _tmp;
|
|
10584
|
-
minor_ratio$2 = _tmp$2;
|
|
10585
|
-
tilt_angle$2 = _tmp$3;
|
|
10586
|
-
break _L;
|
|
10587
|
-
} else {
|
|
10588
|
-
major_radius$2 = major_radius;
|
|
10589
|
-
minor_ratio$2 = minor_ratio;
|
|
10590
|
-
tilt_angle$2 = tilt_angle;
|
|
10591
|
-
break _L;
|
|
10579
|
+
let major_radius = _arc.radius;
|
|
10580
|
+
let minor_ratio = _arc.flatness;
|
|
10581
|
+
let tilt_angle = _arc.tilt_angle;
|
|
10582
|
+
if (minor_ratio > 1) {
|
|
10583
|
+
major_radius = _arc.radius * _arc.flatness;
|
|
10584
|
+
minor_ratio = 1 / _arc.flatness;
|
|
10585
|
+
tilt_angle = _arc.tilt_angle + 1.5707963267948966;
|
|
10592
10586
|
}
|
|
10593
|
-
const major_axis_x = major_radius
|
|
10594
|
-
const major_axis_y = major_radius
|
|
10587
|
+
const major_axis_x = major_radius * f4ah6o$jww_parser$dxf$$cos(tilt_angle);
|
|
10588
|
+
const major_axis_y = major_radius * f4ah6o$jww_parser$dxf$$sin(tilt_angle);
|
|
10595
10589
|
let start_param;
|
|
10596
10590
|
let end_param;
|
|
10597
|
-
_L
|
|
10591
|
+
_L: if (_arc.is_full_circle) {
|
|
10598
10592
|
start_param = 0;
|
|
10599
10593
|
end_param = 6.283185307179586;
|
|
10600
|
-
break _L
|
|
10594
|
+
break _L;
|
|
10601
10595
|
} else {
|
|
10602
10596
|
const _tmp = _arc.start_angle;
|
|
10603
10597
|
const _tmp$2 = _arc.start_angle + _arc.arc_angle;
|
|
10604
10598
|
start_param = _tmp;
|
|
10605
10599
|
end_param = _tmp$2;
|
|
10606
|
-
break _L
|
|
10600
|
+
break _L;
|
|
10607
10601
|
}
|
|
10608
10602
|
return new $64$f4ah6o$47$jww_parser$47$dxf$46$DxfEntity$Ellipse({
|
|
10609
10603
|
layer: layer_name,
|
|
@@ -10613,7 +10607,7 @@ function f4ah6o$jww_parser$dxf$$convert_entity(entity, jww_doc) {
|
|
|
10613
10607
|
center_y: _arc.center_y,
|
|
10614
10608
|
major_axis_x,
|
|
10615
10609
|
major_axis_y,
|
|
10616
|
-
minor_ratio
|
|
10610
|
+
minor_ratio,
|
|
10617
10611
|
start_param,
|
|
10618
10612
|
end_param
|
|
10619
10613
|
});
|