![Anonymous's picture Anonymous's picture](/sites/default/files/images/userpic_default.png)
Fri, 05/21/2004 - 17:16
Forums:
I have now tried some boolean operations, and I am mostly pleased with the results. But how do I cut a shape against a non-bounded plane? That should be computationally much easier than cutting against another shape, but how can I make OpenCASCADE do this for me?
Mon, 05/24/2004 - 11:16
Perhaps this is what you are searching for: BRepPrimAPI_MakeHalfSpace
Mon, 05/24/2004 - 12:50
Thanks for the answer. But:
"A half-space is an infinite solid, limited by a surface. It is built from a face or a shell, which bounds it, and with a reference point, which specifies the side of the surface where the matter of the half-space is located."
I don't want a bounded surface, but the infinite plane. I guess I could just make a very very big surface, but it isn't quite ideal...
Mon, 05/24/2004 - 15:58
You can build a shape (a face) with an unbounded surface.
Handle(Geom_Surface) S = ...;
aFace = BRepBuilderAPI_MakeFace(S)
Then you can use it to build a half-space or use it directly in a Boolean operation (for computing a planar section for example).
Regards.
Thu, 05/27/2004 - 17:00
Thank you very much for the answer, but I still don't get how to construct this unbounded surface. Do you have an example of what the "..." in the line
Handle(Geom_Surface) S = ...;
might be, when I want to make a unbounded surface (I have the x, y and z axis and the position).
I have tried to look it up in this forum and in the OpenCASCADE documentation, but I can't find anything about it.
Thanks again.
Thu, 05/27/2004 - 18:45
I guess you look for a functionality provided by BRepAlgoAPI_Section(). There you can pass a shape and a plane as parameters.
Hope that helps,
Udo
Fri, 05/28/2004 - 14:33
Thanks, but no, it's the plane itself I'm wondering how to construct. Just a simple unbounded plane that I can use to cut shapes with.
Fri, 05/28/2004 - 21:04
Here's an example:
gp_Ax3 loc = gp_Ax3(gp_Pnt(x,y,z),gp_Dir(i,j,k));
Handle(Geom_Plane) aPlane = new Geom_Plane(loc);// this is the
//unbounded plane
TopoDS_Shape aFace = BRepBuilderAPI_MakeFace(aPlane);
But as someone already advise you, there is no need to build a shape you can pass directly the Geom_Plane to BRepAlgoAPI_Section
Regards.
Tue, 06/01/2004 - 17:06
Thanks, but the resulting aFace can not be used successfully in the BRepAlgoAPI_Cut function. When I try, OpenCASCADE gives an unhandled exception. When I try to cut the same solid against another solid, it works.
I guess I'll just have to make a very very big solid instead of using the plane to cut with then...
Thu, 06/10/2004 - 15:45
Then why are you not using the plane with the BrepBuilder_Section() function?
Thu, 06/10/2004 - 15:47
sorry: BRepAlgoAPI_Section() of course.
Mon, 06/14/2004 - 22:43
maybe u can try this, that's what i used for my cut operation between a shape and a finite plane (sorry for my poor english)
gp_Dir D(Dx,Dy,Dz);
gp_Pnt P(Px,Py,Pz);
gp_Pln Plan(P,D);
TopoDS_Face maLame = BRepBuilderAPI_MakeFace(Plan);
TopoDS_Shape Inter = BRepAlgo_Section(myShape, maLame);
this allows me to ignore the dimensions of the shape myShape, which is a Solid in my case, and on the other hand, it's equivalent to have a intersection within a infinite plane !!
hope this helps..
Mon, 06/14/2004 - 22:53
sorry, i ment :
"that's what i used for my cut operation between a shape and an INFINITE plane "