blob: 92ea04c969bce59545b496b6e8065b49045f0db0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
// File: Hatch_Line.cxx
// Created: Wed Aug 19 15:43:22 1992
// Author: Modelistation
// <model@phylox>
#include <Hatch_Line.ixx>
#include <Hatch_Parameter.hxx>
//=======================================================================
//function : Hatch_Line
//purpose :
//=======================================================================
Hatch_Line::Hatch_Line()
{
}
//=======================================================================
//function : Hatch_Line
//purpose :
//=======================================================================
Hatch_Line::Hatch_Line(const gp_Lin2d& L,
const Hatch_LineForm T) :
myLin(L),
myForm(T)
{
}
//=======================================================================
//function : AddIntersection
//purpose :
//=======================================================================
void Hatch_Line::AddIntersection
(const Standard_Real Par1,
const Standard_Boolean Start,
const Standard_Integer Index,
const Standard_Real Par2,
const Standard_Real theToler)
{
Hatch_Parameter P(Par1,Start,Index,Par2);
Standard_Integer i;
for (i = 1; i <= myInters.Length(); i++) {
Standard_Real dfIntPar1 = myInters(i).myPar1;
// akm OCC109 vvv : Two intersections too close
if (Abs(Par1-dfIntPar1) < theToler)
{
myInters.Remove(i);
return;
}
// akm OCC109 ^^^
if (Par1 < dfIntPar1) {
myInters.InsertBefore(i,P);
return;
}
}
myInters.Append(P);
}
|