After some further investigation, I noticed that the only curve types in my SVGs that are displayed mirrored are the EllipseCurve types. Seems like this is related to the warning I am getting when loading the SVG:
SVGLoader: Elliptic arc or ellipse rotation or skewing is not implemented.
I can’t share the original SVG (for confidentiality reasons) so I created a sample one which has the same issue (arc is not produced in correct orientation).
In my sample one I don’t get the warning I mentioned in my first post though.
threejs:
browser:
This is the snippet of code which converts the SVG to geometries:
const convertSubPathsToGeometries = (paths: SVGResultPaths[]) => {
// for each path, convert the list of subpaths to geometries.
const allSubpathGeometriesFlat: BufferGeometry[] = [];
paths.forEach((path: SVGResultPaths) => {
path.subPaths.forEach((subPath: any) => {
if (path.userData && path.userData.style) {
path.userData.style.strokeWidth = SVG_STROKE_WIDTH;
}
const geometry = SVGLoader.pointsToStroke(subPath.getPoints(), path.userData?.style);
if (geometry) allSubpathGeometriesFlat.push(geometry);
});
});
return allSubpathGeometriesFlat;
};
If you can’t wait for the feature request to be implemented and there aren’t too many arcs involved in your SVG, you may get the desired result by patching your SVG file
It appears like the “sweep-flag” is being interpreted the wrong way around, so changing a “1” to “0” and vice-versa should do the trick.