mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-29 14:00:49 +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,2 +1,10 @@
|
||||
Hatch_SequenceOfParameter.hxx
|
||||
Hatch_Hatcher.cxx
|
||||
Hatch_Hatcher.hxx
|
||||
Hatch_Hatcher.lxx
|
||||
Hatch_Line.cxx
|
||||
Hatch_Line.hxx
|
||||
Hatch_LineForm.hxx
|
||||
Hatch_Parameter.cxx
|
||||
Hatch_Parameter.hxx
|
||||
Hatch_SequenceOfLine.hxx
|
||||
Hatch_SequenceOfParameter.hxx
|
||||
|
@@ -1,54 +0,0 @@
|
||||
-- Created on: 1992-08-18
|
||||
-- Created by: Remi Lequette
|
||||
-- Copyright (c) 1992-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.
|
||||
|
||||
package Hatch
|
||||
|
||||
---Purpose: The Hatch package provides algorithm to compute
|
||||
-- cross-hatchings on a 2D face.
|
||||
--
|
||||
-- The Hatcher algorithms stores a set of lines in
|
||||
-- the 2D plane.
|
||||
--
|
||||
-- The user stores lines in the Hatcher and afterward
|
||||
-- trim them with other lines.
|
||||
--
|
||||
-- At any moment when trimming the user can ask for
|
||||
-- any line if it is intersected and how many
|
||||
-- intervals are defined on the line by the trim.
|
||||
|
||||
uses
|
||||
Standard,
|
||||
TCollection,
|
||||
gp
|
||||
|
||||
is
|
||||
enumeration LineForm is
|
||||
---Purpose: Form of a trimmed line
|
||||
XLINE, YLINE, ANYLINE
|
||||
end LineForm;
|
||||
|
||||
|
||||
private class Parameter;
|
||||
|
||||
imported SequenceOfParameter;
|
||||
|
||||
private class Line;
|
||||
|
||||
imported SequenceOfLine;
|
||||
|
||||
class Hatcher;
|
||||
|
||||
end Hatch;
|
@@ -1,237 +0,0 @@
|
||||
-- Created on: 1992-08-19
|
||||
-- Created by: Modelistation
|
||||
-- Copyright (c) 1992-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 Hatcher from Hatch
|
||||
|
||||
---Purpose: The Hatcher is an algorithm to compute cross
|
||||
-- hatchings in a 2d plane. It is mainly dedicated to
|
||||
-- display purpose.
|
||||
--
|
||||
-- Computing cross hatchings is a 3 steps process :
|
||||
--
|
||||
-- 1. The users stores in the Hatcher a set of 2d
|
||||
-- lines to be trimmed. Methods in the "Lines"
|
||||
-- category.
|
||||
--
|
||||
-- 2. The user trims the lines with a boundary. The
|
||||
-- inside of a boundary is on the left side. Methods
|
||||
-- in the "Trimming" category.
|
||||
--
|
||||
-- 3. The user reads back the trimmed lines. Methods
|
||||
-- in the "Results" category.
|
||||
--
|
||||
-- The result is a set of parameter intervals on the
|
||||
-- line. The first parameter of an Interval may be
|
||||
-- RealFirst() and the last may be RealLast().
|
||||
--
|
||||
-- A line can be a line parallel to the axis (X or Y
|
||||
-- line or a 2D line.
|
||||
--
|
||||
-- The Hatcher has two modes :
|
||||
--
|
||||
-- * The "Oriented" mode, where the orientation of
|
||||
-- the trimming curves is considered. The hatch are
|
||||
-- kept on the left of the trimming curve. In this
|
||||
-- mode infinite hatch can be computed.
|
||||
--
|
||||
-- * The "UnOriented" mode, where the hatch are
|
||||
-- always finite.
|
||||
--
|
||||
|
||||
---Overview: Lines, Trimming, Results
|
||||
|
||||
uses
|
||||
Boolean from Standard,
|
||||
Integer from Standard,
|
||||
Real from Standard,
|
||||
Lin2d from gp,
|
||||
Pnt2d from gp,
|
||||
Dir2d from gp,
|
||||
LineForm from Hatch,
|
||||
SequenceOfLine from Hatch
|
||||
|
||||
raises
|
||||
OutOfRange from Standard
|
||||
|
||||
is
|
||||
Create(Tol : Real from Standard;
|
||||
Oriented : Boolean = Standard_True) returns Hatcher from Hatch;
|
||||
---Purpose: Returns a empty hatcher. <Tol> is the tolerance
|
||||
-- for intersections.
|
||||
|
||||
Tolerance(me : in out; Tol : Real from Standard)
|
||||
---C++: inline
|
||||
is static;
|
||||
|
||||
Tolerance(me) returns Real from Standard
|
||||
---C++: inline
|
||||
is static;
|
||||
|
||||
AddLine(me : in out; L : Lin2d from gp;
|
||||
T : LineForm from Hatch = Hatch_ANYLINE)
|
||||
---Purpose: Add a line <L> to be trimmed. <T> the type is
|
||||
-- only kept from information. It is not used in the
|
||||
-- computation.
|
||||
--
|
||||
---Category: Lines
|
||||
is static;
|
||||
|
||||
AddLine(me : in out; D : Dir2d from gp; Dist : Real from Standard)
|
||||
---Purpose: Add an infinite line on direction <D> at distance
|
||||
-- <Dist> from the origin to be trimmed. <Dist> may
|
||||
-- be negative.
|
||||
--
|
||||
-- If O is the origin of the 2D plane, and V the
|
||||
-- vector perpendicular to D (in the direct direction).
|
||||
--
|
||||
-- A point P is on the line if :
|
||||
-- OP dot V = Dist
|
||||
-- The parameter of P on the line is
|
||||
-- OP dot D
|
||||
--
|
||||
---Category: Lines
|
||||
is static;
|
||||
|
||||
AddXLine(me : in out; X : Real from Standard)
|
||||
---Purpose: Add an infinite line parallel to the Y-axis at
|
||||
-- abciss <X>.
|
||||
--
|
||||
---Category: Lines
|
||||
is static;
|
||||
|
||||
AddYLine(me : in out; Y : Real from Standard)
|
||||
---Purpose: Add an infinite line parallel to the X-axis at
|
||||
-- ordinate <Y>.
|
||||
--
|
||||
---Category: Lines
|
||||
is static;
|
||||
|
||||
Trim(me : in out; L : Lin2d from gp;
|
||||
Index : Integer from Standard = 0)
|
||||
---Purpose: Trims the lines at intersections with <L>.
|
||||
--
|
||||
--Category: Trimming
|
||||
is static;
|
||||
|
||||
Trim(me : in out; L : Lin2d from gp;
|
||||
Start, End : Real from Standard;
|
||||
Index : Integer from Standard = 0)
|
||||
---Purpose: Trims the lines at intersections with <L> in the
|
||||
-- parameter range <Start>, <End>
|
||||
--
|
||||
--Category: Trimming
|
||||
is static;
|
||||
|
||||
Trim(me : in out; P1, P2 : Pnt2d from gp;
|
||||
Index : Integer from Standard = 0)
|
||||
---Purpose: Trims the line at intersection with the oriented
|
||||
-- segment P1,P2.
|
||||
--
|
||||
--Category: Trimming
|
||||
is static;
|
||||
|
||||
NbIntervals(me) returns Integer from Standard
|
||||
---Purpose: Returns the total number of intervals on all the
|
||||
-- lines.
|
||||
---Category : Results
|
||||
raises OutOfRange
|
||||
is static;
|
||||
|
||||
NbLines(me) returns Integer from Standard
|
||||
---Purpose: Returns the number of lines.
|
||||
---Category : Results
|
||||
is static;
|
||||
|
||||
Line(me; I : Integer from Standard) returns Lin2d from gp
|
||||
---Purpose: Returns the line of index <I>.
|
||||
---C++: return const &
|
||||
---Category : Results
|
||||
raises OutOfRange
|
||||
is static;
|
||||
|
||||
LineForm(me; I : Integer from Standard) returns LineForm from Hatch
|
||||
---Purpose: Returns the type of the line of index <I>.
|
||||
---Category : Results
|
||||
raises OutOfRange
|
||||
is static;
|
||||
|
||||
IsXLine(me; I : Integer from Standard) returns Boolean from Standard
|
||||
---Purpose: Returns True if the line of index <I> has a
|
||||
-- constant X value.
|
||||
---Category : Results
|
||||
---C++: inline
|
||||
raises OutOfRange
|
||||
is static;
|
||||
|
||||
IsYLine(me; I : Integer from Standard) returns Boolean from Standard
|
||||
---Purpose: Returns True if the line of index <I> has a
|
||||
-- constant Y value.
|
||||
---Category : Results
|
||||
---C++: inline
|
||||
raises OutOfRange
|
||||
is static;
|
||||
|
||||
Coordinate(me; I : Integer from Standard) returns Real from Standard
|
||||
---Purpose: Returns the X or Y coordinate of the line of index
|
||||
-- <I> if it is a X or a Y line.
|
||||
---Category : Results
|
||||
raises OutOfRange
|
||||
is static;
|
||||
|
||||
NbIntervals(me; I : Integer from Standard) returns Integer from Standard
|
||||
---Purpose: Returns the number of intervals on line of index <I>.
|
||||
---Category : Results
|
||||
raises OutOfRange
|
||||
is static;
|
||||
|
||||
Start(me; I,J : Integer from Standard) returns Real from Standard
|
||||
---Purpose: Returns the first parameter of interval <J> on
|
||||
-- line <I>.
|
||||
---Category : Results
|
||||
raises OutOfRange
|
||||
is static;
|
||||
|
||||
StartIndex(me; I,J : Integer from Standard;
|
||||
Index : out Integer from Standard;
|
||||
Par2 : out Real from Standard)
|
||||
---Purpose: Returns the first Index and Par2 of interval <J> on
|
||||
-- line <I>.
|
||||
---Category : Results
|
||||
raises OutOfRange
|
||||
is static;
|
||||
|
||||
End(me; I,J : Integer) returns Real from Standard
|
||||
---Purpose: Returns the last parameter of interval <J> on
|
||||
-- line <I>.
|
||||
---Category : Results
|
||||
raises OutOfRange
|
||||
is static;
|
||||
|
||||
EndIndex(me; I,J : Integer from Standard;
|
||||
Index : out Integer from Standard;
|
||||
Par2 : out Real from Standard)
|
||||
---Purpose: Returns the last Index and Par2 of interval <J> on
|
||||
-- line <I>.
|
||||
---Category : Results
|
||||
raises OutOfRange
|
||||
is static;
|
||||
|
||||
fields
|
||||
myToler : Real;
|
||||
myLines : SequenceOfLine from Hatch;
|
||||
myOrient : Boolean;
|
||||
|
||||
end Hatcher;
|
@@ -14,19 +14,22 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Hatch_Hatcher.ixx>
|
||||
#include <Hatch_Line.hxx>
|
||||
#include <IntAna2d_IntPoint.hxx>
|
||||
#include <IntAna2d_AnaIntersection.hxx>
|
||||
#include <Hatch_Parameter.hxx>
|
||||
|
||||
#include <gp_Dir2d.hxx>
|
||||
#include <gp_Lin2d.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <gp_Vec2d.hxx>
|
||||
#include <Hatch_Hatcher.hxx>
|
||||
#include <Hatch_Line.hxx>
|
||||
#include <Hatch_Parameter.hxx>
|
||||
#include <IntAna2d_AnaIntersection.hxx>
|
||||
#include <IntAna2d_IntPoint.hxx>
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : Hatch_Hatcher
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Hatch_Hatcher::Hatch_Hatcher(const Standard_Real Tol,
|
||||
const Standard_Boolean Oriented) :
|
||||
myToler(Tol),
|
||||
|
191
src/Hatch/Hatch_Hatcher.hxx
Normal file
191
src/Hatch/Hatch_Hatcher.hxx
Normal file
@@ -0,0 +1,191 @@
|
||||
// Created on: 1992-08-19
|
||||
// Created by: Modelistation
|
||||
// Copyright (c) 1992-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 _Hatch_Hatcher_HeaderFile
|
||||
#define _Hatch_Hatcher_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Hatch_SequenceOfLine.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Hatch_LineForm.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
class Standard_OutOfRange;
|
||||
class gp_Lin2d;
|
||||
class gp_Dir2d;
|
||||
class gp_Pnt2d;
|
||||
|
||||
|
||||
//! The Hatcher is an algorithm to compute cross
|
||||
//! hatchings in a 2d plane. It is mainly dedicated to
|
||||
//! display purpose.
|
||||
//!
|
||||
//! Computing cross hatchings is a 3 steps process :
|
||||
//!
|
||||
//! 1. The users stores in the Hatcher a set of 2d
|
||||
//! lines to be trimmed. Methods in the "Lines"
|
||||
//! category.
|
||||
//!
|
||||
//! 2. The user trims the lines with a boundary. The
|
||||
//! inside of a boundary is on the left side. Methods
|
||||
//! in the "Trimming" category.
|
||||
//!
|
||||
//! 3. The user reads back the trimmed lines. Methods
|
||||
//! in the "Results" category.
|
||||
//!
|
||||
//! The result is a set of parameter intervals on the
|
||||
//! line. The first parameter of an Interval may be
|
||||
//! RealFirst() and the last may be RealLast().
|
||||
//!
|
||||
//! A line can be a line parallel to the axis (X or Y
|
||||
//! line or a 2D line.
|
||||
//!
|
||||
//! The Hatcher has two modes :
|
||||
//!
|
||||
//! * The "Oriented" mode, where the orientation of
|
||||
//! the trimming curves is considered. The hatch are
|
||||
//! kept on the left of the trimming curve. In this
|
||||
//! mode infinite hatch can be computed.
|
||||
//!
|
||||
//! * The "UnOriented" mode, where the hatch are
|
||||
//! always finite.
|
||||
class Hatch_Hatcher
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Returns a empty hatcher. <Tol> is the tolerance
|
||||
//! for intersections.
|
||||
Standard_EXPORT Hatch_Hatcher(const Standard_Real Tol, const Standard_Boolean Oriented = Standard_True);
|
||||
|
||||
void Tolerance (const Standard_Real Tol);
|
||||
|
||||
Standard_Real Tolerance() const;
|
||||
|
||||
//! Add a line <L> to be trimmed. <T> the type is
|
||||
//! only kept from information. It is not used in the
|
||||
//! computation.
|
||||
Standard_EXPORT void AddLine (const gp_Lin2d& L, const Hatch_LineForm T = Hatch_ANYLINE);
|
||||
|
||||
//! Add an infinite line on direction <D> at distance
|
||||
//! <Dist> from the origin to be trimmed. <Dist> may
|
||||
//! be negative.
|
||||
//!
|
||||
//! If O is the origin of the 2D plane, and V the
|
||||
//! vector perpendicular to D (in the direct direction).
|
||||
//!
|
||||
//! A point P is on the line if :
|
||||
//! OP dot V = Dist
|
||||
//! The parameter of P on the line is
|
||||
//! OP dot D
|
||||
Standard_EXPORT void AddLine (const gp_Dir2d& D, const Standard_Real Dist);
|
||||
|
||||
//! Add an infinite line parallel to the Y-axis at
|
||||
//! abciss <X>.
|
||||
Standard_EXPORT void AddXLine (const Standard_Real X);
|
||||
|
||||
//! Add an infinite line parallel to the X-axis at
|
||||
//! ordinate <Y>.
|
||||
Standard_EXPORT void AddYLine (const Standard_Real Y);
|
||||
|
||||
//! Trims the lines at intersections with <L>.
|
||||
Standard_EXPORT void Trim (const gp_Lin2d& L, const Standard_Integer Index = 0);
|
||||
|
||||
//! Trims the lines at intersections with <L> in the
|
||||
//! parameter range <Start>, <End>
|
||||
Standard_EXPORT void Trim (const gp_Lin2d& L, const Standard_Real Start, const Standard_Real End, const Standard_Integer Index = 0);
|
||||
|
||||
//! Trims the line at intersection with the oriented
|
||||
//! segment P1,P2.
|
||||
Standard_EXPORT void Trim (const gp_Pnt2d& P1, const gp_Pnt2d& P2, const Standard_Integer Index = 0);
|
||||
|
||||
//! Returns the total number of intervals on all the
|
||||
//! lines.
|
||||
Standard_EXPORT Standard_Integer NbIntervals() const;
|
||||
|
||||
//! Returns the number of lines.
|
||||
Standard_EXPORT Standard_Integer NbLines() const;
|
||||
|
||||
//! Returns the line of index <I>.
|
||||
Standard_EXPORT const gp_Lin2d& Line (const Standard_Integer I) const;
|
||||
|
||||
//! Returns the type of the line of index <I>.
|
||||
Standard_EXPORT Hatch_LineForm LineForm (const Standard_Integer I) const;
|
||||
|
||||
//! Returns True if the line of index <I> has a
|
||||
//! constant X value.
|
||||
Standard_Boolean IsXLine (const Standard_Integer I) const;
|
||||
|
||||
//! Returns True if the line of index <I> has a
|
||||
//! constant Y value.
|
||||
Standard_Boolean IsYLine (const Standard_Integer I) const;
|
||||
|
||||
//! Returns the X or Y coordinate of the line of index
|
||||
//! <I> if it is a X or a Y line.
|
||||
Standard_EXPORT Standard_Real Coordinate (const Standard_Integer I) const;
|
||||
|
||||
//! Returns the number of intervals on line of index <I>.
|
||||
Standard_EXPORT Standard_Integer NbIntervals (const Standard_Integer I) const;
|
||||
|
||||
//! Returns the first parameter of interval <J> on
|
||||
//! line <I>.
|
||||
Standard_EXPORT Standard_Real Start (const Standard_Integer I, const Standard_Integer J) const;
|
||||
|
||||
//! Returns the first Index and Par2 of interval <J> on
|
||||
//! line <I>.
|
||||
Standard_EXPORT void StartIndex (const Standard_Integer I, const Standard_Integer J, Standard_Integer& Index, Standard_Real& Par2) const;
|
||||
|
||||
//! Returns the last parameter of interval <J> on
|
||||
//! line <I>.
|
||||
Standard_EXPORT Standard_Real End (const Standard_Integer I, const Standard_Integer J) const;
|
||||
|
||||
//! Returns the last Index and Par2 of interval <J> on
|
||||
//! line <I>.
|
||||
Standard_EXPORT void EndIndex (const Standard_Integer I, const Standard_Integer J, Standard_Integer& Index, Standard_Real& Par2) const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Standard_Real myToler;
|
||||
Hatch_SequenceOfLine myLines;
|
||||
Standard_Boolean myOrient;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <Hatch_Hatcher.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Hatch_Hatcher_HeaderFile
|
@@ -1,61 +0,0 @@
|
||||
-- Created on: 1992-08-18
|
||||
-- Created by: Modelistation
|
||||
-- Copyright (c) 1992-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.
|
||||
|
||||
private class Line from Hatch
|
||||
|
||||
---Purpose: Stores a Line in the Hatcher. Represented by :
|
||||
--
|
||||
-- * A Lin2d from gp, the geometry of the line.
|
||||
--
|
||||
-- * Bounding parameters for the line.
|
||||
--
|
||||
-- * A sorted List of Parameters, the intersections
|
||||
-- on the line.
|
||||
|
||||
uses
|
||||
Real from Standard,
|
||||
Integer from Standard,
|
||||
Boolean from Standard,
|
||||
Lin2d from gp,
|
||||
LineForm from Hatch,
|
||||
SequenceOfParameter from Hatch
|
||||
|
||||
is
|
||||
|
||||
Create;
|
||||
|
||||
Create(L : Lin2d from gp; T : LineForm from Hatch)
|
||||
returns Line from Hatch;
|
||||
|
||||
AddIntersection(me : in out;
|
||||
Par1 : Real from Standard;
|
||||
Start : Boolean from Standard;
|
||||
Index : Integer from Standard;
|
||||
Par2 : Real from Standard;
|
||||
theToler : Real from Standard)
|
||||
---Purpose: Insert a new intersection in the sorted list.
|
||||
is static;
|
||||
|
||||
fields
|
||||
|
||||
myLin : Lin2d from gp;
|
||||
myForm : LineForm from Hatch;
|
||||
myInters : SequenceOfParameter from Hatch;
|
||||
|
||||
friends
|
||||
class Hatcher from Hatch
|
||||
|
||||
end Line;
|
@@ -14,14 +14,16 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Hatch_Line.ixx>
|
||||
|
||||
#include <gp_Lin2d.hxx>
|
||||
#include <Hatch_Hatcher.hxx>
|
||||
#include <Hatch_Line.hxx>
|
||||
#include <Hatch_Parameter.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : Hatch_Line
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Hatch_Line::Hatch_Line()
|
||||
{
|
||||
}
|
||||
|
83
src/Hatch/Hatch_Line.hxx
Normal file
83
src/Hatch/Hatch_Line.hxx
Normal file
@@ -0,0 +1,83 @@
|
||||
// Created on: 1992-08-18
|
||||
// Created by: Modelistation
|
||||
// Copyright (c) 1992-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 _Hatch_Line_HeaderFile
|
||||
#define _Hatch_Line_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <gp_Lin2d.hxx>
|
||||
#include <Hatch_LineForm.hxx>
|
||||
#include <Hatch_SequenceOfParameter.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
class Hatch_Hatcher;
|
||||
class gp_Lin2d;
|
||||
|
||||
|
||||
//! Stores a Line in the Hatcher. Represented by :
|
||||
//!
|
||||
//! * A Lin2d from gp, the geometry of the line.
|
||||
//!
|
||||
//! * Bounding parameters for the line.
|
||||
//!
|
||||
//! * A sorted List of Parameters, the intersections
|
||||
//! on the line.
|
||||
class Hatch_Line
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT Hatch_Line();
|
||||
|
||||
Standard_EXPORT Hatch_Line(const gp_Lin2d& L, const Hatch_LineForm T);
|
||||
|
||||
//! Insert a new intersection in the sorted list.
|
||||
Standard_EXPORT void AddIntersection (const Standard_Real Par1, const Standard_Boolean Start, const Standard_Integer Index, const Standard_Real Par2, const Standard_Real theToler);
|
||||
|
||||
|
||||
friend class Hatch_Hatcher;
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
gp_Lin2d myLin;
|
||||
Hatch_LineForm myForm;
|
||||
Hatch_SequenceOfParameter myInters;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Hatch_Line_HeaderFile
|
28
src/Hatch/Hatch_LineForm.hxx
Normal file
28
src/Hatch/Hatch_LineForm.hxx
Normal file
@@ -0,0 +1,28 @@
|
||||
// Created on: 1992-08-18
|
||||
// Created by: Remi Lequette
|
||||
// Copyright (c) 1992-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 _Hatch_LineForm_HeaderFile
|
||||
#define _Hatch_LineForm_HeaderFile
|
||||
|
||||
//! Form of a trimmed line
|
||||
enum Hatch_LineForm
|
||||
{
|
||||
Hatch_XLINE,
|
||||
Hatch_YLINE,
|
||||
Hatch_ANYLINE
|
||||
};
|
||||
|
||||
#endif // _Hatch_LineForm_HeaderFile
|
@@ -1,50 +0,0 @@
|
||||
-- Created on: 1992-08-18
|
||||
-- Created by: Modelistation
|
||||
-- Copyright (c) 1992-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.
|
||||
|
||||
private class Parameter from Hatch
|
||||
|
||||
---Purpose: Stores an intersection on a line represented by :
|
||||
--
|
||||
-- * A Real parameter.
|
||||
--
|
||||
-- * A flag True when the parameter starts an interval.
|
||||
--
|
||||
|
||||
uses
|
||||
Real from Standard,
|
||||
Integer from Standard,
|
||||
Boolean from Standard
|
||||
|
||||
is
|
||||
Create;
|
||||
|
||||
Create( Par1 : Real from Standard;
|
||||
Start : Boolean from Standard;
|
||||
Index : Integer from Standard = 0;
|
||||
Par2 : Real from Standard = 0)
|
||||
returns Parameter from Hatch;
|
||||
|
||||
fields
|
||||
myPar1 : Real from Standard;
|
||||
myStart : Boolean from Standard;
|
||||
myIndex : Integer from Standard;
|
||||
myPar2 : Real from Standard;
|
||||
|
||||
friends
|
||||
class Line from Hatch,
|
||||
class Hatcher from Hatch
|
||||
|
||||
end Parameter;
|
@@ -14,13 +14,15 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Hatch_Parameter.ixx>
|
||||
|
||||
#include <Hatch_Hatcher.hxx>
|
||||
#include <Hatch_Line.hxx>
|
||||
#include <Hatch_Parameter.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : Hatch_Parameter
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Hatch_Parameter::Hatch_Parameter()
|
||||
{
|
||||
}
|
||||
|
76
src/Hatch/Hatch_Parameter.hxx
Normal file
76
src/Hatch/Hatch_Parameter.hxx
Normal file
@@ -0,0 +1,76 @@
|
||||
// Created on: 1992-08-18
|
||||
// Created by: Modelistation
|
||||
// Copyright (c) 1992-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 _Hatch_Parameter_HeaderFile
|
||||
#define _Hatch_Parameter_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
class Hatch_Line;
|
||||
class Hatch_Hatcher;
|
||||
|
||||
|
||||
//! Stores an intersection on a line represented by :
|
||||
//!
|
||||
//! * A Real parameter.
|
||||
//!
|
||||
//! * A flag True when the parameter starts an interval.
|
||||
class Hatch_Parameter
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT Hatch_Parameter();
|
||||
|
||||
Standard_EXPORT Hatch_Parameter(const Standard_Real Par1, const Standard_Boolean Start, const Standard_Integer Index = 0, const Standard_Real Par2 = 0);
|
||||
|
||||
|
||||
friend class Hatch_Line;
|
||||
friend class Hatch_Hatcher;
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Standard_Real myPar1;
|
||||
Standard_Boolean myStart;
|
||||
Standard_Integer myIndex;
|
||||
Standard_Real myPar2;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Hatch_Parameter_HeaderFile
|
Reference in New Issue
Block a user