GeomAPI_IntSS also for Topo?

Dear all,
I want to cut a BSpline Surface with a given plane. Therefore I use GeomAPI_IntSS to do the SurfaceSurface Intersection.

Now if I import for example an IGES or STEP file there are more then 1 surface that should be cut with the plane. Is it possible to use a different Intersection function that works on Topology data?

It should also be Surface Surface Intersection...

Thank you in advance.

Joachim

Pawel's picture

Hi Zettler,

you could use BRepAlgoAPI_Cut or BRepAlgo_Cut. Take a look at the 'Topology Operations' sample.

Regards
Pawel

Adrian Helcman's picture

joachim,

i am solving the same problem.
the function i have prepared is too slow:

bool ExH_Make_Face_Plane_Split (TopoDS_Face &o_Face, gp_Pln &o_Plane, TopTools_ListOfShape &o_New_Faces)
{
BRepAlgoAPI_Section o_section (o_Face, o_Plane, false);

o_section.Approximation (true); //TopOpeBRepTool_APPROX);
o_section.Build();

if (o_section.IsDone ())
{
TopExp_Explorer o_topo_exp;

TopoDS_Edge o_topo_edge;
BRepFeat_SplitShape o_split_algo (o_Face);
Standard_Real d_tmin, d_tmax;

for (o_topo_exp.Init (o_section.Shape(), TopAbs_EDGE); o_topo_exp.More(); o_topo_exp.Next())
{
o_topo_edge = TopoDS::Edge (o_topo_exp.Current ());

if (!o_topo_edge.IsNull())
{
//Create pcurve
Handle(Geom2d_Curve) po_segment = BRep_Tool::CurveOnSurface (o_topo_edge, o_Face, d_tmin, d_tmax);

BRep_Builder o_builder;

o_builder.UpdateEdge (o_topo_edge, po_segment, o_Face, Precision::Confusion ());

//Add spliting edge
o_split_algo.Add (o_topo_edge, o_Face);
}
}

try
{
o_split_algo.Build ();
}
catch (...)
{
return false;;
}

if (o_split_algo.IsDone ())
{
TopTools_IndexedMapOfShape o_map;

TopExp::MapShapes (o_split_algo.Shape(), TopAbs_FACE, o_map);

Map_To_List (o_map, o_New_Faces);

return true;
}
else
{
return false;
}
}
else
{
return false;
}
}

best regards,
adrian

dvdjimmy's picture

Hi Adrian,

I found BRepAlgoAPI_section which does exactly what we want.

Hope this helps.

Take care,

Joachim

Adrian Helcman's picture

joachim,

yes, this function returns the section edges.
i have used it at the start of my function.

...i have ment you want to split a face...

best regards,
adrian

Ankit Surti's picture

Hi!

I was also trying to do the same thing as here - splitting a face using a curve on the surface. I just wanted to know - what does the BRep_Builder::UpdateEdge function do? The OCC help was actually of not much help here.

TIA

Ankit Surti's picture

Hi!

I was also trying to do the same thing as here - splitting a face using a curve on the surface. I just wanted to know - what does the BRep_Builder::UpdateEdge function do? The OCC help was actually of not much help here.

TIA

Ankit Surti's picture

Hi!

I was also trying to do the same thing as here - splitting a face using a curve on the surface. I just wanted to know - what does the BRep_Builder::UpdateEdge function do? The OCC help was actually of not much help here.

TIA