Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-25 08:16:03

0001 // Created on: 1994-10-21
0002 // Created by: Bruno DUMORTIER
0003 // Copyright (c) 1994-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _BRepFill_TrimSurfaceTool_HeaderFile
0018 #define _BRepFill_TrimSurfaceTool_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <TopoDS_Face.hxx>
0025 #include <TopoDS_Edge.hxx>
0026 #include <TColgp_SequenceOfPnt.hxx>
0027 #include <GeomAbs_Shape.hxx>
0028 class Geom2d_Curve;
0029 class gp_Pnt2d;
0030 class Geom_Curve;
0031 
0032 //! Compute the Pcurves and  the 3d curves resulting
0033 //! of the trimming of a face by an extruded surface.
0034 class BRepFill_TrimSurfaceTool
0035 {
0036 public:
0037   DEFINE_STANDARD_ALLOC
0038 
0039   Standard_EXPORT BRepFill_TrimSurfaceTool(const Handle(Geom2d_Curve)& Bis,
0040                                            const TopoDS_Face&          Face1,
0041                                            const TopoDS_Face&          Face2,
0042                                            const TopoDS_Edge&          Edge1,
0043                                            const TopoDS_Edge&          Edge2,
0044                                            const Standard_Boolean      Inv1,
0045                                            const Standard_Boolean      Inv2);
0046 
0047   //! Intersect <Bis>  with the  projection of the edges
0048   //! <EdgeOnFi> and returns the intersecting parameters
0049   //! on Bis and on the edges
0050   //! P.X() : Parameter on Bis
0051   //! P.Y() : Parameter on EdgeOnF1
0052   //! P.Z() : Parameter on EdgeOnF2
0053   //! raises if <Edge> is not a edge of Face1 or Face2.
0054   Standard_EXPORT void IntersectWith(const TopoDS_Edge&    EdgeOnF1,
0055                                      const TopoDS_Edge&    EdgeOnF2,
0056                                      TColgp_SequenceOfPnt& Points) const;
0057 
0058   //! returns True if the Line (P, DZ) intersect the Faces
0059   Standard_EXPORT Standard_Boolean IsOnFace(const gp_Pnt2d& Point) const;
0060 
0061   //! returns the parameter of the  point <Point> on the
0062   //! Edge <Edge>, assuming that the point is on the edge.
0063   Standard_EXPORT Standard_Real ProjOn(const gp_Pnt2d& Point, const TopoDS_Edge& Edge) const;
0064 
0065   Standard_EXPORT void Project(const Standard_Real   U1,
0066                                const Standard_Real   U2,
0067                                Handle(Geom_Curve)&   Curve,
0068                                Handle(Geom2d_Curve)& PCurve1,
0069                                Handle(Geom2d_Curve)& PCurve2,
0070                                GeomAbs_Shape&        myCont) const;
0071 
0072 protected:
0073 private:
0074   TopoDS_Face          myFace1;
0075   TopoDS_Face          myFace2;
0076   TopoDS_Edge          myEdge1;
0077   TopoDS_Edge          myEdge2;
0078   Standard_Boolean     myInv1;
0079   Standard_Boolean     myInv2;
0080   Handle(Geom2d_Curve) myBis;
0081 };
0082 
0083 #endif // _BRepFill_TrimSurfaceTool_HeaderFile