Replies: 2 comments 1 reply
-
I am not sure how what happens here. The export const makeOffset = (
face: Face,
offset: number,
tolerance = 1e-6
): Shape3D => {
const oc = getOC();
const offsetBuilder = new oc.BRepOffsetAPI_MakeOffsetShape_2(
face.wrapped,
offset,
tolerance,
oc.BRepOffset_Mode.BRepOffset_Skin as any,
false,
false,
oc.GeomAbs_JoinType.GeomAbs_Arc as any,
false
);
const newShape = cast(downcast(offsetBuilder.Shape()));
offsetBuilder.delete();
if (!isShape3D(newShape)) throw new Error("Could not offset to a 3d shape");
return newShape;
}; You may want to play with the options that I do not expose. The problem might be that:
Normally the Bezier should be C1 though... I don't have much time this week, but I will be happy to modify the function if you find what is going on! |
Beta Was this translation helpful? Give feedback.
-
I had a small success by replacing the |
Beta Was this translation helpful? Give feedback.
-
I am still experimenting with a curved shape, trying to apply an offset. However, the offset on this shape fails. I thought it could be caused by the sharp edge. A small test shape of a house with a pointed roof however worked fine. What do I miss?
I added the code below:
Beta Was this translation helpful? Give feedback.
All reactions