jww-parser-mbt 2025.12.0 → 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 +8 -6
package/dist/index.cjs
CHANGED
|
@@ -10485,6 +10485,9 @@ function f4ah6o$jww_parser$dxf$$to_string(doc) {
|
|
|
10485
10485
|
output = `${output}0\nEOF\n`;
|
|
10486
10486
|
return output;
|
|
10487
10487
|
}
|
|
10488
|
+
function f4ah6o$jww_parser$dxf$$cos(_tmp) {
|
|
10489
|
+
return Math.cos(_tmp);
|
|
10490
|
+
}
|
|
10488
10491
|
function f4ah6o$jww_parser$dxf$$get_block_name(jww_doc, def_number) {
|
|
10489
10492
|
const _arr = jww_doc.block_defs;
|
|
10490
10493
|
const _len = _arr.length;
|
|
@@ -10542,6 +10545,9 @@ function f4ah6o$jww_parser$dxf$$map_line_type(pen_style) {
|
|
|
10542
10545
|
function f4ah6o$jww_parser$dxf$$rad_to_deg(rad) {
|
|
10543
10546
|
return rad * 180 / 3.141592653589793;
|
|
10544
10547
|
}
|
|
10548
|
+
function f4ah6o$jww_parser$dxf$$sin(_tmp) {
|
|
10549
|
+
return Math.sin(_tmp);
|
|
10550
|
+
}
|
|
10545
10551
|
function f4ah6o$jww_parser$dxf$$convert_entity(entity, jww_doc) {
|
|
10546
10552
|
const base = f4ah6o$jww_parser$core$$Entity$base(entity);
|
|
10547
10553
|
const layer_name = f4ah6o$jww_parser$dxf$$get_layer_name(jww_doc, base.layer_group, base.layer);
|
|
@@ -10571,40 +10577,28 @@ function f4ah6o$jww_parser$dxf$$convert_entity(entity, jww_doc) {
|
|
|
10571
10577
|
radius: _arc.radius
|
|
10572
10578
|
});
|
|
10573
10579
|
else if (_arc.flatness !== 1) {
|
|
10574
|
-
|
|
10575
|
-
|
|
10576
|
-
|
|
10577
|
-
|
|
10578
|
-
|
|
10579
|
-
|
|
10580
|
-
|
|
10581
|
-
const _tmp = _arc.radius * _arc.flatness;
|
|
10582
|
-
const _tmp$2 = 1 / _arc.flatness;
|
|
10583
|
-
const _tmp$3 = _arc.tilt_angle + 1.5707963267948966;
|
|
10584
|
-
major_radius$2 = _tmp;
|
|
10585
|
-
minor_ratio$2 = _tmp$2;
|
|
10586
|
-
tilt_angle$2 = _tmp$3;
|
|
10587
|
-
break _L;
|
|
10588
|
-
} else {
|
|
10589
|
-
major_radius$2 = major_radius;
|
|
10590
|
-
minor_ratio$2 = minor_ratio;
|
|
10591
|
-
tilt_angle$2 = tilt_angle;
|
|
10592
|
-
break _L;
|
|
10580
|
+
let major_radius = _arc.radius;
|
|
10581
|
+
let minor_ratio = _arc.flatness;
|
|
10582
|
+
let tilt_angle = _arc.tilt_angle;
|
|
10583
|
+
if (minor_ratio > 1) {
|
|
10584
|
+
major_radius = _arc.radius * _arc.flatness;
|
|
10585
|
+
minor_ratio = 1 / _arc.flatness;
|
|
10586
|
+
tilt_angle = _arc.tilt_angle + 1.5707963267948966;
|
|
10593
10587
|
}
|
|
10594
|
-
const major_axis_x = major_radius
|
|
10595
|
-
const major_axis_y = major_radius
|
|
10588
|
+
const major_axis_x = major_radius * f4ah6o$jww_parser$dxf$$cos(tilt_angle);
|
|
10589
|
+
const major_axis_y = major_radius * f4ah6o$jww_parser$dxf$$sin(tilt_angle);
|
|
10596
10590
|
let start_param;
|
|
10597
10591
|
let end_param;
|
|
10598
|
-
_L
|
|
10592
|
+
_L: if (_arc.is_full_circle) {
|
|
10599
10593
|
start_param = 0;
|
|
10600
10594
|
end_param = 6.283185307179586;
|
|
10601
|
-
break _L
|
|
10595
|
+
break _L;
|
|
10602
10596
|
} else {
|
|
10603
10597
|
const _tmp = _arc.start_angle;
|
|
10604
10598
|
const _tmp$2 = _arc.start_angle + _arc.arc_angle;
|
|
10605
10599
|
start_param = _tmp;
|
|
10606
10600
|
end_param = _tmp$2;
|
|
10607
|
-
break _L
|
|
10601
|
+
break _L;
|
|
10608
10602
|
}
|
|
10609
10603
|
return new $64$f4ah6o$47$jww_parser$47$dxf$46$DxfEntity$Ellipse({
|
|
10610
10604
|
layer: layer_name,
|
|
@@ -10614,7 +10608,7 @@ function f4ah6o$jww_parser$dxf$$convert_entity(entity, jww_doc) {
|
|
|
10614
10608
|
center_y: _arc.center_y,
|
|
10615
10609
|
major_axis_x,
|
|
10616
10610
|
major_axis_y,
|
|
10617
|
-
minor_ratio
|
|
10611
|
+
minor_ratio,
|
|
10618
10612
|
start_param,
|
|
10619
10613
|
end_param
|
|
10620
10614
|
});
|