mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0024002: Overall code and build procedure refactoring -- automatic
Automatic upgrade of OCCT code by command "occt_upgrade . -nocdl": - WOK-generated header files from inc and sources from drv are moved to src - CDL files removed - All packages are converted to nocdlpack
This commit is contained in:
@@ -1,22 +1,87 @@
|
||||
IntTools_SequenceOfPntOn2Faces.hxx
|
||||
IntTools_SequenceOfCurves.hxx
|
||||
IntTools_SequenceOfRanges.hxx
|
||||
IntTools_SequenceOfRoots.hxx
|
||||
IntTools_Array1OfRoots.hxx
|
||||
IntTools.cxx
|
||||
IntTools.hxx
|
||||
IntTools_Array1OfRange.hxx
|
||||
IntTools_SequenceOfCommonPrts.hxx
|
||||
IntTools_Array1OfRoots.hxx
|
||||
IntTools_BaseRangeSample.cxx
|
||||
IntTools_BaseRangeSample.hxx
|
||||
IntTools_BaseRangeSample.lxx
|
||||
IntTools_BeanFaceIntersector.cxx
|
||||
IntTools_BeanFaceIntersector.hxx
|
||||
IntTools_BeanFaceIntersector.lxx
|
||||
IntTools_CArray1.gxx
|
||||
IntTools_CArray1.lxx
|
||||
IntTools_CArray1OfInteger.hxx
|
||||
IntTools_CArray1OfInteger_0.cxx
|
||||
IntTools_CArray1OfReal.hxx
|
||||
IntTools_CArray1OfReal_0.cxx
|
||||
IntTools_CommonPrt.cxx
|
||||
IntTools_CommonPrt.hxx
|
||||
IntTools_Context.cxx
|
||||
IntTools_Context.hxx
|
||||
IntTools_Curve.cxx
|
||||
IntTools_Curve.hxx
|
||||
IntTools_Curve.lxx
|
||||
IntTools_CurveRangeLocalizeData.cxx
|
||||
IntTools_CurveRangeLocalizeData.hxx
|
||||
IntTools_CurveRangeLocalizeData.lxx
|
||||
IntTools_CurveRangeSample.cxx
|
||||
IntTools_CurveRangeSample.hxx
|
||||
IntTools_CurveRangeSample.lxx
|
||||
IntTools_CurveRangeSampleMapHasher.cxx
|
||||
IntTools_CurveRangeSampleMapHasher.hxx
|
||||
IntTools_CurveRangeSampleMapHasher.lxx
|
||||
IntTools_DataMapIteratorOfDataMapOfCurveSampleBox.hxx
|
||||
IntTools_DataMapIteratorOfDataMapOfSurfaceSampleBox.hxx
|
||||
IntTools_DataMapOfCurveSampleBox.hxx
|
||||
IntTools_DataMapOfSurfaceSampleBox.hxx
|
||||
IntTools_EdgeEdge.cxx
|
||||
IntTools_EdgeEdge.hxx
|
||||
IntTools_EdgeEdge.lxx
|
||||
IntTools_EdgeFace.cxx
|
||||
IntTools_EdgeFace.hxx
|
||||
IntTools_FaceFace.cxx
|
||||
IntTools_FaceFace.hxx
|
||||
IntTools_FClass2d.cxx
|
||||
IntTools_FClass2d.hxx
|
||||
IntTools_IndexedDataMapOfTransientAddress.hxx
|
||||
IntTools_ListOfCurveRangeSample.hxx
|
||||
IntTools_ListIteratorOfListOfBox.hxx
|
||||
IntTools_ListIteratorOfListOfCurveRangeSample.hxx
|
||||
IntTools_ListOfSurfaceRangeSample.hxx
|
||||
IntTools_ListIteratorOfListOfSurfaceRangeSample.hxx
|
||||
IntTools_ListOfBox.hxx
|
||||
IntTools_ListIteratorOfListOfBox.hxx
|
||||
IntTools_MapOfCurveSample.hxx
|
||||
IntTools_ListOfCurveRangeSample.hxx
|
||||
IntTools_ListOfSurfaceRangeSample.hxx
|
||||
IntTools_MapIteratorOfMapOfCurveSample.hxx
|
||||
IntTools_MapOfSurfaceSample.hxx
|
||||
IntTools_MapIteratorOfMapOfSurfaceSample.hxx
|
||||
IntTools_DataMapOfCurveSampleBox.hxx
|
||||
IntTools_DataMapIteratorOfDataMapOfCurveSampleBox.hxx
|
||||
IntTools_DataMapOfSurfaceSampleBox.hxx
|
||||
IntTools_DataMapIteratorOfDataMapOfSurfaceSampleBox.hxx
|
||||
IntTools_MapOfCurveSample.hxx
|
||||
IntTools_MapOfSurfaceSample.hxx
|
||||
IntTools_MarkedRangeSet.cxx
|
||||
IntTools_MarkedRangeSet.hxx
|
||||
IntTools_MarkedRangeSet.lxx
|
||||
IntTools_PntOn2Faces.cxx
|
||||
IntTools_PntOn2Faces.hxx
|
||||
IntTools_PntOnFace.cxx
|
||||
IntTools_PntOnFace.hxx
|
||||
IntTools_Range.cxx
|
||||
IntTools_Range.hxx
|
||||
IntTools_Root.cxx
|
||||
IntTools_Root.hxx
|
||||
IntTools_SequenceOfCommonPrts.hxx
|
||||
IntTools_SequenceOfCurves.hxx
|
||||
IntTools_SequenceOfPntOn2Faces.hxx
|
||||
IntTools_SequenceOfRanges.hxx
|
||||
IntTools_SequenceOfRoots.hxx
|
||||
IntTools_ShrunkRange.cxx
|
||||
IntTools_ShrunkRange.hxx
|
||||
IntTools_SurfaceRangeLocalizeData.cxx
|
||||
IntTools_SurfaceRangeLocalizeData.hxx
|
||||
IntTools_SurfaceRangeLocalizeData.lxx
|
||||
IntTools_SurfaceRangeSample.cxx
|
||||
IntTools_SurfaceRangeSample.hxx
|
||||
IntTools_SurfaceRangeSample.lxx
|
||||
IntTools_SurfaceRangeSampleMapHasher.cxx
|
||||
IntTools_SurfaceRangeSampleMapHasher.hxx
|
||||
IntTools_SurfaceRangeSampleMapHasher.lxx
|
||||
IntTools_Tools.cxx
|
||||
IntTools_Tools.hxx
|
||||
IntTools_TopolTool.cxx
|
||||
IntTools_TopolTool.hxx
|
||||
|
@@ -1,195 +0,0 @@
|
||||
-- Created on: 2000-05-18
|
||||
-- Created by: Peter KURNEV
|
||||
-- Copyright (c) 2000-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.
|
||||
|
||||
package IntTools
|
||||
|
||||
---Purpose: Contains classes for intersection and classification
|
||||
--- purposes and accompanying classes
|
||||
uses
|
||||
|
||||
TCollection,
|
||||
TopoDS,
|
||||
TopAbs,
|
||||
TColStd,
|
||||
BRepAdaptor,
|
||||
BRepTopAdaptor,
|
||||
TopTools,
|
||||
math,
|
||||
gp,
|
||||
Bnd,
|
||||
Adaptor3d,
|
||||
GeomAdaptor,
|
||||
Geom,
|
||||
Geom2d,
|
||||
GeomInt,
|
||||
GeomAbs,
|
||||
GeomAPI,
|
||||
Extrema,
|
||||
IntPatch,
|
||||
IntSurf,
|
||||
BRepClass3d,
|
||||
TColgp,
|
||||
MMgt,
|
||||
Geom2dHatch,
|
||||
|
||||
BOPCol
|
||||
|
||||
is
|
||||
class Context;
|
||||
class ShrunkRange;
|
||||
--
|
||||
class Range;
|
||||
class CommonPrt;
|
||||
class Root;
|
||||
|
||||
class EdgeEdge;
|
||||
|
||||
class EdgeFace;
|
||||
|
||||
class FClass2d;
|
||||
|
||||
--class LineConstructor;
|
||||
|
||||
-----
|
||||
class MarkedRangeSet;
|
||||
|
||||
class BaseRangeSample;
|
||||
|
||||
class CurveRangeSample;
|
||||
|
||||
class SurfaceRangeSample;
|
||||
|
||||
class CurveRangeLocalizeData;
|
||||
|
||||
class SurfaceRangeLocalizeData;
|
||||
|
||||
class BeanFaceIntersector;
|
||||
|
||||
|
||||
class Curve;
|
||||
|
||||
class PntOnFace;
|
||||
class PntOn2Faces;
|
||||
|
||||
class TopolTool;
|
||||
|
||||
class FaceFace;
|
||||
|
||||
class Tools;
|
||||
|
||||
generic class CArray1;
|
||||
---
|
||||
--- I n s t a n t i a t i o n s
|
||||
---
|
||||
imported SequenceOfPntOn2Faces;
|
||||
--
|
||||
imported SequenceOfCurves;
|
||||
|
||||
|
||||
imported SequenceOfRanges;
|
||||
|
||||
class CArray1OfInteger instantiates
|
||||
CArray1(Integer from Standard);
|
||||
|
||||
class CArray1OfReal instantiates
|
||||
CArray1(Real from Standard);
|
||||
|
||||
imported SequenceOfRoots;
|
||||
|
||||
imported Array1OfRoots;
|
||||
|
||||
imported Array1OfRange;
|
||||
|
||||
imported SequenceOfCommonPrts;
|
||||
|
||||
imported IndexedDataMapOfTransientAddress;
|
||||
|
||||
|
||||
imported ListOfCurveRangeSample;
|
||||
|
||||
|
||||
imported ListIteratorOfListOfCurveRangeSample;
|
||||
|
||||
imported ListOfSurfaceRangeSample;
|
||||
|
||||
imported ListIteratorOfListOfSurfaceRangeSample;
|
||||
|
||||
imported ListOfBox;
|
||||
|
||||
imported ListIteratorOfListOfBox;
|
||||
|
||||
class CurveRangeSampleMapHasher;
|
||||
|
||||
class SurfaceRangeSampleMapHasher;
|
||||
|
||||
imported MapOfCurveSample;
|
||||
|
||||
imported MapIteratorOfMapOfCurveSample;
|
||||
|
||||
imported MapOfSurfaceSample;
|
||||
|
||||
imported MapIteratorOfMapOfSurfaceSample;
|
||||
|
||||
imported DataMapOfCurveSampleBox;
|
||||
|
||||
imported DataMapIteratorOfDataMapOfCurveSampleBox;
|
||||
|
||||
imported DataMapOfSurfaceSampleBox;
|
||||
|
||||
imported DataMapIteratorOfDataMapOfSurfaceSampleBox;
|
||||
-----------------------------------------------------
|
||||
-- Block of static functions
|
||||
-----------------------------------------------------
|
||||
Length (E : Edge from TopoDS)
|
||||
returns Real from Standard;
|
||||
---Purpose: returns the length of the edge;
|
||||
|
||||
RemoveIdenticalRoots (aSeq :out SequenceOfRoots from IntTools;
|
||||
anEpsT: Real from Standard);
|
||||
---Purpose: Remove from the sequence aSeq the Roots that have
|
||||
-- values ti and tj such as |ti-tj] < anEpsT.
|
||||
|
||||
SortRoots (aSeq :out SequenceOfRoots from IntTools;
|
||||
anEpsT: Real from Standard);
|
||||
---Purpose: Sort the sequence aSeq of the Roots to arrange the
|
||||
-- Roons in increasing order
|
||||
|
||||
FindRootStates (aSeq :out SequenceOfRoots from IntTools;
|
||||
anEpsNull: Real from Standard);
|
||||
---Purpose: Find the states (before and after) for each Root
|
||||
-- from the sequence aSeq
|
||||
|
||||
Parameter (P : Pnt from gp;
|
||||
Curve : Curve from Geom;
|
||||
aParm : out Real from Standard)
|
||||
returns Integer from Standard;
|
||||
|
||||
GetRadius(C: Curve from BRepAdaptor;
|
||||
t1,t3:Real from Standard;
|
||||
R:out Real from Standard)
|
||||
returns Integer from Standard;
|
||||
|
||||
|
||||
PrepareArgs(C: in out Curve from BRepAdaptor;
|
||||
tMax,tMin: Real from Standard;
|
||||
Discret : Integer from Standard;
|
||||
Deflect : Real from Standard;
|
||||
anArgs : out CArray1OfReal from IntTools)
|
||||
returns Integer from Standard;
|
||||
|
||||
end IntTools;
|
||||
|
||||
|
||||
|
@@ -13,25 +13,26 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IntTools.ixx>
|
||||
#include <GProp_GProps.hxx>
|
||||
#include <BRepGProp.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <IntTools_Root.hxx>
|
||||
#include <IntTools_Array1OfRoots.hxx>
|
||||
#include <IntTools_Root.hxx>
|
||||
|
||||
#include <gce_MakeCirc.hxx>
|
||||
#include <gp_Circ.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <BRepAdaptor_Curve.hxx>
|
||||
#include <IntTools_CArray1OfReal.hxx>
|
||||
#include <TColStd_ListOfReal.hxx>
|
||||
#include <GCPnts_QuasiUniformDeflection.hxx>
|
||||
#include <TColStd_ListIteratorOfListOfReal.hxx>
|
||||
#include <BRepGProp.hxx>
|
||||
#include <gce_ErrorType.hxx>
|
||||
#include <gce_MakeCirc.hxx>
|
||||
#include <GCPnts_QuasiUniformDeflection.hxx>
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <gp_Circ.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <GProp_GProps.hxx>
|
||||
#include <IntTools.hxx>
|
||||
#include <IntTools_Array1OfRoots.hxx>
|
||||
#include <IntTools_CArray1OfReal.hxx>
|
||||
#include <IntTools_Root.hxx>
|
||||
#include <TColStd_ListIteratorOfListOfReal.hxx>
|
||||
#include <TColStd_ListOfReal.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
//=======================================================================
|
||||
//function : IntTools::GetRadius
|
||||
//purpose :
|
||||
|
138
src/IntTools/IntTools.hxx
Normal file
138
src/IntTools/IntTools.hxx
Normal file
@@ -0,0 +1,138 @@
|
||||
// Created on: 2000-05-18
|
||||
// Created by: Peter KURNEV
|
||||
// Copyright (c) 2000-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 _IntTools_HeaderFile
|
||||
#define _IntTools_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Real.hxx>
|
||||
#include <IntTools_SequenceOfRoots.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
class TopoDS_Edge;
|
||||
class gp_Pnt;
|
||||
class Geom_Curve;
|
||||
class BRepAdaptor_Curve;
|
||||
class IntTools_CArray1OfReal;
|
||||
class IntTools_Context;
|
||||
class IntTools_ShrunkRange;
|
||||
class IntTools_Range;
|
||||
class IntTools_CommonPrt;
|
||||
class IntTools_Root;
|
||||
class IntTools_EdgeEdge;
|
||||
class IntTools_EdgeFace;
|
||||
class IntTools_FClass2d;
|
||||
class IntTools_MarkedRangeSet;
|
||||
class IntTools_BaseRangeSample;
|
||||
class IntTools_CurveRangeSample;
|
||||
class IntTools_SurfaceRangeSample;
|
||||
class IntTools_CurveRangeLocalizeData;
|
||||
class IntTools_SurfaceRangeLocalizeData;
|
||||
class IntTools_BeanFaceIntersector;
|
||||
class IntTools_Curve;
|
||||
class IntTools_PntOnFace;
|
||||
class IntTools_PntOn2Faces;
|
||||
class IntTools_TopolTool;
|
||||
class IntTools_FaceFace;
|
||||
class IntTools_Tools;
|
||||
class IntTools_CArray1;
|
||||
class IntTools_CArray1OfInteger;
|
||||
class IntTools_CArray1OfReal;
|
||||
class IntTools_CurveRangeSampleMapHasher;
|
||||
class IntTools_SurfaceRangeSampleMapHasher;
|
||||
|
||||
|
||||
//! Contains classes for intersection and classification
|
||||
//! purposes and accompanying classes
|
||||
class IntTools
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! returns the length of the edge;
|
||||
Standard_EXPORT static Standard_Real Length (const TopoDS_Edge& E);
|
||||
|
||||
//! Remove from the sequence aSeq the Roots that have
|
||||
//! values ti and tj such as |ti-tj] < anEpsT.
|
||||
Standard_EXPORT static void RemoveIdenticalRoots (IntTools_SequenceOfRoots& aSeq, const Standard_Real anEpsT);
|
||||
|
||||
//! Sort the sequence aSeq of the Roots to arrange the
|
||||
//! Roons in increasing order
|
||||
Standard_EXPORT static void SortRoots (IntTools_SequenceOfRoots& aSeq, const Standard_Real anEpsT);
|
||||
|
||||
//! Find the states (before and after) for each Root
|
||||
//! from the sequence aSeq
|
||||
Standard_EXPORT static void FindRootStates (IntTools_SequenceOfRoots& aSeq, const Standard_Real anEpsNull);
|
||||
|
||||
Standard_EXPORT static Standard_Integer Parameter (const gp_Pnt& P, const Handle(Geom_Curve)& Curve, Standard_Real& aParm);
|
||||
|
||||
Standard_EXPORT static Standard_Integer GetRadius (const BRepAdaptor_Curve& C, const Standard_Real t1, const Standard_Real t3, Standard_Real& R);
|
||||
|
||||
Standard_EXPORT static Standard_Integer PrepareArgs (BRepAdaptor_Curve& C, const Standard_Real tMax, const Standard_Real tMin, const Standard_Integer Discret, const Standard_Real Deflect, IntTools_CArray1OfReal& anArgs);
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
friend class IntTools_Context;
|
||||
friend class IntTools_ShrunkRange;
|
||||
friend class IntTools_Range;
|
||||
friend class IntTools_CommonPrt;
|
||||
friend class IntTools_Root;
|
||||
friend class IntTools_EdgeEdge;
|
||||
friend class IntTools_EdgeFace;
|
||||
friend class IntTools_FClass2d;
|
||||
friend class IntTools_MarkedRangeSet;
|
||||
friend class IntTools_BaseRangeSample;
|
||||
friend class IntTools_CurveRangeSample;
|
||||
friend class IntTools_SurfaceRangeSample;
|
||||
friend class IntTools_CurveRangeLocalizeData;
|
||||
friend class IntTools_SurfaceRangeLocalizeData;
|
||||
friend class IntTools_BeanFaceIntersector;
|
||||
friend class IntTools_Curve;
|
||||
friend class IntTools_PntOnFace;
|
||||
friend class IntTools_PntOn2Faces;
|
||||
friend class IntTools_TopolTool;
|
||||
friend class IntTools_FaceFace;
|
||||
friend class IntTools_Tools;
|
||||
friend class IntTools_CArray1;
|
||||
friend class IntTools_CArray1OfInteger;
|
||||
friend class IntTools_CArray1OfReal;
|
||||
friend class IntTools_CurveRangeSampleMapHasher;
|
||||
friend class IntTools_SurfaceRangeSampleMapHasher;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IntTools_HeaderFile
|
@@ -1,36 +0,0 @@
|
||||
-- Created on: 2005-10-05
|
||||
-- Created by: Mikhail KLOKOV
|
||||
-- Copyright (c) 2005-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.
|
||||
|
||||
class BaseRangeSample from IntTools
|
||||
---Purpose: base class for range index management
|
||||
|
||||
is
|
||||
Create
|
||||
returns BaseRangeSample from IntTools;
|
||||
|
||||
Create(theDepth: Integer from Standard)
|
||||
returns BaseRangeSample from IntTools;
|
||||
|
||||
SetDepth(me: in out; theDepth: Integer from Standard);
|
||||
---C++: inline
|
||||
|
||||
GetDepth(me)
|
||||
returns Integer from Standard;
|
||||
---C++: inline
|
||||
|
||||
fields
|
||||
myDepth: Integer from Standard;
|
||||
|
||||
end BaseRangeSample from IntTools;
|
@@ -13,7 +13,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IntTools_BaseRangeSample.ixx>
|
||||
|
||||
#include <IntTools_BaseRangeSample.hxx>
|
||||
|
||||
IntTools_BaseRangeSample::IntTools_BaseRangeSample()
|
||||
{
|
||||
|
67
src/IntTools/IntTools_BaseRangeSample.hxx
Normal file
67
src/IntTools/IntTools_BaseRangeSample.hxx
Normal file
@@ -0,0 +1,67 @@
|
||||
// Created on: 2005-10-05
|
||||
// Created by: Mikhail KLOKOV
|
||||
// Copyright (c) 2005-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 _IntTools_BaseRangeSample_HeaderFile
|
||||
#define _IntTools_BaseRangeSample_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Integer.hxx>
|
||||
|
||||
|
||||
//! base class for range index management
|
||||
class IntTools_BaseRangeSample
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT IntTools_BaseRangeSample();
|
||||
|
||||
Standard_EXPORT IntTools_BaseRangeSample(const Standard_Integer theDepth);
|
||||
|
||||
void SetDepth (const Standard_Integer theDepth);
|
||||
|
||||
Standard_Integer GetDepth() const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Standard_Integer myDepth;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <IntTools_BaseRangeSample.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IntTools_BaseRangeSample_HeaderFile
|
@@ -1,251 +0,0 @@
|
||||
-- Created on: 2001-06-29
|
||||
-- Created by: Michael KLOKOV
|
||||
-- Copyright (c) 2001-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.
|
||||
|
||||
class BeanFaceIntersector from IntTools
|
||||
|
||||
---Purpose: The class BeanFaceIntersector computes ranges of parameters on
|
||||
-- the curve of a bean(part of edge) that bound the parts of bean which
|
||||
-- are on the surface of a face according to edge and face tolerances.
|
||||
-- Warning: The real boundaries of the face are not taken into account,
|
||||
-- Most of the result parts of the bean lays only inside the region of the surface,
|
||||
-- which includes the inside of the face. And the parts which are out of this region can be
|
||||
-- excluded from the result.
|
||||
|
||||
uses
|
||||
|
||||
SequenceOfRoots from IntTools,
|
||||
MarkedRangeSet from IntTools,
|
||||
SequenceOfRanges from IntTools,
|
||||
Context from IntTools,
|
||||
ExtCS from Extrema,
|
||||
ProjectPointOnSurf from GeomAPI,
|
||||
Edge from TopoDS,
|
||||
Face from TopoDS,
|
||||
Curve from BRepAdaptor,
|
||||
Surface from BRepAdaptor,
|
||||
Box from Bnd,
|
||||
CurveRangeSample from IntTools,
|
||||
SurfaceRangeSample from IntTools,
|
||||
ListOfCurveRangeSample from IntTools,
|
||||
ListOfSurfaceRangeSample from IntTools,
|
||||
CurveRangeLocalizeData from IntTools,
|
||||
SurfaceRangeLocalizeData from IntTools,
|
||||
Surface from Geom
|
||||
|
||||
is
|
||||
Create returns BeanFaceIntersector from IntTools;
|
||||
|
||||
Create(theEdge: Edge from TopoDS;
|
||||
theFace: Face from TopoDS)
|
||||
returns BeanFaceIntersector from IntTools;
|
||||
---Purpose:
|
||||
--- Initializes the algorithm
|
||||
---
|
||||
-- Warning:
|
||||
--- The parts of the edge which are on
|
||||
--- the surface of the face and belong to
|
||||
--- the whole in the face (if there is)
|
||||
--- is considered as result
|
||||
---
|
||||
|
||||
Create(theCurve : Curve from BRepAdaptor;
|
||||
theSurface : Surface from BRepAdaptor;
|
||||
theBeanTolerance: Real from Standard;
|
||||
theFaceTolerance: Real from Standard)
|
||||
returns BeanFaceIntersector from IntTools;
|
||||
---Purpose:
|
||||
--- Initializes the algorithm
|
||||
---
|
||||
|
||||
Create(theCurve : Curve from BRepAdaptor;
|
||||
theSurface : Surface from BRepAdaptor;
|
||||
theFirstParOnCurve: Real from Standard;
|
||||
theLastParOnCurve : Real from Standard;
|
||||
theUMinParameter : Real from Standard;
|
||||
theUMaxParameter : Real from Standard;
|
||||
theVMinParameter : Real from Standard;
|
||||
theVMaxParameter : Real from Standard;
|
||||
theBeanTolerance : Real from Standard;
|
||||
theFaceTolerance : Real from Standard)
|
||||
returns BeanFaceIntersector from IntTools;
|
||||
---Purpose:
|
||||
--- Initializes the algorithm
|
||||
--- theUMinParameter, ... are used for
|
||||
--- optimization purposes
|
||||
---
|
||||
|
||||
Init(me: in out;theEdge: Edge from TopoDS;
|
||||
theFace: Face from TopoDS);
|
||||
---Purpose:
|
||||
--- Initializes the algorithm
|
||||
---
|
||||
-- Warning:
|
||||
--- The parts of the edge which are on
|
||||
--- the surface of the face and belong to
|
||||
--- the whole in the face (if there is)
|
||||
--- is considered as result
|
||||
---
|
||||
|
||||
Init(me: in out;theCurve : Curve from BRepAdaptor;
|
||||
theSurface : Surface from BRepAdaptor;
|
||||
theBeanTolerance: Real from Standard;
|
||||
theFaceTolerance: Real from Standard);
|
||||
---Purpose:
|
||||
--- Initializes the algorithm
|
||||
---
|
||||
|
||||
Init(me: in out;theCurve : Curve from BRepAdaptor;
|
||||
theSurface : Surface from BRepAdaptor;
|
||||
theFirstParOnCurve: Real from Standard;
|
||||
theLastParOnCurve : Real from Standard;
|
||||
theUMinParameter : Real from Standard;
|
||||
theUMaxParameter : Real from Standard;
|
||||
theVMinParameter : Real from Standard;
|
||||
theVMaxParameter : Real from Standard;
|
||||
theBeanTolerance : Real from Standard;
|
||||
theFaceTolerance : Real from Standard);
|
||||
---Purpose:
|
||||
--- Initializes the algorithm
|
||||
--- theUMinParameter, ... are used for
|
||||
--- optimization purposes
|
||||
---
|
||||
|
||||
SetContext(me: in out;
|
||||
theContext: Context from IntTools);
|
||||
---Purpose:
|
||||
--- Sets the intersecton context
|
||||
---
|
||||
Context(me)
|
||||
returns Context from IntTools;
|
||||
---C++: return const &
|
||||
---Purpose:
|
||||
--- Gets the intersecton context
|
||||
---
|
||||
SetBeanParameters(me: in out;theFirstParOnCurve : Real from Standard;
|
||||
theLastParOnCurve : Real from Standard);
|
||||
---Purpose:
|
||||
--- Set restrictions for curve
|
||||
---
|
||||
|
||||
SetSurfaceParameters(me: in out;theUMinParameter : Real from Standard;
|
||||
theUMaxParameter : Real from Standard;
|
||||
theVMinParameter : Real from Standard;
|
||||
theVMaxParameter : Real from Standard);
|
||||
---Purpose:
|
||||
--- Set restrictions for surface
|
||||
---
|
||||
|
||||
Perform(me: in out);
|
||||
---Purpose:
|
||||
--- Launches the algorithm
|
||||
---
|
||||
|
||||
IsDone(me) returns Boolean from Standard;
|
||||
---C++: inline
|
||||
|
||||
Result(me)
|
||||
returns SequenceOfRanges from IntTools;
|
||||
---C++: return const &
|
||||
|
||||
Result(me; theResults: out SequenceOfRanges from IntTools);
|
||||
|
||||
-- private
|
||||
|
||||
ComputeAroundExactIntersection(me: in out)
|
||||
is private;
|
||||
|
||||
ComputeLinePlane(me: in out)
|
||||
is private;
|
||||
|
||||
FastComputeExactIntersection(me: in out)
|
||||
returns Integer from Standard is private;
|
||||
|
||||
ComputeUsingExtremum(me: in out)
|
||||
is private;
|
||||
|
||||
ComputeNearRangeBoundaries(me: in out)
|
||||
is private;
|
||||
|
||||
ComputeLocalized(me: in out)
|
||||
returns Boolean from Standard is private;
|
||||
|
||||
ComputeRangeFromStartPoint(me: in out; ToIncreaseParameter : Boolean from Standard;
|
||||
theParameter : Real from Standard;
|
||||
theUParameter : Real from Standard;
|
||||
theVParameter : Real from Standard)
|
||||
is private;
|
||||
|
||||
ComputeRangeFromStartPoint(me: in out; ToIncreaseParameter : Boolean from Standard;
|
||||
theParameter : Real from Standard;
|
||||
theUParameter : Real from Standard;
|
||||
theVParameter : Real from Standard;
|
||||
theIndex : Integer from Standard)
|
||||
is private;
|
||||
|
||||
Distance(me: in out; theArg : Real from Standard;
|
||||
theUParameter: out Real from Standard;
|
||||
theVParameter: out Real from Standard)
|
||||
returns Real from Standard
|
||||
is private;
|
||||
|
||||
Distance(me: in out; theArg: Real from Standard)
|
||||
returns Real from Standard
|
||||
is private;
|
||||
|
||||
LocalizeSolutions(me: in out; theCurveRange : CurveRangeSample from IntTools;
|
||||
theBoxCurve : Box from Bnd;
|
||||
theSurfaceRange: SurfaceRangeSample from IntTools;
|
||||
theBoxSurface : Box from Bnd;
|
||||
theCurveData : in out CurveRangeLocalizeData from IntTools;
|
||||
theSurfaceData : in out SurfaceRangeLocalizeData from IntTools;
|
||||
theListCurveRange: in out ListOfCurveRangeSample from IntTools;
|
||||
theListSurfaceRange: in out ListOfSurfaceRangeSample from IntTools)
|
||||
returns Boolean from Standard
|
||||
is private;
|
||||
|
||||
TestComputeCoinside(me: in out)
|
||||
returns Boolean from Standard
|
||||
is private;
|
||||
|
||||
fields
|
||||
|
||||
-- sources
|
||||
myCurve : Curve from BRepAdaptor;
|
||||
mySurface : Surface from BRepAdaptor;
|
||||
myTrsfSurface : Surface from Geom;
|
||||
myFirstParameter : Real from Standard;
|
||||
myLastParameter : Real from Standard;
|
||||
myUMinParameter : Real from Standard;
|
||||
myUMaxParameter : Real from Standard;
|
||||
myVMinParameter : Real from Standard;
|
||||
myVMaxParameter : Real from Standard;
|
||||
myBeanTolerance : Real from Standard;
|
||||
myFaceTolerance : Real from Standard;
|
||||
|
||||
myCurveResolution: Real from Standard;
|
||||
myCriteria : Real from Standard;
|
||||
|
||||
-- tools
|
||||
myExtrema : ExtCS from Extrema;
|
||||
myProjector : ProjectPointOnSurf from GeomAPI;
|
||||
myRangeManager : MarkedRangeSet from IntTools;
|
||||
myDeflection : Real from Standard;
|
||||
myContext : Context from IntTools;
|
||||
|
||||
-- results
|
||||
myResults : SequenceOfRanges from IntTools;
|
||||
myIsDone : Boolean from Standard;
|
||||
|
||||
end BeanFaceIntersector from IntTools;
|
@@ -11,53 +11,59 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IntTools_BeanFaceIntersector.ixx>
|
||||
|
||||
#include <IntTools_Root.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <Extrema_POnCurv.hxx>
|
||||
#include <Extrema_POnSurf.hxx>
|
||||
#include <Bnd_Box.hxx>
|
||||
#include <BndLib_Add3dCurve.hxx>
|
||||
#include <BndLib_AddSurface.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <Geom_Surface.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
#include <TColStd_Array1OfBoolean.hxx>
|
||||
#include <TColStd_ListOfInteger.hxx>
|
||||
#include <TColStd_ListIteratorOfListOfInteger.hxx>
|
||||
#include <IntTools_EdgeFace.hxx>
|
||||
#include <IntTools_ListOfCurveRangeSample.hxx>
|
||||
#include <IntTools_ListOfSurfaceRangeSample.hxx>
|
||||
#include <IntTools_ListOfBox.hxx>
|
||||
#include <IntTools_ListIteratorOfListOfBox.hxx>
|
||||
#include <IntTools_ListIteratorOfListOfCurveRangeSample.hxx>
|
||||
#include <IntTools_ListIteratorOfListOfSurfaceRangeSample.hxx>
|
||||
#include <IntTools_MapIteratorOfMapOfCurveSample.hxx>
|
||||
#include <TColgp_Array1OfPnt2d.hxx>
|
||||
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <Geom_Surface.hxx>
|
||||
#include <Geom_BSplineSurface.hxx>
|
||||
#include <GeomAdaptor_Curve.hxx>
|
||||
#include <GeomAdaptor_Surface.hxx>
|
||||
#include <BRepAdaptor_Curve.hxx>
|
||||
#include <BRepAdaptor_HCurve.hxx>
|
||||
#include <BRepAdaptor_HSurface.hxx>
|
||||
#include <BRepAdaptor_Surface.hxx>
|
||||
#include <ElCLib.hxx>
|
||||
#include <ElSLib.hxx>
|
||||
#include <Extrema_ExtCS.hxx>
|
||||
#include <Extrema_ExtPS.hxx>
|
||||
#include <IntTools.hxx>
|
||||
#include <IntTools_Context.hxx>
|
||||
#include <IntTools_Tools.hxx>
|
||||
#include <Extrema_GenExtCS.hxx>
|
||||
#include <Extrema_GenLocateExtPS.hxx>
|
||||
#include <Extrema_POnCurv.hxx>
|
||||
#include <Extrema_POnSurf.hxx>
|
||||
#include <Geom_BSplineSurface.hxx>
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <Geom_Surface.hxx>
|
||||
#include <GeomAdaptor_Curve.hxx>
|
||||
#include <GeomAdaptor_Surface.hxx>
|
||||
#include <GeomAPI_ProjectPointOnCurve.hxx>
|
||||
#include <GeomInt.hxx>
|
||||
#include <IntAna_QuadQuadGeo.hxx>
|
||||
#include <IntCurveSurface_HInter.hxx>
|
||||
#include <IntCurveSurface_IntersectionPoint.hxx>
|
||||
#include <IntCurveSurface_IntersectionSegment.hxx>
|
||||
#include <IntAna_QuadQuadGeo.hxx>
|
||||
#include <BRepAdaptor_HCurve.hxx>
|
||||
#include <BRepAdaptor_HSurface.hxx>
|
||||
#include <Extrema_GenLocateExtPS.hxx>
|
||||
#include <Extrema_GenExtCS.hxx>
|
||||
#include <Bnd_Box.hxx>
|
||||
#include <BndLib_AddSurface.hxx>
|
||||
#include <BndLib_Add3dCurve.hxx>
|
||||
#include <ElCLib.hxx>
|
||||
#include <ElSLib.hxx>
|
||||
#include <GeomInt.hxx>
|
||||
#include <IntTools.hxx>
|
||||
#include <IntTools_BeanFaceIntersector.hxx>
|
||||
#include <IntTools_Context.hxx>
|
||||
#include <IntTools_CurveRangeLocalizeData.hxx>
|
||||
#include <IntTools_CurveRangeSample.hxx>
|
||||
#include <IntTools_EdgeFace.hxx>
|
||||
#include <IntTools_ListIteratorOfListOfBox.hxx>
|
||||
#include <IntTools_ListIteratorOfListOfCurveRangeSample.hxx>
|
||||
#include <IntTools_ListIteratorOfListOfSurfaceRangeSample.hxx>
|
||||
#include <IntTools_ListOfBox.hxx>
|
||||
#include <IntTools_ListOfCurveRangeSample.hxx>
|
||||
#include <IntTools_ListOfSurfaceRangeSample.hxx>
|
||||
#include <IntTools_MapIteratorOfMapOfCurveSample.hxx>
|
||||
#include <IntTools_Root.hxx>
|
||||
#include <IntTools_SurfaceRangeLocalizeData.hxx>
|
||||
#include <IntTools_SurfaceRangeSample.hxx>
|
||||
#include <IntTools_Tools.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <TColgp_Array1OfPnt2d.hxx>
|
||||
#include <TColStd_Array1OfBoolean.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
#include <TColStd_ListIteratorOfListOfInteger.hxx>
|
||||
#include <TColStd_ListOfInteger.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS_Face.hxx>
|
||||
|
||||
static Standard_Boolean SetEmptyResultRange(const Standard_Real theParameter,
|
||||
IntTools_MarkedRangeSet& theMarkedRange);
|
||||
|
197
src/IntTools/IntTools_BeanFaceIntersector.hxx
Normal file
197
src/IntTools/IntTools_BeanFaceIntersector.hxx
Normal file
@@ -0,0 +1,197 @@
|
||||
// Created on: 2001-06-29
|
||||
// Created by: Michael KLOKOV
|
||||
// Copyright (c) 2001-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 _IntTools_BeanFaceIntersector_HeaderFile
|
||||
#define _IntTools_BeanFaceIntersector_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <BRepAdaptor_Curve.hxx>
|
||||
#include <BRepAdaptor_Surface.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Extrema_ExtCS.hxx>
|
||||
#include <GeomAPI_ProjectPointOnSurf.hxx>
|
||||
#include <IntTools_MarkedRangeSet.hxx>
|
||||
#include <IntTools_SequenceOfRanges.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <IntTools_ListOfCurveRangeSample.hxx>
|
||||
#include <IntTools_ListOfSurfaceRangeSample.hxx>
|
||||
class Geom_Surface;
|
||||
class IntTools_Context;
|
||||
class TopoDS_Edge;
|
||||
class TopoDS_Face;
|
||||
class BRepAdaptor_Curve;
|
||||
class BRepAdaptor_Surface;
|
||||
class IntTools_CurveRangeSample;
|
||||
class Bnd_Box;
|
||||
class IntTools_SurfaceRangeSample;
|
||||
class IntTools_CurveRangeLocalizeData;
|
||||
class IntTools_SurfaceRangeLocalizeData;
|
||||
|
||||
|
||||
//! The class BeanFaceIntersector computes ranges of parameters on
|
||||
//! the curve of a bean(part of edge) that bound the parts of bean which
|
||||
//! are on the surface of a face according to edge and face tolerances.
|
||||
//! Warning: The real boundaries of the face are not taken into account,
|
||||
//! Most of the result parts of the bean lays only inside the region of the surface,
|
||||
//! which includes the inside of the face. And the parts which are out of this region can be
|
||||
//! excluded from the result.
|
||||
class IntTools_BeanFaceIntersector
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT IntTools_BeanFaceIntersector();
|
||||
|
||||
|
||||
//! Initializes the algorithm
|
||||
//!
|
||||
//! Warning:
|
||||
//! The parts of the edge which are on
|
||||
//! the surface of the face and belong to
|
||||
//! the whole in the face (if there is)
|
||||
//! is considered as result
|
||||
Standard_EXPORT IntTools_BeanFaceIntersector(const TopoDS_Edge& theEdge, const TopoDS_Face& theFace);
|
||||
|
||||
|
||||
//! Initializes the algorithm
|
||||
Standard_EXPORT IntTools_BeanFaceIntersector(const BRepAdaptor_Curve& theCurve, const BRepAdaptor_Surface& theSurface, const Standard_Real theBeanTolerance, const Standard_Real theFaceTolerance);
|
||||
|
||||
|
||||
//! Initializes the algorithm
|
||||
//! theUMinParameter, ... are used for
|
||||
//! optimization purposes
|
||||
Standard_EXPORT IntTools_BeanFaceIntersector(const BRepAdaptor_Curve& theCurve, const BRepAdaptor_Surface& theSurface, const Standard_Real theFirstParOnCurve, const Standard_Real theLastParOnCurve, const Standard_Real theUMinParameter, const Standard_Real theUMaxParameter, const Standard_Real theVMinParameter, const Standard_Real theVMaxParameter, const Standard_Real theBeanTolerance, const Standard_Real theFaceTolerance);
|
||||
|
||||
|
||||
//! Initializes the algorithm
|
||||
//!
|
||||
//! Warning:
|
||||
//! The parts of the edge which are on
|
||||
//! the surface of the face and belong to
|
||||
//! the whole in the face (if there is)
|
||||
//! is considered as result
|
||||
Standard_EXPORT void Init (const TopoDS_Edge& theEdge, const TopoDS_Face& theFace);
|
||||
|
||||
|
||||
//! Initializes the algorithm
|
||||
Standard_EXPORT void Init (const BRepAdaptor_Curve& theCurve, const BRepAdaptor_Surface& theSurface, const Standard_Real theBeanTolerance, const Standard_Real theFaceTolerance);
|
||||
|
||||
|
||||
//! Initializes the algorithm
|
||||
//! theUMinParameter, ... are used for
|
||||
//! optimization purposes
|
||||
Standard_EXPORT void Init (const BRepAdaptor_Curve& theCurve, const BRepAdaptor_Surface& theSurface, const Standard_Real theFirstParOnCurve, const Standard_Real theLastParOnCurve, const Standard_Real theUMinParameter, const Standard_Real theUMaxParameter, const Standard_Real theVMinParameter, const Standard_Real theVMaxParameter, const Standard_Real theBeanTolerance, const Standard_Real theFaceTolerance);
|
||||
|
||||
|
||||
//! Sets the intersecton context
|
||||
Standard_EXPORT void SetContext (const Handle(IntTools_Context)& theContext);
|
||||
|
||||
|
||||
//! Gets the intersecton context
|
||||
Standard_EXPORT const Handle(IntTools_Context)& Context() const;
|
||||
|
||||
|
||||
//! Set restrictions for curve
|
||||
Standard_EXPORT void SetBeanParameters (const Standard_Real theFirstParOnCurve, const Standard_Real theLastParOnCurve);
|
||||
|
||||
|
||||
//! Set restrictions for surface
|
||||
Standard_EXPORT void SetSurfaceParameters (const Standard_Real theUMinParameter, const Standard_Real theUMaxParameter, const Standard_Real theVMinParameter, const Standard_Real theVMaxParameter);
|
||||
|
||||
|
||||
//! Launches the algorithm
|
||||
Standard_EXPORT void Perform();
|
||||
|
||||
Standard_Boolean IsDone() const;
|
||||
|
||||
Standard_EXPORT const IntTools_SequenceOfRanges& Result() const;
|
||||
|
||||
Standard_EXPORT void Result (IntTools_SequenceOfRanges& theResults) const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Standard_EXPORT void ComputeAroundExactIntersection();
|
||||
|
||||
Standard_EXPORT void ComputeLinePlane();
|
||||
|
||||
Standard_EXPORT Standard_Integer FastComputeExactIntersection();
|
||||
|
||||
Standard_EXPORT void ComputeUsingExtremum();
|
||||
|
||||
Standard_EXPORT void ComputeNearRangeBoundaries();
|
||||
|
||||
Standard_EXPORT Standard_Boolean ComputeLocalized();
|
||||
|
||||
Standard_EXPORT void ComputeRangeFromStartPoint (const Standard_Boolean ToIncreaseParameter, const Standard_Real theParameter, const Standard_Real theUParameter, const Standard_Real theVParameter);
|
||||
|
||||
Standard_EXPORT void ComputeRangeFromStartPoint (const Standard_Boolean ToIncreaseParameter, const Standard_Real theParameter, const Standard_Real theUParameter, const Standard_Real theVParameter, const Standard_Integer theIndex);
|
||||
|
||||
Standard_EXPORT Standard_Real Distance (const Standard_Real theArg, Standard_Real& theUParameter, Standard_Real& theVParameter);
|
||||
|
||||
Standard_EXPORT Standard_Real Distance (const Standard_Real theArg);
|
||||
|
||||
Standard_EXPORT Standard_Boolean LocalizeSolutions (const IntTools_CurveRangeSample& theCurveRange, const Bnd_Box& theBoxCurve, const IntTools_SurfaceRangeSample& theSurfaceRange, const Bnd_Box& theBoxSurface, IntTools_CurveRangeLocalizeData& theCurveData, IntTools_SurfaceRangeLocalizeData& theSurfaceData, IntTools_ListOfCurveRangeSample& theListCurveRange, IntTools_ListOfSurfaceRangeSample& theListSurfaceRange);
|
||||
|
||||
Standard_EXPORT Standard_Boolean TestComputeCoinside();
|
||||
|
||||
|
||||
BRepAdaptor_Curve myCurve;
|
||||
BRepAdaptor_Surface mySurface;
|
||||
Handle(Geom_Surface) myTrsfSurface;
|
||||
Standard_Real myFirstParameter;
|
||||
Standard_Real myLastParameter;
|
||||
Standard_Real myUMinParameter;
|
||||
Standard_Real myUMaxParameter;
|
||||
Standard_Real myVMinParameter;
|
||||
Standard_Real myVMaxParameter;
|
||||
Standard_Real myBeanTolerance;
|
||||
Standard_Real myFaceTolerance;
|
||||
Standard_Real myCurveResolution;
|
||||
Standard_Real myCriteria;
|
||||
Extrema_ExtCS myExtrema;
|
||||
GeomAPI_ProjectPointOnSurf myProjector;
|
||||
IntTools_MarkedRangeSet myRangeManager;
|
||||
Standard_Real myDeflection;
|
||||
Handle(IntTools_Context) myContext;
|
||||
IntTools_SequenceOfRanges myResults;
|
||||
Standard_Boolean myIsDone;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <IntTools_BeanFaceIntersector.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IntTools_BeanFaceIntersector_HeaderFile
|
@@ -1,141 +0,0 @@
|
||||
-- Created on: 2000-05-26
|
||||
-- Created by: Peter KURNEV
|
||||
-- Copyright (c) 2000-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.
|
||||
|
||||
---Purpose:
|
||||
|
||||
generic class CArray1 from IntTools (Array1Item as any)
|
||||
|
||||
---Purpose: The class CArray1 represents unidimensionnal arrays
|
||||
-- of fixed size known at run time. Run-time boundary
|
||||
-- check is performed
|
||||
--
|
||||
-- The range of the index is user defined from 0 to Length
|
||||
|
||||
raises
|
||||
|
||||
ConstructionError from Standard,
|
||||
OutOfRange from Standard,
|
||||
OutOfMemory from Standard
|
||||
|
||||
is
|
||||
|
||||
Create (Length: Integer from Standard = 0)
|
||||
returns CArray1 from IntTools
|
||||
---Purpose:
|
||||
--- Creates an array of given Length.
|
||||
---
|
||||
raises
|
||||
ConstructionError from Standard, -- when Length < 0
|
||||
OutOfMemory from Standard; -- when not enough memory
|
||||
|
||||
Create (AnArray : CArray1 from IntTools)
|
||||
returns CArray1 from IntTools
|
||||
---Purpose:
|
||||
--- Prohibits the creator by copy
|
||||
---
|
||||
is private;
|
||||
|
||||
Create(Item: Array1Item;
|
||||
Length: Integer from Standard)
|
||||
---Purpose:
|
||||
--- Creates an array sharing datas with an other.
|
||||
-- Example:
|
||||
--- Item tab[100];
|
||||
--- CArray1OfItem thetab (tab[0],100);
|
||||
---
|
||||
--- CArray1OfItem aArray1(100);
|
||||
--- CArray1OfItem anSharedArray1(aArray1.ChangeValue(0),aArray1.Length());
|
||||
---
|
||||
-- Warning:
|
||||
--- The validity of length are under the responsability
|
||||
--- of the user.
|
||||
--- The sahred array must have a valid address during the life of
|
||||
--- the Array1.
|
||||
---
|
||||
returns CArray1 from IntTools
|
||||
raises ConstructionError from Standard; -- when Length < 0
|
||||
|
||||
Init (me: in out; V: Array1Item);
|
||||
---Purpose:
|
||||
--- Initializes the array with a given value.
|
||||
---
|
||||
|
||||
|
||||
Resize(me: in out;
|
||||
theNewLength: Integer from Standard);
|
||||
---Purpose:
|
||||
--- destroy current content and realloc the new size
|
||||
--- does nothing if Length() == theLength
|
||||
---
|
||||
|
||||
Destroy (me: in out);
|
||||
---Purpose:
|
||||
--- Frees the allocated area corresponding to the
|
||||
--- array.
|
||||
---
|
||||
---C++: alias ~
|
||||
|
||||
Length (me) returns Integer from Standard;
|
||||
---Purpose:
|
||||
--- Returns the number of elements of <me>.
|
||||
---
|
||||
---C++: inline
|
||||
|
||||
Append (me:out; Value: Array1Item);
|
||||
---Purpose:
|
||||
|
||||
SetValue (me : out; Index: Integer from Standard; Value: Array1Item)
|
||||
raises OutOfRange from Standard;
|
||||
---Purpose:
|
||||
--- Sets the <Index>th element of the array to
|
||||
--- <Value>.
|
||||
---
|
||||
|
||||
|
||||
Value (me; Index:Integer from Standard) returns any Array1Item
|
||||
---Purpose:
|
||||
--- Returns the value of the <Index>th element of the
|
||||
--- array.
|
||||
---
|
||||
---C++: alias operator ()
|
||||
---C++: return const &
|
||||
raises OutOfRange from Standard;
|
||||
|
||||
ChangeValue (me: in out; Index:Integer from Standard) returns any Array1Item
|
||||
---Purpose:
|
||||
--- Returns the value of the <Index>th element of the
|
||||
--- array.
|
||||
---
|
||||
---C++: alias operator ()
|
||||
---C++: return &
|
||||
raises OutOfRange from Standard;
|
||||
|
||||
IsEqual(me; Other: CArray1 from IntTools)
|
||||
returns Boolean from Standard;
|
||||
---Purpose:
|
||||
--- Applys the == operator on each array item
|
||||
---
|
||||
---C++: alias operator ==
|
||||
|
||||
fields
|
||||
|
||||
myStart: Address;
|
||||
myLength: Integer;
|
||||
myIsAllocated: Boolean;
|
||||
|
||||
end CArray1;
|
||||
|
||||
|
||||
|
114
src/IntTools/IntTools_CArray1OfInteger.hxx
Normal file
114
src/IntTools/IntTools_CArray1OfInteger.hxx
Normal file
@@ -0,0 +1,114 @@
|
||||
// Created on: 2000-05-18
|
||||
// Created by: Peter KURNEV
|
||||
// Copyright (c) 2000-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 _IntTools_CArray1OfInteger_HeaderFile
|
||||
#define _IntTools_CArray1OfInteger_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Address.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class Standard_ConstructionError;
|
||||
class Standard_OutOfRange;
|
||||
class Standard_OutOfMemory;
|
||||
|
||||
|
||||
|
||||
class IntTools_CArray1OfInteger
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT IntTools_CArray1OfInteger(const Standard_Integer Length = 0);
|
||||
|
||||
Standard_EXPORT IntTools_CArray1OfInteger(const Standard_Integer& Item, const Standard_Integer Length);
|
||||
|
||||
Standard_EXPORT void Init (const Standard_Integer& V);
|
||||
|
||||
Standard_EXPORT void Resize (const Standard_Integer theNewLength);
|
||||
|
||||
Standard_EXPORT void Destroy();
|
||||
~IntTools_CArray1OfInteger()
|
||||
{
|
||||
Destroy();
|
||||
}
|
||||
|
||||
Standard_Integer Length() const;
|
||||
|
||||
Standard_EXPORT void Append (const Standard_Integer& Value);
|
||||
|
||||
Standard_EXPORT void SetValue (const Standard_Integer Index, const Standard_Integer& Value);
|
||||
|
||||
Standard_EXPORT const Standard_Integer& Value (const Standard_Integer Index) const;
|
||||
const Standard_Integer& operator () (const Standard_Integer Index) const
|
||||
{
|
||||
return Value(Index);
|
||||
}
|
||||
|
||||
Standard_EXPORT Standard_Integer& ChangeValue (const Standard_Integer Index);
|
||||
Standard_Integer& operator () (const Standard_Integer Index)
|
||||
{
|
||||
return ChangeValue(Index);
|
||||
}
|
||||
|
||||
Standard_EXPORT Standard_Boolean IsEqual (const IntTools_CArray1OfInteger& Other) const;
|
||||
Standard_Boolean operator == (const IntTools_CArray1OfInteger& Other) const
|
||||
{
|
||||
return IsEqual(Other);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Standard_EXPORT IntTools_CArray1OfInteger(const IntTools_CArray1OfInteger& AnArray);
|
||||
|
||||
|
||||
Standard_Address myStart;
|
||||
Standard_Integer myLength;
|
||||
Standard_Boolean myIsAllocated;
|
||||
|
||||
|
||||
};
|
||||
|
||||
#define Array1Item Standard_Integer
|
||||
#define Array1Item_hxx <Standard_Integer.hxx>
|
||||
#define IntTools_CArray1 IntTools_CArray1OfInteger
|
||||
#define IntTools_CArray1_hxx <IntTools_CArray1OfInteger.hxx>
|
||||
|
||||
#include <IntTools_CArray1.lxx>
|
||||
|
||||
#undef Array1Item
|
||||
#undef Array1Item_hxx
|
||||
#undef IntTools_CArray1
|
||||
#undef IntTools_CArray1_hxx
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IntTools_CArray1OfInteger_HeaderFile
|
28
src/IntTools/IntTools_CArray1OfInteger_0.cxx
Normal file
28
src/IntTools/IntTools_CArray1OfInteger_0.cxx
Normal file
@@ -0,0 +1,28 @@
|
||||
// Created on: 2000-05-18
|
||||
// Created by: Peter KURNEV
|
||||
// Copyright (c) 2000-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.
|
||||
|
||||
#include <IntTools_CArray1OfInteger.hxx>
|
||||
|
||||
#include <Standard_ConstructionError.hxx>
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
#include <Standard_OutOfMemory.hxx>
|
||||
|
||||
|
||||
#define Array1Item Standard_Integer
|
||||
#define Array1Item_hxx <Standard_Integer.hxx>
|
||||
#define IntTools_CArray1 IntTools_CArray1OfInteger
|
||||
#define IntTools_CArray1_hxx <IntTools_CArray1OfInteger.hxx>
|
||||
#include <IntTools_CArray1.gxx>
|
||||
|
115
src/IntTools/IntTools_CArray1OfReal.hxx
Normal file
115
src/IntTools/IntTools_CArray1OfReal.hxx
Normal file
@@ -0,0 +1,115 @@
|
||||
// Created on: 2000-05-18
|
||||
// Created by: Peter KURNEV
|
||||
// Copyright (c) 2000-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 _IntTools_CArray1OfReal_HeaderFile
|
||||
#define _IntTools_CArray1OfReal_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Address.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
class Standard_ConstructionError;
|
||||
class Standard_OutOfRange;
|
||||
class Standard_OutOfMemory;
|
||||
|
||||
|
||||
|
||||
class IntTools_CArray1OfReal
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT IntTools_CArray1OfReal(const Standard_Integer Length = 0);
|
||||
|
||||
Standard_EXPORT IntTools_CArray1OfReal(const Standard_Real& Item, const Standard_Integer Length);
|
||||
|
||||
Standard_EXPORT void Init (const Standard_Real& V);
|
||||
|
||||
Standard_EXPORT void Resize (const Standard_Integer theNewLength);
|
||||
|
||||
Standard_EXPORT void Destroy();
|
||||
~IntTools_CArray1OfReal()
|
||||
{
|
||||
Destroy();
|
||||
}
|
||||
|
||||
Standard_Integer Length() const;
|
||||
|
||||
Standard_EXPORT void Append (const Standard_Real& Value);
|
||||
|
||||
Standard_EXPORT void SetValue (const Standard_Integer Index, const Standard_Real& Value);
|
||||
|
||||
Standard_EXPORT const Standard_Real& Value (const Standard_Integer Index) const;
|
||||
const Standard_Real& operator () (const Standard_Integer Index) const
|
||||
{
|
||||
return Value(Index);
|
||||
}
|
||||
|
||||
Standard_EXPORT Standard_Real& ChangeValue (const Standard_Integer Index);
|
||||
Standard_Real& operator () (const Standard_Integer Index)
|
||||
{
|
||||
return ChangeValue(Index);
|
||||
}
|
||||
|
||||
Standard_EXPORT Standard_Boolean IsEqual (const IntTools_CArray1OfReal& Other) const;
|
||||
Standard_Boolean operator == (const IntTools_CArray1OfReal& Other) const
|
||||
{
|
||||
return IsEqual(Other);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Standard_EXPORT IntTools_CArray1OfReal(const IntTools_CArray1OfReal& AnArray);
|
||||
|
||||
|
||||
Standard_Address myStart;
|
||||
Standard_Integer myLength;
|
||||
Standard_Boolean myIsAllocated;
|
||||
|
||||
|
||||
};
|
||||
|
||||
#define Array1Item Standard_Real
|
||||
#define Array1Item_hxx <Standard_Real.hxx>
|
||||
#define IntTools_CArray1 IntTools_CArray1OfReal
|
||||
#define IntTools_CArray1_hxx <IntTools_CArray1OfReal.hxx>
|
||||
|
||||
#include <IntTools_CArray1.lxx>
|
||||
|
||||
#undef Array1Item
|
||||
#undef Array1Item_hxx
|
||||
#undef IntTools_CArray1
|
||||
#undef IntTools_CArray1_hxx
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IntTools_CArray1OfReal_HeaderFile
|
28
src/IntTools/IntTools_CArray1OfReal_0.cxx
Normal file
28
src/IntTools/IntTools_CArray1OfReal_0.cxx
Normal file
@@ -0,0 +1,28 @@
|
||||
// Created on: 2000-05-18
|
||||
// Created by: Peter KURNEV
|
||||
// Copyright (c) 2000-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.
|
||||
|
||||
#include <IntTools_CArray1OfReal.hxx>
|
||||
|
||||
#include <Standard_ConstructionError.hxx>
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
#include <Standard_OutOfMemory.hxx>
|
||||
|
||||
|
||||
#define Array1Item Standard_Real
|
||||
#define Array1Item_hxx <Standard_Real.hxx>
|
||||
#define IntTools_CArray1 IntTools_CArray1OfReal
|
||||
#define IntTools_CArray1_hxx <IntTools_CArray1OfReal.hxx>
|
||||
#include <IntTools_CArray1.gxx>
|
||||
|
@@ -1,196 +0,0 @@
|
||||
-- Created on: 2000-10-27
|
||||
-- Created by: Peter KURNEV
|
||||
-- Copyright (c) 2000-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.
|
||||
|
||||
class CommonPrt from IntTools
|
||||
|
||||
---Purpose: The class is to describe a common part
|
||||
-- between two edges in 3-d space.
|
||||
|
||||
uses
|
||||
Edge from TopoDS,
|
||||
ShapeEnum from TopAbs,
|
||||
Range from IntTools,
|
||||
SequenceOfRanges from IntTools,
|
||||
Pnt from gp
|
||||
is
|
||||
Create
|
||||
returns CommonPrt from IntTools;
|
||||
---Purpose:
|
||||
--- Empty constructor
|
||||
---
|
||||
|
||||
Create (aCPrt:CommonPrt from IntTools)
|
||||
returns CommonPrt from IntTools;
|
||||
---Purpose:
|
||||
--- Copy constructor
|
||||
---
|
||||
|
||||
Assign (me:out; Other : CommonPrt from IntTools)
|
||||
returns CommonPrt from IntTools;
|
||||
---C++: alias operator =
|
||||
---C++: return &
|
||||
|
||||
SetEdge1 (me:out; anE:Edge from TopoDS);
|
||||
---Purpose:
|
||||
--- Sets the first edge.
|
||||
---
|
||||
|
||||
SetEdge2 (me:out; anE:Edge from TopoDS);
|
||||
---Purpose:
|
||||
--- Sets the second edge.
|
||||
---
|
||||
|
||||
SetType (me:out; aType:ShapeEnum from TopAbs);
|
||||
---Purpose:
|
||||
--- Sets the type of the common part
|
||||
--- Vertex or Edge
|
||||
---
|
||||
|
||||
SetRange1 (me:out; aR: Range from IntTools);
|
||||
---Purpose:
|
||||
--- Sets the range of first edge.
|
||||
---
|
||||
|
||||
SetRange1 (me:out; tf,tl: Real from Standard);
|
||||
---Purpose:
|
||||
--- Sets the range of first edge.
|
||||
---
|
||||
|
||||
AppendRange2 (me:out; aR: Range from IntTools);
|
||||
---Purpose:
|
||||
--- Appends the range of second edge.
|
||||
---
|
||||
|
||||
AppendRange2 (me:out; tf,tl: Real from Standard);
|
||||
---Purpose:
|
||||
--- Appends the range of second edge.
|
||||
---
|
||||
|
||||
SetVertexParameter1( me:out; tV: Real from Standard);
|
||||
---Purpose:
|
||||
--- Sets a parameter of first vertex
|
||||
---
|
||||
|
||||
SetVertexParameter2( me:out; tV: Real from Standard);
|
||||
---Purpose:
|
||||
--- Sets a parameter of second vertex
|
||||
---
|
||||
|
||||
Edge1 (me)
|
||||
returns Edge from TopoDS;
|
||||
---C++: return const&
|
||||
---Purpose:
|
||||
--- Returns the first edge.
|
||||
---
|
||||
|
||||
Edge2 (me)
|
||||
returns Edge from TopoDS;
|
||||
---C++: return const&
|
||||
---Purpose:
|
||||
--- Returns the second edge
|
||||
---
|
||||
|
||||
Type (me)
|
||||
returns ShapeEnum from TopAbs;
|
||||
---Purpose:
|
||||
--- Returns the type of the common part
|
||||
---
|
||||
|
||||
Range1 (me)
|
||||
returns Range from IntTools;
|
||||
---C++: return const&
|
||||
---Purpose:
|
||||
--- Returns the range of first edge
|
||||
---
|
||||
|
||||
Range1 (me; tf,tl:out Real from Standard);
|
||||
---Purpose:
|
||||
--- Returns the range of first edge.
|
||||
---
|
||||
|
||||
Ranges2 (me)
|
||||
returns SequenceOfRanges from IntTools;
|
||||
---C++: return const&
|
||||
---Purpose:
|
||||
--- Returns the ranges of second edge.
|
||||
---
|
||||
|
||||
ChangeRanges2 (me:out)
|
||||
returns SequenceOfRanges from IntTools;
|
||||
---C++: return &
|
||||
---Purpose:
|
||||
--- Returns the ranges of second edge.
|
||||
---
|
||||
|
||||
VertexParameter1(me)
|
||||
returns Real from Standard;
|
||||
---Purpose:
|
||||
--- Returns parameter of first vertex
|
||||
---
|
||||
|
||||
VertexParameter2(me)
|
||||
returns Real from Standard;
|
||||
---Purpose:
|
||||
--- Returns parameter of second vertex
|
||||
---
|
||||
|
||||
Copy (me; anOther:out CommonPrt from IntTools);
|
||||
---Purpose:
|
||||
--- Copies me to anOther
|
||||
---
|
||||
|
||||
AllNullFlag(me)
|
||||
returns Boolean from Standard;
|
||||
---Purpose:
|
||||
--- Modifier
|
||||
---
|
||||
|
||||
SetAllNullFlag(me:out;
|
||||
aFlag:Boolean from Standard);
|
||||
---Purpose:
|
||||
--- Selector
|
||||
---
|
||||
|
||||
--
|
||||
SetBoundingPoints(me:out;
|
||||
aP1: Pnt from gp;
|
||||
aP2: Pnt from gp);
|
||||
---Purpose:
|
||||
--- Modifier
|
||||
---
|
||||
|
||||
BoundingPoints(me;
|
||||
aP1:out Pnt from gp;
|
||||
aP2:out Pnt from gp);
|
||||
---Purpose:
|
||||
--- Selector
|
||||
---
|
||||
--
|
||||
fields
|
||||
myEdge1 : Edge from TopoDS;
|
||||
myEdge2 : Edge from TopoDS;
|
||||
myType : ShapeEnum from TopAbs;
|
||||
myRange1 : Range from IntTools;
|
||||
myVertPar1 : Real from Standard;
|
||||
myVertPar2 : Real from Standard;
|
||||
myRanges2: SequenceOfRanges from IntTools;
|
||||
|
||||
myAllNullFlag: Boolean from Standard;
|
||||
--
|
||||
myPnt1 : Pnt from gp;
|
||||
myPnt2 : Pnt from gp;
|
||||
--
|
||||
|
||||
end CommonPrt;
|
@@ -13,9 +13,12 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IntTools_CommonPrt.ixx>
|
||||
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <IntTools_CommonPrt.hxx>
|
||||
#include <IntTools_Range.hxx>
|
||||
#include <IntTools_SequenceOfRanges.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : IntTools_CommonPrt::IntTools_CommonPr
|
||||
|
184
src/IntTools/IntTools_CommonPrt.hxx
Normal file
184
src/IntTools/IntTools_CommonPrt.hxx
Normal file
@@ -0,0 +1,184 @@
|
||||
// Created on: 2000-10-27
|
||||
// Created by: Peter KURNEV
|
||||
// Copyright (c) 2000-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 _IntTools_CommonPrt_HeaderFile
|
||||
#define _IntTools_CommonPrt_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopAbs_ShapeEnum.hxx>
|
||||
#include <IntTools_Range.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <IntTools_SequenceOfRanges.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
class TopoDS_Edge;
|
||||
class IntTools_Range;
|
||||
class gp_Pnt;
|
||||
|
||||
|
||||
//! The class is to describe a common part
|
||||
//! between two edges in 3-d space.
|
||||
class IntTools_CommonPrt
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
|
||||
//! Empty constructor
|
||||
Standard_EXPORT IntTools_CommonPrt();
|
||||
|
||||
|
||||
//! Copy constructor
|
||||
Standard_EXPORT IntTools_CommonPrt(const IntTools_CommonPrt& aCPrt);
|
||||
|
||||
Standard_EXPORT IntTools_CommonPrt& Assign (const IntTools_CommonPrt& Other);
|
||||
IntTools_CommonPrt& operator = (const IntTools_CommonPrt& Other)
|
||||
{
|
||||
return Assign(Other);
|
||||
}
|
||||
|
||||
|
||||
//! Sets the first edge.
|
||||
Standard_EXPORT void SetEdge1 (const TopoDS_Edge& anE);
|
||||
|
||||
|
||||
//! Sets the second edge.
|
||||
Standard_EXPORT void SetEdge2 (const TopoDS_Edge& anE);
|
||||
|
||||
|
||||
//! Sets the type of the common part
|
||||
//! Vertex or Edge
|
||||
Standard_EXPORT void SetType (const TopAbs_ShapeEnum aType);
|
||||
|
||||
|
||||
//! Sets the range of first edge.
|
||||
Standard_EXPORT void SetRange1 (const IntTools_Range& aR);
|
||||
|
||||
|
||||
//! Sets the range of first edge.
|
||||
Standard_EXPORT void SetRange1 (const Standard_Real tf, const Standard_Real tl);
|
||||
|
||||
|
||||
//! Appends the range of second edge.
|
||||
Standard_EXPORT void AppendRange2 (const IntTools_Range& aR);
|
||||
|
||||
|
||||
//! Appends the range of second edge.
|
||||
Standard_EXPORT void AppendRange2 (const Standard_Real tf, const Standard_Real tl);
|
||||
|
||||
|
||||
//! Sets a parameter of first vertex
|
||||
Standard_EXPORT void SetVertexParameter1 (const Standard_Real tV);
|
||||
|
||||
|
||||
//! Sets a parameter of second vertex
|
||||
Standard_EXPORT void SetVertexParameter2 (const Standard_Real tV);
|
||||
|
||||
|
||||
//! Returns the first edge.
|
||||
Standard_EXPORT const TopoDS_Edge& Edge1() const;
|
||||
|
||||
|
||||
//! Returns the second edge
|
||||
Standard_EXPORT const TopoDS_Edge& Edge2() const;
|
||||
|
||||
|
||||
//! Returns the type of the common part
|
||||
Standard_EXPORT TopAbs_ShapeEnum Type() const;
|
||||
|
||||
|
||||
//! Returns the range of first edge
|
||||
Standard_EXPORT const IntTools_Range& Range1() const;
|
||||
|
||||
|
||||
//! Returns the range of first edge.
|
||||
Standard_EXPORT void Range1 (Standard_Real& tf, Standard_Real& tl) const;
|
||||
|
||||
|
||||
//! Returns the ranges of second edge.
|
||||
Standard_EXPORT const IntTools_SequenceOfRanges& Ranges2() const;
|
||||
|
||||
|
||||
//! Returns the ranges of second edge.
|
||||
Standard_EXPORT IntTools_SequenceOfRanges& ChangeRanges2();
|
||||
|
||||
|
||||
//! Returns parameter of first vertex
|
||||
Standard_EXPORT Standard_Real VertexParameter1() const;
|
||||
|
||||
|
||||
//! Returns parameter of second vertex
|
||||
Standard_EXPORT Standard_Real VertexParameter2() const;
|
||||
|
||||
|
||||
//! Copies me to anOther
|
||||
Standard_EXPORT void Copy (IntTools_CommonPrt& anOther) const;
|
||||
|
||||
|
||||
//! Modifier
|
||||
Standard_EXPORT Standard_Boolean AllNullFlag() const;
|
||||
|
||||
|
||||
//! Selector
|
||||
Standard_EXPORT void SetAllNullFlag (const Standard_Boolean aFlag);
|
||||
|
||||
|
||||
//! Modifier
|
||||
Standard_EXPORT void SetBoundingPoints (const gp_Pnt& aP1, const gp_Pnt& aP2);
|
||||
|
||||
|
||||
//! Selector
|
||||
Standard_EXPORT void BoundingPoints (gp_Pnt& aP1, gp_Pnt& aP2) const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
TopoDS_Edge myEdge1;
|
||||
TopoDS_Edge myEdge2;
|
||||
TopAbs_ShapeEnum myType;
|
||||
IntTools_Range myRange1;
|
||||
Standard_Real myVertPar1;
|
||||
Standard_Real myVertPar2;
|
||||
IntTools_SequenceOfRanges myRanges2;
|
||||
Standard_Boolean myAllNullFlag;
|
||||
gp_Pnt myPnt1;
|
||||
gp_Pnt myPnt2;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IntTools_CommonPrt_HeaderFile
|
@@ -1,341 +0,0 @@
|
||||
-- Created by: Peter KURNEV
|
||||
-- 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.
|
||||
|
||||
|
||||
class Context from IntTools
|
||||
inherits TShared from MMgt
|
||||
|
||||
|
||||
---Purpose:
|
||||
-- The intersection Context contains geometrical
|
||||
-- and topological toolkit (classifiers, projectors, etc).
|
||||
-- The intersection Context is for caching the tools
|
||||
-- to increase the performance.
|
||||
|
||||
|
||||
uses
|
||||
|
||||
Box from Bnd,
|
||||
Pnt2d from gp,
|
||||
Pnt from gp,
|
||||
State from TopAbs,
|
||||
Curve from Geom,
|
||||
ProjectPointOnCurve from GeomAPI,
|
||||
ProjectPointOnSurf from GeomAPI,
|
||||
Shape from TopoDS,
|
||||
Vertex from TopoDS,
|
||||
Face from TopoDS,
|
||||
Edge from TopoDS,
|
||||
Solid from TopoDS,
|
||||
SolidClassifier from BRepClass3d,
|
||||
FClass2d from IntTools,
|
||||
Curve from IntTools,
|
||||
BaseAllocator from BOPCol,
|
||||
DataMapOfShapeAddress from BOPCol,
|
||||
DataMapOfTransientAddress from BOPCol,
|
||||
Hatcher from Geom2dHatch,
|
||||
SurfaceRangeLocalizeData from IntTools
|
||||
|
||||
--raises
|
||||
|
||||
is
|
||||
Create
|
||||
|
||||
returns Context from IntTools;
|
||||
---C++: alias "Standard_EXPORT virtual ~IntTools_Context();"
|
||||
Create (theAllocator: BaseAllocator from BOPCol)
|
||||
|
||||
returns Context from IntTools;
|
||||
|
||||
FClass2d(me:mutable;
|
||||
aF: Face from TopoDS)
|
||||
returns FClass2d from IntTools;
|
||||
---C++: return &
|
||||
---Purpose:
|
||||
--- Returns a reference to point classifier
|
||||
--- for given face
|
||||
---
|
||||
|
||||
ProjPS (me:mutable;
|
||||
aF: Face from TopoDS)
|
||||
returns ProjectPointOnSurf from GeomAPI;
|
||||
---C++: return &
|
||||
---Purpose:
|
||||
--- Returns a reference to point projector
|
||||
--- for given face
|
||||
---
|
||||
|
||||
ProjPC (me:mutable;
|
||||
aE: Edge from TopoDS)
|
||||
returns ProjectPointOnCurve from GeomAPI;
|
||||
---C++: return &
|
||||
---Purpose:
|
||||
--- Returns a reference to point projector
|
||||
--- for given edge
|
||||
---
|
||||
|
||||
ProjPT (me:mutable;
|
||||
aC: Curve from Geom)
|
||||
returns ProjectPointOnCurve from GeomAPI;
|
||||
---C++: return &
|
||||
---Purpose:
|
||||
--- Returns a reference to point projector
|
||||
--- for given curve
|
||||
---
|
||||
|
||||
SurfaceData(me: mutable;
|
||||
aF: Face from TopoDS)
|
||||
returns SurfaceRangeLocalizeData from IntTools;
|
||||
---C++: return &
|
||||
---Purpose:
|
||||
--- Returns a reference to surface localization data
|
||||
--- for given face
|
||||
|
||||
SolidClassifier(me:mutable;
|
||||
aSolid: Solid from TopoDS)
|
||||
returns SolidClassifier from BRepClass3d;
|
||||
---C++: return &
|
||||
---Purpose:
|
||||
--- Returns a reference to solid classifier
|
||||
--- for given solid
|
||||
---
|
||||
|
||||
Hatcher(me: mutable;
|
||||
aF: Face from TopoDS)
|
||||
returns Hatcher from Geom2dHatch;
|
||||
---C++: return &
|
||||
---Purpose:
|
||||
--- Returns a reference to 2D hatcher
|
||||
--- for given face
|
||||
---
|
||||
|
||||
ComputePE (me:mutable;
|
||||
theP : Pnt from gp;
|
||||
theTolP: Real from Standard;
|
||||
theE : Edge from TopoDS;
|
||||
theT :out Real from Standard)
|
||||
returns Integer from Standard;
|
||||
---Purpose:
|
||||
--- Computes parameter of the Point theP on
|
||||
--- the edge aE.
|
||||
--- Returns zero if the distance between point
|
||||
--- and edge is less than sum of tolerance value of edge and theTopP,
|
||||
--- otherwise and for following conditions returns
|
||||
--- negative value
|
||||
--- 1. the edge is degenerated (-1)
|
||||
--- 2. the edge does not contain 3d curve and pcurves (-2)
|
||||
--- 3. projection algorithm failed (-3)
|
||||
---
|
||||
|
||||
ComputeVE (me:mutable;
|
||||
aV : Vertex from TopoDS;
|
||||
aE : Edge from TopoDS;
|
||||
aT :out Real from Standard)
|
||||
returns Integer from Standard;
|
||||
---Purpose:
|
||||
--- Computes parameter of the vertex aV on
|
||||
--- the edge aE.
|
||||
--- Returns zero if the distance between vertex
|
||||
--- and edge is less than sum of tolerances,
|
||||
--- otherwise and for following conditions returns
|
||||
--- negative value
|
||||
--- 1. the edge is degenerated (-1)
|
||||
--- 2. the edge does not contain 3d curve and pcurves (-2)
|
||||
--- 3. projection algorithm failed (-3)
|
||||
---
|
||||
|
||||
ComputeVF (me:mutable;
|
||||
aV : Vertex from TopoDS;
|
||||
aF : Face from TopoDS;
|
||||
U : out Real from Standard;
|
||||
V : out Real from Standard)
|
||||
returns Integer from Standard;
|
||||
---Purpose:
|
||||
--- Computes UV parameters of the vertex aV on face aF
|
||||
--- Returns zero if the distance between vertex and face is
|
||||
--- less than or equal the sum of tolerances and the projection
|
||||
--- point lays inside boundaries of the face.
|
||||
--- For following conditions returns negative value
|
||||
--- 1. projection algorithm failed (-1)
|
||||
--- 2. distance is more than sum of tolerances (-2)
|
||||
--- 3. projection point out or on the boundaries of face (-3)
|
||||
---
|
||||
|
||||
StatePointFace(me:mutable;
|
||||
aF : Face from TopoDS;
|
||||
aP2D : Pnt2d from gp)
|
||||
returns State from TopAbs;
|
||||
---Purpose:
|
||||
--- Returns the state of the point aP2D
|
||||
--- relative to face aF
|
||||
---
|
||||
|
||||
IsPointInFace(me:mutable;
|
||||
aF : Face from TopoDS;
|
||||
aP2D : Pnt2d from gp)
|
||||
returns Boolean from Standard;
|
||||
---Purpose:
|
||||
--- Returns true if the point aP2D is
|
||||
--- inside the boundaries of the face aF,
|
||||
--- otherwise returns false
|
||||
---
|
||||
|
||||
IsPointInFace(me:mutable;
|
||||
aP3D : Pnt from gp;
|
||||
aF : Face from TopoDS;
|
||||
aTol : Real from Standard)
|
||||
returns Boolean from Standard;
|
||||
---Purpose:
|
||||
--- Returns true if the point aP2D is
|
||||
--- inside the boundaries of the face aF,
|
||||
--- otherwise returns false
|
||||
---
|
||||
|
||||
IsPointInOnFace(me:mutable;
|
||||
aF : Face from TopoDS;
|
||||
aP2D : Pnt2d from gp)
|
||||
returns Boolean from Standard;
|
||||
---Purpose:
|
||||
--- Returns true if the point aP2D is
|
||||
--- inside or on the boundaries of aF
|
||||
---
|
||||
|
||||
IsValidPointForFace(me:mutable;
|
||||
aP3D : Pnt from gp;
|
||||
aF : Face from TopoDS;
|
||||
aTol : Real from Standard)
|
||||
returns Boolean from Standard;
|
||||
---Purpose:
|
||||
--- Returns true if the distance between point aP3D
|
||||
--- and face aF is less or equal to tolerance aTol
|
||||
--- and projection point is inside or on the boundaries
|
||||
--- of the face aF
|
||||
---
|
||||
|
||||
IsValidPointForFaces(me:mutable;
|
||||
aP3D : Pnt from gp;
|
||||
aF1 : Face from TopoDS;
|
||||
aF2 : Face from TopoDS;
|
||||
aTol : Real from Standard)
|
||||
returns Boolean from Standard;
|
||||
---Purpose:
|
||||
--- Returns true if IsValidPointForFace returns true
|
||||
--- for both face aF1 and aF2
|
||||
---
|
||||
|
||||
IsValidBlockForFace (me:mutable;
|
||||
aT1 : Real from Standard;
|
||||
aT2 : Real from Standard;
|
||||
aIC : Curve from IntTools;
|
||||
aF : Face from TopoDS;
|
||||
aTol : Real from Standard)
|
||||
returns Boolean from Standard;
|
||||
---Purpose:
|
||||
--- Returns true if IsValidPointForFace returns true
|
||||
--- for some 3d point that lay on the curve aIC bounded by
|
||||
--- parameters aT1 and aT2
|
||||
---
|
||||
|
||||
IsValidBlockForFaces (me:mutable;
|
||||
aT1 : Real from Standard;
|
||||
aT2 : Real from Standard;
|
||||
aIC : Curve from IntTools;
|
||||
aF1 : Face from TopoDS;
|
||||
aF2 : Face from TopoDS;
|
||||
aTol : Real from Standard)
|
||||
returns Boolean from Standard;
|
||||
---Purpose:
|
||||
--- Returns true if IsValidBlockForFace returns true
|
||||
--- for both faces aF1 and aF2
|
||||
---
|
||||
|
||||
IsVertexOnLine(me:mutable;
|
||||
aV : Vertex from TopoDS;
|
||||
aIC : Curve from IntTools;
|
||||
aTolC: Real from Standard;
|
||||
aT :out Real from Standard)
|
||||
returns Boolean from Standard;
|
||||
---Purpose:
|
||||
--- Computes parameter of the vertex aV on
|
||||
--- the curve aIC.
|
||||
--- Returns true if the distance between vertex and
|
||||
--- curve is less than sum of tolerance of aV and aTolC,
|
||||
--- otherwise or if projection algorithm failed
|
||||
--- returns false (in this case aT isn't significant)
|
||||
---
|
||||
|
||||
IsVertexOnLine(me:mutable;
|
||||
aV : Vertex from TopoDS;
|
||||
aTolV: Real from Standard;
|
||||
aIC : Curve from IntTools;
|
||||
aTolC: Real from Standard;
|
||||
aT :out Real from Standard)
|
||||
returns Boolean from Standard;
|
||||
---Purpose:
|
||||
--- Computes parameter of the vertex aV on
|
||||
--- the curve aIC.
|
||||
--- Returns true if the distance between vertex and
|
||||
--- curve is less than sum of tolerance of aV and aTolC,
|
||||
--- otherwise or if projection algorithm failed
|
||||
--- returns false (in this case aT isn't significant)
|
||||
---
|
||||
|
||||
ProjectPointOnEdge (me:mutable;
|
||||
aP : Pnt from gp;
|
||||
aE : Edge from TopoDS;
|
||||
aT :out Real from Standard)
|
||||
returns Boolean from Standard;
|
||||
---Purpose:
|
||||
--- Computes parameter of the point aP on
|
||||
--- the edge aE.
|
||||
--- Returns false if projection algorithm failed
|
||||
--- other wiese returns true.
|
||||
---
|
||||
BndBox(me:mutable;
|
||||
theS:Shape from TopoDS)
|
||||
returns Box from Bnd;
|
||||
---C++: return &
|
||||
--- Returns a reference to boundong box
|
||||
--- for given shape <theS>
|
||||
---
|
||||
IsInfiniteFace(me:mutable;
|
||||
theFace:Face from TopoDS)
|
||||
returns Boolean from Standard;
|
||||
---Purpose: Returns true if the solid <theFace> has
|
||||
-- infinite bounds
|
||||
|
||||
SetPOnSProjectionTolerance(me:mutable; theValue: Real from Standard);
|
||||
---Purpose: Sets tolerance to be used for projection of point on surface.
|
||||
-- Clears map of already cached projectors in order to maintain
|
||||
-- correct value for all projectors
|
||||
|
||||
clearCachedPOnSProjectors(me: mutable)
|
||||
is private;
|
||||
---Purpose: Clears map of already cached projectors.
|
||||
|
||||
fields
|
||||
myAllocator : BaseAllocator from BOPCol is protected;
|
||||
myFClass2dMap:DataMapOfShapeAddress from BOPCol is protected;
|
||||
myProjPSMap :DataMapOfShapeAddress from BOPCol is protected;
|
||||
myProjPCMap :DataMapOfShapeAddress from BOPCol is protected;
|
||||
mySClassMap :DataMapOfShapeAddress from BOPCol is protected;
|
||||
myProjPTMap :DataMapOfTransientAddress from BOPCol is protected;
|
||||
myHatcherMap :DataMapOfShapeAddress from BOPCol is protected;
|
||||
myProjSDataMap:DataMapOfShapeAddress from BOPCol is protected;
|
||||
myBndBoxDataMap:DataMapOfShapeAddress from BOPCol is protected;
|
||||
myCreateFlag :Integer from Standard is protected;
|
||||
myPOnSTolerance :Real from Standard is protected;
|
||||
|
||||
end Context;
|
||||
|
@@ -12,37 +12,42 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IntTools_Context.ixx>
|
||||
|
||||
#include <Precision.hxx>
|
||||
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <Geom_BoundedCurve.hxx>
|
||||
#include <GeomAPI_ProjectPointOnCurve.hxx>
|
||||
#include <GeomAPI_ProjectPointOnSurf.hxx>
|
||||
#include <GeomAdaptor_Curve.hxx>
|
||||
|
||||
#include <Geom2dHatch_Intersector.hxx>
|
||||
#include <Geom2d_TrimmedCurve.hxx>
|
||||
|
||||
#include <TopAbs_State.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
|
||||
#include <Bnd_Box.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <BRepAdaptor_Surface.hxx>
|
||||
#include <BRepBndLib.hxx>
|
||||
|
||||
#include <IntTools_Tools.hxx>
|
||||
#include <IntTools_FClass2d.hxx>
|
||||
//
|
||||
#include <BRepClass3d_SolidClassifier.hxx>
|
||||
#include <Extrema_LocateExtPC.hxx>
|
||||
|
||||
#include <Geom2d_Curve.hxx>
|
||||
#include <NCollection_IncAllocator.hxx>
|
||||
#include <Geom2d_TrimmedCurve.hxx>
|
||||
#include <Geom2dHatch_Hatcher.hxx>
|
||||
#include <Geom2dHatch_Intersector.hxx>
|
||||
#include <Geom_BoundedCurve.hxx>
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <GeomAdaptor_Curve.hxx>
|
||||
#include <GeomAPI_ProjectPointOnCurve.hxx>
|
||||
#include <GeomAPI_ProjectPointOnSurf.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <IntTools_Context.hxx>
|
||||
#include <IntTools_Curve.hxx>
|
||||
#include <IntTools_FClass2d.hxx>
|
||||
#include <IntTools_SurfaceRangeLocalizeData.hxx>
|
||||
#include <IntTools_Tools.hxx>
|
||||
#include <NCollection_IncAllocator.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TopAbs_State.hxx>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS_Face.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TopoDS_Solid.hxx>
|
||||
#include <TopoDS_Vertex.hxx>
|
||||
|
||||
|
||||
//
|
||||
//=======================================================================
|
||||
//function :
|
||||
//purpose :
|
||||
|
254
src/IntTools/IntTools_Context.hxx
Normal file
254
src/IntTools/IntTools_Context.hxx
Normal file
@@ -0,0 +1,254 @@
|
||||
// Created by: Peter KURNEV
|
||||
// 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 _IntTools_Context_HeaderFile
|
||||
#define _IntTools_Context_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <BOPCol_BaseAllocator.hxx>
|
||||
#include <BOPCol_DataMapOfShapeAddress.hxx>
|
||||
#include <BOPCol_DataMapOfTransientAddress.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <MMgt_TShared.hxx>
|
||||
#include <TopAbs_State.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class IntTools_FClass2d;
|
||||
class TopoDS_Face;
|
||||
class GeomAPI_ProjectPointOnSurf;
|
||||
class GeomAPI_ProjectPointOnCurve;
|
||||
class TopoDS_Edge;
|
||||
class Geom_Curve;
|
||||
class IntTools_SurfaceRangeLocalizeData;
|
||||
class BRepClass3d_SolidClassifier;
|
||||
class TopoDS_Solid;
|
||||
class Geom2dHatch_Hatcher;
|
||||
class gp_Pnt;
|
||||
class TopoDS_Vertex;
|
||||
class gp_Pnt2d;
|
||||
class IntTools_Curve;
|
||||
class Bnd_Box;
|
||||
class TopoDS_Shape;
|
||||
|
||||
|
||||
class IntTools_Context;
|
||||
DEFINE_STANDARD_HANDLE(IntTools_Context, MMgt_TShared)
|
||||
|
||||
|
||||
//! The intersection Context contains geometrical
|
||||
//! and topological toolkit (classifiers, projectors, etc).
|
||||
//! The intersection Context is for caching the tools
|
||||
//! to increase the performance.
|
||||
class IntTools_Context : public MMgt_TShared
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT IntTools_Context();
|
||||
Standard_EXPORT virtual ~IntTools_Context();
|
||||
|
||||
Standard_EXPORT IntTools_Context(const BOPCol_BaseAllocator& theAllocator);
|
||||
|
||||
|
||||
//! Returns a reference to point classifier
|
||||
//! for given face
|
||||
Standard_EXPORT IntTools_FClass2d& FClass2d (const TopoDS_Face& aF);
|
||||
|
||||
|
||||
//! Returns a reference to point projector
|
||||
//! for given face
|
||||
Standard_EXPORT GeomAPI_ProjectPointOnSurf& ProjPS (const TopoDS_Face& aF);
|
||||
|
||||
|
||||
//! Returns a reference to point projector
|
||||
//! for given edge
|
||||
Standard_EXPORT GeomAPI_ProjectPointOnCurve& ProjPC (const TopoDS_Edge& aE);
|
||||
|
||||
|
||||
//! Returns a reference to point projector
|
||||
//! for given curve
|
||||
Standard_EXPORT GeomAPI_ProjectPointOnCurve& ProjPT (const Handle(Geom_Curve)& aC);
|
||||
|
||||
|
||||
//! Returns a reference to surface localization data
|
||||
//! for given face
|
||||
Standard_EXPORT IntTools_SurfaceRangeLocalizeData& SurfaceData (const TopoDS_Face& aF);
|
||||
|
||||
|
||||
//! Returns a reference to solid classifier
|
||||
//! for given solid
|
||||
Standard_EXPORT BRepClass3d_SolidClassifier& SolidClassifier (const TopoDS_Solid& aSolid);
|
||||
|
||||
|
||||
//! Returns a reference to 2D hatcher
|
||||
//! for given face
|
||||
Standard_EXPORT Geom2dHatch_Hatcher& Hatcher (const TopoDS_Face& aF);
|
||||
|
||||
|
||||
//! Computes parameter of the Point theP on
|
||||
//! the edge aE.
|
||||
//! Returns zero if the distance between point
|
||||
//! and edge is less than sum of tolerance value of edge and theTopP,
|
||||
//! otherwise and for following conditions returns
|
||||
//! negative value
|
||||
//! 1. the edge is degenerated (-1)
|
||||
//! 2. the edge does not contain 3d curve and pcurves (-2)
|
||||
//! 3. projection algorithm failed (-3)
|
||||
Standard_EXPORT Standard_Integer ComputePE (const gp_Pnt& theP, const Standard_Real theTolP, const TopoDS_Edge& theE, Standard_Real& theT);
|
||||
|
||||
|
||||
//! Computes parameter of the vertex aV on
|
||||
//! the edge aE.
|
||||
//! Returns zero if the distance between vertex
|
||||
//! and edge is less than sum of tolerances,
|
||||
//! otherwise and for following conditions returns
|
||||
//! negative value
|
||||
//! 1. the edge is degenerated (-1)
|
||||
//! 2. the edge does not contain 3d curve and pcurves (-2)
|
||||
//! 3. projection algorithm failed (-3)
|
||||
Standard_EXPORT Standard_Integer ComputeVE (const TopoDS_Vertex& aV, const TopoDS_Edge& aE, Standard_Real& aT);
|
||||
|
||||
|
||||
//! Computes UV parameters of the vertex aV on face aF
|
||||
//! Returns zero if the distance between vertex and face is
|
||||
//! less than or equal the sum of tolerances and the projection
|
||||
//! point lays inside boundaries of the face.
|
||||
//! For following conditions returns negative value
|
||||
//! 1. projection algorithm failed (-1)
|
||||
//! 2. distance is more than sum of tolerances (-2)
|
||||
//! 3. projection point out or on the boundaries of face (-3)
|
||||
Standard_EXPORT Standard_Integer ComputeVF (const TopoDS_Vertex& aV, const TopoDS_Face& aF, Standard_Real& U, Standard_Real& V);
|
||||
|
||||
|
||||
//! Returns the state of the point aP2D
|
||||
//! relative to face aF
|
||||
Standard_EXPORT TopAbs_State StatePointFace (const TopoDS_Face& aF, const gp_Pnt2d& aP2D);
|
||||
|
||||
|
||||
//! Returns true if the point aP2D is
|
||||
//! inside the boundaries of the face aF,
|
||||
//! otherwise returns false
|
||||
Standard_EXPORT Standard_Boolean IsPointInFace (const TopoDS_Face& aF, const gp_Pnt2d& aP2D);
|
||||
|
||||
|
||||
//! Returns true if the point aP2D is
|
||||
//! inside the boundaries of the face aF,
|
||||
//! otherwise returns false
|
||||
Standard_EXPORT Standard_Boolean IsPointInFace (const gp_Pnt& aP3D, const TopoDS_Face& aF, const Standard_Real aTol);
|
||||
|
||||
|
||||
//! Returns true if the point aP2D is
|
||||
//! inside or on the boundaries of aF
|
||||
Standard_EXPORT Standard_Boolean IsPointInOnFace (const TopoDS_Face& aF, const gp_Pnt2d& aP2D);
|
||||
|
||||
|
||||
//! Returns true if the distance between point aP3D
|
||||
//! and face aF is less or equal to tolerance aTol
|
||||
//! and projection point is inside or on the boundaries
|
||||
//! of the face aF
|
||||
Standard_EXPORT Standard_Boolean IsValidPointForFace (const gp_Pnt& aP3D, const TopoDS_Face& aF, const Standard_Real aTol);
|
||||
|
||||
|
||||
//! Returns true if IsValidPointForFace returns true
|
||||
//! for both face aF1 and aF2
|
||||
Standard_EXPORT Standard_Boolean IsValidPointForFaces (const gp_Pnt& aP3D, const TopoDS_Face& aF1, const TopoDS_Face& aF2, const Standard_Real aTol);
|
||||
|
||||
|
||||
//! Returns true if IsValidPointForFace returns true
|
||||
//! for some 3d point that lay on the curve aIC bounded by
|
||||
//! parameters aT1 and aT2
|
||||
Standard_EXPORT Standard_Boolean IsValidBlockForFace (const Standard_Real aT1, const Standard_Real aT2, const IntTools_Curve& aIC, const TopoDS_Face& aF, const Standard_Real aTol);
|
||||
|
||||
|
||||
//! Returns true if IsValidBlockForFace returns true
|
||||
//! for both faces aF1 and aF2
|
||||
Standard_EXPORT Standard_Boolean IsValidBlockForFaces (const Standard_Real aT1, const Standard_Real aT2, const IntTools_Curve& aIC, const TopoDS_Face& aF1, const TopoDS_Face& aF2, const Standard_Real aTol);
|
||||
|
||||
|
||||
//! Computes parameter of the vertex aV on
|
||||
//! the curve aIC.
|
||||
//! Returns true if the distance between vertex and
|
||||
//! curve is less than sum of tolerance of aV and aTolC,
|
||||
//! otherwise or if projection algorithm failed
|
||||
//! returns false (in this case aT isn't significant)
|
||||
Standard_EXPORT Standard_Boolean IsVertexOnLine (const TopoDS_Vertex& aV, const IntTools_Curve& aIC, const Standard_Real aTolC, Standard_Real& aT);
|
||||
|
||||
|
||||
//! Computes parameter of the vertex aV on
|
||||
//! the curve aIC.
|
||||
//! Returns true if the distance between vertex and
|
||||
//! curve is less than sum of tolerance of aV and aTolC,
|
||||
//! otherwise or if projection algorithm failed
|
||||
//! returns false (in this case aT isn't significant)
|
||||
Standard_EXPORT Standard_Boolean IsVertexOnLine (const TopoDS_Vertex& aV, const Standard_Real aTolV, const IntTools_Curve& aIC, const Standard_Real aTolC, Standard_Real& aT);
|
||||
|
||||
|
||||
//! Computes parameter of the point aP on
|
||||
//! the edge aE.
|
||||
//! Returns false if projection algorithm failed
|
||||
//! other wiese returns true.
|
||||
Standard_EXPORT Standard_Boolean ProjectPointOnEdge (const gp_Pnt& aP, const TopoDS_Edge& aE, Standard_Real& aT);
|
||||
|
||||
Standard_EXPORT Bnd_Box& BndBox (const TopoDS_Shape& theS);
|
||||
|
||||
//! Returns true if the solid <theFace> has
|
||||
//! infinite bounds
|
||||
Standard_EXPORT Standard_Boolean IsInfiniteFace (const TopoDS_Face& theFace);
|
||||
|
||||
//! Sets tolerance to be used for projection of point on surface.
|
||||
//! Clears map of already cached projectors in order to maintain
|
||||
//! correct value for all projectors
|
||||
Standard_EXPORT void SetPOnSProjectionTolerance (const Standard_Real theValue);
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(IntTools_Context,MMgt_TShared)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
BOPCol_BaseAllocator myAllocator;
|
||||
BOPCol_DataMapOfShapeAddress myFClass2dMap;
|
||||
BOPCol_DataMapOfShapeAddress myProjPSMap;
|
||||
BOPCol_DataMapOfShapeAddress myProjPCMap;
|
||||
BOPCol_DataMapOfShapeAddress mySClassMap;
|
||||
BOPCol_DataMapOfTransientAddress myProjPTMap;
|
||||
BOPCol_DataMapOfShapeAddress myHatcherMap;
|
||||
BOPCol_DataMapOfShapeAddress myProjSDataMap;
|
||||
BOPCol_DataMapOfShapeAddress myBndBoxDataMap;
|
||||
Standard_Integer myCreateFlag;
|
||||
Standard_Real myPOnSTolerance;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
//! Clears map of already cached projectors.
|
||||
Standard_EXPORT void clearCachedPOnSProjectors();
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IntTools_Context_HeaderFile
|
@@ -1,137 +0,0 @@
|
||||
-- Created on: 2000-11-23
|
||||
-- Created by: Michael KLOKOV
|
||||
-- Copyright (c) 2000-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.
|
||||
|
||||
class Curve from IntTools
|
||||
---Purpose: class is a container of
|
||||
-- one 3d curve
|
||||
-- two 2d curves
|
||||
|
||||
uses
|
||||
Curve from Geom,
|
||||
Curve from Geom2d,
|
||||
Pnt from gp,
|
||||
CurveType from GeomAbs
|
||||
is
|
||||
Create
|
||||
returns Curve from IntTools;
|
||||
---Purpose:
|
||||
--- Empty constructor
|
||||
---
|
||||
|
||||
Create(Curve3d: Curve from Geom;
|
||||
FirstCurve2d : Curve from Geom2d;
|
||||
SecondCurve2d: Curve from Geom2d)
|
||||
returns Curve from IntTools;
|
||||
---Purpose:
|
||||
--- Initializes me by a 3d curve
|
||||
--- and two 2d curves
|
||||
---
|
||||
|
||||
SetCurves(me: in out;
|
||||
Curve3d: Curve from Geom;
|
||||
FirstCurve2d : Curve from Geom2d;
|
||||
SecondCurve2d : Curve from Geom2d);
|
||||
---Purpose:
|
||||
--- Modifier
|
||||
---
|
||||
|
||||
SetCurve(me: in out;
|
||||
Curve3d: Curve from Geom);
|
||||
---C++: inline
|
||||
---Purpose:
|
||||
--- Modifier
|
||||
---
|
||||
|
||||
SetFirstCurve2d(me: in out;
|
||||
FirstCurve2d: Curve from Geom2d);
|
||||
---C++: inline
|
||||
---Purpose:
|
||||
--- Modifier
|
||||
---
|
||||
|
||||
SetSecondCurve2d(me: in out;
|
||||
SecondCurve2d: Curve from Geom2d);
|
||||
---C++: inline
|
||||
---Purpose:
|
||||
--- Modifier
|
||||
---
|
||||
|
||||
Curve(me)
|
||||
returns any Curve from Geom;
|
||||
---C++: return const &
|
||||
---C++: inline
|
||||
---Purpose:
|
||||
--- Selector
|
||||
---
|
||||
|
||||
FirstCurve2d(me)
|
||||
returns any Curve from Geom2d;
|
||||
---C++: return const &
|
||||
---C++: inline
|
||||
---Purpose:
|
||||
--- Selector
|
||||
---
|
||||
|
||||
SecondCurve2d(me)
|
||||
returns any Curve from Geom2d;
|
||||
---C++: return const &
|
||||
---C++: inline
|
||||
---Purpose:
|
||||
--- Selector
|
||||
---
|
||||
|
||||
HasBounds (me)
|
||||
returns Boolean from Standard;
|
||||
---Purpose:
|
||||
--- Returns true if 3d curve is BoundedCurve from Geom
|
||||
---
|
||||
|
||||
Bounds (me; aT1:out Real from Standard;
|
||||
aT2:out Real from Standard;
|
||||
aP1:out Pnt from gp;
|
||||
aP2:out Pnt from gp);
|
||||
---Purpose:
|
||||
--- Returns boundary parameters
|
||||
--- and corresponded 3d point.
|
||||
---
|
||||
-- Warning:
|
||||
--- If HasBounds returns false
|
||||
--- the returned parameters are equal
|
||||
--- to zero.
|
||||
---
|
||||
|
||||
D0 (me;
|
||||
aT1:out Real from Standard;
|
||||
aP1:out Pnt from gp)
|
||||
returns Boolean from Standard;
|
||||
---Purpose:
|
||||
--- Computes 3d point corresponded to parameter aT1
|
||||
--- Returns true if given parameter aT1
|
||||
--- is inside the boundaries of the curve
|
||||
---
|
||||
|
||||
Type (me)
|
||||
returns CurveType from GeomAbs;
|
||||
---Purpose:
|
||||
--- Returns the type of 3d curve
|
||||
---
|
||||
|
||||
fields
|
||||
|
||||
my3dCurve : Curve from Geom;
|
||||
my2dCurve1: Curve from Geom2d;
|
||||
my2dCurve2: Curve from Geom2d;
|
||||
|
||||
end Curve from IntTools;
|
@@ -11,9 +11,13 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IntTools_Curve.ixx>
|
||||
|
||||
#include <Geom2d_Curve.hxx>
|
||||
#include <Geom_BoundedCurve.hxx>
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <GeomAdaptor_Curve.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <IntTools_Curve.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : IntTools_Curve::IntTools_Curve
|
||||
|
129
src/IntTools/IntTools_Curve.hxx
Normal file
129
src/IntTools/IntTools_Curve.hxx
Normal file
@@ -0,0 +1,129 @@
|
||||
// Created on: 2000-11-23
|
||||
// Created by: Michael KLOKOV
|
||||
// Copyright (c) 2000-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 _IntTools_Curve_HeaderFile
|
||||
#define _IntTools_Curve_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <GeomAbs_CurveType.hxx>
|
||||
class Geom_Curve;
|
||||
class Geom2d_Curve;
|
||||
class gp_Pnt;
|
||||
|
||||
|
||||
//! class is a container of
|
||||
//! one 3d curve
|
||||
//! two 2d curves
|
||||
class IntTools_Curve
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
|
||||
//! Empty constructor
|
||||
Standard_EXPORT IntTools_Curve();
|
||||
|
||||
|
||||
//! Initializes me by a 3d curve
|
||||
//! and two 2d curves
|
||||
Standard_EXPORT IntTools_Curve(const Handle(Geom_Curve)& Curve3d, const Handle(Geom2d_Curve)& FirstCurve2d, const Handle(Geom2d_Curve)& SecondCurve2d);
|
||||
|
||||
|
||||
//! Modifier
|
||||
Standard_EXPORT void SetCurves (const Handle(Geom_Curve)& Curve3d, const Handle(Geom2d_Curve)& FirstCurve2d, const Handle(Geom2d_Curve)& SecondCurve2d);
|
||||
|
||||
|
||||
//! Modifier
|
||||
void SetCurve (const Handle(Geom_Curve)& Curve3d);
|
||||
|
||||
|
||||
//! Modifier
|
||||
void SetFirstCurve2d (const Handle(Geom2d_Curve)& FirstCurve2d);
|
||||
|
||||
|
||||
//! Modifier
|
||||
void SetSecondCurve2d (const Handle(Geom2d_Curve)& SecondCurve2d);
|
||||
|
||||
|
||||
//! Selector
|
||||
const Handle(Geom_Curve)& Curve() const;
|
||||
|
||||
|
||||
//! Selector
|
||||
const Handle(Geom2d_Curve)& FirstCurve2d() const;
|
||||
|
||||
|
||||
//! Selector
|
||||
const Handle(Geom2d_Curve)& SecondCurve2d() const;
|
||||
|
||||
|
||||
//! Returns true if 3d curve is BoundedCurve from Geom
|
||||
Standard_EXPORT Standard_Boolean HasBounds() const;
|
||||
|
||||
|
||||
//! Returns boundary parameters
|
||||
//! and corresponded 3d point.
|
||||
//!
|
||||
//! Warning:
|
||||
//! If HasBounds returns false
|
||||
//! the returned parameters are equal
|
||||
//! to zero.
|
||||
Standard_EXPORT void Bounds (Standard_Real& aT1, Standard_Real& aT2, gp_Pnt& aP1, gp_Pnt& aP2) const;
|
||||
|
||||
|
||||
//! Computes 3d point corresponded to parameter aT1
|
||||
//! Returns true if given parameter aT1
|
||||
//! is inside the boundaries of the curve
|
||||
Standard_EXPORT Standard_Boolean D0 (Standard_Real& aT1, gp_Pnt& aP1) const;
|
||||
|
||||
|
||||
//! Returns the type of 3d curve
|
||||
Standard_EXPORT GeomAbs_CurveType Type() const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Handle(Geom_Curve) my3dCurve;
|
||||
Handle(Geom2d_Curve) my2dCurve1;
|
||||
Handle(Geom2d_Curve) my2dCurve2;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <IntTools_Curve.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IntTools_Curve_HeaderFile
|
@@ -1,57 +0,0 @@
|
||||
-- Created on: 2005-10-14
|
||||
-- Created by: Mikhail KLOKOV
|
||||
-- Copyright (c) 2005-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.
|
||||
|
||||
class CurveRangeLocalizeData from IntTools
|
||||
uses
|
||||
Box from Bnd,
|
||||
CurveRangeSample from IntTools,
|
||||
MapOfCurveSample from IntTools,
|
||||
ListOfCurveRangeSample from IntTools,
|
||||
DataMapOfCurveSampleBox from IntTools
|
||||
|
||||
is
|
||||
Create(theNbSample: Integer from Standard;
|
||||
theMinRange: Real from Standard)
|
||||
returns CurveRangeLocalizeData from IntTools;
|
||||
|
||||
GetNbSample(me)
|
||||
returns Integer from Standard;
|
||||
---C++: inline
|
||||
|
||||
GetMinRange(me)
|
||||
returns Real from Standard;
|
||||
---C++: inline
|
||||
|
||||
AddOutRange(me: in out; theRange: CurveRangeSample from IntTools);
|
||||
|
||||
AddBox(me: in out; theRange: CurveRangeSample from IntTools;
|
||||
theBox: Box from Bnd);
|
||||
|
||||
FindBox(me; theRange: CurveRangeSample from IntTools;
|
||||
theBox: out Box from Bnd)
|
||||
returns Boolean from Standard;
|
||||
|
||||
IsRangeOut(me; theRange: CurveRangeSample from IntTools)
|
||||
returns Boolean from Standard;
|
||||
|
||||
ListRangeOut(me; theList: out ListOfCurveRangeSample from IntTools);
|
||||
|
||||
fields
|
||||
myNbSampleC: Integer from Standard;
|
||||
myMinRangeC: Real from Standard;
|
||||
myMapRangeOut: MapOfCurveSample from IntTools;
|
||||
myMapBox : DataMapOfCurveSampleBox from IntTools;
|
||||
|
||||
end CurveRangeLocalizeData from IntTools;
|
@@ -13,9 +13,12 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IntTools_CurveRangeLocalizeData.ixx>
|
||||
#include <IntTools_ListIteratorOfListOfCurveRangeSample.hxx>
|
||||
|
||||
#include <Bnd_Box.hxx>
|
||||
#include <IntTools_CurveRangeLocalizeData.hxx>
|
||||
#include <IntTools_CurveRangeSample.hxx>
|
||||
#include <IntTools_ListIteratorOfListOfBox.hxx>
|
||||
#include <IntTools_ListIteratorOfListOfCurveRangeSample.hxx>
|
||||
#include <IntTools_MapIteratorOfMapOfCurveSample.hxx>
|
||||
|
||||
IntTools_CurveRangeLocalizeData::IntTools_CurveRangeLocalizeData(const Standard_Integer theNbSample,
|
||||
|
85
src/IntTools/IntTools_CurveRangeLocalizeData.hxx
Normal file
85
src/IntTools/IntTools_CurveRangeLocalizeData.hxx
Normal file
@@ -0,0 +1,85 @@
|
||||
// Created on: 2005-10-14
|
||||
// Created by: Mikhail KLOKOV
|
||||
// Copyright (c) 2005-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 _IntTools_CurveRangeLocalizeData_HeaderFile
|
||||
#define _IntTools_CurveRangeLocalizeData_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <IntTools_MapOfCurveSample.hxx>
|
||||
#include <IntTools_DataMapOfCurveSampleBox.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <IntTools_ListOfCurveRangeSample.hxx>
|
||||
class IntTools_CurveRangeSample;
|
||||
class Bnd_Box;
|
||||
|
||||
|
||||
|
||||
class IntTools_CurveRangeLocalizeData
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT IntTools_CurveRangeLocalizeData(const Standard_Integer theNbSample, const Standard_Real theMinRange);
|
||||
|
||||
Standard_Integer GetNbSample() const;
|
||||
|
||||
Standard_Real GetMinRange() const;
|
||||
|
||||
Standard_EXPORT void AddOutRange (const IntTools_CurveRangeSample& theRange);
|
||||
|
||||
Standard_EXPORT void AddBox (const IntTools_CurveRangeSample& theRange, const Bnd_Box& theBox);
|
||||
|
||||
Standard_EXPORT Standard_Boolean FindBox (const IntTools_CurveRangeSample& theRange, Bnd_Box& theBox) const;
|
||||
|
||||
Standard_EXPORT Standard_Boolean IsRangeOut (const IntTools_CurveRangeSample& theRange) const;
|
||||
|
||||
Standard_EXPORT void ListRangeOut (IntTools_ListOfCurveRangeSample& theList) const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Standard_Integer myNbSampleC;
|
||||
Standard_Real myMinRangeC;
|
||||
IntTools_MapOfCurveSample myMapRangeOut;
|
||||
IntTools_DataMapOfCurveSampleBox myMapBox;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <IntTools_CurveRangeLocalizeData.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IntTools_CurveRangeLocalizeData_HeaderFile
|
@@ -1,51 +0,0 @@
|
||||
-- Created on: 2005-10-05
|
||||
-- Created by: Mikhail KLOKOV
|
||||
-- Copyright (c) 2005-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.
|
||||
|
||||
class CurveRangeSample from IntTools inherits BaseRangeSample from IntTools
|
||||
---Purpose: class for range index management of curve
|
||||
|
||||
uses
|
||||
Range from IntTools
|
||||
is
|
||||
|
||||
Create
|
||||
returns CurveRangeSample from IntTools;
|
||||
|
||||
Create(theIndex: Integer from Standard)
|
||||
returns CurveRangeSample from IntTools;
|
||||
|
||||
SetRangeIndex(me: in out; theIndex: Integer from Standard);
|
||||
---C++: inline
|
||||
|
||||
GetRangeIndex(me)
|
||||
returns Integer from Standard;
|
||||
---C++: inline
|
||||
|
||||
IsEqual(me; Other: CurveRangeSample from IntTools)
|
||||
returns Boolean from Standard;
|
||||
---C++: inline
|
||||
|
||||
GetRange(me; theFirst, theLast: Real from Standard;
|
||||
theNbSample: Integer from Standard)
|
||||
returns Range from IntTools;
|
||||
|
||||
GetRangeIndexDeeper(me; theNbSample: Integer from Standard)
|
||||
returns Integer from Standard;
|
||||
---C++: inline
|
||||
|
||||
fields
|
||||
myIndex: Integer from Standard;
|
||||
|
||||
end CurveRangeSample from IntTools;
|
@@ -13,7 +13,9 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IntTools_CurveRangeSample.ixx>
|
||||
|
||||
#include <IntTools_CurveRangeSample.hxx>
|
||||
#include <IntTools_Range.hxx>
|
||||
|
||||
IntTools_CurveRangeSample::IntTools_CurveRangeSample()
|
||||
{
|
||||
|
77
src/IntTools/IntTools_CurveRangeSample.hxx
Normal file
77
src/IntTools/IntTools_CurveRangeSample.hxx
Normal file
@@ -0,0 +1,77 @@
|
||||
// Created on: 2005-10-05
|
||||
// Created by: Mikhail KLOKOV
|
||||
// Copyright (c) 2005-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 _IntTools_CurveRangeSample_HeaderFile
|
||||
#define _IntTools_CurveRangeSample_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <IntTools_BaseRangeSample.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
class IntTools_Range;
|
||||
|
||||
|
||||
//! class for range index management of curve
|
||||
class IntTools_CurveRangeSample : public IntTools_BaseRangeSample
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT IntTools_CurveRangeSample();
|
||||
|
||||
Standard_EXPORT IntTools_CurveRangeSample(const Standard_Integer theIndex);
|
||||
|
||||
void SetRangeIndex (const Standard_Integer theIndex);
|
||||
|
||||
Standard_Integer GetRangeIndex() const;
|
||||
|
||||
Standard_Boolean IsEqual (const IntTools_CurveRangeSample& Other) const;
|
||||
|
||||
Standard_EXPORT IntTools_Range GetRange (const Standard_Real theFirst, const Standard_Real theLast, const Standard_Integer theNbSample) const;
|
||||
|
||||
Standard_Integer GetRangeIndexDeeper (const Standard_Integer theNbSample) const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Standard_Integer myIndex;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <IntTools_CurveRangeSample.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IntTools_CurveRangeSample_HeaderFile
|
@@ -1,37 +0,0 @@
|
||||
-- Created on: 2005-10-14
|
||||
-- Created by: Mikhail KLOKOV
|
||||
-- Copyright (c) 2005-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.
|
||||
|
||||
class CurveRangeSampleMapHasher from IntTools
|
||||
---Purpose: class for range index management of curve
|
||||
uses
|
||||
CurveRangeSample from IntTools
|
||||
|
||||
is
|
||||
HashCode(myclass; K : CurveRangeSample from IntTools; Upper : Integer) returns Integer;
|
||||
---Purpose: Returns a HasCode value for the Key <K> in the
|
||||
-- range 0..Upper.
|
||||
--
|
||||
---C++: inline
|
||||
|
||||
IsEqual(myclass; S1, S2 : CurveRangeSample from IntTools) returns Boolean;
|
||||
---Purpose: Returns True when the two keys are the same. Two
|
||||
-- same keys must have the same hashcode, the
|
||||
-- contrary is not necessary.
|
||||
--
|
||||
---C++: inline
|
||||
|
||||
|
||||
|
||||
end CurveRangeSampleMapHasher from IntTools;
|
@@ -13,4 +13,6 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IntTools_CurveRangeSampleMapHasher.ixx>
|
||||
|
||||
#include <IntTools_CurveRangeSample.hxx>
|
||||
#include <IntTools_CurveRangeSampleMapHasher.hxx>
|
||||
|
69
src/IntTools/IntTools_CurveRangeSampleMapHasher.hxx
Normal file
69
src/IntTools/IntTools_CurveRangeSampleMapHasher.hxx
Normal file
@@ -0,0 +1,69 @@
|
||||
// Created on: 2005-10-14
|
||||
// Created by: Mikhail KLOKOV
|
||||
// Copyright (c) 2005-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 _IntTools_CurveRangeSampleMapHasher_HeaderFile
|
||||
#define _IntTools_CurveRangeSampleMapHasher_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class IntTools_CurveRangeSample;
|
||||
|
||||
|
||||
//! class for range index management of curve
|
||||
class IntTools_CurveRangeSampleMapHasher
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Returns a HasCode value for the Key <K> in the
|
||||
//! range 0..Upper.
|
||||
static Standard_Integer HashCode (const IntTools_CurveRangeSample& K, const Standard_Integer Upper);
|
||||
|
||||
//! Returns True when the two keys are the same. Two
|
||||
//! same keys must have the same hashcode, the
|
||||
//! contrary is not necessary.
|
||||
static Standard_Boolean IsEqual (const IntTools_CurveRangeSample& S1, const IntTools_CurveRangeSample& S2);
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <IntTools_CurveRangeSampleMapHasher.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IntTools_CurveRangeSampleMapHasher_HeaderFile
|
@@ -1,244 +0,0 @@
|
||||
-- Created by: Eugeny MALTCHIKOV
|
||||
-- Copyright (c) 2013-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.
|
||||
|
||||
class EdgeEdge from IntTools
|
||||
---Purpose:
|
||||
-- The class provides Edge/Edge intersection algorithm
|
||||
-- based on the intersection between edges bounding boxes.
|
||||
|
||||
uses
|
||||
Real from Standard,
|
||||
Box from Bnd,
|
||||
Range from IntTools,
|
||||
Edge from TopoDS,
|
||||
Curve from Geom,
|
||||
Curve from BRepAdaptor,
|
||||
ShapeEnum from TopAbs,
|
||||
SequenceOfRanges from IntTools,
|
||||
SequenceOfCommonPrts from IntTools
|
||||
|
||||
is
|
||||
|
||||
Create
|
||||
returns EdgeEdge from IntTools;
|
||||
---C++: alias "~IntTools_EdgeEdge();"
|
||||
---C++: inline
|
||||
---Purpose:
|
||||
-- Empty contructor
|
||||
|
||||
Create (
|
||||
theEdge1 : Edge from TopoDS;
|
||||
theEdge2 : Edge from TopoDS)
|
||||
returns EdgeEdge from IntTools;
|
||||
---C++: inline
|
||||
---Purpose:
|
||||
-- Contructor
|
||||
|
||||
Create (
|
||||
theEdge1 : Edge from TopoDS;
|
||||
aT11, aT12 : Real from Standard;
|
||||
theEdge2 : Edge from TopoDS;
|
||||
aT21, aT22 : Real from Standard)
|
||||
returns EdgeEdge from IntTools;
|
||||
---C++: inline
|
||||
---Purpose:
|
||||
-- Contructor
|
||||
|
||||
SetEdge1(me:out;
|
||||
theEdge : Edge from TopoDS);
|
||||
---C++: inline
|
||||
---Purpose:
|
||||
-- Sets the first edge
|
||||
|
||||
SetEdge1(me:out;
|
||||
theEdge : Edge from TopoDS;
|
||||
aT1, aT2 : Real from Standard);
|
||||
---C++: inline
|
||||
---Purpose:
|
||||
-- Sets the first edge and its range
|
||||
|
||||
SetRange1(me:out;
|
||||
theRange1 : Range from IntTools);
|
||||
---C++: inline
|
||||
---Purpose:
|
||||
-- Sets the range for the first edge
|
||||
|
||||
SetRange1(me:out;
|
||||
aT1, aT2 : Real from Standard);
|
||||
---C++: inline
|
||||
---Purpose:
|
||||
-- Sets the range for the first edge
|
||||
|
||||
SetEdge2(me:out;
|
||||
theEdge : Edge from TopoDS);
|
||||
---C++: inline
|
||||
---Purpose:
|
||||
-- Sets the second edge
|
||||
|
||||
SetEdge2(me:out;
|
||||
theEdge : Edge from TopoDS;
|
||||
aT1, aT2 : Real from Standard);
|
||||
---C++: inline
|
||||
---Purpose:
|
||||
-- Sets the first edge and its range
|
||||
|
||||
SetRange2(me:out;
|
||||
theRange : Range from IntTools);
|
||||
---C++: inline
|
||||
---Purpose:
|
||||
-- Sets the range for the second edge
|
||||
|
||||
SetRange2(me:out;
|
||||
aT1, aT2 : Real from Standard);
|
||||
---C++: inline
|
||||
---Purpose:
|
||||
-- Sets the range for the second edge
|
||||
|
||||
CheckData(me:out)
|
||||
is protected;
|
||||
---C++: inline
|
||||
---Purpose:
|
||||
-- Checks the data
|
||||
|
||||
Prepare(me:out)
|
||||
is protected;
|
||||
---Purpose:
|
||||
-- Prepares the data
|
||||
|
||||
Perform(me:out);
|
||||
---Purpose:
|
||||
-- Performs the intersection between edges
|
||||
|
||||
ComputeLineLine(me:out)
|
||||
is protected;
|
||||
---Purpose:
|
||||
-- Computes Line/Line intersection.
|
||||
|
||||
FindSolutions(me:out;
|
||||
theRanges1 : out SequenceOfRanges from IntTools;
|
||||
theRanges2 : out SequenceOfRanges from IntTools;
|
||||
bSplit2 : out Boolean from Standard)
|
||||
is protected;
|
||||
---Purpose:
|
||||
-- Intermediate function
|
||||
|
||||
FindSolutions(me:out;
|
||||
theR1, theR2 : Range from IntTools;
|
||||
theBox2 : Box from Bnd;
|
||||
theRanges1 : out SequenceOfRanges from IntTools;
|
||||
theRanges2 : out SequenceOfRanges from IntTools)
|
||||
is protected;
|
||||
---Purpose:
|
||||
-- Looking for the exact intersection ranges
|
||||
|
||||
MergeSolutions(me:out;
|
||||
theRanges1 : SequenceOfRanges from IntTools;
|
||||
theRanges2 : SequenceOfRanges from IntTools;
|
||||
bSplit2 : Boolean from Standard)
|
||||
is protected;
|
||||
---Purpose:
|
||||
-- Merges found solutions
|
||||
|
||||
FindParameters(myclass;
|
||||
theBAC : Curve from BRepAdaptor;
|
||||
aT1, aT2 : Real from Standard;
|
||||
theRes : Real from Standard;
|
||||
thePTol : Real from Standard;
|
||||
theResCoeff : Real from Standard;
|
||||
theCBox : Box from Bnd;
|
||||
aTB1, aTB2 : out Real from Standard)
|
||||
returns Boolean from Standard
|
||||
is protected;
|
||||
---Purpose:
|
||||
-- Looking for the range of the edge whick is in the box
|
||||
|
||||
CheckCoincidence(me:out;
|
||||
aT11, aT12 : Real from Standard;
|
||||
aT21, aT22 : Real from Standard;
|
||||
theCriteria : Real from Standard;
|
||||
theCurveRes1: Real from Standard)
|
||||
returns Integer from Standard
|
||||
is protected;
|
||||
---Purpose:
|
||||
-- Checks if edges coincide on the ranges
|
||||
|
||||
AddSolution(me:out;
|
||||
aT11, aT12, aT21, aT22 : Real from Standard;
|
||||
theType : ShapeEnum from TopAbs)
|
||||
is protected;
|
||||
---Purpose:
|
||||
-- Adds common part of the given type to myCommonParts
|
||||
|
||||
FindBestSolution(me:out;
|
||||
aT11, aT12, aT21, aT22 : Real from Standard;
|
||||
aT1, aT2 : out Real from Standard)
|
||||
is protected;
|
||||
---Purpose:
|
||||
-- Looking for the minimal distance between edges on the ranges
|
||||
|
||||
IsIntersection(me:out;
|
||||
aT11, aT12 : Real from Standard;
|
||||
aT21, aT22 : Real from Standard)
|
||||
returns Boolean from Standard
|
||||
is protected;
|
||||
---Purpose:
|
||||
-- Checks is there an intersection between edges on the given ranges
|
||||
-- (for nearly conicident edges)
|
||||
|
||||
IsDone(me)
|
||||
returns Boolean from Standard;
|
||||
---C++: inline
|
||||
---Purpose:
|
||||
-- Returns TRUE if common part(s) is(are) found
|
||||
|
||||
CommonParts(me)
|
||||
returns SequenceOfCommonPrts from IntTools;
|
||||
---C++: inline
|
||||
---C++: return const&
|
||||
---Purpose:
|
||||
-- Returns common parts
|
||||
|
||||
fields
|
||||
-- source data
|
||||
myEdge1 : Edge from TopoDS is protected;
|
||||
myEdge2 : Edge from TopoDS is protected;
|
||||
|
||||
myGeom1 : Curve from Geom is protected;
|
||||
myGeom2 : Curve from Geom is protected;
|
||||
|
||||
myCurve1 : Curve from BRepAdaptor is protected;
|
||||
myCurve2 : Curve from BRepAdaptor is protected;
|
||||
|
||||
myTol1 : Real from Standard is protected;
|
||||
myTol2 : Real from Standard is protected;
|
||||
myTol : Real from Standard is protected;
|
||||
|
||||
myRes1 : Real from Standard is protected;
|
||||
myRes2 : Real from Standard is protected;
|
||||
|
||||
myResCoeff1 : Real from Standard is protected;
|
||||
myResCoeff2 : Real from Standard is protected;
|
||||
|
||||
myPTol1 : Real from Standard is protected;
|
||||
myPTol2 : Real from Standard is protected;
|
||||
|
||||
myRange1 : Range from IntTools is protected;
|
||||
myRange2 : Range from IntTools is protected;
|
||||
|
||||
-- results
|
||||
mySwap : Boolean from Standard is protected;
|
||||
myErrorStatus : Integer from Standard is protected;
|
||||
myCommonParts : SequenceOfCommonPrts from IntTools is protected;
|
||||
|
||||
end EdgeEdge;
|
@@ -12,31 +12,26 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IntTools_EdgeEdge.ixx>
|
||||
|
||||
#include <gp_Dir.hxx>
|
||||
#include <gp_Lin.hxx>
|
||||
|
||||
#include <ElCLib.hxx>
|
||||
|
||||
#include <TopoDS_Iterator.hxx>
|
||||
|
||||
#include <Bnd_Box.hxx>
|
||||
#include <BndLib_Add3dCurve.hxx>
|
||||
|
||||
#include <Geom_Circle.hxx>
|
||||
#include <Geom_Ellipse.hxx>
|
||||
#include <Geom_BezierCurve.hxx>
|
||||
#include <Geom_BSplineCurve.hxx>
|
||||
|
||||
#include <GeomAPI_ProjectPointOnCurve.hxx>
|
||||
|
||||
#include <BOPCol_MapOfInteger.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <BRepAdaptor_Curve.hxx>
|
||||
|
||||
#include <ElCLib.hxx>
|
||||
#include <Geom_BezierCurve.hxx>
|
||||
#include <Geom_BSplineCurve.hxx>
|
||||
#include <Geom_Circle.hxx>
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <Geom_Ellipse.hxx>
|
||||
#include <GeomAPI_ProjectPointOnCurve.hxx>
|
||||
#include <gp_Dir.hxx>
|
||||
#include <gp_Lin.hxx>
|
||||
#include <IntTools_CommonPrt.hxx>
|
||||
|
||||
#include <BOPCol_MapOfInteger.hxx>
|
||||
#include <IntTools_EdgeEdge.hxx>
|
||||
#include <IntTools_Range.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS_Iterator.hxx>
|
||||
|
||||
static
|
||||
void BndBuildBox(const BRepAdaptor_Curve& theBAC,
|
||||
|
194
src/IntTools/IntTools_EdgeEdge.hxx
Normal file
194
src/IntTools/IntTools_EdgeEdge.hxx
Normal file
@@ -0,0 +1,194 @@
|
||||
// Created by: Eugeny MALTCHIKOV
|
||||
// Copyright (c) 2013-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 _IntTools_EdgeEdge_HeaderFile
|
||||
#define _IntTools_EdgeEdge_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <BRepAdaptor_Curve.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <IntTools_Range.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <IntTools_SequenceOfCommonPrts.hxx>
|
||||
#include <IntTools_SequenceOfRanges.hxx>
|
||||
#include <TopAbs_ShapeEnum.hxx>
|
||||
class Geom_Curve;
|
||||
class TopoDS_Edge;
|
||||
class IntTools_Range;
|
||||
class Bnd_Box;
|
||||
class BRepAdaptor_Curve;
|
||||
|
||||
|
||||
|
||||
//! The class provides Edge/Edge intersection algorithm
|
||||
//! based on the intersection between edges bounding boxes.
|
||||
class IntTools_EdgeEdge
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
|
||||
//! Empty contructor
|
||||
IntTools_EdgeEdge();
|
||||
~IntTools_EdgeEdge();
|
||||
|
||||
|
||||
//! Contructor
|
||||
IntTools_EdgeEdge(const TopoDS_Edge& theEdge1, const TopoDS_Edge& theEdge2);
|
||||
|
||||
|
||||
//! Contructor
|
||||
IntTools_EdgeEdge(const TopoDS_Edge& theEdge1, const Standard_Real aT11, const Standard_Real aT12, const TopoDS_Edge& theEdge2, const Standard_Real aT21, const Standard_Real aT22);
|
||||
|
||||
|
||||
//! Sets the first edge
|
||||
void SetEdge1 (const TopoDS_Edge& theEdge);
|
||||
|
||||
|
||||
//! Sets the first edge and its range
|
||||
void SetEdge1 (const TopoDS_Edge& theEdge, const Standard_Real aT1, const Standard_Real aT2);
|
||||
|
||||
|
||||
//! Sets the range for the first edge
|
||||
void SetRange1 (const IntTools_Range& theRange1);
|
||||
|
||||
|
||||
//! Sets the range for the first edge
|
||||
void SetRange1 (const Standard_Real aT1, const Standard_Real aT2);
|
||||
|
||||
|
||||
//! Sets the second edge
|
||||
void SetEdge2 (const TopoDS_Edge& theEdge);
|
||||
|
||||
|
||||
//! Sets the first edge and its range
|
||||
void SetEdge2 (const TopoDS_Edge& theEdge, const Standard_Real aT1, const Standard_Real aT2);
|
||||
|
||||
|
||||
//! Sets the range for the second edge
|
||||
void SetRange2 (const IntTools_Range& theRange);
|
||||
|
||||
|
||||
//! Sets the range for the second edge
|
||||
void SetRange2 (const Standard_Real aT1, const Standard_Real aT2);
|
||||
|
||||
|
||||
//! Performs the intersection between edges
|
||||
Standard_EXPORT void Perform();
|
||||
|
||||
|
||||
//! Returns TRUE if common part(s) is(are) found
|
||||
Standard_Boolean IsDone() const;
|
||||
|
||||
|
||||
//! Returns common parts
|
||||
const IntTools_SequenceOfCommonPrts& CommonParts() const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
//! Checks the data
|
||||
void CheckData();
|
||||
|
||||
|
||||
//! Prepares the data
|
||||
Standard_EXPORT void Prepare();
|
||||
|
||||
|
||||
//! Computes Line/Line intersection.
|
||||
Standard_EXPORT void ComputeLineLine();
|
||||
|
||||
|
||||
//! Intermediate function
|
||||
Standard_EXPORT void FindSolutions (IntTools_SequenceOfRanges& theRanges1, IntTools_SequenceOfRanges& theRanges2, Standard_Boolean& bSplit2);
|
||||
|
||||
|
||||
//! Looking for the exact intersection ranges
|
||||
Standard_EXPORT void FindSolutions (const IntTools_Range& theR1, const IntTools_Range& theR2, const Bnd_Box& theBox2, IntTools_SequenceOfRanges& theRanges1, IntTools_SequenceOfRanges& theRanges2);
|
||||
|
||||
|
||||
//! Merges found solutions
|
||||
Standard_EXPORT void MergeSolutions (const IntTools_SequenceOfRanges& theRanges1, const IntTools_SequenceOfRanges& theRanges2, const Standard_Boolean bSplit2);
|
||||
|
||||
|
||||
//! Looking for the range of the edge whick is in the box
|
||||
Standard_EXPORT static Standard_Boolean FindParameters (const BRepAdaptor_Curve& theBAC, const Standard_Real aT1, const Standard_Real aT2, const Standard_Real theRes, const Standard_Real thePTol, const Standard_Real theResCoeff, const Bnd_Box& theCBox, Standard_Real& aTB1, Standard_Real& aTB2);
|
||||
|
||||
|
||||
//! Checks if edges coincide on the ranges
|
||||
Standard_EXPORT Standard_Integer CheckCoincidence (const Standard_Real aT11, const Standard_Real aT12, const Standard_Real aT21, const Standard_Real aT22, const Standard_Real theCriteria, const Standard_Real theCurveRes1);
|
||||
|
||||
|
||||
//! Adds common part of the given type to myCommonParts
|
||||
Standard_EXPORT void AddSolution (const Standard_Real aT11, const Standard_Real aT12, const Standard_Real aT21, const Standard_Real aT22, const TopAbs_ShapeEnum theType);
|
||||
|
||||
|
||||
//! Looking for the minimal distance between edges on the ranges
|
||||
Standard_EXPORT void FindBestSolution (const Standard_Real aT11, const Standard_Real aT12, const Standard_Real aT21, const Standard_Real aT22, Standard_Real& aT1, Standard_Real& aT2);
|
||||
|
||||
|
||||
//! Checks is there an intersection between edges on the given ranges
|
||||
//! (for nearly conicident edges)
|
||||
Standard_EXPORT Standard_Boolean IsIntersection (const Standard_Real aT11, const Standard_Real aT12, const Standard_Real aT21, const Standard_Real aT22);
|
||||
|
||||
|
||||
TopoDS_Edge myEdge1;
|
||||
TopoDS_Edge myEdge2;
|
||||
Handle(Geom_Curve) myGeom1;
|
||||
Handle(Geom_Curve) myGeom2;
|
||||
BRepAdaptor_Curve myCurve1;
|
||||
BRepAdaptor_Curve myCurve2;
|
||||
Standard_Real myTol1;
|
||||
Standard_Real myTol2;
|
||||
Standard_Real myTol;
|
||||
Standard_Real myRes1;
|
||||
Standard_Real myRes2;
|
||||
Standard_Real myResCoeff1;
|
||||
Standard_Real myResCoeff2;
|
||||
Standard_Real myPTol1;
|
||||
Standard_Real myPTol2;
|
||||
IntTools_Range myRange1;
|
||||
IntTools_Range myRange2;
|
||||
Standard_Boolean mySwap;
|
||||
Standard_Integer myErrorStatus;
|
||||
IntTools_SequenceOfCommonPrts myCommonParts;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <IntTools_EdgeEdge.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IntTools_EdgeEdge_HeaderFile
|
@@ -1,292 +0,0 @@
|
||||
-- Created on: 2001-02-26
|
||||
-- Created by: Peter KURNEV
|
||||
-- Copyright (c) 2001-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.
|
||||
|
||||
class EdgeFace from IntTools
|
||||
|
||||
---Purpose: The class provides Edge/Face algorithm to determine
|
||||
--- common parts between edge and face in 3-d space.
|
||||
-- Common parts can be : Vertices or Edges.
|
||||
|
||||
uses
|
||||
Pnt from gp,
|
||||
Edge from TopoDS,
|
||||
Face from TopoDS,
|
||||
Curve from BRepAdaptor,
|
||||
Surface from BRepAdaptor,
|
||||
SequenceOfRanges from IntTools,
|
||||
CArray1OfReal from IntTools,
|
||||
CommonPrt from IntTools,
|
||||
FClass2d from IntTools,
|
||||
SequenceOfRoots from IntTools,
|
||||
SequenceOfCommonPrts from IntTools,
|
||||
Context from IntTools,
|
||||
Range from IntTools
|
||||
|
||||
--raises
|
||||
|
||||
is
|
||||
Create
|
||||
returns EdgeFace from IntTools;
|
||||
---Purpose:
|
||||
--- Empty Constructor
|
||||
---
|
||||
|
||||
SetEdge (me:out;
|
||||
anEdge:Edge from TopoDS);
|
||||
---Purpose:
|
||||
--- Initializes algorithm by the edge anEdge
|
||||
|
||||
SetTolE (me:out;
|
||||
aTolEdge1:Real from Standard);
|
||||
---Purpose:
|
||||
--- Initializes algorithm by edge tolerance
|
||||
|
||||
SetFace(me:out;
|
||||
aFace:Face from TopoDS);
|
||||
---Purpose:
|
||||
--- Initializes algorithm by the face aFace
|
||||
|
||||
SetTolF (me:out;
|
||||
aTolFace:Real from Standard);
|
||||
---Purpose:
|
||||
--- Initializes algorithm by face tolerance
|
||||
|
||||
Edge (me)
|
||||
returns Edge from TopoDS;
|
||||
---C++: return const &
|
||||
---Purpose:
|
||||
--- Returns edge
|
||||
|
||||
Face(me)
|
||||
returns Face from TopoDS;
|
||||
---C++: return const &
|
||||
---Purpose:
|
||||
--- Returns face
|
||||
|
||||
TolE (me)
|
||||
returns Real from Standard;
|
||||
---Purpose:
|
||||
--- Returns tolerance of the edge
|
||||
|
||||
TolF (me)
|
||||
returns Real from Standard;
|
||||
---Purpose:
|
||||
--- Returns tolerance of the face
|
||||
|
||||
SetDiscretize (me:out;
|
||||
aDiscret:Integer from Standard);
|
||||
---Purpose:
|
||||
--- Initializes algorithm by discretization value
|
||||
|
||||
SetDeflection (me:out;
|
||||
aDeflection:Real from Standard);
|
||||
---Purpose:
|
||||
--- Initializes algorithm by deflection value
|
||||
|
||||
SetEpsilonT(me:out;
|
||||
anEpsT:Real from Standard);
|
||||
---Purpose:
|
||||
--- Initializes algorithm by parameter tolerance
|
||||
|
||||
SetEpsilonNull (me:out;
|
||||
anEpsNull:Real from Standard);
|
||||
---Purpose:
|
||||
--- Initializes algorithm by distance tolerance
|
||||
|
||||
SetRange (me:out;
|
||||
aRange:Range from IntTools);
|
||||
---Purpose:
|
||||
--- Sets boundaries for edge.
|
||||
--- The algorithm processes edge inside these boundaries.
|
||||
|
||||
SetRange (me:out;
|
||||
aFirst, aLast:Real from Standard);
|
||||
---Purpose:
|
||||
--- Sets boundaries for edge.
|
||||
--- The algorithm processes edge inside these boundaries.
|
||||
|
||||
SetContext (me: in out;
|
||||
theContext: Context from IntTools);
|
||||
---Purpose:
|
||||
--- Sets the intersecton context
|
||||
|
||||
Context (me)
|
||||
returns Context from IntTools;
|
||||
---C++:return const &
|
||||
---Purpose:
|
||||
--- Gets the intersecton context
|
||||
|
||||
Perform (me:out);
|
||||
---Purpose:
|
||||
--- Launches the process
|
||||
|
||||
IsDone (me)
|
||||
returns Boolean from Standard;
|
||||
---Purpose:
|
||||
--- Returns true if computation was done
|
||||
--- successfully, otherwise returns false
|
||||
|
||||
ErrorStatus(me)
|
||||
returns Integer from Standard;
|
||||
---Purpose:
|
||||
--- Returns code of completion
|
||||
--- 0 - means successful completion
|
||||
--- 1 - the process was not started
|
||||
--- 2,3,4,5 - invalid source data for the algorithm
|
||||
--- 6 - discretization failed
|
||||
--- 7 - no projectable ranges found
|
||||
--- 11 - distance computing error
|
||||
|
||||
CommonParts (me)
|
||||
returns SequenceOfCommonPrts from IntTools;
|
||||
---C++: return const&
|
||||
---Purpose:
|
||||
--- Returns results
|
||||
|
||||
Range (me)
|
||||
returns Range from IntTools;
|
||||
---C++: return const&
|
||||
---Purpose:
|
||||
--- Returns boundaries for edge
|
||||
|
||||
IsEqDistance(myclass;
|
||||
aP: Pnt from gp;
|
||||
aS: Surface from BRepAdaptor;
|
||||
aT: Real from Standard;
|
||||
aD:out Real from Standard)
|
||||
returns Boolean from Standard;
|
||||
|
||||
-------------------------------------------------------
|
||||
-- Block of protected methods of the algorithm --
|
||||
-------------------------------------------------------
|
||||
|
||||
CheckData (me:out)
|
||||
is protected;
|
||||
|
||||
Prepare (me:out)
|
||||
is protected;
|
||||
|
||||
IsProjectable (me;
|
||||
t:Real from Standard)
|
||||
returns Boolean from Standard
|
||||
is protected;
|
||||
|
||||
FindProjectableRoot (me:out;
|
||||
t1,t2:Real from Standard;
|
||||
f1,f2:Integer from Standard;
|
||||
tRoot:out Real from Standard)
|
||||
is protected;
|
||||
|
||||
DistanceFunction (me:out;
|
||||
t:Real from Standard)
|
||||
returns Real from Standard
|
||||
is protected;
|
||||
|
||||
DerivativeFunction (me:out;
|
||||
t:Real from Standard)
|
||||
returns Real from Standard
|
||||
is protected;
|
||||
|
||||
PrepareArgsFuncArrays (me:out;
|
||||
t1,t2:Real from Standard)
|
||||
is protected;
|
||||
|
||||
|
||||
AddDerivativePoints(me:out;
|
||||
t,f:CArray1OfReal from IntTools)
|
||||
is protected;
|
||||
|
||||
|
||||
FindSimpleRoot (me:out;
|
||||
IP:Integer from Standard;
|
||||
ta, tb, fA:Real from Standard)
|
||||
returns Real from Standard
|
||||
is protected;
|
||||
|
||||
FindGoldRoot (me:out;
|
||||
ta, tb, coeff:Real from Standard)
|
||||
returns Real from Standard
|
||||
is protected;
|
||||
|
||||
MakeType (me:out;
|
||||
aCP: out CommonPrt from IntTools)
|
||||
returns Integer from Standard
|
||||
is protected;
|
||||
|
||||
|
||||
IsIntersection (me:out;
|
||||
ta,tb:Real from Standard)
|
||||
is protected;
|
||||
|
||||
FindDerivativeRoot(me:out;
|
||||
t,f:CArray1OfReal from IntTools)
|
||||
is protected;
|
||||
|
||||
RemoveIdenticalRoots(me:out)
|
||||
is protected;
|
||||
|
||||
CheckTouch (me: out;
|
||||
aCP: CommonPrt from IntTools;
|
||||
aTX:out Real from Standard)
|
||||
returns Boolean from Standard
|
||||
is protected;
|
||||
|
||||
CheckTouchVertex (me:out;
|
||||
aCP: CommonPrt from IntTools;
|
||||
aTX:out Real from Standard)
|
||||
returns Boolean from Standard
|
||||
is protected;
|
||||
|
||||
fields
|
||||
-- Data
|
||||
myEdge : Edge from TopoDS;
|
||||
myFace : Face from TopoDS;
|
||||
myTolE : Real from Standard;
|
||||
myTolF : Real from Standard;
|
||||
|
||||
myDiscret : Integer from Standard;
|
||||
|
||||
myEpsT : Real from Standard;
|
||||
myEpsNull : Real from Standard;
|
||||
myDeflection : Real from Standard;
|
||||
|
||||
-- data curves
|
||||
myC : Curve from BRepAdaptor;
|
||||
myTmin : Real from Standard;
|
||||
myTmax : Real from Standard;
|
||||
|
||||
myS : Surface from BRepAdaptor;
|
||||
|
||||
myCriteria : Real from Standard;
|
||||
|
||||
-- IsDone
|
||||
myIsDone : Boolean from Standard;
|
||||
myErrorStatus : Integer from Standard;
|
||||
|
||||
--- internal members
|
||||
myContext : Context from IntTools;
|
||||
myProjectableRanges: SequenceOfRanges from IntTools;
|
||||
myFClass2d : FClass2d from IntTools;
|
||||
myFuncArray : CArray1OfReal from IntTools;
|
||||
myArgsArray : CArray1OfReal from IntTools;
|
||||
mySequenceOfRoots : SequenceOfRoots from IntTools;
|
||||
mySeqOfCommonPrts : SequenceOfCommonPrts from IntTools;
|
||||
|
||||
myPar1 : Real from Standard;
|
||||
myParallel : Boolean from Standard;
|
||||
|
||||
myRange : Range from IntTools;
|
||||
|
||||
end EdgeFace;
|
@@ -13,57 +13,47 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IntTools_EdgeFace.ixx>
|
||||
|
||||
|
||||
|
||||
#include <IntTools_CArray1OfReal.hxx>
|
||||
#include <IntTools.hxx>
|
||||
#include <IntTools_CArray1OfInteger.hxx>
|
||||
#include <IntTools_Range.hxx>
|
||||
#include <IntTools_Tools.hxx>
|
||||
#include <IntTools_Array1OfRange.hxx>
|
||||
#include <IntTools_CommonPrt.hxx>
|
||||
#include <IntTools_Root.hxx>
|
||||
#include <IntTools_BeanFaceIntersector.hxx>
|
||||
#include <IntTools_Context.hxx>
|
||||
|
||||
#include <BRep_Tool.hxx>
|
||||
|
||||
#include <GeomAdaptor_Surface.hxx>
|
||||
#include <GeomAdaptor_Curve.hxx>
|
||||
|
||||
#include <Geom_Surface.hxx>
|
||||
#include <Geom_Curve.hxx>
|
||||
|
||||
#include <GeomAPI_ProjectPointOnSurf.hxx>
|
||||
|
||||
#include <Precision.hxx>
|
||||
|
||||
#include <Bnd_Box.hxx>
|
||||
#include <BndLib_AddSurface.hxx>
|
||||
|
||||
#include <gp_Cylinder.hxx>
|
||||
#include <gp_Ax1.hxx>
|
||||
#include <gp_Lin.hxx>
|
||||
#include <gp_Cone.hxx>
|
||||
#include <gp_Torus.hxx>
|
||||
#include <gp_Circ.hxx>
|
||||
#include <gp_Pln.hxx>
|
||||
|
||||
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <BRepAdaptor_Surface.hxx>
|
||||
#include <Extrema_ExtCS.hxx>
|
||||
#include <Extrema_POnCurv.hxx>
|
||||
#include <Extrema_POnSurf.hxx>
|
||||
|
||||
|
||||
#include <IntCurveSurface_HInter.hxx>
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <Geom_Surface.hxx>
|
||||
#include <GeomAdaptor_Curve.hxx>
|
||||
#include <GeomAdaptor_HCurve.hxx>
|
||||
#include <GeomAdaptor_HSurface.hxx>
|
||||
#include <GeomAdaptor_Surface.hxx>
|
||||
#include <GeomAPI_ProjectPointOnSurf.hxx>
|
||||
#include <gp_Ax1.hxx>
|
||||
#include <gp_Circ.hxx>
|
||||
#include <gp_Cone.hxx>
|
||||
#include <gp_Cylinder.hxx>
|
||||
#include <gp_Lin.hxx>
|
||||
#include <gp_Pln.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Torus.hxx>
|
||||
#include <IntCurveSurface_HInter.hxx>
|
||||
#include <IntCurveSurface_IntersectionPoint.hxx>
|
||||
#include <IntTools.hxx>
|
||||
#include <IntTools_Array1OfRange.hxx>
|
||||
#include <IntTools_BeanFaceIntersector.hxx>
|
||||
#include <IntTools_CArray1OfInteger.hxx>
|
||||
#include <IntTools_CArray1OfReal.hxx>
|
||||
#include <IntTools_CommonPrt.hxx>
|
||||
#include <IntTools_Context.hxx>
|
||||
#include <IntTools_EdgeFace.hxx>
|
||||
#include <IntTools_Range.hxx>
|
||||
#include <IntTools_Root.hxx>
|
||||
#include <IntTools_Tools.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS_Face.hxx>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
static
|
||||
Standard_Boolean IsCoplanar (const BRepAdaptor_Curve& ,
|
||||
const BRepAdaptor_Surface& );
|
||||
|
235
src/IntTools/IntTools_EdgeFace.hxx
Normal file
235
src/IntTools/IntTools_EdgeFace.hxx
Normal file
@@ -0,0 +1,235 @@
|
||||
// Created on: 2001-02-26
|
||||
// Created by: Peter KURNEV
|
||||
// Copyright (c) 2001-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 _IntTools_EdgeFace_HeaderFile
|
||||
#define _IntTools_EdgeFace_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS_Face.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <BRepAdaptor_Curve.hxx>
|
||||
#include <BRepAdaptor_Surface.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <IntTools_SequenceOfRanges.hxx>
|
||||
#include <IntTools_FClass2d.hxx>
|
||||
#include <IntTools_CArray1OfReal.hxx>
|
||||
#include <IntTools_SequenceOfRoots.hxx>
|
||||
#include <IntTools_SequenceOfCommonPrts.hxx>
|
||||
#include <IntTools_Range.hxx>
|
||||
class IntTools_Context;
|
||||
class TopoDS_Edge;
|
||||
class TopoDS_Face;
|
||||
class IntTools_Range;
|
||||
class gp_Pnt;
|
||||
class BRepAdaptor_Surface;
|
||||
class IntTools_CArray1OfReal;
|
||||
class IntTools_CommonPrt;
|
||||
|
||||
|
||||
//! The class provides Edge/Face algorithm to determine
|
||||
//! common parts between edge and face in 3-d space.
|
||||
//! Common parts can be : Vertices or Edges.
|
||||
class IntTools_EdgeFace
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
|
||||
//! Empty Constructor
|
||||
Standard_EXPORT IntTools_EdgeFace();
|
||||
|
||||
|
||||
//! Initializes algorithm by the edge anEdge
|
||||
Standard_EXPORT void SetEdge (const TopoDS_Edge& anEdge);
|
||||
|
||||
|
||||
//! Initializes algorithm by edge tolerance
|
||||
Standard_EXPORT void SetTolE (const Standard_Real aTolEdge1);
|
||||
|
||||
|
||||
//! Initializes algorithm by the face aFace
|
||||
Standard_EXPORT void SetFace (const TopoDS_Face& aFace);
|
||||
|
||||
|
||||
//! Initializes algorithm by face tolerance
|
||||
Standard_EXPORT void SetTolF (const Standard_Real aTolFace);
|
||||
|
||||
|
||||
//! Returns edge
|
||||
Standard_EXPORT const TopoDS_Edge& Edge() const;
|
||||
|
||||
|
||||
//! Returns face
|
||||
Standard_EXPORT const TopoDS_Face& Face() const;
|
||||
|
||||
|
||||
//! Returns tolerance of the edge
|
||||
Standard_EXPORT Standard_Real TolE() const;
|
||||
|
||||
|
||||
//! Returns tolerance of the face
|
||||
Standard_EXPORT Standard_Real TolF() const;
|
||||
|
||||
|
||||
//! Initializes algorithm by discretization value
|
||||
Standard_EXPORT void SetDiscretize (const Standard_Integer aDiscret);
|
||||
|
||||
|
||||
//! Initializes algorithm by deflection value
|
||||
Standard_EXPORT void SetDeflection (const Standard_Real aDeflection);
|
||||
|
||||
|
||||
//! Initializes algorithm by parameter tolerance
|
||||
Standard_EXPORT void SetEpsilonT (const Standard_Real anEpsT);
|
||||
|
||||
|
||||
//! Initializes algorithm by distance tolerance
|
||||
Standard_EXPORT void SetEpsilonNull (const Standard_Real anEpsNull);
|
||||
|
||||
|
||||
//! Sets boundaries for edge.
|
||||
//! The algorithm processes edge inside these boundaries.
|
||||
Standard_EXPORT void SetRange (const IntTools_Range& aRange);
|
||||
|
||||
|
||||
//! Sets boundaries for edge.
|
||||
//! The algorithm processes edge inside these boundaries.
|
||||
Standard_EXPORT void SetRange (const Standard_Real aFirst, const Standard_Real aLast);
|
||||
|
||||
|
||||
//! Sets the intersecton context
|
||||
Standard_EXPORT void SetContext (const Handle(IntTools_Context)& theContext);
|
||||
|
||||
|
||||
//! Gets the intersecton context
|
||||
Standard_EXPORT const Handle(IntTools_Context)& Context() const;
|
||||
|
||||
|
||||
//! Launches the process
|
||||
Standard_EXPORT void Perform();
|
||||
|
||||
|
||||
//! Returns true if computation was done
|
||||
//! successfully, otherwise returns false
|
||||
Standard_EXPORT Standard_Boolean IsDone() const;
|
||||
|
||||
|
||||
//! Returns code of completion
|
||||
//! 0 - means successful completion
|
||||
//! 1 - the process was not started
|
||||
//! 2,3,4,5 - invalid source data for the algorithm
|
||||
//! 6 - discretization failed
|
||||
//! 7 - no projectable ranges found
|
||||
//! 11 - distance computing error
|
||||
Standard_EXPORT Standard_Integer ErrorStatus() const;
|
||||
|
||||
|
||||
//! Returns results
|
||||
Standard_EXPORT const IntTools_SequenceOfCommonPrts& CommonParts() const;
|
||||
|
||||
|
||||
//! Returns boundaries for edge
|
||||
Standard_EXPORT const IntTools_Range& Range() const;
|
||||
|
||||
Standard_EXPORT static Standard_Boolean IsEqDistance (const gp_Pnt& aP, const BRepAdaptor_Surface& aS, const Standard_Real aT, Standard_Real& aD);
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
Standard_EXPORT void CheckData();
|
||||
|
||||
Standard_EXPORT void Prepare();
|
||||
|
||||
Standard_EXPORT Standard_Boolean IsProjectable (const Standard_Real t) const;
|
||||
|
||||
Standard_EXPORT void FindProjectableRoot (const Standard_Real t1, const Standard_Real t2, const Standard_Integer f1, const Standard_Integer f2, Standard_Real& tRoot);
|
||||
|
||||
Standard_EXPORT Standard_Real DistanceFunction (const Standard_Real t);
|
||||
|
||||
Standard_EXPORT Standard_Real DerivativeFunction (const Standard_Real t);
|
||||
|
||||
Standard_EXPORT void PrepareArgsFuncArrays (const Standard_Real t1, const Standard_Real t2);
|
||||
|
||||
Standard_EXPORT void AddDerivativePoints (const IntTools_CArray1OfReal& t, const IntTools_CArray1OfReal& f);
|
||||
|
||||
Standard_EXPORT Standard_Real FindSimpleRoot (const Standard_Integer IP, const Standard_Real ta, const Standard_Real tb, const Standard_Real fA);
|
||||
|
||||
Standard_EXPORT Standard_Real FindGoldRoot (const Standard_Real ta, const Standard_Real tb, const Standard_Real coeff);
|
||||
|
||||
Standard_EXPORT Standard_Integer MakeType (IntTools_CommonPrt& aCP);
|
||||
|
||||
Standard_EXPORT void IsIntersection (const Standard_Real ta, const Standard_Real tb);
|
||||
|
||||
Standard_EXPORT void FindDerivativeRoot (const IntTools_CArray1OfReal& t, const IntTools_CArray1OfReal& f);
|
||||
|
||||
Standard_EXPORT void RemoveIdenticalRoots();
|
||||
|
||||
Standard_EXPORT Standard_Boolean CheckTouch (const IntTools_CommonPrt& aCP, Standard_Real& aTX);
|
||||
|
||||
Standard_EXPORT Standard_Boolean CheckTouchVertex (const IntTools_CommonPrt& aCP, Standard_Real& aTX);
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
TopoDS_Edge myEdge;
|
||||
TopoDS_Face myFace;
|
||||
Standard_Real myTolE;
|
||||
Standard_Real myTolF;
|
||||
Standard_Integer myDiscret;
|
||||
Standard_Real myEpsT;
|
||||
Standard_Real myEpsNull;
|
||||
Standard_Real myDeflection;
|
||||
BRepAdaptor_Curve myC;
|
||||
Standard_Real myTmin;
|
||||
Standard_Real myTmax;
|
||||
BRepAdaptor_Surface myS;
|
||||
Standard_Real myCriteria;
|
||||
Standard_Boolean myIsDone;
|
||||
Standard_Integer myErrorStatus;
|
||||
Handle(IntTools_Context) myContext;
|
||||
IntTools_SequenceOfRanges myProjectableRanges;
|
||||
IntTools_FClass2d myFClass2d;
|
||||
IntTools_CArray1OfReal myFuncArray;
|
||||
IntTools_CArray1OfReal myArgsArray;
|
||||
IntTools_SequenceOfRoots mySequenceOfRoots;
|
||||
IntTools_SequenceOfCommonPrts mySeqOfCommonPrts;
|
||||
Standard_Real myPar1;
|
||||
Standard_Boolean myParallel;
|
||||
IntTools_Range myRange;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IntTools_EdgeFace_HeaderFile
|
@@ -1,112 +0,0 @@
|
||||
-- Created on: 1995-03-22
|
||||
-- Created by: Laurent BUCHARD
|
||||
-- Copyright (c) 1995-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.
|
||||
|
||||
class FClass2d from IntTools
|
||||
|
||||
---Purpose: Class provides an algorithm to classify a 2d Point
|
||||
--- in 2d space of face using boundaries of the face.
|
||||
|
||||
uses
|
||||
Pnt2d from gp,
|
||||
Face from TopoDS,
|
||||
State from TopAbs,
|
||||
SequenceOfInteger from TColStd,
|
||||
SeqOfPtr from BRepTopAdaptor
|
||||
|
||||
is
|
||||
Create
|
||||
returns FClass2d from IntTools;
|
||||
---Purpose:
|
||||
--- Empty constructor
|
||||
---
|
||||
|
||||
Create( F: Face from TopoDS;
|
||||
Tol: Real from Standard)
|
||||
returns FClass2d from IntTools;
|
||||
---Purpose:
|
||||
--- Initializes algorithm by the face F
|
||||
--- and tolerance Tol
|
||||
---
|
||||
|
||||
Init (me:out;
|
||||
F: Face from TopoDS;
|
||||
Tol: Real from Standard);
|
||||
---Purpose:
|
||||
--- Initializes algorithm by the face F
|
||||
--- and tolerance Tol
|
||||
---
|
||||
|
||||
PerformInfinitePoint(me)
|
||||
returns State from TopAbs;
|
||||
---Purpose:
|
||||
--- Returns state of infinite 2d point relatively to (0, 0)
|
||||
---
|
||||
|
||||
Perform(me;
|
||||
Puv: Pnt2d from gp;
|
||||
RecadreOnPeriodic: Boolean from Standard=Standard_True)
|
||||
returns State from TopAbs;
|
||||
---Purpose:
|
||||
--- Returns state of the 2d point Puv.
|
||||
--- If RecadreOnPeriodic is true (defalut value),
|
||||
--- for the periodic surface 2d point, adjusted to period, is
|
||||
--- classified.
|
||||
---
|
||||
|
||||
Destroy(me: in out);
|
||||
---C++: alias ~
|
||||
---Purpose:
|
||||
--- Destructor
|
||||
---
|
||||
|
||||
|
||||
TestOnRestriction(me;
|
||||
Puv: Pnt2d from gp;
|
||||
Tol: Real from Standard;
|
||||
RecadreOnPeriodic: Boolean from Standard = Standard_True)
|
||||
returns State from TopAbs;
|
||||
---Purpose:
|
||||
--- Test a point with +- an offset (Tol) and returns
|
||||
--- On if some points are OUT an some are IN
|
||||
-- (Caution: Internal use . see the code for more details)
|
||||
---
|
||||
|
||||
--modified by NIZNHY-PKV Mon May 29 10:47:52 2006f
|
||||
IsHole(me)
|
||||
returns Boolean from Standard;
|
||||
--modified by NIZNHY-PKV Mon May 29 10:47:54 2006t
|
||||
|
||||
fields
|
||||
|
||||
TabClass : SeqOfPtr from BRepTopAdaptor;
|
||||
TabOrien : SequenceOfInteger from TColStd;
|
||||
Toluv : Real from Standard;
|
||||
Face : Face from TopoDS;
|
||||
U1 : Real from Standard;
|
||||
V1 : Real from Standard;
|
||||
U2 : Real from Standard;
|
||||
V2 : Real from Standard;
|
||||
|
||||
Umin : Real from Standard;
|
||||
Umax : Real from Standard;
|
||||
Vmin : Real from Standard;
|
||||
Vmax : Real from Standard;
|
||||
--modified by NIZNHY-PKV Mon May 29 10:44:12 2006f
|
||||
myIsHole : Boolean from Standard;
|
||||
--modified by NIZNHY-PKV Mon May 29 10:44:14 2006t
|
||||
|
||||
|
||||
end FClass2d ;
|
@@ -14,39 +14,36 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IntTools_FClass2d.ixx>
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <Precision.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <ElCLib.hxx>
|
||||
|
||||
#include <Geom2dInt_Geom2dCurveTool.hxx>
|
||||
#include <GeomAbs_SurfaceType.hxx>
|
||||
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <BRepTools_WireExplorer.hxx>
|
||||
#include <BRepClass_FaceClassifier.hxx>
|
||||
#include <CSLib_Class2d.hxx>
|
||||
#include <BRepAdaptor_HSurface.hxx>
|
||||
#include <BRepAdaptor_Curve.hxx>
|
||||
#include <BRepAdaptor_Curve2d.hxx>
|
||||
|
||||
#include <BRepAdaptor_HSurface.hxx>
|
||||
#include <BRepClass_FaceClassifier.hxx>
|
||||
#include <BRepTools_WireExplorer.hxx>
|
||||
#include <CSLib_Class2d.hxx>
|
||||
#include <ElCLib.hxx>
|
||||
#include <Geom2dInt_Geom2dCurveTool.hxx>
|
||||
#include <GeomAbs_SurfaceType.hxx>
|
||||
#include <GeomInt.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <IntTools_FClass2d.hxx>
|
||||
#include <IntTools_Tools.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <TColgp_Array1OfPnt2d.hxx>
|
||||
#include <TColgp_SequenceOfPnt2d.hxx>
|
||||
#include <TColgp_SequenceOfVec2d.hxx>
|
||||
#include <TColStd_DataMapOfIntegerInteger.hxx>
|
||||
#include <TopAbs_Orientation.hxx>
|
||||
#include <TopExp.hxx>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopExp.hxx>
|
||||
#include <TopAbs_Orientation.hxx>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <TColgp_SequenceOfPnt2d.hxx>
|
||||
|
||||
#include <TColgp_Array1OfPnt2d.hxx>
|
||||
#include <TopoDS_Face.hxx>
|
||||
#include <TopoDS_Wire.hxx>
|
||||
#include <TColStd_DataMapOfIntegerInteger.hxx>
|
||||
#include <TColgp_SequenceOfVec2d.hxx>
|
||||
#include <IntTools_Tools.hxx>
|
||||
#include <GeomInt.hxx>
|
||||
|
||||
#include <stdio.h>
|
||||
//=======================================================================
|
||||
//function : IntTools_FClass2d:IntTools:_FClass2d
|
||||
//purpose :
|
||||
|
120
src/IntTools/IntTools_FClass2d.hxx
Normal file
120
src/IntTools/IntTools_FClass2d.hxx
Normal file
@@ -0,0 +1,120 @@
|
||||
// Created on: 1995-03-22
|
||||
// Created by: Laurent BUCHARD
|
||||
// Copyright (c) 1995-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 _IntTools_FClass2d_HeaderFile
|
||||
#define _IntTools_FClass2d_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <BRepTopAdaptor_SeqOfPtr.hxx>
|
||||
#include <TColStd_SequenceOfInteger.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <TopoDS_Face.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <TopAbs_State.hxx>
|
||||
class TopoDS_Face;
|
||||
class gp_Pnt2d;
|
||||
|
||||
|
||||
//! Class provides an algorithm to classify a 2d Point
|
||||
//! in 2d space of face using boundaries of the face.
|
||||
class IntTools_FClass2d
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
|
||||
//! Empty constructor
|
||||
Standard_EXPORT IntTools_FClass2d();
|
||||
|
||||
|
||||
//! Initializes algorithm by the face F
|
||||
//! and tolerance Tol
|
||||
Standard_EXPORT IntTools_FClass2d(const TopoDS_Face& F, const Standard_Real Tol);
|
||||
|
||||
|
||||
//! Initializes algorithm by the face F
|
||||
//! and tolerance Tol
|
||||
Standard_EXPORT void Init (const TopoDS_Face& F, const Standard_Real Tol);
|
||||
|
||||
|
||||
//! Returns state of infinite 2d point relatively to (0, 0)
|
||||
Standard_EXPORT TopAbs_State PerformInfinitePoint() const;
|
||||
|
||||
|
||||
//! Returns state of the 2d point Puv.
|
||||
//! If RecadreOnPeriodic is true (defalut value),
|
||||
//! for the periodic surface 2d point, adjusted to period, is
|
||||
//! classified.
|
||||
Standard_EXPORT TopAbs_State Perform (const gp_Pnt2d& Puv, const Standard_Boolean RecadreOnPeriodic = Standard_True) const;
|
||||
|
||||
|
||||
//! Destructor
|
||||
Standard_EXPORT void Destroy();
|
||||
~IntTools_FClass2d()
|
||||
{
|
||||
Destroy();
|
||||
}
|
||||
|
||||
|
||||
//! Test a point with +- an offset (Tol) and returns
|
||||
//! On if some points are OUT an some are IN
|
||||
//! (Caution: Internal use . see the code for more details)
|
||||
Standard_EXPORT TopAbs_State TestOnRestriction (const gp_Pnt2d& Puv, const Standard_Real Tol, const Standard_Boolean RecadreOnPeriodic = Standard_True) const;
|
||||
|
||||
Standard_EXPORT Standard_Boolean IsHole() const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
BRepTopAdaptor_SeqOfPtr TabClass;
|
||||
TColStd_SequenceOfInteger TabOrien;
|
||||
Standard_Real Toluv;
|
||||
TopoDS_Face Face;
|
||||
Standard_Real U1;
|
||||
Standard_Real V1;
|
||||
Standard_Real U2;
|
||||
Standard_Real V2;
|
||||
Standard_Real Umin;
|
||||
Standard_Real Umax;
|
||||
Standard_Real Vmin;
|
||||
Standard_Real Vmax;
|
||||
Standard_Boolean myIsHole;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IntTools_FClass2d_HeaderFile
|
@@ -1,180 +0,0 @@
|
||||
-- Created on: 2000-11-23
|
||||
-- Created by: Michael KLOKOV
|
||||
-- Copyright (c) 2000-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.
|
||||
|
||||
class FaceFace from IntTools
|
||||
|
||||
---Purpose: This class provides the intersection of
|
||||
--- face's underlying surfaces.
|
||||
|
||||
uses
|
||||
|
||||
TopolTool from Adaptor3d,
|
||||
HSurface from GeomAdaptor,
|
||||
ListOfPntOn2S from IntSurf ,
|
||||
Intersection from IntPatch,
|
||||
Face from TopoDS,
|
||||
SequenceOfCurves from IntTools,
|
||||
LineConstructor from GeomInt,
|
||||
SequenceOfPntOn2Faces from IntTools,
|
||||
Context from IntTools
|
||||
|
||||
|
||||
|
||||
raises NotDone from StdFail
|
||||
is
|
||||
|
||||
Create
|
||||
returns FaceFace from IntTools;
|
||||
---Purpose:
|
||||
--- Empty constructor.
|
||||
|
||||
|
||||
SetParameters(me: in out;
|
||||
ApproxCurves : Boolean from Standard;
|
||||
ComputeCurveOnS1: Boolean from Standard;
|
||||
ComputeCurveOnS2: Boolean from Standard;
|
||||
ApproximationTolerance: Real from Standard);
|
||||
---Purpose:
|
||||
--- Modifier
|
||||
---
|
||||
|
||||
Perform(me: in out;
|
||||
F1: Face from TopoDS;
|
||||
F2: Face from TopoDS);
|
||||
---Purpose:
|
||||
--- Intersects underliing surfaces of F1 and F2
|
||||
--- Use sum of tolerance of F1 and F2 as intersection
|
||||
--- criteria
|
||||
|
||||
IsDone(me)
|
||||
returns Boolean from Standard;
|
||||
---Purpose:
|
||||
--- Returns True if the intersection was successful
|
||||
---
|
||||
|
||||
Lines(me)
|
||||
returns SequenceOfCurves from IntTools;
|
||||
---C++: return const&
|
||||
---Purpose:
|
||||
--- Returns sequence of 3d curves as result of intersection
|
||||
---
|
||||
|
||||
Points(me)
|
||||
returns SequenceOfPntOn2Faces from IntTools;
|
||||
---C++: return const&
|
||||
---Purpose:
|
||||
--- Returns sequence of 3d curves as result of intersection
|
||||
---
|
||||
|
||||
TolReached3d(me)
|
||||
returns Real from Standard;
|
||||
---Purpose:
|
||||
--- Returns tolerance reached during approximation.
|
||||
--- If approximation was not done, returns zero.
|
||||
|
||||
TolReached2d(me)
|
||||
returns Real from Standard;
|
||||
---Purpose:
|
||||
--- Returns tolerance reached during approximation.
|
||||
--- If approximation was not done, returns zero.
|
||||
---
|
||||
|
||||
Face1 (me)
|
||||
returns Face from TopoDS;
|
||||
---C++: return const&
|
||||
---Purpose:
|
||||
--- Returns first of processed faces
|
||||
---
|
||||
|
||||
Face2 (me)
|
||||
returns Face from TopoDS;
|
||||
---C++: return const&
|
||||
---Purpose:
|
||||
--- Returns second of processed faces
|
||||
---
|
||||
|
||||
TangentFaces (me)
|
||||
returns Boolean from Standard;
|
||||
---Purpose:
|
||||
--- Returns True if faces are tangent
|
||||
---
|
||||
PrepareLines3D (me:out;
|
||||
bToSplit: Boolean from Standard=Standard_True);
|
||||
---Purpose:
|
||||
--- Provides post-processing the result lines.
|
||||
--- <bToSplit> - the flag.
|
||||
-- In case of <bToSplit> is true the closed 3D-curves will be splitted
|
||||
-- on parts.
|
||||
-- In case of <bToSplit> is false the closed 3D-curves remain untouched.
|
||||
|
||||
SetList (me: in out;
|
||||
ListOfPnts: in out ListOfPntOn2S from IntSurf);
|
||||
|
||||
----------------------------------------------------------
|
||||
-- private block
|
||||
----------------------------------------------------------
|
||||
MakeCurve(me: in out; Index : Integer from Standard;
|
||||
D1 : TopolTool from Adaptor3d;
|
||||
D2 : TopolTool from Adaptor3d)
|
||||
is protected;
|
||||
|
||||
ComputeTolReached3d(me:out)
|
||||
is protected;
|
||||
|
||||
ComputeTolerance(me:out)
|
||||
returns Real from Standard
|
||||
is protected;
|
||||
|
||||
SetContext(me:out;
|
||||
aContext : Context from IntTools);
|
||||
---Purpose:
|
||||
--- Sets the intersecton context
|
||||
|
||||
Context(me)
|
||||
returns Context from IntTools;
|
||||
---C++: return const &
|
||||
---Purpose:
|
||||
--- Gets the intersecton context
|
||||
|
||||
fields
|
||||
|
||||
myIsDone : Boolean from Standard;
|
||||
myIntersector : Intersection from IntPatch;
|
||||
myLConstruct : LineConstructor from GeomInt;
|
||||
myHS1 : HSurface from GeomAdaptor;
|
||||
myHS2 : HSurface from GeomAdaptor;
|
||||
myNbrestr : Integer from Standard;
|
||||
|
||||
myTolReached2d : Real from Standard;
|
||||
myTolReached3d : Real from Standard;
|
||||
|
||||
myApprox : Boolean from Standard;
|
||||
myApprox1 : Boolean from Standard;
|
||||
myApprox2 : Boolean from Standard;
|
||||
myTolApprox : Real from Standard;
|
||||
|
||||
mySeqOfCurve : SequenceOfCurves from IntTools;
|
||||
|
||||
myTangentFaces: Boolean from Standard;
|
||||
myFace1 : Face from TopoDS;
|
||||
myFace2 : Face from TopoDS;
|
||||
myPnts : SequenceOfPntOn2Faces from IntTools;
|
||||
|
||||
myListOfPnts : ListOfPntOn2S from IntSurf;
|
||||
|
||||
myContext : Context from IntTools;
|
||||
|
||||
end FaceFace from IntTools;
|
||||
|
@@ -13,112 +13,95 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IntTools_FaceFace.ixx>
|
||||
|
||||
#include <Precision.hxx>
|
||||
|
||||
#include <TColStd_HArray1OfReal.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
#include <TColStd_Array1OfInteger.hxx>
|
||||
#include <TColStd_SequenceOfReal.hxx>
|
||||
#include <TColStd_ListOfInteger.hxx>
|
||||
#include <TColStd_ListIteratorOfListOfInteger.hxx>
|
||||
#include <TColStd_Array1OfListOfInteger.hxx>
|
||||
|
||||
#include <gp_Lin2d.hxx>
|
||||
#include <gp_Ax22d.hxx>
|
||||
#include <gp_Circ2d.hxx>
|
||||
#include <gp_Torus.hxx>
|
||||
#include <gp_Cylinder.hxx>
|
||||
|
||||
#include <Adaptor2d_HLine2d.hxx>
|
||||
#include <Adaptor3d_SurfacePtr.hxx>
|
||||
#include <Adaptor3d_TopolTool.hxx>
|
||||
#include <Approx_CurveOnSurface.hxx>
|
||||
#include <Bnd_Box.hxx>
|
||||
|
||||
#include <TColgp_HArray1OfPnt2d.hxx>
|
||||
#include <TColgp_SequenceOfPnt2d.hxx>
|
||||
#include <TColgp_Array1OfPnt.hxx>
|
||||
#include <TColgp_Array1OfPnt2d.hxx>
|
||||
|
||||
#include <IntAna_QuadQuadGeo.hxx>
|
||||
|
||||
#include <IntSurf_PntOn2S.hxx>
|
||||
#include <IntSurf_LineOn2S.hxx>
|
||||
#include <IntSurf_PntOn2S.hxx>
|
||||
#include <IntSurf_ListOfPntOn2S.hxx>
|
||||
#include <IntRes2d_Domain.hxx>
|
||||
#include <ProjLib_Plane.hxx>
|
||||
|
||||
#include <IntPatch_GLine.hxx>
|
||||
#include <IntPatch_RLine.hxx>
|
||||
#include <IntPatch_WLine.hxx>
|
||||
#include <IntPatch_ALine.hxx>
|
||||
#include <IntPatch_ALineToWLine.hxx>
|
||||
|
||||
#include <ElSLib.hxx>
|
||||
#include <BndLib_AddSurface.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <BRepAdaptor_Surface.hxx>
|
||||
#include <BRepTools.hxx>
|
||||
#include <ElCLib.hxx>
|
||||
|
||||
#include <ElSLib.hxx>
|
||||
#include <Extrema_ExtCC.hxx>
|
||||
#include <Extrema_POnCurv.hxx>
|
||||
#include <BndLib_AddSurface.hxx>
|
||||
|
||||
#include <Adaptor3d_SurfacePtr.hxx>
|
||||
#include <Adaptor2d_HLine2d.hxx>
|
||||
|
||||
#include <GeomAbs_SurfaceType.hxx>
|
||||
#include <GeomAbs_CurveType.hxx>
|
||||
|
||||
#include <Geom_Surface.hxx>
|
||||
#include <Geom_Line.hxx>
|
||||
#include <Geom_Circle.hxx>
|
||||
#include <Geom_Ellipse.hxx>
|
||||
#include <Geom_Parabola.hxx>
|
||||
#include <Geom_Hyperbola.hxx>
|
||||
#include <Geom_TrimmedCurve.hxx>
|
||||
#include <Geom_BSplineCurve.hxx>
|
||||
#include <Geom_RectangularTrimmedSurface.hxx>
|
||||
#include <Geom_OffsetSurface.hxx>
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <Geom_Conic.hxx>
|
||||
|
||||
#include <Geom2d_TrimmedCurve.hxx>
|
||||
#include <Geom2d_BSplineCurve.hxx>
|
||||
#include <Geom2d_Line.hxx>
|
||||
#include <Geom2d_Curve.hxx>
|
||||
#include <Geom2d_Circle.hxx>
|
||||
|
||||
#include <Geom2d_Curve.hxx>
|
||||
#include <Geom2d_Line.hxx>
|
||||
#include <Geom2d_TrimmedCurve.hxx>
|
||||
#include <Geom2dAdaptor.hxx>
|
||||
#include <Geom2dAdaptor_Curve.hxx>
|
||||
#include <Geom2dAPI_InterCurveCurve.hxx>
|
||||
#include <Geom2dInt_GInter.hxx>
|
||||
#include <Geom2dAdaptor.hxx>
|
||||
#include <Geom_BSplineCurve.hxx>
|
||||
#include <Geom_Circle.hxx>
|
||||
#include <Geom_Conic.hxx>
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <Geom_Ellipse.hxx>
|
||||
#include <Geom_Hyperbola.hxx>
|
||||
#include <Geom_Line.hxx>
|
||||
#include <Geom_OffsetSurface.hxx>
|
||||
#include <Geom_Parabola.hxx>
|
||||
#include <Geom_RectangularTrimmedSurface.hxx>
|
||||
#include <Geom_Surface.hxx>
|
||||
#include <Geom_TrimmedCurve.hxx>
|
||||
#include <GeomAbs_CurveType.hxx>
|
||||
#include <GeomAbs_SurfaceType.hxx>
|
||||
#include <GeomAdaptor.hxx>
|
||||
#include <GeomAdaptor_Curve.hxx>
|
||||
#include <GeomAdaptor_HSurface.hxx>
|
||||
#include <GeomAdaptor_Surface.hxx>
|
||||
#include <GeomLib_CheckBSplineCurve.hxx>
|
||||
#include <GeomLib_Check2dBSplineCurve.hxx>
|
||||
|
||||
#include <GeomInt_WLApprox.hxx>
|
||||
#include <GeomProjLib.hxx>
|
||||
#include <GeomAPI_ProjectPointOnSurf.hxx>
|
||||
#include <Geom2dAdaptor_Curve.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <BRepTools.hxx>
|
||||
#include <BRepAdaptor_Surface.hxx>
|
||||
|
||||
#include <GeomInt.hxx>
|
||||
#include <GeomInt_IntSS.hxx>
|
||||
#include <GeomInt_WLApprox.hxx>
|
||||
#include <GeomLib_Check2dBSplineCurve.hxx>
|
||||
#include <GeomLib_CheckBSplineCurve.hxx>
|
||||
#include <GeomProjLib.hxx>
|
||||
#include <gp_Ax22d.hxx>
|
||||
#include <gp_Circ2d.hxx>
|
||||
#include <gp_Cylinder.hxx>
|
||||
#include <gp_Lin2d.hxx>
|
||||
#include <gp_Torus.hxx>
|
||||
#include <IntAna_QuadQuadGeo.hxx>
|
||||
#include <IntPatch_ALine.hxx>
|
||||
#include <IntPatch_ALineToWLine.hxx>
|
||||
#include <IntPatch_GLine.hxx>
|
||||
#include <IntPatch_RLine.hxx>
|
||||
#include <IntPatch_WLine.hxx>
|
||||
#include <IntRes2d_Domain.hxx>
|
||||
#include <IntSurf_LineOn2S.hxx>
|
||||
#include <IntSurf_ListIteratorOfListOfPntOn2S.hxx>
|
||||
#include <IntSurf_ListOfPntOn2S.hxx>
|
||||
#include <IntSurf_PntOn2S.hxx>
|
||||
#include <IntTools_Context.hxx>
|
||||
#include <IntTools_Curve.hxx>
|
||||
#include <IntTools_Tools.hxx>
|
||||
#include <IntTools_FaceFace.hxx>
|
||||
#include <IntTools_PntOn2Faces.hxx>
|
||||
#include <IntTools_PntOnFace.hxx>
|
||||
#include <IntTools_Tools.hxx>
|
||||
#include <IntTools_TopolTool.hxx>
|
||||
#include <IntTools_PntOnFace.hxx>
|
||||
#include <IntTools_PntOn2Faces.hxx>
|
||||
#include <IntTools_Context.hxx>
|
||||
#include <IntSurf_ListIteratorOfListOfPntOn2S.hxx>
|
||||
#include <GeomInt.hxx>
|
||||
|
||||
#include <Approx_CurveOnSurface.hxx>
|
||||
#include <GeomAdaptor.hxx>
|
||||
#include <GeomInt_IntSS.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <ProjLib_Plane.hxx>
|
||||
#include <StdFail_NotDone.hxx>
|
||||
#include <TColgp_Array1OfPnt.hxx>
|
||||
#include <TColgp_Array1OfPnt2d.hxx>
|
||||
#include <TColgp_HArray1OfPnt2d.hxx>
|
||||
#include <TColgp_SequenceOfPnt2d.hxx>
|
||||
#include <TColStd_Array1OfInteger.hxx>
|
||||
#include <TColStd_Array1OfListOfInteger.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
#include <TColStd_HArray1OfReal.hxx>
|
||||
#include <TColStd_ListIteratorOfListOfInteger.hxx>
|
||||
#include <TColStd_ListOfInteger.hxx>
|
||||
#include <TColStd_SequenceOfReal.hxx>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS_Face.hxx>
|
||||
|
||||
static
|
||||
void RefineVector(gp_Vec2d& aV2D);
|
||||
|
162
src/IntTools/IntTools_FaceFace.hxx
Normal file
162
src/IntTools/IntTools_FaceFace.hxx
Normal file
@@ -0,0 +1,162 @@
|
||||
// Created on: 2000-11-23
|
||||
// Created by: Michael KLOKOV
|
||||
// Copyright (c) 2000-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 _IntTools_FaceFace_HeaderFile
|
||||
#define _IntTools_FaceFace_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <IntPatch_Intersection.hxx>
|
||||
#include <GeomInt_LineConstructor.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <IntTools_SequenceOfCurves.hxx>
|
||||
#include <TopoDS_Face.hxx>
|
||||
#include <IntTools_SequenceOfPntOn2Faces.hxx>
|
||||
#include <IntSurf_ListOfPntOn2S.hxx>
|
||||
class GeomAdaptor_HSurface;
|
||||
class IntTools_Context;
|
||||
class StdFail_NotDone;
|
||||
class TopoDS_Face;
|
||||
class Adaptor3d_TopolTool;
|
||||
|
||||
|
||||
//! This class provides the intersection of
|
||||
//! face's underlying surfaces.
|
||||
class IntTools_FaceFace
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
|
||||
//! Empty constructor.
|
||||
Standard_EXPORT IntTools_FaceFace();
|
||||
|
||||
|
||||
//! Modifier
|
||||
Standard_EXPORT void SetParameters (const Standard_Boolean ApproxCurves, const Standard_Boolean ComputeCurveOnS1, const Standard_Boolean ComputeCurveOnS2, const Standard_Real ApproximationTolerance);
|
||||
|
||||
|
||||
//! Intersects underliing surfaces of F1 and F2
|
||||
//! Use sum of tolerance of F1 and F2 as intersection
|
||||
//! criteria
|
||||
Standard_EXPORT void Perform (const TopoDS_Face& F1, const TopoDS_Face& F2);
|
||||
|
||||
|
||||
//! Returns True if the intersection was successful
|
||||
Standard_EXPORT Standard_Boolean IsDone() const;
|
||||
|
||||
|
||||
//! Returns sequence of 3d curves as result of intersection
|
||||
Standard_EXPORT const IntTools_SequenceOfCurves& Lines() const;
|
||||
|
||||
|
||||
//! Returns sequence of 3d curves as result of intersection
|
||||
Standard_EXPORT const IntTools_SequenceOfPntOn2Faces& Points() const;
|
||||
|
||||
|
||||
//! Returns tolerance reached during approximation.
|
||||
//! If approximation was not done, returns zero.
|
||||
Standard_EXPORT Standard_Real TolReached3d() const;
|
||||
|
||||
|
||||
//! Returns tolerance reached during approximation.
|
||||
//! If approximation was not done, returns zero.
|
||||
Standard_EXPORT Standard_Real TolReached2d() const;
|
||||
|
||||
|
||||
//! Returns first of processed faces
|
||||
Standard_EXPORT const TopoDS_Face& Face1() const;
|
||||
|
||||
|
||||
//! Returns second of processed faces
|
||||
Standard_EXPORT const TopoDS_Face& Face2() const;
|
||||
|
||||
|
||||
//! Returns True if faces are tangent
|
||||
Standard_EXPORT Standard_Boolean TangentFaces() const;
|
||||
|
||||
|
||||
//! Provides post-processing the result lines.
|
||||
//! <bToSplit> - the flag.
|
||||
//! In case of <bToSplit> is true the closed 3D-curves will be splitted
|
||||
//! on parts.
|
||||
//! In case of <bToSplit> is false the closed 3D-curves remain untouched.
|
||||
Standard_EXPORT void PrepareLines3D (const Standard_Boolean bToSplit = Standard_True);
|
||||
|
||||
Standard_EXPORT void SetList (IntSurf_ListOfPntOn2S& ListOfPnts);
|
||||
|
||||
|
||||
//! Sets the intersecton context
|
||||
Standard_EXPORT void SetContext (const Handle(IntTools_Context)& aContext);
|
||||
|
||||
|
||||
//! Gets the intersecton context
|
||||
Standard_EXPORT const Handle(IntTools_Context)& Context() const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
Standard_EXPORT void MakeCurve (const Standard_Integer Index, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_TopolTool)& D2);
|
||||
|
||||
Standard_EXPORT void ComputeTolReached3d();
|
||||
|
||||
Standard_EXPORT Standard_Real ComputeTolerance();
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Standard_Boolean myIsDone;
|
||||
IntPatch_Intersection myIntersector;
|
||||
GeomInt_LineConstructor myLConstruct;
|
||||
Handle(GeomAdaptor_HSurface) myHS1;
|
||||
Handle(GeomAdaptor_HSurface) myHS2;
|
||||
Standard_Integer myNbrestr;
|
||||
Standard_Real myTolReached2d;
|
||||
Standard_Real myTolReached3d;
|
||||
Standard_Boolean myApprox;
|
||||
Standard_Boolean myApprox1;
|
||||
Standard_Boolean myApprox2;
|
||||
Standard_Real myTolApprox;
|
||||
IntTools_SequenceOfCurves mySeqOfCurve;
|
||||
Standard_Boolean myTangentFaces;
|
||||
TopoDS_Face myFace1;
|
||||
TopoDS_Face myFace2;
|
||||
IntTools_SequenceOfPntOn2Faces myPnts;
|
||||
IntSurf_ListOfPntOn2S myListOfPnts;
|
||||
Handle(IntTools_Context) myContext;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IntTools_FaceFace_HeaderFile
|
@@ -1,169 +0,0 @@
|
||||
-- Created on: 2001-09-26
|
||||
-- Created by: Michael KLOKOV
|
||||
-- Copyright (c) 2001-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.
|
||||
|
||||
class MarkedRangeSet from IntTools
|
||||
|
||||
---Purpose: class MarkedRangeSet provides continuous set of ranges marked with flags
|
||||
|
||||
uses
|
||||
SequenceOfInteger from TColStd,
|
||||
CArray1OfReal from IntTools,
|
||||
SequenceOfReal from TColStd,
|
||||
Range from IntTools
|
||||
|
||||
is
|
||||
Create returns MarkedRangeSet from IntTools;
|
||||
---Purpose:
|
||||
--- Empty constructor
|
||||
---
|
||||
|
||||
Create(theFirstBoundary, theLastBoundary: Real from Standard;
|
||||
theInitFlag: Integer from Standard) returns MarkedRangeSet from IntTools;
|
||||
---Purpose:
|
||||
--- build set of ranges which consists of one range with
|
||||
--- boundary values theFirstBoundary and theLastBoundary
|
||||
---
|
||||
|
||||
Create(theSortedArray: CArray1OfReal from IntTools;
|
||||
theInitFlag: Integer from Standard) returns MarkedRangeSet from IntTools;
|
||||
---Purpose:
|
||||
--- Build set of ranges based on the array of progressive sorted values
|
||||
---
|
||||
-- Warning:
|
||||
--- The constructor do not check if the values of array are not sorted
|
||||
--- It should be checked before function invocation
|
||||
---
|
||||
|
||||
SetBoundaries(me: in out; theFirstBoundary, theLastBoundary: Real from Standard;
|
||||
theInitFlag: Integer from Standard);
|
||||
---Purpose:
|
||||
--- build set of ranges which consists of one range with
|
||||
--- boundary values theFirstBoundary and theLastBoundary
|
||||
---
|
||||
|
||||
SetRanges(me: in out; theSortedArray: CArray1OfReal from IntTools;
|
||||
theInitFlag: Integer from Standard);
|
||||
---Purpose:
|
||||
--- Build set of ranges based on the array of progressive sorted values
|
||||
---
|
||||
-- Warning:
|
||||
--- The function do not check if the values of array are not sorted
|
||||
--- It should be checked before function invocation
|
||||
---
|
||||
|
||||
InsertRange(me: in out; theFirstBoundary, theLastBoundary: Real from Standard;
|
||||
theFlag: Integer from Standard)
|
||||
returns Boolean from Standard;
|
||||
---Purpose:
|
||||
--- Inserts a new range marked with flag theFlag
|
||||
--- It replace the existing ranges or parts of ranges
|
||||
--- and their flags.
|
||||
--- Returns True if the range is inside the initial boundaries,
|
||||
--- otherwise or in case of some error returns False
|
||||
---
|
||||
|
||||
InsertRange(me: in out; theRange: Range from IntTools;
|
||||
theFlag: Integer from Standard)
|
||||
returns Boolean from Standard;
|
||||
---Purpose:
|
||||
--- Inserts a new range marked with flag theFlag
|
||||
--- It replace the existing ranges or parts of ranges
|
||||
--- and their flags.
|
||||
--- Returns True if the range is inside the initial boundaries,
|
||||
--- otherwise or in case of some error returns False
|
||||
---
|
||||
|
||||
InsertRange(me: in out; theFirstBoundary, theLastBoundary: Real from Standard;
|
||||
theFlag: Integer from Standard;
|
||||
theIndex: Integer from Standard)
|
||||
returns Boolean from Standard;
|
||||
---Purpose:
|
||||
--- Inserts a new range marked with flag theFlag
|
||||
--- It replace the existing ranges or parts of ranges
|
||||
--- and their flags.
|
||||
--- The index theIndex is a position where the range will be inserted.
|
||||
--- Returns True if the range is inside the initial boundaries,
|
||||
--- otherwise or in case of some error returns False
|
||||
---
|
||||
|
||||
InsertRange(me: in out; theRange: Range from IntTools;
|
||||
theFlag: Integer from Standard;
|
||||
theIndex: Integer from Standard)
|
||||
returns Boolean from Standard;
|
||||
---Purpose:
|
||||
--- Inserts a new range marked with flag theFlag
|
||||
--- It replace the existing ranges or parts of ranges
|
||||
--- and their flags.
|
||||
--- The index theIndex is a position where the range will be inserted.
|
||||
--- Returns True if the range is inside the initial boundaries,
|
||||
--- otherwise or in case of some error returns False
|
||||
---
|
||||
|
||||
SetFlag(me: in out; theIndex: Integer from Standard;
|
||||
theFlag: Integer from Standard);
|
||||
---Purpose:
|
||||
--- Set flag theFlag for range with index theIndex
|
||||
---
|
||||
|
||||
Flag(me; theIndex: Integer from Standard)
|
||||
returns Integer from Standard;
|
||||
---Purpose:
|
||||
--- Returns flag of the range with index theIndex
|
||||
---
|
||||
|
||||
GetIndex(me; theValue: Real from Standard)
|
||||
returns Integer from Standard;
|
||||
---Purpose:
|
||||
--- Returns index of range which contains theValue.
|
||||
--- If theValue do not belong any range returns 0.
|
||||
---
|
||||
|
||||
GetIndices(me: in out; theValue: Real from Standard)
|
||||
returns SequenceOfInteger from TColStd;
|
||||
---C++: return const &
|
||||
|
||||
|
||||
GetIndex(me; theValue: Real from Standard;
|
||||
UseLower : Boolean from Standard)
|
||||
returns Integer from Standard;
|
||||
---Purpose:
|
||||
--- Returns index of range which contains theValue
|
||||
--- If theValue do not belong any range returns 0.
|
||||
--- If UseLower is Standard_True then lower boundary of the range
|
||||
--- can be equal to theValue, otherwise upper boundary of the range
|
||||
--- can be equal to theValue.
|
||||
---
|
||||
|
||||
Length(me)
|
||||
returns Integer from Standard;
|
||||
---C++: inline
|
||||
---Purpose:
|
||||
--- Returns number of ranges
|
||||
---
|
||||
|
||||
Range(me; theIndex: Integer from Standard)
|
||||
returns Range from IntTools;
|
||||
---Purpose:
|
||||
--- Returns the range with index theIndex.
|
||||
--- the Index can be from 1 to Length()
|
||||
---
|
||||
|
||||
fields
|
||||
myRangeSetStorer : SequenceOfReal from TColStd;
|
||||
myRangeNumber : Integer from Standard;
|
||||
myFlags : SequenceOfInteger from TColStd;
|
||||
myFoundIndices : SequenceOfInteger from TColStd;
|
||||
|
||||
end MarkedRangeSet from IntTools;
|
@@ -11,7 +11,10 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IntTools_MarkedRangeSet.ixx>
|
||||
|
||||
#include <IntTools_CArray1OfReal.hxx>
|
||||
#include <IntTools_MarkedRangeSet.hxx>
|
||||
#include <IntTools_Range.hxx>
|
||||
|
||||
IntTools_MarkedRangeSet::IntTools_MarkedRangeSet() :
|
||||
myRangeNumber(0)
|
||||
|
164
src/IntTools/IntTools_MarkedRangeSet.hxx
Normal file
164
src/IntTools/IntTools_MarkedRangeSet.hxx
Normal file
@@ -0,0 +1,164 @@
|
||||
// Created on: 2001-09-26
|
||||
// Created by: Michael KLOKOV
|
||||
// Copyright (c) 2001-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 _IntTools_MarkedRangeSet_HeaderFile
|
||||
#define _IntTools_MarkedRangeSet_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <TColStd_SequenceOfReal.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <TColStd_SequenceOfInteger.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class IntTools_CArray1OfReal;
|
||||
class IntTools_Range;
|
||||
|
||||
|
||||
//! class MarkedRangeSet provides continuous set of ranges marked with flags
|
||||
class IntTools_MarkedRangeSet
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
|
||||
//! Empty constructor
|
||||
Standard_EXPORT IntTools_MarkedRangeSet();
|
||||
|
||||
|
||||
//! build set of ranges which consists of one range with
|
||||
//! boundary values theFirstBoundary and theLastBoundary
|
||||
Standard_EXPORT IntTools_MarkedRangeSet(const Standard_Real theFirstBoundary, const Standard_Real theLastBoundary, const Standard_Integer theInitFlag);
|
||||
|
||||
|
||||
//! Build set of ranges based on the array of progressive sorted values
|
||||
//!
|
||||
//! Warning:
|
||||
//! The constructor do not check if the values of array are not sorted
|
||||
//! It should be checked before function invocation
|
||||
Standard_EXPORT IntTools_MarkedRangeSet(const IntTools_CArray1OfReal& theSortedArray, const Standard_Integer theInitFlag);
|
||||
|
||||
|
||||
//! build set of ranges which consists of one range with
|
||||
//! boundary values theFirstBoundary and theLastBoundary
|
||||
Standard_EXPORT void SetBoundaries (const Standard_Real theFirstBoundary, const Standard_Real theLastBoundary, const Standard_Integer theInitFlag);
|
||||
|
||||
|
||||
//! Build set of ranges based on the array of progressive sorted values
|
||||
//!
|
||||
//! Warning:
|
||||
//! The function do not check if the values of array are not sorted
|
||||
//! It should be checked before function invocation
|
||||
Standard_EXPORT void SetRanges (const IntTools_CArray1OfReal& theSortedArray, const Standard_Integer theInitFlag);
|
||||
|
||||
|
||||
//! Inserts a new range marked with flag theFlag
|
||||
//! It replace the existing ranges or parts of ranges
|
||||
//! and their flags.
|
||||
//! Returns True if the range is inside the initial boundaries,
|
||||
//! otherwise or in case of some error returns False
|
||||
Standard_EXPORT Standard_Boolean InsertRange (const Standard_Real theFirstBoundary, const Standard_Real theLastBoundary, const Standard_Integer theFlag);
|
||||
|
||||
|
||||
//! Inserts a new range marked with flag theFlag
|
||||
//! It replace the existing ranges or parts of ranges
|
||||
//! and their flags.
|
||||
//! Returns True if the range is inside the initial boundaries,
|
||||
//! otherwise or in case of some error returns False
|
||||
Standard_EXPORT Standard_Boolean InsertRange (const IntTools_Range& theRange, const Standard_Integer theFlag);
|
||||
|
||||
|
||||
//! Inserts a new range marked with flag theFlag
|
||||
//! It replace the existing ranges or parts of ranges
|
||||
//! and their flags.
|
||||
//! The index theIndex is a position where the range will be inserted.
|
||||
//! Returns True if the range is inside the initial boundaries,
|
||||
//! otherwise or in case of some error returns False
|
||||
Standard_EXPORT Standard_Boolean InsertRange (const Standard_Real theFirstBoundary, const Standard_Real theLastBoundary, const Standard_Integer theFlag, const Standard_Integer theIndex);
|
||||
|
||||
|
||||
//! Inserts a new range marked with flag theFlag
|
||||
//! It replace the existing ranges or parts of ranges
|
||||
//! and their flags.
|
||||
//! The index theIndex is a position where the range will be inserted.
|
||||
//! Returns True if the range is inside the initial boundaries,
|
||||
//! otherwise or in case of some error returns False
|
||||
Standard_EXPORT Standard_Boolean InsertRange (const IntTools_Range& theRange, const Standard_Integer theFlag, const Standard_Integer theIndex);
|
||||
|
||||
|
||||
//! Set flag theFlag for range with index theIndex
|
||||
Standard_EXPORT void SetFlag (const Standard_Integer theIndex, const Standard_Integer theFlag);
|
||||
|
||||
|
||||
//! Returns flag of the range with index theIndex
|
||||
Standard_EXPORT Standard_Integer Flag (const Standard_Integer theIndex) const;
|
||||
|
||||
|
||||
//! Returns index of range which contains theValue.
|
||||
//! If theValue do not belong any range returns 0.
|
||||
Standard_EXPORT Standard_Integer GetIndex (const Standard_Real theValue) const;
|
||||
|
||||
Standard_EXPORT const TColStd_SequenceOfInteger& GetIndices (const Standard_Real theValue);
|
||||
|
||||
|
||||
//! Returns index of range which contains theValue
|
||||
//! If theValue do not belong any range returns 0.
|
||||
//! If UseLower is Standard_True then lower boundary of the range
|
||||
//! can be equal to theValue, otherwise upper boundary of the range
|
||||
//! can be equal to theValue.
|
||||
Standard_EXPORT Standard_Integer GetIndex (const Standard_Real theValue, const Standard_Boolean UseLower) const;
|
||||
|
||||
|
||||
//! Returns number of ranges
|
||||
Standard_Integer Length() const;
|
||||
|
||||
|
||||
//! Returns the range with index theIndex.
|
||||
//! the Index can be from 1 to Length()
|
||||
Standard_EXPORT IntTools_Range Range (const Standard_Integer theIndex) const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
TColStd_SequenceOfReal myRangeSetStorer;
|
||||
Standard_Integer myRangeNumber;
|
||||
TColStd_SequenceOfInteger myFlags;
|
||||
TColStd_SequenceOfInteger myFoundIndices;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <IntTools_MarkedRangeSet.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IntTools_MarkedRangeSet_HeaderFile
|
@@ -1,82 +0,0 @@
|
||||
-- Created on: 2001-12-13
|
||||
-- Created by: Peter KURNEV
|
||||
-- Copyright (c) 2001-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.
|
||||
|
||||
class PntOn2Faces from IntTools
|
||||
|
||||
---Purpose: Contains two points PntOnFace from IntTools and a flag
|
||||
|
||||
uses
|
||||
PntOnFace from IntTools
|
||||
---raises
|
||||
|
||||
is
|
||||
Create
|
||||
returns PntOn2Faces from IntTools;
|
||||
---Purpose:
|
||||
--- Empty constructor
|
||||
---
|
||||
|
||||
Create(aP1: PntOnFace from IntTools;
|
||||
aP2: PntOnFace from IntTools);
|
||||
---Purpose:
|
||||
--- Initializes me by two points aP1 and aP2
|
||||
---
|
||||
|
||||
SetP1 (me:out;
|
||||
aP1: PntOnFace from IntTools);
|
||||
---Purpose:
|
||||
--- Modifier
|
||||
---
|
||||
|
||||
SetP2 (me:out;
|
||||
aP2: PntOnFace from IntTools);
|
||||
---Purpose:
|
||||
--- Modifier
|
||||
---
|
||||
|
||||
SetValid(me:out;
|
||||
bF : Boolean from Standard);
|
||||
---Purpose:
|
||||
--- Modifier
|
||||
---
|
||||
|
||||
P1(me)
|
||||
returns PntOnFace from IntTools;
|
||||
---C++: return const &
|
||||
---Purpose:
|
||||
--- Selector
|
||||
---
|
||||
|
||||
P2(me)
|
||||
returns PntOnFace from IntTools;
|
||||
---C++: return const &
|
||||
---Purpose:
|
||||
--- Selector
|
||||
---
|
||||
|
||||
IsValid(me)
|
||||
returns Boolean from Standard;
|
||||
---Purpose:
|
||||
--- Selector
|
||||
---
|
||||
|
||||
fields
|
||||
|
||||
myIsValid : Boolean from Standard;
|
||||
myPnt1 : PntOnFace from IntTools;
|
||||
myPnt2 : PntOnFace from IntTools;
|
||||
|
||||
|
||||
end PntOn2Faces;
|
@@ -13,7 +13,9 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IntTools_PntOn2Faces.ixx>
|
||||
|
||||
#include <IntTools_PntOn2Faces.hxx>
|
||||
#include <IntTools_PntOnFace.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : IntTools_PntOn2Faces::IntTools_PntOn2Faces
|
||||
|
94
src/IntTools/IntTools_PntOn2Faces.hxx
Normal file
94
src/IntTools/IntTools_PntOn2Faces.hxx
Normal file
@@ -0,0 +1,94 @@
|
||||
// Created on: 2001-12-13
|
||||
// Created by: Peter KURNEV
|
||||
// Copyright (c) 2001-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 _IntTools_PntOn2Faces_HeaderFile
|
||||
#define _IntTools_PntOn2Faces_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <IntTools_PntOnFace.hxx>
|
||||
class IntTools_PntOnFace;
|
||||
|
||||
|
||||
//! Contains two points PntOnFace from IntTools and a flag
|
||||
class IntTools_PntOn2Faces
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
|
||||
//! Empty constructor
|
||||
Standard_EXPORT IntTools_PntOn2Faces();
|
||||
|
||||
|
||||
//! Initializes me by two points aP1 and aP2
|
||||
Standard_EXPORT IntTools_PntOn2Faces(const IntTools_PntOnFace& aP1, const IntTools_PntOnFace& aP2);
|
||||
|
||||
|
||||
//! Modifier
|
||||
Standard_EXPORT void SetP1 (const IntTools_PntOnFace& aP1);
|
||||
|
||||
|
||||
//! Modifier
|
||||
Standard_EXPORT void SetP2 (const IntTools_PntOnFace& aP2);
|
||||
|
||||
|
||||
//! Modifier
|
||||
Standard_EXPORT void SetValid (const Standard_Boolean bF);
|
||||
|
||||
|
||||
//! Selector
|
||||
Standard_EXPORT const IntTools_PntOnFace& P1() const;
|
||||
|
||||
|
||||
//! Selector
|
||||
Standard_EXPORT const IntTools_PntOnFace& P2() const;
|
||||
|
||||
|
||||
//! Selector
|
||||
Standard_EXPORT Standard_Boolean IsValid() const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Standard_Boolean myIsValid;
|
||||
IntTools_PntOnFace myPnt1;
|
||||
IntTools_PntOnFace myPnt2;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IntTools_PntOn2Faces_HeaderFile
|
@@ -1,106 +0,0 @@
|
||||
-- Created on: 2001-12-13
|
||||
-- Created by: Peter KURNEV
|
||||
-- Copyright (c) 2001-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.
|
||||
|
||||
class PntOnFace from IntTools
|
||||
|
||||
---Purpose: Contains a Face, a 3d point, corresponded UV parameters and a flag
|
||||
|
||||
uses
|
||||
Face from TopoDS,
|
||||
Pnt from gp
|
||||
--raises
|
||||
|
||||
is
|
||||
Create
|
||||
returns PntOnFace from IntTools;
|
||||
---Purpose:
|
||||
--- Empty constructor
|
||||
---
|
||||
|
||||
Init(me:out;
|
||||
aF: Face from TopoDS;
|
||||
aP: Pnt from gp;
|
||||
U : Real from Standard;
|
||||
V : Real from Standard);
|
||||
---Purpose:
|
||||
--- Initializes me by aFace, a 3d point
|
||||
--- and it's UV parameters on face
|
||||
---
|
||||
|
||||
SetFace(me:out;
|
||||
aF:Face from TopoDS);
|
||||
---Purpose:
|
||||
--- Modifier
|
||||
---
|
||||
|
||||
SetPnt (me:out;
|
||||
aP:Pnt from gp);
|
||||
---Purpose:
|
||||
--- Modifier
|
||||
---
|
||||
|
||||
SetParameters (me:out;
|
||||
U : Real from Standard;
|
||||
V : Real from Standard);
|
||||
---Purpose:
|
||||
--- Modifier
|
||||
---
|
||||
|
||||
SetValid(me:out;
|
||||
bF : Boolean from Standard);
|
||||
---Purpose:
|
||||
--- Modifier
|
||||
---
|
||||
|
||||
Valid(me)
|
||||
returns Boolean from Standard;
|
||||
---Purpose:
|
||||
--- Selector
|
||||
---
|
||||
|
||||
Face(me)
|
||||
returns Face from TopoDS;
|
||||
---C++: return const &
|
||||
---Purpose:
|
||||
--- Selector
|
||||
---
|
||||
|
||||
Pnt (me)
|
||||
returns Pnt from gp;
|
||||
---C++: return const &
|
||||
---Purpose:
|
||||
--- Selector
|
||||
---
|
||||
|
||||
Parameters (me;
|
||||
U :out Real from Standard;
|
||||
V :out Real from Standard);
|
||||
---Purpose:
|
||||
--- Selector
|
||||
---
|
||||
|
||||
IsValid(me)
|
||||
returns Boolean from Standard;
|
||||
---Purpose:
|
||||
--- Selector
|
||||
|
||||
fields
|
||||
|
||||
myIsValid : Boolean from Standard;
|
||||
myPnt : Pnt from gp;
|
||||
myU : Real from Standard;
|
||||
myV : Real from Standard;
|
||||
myFace: Face from TopoDS;
|
||||
end PntOnFace;
|
@@ -13,7 +13,11 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IntTools_PntOnFace.ixx>
|
||||
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <IntTools_PntOnFace.hxx>
|
||||
#include <TopoDS_Face.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : IntTools_PntOnFace::IntTools_PntOnFace
|
||||
//purpose :
|
||||
|
112
src/IntTools/IntTools_PntOnFace.hxx
Normal file
112
src/IntTools/IntTools_PntOnFace.hxx
Normal file
@@ -0,0 +1,112 @@
|
||||
// Created on: 2001-12-13
|
||||
// Created by: Peter KURNEV
|
||||
// Copyright (c) 2001-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 _IntTools_PntOnFace_HeaderFile
|
||||
#define _IntTools_PntOnFace_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <TopoDS_Face.hxx>
|
||||
class TopoDS_Face;
|
||||
class gp_Pnt;
|
||||
|
||||
|
||||
//! Contains a Face, a 3d point, corresponded UV parameters and a flag
|
||||
class IntTools_PntOnFace
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
|
||||
//! Empty constructor
|
||||
Standard_EXPORT IntTools_PntOnFace();
|
||||
|
||||
|
||||
//! Initializes me by aFace, a 3d point
|
||||
//! and it's UV parameters on face
|
||||
Standard_EXPORT void Init (const TopoDS_Face& aF, const gp_Pnt& aP, const Standard_Real U, const Standard_Real V);
|
||||
|
||||
|
||||
//! Modifier
|
||||
Standard_EXPORT void SetFace (const TopoDS_Face& aF);
|
||||
|
||||
|
||||
//! Modifier
|
||||
Standard_EXPORT void SetPnt (const gp_Pnt& aP);
|
||||
|
||||
|
||||
//! Modifier
|
||||
Standard_EXPORT void SetParameters (const Standard_Real U, const Standard_Real V);
|
||||
|
||||
|
||||
//! Modifier
|
||||
Standard_EXPORT void SetValid (const Standard_Boolean bF);
|
||||
|
||||
|
||||
//! Selector
|
||||
Standard_EXPORT Standard_Boolean Valid() const;
|
||||
|
||||
|
||||
//! Selector
|
||||
Standard_EXPORT const TopoDS_Face& Face() const;
|
||||
|
||||
|
||||
//! Selector
|
||||
Standard_EXPORT const gp_Pnt& Pnt() const;
|
||||
|
||||
|
||||
//! Selector
|
||||
Standard_EXPORT void Parameters (Standard_Real& U, Standard_Real& V) const;
|
||||
|
||||
|
||||
//! Selector
|
||||
Standard_EXPORT Standard_Boolean IsValid() const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Standard_Boolean myIsValid;
|
||||
gp_Pnt myPnt;
|
||||
Standard_Real myU;
|
||||
Standard_Real myV;
|
||||
TopoDS_Face myFace;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IntTools_PntOnFace_HeaderFile
|
@@ -1,66 +0,0 @@
|
||||
-- Created on: 2000-05-18
|
||||
-- Created by: Peter KURNEV
|
||||
-- Copyright (c) 2000-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.
|
||||
|
||||
class Range from IntTools
|
||||
|
||||
---Purpose: The class describes the 1-d range
|
||||
-- [myFirst, myLast].
|
||||
|
||||
--uses
|
||||
is
|
||||
Create
|
||||
returns Range from IntTools ;
|
||||
---Purpose:
|
||||
--- Empty constructor
|
||||
---
|
||||
|
||||
Create (aFirst:Real from Standard; aLast:Real from Standard)
|
||||
returns Range from IntTools ;
|
||||
---Purpose:
|
||||
--- Initialize me by range boundaries
|
||||
---
|
||||
|
||||
SetFirst(me:out; aFirst:Real from Standard);
|
||||
---Purpose:
|
||||
--- Modifier
|
||||
---
|
||||
|
||||
SetLast (me:out; aLast:Real from Standard);
|
||||
---Purpose:
|
||||
--- Modifier
|
||||
---
|
||||
|
||||
First (me)
|
||||
returns Real from Standard;
|
||||
---Purpose:
|
||||
--- Selector
|
||||
---
|
||||
|
||||
Last (me)
|
||||
returns Real from Standard;
|
||||
---Purpose:
|
||||
--- Selector
|
||||
---
|
||||
|
||||
Range (me; aFirst:out Real from Standard;
|
||||
aLast :out Real from Standard);
|
||||
---Purpose:
|
||||
--- Selector
|
||||
---
|
||||
|
||||
fields
|
||||
myFirst: Real from Standard;
|
||||
myLast : Real from Standard;
|
||||
end Range;
|
@@ -13,7 +13,9 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IntTools_Range.ixx>
|
||||
|
||||
#include <IntTools_Range.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : IntTools_Range::IntTools_Range
|
||||
//purpose :
|
||||
|
88
src/IntTools/IntTools_Range.hxx
Normal file
88
src/IntTools/IntTools_Range.hxx
Normal file
@@ -0,0 +1,88 @@
|
||||
// Created on: 2000-05-18
|
||||
// Created by: Peter KURNEV
|
||||
// Copyright (c) 2000-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 _IntTools_Range_HeaderFile
|
||||
#define _IntTools_Range_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Real.hxx>
|
||||
|
||||
|
||||
//! The class describes the 1-d range
|
||||
//! [myFirst, myLast].
|
||||
class IntTools_Range
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
|
||||
//! Empty constructor
|
||||
Standard_EXPORT IntTools_Range();
|
||||
|
||||
|
||||
//! Initialize me by range boundaries
|
||||
Standard_EXPORT IntTools_Range(const Standard_Real aFirst, const Standard_Real aLast);
|
||||
|
||||
|
||||
//! Modifier
|
||||
Standard_EXPORT void SetFirst (const Standard_Real aFirst);
|
||||
|
||||
|
||||
//! Modifier
|
||||
Standard_EXPORT void SetLast (const Standard_Real aLast);
|
||||
|
||||
|
||||
//! Selector
|
||||
Standard_EXPORT Standard_Real First() const;
|
||||
|
||||
|
||||
//! Selector
|
||||
Standard_EXPORT Standard_Real Last() const;
|
||||
|
||||
|
||||
//! Selector
|
||||
Standard_EXPORT void Range (Standard_Real& aFirst, Standard_Real& aLast) const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Standard_Real myFirst;
|
||||
Standard_Real myLast;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IntTools_Range_HeaderFile
|
@@ -1,143 +0,0 @@
|
||||
-- Created on: 2000-05-22
|
||||
-- Created by: Peter KURNEV
|
||||
-- Copyright (c) 2000-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.
|
||||
|
||||
class Root from IntTools
|
||||
|
||||
---Purpose: The class is to describe the root of
|
||||
-- function of one variable for Edge/Edge
|
||||
-- and Edge/Surface algorithms.
|
||||
|
||||
uses
|
||||
State from TopAbs
|
||||
|
||||
---raises
|
||||
is
|
||||
Create
|
||||
returns Root from IntTools ;
|
||||
---Purpose:
|
||||
--- Empty constructor
|
||||
---
|
||||
|
||||
Create(aRoot: Real from Standard;
|
||||
aType: Integer from Standard)
|
||||
returns Root from IntTools ;
|
||||
---Purpose:
|
||||
--- Initializes my by range of parameters
|
||||
--- and type of root
|
||||
---
|
||||
|
||||
SetRoot (me:out; aRoot: Real from Standard);
|
||||
---Purpose:
|
||||
--- Sets the Root's value
|
||||
---
|
||||
|
||||
SetType (me:out; aType: Integer from Standard);
|
||||
---Purpose:
|
||||
--- Sets the Root's Type
|
||||
---
|
||||
|
||||
SetStateBefore (me:out; aState: State from TopAbs);
|
||||
---Purpose:
|
||||
--- Set the value of the state before the root
|
||||
--- (at t=Root-dt)
|
||||
---
|
||||
|
||||
SetStateAfter (me:out; aState: State from TopAbs);
|
||||
---Purpose:
|
||||
--- Set the value of the state after the root
|
||||
--- (at t=Root-dt)
|
||||
---
|
||||
|
||||
SetLayerHeight (me:out; aHeight:Real from Standard);
|
||||
---Purpose:
|
||||
--- Not used in Edge/Edge algorithm
|
||||
---
|
||||
|
||||
SetInterval (me:out; t1, t2, f1, f2:Real from Standard);
|
||||
---Purpose:
|
||||
--- Sets the interval from which the Root was
|
||||
--- found [t1,t2] and the corresponding values
|
||||
--- of the function on the bounds f(t1), f(t2).
|
||||
---
|
||||
|
||||
Root (me)
|
||||
returns Real from Standard;
|
||||
---Purpose:
|
||||
--- Returns the Root value
|
||||
---
|
||||
|
||||
Type (me)
|
||||
returns Integer from Standard;
|
||||
---Purpose:
|
||||
--- Returns the type of the root
|
||||
--- =0 - Simple (was found by bisection method);
|
||||
--- =2 - Smart when f1=0, f2!=0 or vice versa
|
||||
--- (was found by Fibbonacci method);
|
||||
--- =1 - Pure (pure zero for all t [t1,t2] );
|
||||
|
||||
StateBefore(me)
|
||||
returns State from TopAbs;
|
||||
---Purpose:
|
||||
--- Returns the state before the root
|
||||
---
|
||||
|
||||
StateAfter(me)
|
||||
returns State from TopAbs;
|
||||
---Purpose:
|
||||
--- Returns the state after the root
|
||||
---
|
||||
|
||||
LayerHeight (me)
|
||||
returns Real from Standard;
|
||||
---Purpose:
|
||||
--- Not used in Edge/Edge algorithm
|
||||
---
|
||||
|
||||
IsValid (me)
|
||||
returns Boolean from Standard;
|
||||
---Purpose:
|
||||
--- Returns the validity flag for the root,
|
||||
--- True if
|
||||
--- myStateBefore==TopAbs_OUT && myStateAfter==TopAbs_IN or
|
||||
--- myStateBefore==TopAbs_OUT && myStateAfter==TopAbs_ON or
|
||||
--- myStateBefore==TopAbs_ON && myStateAfter==TopAbs_OUT or
|
||||
--- myStateBefore==TopAbs_IN && myStateAfter==TopAbs_OUT .
|
||||
--- For other cases it returns False.
|
||||
---
|
||||
|
||||
Interval (me; t1:out Real from Standard;
|
||||
t2:out Real from Standard;
|
||||
f1:out Real from Standard;
|
||||
f2:out Real from Standard);
|
||||
---Purpose:
|
||||
--- Returns the values of interval from which the Root was
|
||||
--- found [t1,t2] and the corresponding values
|
||||
--- of the function on the bounds f(t1), f(t2).
|
||||
---
|
||||
|
||||
fields
|
||||
myRoot: Real from Standard;
|
||||
|
||||
myType: Integer from Standard;
|
||||
|
||||
myLayerHeight: Real from Standard;
|
||||
myStateBefore: State from TopAbs;
|
||||
myStateAfter : State from TopAbs;
|
||||
|
||||
myt1: Real from Standard;
|
||||
myt2: Real from Standard;
|
||||
myf1: Real from Standard;
|
||||
myf2: Real from Standard;
|
||||
end Root;
|
@@ -13,7 +13,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IntTools_Root.ixx>
|
||||
|
||||
#include <IntTools_Root.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function :IntTools_Root::IntTools_Root
|
||||
|
148
src/IntTools/IntTools_Root.hxx
Normal file
148
src/IntTools/IntTools_Root.hxx
Normal file
@@ -0,0 +1,148 @@
|
||||
// Created on: 2000-05-22
|
||||
// Created by: Peter KURNEV
|
||||
// Copyright (c) 2000-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 _IntTools_Root_HeaderFile
|
||||
#define _IntTools_Root_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <TopAbs_State.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
|
||||
|
||||
//! The class is to describe the root of
|
||||
//! function of one variable for Edge/Edge
|
||||
//! and Edge/Surface algorithms.
|
||||
class IntTools_Root
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
|
||||
//! Empty constructor
|
||||
Standard_EXPORT IntTools_Root();
|
||||
|
||||
|
||||
//! Initializes my by range of parameters
|
||||
//! and type of root
|
||||
Standard_EXPORT IntTools_Root(const Standard_Real aRoot, const Standard_Integer aType);
|
||||
|
||||
|
||||
//! Sets the Root's value
|
||||
Standard_EXPORT void SetRoot (const Standard_Real aRoot);
|
||||
|
||||
|
||||
//! Sets the Root's Type
|
||||
Standard_EXPORT void SetType (const Standard_Integer aType);
|
||||
|
||||
|
||||
//! Set the value of the state before the root
|
||||
//! (at t=Root-dt)
|
||||
Standard_EXPORT void SetStateBefore (const TopAbs_State aState);
|
||||
|
||||
|
||||
//! Set the value of the state after the root
|
||||
//! (at t=Root-dt)
|
||||
Standard_EXPORT void SetStateAfter (const TopAbs_State aState);
|
||||
|
||||
|
||||
//! Not used in Edge/Edge algorithm
|
||||
Standard_EXPORT void SetLayerHeight (const Standard_Real aHeight);
|
||||
|
||||
|
||||
//! Sets the interval from which the Root was
|
||||
//! found [t1,t2] and the corresponding values
|
||||
//! of the function on the bounds f(t1), f(t2).
|
||||
Standard_EXPORT void SetInterval (const Standard_Real t1, const Standard_Real t2, const Standard_Real f1, const Standard_Real f2);
|
||||
|
||||
|
||||
//! Returns the Root value
|
||||
Standard_EXPORT Standard_Real Root() const;
|
||||
|
||||
|
||||
//! Returns the type of the root
|
||||
//! =0 - Simple (was found by bisection method);
|
||||
//! =2 - Smart when f1=0, f2!=0 or vice versa
|
||||
//! (was found by Fibbonacci method);
|
||||
//! =1 - Pure (pure zero for all t [t1,t2] );
|
||||
Standard_EXPORT Standard_Integer Type() const;
|
||||
|
||||
|
||||
//! Returns the state before the root
|
||||
Standard_EXPORT TopAbs_State StateBefore() const;
|
||||
|
||||
|
||||
//! Returns the state after the root
|
||||
Standard_EXPORT TopAbs_State StateAfter() const;
|
||||
|
||||
|
||||
//! Not used in Edge/Edge algorithm
|
||||
Standard_EXPORT Standard_Real LayerHeight() const;
|
||||
|
||||
|
||||
//! Returns the validity flag for the root,
|
||||
//! True if
|
||||
//! myStateBefore==TopAbs_OUT && myStateAfter==TopAbs_IN or
|
||||
//! myStateBefore==TopAbs_OUT && myStateAfter==TopAbs_ON or
|
||||
//! myStateBefore==TopAbs_ON && myStateAfter==TopAbs_OUT or
|
||||
//! myStateBefore==TopAbs_IN && myStateAfter==TopAbs_OUT .
|
||||
//! For other cases it returns False.
|
||||
Standard_EXPORT Standard_Boolean IsValid() const;
|
||||
|
||||
|
||||
//! Returns the values of interval from which the Root was
|
||||
//! found [t1,t2] and the corresponding values
|
||||
//! of the function on the bounds f(t1), f(t2).
|
||||
Standard_EXPORT void Interval (Standard_Real& t1, Standard_Real& t2, Standard_Real& f1, Standard_Real& f2) const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Standard_Real myRoot;
|
||||
Standard_Integer myType;
|
||||
Standard_Real myLayerHeight;
|
||||
TopAbs_State myStateBefore;
|
||||
TopAbs_State myStateAfter;
|
||||
Standard_Real myt1;
|
||||
Standard_Real myt2;
|
||||
Standard_Real myf1;
|
||||
Standard_Real myf2;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IntTools_Root_HeaderFile
|
@@ -1,95 +0,0 @@
|
||||
-- Created by: Peter KURNEV
|
||||
-- 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.
|
||||
|
||||
class ShrunkRange from IntTools
|
||||
|
||||
---Purpose:
|
||||
--- The class provides the computation of
|
||||
--- a working (shrunk) range [t1, t2] for
|
||||
--- the 3D-curve of the edge.
|
||||
|
||||
uses
|
||||
Box from Bnd,
|
||||
Edge from TopoDS,
|
||||
Vertex from TopoDS,
|
||||
Context from IntTools
|
||||
|
||||
--raises
|
||||
|
||||
is
|
||||
Create
|
||||
returns ShrunkRange from IntTools;
|
||||
---C++: alias "Standard_EXPORT virtual ~IntTools_ShrunkRange();"
|
||||
|
||||
SetData (me:out;
|
||||
aE : Edge from TopoDS;
|
||||
aT1 : Real from Standard;
|
||||
aT2 : Real from Standard;
|
||||
aV1 : Vertex from TopoDS;
|
||||
aV2 : Vertex from TopoDS);
|
||||
|
||||
SetContext(me:out;
|
||||
aCtx: Context from IntTools);
|
||||
|
||||
Context(me)
|
||||
returns Context from IntTools;
|
||||
---C++: return const &
|
||||
|
||||
SetShrunkRange(me:out;
|
||||
aT1 : Real from Standard;
|
||||
aT2 : Real from Standard);
|
||||
|
||||
ShrunkRange(me;
|
||||
aT1 :out Real from Standard;
|
||||
aT2 :out Real from Standard);
|
||||
|
||||
BndBox (me)
|
||||
returns Box from Bnd;
|
||||
---C++: return const &
|
||||
|
||||
Edge (me)
|
||||
returns Edge from TopoDS;
|
||||
---C++: return const &
|
||||
|
||||
Perform(me:out);
|
||||
|
||||
ErrorStatus(me)
|
||||
returns Integer from Standard;
|
||||
---Purpose:
|
||||
--- Returns code of computing shrunk range
|
||||
--- completion
|
||||
--- 0 - means successful completion
|
||||
--- 1 - nothing has been done
|
||||
--- 2 - initial range is out of edge's range
|
||||
--- 3 - first boundary of initial range is more than
|
||||
--- last boundary
|
||||
--- 4 - projection of first vertex failed
|
||||
--- 5 - projection of second vertex failed
|
||||
--- 6 - shrunk range can not be computed
|
||||
--- shrunk range is setted to initial range
|
||||
---
|
||||
|
||||
fields
|
||||
myEdge : Edge from TopoDS is protected;
|
||||
myV1 : Vertex from TopoDS is protected;
|
||||
myV2 : Vertex from TopoDS is protected;
|
||||
myT1 : Real from Standard is protected;
|
||||
myT2 : Real from Standard is protected;
|
||||
myTS1 : Real from Standard is protected;
|
||||
myTS2 : Real from Standard is protected;
|
||||
myBndBox : Box from Bnd is protected;
|
||||
myCtx : Context from IntTools is protected;
|
||||
myErrorStatus : Integer from Standard is protected;
|
||||
|
||||
end ShrunkRange;
|
@@ -12,22 +12,22 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IntTools_ShrunkRange.ixx>
|
||||
|
||||
#include <Precision.hxx>
|
||||
|
||||
#include <Bnd_Box.hxx>
|
||||
#include <BndLib_Add3dCurve.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <BRepAdaptor_Curve.hxx>
|
||||
#include <BRepBuilderAPI_MakeVertex.hxx>
|
||||
#include <ElCLib.hxx>
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <gp.hxx>
|
||||
#include <gp_Circ.hxx>
|
||||
|
||||
#include <Geom_Curve.hxx>
|
||||
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <BRepBuilderAPI_MakeVertex.hxx>
|
||||
#include <BRepAdaptor_Curve.hxx>
|
||||
#include <BndLib_Add3dCurve.hxx>
|
||||
#include <IntTools_Context.hxx>
|
||||
#include <gp_Lin.hxx>
|
||||
#include <ElCLib.hxx>
|
||||
#include <IntTools_Context.hxx>
|
||||
#include <IntTools_ShrunkRange.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS_Vertex.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function :
|
||||
|
110
src/IntTools/IntTools_ShrunkRange.hxx
Normal file
110
src/IntTools/IntTools_ShrunkRange.hxx
Normal file
@@ -0,0 +1,110 @@
|
||||
// Created by: Peter KURNEV
|
||||
// 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 _IntTools_ShrunkRange_HeaderFile
|
||||
#define _IntTools_ShrunkRange_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS_Vertex.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Bnd_Box.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
class IntTools_Context;
|
||||
class TopoDS_Edge;
|
||||
class TopoDS_Vertex;
|
||||
class Bnd_Box;
|
||||
|
||||
|
||||
|
||||
//! The class provides the computation of
|
||||
//! a working (shrunk) range [t1, t2] for
|
||||
//! the 3D-curve of the edge.
|
||||
class IntTools_ShrunkRange
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT IntTools_ShrunkRange();
|
||||
Standard_EXPORT virtual ~IntTools_ShrunkRange();
|
||||
|
||||
Standard_EXPORT void SetData (const TopoDS_Edge& aE, const Standard_Real aT1, const Standard_Real aT2, const TopoDS_Vertex& aV1, const TopoDS_Vertex& aV2);
|
||||
|
||||
Standard_EXPORT void SetContext (const Handle(IntTools_Context)& aCtx);
|
||||
|
||||
Standard_EXPORT const Handle(IntTools_Context)& Context() const;
|
||||
|
||||
Standard_EXPORT void SetShrunkRange (const Standard_Real aT1, const Standard_Real aT2);
|
||||
|
||||
Standard_EXPORT void ShrunkRange (Standard_Real& aT1, Standard_Real& aT2) const;
|
||||
|
||||
Standard_EXPORT const Bnd_Box& BndBox() const;
|
||||
|
||||
Standard_EXPORT const TopoDS_Edge& Edge() const;
|
||||
|
||||
Standard_EXPORT void Perform();
|
||||
|
||||
|
||||
//! Returns code of computing shrunk range
|
||||
//! completion
|
||||
//! 0 - means successful completion
|
||||
//! 1 - nothing has been done
|
||||
//! 2 - initial range is out of edge's range
|
||||
//! 3 - first boundary of initial range is more than
|
||||
//! last boundary
|
||||
//! 4 - projection of first vertex failed
|
||||
//! 5 - projection of second vertex failed
|
||||
//! 6 - shrunk range can not be computed
|
||||
//! shrunk range is setted to initial range
|
||||
Standard_EXPORT Standard_Integer ErrorStatus() const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
TopoDS_Edge myEdge;
|
||||
TopoDS_Vertex myV1;
|
||||
TopoDS_Vertex myV2;
|
||||
Standard_Real myT1;
|
||||
Standard_Real myT2;
|
||||
Standard_Real myTS1;
|
||||
Standard_Real myTS2;
|
||||
Bnd_Box myBndBox;
|
||||
Handle(IntTools_Context) myCtx;
|
||||
Standard_Integer myErrorStatus;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IntTools_ShrunkRange_HeaderFile
|
@@ -1,189 +0,0 @@
|
||||
-- Created on: 2005-10-14
|
||||
-- Created by: Mikhail KLOKOV
|
||||
-- Copyright (c) 2005-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.
|
||||
|
||||
class SurfaceRangeLocalizeData from IntTools
|
||||
uses
|
||||
Box from Bnd,
|
||||
SurfaceRangeSample from IntTools,
|
||||
MapOfSurfaceSample from IntTools,
|
||||
ListOfSurfaceRangeSample from IntTools,
|
||||
DataMapOfSurfaceSampleBox from IntTools,
|
||||
Pnt from gp,
|
||||
HArray1OfReal from TColStd,
|
||||
HArray2OfPnt from TColgp
|
||||
|
||||
is
|
||||
Create
|
||||
returns SurfaceRangeLocalizeData from IntTools;
|
||||
|
||||
Create(theNbSampleU: Integer from Standard;
|
||||
theNbSampleV: Integer from Standard;
|
||||
theMinRangeU: Real from Standard;
|
||||
theMinRangeV: Real from Standard)
|
||||
returns SurfaceRangeLocalizeData from IntTools;
|
||||
|
||||
Create(Other: SurfaceRangeLocalizeData from IntTools)
|
||||
returns SurfaceRangeLocalizeData from IntTools;
|
||||
|
||||
Assign(me: in out; Other: SurfaceRangeLocalizeData from IntTools)
|
||||
returns SurfaceRangeLocalizeData from IntTools;
|
||||
---C++: alias operator =
|
||||
---C++: return &
|
||||
|
||||
GetNbSampleU(me)
|
||||
returns Integer from Standard;
|
||||
---C++: inline
|
||||
|
||||
GetNbSampleV(me)
|
||||
returns Integer from Standard;
|
||||
---C++: inline
|
||||
|
||||
GetMinRangeU(me)
|
||||
returns Real from Standard;
|
||||
---C++: inline
|
||||
|
||||
GetMinRangeV(me)
|
||||
returns Real from Standard;
|
||||
---C++: inline
|
||||
|
||||
AddOutRange(me: in out; theRange: SurfaceRangeSample from IntTools);
|
||||
|
||||
AddBox(me: in out; theRange: SurfaceRangeSample from IntTools;
|
||||
theBox: Box from Bnd);
|
||||
|
||||
FindBox(me; theRange: SurfaceRangeSample from IntTools;
|
||||
theBox: out Box from Bnd)
|
||||
returns Boolean from Standard;
|
||||
|
||||
IsRangeOut(me; theRange: SurfaceRangeSample from IntTools)
|
||||
returns Boolean from Standard;
|
||||
|
||||
ListRangeOut(me; theList: out ListOfSurfaceRangeSample from IntTools);
|
||||
|
||||
RemoveRangeOutAll(me: in out);
|
||||
|
||||
-- Modified by skv - Wed Nov 2 18:37:33 2005 Optimization Begin
|
||||
SetGridDeflection(me: in out; theDeflection: Real from Standard);
|
||||
---Purpose: Set the grid deflection.
|
||||
---C++: inline
|
||||
|
||||
GetGridDeflection(me)
|
||||
---Purpose: Query the grid deflection.
|
||||
---C++: inline
|
||||
returns Real from Standard;
|
||||
|
||||
SetRangeUGrid(me: in out; theNbUGrid: Integer from Standard);
|
||||
---Purpose: Set the range U of the grid of points.
|
||||
|
||||
GetRangeUGrid(me)
|
||||
---Purpose: Query the range U of the grid of points.
|
||||
---C++: inline
|
||||
returns Integer from Standard;
|
||||
|
||||
SetUParam(me: in out; theIndex: Integer from Standard;
|
||||
theUParam: Real from Standard);
|
||||
---Purpose: Set the U parameter of the grid points at that index.
|
||||
---C++: inline
|
||||
|
||||
GetUParam(me; theIndex: Integer from Standard)
|
||||
---Purpose: Query the U parameter of the grid points at that index.
|
||||
---C++: inline
|
||||
returns Real from Standard;
|
||||
|
||||
SetRangeVGrid(me: in out; theNbVGrid: Integer from Standard);
|
||||
---Purpose: Set the range V of the grid of points.
|
||||
|
||||
GetRangeVGrid(me)
|
||||
---Purpose: Query the range V of the grid of points.
|
||||
---C++: inline
|
||||
returns Integer from Standard;
|
||||
|
||||
SetVParam(me: in out; theIndex: Integer from Standard;
|
||||
theVParam: Real from Standard);
|
||||
---Purpose: Set the V parameter of the grid points at that index.
|
||||
---C++: inline
|
||||
|
||||
GetVParam(me; theIndex: Integer from Standard)
|
||||
---Purpose: Query the V parameter of the grid points at that index.
|
||||
---C++: inline
|
||||
returns Real from Standard;
|
||||
|
||||
SetGridPoint(me: in out; theUIndex: Integer from Standard;
|
||||
theVIndex: Integer from Standard;
|
||||
thePoint: Pnt from gp);
|
||||
---Purpose: Set the grid point.
|
||||
---C++: inline
|
||||
|
||||
GetGridPoint(me; theUIndex: Integer from Standard;
|
||||
theVIndex: Integer from Standard)
|
||||
---Purpose: Set the grid point.
|
||||
---C++: inline
|
||||
---C++: return const &
|
||||
returns Pnt from gp;
|
||||
|
||||
SetFrame(me: in out; theUMin: Real from Standard;
|
||||
theUMax: Real from Standard;
|
||||
theVMin: Real from Standard;
|
||||
theVMax: Real from Standard);
|
||||
---Purpose: Sets the frame area. Used to work with grid points.
|
||||
|
||||
GetNBUPointsInFrame(me)
|
||||
---Purpose: Returns the number of grid points on U direction in frame.
|
||||
---C++: inline
|
||||
returns Integer from Standard;
|
||||
|
||||
GetNBVPointsInFrame(me)
|
||||
---Purpose: Returns the number of grid points on V direction in frame.
|
||||
---C++: inline
|
||||
returns Integer from Standard;
|
||||
|
||||
GetPointInFrame(me; theUIndex: Integer from Standard;
|
||||
theVIndex: Integer from Standard)
|
||||
---Purpose: Returns the grid point in frame.
|
||||
---C++: return const &
|
||||
returns Pnt from gp;
|
||||
|
||||
GetUParamInFrame(me; theIndex: Integer from Standard)
|
||||
---Purpose: Query the U parameter of the grid points
|
||||
-- at that index in frame.
|
||||
returns Real from Standard;
|
||||
|
||||
GetVParamInFrame(me; theIndex: Integer from Standard)
|
||||
---Purpose: Query the V parameter of the grid points
|
||||
-- at that index in frame.
|
||||
returns Real from Standard;
|
||||
|
||||
ClearGrid(me: in out);
|
||||
---Purpose: Clears the grid of points.
|
||||
|
||||
-- Modified by skv - Wed Nov 2 18:37:33 2005 Optimization End
|
||||
|
||||
fields
|
||||
myNbSampleU: Integer from Standard;
|
||||
myNbSampleV: Integer from Standard;
|
||||
myMinRangeU: Real from Standard;
|
||||
myMinRangeV: Real from Standard;
|
||||
myMapRangeOut: MapOfSurfaceSample from IntTools;
|
||||
myMapBox : DataMapOfSurfaceSampleBox from IntTools;
|
||||
myUParams : HArray1OfReal from TColStd;
|
||||
myVParams : HArray1OfReal from TColStd;
|
||||
myGridPoints : HArray2OfPnt from TColgp;
|
||||
myUIndMin : Integer from Standard;
|
||||
myUIndMax : Integer from Standard;
|
||||
myVIndMin : Integer from Standard;
|
||||
myVIndMax : Integer from Standard;
|
||||
myDeflection : Real from Standard;
|
||||
|
||||
end SurfaceRangeLocalizeData from IntTools;
|
@@ -13,10 +13,14 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IntTools_SurfaceRangeLocalizeData.ixx>
|
||||
#include <IntTools_ListIteratorOfListOfSurfaceRangeSample.hxx>
|
||||
|
||||
#include <Bnd_Box.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <IntTools_ListIteratorOfListOfBox.hxx>
|
||||
#include <IntTools_ListIteratorOfListOfSurfaceRangeSample.hxx>
|
||||
#include <IntTools_MapIteratorOfMapOfSurfaceSample.hxx>
|
||||
#include <IntTools_SurfaceRangeLocalizeData.hxx>
|
||||
#include <IntTools_SurfaceRangeSample.hxx>
|
||||
#include <Precision.hxx>
|
||||
|
||||
IntTools_SurfaceRangeLocalizeData::IntTools_SurfaceRangeLocalizeData()
|
||||
|
173
src/IntTools/IntTools_SurfaceRangeLocalizeData.hxx
Normal file
173
src/IntTools/IntTools_SurfaceRangeLocalizeData.hxx
Normal file
@@ -0,0 +1,173 @@
|
||||
// Created on: 2005-10-14
|
||||
// Created by: Mikhail KLOKOV
|
||||
// Copyright (c) 2005-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 _IntTools_SurfaceRangeLocalizeData_HeaderFile
|
||||
#define _IntTools_SurfaceRangeLocalizeData_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <IntTools_MapOfSurfaceSample.hxx>
|
||||
#include <IntTools_DataMapOfSurfaceSampleBox.hxx>
|
||||
#include <TColStd_HArray1OfReal.hxx>
|
||||
#include <TColgp_HArray2OfPnt.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <IntTools_ListOfSurfaceRangeSample.hxx>
|
||||
class IntTools_SurfaceRangeSample;
|
||||
class Bnd_Box;
|
||||
class gp_Pnt;
|
||||
|
||||
|
||||
|
||||
class IntTools_SurfaceRangeLocalizeData
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT IntTools_SurfaceRangeLocalizeData();
|
||||
|
||||
Standard_EXPORT IntTools_SurfaceRangeLocalizeData(const Standard_Integer theNbSampleU, const Standard_Integer theNbSampleV, const Standard_Real theMinRangeU, const Standard_Real theMinRangeV);
|
||||
|
||||
Standard_EXPORT IntTools_SurfaceRangeLocalizeData(const IntTools_SurfaceRangeLocalizeData& Other);
|
||||
|
||||
Standard_EXPORT IntTools_SurfaceRangeLocalizeData& Assign (const IntTools_SurfaceRangeLocalizeData& Other);
|
||||
IntTools_SurfaceRangeLocalizeData& operator = (const IntTools_SurfaceRangeLocalizeData& Other)
|
||||
{
|
||||
return Assign(Other);
|
||||
}
|
||||
|
||||
Standard_Integer GetNbSampleU() const;
|
||||
|
||||
Standard_Integer GetNbSampleV() const;
|
||||
|
||||
Standard_Real GetMinRangeU() const;
|
||||
|
||||
Standard_Real GetMinRangeV() const;
|
||||
|
||||
Standard_EXPORT void AddOutRange (const IntTools_SurfaceRangeSample& theRange);
|
||||
|
||||
Standard_EXPORT void AddBox (const IntTools_SurfaceRangeSample& theRange, const Bnd_Box& theBox);
|
||||
|
||||
Standard_EXPORT Standard_Boolean FindBox (const IntTools_SurfaceRangeSample& theRange, Bnd_Box& theBox) const;
|
||||
|
||||
Standard_EXPORT Standard_Boolean IsRangeOut (const IntTools_SurfaceRangeSample& theRange) const;
|
||||
|
||||
Standard_EXPORT void ListRangeOut (IntTools_ListOfSurfaceRangeSample& theList) const;
|
||||
|
||||
Standard_EXPORT void RemoveRangeOutAll();
|
||||
|
||||
//! Set the grid deflection.
|
||||
void SetGridDeflection (const Standard_Real theDeflection);
|
||||
|
||||
//! Query the grid deflection.
|
||||
Standard_Real GetGridDeflection() const;
|
||||
|
||||
//! Set the range U of the grid of points.
|
||||
Standard_EXPORT void SetRangeUGrid (const Standard_Integer theNbUGrid);
|
||||
|
||||
//! Query the range U of the grid of points.
|
||||
Standard_Integer GetRangeUGrid() const;
|
||||
|
||||
//! Set the U parameter of the grid points at that index.
|
||||
void SetUParam (const Standard_Integer theIndex, const Standard_Real theUParam);
|
||||
|
||||
//! Query the U parameter of the grid points at that index.
|
||||
Standard_Real GetUParam (const Standard_Integer theIndex) const;
|
||||
|
||||
//! Set the range V of the grid of points.
|
||||
Standard_EXPORT void SetRangeVGrid (const Standard_Integer theNbVGrid);
|
||||
|
||||
//! Query the range V of the grid of points.
|
||||
Standard_Integer GetRangeVGrid() const;
|
||||
|
||||
//! Set the V parameter of the grid points at that index.
|
||||
void SetVParam (const Standard_Integer theIndex, const Standard_Real theVParam);
|
||||
|
||||
//! Query the V parameter of the grid points at that index.
|
||||
Standard_Real GetVParam (const Standard_Integer theIndex) const;
|
||||
|
||||
//! Set the grid point.
|
||||
void SetGridPoint (const Standard_Integer theUIndex, const Standard_Integer theVIndex, const gp_Pnt& thePoint);
|
||||
|
||||
//! Set the grid point.
|
||||
const gp_Pnt& GetGridPoint (const Standard_Integer theUIndex, const Standard_Integer theVIndex) const;
|
||||
|
||||
//! Sets the frame area. Used to work with grid points.
|
||||
Standard_EXPORT void SetFrame (const Standard_Real theUMin, const Standard_Real theUMax, const Standard_Real theVMin, const Standard_Real theVMax);
|
||||
|
||||
//! Returns the number of grid points on U direction in frame.
|
||||
Standard_Integer GetNBUPointsInFrame() const;
|
||||
|
||||
//! Returns the number of grid points on V direction in frame.
|
||||
Standard_Integer GetNBVPointsInFrame() const;
|
||||
|
||||
//! Returns the grid point in frame.
|
||||
Standard_EXPORT const gp_Pnt& GetPointInFrame (const Standard_Integer theUIndex, const Standard_Integer theVIndex) const;
|
||||
|
||||
//! Query the U parameter of the grid points
|
||||
//! at that index in frame.
|
||||
Standard_EXPORT Standard_Real GetUParamInFrame (const Standard_Integer theIndex) const;
|
||||
|
||||
//! Query the V parameter of the grid points
|
||||
//! at that index in frame.
|
||||
Standard_EXPORT Standard_Real GetVParamInFrame (const Standard_Integer theIndex) const;
|
||||
|
||||
//! Clears the grid of points.
|
||||
Standard_EXPORT void ClearGrid();
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Standard_Integer myNbSampleU;
|
||||
Standard_Integer myNbSampleV;
|
||||
Standard_Real myMinRangeU;
|
||||
Standard_Real myMinRangeV;
|
||||
IntTools_MapOfSurfaceSample myMapRangeOut;
|
||||
IntTools_DataMapOfSurfaceSampleBox myMapBox;
|
||||
Handle(TColStd_HArray1OfReal) myUParams;
|
||||
Handle(TColStd_HArray1OfReal) myVParams;
|
||||
Handle(TColgp_HArray2OfPnt) myGridPoints;
|
||||
Standard_Integer myUIndMin;
|
||||
Standard_Integer myUIndMax;
|
||||
Standard_Integer myVIndMin;
|
||||
Standard_Integer myVIndMax;
|
||||
Standard_Real myDeflection;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <IntTools_SurfaceRangeLocalizeData.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IntTools_SurfaceRangeLocalizeData_HeaderFile
|
@@ -1,129 +0,0 @@
|
||||
-- Created on: 2005-10-05
|
||||
-- Created by: Mikhail KLOKOV
|
||||
-- Copyright (c) 2005-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.
|
||||
|
||||
class SurfaceRangeSample from IntTools
|
||||
---Purpose: class for range index management of surface
|
||||
|
||||
uses
|
||||
Range from IntTools,
|
||||
CurveRangeSample from IntTools
|
||||
|
||||
is
|
||||
Create
|
||||
returns SurfaceRangeSample from IntTools;
|
||||
|
||||
Create(theIndexU, theDepthU,theIndexV, theDepthV: Integer from Standard)
|
||||
returns SurfaceRangeSample from IntTools;
|
||||
|
||||
Create(theRangeU, theRangeV: CurveRangeSample from IntTools)
|
||||
returns SurfaceRangeSample from IntTools;
|
||||
|
||||
Create(Other: SurfaceRangeSample from IntTools)
|
||||
returns SurfaceRangeSample from IntTools;
|
||||
|
||||
Assign(me: in out; Other: SurfaceRangeSample from IntTools)
|
||||
returns SurfaceRangeSample from IntTools;
|
||||
---C++: alias operator =
|
||||
---C++: return &
|
||||
|
||||
SetRanges(me: in out; theRangeU, theRangeV: CurveRangeSample from IntTools);
|
||||
---C++: inline
|
||||
|
||||
GetRanges(me; theRangeU, theRangeV: out CurveRangeSample from IntTools);
|
||||
---C++: inline
|
||||
|
||||
SetIndexes(me: in out; theIndexU, theIndexV: Integer from Standard);
|
||||
---C++: inline
|
||||
|
||||
GetIndexes(me; theIndexU: out Integer from Standard;
|
||||
theIndexV: out Integer from Standard);
|
||||
---C++: inline
|
||||
|
||||
GetDepths(me; theDepthU: out Integer from Standard;
|
||||
theDepthV: out Integer from Standard);
|
||||
---C++: inline
|
||||
|
||||
SetSampleRangeU(me: in out; theRangeSampleU: CurveRangeSample from IntTools);
|
||||
---C++: inline
|
||||
|
||||
GetSampleRangeU(me)
|
||||
returns CurveRangeSample from IntTools;
|
||||
---C++: return const &
|
||||
---C++: inline
|
||||
|
||||
SetSampleRangeV(me: in out; theRangeSampleV: CurveRangeSample from IntTools);
|
||||
---C++: inline
|
||||
|
||||
GetSampleRangeV(me)
|
||||
returns CurveRangeSample from IntTools;
|
||||
---C++: return const &
|
||||
---C++: inline
|
||||
|
||||
SetIndexU(me: in out; theIndexU: Integer from Standard);
|
||||
---C++: inline
|
||||
|
||||
GetIndexU(me)
|
||||
returns Integer from Standard;
|
||||
---C++: inline
|
||||
|
||||
SetIndexV(me: in out; theIndexV: Integer from Standard);
|
||||
---C++: inline
|
||||
|
||||
GetIndexV(me)
|
||||
returns Integer from Standard;
|
||||
---C++: inline
|
||||
|
||||
--
|
||||
SetDepthU(me: in out; theDepthU: Integer from Standard);
|
||||
---C++: inline
|
||||
|
||||
GetDepthU(me)
|
||||
returns Integer from Standard;
|
||||
---C++: inline
|
||||
|
||||
SetDepthV(me: in out; theDepthV: Integer from Standard);
|
||||
---C++: inline
|
||||
|
||||
GetDepthV(me)
|
||||
returns Integer from Standard;
|
||||
---C++: inline
|
||||
|
||||
|
||||
GetRangeU(me; theFirstU, theLastU: Real from Standard;
|
||||
theNbSampleU: Integer from Standard)
|
||||
returns Range from IntTools;
|
||||
|
||||
GetRangeV(me; theFirstV, theLastV: Real from Standard;
|
||||
theNbSampleV: Integer from Standard)
|
||||
returns Range from IntTools;
|
||||
|
||||
IsEqual(me; Other: SurfaceRangeSample from IntTools)
|
||||
returns Boolean from Standard;
|
||||
---C++: inline
|
||||
|
||||
GetRangeIndexUDeeper(me; theNbSampleU: Integer from Standard)
|
||||
returns Integer from Standard;
|
||||
---C++: inline
|
||||
|
||||
|
||||
GetRangeIndexVDeeper(me; theNbSampleV: Integer from Standard)
|
||||
returns Integer from Standard;
|
||||
---C++: inline
|
||||
|
||||
fields
|
||||
myRangeU: CurveRangeSample from IntTools;
|
||||
myRangeV: CurveRangeSample from IntTools;
|
||||
|
||||
end SurfaceRangeSample from IntTools;
|
@@ -13,7 +13,10 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IntTools_SurfaceRangeSample.ixx>
|
||||
|
||||
#include <IntTools_CurveRangeSample.hxx>
|
||||
#include <IntTools_Range.hxx>
|
||||
#include <IntTools_SurfaceRangeSample.hxx>
|
||||
|
||||
IntTools_SurfaceRangeSample::IntTools_SurfaceRangeSample()
|
||||
{
|
||||
|
123
src/IntTools/IntTools_SurfaceRangeSample.hxx
Normal file
123
src/IntTools/IntTools_SurfaceRangeSample.hxx
Normal file
@@ -0,0 +1,123 @@
|
||||
// Created on: 2005-10-05
|
||||
// Created by: Mikhail KLOKOV
|
||||
// Copyright (c) 2005-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 _IntTools_SurfaceRangeSample_HeaderFile
|
||||
#define _IntTools_SurfaceRangeSample_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <IntTools_CurveRangeSample.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class IntTools_CurveRangeSample;
|
||||
class IntTools_Range;
|
||||
|
||||
|
||||
//! class for range index management of surface
|
||||
class IntTools_SurfaceRangeSample
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT IntTools_SurfaceRangeSample();
|
||||
|
||||
Standard_EXPORT IntTools_SurfaceRangeSample(const Standard_Integer theIndexU, const Standard_Integer theDepthU, const Standard_Integer theIndexV, const Standard_Integer theDepthV);
|
||||
|
||||
Standard_EXPORT IntTools_SurfaceRangeSample(const IntTools_CurveRangeSample& theRangeU, const IntTools_CurveRangeSample& theRangeV);
|
||||
|
||||
Standard_EXPORT IntTools_SurfaceRangeSample(const IntTools_SurfaceRangeSample& Other);
|
||||
|
||||
Standard_EXPORT IntTools_SurfaceRangeSample& Assign (const IntTools_SurfaceRangeSample& Other);
|
||||
IntTools_SurfaceRangeSample& operator = (const IntTools_SurfaceRangeSample& Other)
|
||||
{
|
||||
return Assign(Other);
|
||||
}
|
||||
|
||||
void SetRanges (const IntTools_CurveRangeSample& theRangeU, const IntTools_CurveRangeSample& theRangeV);
|
||||
|
||||
void GetRanges (IntTools_CurveRangeSample& theRangeU, IntTools_CurveRangeSample& theRangeV) const;
|
||||
|
||||
void SetIndexes (const Standard_Integer theIndexU, const Standard_Integer theIndexV);
|
||||
|
||||
void GetIndexes (Standard_Integer& theIndexU, Standard_Integer& theIndexV) const;
|
||||
|
||||
void GetDepths (Standard_Integer& theDepthU, Standard_Integer& theDepthV) const;
|
||||
|
||||
void SetSampleRangeU (const IntTools_CurveRangeSample& theRangeSampleU);
|
||||
|
||||
const IntTools_CurveRangeSample& GetSampleRangeU() const;
|
||||
|
||||
void SetSampleRangeV (const IntTools_CurveRangeSample& theRangeSampleV);
|
||||
|
||||
const IntTools_CurveRangeSample& GetSampleRangeV() const;
|
||||
|
||||
void SetIndexU (const Standard_Integer theIndexU);
|
||||
|
||||
Standard_Integer GetIndexU() const;
|
||||
|
||||
void SetIndexV (const Standard_Integer theIndexV);
|
||||
|
||||
Standard_Integer GetIndexV() const;
|
||||
|
||||
void SetDepthU (const Standard_Integer theDepthU);
|
||||
|
||||
Standard_Integer GetDepthU() const;
|
||||
|
||||
void SetDepthV (const Standard_Integer theDepthV);
|
||||
|
||||
Standard_Integer GetDepthV() const;
|
||||
|
||||
Standard_EXPORT IntTools_Range GetRangeU (const Standard_Real theFirstU, const Standard_Real theLastU, const Standard_Integer theNbSampleU) const;
|
||||
|
||||
Standard_EXPORT IntTools_Range GetRangeV (const Standard_Real theFirstV, const Standard_Real theLastV, const Standard_Integer theNbSampleV) const;
|
||||
|
||||
Standard_Boolean IsEqual (const IntTools_SurfaceRangeSample& Other) const;
|
||||
|
||||
Standard_Integer GetRangeIndexUDeeper (const Standard_Integer theNbSampleU) const;
|
||||
|
||||
Standard_Integer GetRangeIndexVDeeper (const Standard_Integer theNbSampleV) const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
IntTools_CurveRangeSample myRangeU;
|
||||
IntTools_CurveRangeSample myRangeV;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <IntTools_SurfaceRangeSample.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IntTools_SurfaceRangeSample_HeaderFile
|
@@ -1,34 +0,0 @@
|
||||
-- Created on: 2005-10-14
|
||||
-- Created by: Mikhail KLOKOV
|
||||
-- Copyright (c) 2005-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.
|
||||
|
||||
class SurfaceRangeSampleMapHasher from IntTools
|
||||
uses
|
||||
SurfaceRangeSample from IntTools
|
||||
is
|
||||
HashCode(myclass; K : SurfaceRangeSample from IntTools; Upper : Integer) returns Integer;
|
||||
---Purpose: Returns a HasCode value for the Key <K> in the
|
||||
-- range 0..Upper.
|
||||
--
|
||||
---C++: inline
|
||||
|
||||
IsEqual(myclass; S1, S2 : SurfaceRangeSample from IntTools) returns Boolean;
|
||||
---Purpose: Returns True when the two keys are the same. Two
|
||||
-- same keys must have the same hashcode, the
|
||||
-- contrary is not necessary.
|
||||
--
|
||||
---C++: inline
|
||||
|
||||
|
||||
end SurfaceRangeSampleMapHasher from IntTools;
|
@@ -13,4 +13,6 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IntTools_SurfaceRangeSampleMapHasher.ixx>
|
||||
|
||||
#include <IntTools_SurfaceRangeSample.hxx>
|
||||
#include <IntTools_SurfaceRangeSampleMapHasher.hxx>
|
||||
|
69
src/IntTools/IntTools_SurfaceRangeSampleMapHasher.hxx
Normal file
69
src/IntTools/IntTools_SurfaceRangeSampleMapHasher.hxx
Normal file
@@ -0,0 +1,69 @@
|
||||
// Created on: 2005-10-14
|
||||
// Created by: Mikhail KLOKOV
|
||||
// Copyright (c) 2005-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 _IntTools_SurfaceRangeSampleMapHasher_HeaderFile
|
||||
#define _IntTools_SurfaceRangeSampleMapHasher_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class IntTools_SurfaceRangeSample;
|
||||
|
||||
|
||||
|
||||
class IntTools_SurfaceRangeSampleMapHasher
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Returns a HasCode value for the Key <K> in the
|
||||
//! range 0..Upper.
|
||||
static Standard_Integer HashCode (const IntTools_SurfaceRangeSample& K, const Standard_Integer Upper);
|
||||
|
||||
//! Returns True when the two keys are the same. Two
|
||||
//! same keys must have the same hashcode, the
|
||||
//! contrary is not necessary.
|
||||
static Standard_Boolean IsEqual (const IntTools_SurfaceRangeSample& S1, const IntTools_SurfaceRangeSample& S2);
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <IntTools_SurfaceRangeSampleMapHasher.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IntTools_SurfaceRangeSampleMapHasher_HeaderFile
|
@@ -1,255 +0,0 @@
|
||||
-- Created on: 2000-11-16
|
||||
-- Created by: Peter KURNEV
|
||||
-- Copyright (c) 2000-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.
|
||||
|
||||
class Tools from IntTools
|
||||
|
||||
---Purpose:
|
||||
--- The class contains handy static functions
|
||||
--- dealing with the geometry and topology.
|
||||
|
||||
uses
|
||||
Shape from TopoDS,
|
||||
Vertex from TopoDS,
|
||||
Edge from TopoDS,
|
||||
Wire from TopoDS,
|
||||
Face from TopoDS,
|
||||
Pnt2d from gp,
|
||||
Pnt from gp,
|
||||
Dir from gp,
|
||||
Lin from gp,
|
||||
Pln from gp,
|
||||
CommonPrt from IntTools,
|
||||
Curve from IntTools,
|
||||
Range from IntTools,
|
||||
SequenceOfCurves from IntTools,
|
||||
Curve from Geom,
|
||||
Curve from Geom2d,
|
||||
Surface from Geom,
|
||||
State from TopAbs,
|
||||
Box from Bnd
|
||||
|
||||
is
|
||||
ComputeVV (myclass;V1,V2:Vertex from TopoDS)
|
||||
returns Integer from Standard;
|
||||
---Purpose:
|
||||
--- Computes distance between vertex V1 and vertex V2,
|
||||
--- if the distance is less than sum of vertex tolerances
|
||||
--- returns zero,
|
||||
--- otherwise returns negative value
|
||||
---
|
||||
|
||||
HasInternalEdge (myclass;
|
||||
aW: Wire from TopoDS)
|
||||
returns Boolean from Standard;
|
||||
---Purpose:
|
||||
--- Returns True if wire aW contains edges
|
||||
--- with INTERNAL orientation
|
||||
---
|
||||
|
||||
MakeFaceFromWireAndFace (myclass;
|
||||
aW: Wire from TopoDS;
|
||||
aF: Face from TopoDS;
|
||||
aFNew:out Face from TopoDS);
|
||||
---Purpose:
|
||||
--- Build a face based on surface of given face aF
|
||||
--- and bounded by wire aW
|
||||
---
|
||||
|
||||
ClassifyPointByFace (myclass;
|
||||
aF: Face from TopoDS;
|
||||
P: Pnt2d from gp)
|
||||
returns State from TopAbs;
|
||||
---Purpose:
|
||||
---
|
||||
---
|
||||
|
||||
IsVertex (myclass; E: Edge from TopoDS;
|
||||
t: Real from Standard)
|
||||
returns Boolean from Standard;
|
||||
---Purpose:
|
||||
--- Computes square distance between a point on the edge E
|
||||
--- corresponded to parameter t and vertices of edge E.
|
||||
--- Returns True if this distance is less than square
|
||||
--- tolerance of vertex, otherwise returns false.
|
||||
---
|
||||
|
||||
IsVertex (myclass; E: Edge from TopoDS;
|
||||
V: Vertex from TopoDS;
|
||||
t: Real from Standard)
|
||||
returns Boolean from Standard;
|
||||
---Purpose:
|
||||
--- Returns True if square distance between vertex V
|
||||
--- and a point on the edge E corresponded to parameter t
|
||||
--- is less than square tolerance of V
|
||||
---
|
||||
|
||||
IsVertex (myclass; aCmnPrt: CommonPrt from IntTools)
|
||||
returns Boolean from Standard;
|
||||
---Purpose:
|
||||
--- Returns True if IsVertx for middle parameter of fist range
|
||||
--- and first edge returns True
|
||||
--- and if IsVertex for middle parameter of second range and
|
||||
--- second range returns True,
|
||||
--- otherwise returns False
|
||||
---
|
||||
|
||||
IsMiddlePointsEqual(myclass;
|
||||
E1: Edge from TopoDS;
|
||||
E2: Edge from TopoDS)
|
||||
returns Boolean from Standard;
|
||||
---Purpose:
|
||||
--- Gets boundary of parameters of E1 and E2.
|
||||
--- Computes 3d points on each corresponded to average parameters.
|
||||
--- Returns True if distance between computed points is less than
|
||||
--- sum of edge tolerance, otherwise returns False.
|
||||
---
|
||||
|
||||
IsVertex (myclass;
|
||||
aP : Pnt from gp;
|
||||
aTolPV: Real from Standard;
|
||||
aV: Vertex from TopoDS)
|
||||
returns Boolean from Standard;
|
||||
---Purpose:
|
||||
--- Returns True if the distance between point aP and
|
||||
--- vertex aV is less or equal to sum of aTolPV and
|
||||
--- vertex tolerance, otherwise returns False
|
||||
---
|
||||
|
||||
IntermediatePoint (myclass;
|
||||
aFirst: Real from Standard;
|
||||
aLast : Real from Standard)
|
||||
returns Real from Standard;
|
||||
---Purpose:
|
||||
--- Returns some value between aFirst and aLast
|
||||
---
|
||||
|
||||
SplitCurve (myclass;
|
||||
aC : Curve from IntTools;
|
||||
aS :out SequenceOfCurves from IntTools)
|
||||
returns Integer from Standard;
|
||||
---Purpose:
|
||||
--- Split aC by average parameter if aC is closed in 3D.
|
||||
--- Returns positive value if splitting has been done,
|
||||
--- otherwise returns zero.
|
||||
---
|
||||
|
||||
RejectLines(myclass;
|
||||
aSIn: SequenceOfCurves from IntTools;
|
||||
aSOut:out SequenceOfCurves from IntTools);
|
||||
---Purpose:
|
||||
--- Puts curves from aSIn to aSOut except those curves that
|
||||
--- are coincide with first curve from aSIn.
|
||||
---
|
||||
|
||||
IsDirsCoinside (myclass;
|
||||
D1:Dir from gp;
|
||||
D2:Dir from gp)
|
||||
returns Boolean from Standard;
|
||||
---Purpose:
|
||||
--- Returns True if D1 and D2 coinside
|
||||
---
|
||||
|
||||
IsDirsCoinside (myclass;
|
||||
D1 :Dir from gp;
|
||||
D2 :Dir from gp;
|
||||
aTol:Real from Standard)
|
||||
returns Boolean from Standard;
|
||||
---Purpose:
|
||||
--- Returns True if D1 and D2 coinside with given tolerance
|
||||
---
|
||||
|
||||
IsClosed (myclass;
|
||||
aC : Curve from Geom)
|
||||
returns Boolean from Standard;
|
||||
---Purpose:
|
||||
--- Returns True if aC is BoundedCurve from Geom and
|
||||
--- the distance between first point
|
||||
--- of the curve aC and last point
|
||||
--- is less than 1.e-12
|
||||
---
|
||||
|
||||
CurveTolerance(myclass;
|
||||
aC : Curve from Geom;
|
||||
aTolBase : Real from Standard)
|
||||
returns Real from Standard;
|
||||
---Purpose:
|
||||
--- Returns adaptive tolerance for given aTolBase
|
||||
--- if aC is trimmed curve and basis curve is parabola,
|
||||
--- otherwise returns value of aTolBase
|
||||
---
|
||||
--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
CheckCurve(myclass;
|
||||
theC:Curve from Geom;
|
||||
theTol:Real from Standard;
|
||||
theBox:out Box from Bnd)
|
||||
returns Boolean from Standard;
|
||||
|
||||
IsOnPave(myclass;
|
||||
theT:Real from Standard;
|
||||
theRange:Range from IntTools;
|
||||
theTol: Real from Standard)
|
||||
returns Boolean from Standard;
|
||||
|
||||
VertexParameters(myclass;
|
||||
theCP:CommonPrt from IntTools;
|
||||
theT1:out Real from Standard;
|
||||
theT2:out Real from Standard);
|
||||
|
||||
VertexParameter(myclass;
|
||||
theCP:CommonPrt from IntTools;
|
||||
theT:out Real from Standard);
|
||||
|
||||
IsOnPave1(myclass;
|
||||
theT:Real from Standard;
|
||||
theRange:Range from IntTools;
|
||||
theTol: Real from Standard)
|
||||
returns Boolean from Standard;
|
||||
|
||||
IsInRange(myclass;
|
||||
theRRef : Range from IntTools;
|
||||
theR : Range from IntTools;
|
||||
theTol : Real from Standard)
|
||||
returns Boolean from Standard;
|
||||
---Purpose: Checks if the range <theR> interfere with the range <theRRef>
|
||||
|
||||
SegPln(myclass;
|
||||
theLin : Lin from gp;
|
||||
theTLin1 : Real from Standard;
|
||||
theTLin2 : Real from Standard;
|
||||
theTolLin: Real from Standard;
|
||||
thePln : Pln from gp;
|
||||
theTolPln: Real from Standard;
|
||||
theP :out Pnt from gp;
|
||||
theT :out Real from Standard;
|
||||
theTolP :out Real from Standard;
|
||||
theTmin :out Real from Standard;
|
||||
theTmax :out Real from Standard)
|
||||
returns Integer from Standard;
|
||||
|
||||
ComputeTolerance(myclass;
|
||||
theCurve3D : Curve from Geom;
|
||||
theCurve2D : Curve from Geom2d;
|
||||
theSurf : Surface from Geom;
|
||||
theFirst : Real from Standard;
|
||||
theLast : Real from Standard;
|
||||
theMaxDist : out Real from Standard;
|
||||
theMaxPar : out Real from Standard)
|
||||
returns Boolean from Standard;
|
||||
---Purpose:
|
||||
-- Computes the max distance between points
|
||||
-- taken from 3D and 2D curves by the same parameter
|
||||
|
||||
end Tools;
|
@@ -13,51 +13,48 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IntTools_Tools.ixx>
|
||||
|
||||
#include <Precision.hxx>
|
||||
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <TopTools_IndexedDataMapOfShapeShape.hxx>
|
||||
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TopoDS_Vertex.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS_Face.hxx>
|
||||
#include <TopoDS_Wire.hxx>
|
||||
#include <TopLoc_Location.hxx>
|
||||
|
||||
#include <Bnd_Box.hxx>
|
||||
#include <BRep_Builder.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <BRepAdaptor_Surface.hxx>
|
||||
#include <BRepAdaptor_Curve.hxx>
|
||||
#include <BRepAdaptor_Surface.hxx>
|
||||
|
||||
#include <Geom2d_Curve.hxx>
|
||||
#include <Geom2d_TrimmedCurve.hxx>
|
||||
#include <Geom_BoundedCurve.hxx>
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <Geom_Geometry.hxx>
|
||||
#include <Geom_Line.hxx>
|
||||
#include <Geom_Surface.hxx>
|
||||
#include <Geom_TrimmedCurve.hxx>
|
||||
#include <GeomAbs_CurveType.hxx>
|
||||
#include <GeomAdaptor_Curve.hxx>
|
||||
#include <GeomAdaptor_Surface.hxx>
|
||||
#include <GeomAPI_ProjectPointOnCurve.hxx>
|
||||
#include <GeomAPI_ProjectPointOnSurf.hxx>
|
||||
#include <gp.hxx>
|
||||
#include <gp_Ax1.hxx>
|
||||
#include <gp_Dir.hxx>
|
||||
#include <gp_Lin.hxx>
|
||||
#include <gp_Pln.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <gp.hxx>
|
||||
#include <gp_Lin.hxx>
|
||||
#include <gp_Dir.hxx>
|
||||
#include <gp_Ax1.hxx>
|
||||
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <GeomAdaptor_Surface.hxx>
|
||||
#include <Geom_Surface.hxx>
|
||||
#include <GeomAPI_ProjectPointOnSurf.hxx>
|
||||
#include <GeomAPI_ProjectPointOnCurve.hxx>
|
||||
#include <GeomAdaptor_Curve.hxx>
|
||||
#include <GeomAbs_CurveType.hxx>
|
||||
#include <Geom_Line.hxx>
|
||||
#include <Geom2d_Curve.hxx>
|
||||
#include <Geom_BoundedCurve.hxx>
|
||||
#include <Geom_Geometry.hxx>
|
||||
#include <Geom_TrimmedCurve.hxx>
|
||||
#include <Geom2d_TrimmedCurve.hxx>
|
||||
|
||||
#include <IntTools_FClass2d.hxx>
|
||||
#include <IntTools_CommonPrt.hxx>
|
||||
#include <IntTools_Curve.hxx>
|
||||
#include <IntTools_FClass2d.hxx>
|
||||
#include <IntTools_Range.hxx>
|
||||
#include <IntTools_SequenceOfCurves.hxx>
|
||||
#include <IntTools_Tools.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <TopLoc_Location.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS_Face.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TopoDS_Vertex.hxx>
|
||||
#include <TopoDS_Wire.hxx>
|
||||
#include <TopTools_IndexedDataMapOfShapeShape.hxx>
|
||||
|
||||
static
|
||||
void ParabolaTolerance(const Handle(Geom_Curve)& ,
|
||||
|
188
src/IntTools/IntTools_Tools.hxx
Normal file
188
src/IntTools/IntTools_Tools.hxx
Normal file
@@ -0,0 +1,188 @@
|
||||
// Created on: 2000-11-16
|
||||
// Created by: Peter KURNEV
|
||||
// Copyright (c) 2000-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 _IntTools_Tools_HeaderFile
|
||||
#define _IntTools_Tools_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <TopAbs_State.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <IntTools_SequenceOfCurves.hxx>
|
||||
class TopoDS_Vertex;
|
||||
class TopoDS_Wire;
|
||||
class TopoDS_Face;
|
||||
class gp_Pnt2d;
|
||||
class TopoDS_Edge;
|
||||
class IntTools_CommonPrt;
|
||||
class gp_Pnt;
|
||||
class IntTools_Curve;
|
||||
class gp_Dir;
|
||||
class Geom_Curve;
|
||||
class Bnd_Box;
|
||||
class IntTools_Range;
|
||||
class gp_Lin;
|
||||
class gp_Pln;
|
||||
class Geom2d_Curve;
|
||||
class Geom_Surface;
|
||||
|
||||
|
||||
|
||||
//! The class contains handy static functions
|
||||
//! dealing with the geometry and topology.
|
||||
class IntTools_Tools
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
|
||||
//! Computes distance between vertex V1 and vertex V2,
|
||||
//! if the distance is less than sum of vertex tolerances
|
||||
//! returns zero,
|
||||
//! otherwise returns negative value
|
||||
Standard_EXPORT static Standard_Integer ComputeVV (const TopoDS_Vertex& V1, const TopoDS_Vertex& V2);
|
||||
|
||||
|
||||
//! Returns True if wire aW contains edges
|
||||
//! with INTERNAL orientation
|
||||
Standard_EXPORT static Standard_Boolean HasInternalEdge (const TopoDS_Wire& aW);
|
||||
|
||||
|
||||
//! Build a face based on surface of given face aF
|
||||
//! and bounded by wire aW
|
||||
Standard_EXPORT static void MakeFaceFromWireAndFace (const TopoDS_Wire& aW, const TopoDS_Face& aF, TopoDS_Face& aFNew);
|
||||
|
||||
Standard_EXPORT static TopAbs_State ClassifyPointByFace (const TopoDS_Face& aF, const gp_Pnt2d& P);
|
||||
|
||||
|
||||
//! Computes square distance between a point on the edge E
|
||||
//! corresponded to parameter t and vertices of edge E.
|
||||
//! Returns True if this distance is less than square
|
||||
//! tolerance of vertex, otherwise returns false.
|
||||
Standard_EXPORT static Standard_Boolean IsVertex (const TopoDS_Edge& E, const Standard_Real t);
|
||||
|
||||
|
||||
//! Returns True if square distance between vertex V
|
||||
//! and a point on the edge E corresponded to parameter t
|
||||
//! is less than square tolerance of V
|
||||
Standard_EXPORT static Standard_Boolean IsVertex (const TopoDS_Edge& E, const TopoDS_Vertex& V, const Standard_Real t);
|
||||
|
||||
|
||||
//! Returns True if IsVertx for middle parameter of fist range
|
||||
//! and first edge returns True
|
||||
//! and if IsVertex for middle parameter of second range and
|
||||
//! second range returns True,
|
||||
//! otherwise returns False
|
||||
Standard_EXPORT static Standard_Boolean IsVertex (const IntTools_CommonPrt& aCmnPrt);
|
||||
|
||||
|
||||
//! Gets boundary of parameters of E1 and E2.
|
||||
//! Computes 3d points on each corresponded to average parameters.
|
||||
//! Returns True if distance between computed points is less than
|
||||
//! sum of edge tolerance, otherwise returns False.
|
||||
Standard_EXPORT static Standard_Boolean IsMiddlePointsEqual (const TopoDS_Edge& E1, const TopoDS_Edge& E2);
|
||||
|
||||
|
||||
//! Returns True if the distance between point aP and
|
||||
//! vertex aV is less or equal to sum of aTolPV and
|
||||
//! vertex tolerance, otherwise returns False
|
||||
Standard_EXPORT static Standard_Boolean IsVertex (const gp_Pnt& aP, const Standard_Real aTolPV, const TopoDS_Vertex& aV);
|
||||
|
||||
|
||||
//! Returns some value between aFirst and aLast
|
||||
Standard_EXPORT static Standard_Real IntermediatePoint (const Standard_Real aFirst, const Standard_Real aLast);
|
||||
|
||||
|
||||
//! Split aC by average parameter if aC is closed in 3D.
|
||||
//! Returns positive value if splitting has been done,
|
||||
//! otherwise returns zero.
|
||||
Standard_EXPORT static Standard_Integer SplitCurve (const IntTools_Curve& aC, IntTools_SequenceOfCurves& aS);
|
||||
|
||||
|
||||
//! Puts curves from aSIn to aSOut except those curves that
|
||||
//! are coincide with first curve from aSIn.
|
||||
Standard_EXPORT static void RejectLines (const IntTools_SequenceOfCurves& aSIn, IntTools_SequenceOfCurves& aSOut);
|
||||
|
||||
|
||||
//! Returns True if D1 and D2 coinside
|
||||
Standard_EXPORT static Standard_Boolean IsDirsCoinside (const gp_Dir& D1, const gp_Dir& D2);
|
||||
|
||||
|
||||
//! Returns True if D1 and D2 coinside with given tolerance
|
||||
Standard_EXPORT static Standard_Boolean IsDirsCoinside (const gp_Dir& D1, const gp_Dir& D2, const Standard_Real aTol);
|
||||
|
||||
|
||||
//! Returns True if aC is BoundedCurve from Geom and
|
||||
//! the distance between first point
|
||||
//! of the curve aC and last point
|
||||
//! is less than 1.e-12
|
||||
Standard_EXPORT static Standard_Boolean IsClosed (const Handle(Geom_Curve)& aC);
|
||||
|
||||
|
||||
//! Returns adaptive tolerance for given aTolBase
|
||||
//! if aC is trimmed curve and basis curve is parabola,
|
||||
//! otherwise returns value of aTolBase
|
||||
Standard_EXPORT static Standard_Real CurveTolerance (const Handle(Geom_Curve)& aC, const Standard_Real aTolBase);
|
||||
|
||||
Standard_EXPORT static Standard_Boolean CheckCurve (const Handle(Geom_Curve)& theC, const Standard_Real theTol, Bnd_Box& theBox);
|
||||
|
||||
Standard_EXPORT static Standard_Boolean IsOnPave (const Standard_Real theT, const IntTools_Range& theRange, const Standard_Real theTol);
|
||||
|
||||
Standard_EXPORT static void VertexParameters (const IntTools_CommonPrt& theCP, Standard_Real& theT1, Standard_Real& theT2);
|
||||
|
||||
Standard_EXPORT static void VertexParameter (const IntTools_CommonPrt& theCP, Standard_Real& theT);
|
||||
|
||||
Standard_EXPORT static Standard_Boolean IsOnPave1 (const Standard_Real theT, const IntTools_Range& theRange, const Standard_Real theTol);
|
||||
|
||||
//! Checks if the range <theR> interfere with the range <theRRef>
|
||||
Standard_EXPORT static Standard_Boolean IsInRange (const IntTools_Range& theRRef, const IntTools_Range& theR, const Standard_Real theTol);
|
||||
|
||||
Standard_EXPORT static Standard_Integer SegPln (const gp_Lin& theLin, const Standard_Real theTLin1, const Standard_Real theTLin2, const Standard_Real theTolLin, const gp_Pln& thePln, const Standard_Real theTolPln, gp_Pnt& theP, Standard_Real& theT, Standard_Real& theTolP, Standard_Real& theTmin, Standard_Real& theTmax);
|
||||
|
||||
|
||||
//! Computes the max distance between points
|
||||
//! taken from 3D and 2D curves by the same parameter
|
||||
Standard_EXPORT static Standard_Boolean ComputeTolerance (const Handle(Geom_Curve)& theCurve3D, const Handle(Geom2d_Curve)& theCurve2D, const Handle(Geom_Surface)& theSurf, const Standard_Real theFirst, const Standard_Real theLast, Standard_Real& theMaxDist, Standard_Real& theMaxPar);
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IntTools_Tools_HeaderFile
|
@@ -1,115 +0,0 @@
|
||||
-- Created on: 2002-04-18
|
||||
-- Created by: Michael KLOKOV
|
||||
-- Copyright (c) 2002-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.
|
||||
|
||||
class TopolTool from IntTools inherits TopolTool from Adaptor3d
|
||||
|
||||
---Purpose: Class redefine methods of TopolTool from Adaptor3d
|
||||
--- concerning sample points
|
||||
---
|
||||
uses
|
||||
Pnt from gp,
|
||||
Pnt2d from gp,
|
||||
HSurface from Adaptor3d,
|
||||
HArray1OfReal from TColStd
|
||||
|
||||
raises DomainError from Standard
|
||||
|
||||
is
|
||||
Create returns TopolTool from IntTools;
|
||||
---Purpose:
|
||||
--- Empty constructor
|
||||
---
|
||||
|
||||
Create(theSurface: HSurface from Adaptor3d)
|
||||
returns TopolTool from IntTools;
|
||||
---Purpose:
|
||||
--- Initializes me by surface
|
||||
---
|
||||
|
||||
Initialize(me: mutable)
|
||||
is redefined;
|
||||
---Purpose:
|
||||
--- Redefined empty initializer
|
||||
---
|
||||
-- Warning:
|
||||
--- Raises the exception NotImplemented
|
||||
---
|
||||
|
||||
Initialize(me: mutable; theSurface: HSurface from Adaptor3d)
|
||||
is redefined;
|
||||
---Purpose:
|
||||
--- Initializes me by surface
|
||||
---
|
||||
|
||||
--- sample points tools
|
||||
|
||||
ComputeSamplePoints(me: mutable)
|
||||
is redefined;
|
||||
---Purpose:
|
||||
---
|
||||
---
|
||||
|
||||
NbSamplesU(me: mutable)
|
||||
returns Integer from Standard
|
||||
is redefined;
|
||||
---Purpose:
|
||||
--- Computes the sample-points for the intersections algorithms
|
||||
---
|
||||
|
||||
NbSamplesV(me: mutable)
|
||||
returns Integer from Standard
|
||||
is redefined;
|
||||
---Purpose:
|
||||
--- Computes the sample-points for the intersections algorithms
|
||||
---
|
||||
|
||||
NbSamples(me: mutable)
|
||||
returns Integer from Standard
|
||||
is redefined;
|
||||
---Purpose:
|
||||
--- Computes the sample-points for the intersections algorithms
|
||||
---
|
||||
|
||||
SamplePoint(me: mutable; Index: Integer from Standard;
|
||||
P2d : out Pnt2d from gp;
|
||||
P3d : out Pnt from gp)
|
||||
is redefined;
|
||||
---Purpose:
|
||||
--- Returns a 2d point from surface myS
|
||||
--- and a corresponded 3d point
|
||||
--- for given index.
|
||||
--- The index should be from 1 to NbSamples()
|
||||
---
|
||||
|
||||
--modified by NIZNHY-IFV Sep 28 16:01:38 2005 f
|
||||
SamplePnts(me: mutable; theDefl: Real from Standard; theNUmin, theNVmin: Integer from Standard)
|
||||
---Purpose: compute the sample-points for the intersections algorithms
|
||||
-- by adaptive algorithm for BSpline surfaces. For other surfaces algorithm
|
||||
-- is the same as in method ComputeSamplePoints(), but only fill arrays of U
|
||||
-- and V sample parameters;
|
||||
-- theDefl is a requred deflection
|
||||
-- theNUmin, theNVmin are minimal nb points for U and V.
|
||||
is redefined;
|
||||
|
||||
fields
|
||||
--myS : HSurface from Adaptor3d; now inherits myS from Adaptor3d_TopolTool
|
||||
myNbSmplU : Integer from Standard;
|
||||
myNbSmplV : Integer from Standard;
|
||||
myU0 : Real from Standard;
|
||||
myV0 : Real from Standard;
|
||||
myDU : Real from Standard;
|
||||
myDV : Real from Standard;
|
||||
|
||||
end TopolTool from IntTools;
|
@@ -11,17 +11,21 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IntTools_TopolTool.ixx>
|
||||
|
||||
#include <Standard_NotImplemented.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <TColgp_Array2OfPnt.hxx>
|
||||
#include <Geom_BSplineSurface.hxx>
|
||||
#include <Adaptor3d_HSurface.hxx>
|
||||
#include <ElSLib.hxx>
|
||||
#include <Geom_BezierSurface.hxx>
|
||||
#include <Geom_BSplineSurface.hxx>
|
||||
#include <gp_Circ.hxx>
|
||||
#include <gp_Cone.hxx>
|
||||
#include <ElSLib.hxx>
|
||||
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <IntTools_TopolTool.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <Standard_DomainError.hxx>
|
||||
#include <Standard_NotImplemented.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TColgp_Array2OfPnt.hxx>
|
||||
#include <TColStd_HArray1OfReal.hxx>
|
||||
|
||||
static void Analyse(const TColgp_Array2OfPnt& array2,
|
||||
|
119
src/IntTools/IntTools_TopolTool.hxx
Normal file
119
src/IntTools/IntTools_TopolTool.hxx
Normal file
@@ -0,0 +1,119 @@
|
||||
// Created on: 2002-04-18
|
||||
// Created by: Michael KLOKOV
|
||||
// Copyright (c) 2002-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 _IntTools_TopolTool_HeaderFile
|
||||
#define _IntTools_TopolTool_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Adaptor3d_TopolTool.hxx>
|
||||
class Standard_DomainError;
|
||||
class Adaptor3d_HSurface;
|
||||
class gp_Pnt2d;
|
||||
class gp_Pnt;
|
||||
|
||||
|
||||
class IntTools_TopolTool;
|
||||
DEFINE_STANDARD_HANDLE(IntTools_TopolTool, Adaptor3d_TopolTool)
|
||||
|
||||
//! Class redefine methods of TopolTool from Adaptor3d
|
||||
//! concerning sample points
|
||||
class IntTools_TopolTool : public Adaptor3d_TopolTool
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
|
||||
//! Empty constructor
|
||||
Standard_EXPORT IntTools_TopolTool();
|
||||
|
||||
|
||||
//! Initializes me by surface
|
||||
Standard_EXPORT IntTools_TopolTool(const Handle(Adaptor3d_HSurface)& theSurface);
|
||||
|
||||
|
||||
//! Redefined empty initializer
|
||||
//!
|
||||
//! Warning:
|
||||
//! Raises the exception NotImplemented
|
||||
Standard_EXPORT virtual void Initialize() Standard_OVERRIDE;
|
||||
|
||||
|
||||
//! Initializes me by surface
|
||||
Standard_EXPORT virtual void Initialize (const Handle(Adaptor3d_HSurface)& theSurface) Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual void ComputeSamplePoints() Standard_OVERRIDE;
|
||||
|
||||
|
||||
//! Computes the sample-points for the intersections algorithms
|
||||
Standard_EXPORT virtual Standard_Integer NbSamplesU() Standard_OVERRIDE;
|
||||
|
||||
|
||||
//! Computes the sample-points for the intersections algorithms
|
||||
Standard_EXPORT virtual Standard_Integer NbSamplesV() Standard_OVERRIDE;
|
||||
|
||||
|
||||
//! Computes the sample-points for the intersections algorithms
|
||||
Standard_EXPORT virtual Standard_Integer NbSamples() Standard_OVERRIDE;
|
||||
|
||||
|
||||
//! Returns a 2d point from surface myS
|
||||
//! and a corresponded 3d point
|
||||
//! for given index.
|
||||
//! The index should be from 1 to NbSamples()
|
||||
Standard_EXPORT virtual void SamplePoint (const Standard_Integer Index, gp_Pnt2d& P2d, gp_Pnt& P3d) Standard_OVERRIDE;
|
||||
|
||||
//! compute the sample-points for the intersections algorithms
|
||||
//! by adaptive algorithm for BSpline surfaces. For other surfaces algorithm
|
||||
//! is the same as in method ComputeSamplePoints(), but only fill arrays of U
|
||||
//! and V sample parameters;
|
||||
//! theDefl is a requred deflection
|
||||
//! theNUmin, theNVmin are minimal nb points for U and V.
|
||||
Standard_EXPORT virtual void SamplePnts (const Standard_Real theDefl, const Standard_Integer theNUmin, const Standard_Integer theNVmin) Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(IntTools_TopolTool,Adaptor3d_TopolTool)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Standard_Integer myNbSmplU;
|
||||
Standard_Integer myNbSmplV;
|
||||
Standard_Real myU0;
|
||||
Standard_Real myV0;
|
||||
Standard_Real myDU;
|
||||
Standard_Real myDV;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IntTools_TopolTool_HeaderFile
|
Reference in New Issue
Block a user