Skip to content

Commit

Permalink
fix: spline boundary path data (#134)
Browse files Browse the repository at this point in the history
Only one control point was added, instead of an array of control points

Co-authored-by: ibon eskudero <ibon.eskudero@tecnalia.com>
  • Loading branch information
ieskudero and ibon eskudero authored Aug 8, 2023
1 parent 4f19645 commit 4ea2312
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/handlers/entity/hatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ export const process = (tuples) => {
case 94:
case 95:
case 96:
if( drawType === 4 ) status = 'SPLINE'
fillDrawEntity(type, drawType, parseFloat(value))
break
case 42:
Expand Down Expand Up @@ -272,7 +273,7 @@ function createDrawEntity(type) {
rational: 0,
periodic: 0,
knots: { count: 0, knots: [] },
controlPoints: { count: 0, point: { x: 0, y: 0 } },
controlPoints: { count: 0, points: [] },
weights: 1,
}
}
Expand Down Expand Up @@ -302,7 +303,7 @@ function fillDrawEntity(type, drawType, value) {
break
case 4:
{
drawEntity.controlPoints.point.x = value
drawEntity.controlPoints.points.push( { x: value, y: 0 } )
}
break
}
Expand All @@ -327,7 +328,7 @@ function fillDrawEntity(type, drawType, value) {
break
case 4:
{
drawEntity.controlPoints.point.y = value
drawEntity.controlPoints.points[ drawEntity.controlPoints.points.length - 1].y = value
}
break
}
Expand Down

0 comments on commit 4ea2312

Please sign in to comment.