How to handle a vector (svg/dxf) with compound path? #1237
Replies: 2 comments
-
I think jscad calculates normals as needed, from polygon points and their winding order. So perhaps the winding orders of the compound paths in the svg are not consistent with each other for being extruded. For a ring, for example, you would need the outer circle wind in the opposite sense of the inner circle. But more specifics would be needed. A screenshot of the undesired output, and the svg of a simple icon. If you export to x3d you can visualize simply here: |
Beta Was this translation helpful? Give feedback.
-
@RebeccaStevens Welcome. There was a nice long discussion from an issue raised a few months back. Hopefully, you can find a few ideas from this. |
Beta Was this translation helpful? Give feedback.
-
I've got a bunch of svg icons I want to make into 3d objects via a
extrudeLinear
.However, most of these icons involve compound paths and I'm not having much luck processing them.
This is how I'm opening the files:
However,
iconData
ends up being an array of the multiple geometries that make up the compound path; not a single geometry.I've tried using both
union
andsubtract
to merge the geometries, both before and after then usingextrudeLinear
to make the objects I want, but I can't achieve the desired output.As part of the debugging process, I performed a
extrudeLinear
on each of the geometries and exported them.I then imported them into blender to see if I can merge them (with a boolean difference) properly there. However, blender wouldn't merge them properly either unless I recalculated the objects' normals first.
Is there anyway I can recalculate the normals in JSCad to fix this issue?
Also is there a better approach I should be using perform this batch task?
Beta Was this translation helpful? Give feedback.
All reactions