
Tue, 05/02/2023 - 12:53
Hello,
I made a shell consisted of faces and made it offset
(I attached the surface model file, master.brep).
I hope to give the offset model the thickness but failed.
My code snippet is as follows :
BRepOffsetAPI_MakeOffsetShape OffsetMaker;
OffsetMaker.PerformByJoin(tdModel, 3.0, Precision::Confusion());
TopoDS_Shape tdShapeOffset = OffsetMaker.Shape();
BRepBuilderAPI_Sewing brepSew(Precision::Confusion());
brepSew.Load(tdShapeOffset );
brepSew.Perform();
TopoDS_Shape tdSew = brepSew.SewedShape();
BRepOffset_MakeOffset brepOffset;
brepOffset.Initialize(tdSew, 2, Precision::Confusion(), BRepOffset_Skin, Standard_False, Standard_False, GeomAbs_Arc, Standard_True);
brepOffset.MakeThickSolid();
if (Standard_False == brepOffset.IsDone())
break;
tdShapeResult = brepOffset.Shape();
This is a continuity problem as I know.
Could you please provide some advice on how I can solve this?
I just want to offset and thickness a model in order.
Thank you in advance.
Tue, 05/02/2023 - 16:43
I think I know what you want. See attached model and if it isn't what you want, I am confused and ignore my post.
I am not sure what the sew is supposed to do. An input shell to offset should produce an output shell and no sewing required.
Kind of a weird situation. You can only offset once. I could offset/thicken out to 5.0, but I couldn't offset the offset with values of 1. So I took the original shell and thickened it to 5 to a solid. Then Took the original shell and offset it to 3 to another shell. did 'BRepPrimAPI_MakeHalfSpace' on the shell to make a 'solid'. Then boolean subtracted the half space from the thickened solid. See attached file.
good luck.
Wed, 05/03/2023 - 07:00
This answer is exactly what I want.
Your attached file cannot be opened in OCCT application.
However, I successfully achieved my goal according to your method.
Thank you so much.
Wed, 05/03/2023 - 01:54
If the smooth edges are not encoded as continuous you can try to fix this with the method BRepLib::EncodeRegularity(). There you can use your own tolerance to encode as continuous some not truly smooth edges.
Wed, 05/03/2023 - 07:01
It's helpful to me.
Thank you so much.