Back to home page

EIC code displayed by LXR

 
 

    


Warning, /include/opencascade/IntCurve_IntConicCurveGen.lxx is written in an unsupported language. File is not indexed.

0001 // Created on: 1992-06-03
0002 // Created by: Laurent BUCHARD
0003 // Copyright (c) 1992-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 #include IntCurve_TheIntersector_hxx
0018 
0019 #include <IntRes2d_Domain.hxx>
0020 
0021 #include <gp_Lin2d.hxx>
0022 #include <gp_Circ2d.hxx>
0023 #include <gp_Elips2d.hxx>
0024 #include <gp_Hypr2d.hxx>
0025 #include <gp_Parab2d.hxx>
0026 
0027 #include <IntCurve_IConicTool.hxx>
0028 
0029 
0030 //--------------------------------------------------------------------------------
0031 inline IntCurve_IntConicCurveGen::IntCurve_IntConicCurveGen () 
0032 { }
0033 
0034 //--------------------------------------------------------------------------------
0035 inline IntCurve_IntConicCurveGen::IntCurve_IntConicCurveGen (const gp_Lin2d& L,
0036                                                              const IntRes2d_Domain& D1,
0037                                                              const ThePCurve& PCurve,
0038                                                              const IntRes2d_Domain& D2,
0039                                                              const Standard_Real TolConf,
0040                                                              const Standard_Real Tol) {
0041   
0042   Perform(IntCurve_IConicTool(L),D1,PCurve,D2,TolConf,Tol);
0043 }
0044 
0045 
0046 inline void IntCurve_IntConicCurveGen::Perform (const gp_Lin2d& L,
0047                                                 const IntRes2d_Domain& D1,
0048                                                 const ThePCurve& PCurve,
0049                                                 const IntRes2d_Domain& D2,
0050                                                 const Standard_Real TolConf,
0051                                                 const Standard_Real Tol) {
0052   
0053   Perform(IntCurve_IConicTool(L),D1,PCurve,D2,TolConf,Tol);
0054 }
0055 //--------------------------------------------------------------------------------
0056 inline void IntCurve_IntConicCurveGen::Perform (const gp_Circ2d& C,
0057                                                 const IntRes2d_Domain& D1,
0058                                                 const ThePCurve& PCurve,
0059                                                 const IntRes2d_Domain& D2,
0060                                                 const Standard_Real TolConf,
0061                                                 const Standard_Real Tol) {
0062   if(!D1.IsClosed()) {
0063     IntRes2d_Domain D(D1);
0064     D.SetEquivalentParameters(D1.FirstParameter(),D1.FirstParameter()+M_PI+M_PI);
0065     Perform(IntCurve_IConicTool(C),D,PCurve,D2,TolConf,Tol);
0066     //-- throw Standard_ConstructionError("Domaine incorrect");
0067   }
0068   else { 
0069     Perform(IntCurve_IConicTool(C),D1,PCurve,D2,TolConf,Tol);
0070   }
0071 }
0072 //--------------------------------------------------------------------------------
0073 inline void IntCurve_IntConicCurveGen::Perform (const gp_Elips2d& E,
0074                                                 const IntRes2d_Domain& D1,
0075                                                 const ThePCurve& PCurve,
0076                                                 const IntRes2d_Domain& D2,
0077                                                 const Standard_Real TolConf,
0078                                                 const Standard_Real Tol) {
0079   if(!D1.IsClosed()) {
0080     IntRes2d_Domain D(D1);
0081     D.SetEquivalentParameters(D1.FirstParameter(),D1.FirstParameter()+M_PI+M_PI);
0082     Perform(IntCurve_IConicTool(E),D,PCurve,D2,TolConf,Tol);
0083   }
0084   else { 
0085     Perform(IntCurve_IConicTool(E),D1,PCurve,D2,TolConf,Tol);
0086   }
0087 }
0088 //--------------------------------------------------------------------------------
0089 inline void IntCurve_IntConicCurveGen::Perform (const gp_Parab2d& Prb,
0090                                                 const IntRes2d_Domain& D1,
0091                                                 const ThePCurve& PCurve,
0092                                                 const IntRes2d_Domain& D2,
0093                                                 const Standard_Real TolConf,
0094                                                 const Standard_Real Tol) {
0095   Perform(IntCurve_IConicTool(Prb),D1,PCurve,D2,TolConf,Tol);
0096 }
0097 //--------------------------------------------------------------------------------
0098 inline void IntCurve_IntConicCurveGen::Perform (const gp_Hypr2d& H,
0099                                                 const IntRes2d_Domain& D1,
0100                                                 const ThePCurve& PCurve,
0101                                                 const IntRes2d_Domain& D2,
0102                                                 const Standard_Real TolConf,
0103                                                 const Standard_Real Tol) {
0104   Perform(IntCurve_IConicTool(H),D1,PCurve,D2,TolConf,Tol);
0105 }
0106 //--------------------------------------------------------------------------------
0107 inline void IntCurve_IntConicCurveGen::Perform (const IntCurve_IConicTool& ICurve,
0108                                                 const IntRes2d_Domain& D1,
0109                                                 const ThePCurve& PCurve,
0110                                                 const IntRes2d_Domain& D2,
0111                                                 const Standard_Real TolConf,
0112                                                 const Standard_Real Tol) {
0113   IntCurve_TheIntersector myintersection; 
0114   myintersection.SetReversedParameters(ReversedParameters());
0115   myintersection.Perform(ICurve,D1,PCurve,D2,TolConf,Tol);
0116   this->SetValues(myintersection);
0117 }
0118 //================================================================================
0119   
0120   
0121