I have solved this issue using shapefixing after all.
I had to fix the shapes after projection (before addinf them to sector)
Archived discussion
I would like to construct a 'cut-off'-prisma:
I have the base face, the extrusion vector and two cutting planes. My first attempt was to create the base prism with BrepPrimApi_makePrism and then use Boolean operation CUT to do the trimming. However, as we all know, BOPs can be prohibitivly expensive in computing time.
So my second idea is to do the following:
1. Project the baseface's wires (it has several) on startplane and endplane (along the extrusion vector)
2. Build the corresponding Shells with BrepOffsetAPI_ThruSections
3. Sew these together with the projectes basefaces
however, step 2 fails with an access violation at 0xfefd0068 on the call of brepOffsetApi_ThruSections::Build().
Source:
BRepOffsetAPI_ThruSections sector;
//project baseprofile to cutting planes
BRepProj_Projection projector1(curWir, BRepBuilderAPI_MakeFace(startPlane, -10000, 10000, -10000, 10000), startPlane->Axis().Direction());
BRepProj_Projection projector2(curWir, BRepBuilderAPI_MakeFace(endPlane, -10000, 10000, -10000, 10000), endPlane->Axis().Direction());
if(projector1.IsDone() && projector2.IsDone())
{
projector1.Init();
projector2.Init();
proj1Wir = TopoDS::Wire(projector1.Current());
proj2Wir = TopoDS::Wire(projector2.Current());
sector.AddWire(proj1Wir);
sector.AddWire(proj2Wir);
sector.Build(); //
sewer.Add(sector.Shape());
}
Things I have tried so far:
I am close to my wits' end with this one. Does anyone of you, dear readers, have some insight to share?
Discussion
Posts are displayed in their archived order.
I have solved this issue using shapefixing after all.
I had to fix the shapes after projection (before addinf them to sector)