diff --git a/orx-shapes/src/commonMain/kotlin/rectify/RectifiedPath.kt b/orx-shapes/src/commonMain/kotlin/rectify/RectifiedPath.kt index 8a2cd47d..d69c8c08 100644 --- a/orx-shapes/src/commonMain/kotlin/rectify/RectifiedPath.kt +++ b/orx-shapes/src/commonMain/kotlin/rectify/RectifiedPath.kt @@ -11,7 +11,7 @@ import org.openrndr.shape.ShapeContour * RectifiedContour provides an approximately uniform parameterization for [ShapeContour] */ abstract class RectifiedPath>( - val path: Path, + open val path: Path, distanceTolerance: Double = 0.5, lengthScale: Double = 1.0 ) { diff --git a/orx-shapes/src/commonMain/kotlin/rectify/RectifiedPath3D.kt b/orx-shapes/src/commonMain/kotlin/rectify/RectifiedPath3D.kt index 9e288d68..883e5a31 100644 --- a/orx-shapes/src/commonMain/kotlin/rectify/RectifiedPath3D.kt +++ b/orx-shapes/src/commonMain/kotlin/rectify/RectifiedPath3D.kt @@ -7,8 +7,9 @@ import kotlin.math.floor class RectifiedPath3D(contour: Path3D, distanceTolerance: Double = 0.5, lengthScale: Double = 1.0) : RectifiedPath(contour, distanceTolerance, lengthScale) { + override val path: Path3D = super.path as Path3D + override fun sub(t0: Double, t1: Double): Path3D { - path as Path3D if (path.empty) { return Path3D(emptyList(), false) }