// Created on: 1994-10-21 // Created by: Bruno DUMORTIER // Copyright (c) 1994-1999 Matra Datavision // Copyright (c) 1999-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 2.1 as published // by the Free Software Foundation, with special exception defined in the file // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT // distribution for complete text of the license and disclaimer of any warranty. // // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. #ifndef _BRepFill_TrimSurfaceTool_HeaderFile #define _BRepFill_TrimSurfaceTool_HeaderFile #include "Standard.hxx" #include "Standard_DefineAlloc.hxx" #include "Standard_Handle.hxx" #include "TopoDS_Face.hxx" #include "TopoDS_Edge.hxx" #include "gp_Pnt.hxx" #include "NCollection_Sequence.hxx" #include "GeomAbs_Shape.hxx" class Geom2d_Curve; class gp_Pnt2d; class Geom_Curve; //! Compute the Pcurves and the 3d curves resulting //! of the trimming of a face by an extruded surface. class BRepFill_TrimSurfaceTool { public: DEFINE_STANDARD_ALLOC Standard_EXPORT BRepFill_TrimSurfaceTool(const occ::handle& Bis, const TopoDS_Face& Face1, const TopoDS_Face& Face2, const TopoDS_Edge& Edge1, const TopoDS_Edge& Edge2, const bool Inv1, const bool Inv2); //! Intersect with the projection of the edges //! and returns the intersecting parameters //! on Bis and on the edges //! P.X() : Parameter on Bis //! P.Y() : Parameter on EdgeOnF1 //! P.Z() : Parameter on EdgeOnF2 //! raises if is not a edge of Face1 or Face2. Standard_EXPORT void IntersectWith(const TopoDS_Edge& EdgeOnF1, const TopoDS_Edge& EdgeOnF2, NCollection_Sequence& Points) const; //! returns True if the Line (P, DZ) intersect the Faces Standard_EXPORT bool IsOnFace(const gp_Pnt2d& Point) const; //! returns the parameter of the point on the //! Edge , assuming that the point is on the edge. Standard_EXPORT double ProjOn(const gp_Pnt2d& Point, const TopoDS_Edge& Edge) const; Standard_EXPORT void Project(const double U1, const double U2, occ::handle& Curve, occ::handle& PCurve1, occ::handle& PCurve2, GeomAbs_Shape& myCont) const; private: TopoDS_Face myFace1; TopoDS_Face myFace2; TopoDS_Edge myEdge1; TopoDS_Edge myEdge2; bool myInv1; bool myInv2; occ::handle myBis; }; #endif // _BRepFill_TrimSurfaceTool_HeaderFile