mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-05-01 10:26:12 +03:00
127 lines
4.7 KiB
Plaintext
Executable File
127 lines
4.7 KiB
Plaintext
Executable File
// Created on: 1992-06-03
|
|
// Created by: Laurent BUCHARD
|
|
// Copyright (c) 1992-1999 Matra Datavision
|
|
// Copyright (c) 1999-2012 OPEN CASCADE SAS
|
|
//
|
|
// The content of this file is subject to the Open CASCADE Technology Public
|
|
// License Version 6.5 (the "License"). You may not use the content of this file
|
|
// except in compliance with the License. Please obtain a copy of the License
|
|
// at http://www.opencascade.org and read it completely before using this file.
|
|
//
|
|
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
|
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
|
//
|
|
// The Original Code and all software distributed under the License is
|
|
// distributed on an "AS IS" basis, without warranty of any kind, and the
|
|
// Initial Developer hereby disclaims all such warranties, including without
|
|
// limitation, any warranties of merchantability, fitness for a particular
|
|
// purpose or non-infringement. Please see the License for the specific terms
|
|
// and conditions governing the rights and limitations under the License.
|
|
|
|
|
|
#include IntCurve_TheIntersector_hxx
|
|
|
|
#include <IntRes2d_Domain.hxx>
|
|
|
|
#include <gp_Lin2d.hxx>
|
|
#include <gp_Circ2d.hxx>
|
|
#include <gp_Elips2d.hxx>
|
|
#include <gp_Hypr2d.hxx>
|
|
#include <gp_Parab2d.hxx>
|
|
|
|
#include <IntCurve_IConicTool.hxx>
|
|
|
|
|
|
//--------------------------------------------------------------------------------
|
|
inline IntCurve_IntConicCurveGen::IntCurve_IntConicCurveGen ()
|
|
{ }
|
|
|
|
//--------------------------------------------------------------------------------
|
|
inline IntCurve_IntConicCurveGen::IntCurve_IntConicCurveGen (const gp_Lin2d& L,
|
|
const IntRes2d_Domain& D1,
|
|
const ThePCurve& PCurve,
|
|
const IntRes2d_Domain& D2,
|
|
const Standard_Real TolConf,
|
|
const Standard_Real Tol) {
|
|
|
|
Perform(IntCurve_IConicTool(L),D1,PCurve,D2,TolConf,Tol);
|
|
}
|
|
|
|
|
|
inline void IntCurve_IntConicCurveGen::Perform (const gp_Lin2d& L,
|
|
const IntRes2d_Domain& D1,
|
|
const ThePCurve& PCurve,
|
|
const IntRes2d_Domain& D2,
|
|
const Standard_Real TolConf,
|
|
const Standard_Real Tol) {
|
|
|
|
Perform(IntCurve_IConicTool(L),D1,PCurve,D2,TolConf,Tol);
|
|
}
|
|
//--------------------------------------------------------------------------------
|
|
inline void IntCurve_IntConicCurveGen::Perform (const gp_Circ2d& C,
|
|
const IntRes2d_Domain& D1,
|
|
const ThePCurve& PCurve,
|
|
const IntRes2d_Domain& D2,
|
|
const Standard_Real TolConf,
|
|
const Standard_Real Tol) {
|
|
if(!D1.IsClosed()) {
|
|
IntRes2d_Domain D(D1);
|
|
D.SetEquivalentParameters(D1.FirstParameter(),D1.FirstParameter()+M_PI+M_PI);
|
|
Perform(IntCurve_IConicTool(C),D,PCurve,D2,TolConf,Tol);
|
|
//-- Standard_ConstructionError::Raise("Domaine incorrect");
|
|
}
|
|
else {
|
|
Perform(IntCurve_IConicTool(C),D1,PCurve,D2,TolConf,Tol);
|
|
}
|
|
}
|
|
//--------------------------------------------------------------------------------
|
|
inline void IntCurve_IntConicCurveGen::Perform (const gp_Elips2d& E,
|
|
const IntRes2d_Domain& D1,
|
|
const ThePCurve& PCurve,
|
|
const IntRes2d_Domain& D2,
|
|
const Standard_Real TolConf,
|
|
const Standard_Real Tol) {
|
|
if(!D1.IsClosed()) {
|
|
IntRes2d_Domain D(D1);
|
|
D.SetEquivalentParameters(D1.FirstParameter(),D1.FirstParameter()+M_PI+M_PI);
|
|
Perform(IntCurve_IConicTool(E),D,PCurve,D2,TolConf,Tol);
|
|
}
|
|
else {
|
|
Perform(IntCurve_IConicTool(E),D1,PCurve,D2,TolConf,Tol);
|
|
}
|
|
}
|
|
//--------------------------------------------------------------------------------
|
|
inline void IntCurve_IntConicCurveGen::Perform (const gp_Parab2d& Prb,
|
|
const IntRes2d_Domain& D1,
|
|
const ThePCurve& PCurve,
|
|
const IntRes2d_Domain& D2,
|
|
const Standard_Real TolConf,
|
|
const Standard_Real Tol) {
|
|
Perform(IntCurve_IConicTool(Prb),D1,PCurve,D2,TolConf,Tol);
|
|
}
|
|
//--------------------------------------------------------------------------------
|
|
inline void IntCurve_IntConicCurveGen::Perform (const gp_Hypr2d& H,
|
|
const IntRes2d_Domain& D1,
|
|
const ThePCurve& PCurve,
|
|
const IntRes2d_Domain& D2,
|
|
const Standard_Real TolConf,
|
|
const Standard_Real Tol) {
|
|
Perform(IntCurve_IConicTool(H),D1,PCurve,D2,TolConf,Tol);
|
|
}
|
|
//--------------------------------------------------------------------------------
|
|
inline void IntCurve_IntConicCurveGen::Perform (const IntCurve_IConicTool& ICurve,
|
|
const IntRes2d_Domain& D1,
|
|
const ThePCurve& PCurve,
|
|
const IntRes2d_Domain& D2,
|
|
const Standard_Real TolConf,
|
|
const Standard_Real Tol) {
|
|
IntCurve_TheIntersector myintersection;
|
|
myintersection.SetReversedParameters(ReversedParameters());
|
|
myintersection.Perform(ICurve,D1,PCurve,D2,TolConf,Tol);
|
|
this->SetValues(myintersection);
|
|
}
|
|
//================================================================================
|
|
|
|
|
|
|