mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +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,4 +1,27 @@
|
||||
Intf.cxx
|
||||
Intf.hxx
|
||||
Intf_Array1OfLin.hxx
|
||||
Intf_SeqOfSectionPoint.hxx
|
||||
Intf_Interference.cxx
|
||||
Intf_Interference.hxx
|
||||
Intf_Interference.lxx
|
||||
Intf_InterferencePolygon2d.cxx
|
||||
Intf_InterferencePolygon2d.hxx
|
||||
Intf_InterferencePolygonPolyhedron.gxx
|
||||
Intf_PIType.hxx
|
||||
Intf_Polygon2d.cxx
|
||||
Intf_Polygon2d.hxx
|
||||
Intf_Polygon2d.lxx
|
||||
Intf_SectionLine.cxx
|
||||
Intf_SectionLine.hxx
|
||||
Intf_SectionLine.lxx
|
||||
Intf_SectionPoint.cxx
|
||||
Intf_SectionPoint.hxx
|
||||
Intf_SectionPoint.lxx
|
||||
Intf_SeqOfSectionLine.hxx
|
||||
Intf_SeqOfSectionPoint.hxx
|
||||
Intf_SeqOfTangentZone.hxx
|
||||
Intf_TangentZone.cxx
|
||||
Intf_TangentZone.hxx
|
||||
Intf_TangentZone.lxx
|
||||
Intf_Tool.cxx
|
||||
Intf_Tool.hxx
|
||||
|
@@ -1,100 +0,0 @@
|
||||
-- Created on: 1991-05-23
|
||||
-- Created by: Didier PIFFAULT
|
||||
-- Copyright (c) 1991-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 Intf
|
||||
|
||||
---Purpose: Interference computation between polygons, lines and
|
||||
-- polyhedra with only triangular facets. These objects
|
||||
-- are polygonal representations of complex curves and
|
||||
-- triangulated representations of complex surfaces.
|
||||
|
||||
|
||||
uses Standard, TCollection, TColStd, gp, Bnd, IntAna2d
|
||||
|
||||
|
||||
is
|
||||
|
||||
-- Enumeration :
|
||||
|
||||
enumeration PIType is EXTERNAL, FACE, EDGE, VERTEX;
|
||||
---Purpose: Describes the different intersection point types for this
|
||||
-- application.
|
||||
|
||||
|
||||
-- Classes input data :
|
||||
|
||||
deferred class Polygon2d;
|
||||
|
||||
imported Array1OfLin;
|
||||
---Purpose: Describes a set of Straight Lines to intersect with the
|
||||
-- Polyhedron.
|
||||
|
||||
|
||||
|
||||
-- Classes output data :
|
||||
|
||||
class SectionPoint;
|
||||
|
||||
imported SeqOfSectionPoint;
|
||||
|
||||
|
||||
class SectionLine;
|
||||
|
||||
imported SeqOfSectionLine;
|
||||
|
||||
|
||||
class TangentZone;
|
||||
|
||||
imported SeqOfTangentZone;
|
||||
|
||||
|
||||
deferred class Interference;
|
||||
|
||||
-- Algorithms :
|
||||
|
||||
class Tool;
|
||||
|
||||
|
||||
class InterferencePolygon2d;
|
||||
---Purpose: Computes the interference between two polygons in 2d.
|
||||
-- Result : points of intersections and zones of tangence.
|
||||
|
||||
generic class InterferencePolygonPolyhedron;
|
||||
---Purpose: Computes the interference between a polygon or a straight
|
||||
-- line and a polyhedron. Points of intersection and zones
|
||||
-- of tangence.
|
||||
|
||||
|
||||
--- Package Methods :
|
||||
--
|
||||
|
||||
PlaneEquation (P1 : in Pnt from gp;
|
||||
P2 : in Pnt from gp;
|
||||
P3 : in Pnt from gp;
|
||||
NormalVector : out XYZ from gp;
|
||||
PolarDistance : out Real from Standard);
|
||||
---Purpose: Give the plane equation of the triangle <P1> <P2> <P3>.
|
||||
|
||||
|
||||
Contain (P1 : in Pnt from gp;
|
||||
P2 : in Pnt from gp;
|
||||
P3 : in Pnt from gp;
|
||||
ThePnt : in Pnt from gp)
|
||||
returns Boolean;
|
||||
---Purpose: Compute if the triangle <P1> <P2> <P3> contain <ThePnt>.
|
||||
|
||||
|
||||
end Intf;
|
@@ -14,13 +14,15 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Intf.ixx>
|
||||
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_XYZ.hxx>
|
||||
#include <Intf.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : PlaneEquation
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void Intf::PlaneEquation (const gp_Pnt& P1,
|
||||
const gp_Pnt& P2,
|
||||
const gp_Pnt& P3,
|
||||
|
91
src/Intf/Intf.hxx
Normal file
91
src/Intf/Intf.hxx
Normal file
@@ -0,0 +1,91 @@
|
||||
// Created on: 1991-05-23
|
||||
// Created by: Didier PIFFAULT
|
||||
// Copyright (c) 1991-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 _Intf_HeaderFile
|
||||
#define _Intf_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class gp_Pnt;
|
||||
class gp_XYZ;
|
||||
class Intf_Polygon2d;
|
||||
class Intf_SectionPoint;
|
||||
class Intf_SectionLine;
|
||||
class Intf_TangentZone;
|
||||
class Intf_Interference;
|
||||
class Intf_Tool;
|
||||
class Intf_InterferencePolygon2d;
|
||||
class Intf_InterferencePolygonPolyhedron;
|
||||
|
||||
|
||||
//! Interference computation between polygons, lines and
|
||||
//! polyhedra with only triangular facets. These objects
|
||||
//! are polygonal representations of complex curves and
|
||||
//! triangulated representations of complex surfaces.
|
||||
class Intf
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Computes the interference between two polygons in 2d.
|
||||
//! Result : points of intersections and zones of tangence.
|
||||
//! Computes the interference between a polygon or a straight
|
||||
//! line and a polyhedron. Points of intersection and zones
|
||||
//! of tangence.
|
||||
//! Give the plane equation of the triangle <P1> <P2> <P3>.
|
||||
Standard_EXPORT static void PlaneEquation (const gp_Pnt& P1, const gp_Pnt& P2, const gp_Pnt& P3, gp_XYZ& NormalVector, Standard_Real& PolarDistance);
|
||||
|
||||
//! Compute if the triangle <P1> <P2> <P3> contain <ThePnt>.
|
||||
Standard_EXPORT static Standard_Boolean Contain (const gp_Pnt& P1, const gp_Pnt& P2, const gp_Pnt& P3, const gp_Pnt& ThePnt);
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
friend class Intf_Polygon2d;
|
||||
friend class Intf_SectionPoint;
|
||||
friend class Intf_SectionLine;
|
||||
friend class Intf_TangentZone;
|
||||
friend class Intf_Interference;
|
||||
friend class Intf_Tool;
|
||||
friend class Intf_InterferencePolygon2d;
|
||||
friend class Intf_InterferencePolygonPolyhedron;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Intf_HeaderFile
|
@@ -1,133 +0,0 @@
|
||||
-- Created on: 1991-06-24
|
||||
-- Created by: Didier PIFFAULT
|
||||
-- Copyright (c) 1991-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.
|
||||
|
||||
deferred class Interference from Intf
|
||||
|
||||
---Purpose: Describes the Interference computation result
|
||||
-- between polygon2d or polygon3d or polyhedron
|
||||
-- (as three sequences of points of intersection,
|
||||
-- polylines of intersection and zones de tangence).
|
||||
|
||||
uses SectionPoint from Intf,
|
||||
SeqOfSectionPoint from Intf,
|
||||
SectionLine from Intf,
|
||||
SeqOfSectionLine from Intf,
|
||||
TangentZone from Intf,
|
||||
SeqOfTangentZone from Intf
|
||||
|
||||
|
||||
raises OutOfRange from Standard
|
||||
|
||||
|
||||
is Initialize(Self : Boolean from Standard);
|
||||
|
||||
SelfInterference(me : in out;
|
||||
Self : Boolean from Standard) is protected;
|
||||
---Purpose: Only one argument for the intersection.
|
||||
|
||||
NbSectionPoints(me)
|
||||
returns Integer is static;
|
||||
---Purpose: Gives the number of points of intersection in the
|
||||
-- interference.
|
||||
---C++: inline
|
||||
|
||||
PntValue (me;
|
||||
Index : in Integer)
|
||||
returns SectionPoint from Intf
|
||||
raises OutOfRange from Standard
|
||||
is static;
|
||||
---Purpose: Gives the point of intersection of address Index in
|
||||
-- the interference.
|
||||
--
|
||||
---C++: return const &
|
||||
---C++: inline
|
||||
|
||||
NbSectionLines (me)
|
||||
returns Integer is static;
|
||||
---Purpose: Gives the number of polylines of intersection in the
|
||||
-- interference.
|
||||
---C++: inline
|
||||
|
||||
LineValue (me;
|
||||
Index : in Integer)
|
||||
returns SectionLine from Intf
|
||||
raises OutOfRange from Standard
|
||||
is static;
|
||||
---Purpose: Gives the polyline of intersection at address <Index> in
|
||||
-- the interference.
|
||||
--
|
||||
---C++: return const &
|
||||
---C++: inline
|
||||
|
||||
NbTangentZones (me)
|
||||
returns Integer is static;
|
||||
---Purpose: Gives the number of zones of tangence in the interference.
|
||||
---C++: inline
|
||||
|
||||
ZoneValue (me;
|
||||
Index : in Integer)
|
||||
returns TangentZone from Intf
|
||||
raises OutOfRange from Standard
|
||||
is static;
|
||||
---Purpose: Gives the zone of tangence at address Index in the
|
||||
-- interference.
|
||||
--
|
||||
---C++: return const &
|
||||
---C++: inline
|
||||
|
||||
GetTolerance (me)
|
||||
returns Real
|
||||
is static;
|
||||
---Purpose: Gives the tolerance used for the calculation.
|
||||
---C++: inline
|
||||
|
||||
-- Implementation functions :
|
||||
|
||||
Contains (me;
|
||||
ThePnt : in SectionPoint from Intf)
|
||||
returns Boolean
|
||||
is static;
|
||||
---Purpose: Tests if the polylines of intersection or the zones of
|
||||
-- tangence contain the point of intersection <ThePnt>.
|
||||
|
||||
|
||||
Insert (me : in out;
|
||||
TheZone : in TangentZone from Intf)
|
||||
returns Boolean
|
||||
is static;
|
||||
---Purpose: Inserts a new zone of tangence in the current list of
|
||||
-- tangent zones of the interference and returns True
|
||||
-- when done.
|
||||
|
||||
|
||||
Insert (me : in out;
|
||||
pdeb : in SectionPoint from Intf;
|
||||
pfin : in SectionPoint from Intf)
|
||||
is static;
|
||||
---Purpose: Insert a new segment of intersection in the current list of
|
||||
-- polylines of intersection of the interference.
|
||||
|
||||
|
||||
Dump (me) is static;
|
||||
|
||||
|
||||
fields mySPoins : SeqOfSectionPoint from Intf is protected;
|
||||
mySLines : SeqOfSectionLine from Intf is protected;
|
||||
myTZones : SeqOfTangentZone from Intf is protected;
|
||||
SelfIntf : Boolean from Standard is protected;
|
||||
Tolerance : Real from Standard is protected;
|
||||
|
||||
end Interference;
|
@@ -14,15 +14,19 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Intf_Interference.ixx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <Intf_Interference.hxx>
|
||||
#include <Intf_SectionLine.hxx>
|
||||
#include <Intf_SectionPoint.hxx>
|
||||
#include <Intf_TangentZone.hxx>
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : Intf_Interference
|
||||
//purpose : Initialize for a deferred interference.
|
||||
//=======================================================================
|
||||
|
||||
Intf_Interference::Intf_Interference (const Standard_Boolean Self)
|
||||
: SelfIntf(Self)
|
||||
{}
|
||||
|
122
src/Intf/Intf_Interference.hxx
Normal file
122
src/Intf/Intf_Interference.hxx
Normal file
@@ -0,0 +1,122 @@
|
||||
// Created on: 1991-06-24
|
||||
// Created by: Didier PIFFAULT
|
||||
// Copyright (c) 1991-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 _Intf_Interference_HeaderFile
|
||||
#define _Intf_Interference_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Intf_SeqOfSectionPoint.hxx>
|
||||
#include <Intf_SeqOfSectionLine.hxx>
|
||||
#include <Intf_SeqOfTangentZone.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
class Standard_OutOfRange;
|
||||
class Intf_SectionPoint;
|
||||
class Intf_SectionLine;
|
||||
class Intf_TangentZone;
|
||||
|
||||
|
||||
//! Describes the Interference computation result
|
||||
//! between polygon2d or polygon3d or polyhedron
|
||||
//! (as three sequences of points of intersection,
|
||||
//! polylines of intersection and zones de tangence).
|
||||
class Intf_Interference
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Gives the number of points of intersection in the
|
||||
//! interference.
|
||||
Standard_Integer NbSectionPoints() const;
|
||||
|
||||
//! Gives the point of intersection of address Index in
|
||||
//! the interference.
|
||||
const Intf_SectionPoint& PntValue (const Standard_Integer Index) const;
|
||||
|
||||
//! Gives the number of polylines of intersection in the
|
||||
//! interference.
|
||||
Standard_Integer NbSectionLines() const;
|
||||
|
||||
//! Gives the polyline of intersection at address <Index> in
|
||||
//! the interference.
|
||||
const Intf_SectionLine& LineValue (const Standard_Integer Index) const;
|
||||
|
||||
//! Gives the number of zones of tangence in the interference.
|
||||
Standard_Integer NbTangentZones() const;
|
||||
|
||||
//! Gives the zone of tangence at address Index in the
|
||||
//! interference.
|
||||
const Intf_TangentZone& ZoneValue (const Standard_Integer Index) const;
|
||||
|
||||
//! Gives the tolerance used for the calculation.
|
||||
Standard_Real GetTolerance() const;
|
||||
|
||||
//! Tests if the polylines of intersection or the zones of
|
||||
//! tangence contain the point of intersection <ThePnt>.
|
||||
Standard_EXPORT Standard_Boolean Contains (const Intf_SectionPoint& ThePnt) const;
|
||||
|
||||
//! Inserts a new zone of tangence in the current list of
|
||||
//! tangent zones of the interference and returns True
|
||||
//! when done.
|
||||
Standard_EXPORT Standard_Boolean Insert (const Intf_TangentZone& TheZone);
|
||||
|
||||
//! Insert a new segment of intersection in the current list of
|
||||
//! polylines of intersection of the interference.
|
||||
Standard_EXPORT void Insert (const Intf_SectionPoint& pdeb, const Intf_SectionPoint& pfin);
|
||||
|
||||
Standard_EXPORT void Dump() const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
Standard_EXPORT Intf_Interference(const Standard_Boolean Self);
|
||||
|
||||
//! Only one argument for the intersection.
|
||||
Standard_EXPORT void SelfInterference (const Standard_Boolean Self);
|
||||
|
||||
|
||||
Intf_SeqOfSectionPoint mySPoins;
|
||||
Intf_SeqOfSectionLine mySLines;
|
||||
Intf_SeqOfTangentZone myTZones;
|
||||
Standard_Boolean SelfIntf;
|
||||
Standard_Real Tolerance;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <Intf_Interference.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Intf_Interference_HeaderFile
|
@@ -1,94 +0,0 @@
|
||||
-- Created on: 1992-09-28
|
||||
-- Created by: Didier PIFFAULT
|
||||
-- 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 InterferencePolygon2d from Intf
|
||||
|
||||
inherits Interference from Intf
|
||||
|
||||
---Purpose: Computes the interference between two polygons or
|
||||
-- the self intersection of a polygon in two
|
||||
-- dimensions.
|
||||
|
||||
uses Pnt2d from gp,
|
||||
SectionPoint from Intf,
|
||||
SeqOfSectionPoint from Intf,
|
||||
TangentZone from Intf,
|
||||
SeqOfTangentZone from Intf,
|
||||
Polygon2d from Intf
|
||||
|
||||
raises OutOfRange from Standard
|
||||
|
||||
is
|
||||
|
||||
-- Interface :
|
||||
|
||||
Create returns InterferencePolygon2d from Intf;
|
||||
---Purpose: Constructs an empty interference of Polygon.
|
||||
|
||||
|
||||
Create (Obje1, Obje2 : in Polygon2d)
|
||||
returns InterferencePolygon2d from Intf;
|
||||
---Purpose: Constructs and computes an interference between two Polygons.
|
||||
|
||||
|
||||
Create (Obje : in Polygon2d)
|
||||
returns InterferencePolygon2d from Intf;
|
||||
---Purpose: Constructs and computes the auto interference of a Polygon.
|
||||
|
||||
|
||||
Perform (me : in out;
|
||||
Obje1, Obje2 : in Polygon2d);
|
||||
---Purpose: Computes an interference between two Polygons.
|
||||
|
||||
|
||||
Perform (me : in out;
|
||||
Obje : in Polygon2d);
|
||||
---Purpose: Computes the self interference of a Polygon.
|
||||
|
||||
|
||||
Pnt2dValue (me;
|
||||
Index : in Integer)
|
||||
returns Pnt2d from gp
|
||||
raises OutOfRange from Standard
|
||||
is static;
|
||||
---Purpose: Gives the geometrical 2d point of the intersection
|
||||
-- point at address <Index> in the interference.
|
||||
|
||||
|
||||
-- Implementation :
|
||||
|
||||
Interference (me : in out; Obje1, Obje2 : in Polygon2d)
|
||||
is private;
|
||||
|
||||
Interference (me : in out; Obje : in Polygon2d)
|
||||
is private;
|
||||
|
||||
Clean (me : in out) is private;
|
||||
|
||||
Intersect (me : in out;
|
||||
iO, iT : Integer from Standard;
|
||||
BegO, EndO : in Pnt2d from gp;
|
||||
BegT, EndT : in Pnt2d from gp)
|
||||
is private;
|
||||
---Purpose: Computes the intersection between two segments
|
||||
-- <BegO><EndO> et <BegT><EndT>.
|
||||
|
||||
fields
|
||||
|
||||
oClos, tClos : Boolean from Standard;
|
||||
nbso : Integer from Standard;
|
||||
|
||||
end InterferencePolygon2d;
|
@@ -15,15 +15,17 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Intf_InterferencePolygon2d.ixx>
|
||||
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <Bnd_Box2d.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <Intf_InterferencePolygon2d.hxx>
|
||||
#include <Intf_Polygon2d.hxx>
|
||||
#include <Intf_SectionPoint.hxx>
|
||||
#include <Intf_SeqOfSectionPoint.hxx>
|
||||
#include <Intf_TangentZone.hxx>
|
||||
#include <Intf_SeqOfTangentZone.hxx>
|
||||
#include <Intf_TangentZone.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
#include <TColStd_ListOfInteger.hxx>
|
||||
|
||||
// Angular precision (sinus) below that value two right segments
|
||||
|
97
src/Intf/Intf_InterferencePolygon2d.hxx
Normal file
97
src/Intf/Intf_InterferencePolygon2d.hxx
Normal file
@@ -0,0 +1,97 @@
|
||||
// Created on: 1992-09-28
|
||||
// Created by: Didier PIFFAULT
|
||||
// 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 _Intf_InterferencePolygon2d_HeaderFile
|
||||
#define _Intf_InterferencePolygon2d_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Intf_Interference.hxx>
|
||||
class Standard_OutOfRange;
|
||||
class Intf_Polygon2d;
|
||||
class gp_Pnt2d;
|
||||
|
||||
|
||||
//! Computes the interference between two polygons or
|
||||
//! the self intersection of a polygon in two
|
||||
//! dimensions.
|
||||
class Intf_InterferencePolygon2d : public Intf_Interference
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Constructs an empty interference of Polygon.
|
||||
Standard_EXPORT Intf_InterferencePolygon2d();
|
||||
|
||||
//! Constructs and computes an interference between two Polygons.
|
||||
Standard_EXPORT Intf_InterferencePolygon2d(const Intf_Polygon2d& Obje1, const Intf_Polygon2d& Obje2);
|
||||
|
||||
//! Constructs and computes the auto interference of a Polygon.
|
||||
Standard_EXPORT Intf_InterferencePolygon2d(const Intf_Polygon2d& Obje);
|
||||
|
||||
//! Computes an interference between two Polygons.
|
||||
Standard_EXPORT void Perform (const Intf_Polygon2d& Obje1, const Intf_Polygon2d& Obje2);
|
||||
|
||||
//! Computes the self interference of a Polygon.
|
||||
Standard_EXPORT void Perform (const Intf_Polygon2d& Obje);
|
||||
|
||||
//! Gives the geometrical 2d point of the intersection
|
||||
//! point at address <Index> in the interference.
|
||||
Standard_EXPORT gp_Pnt2d Pnt2dValue (const Standard_Integer Index) const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Standard_EXPORT void Interference (const Intf_Polygon2d& Obje1, const Intf_Polygon2d& Obje2);
|
||||
|
||||
Standard_EXPORT void Interference (const Intf_Polygon2d& Obje);
|
||||
|
||||
Standard_EXPORT void Clean();
|
||||
|
||||
//! Computes the intersection between two segments
|
||||
//! <BegO><EndO> et <BegT><EndT>.
|
||||
Standard_EXPORT void Intersect (const Standard_Integer iO, const Standard_Integer iT, const gp_Pnt2d& BegO, const gp_Pnt2d& EndO, const gp_Pnt2d& BegT, const gp_Pnt2d& EndT);
|
||||
|
||||
|
||||
Standard_Boolean oClos;
|
||||
Standard_Boolean tClos;
|
||||
Standard_Integer nbso;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Intf_InterferencePolygon2d_HeaderFile
|
@@ -1,186 +0,0 @@
|
||||
-- Created on: 1992-09-29
|
||||
-- Created by: Didier PIFFAULT
|
||||
-- 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.
|
||||
|
||||
generic class InterferencePolygonPolyhedron from Intf
|
||||
(Polygon3d as any;
|
||||
ToolPolygon3d as any; -- as ToolPolygon(Pnt,Polygon3d,Box)
|
||||
Polyhedron as any;
|
||||
ToolPolyh as any)
|
||||
inherits Interference from Intf
|
||||
|
||||
---Purpose: Computes the interference between a polygon and a
|
||||
-- Polyhedron.
|
||||
|
||||
uses Pnt from gp,
|
||||
Lin from gp,
|
||||
XYZ from gp,
|
||||
Array1OfLin from Intf,
|
||||
SectionPoint from Intf,
|
||||
SeqOfSectionPoint from Intf,
|
||||
TangentZone from Intf,
|
||||
SeqOfTangentZone from Intf,
|
||||
BoundSortBox from Bnd
|
||||
|
||||
is
|
||||
|
||||
-- Interface :
|
||||
|
||||
Create returns InterferencePolygonPolyhedron from Intf;
|
||||
---Purpose: Constructs an empty interference between Polygon and
|
||||
-- Polyhedron.
|
||||
|
||||
Create (thePolyg : in Polygon3d;
|
||||
thePolyh : in Polyhedron)
|
||||
returns InterferencePolygonPolyhedron from Intf;
|
||||
---Purpose: Constructs and computes an interference between the Polygon
|
||||
-- and the Polyhedron.
|
||||
|
||||
Create (theLin : in Lin from gp;
|
||||
thePolyh : in Polyhedron)
|
||||
returns InterferencePolygonPolyhedron from Intf;
|
||||
---Purpose: Constructs and computes an interference between the
|
||||
-- Straight Line and the Polyhedron.
|
||||
|
||||
Create (theLins : in Array1OfLin from Intf;
|
||||
thePolyh : in Polyhedron)
|
||||
returns InterferencePolygonPolyhedron from Intf;
|
||||
---Purpose: Constructs and computes an interference between the
|
||||
-- Straight Lines and the Polyhedron.
|
||||
|
||||
Perform (me : in out;
|
||||
thePolyg : in Polygon3d;
|
||||
thePolyh : in Polyhedron)
|
||||
---Purpose: Computes an interference between the Polygon and the
|
||||
-- Polyhedron.
|
||||
is static;
|
||||
|
||||
Perform (me : in out;
|
||||
theLin : in Lin from gp;
|
||||
thePolyh : Polyhedron)
|
||||
---Purpose: Computes an interference between the Straight Line and the
|
||||
-- Polyhedron.
|
||||
is static;
|
||||
|
||||
Perform (me : in out;
|
||||
theLins : in Array1OfLin from Intf;
|
||||
thePolyh : in Polyhedron)
|
||||
---Purpose: Computes an interference between the Straight Lines and
|
||||
-- the Polyhedron.
|
||||
is static;
|
||||
|
||||
|
||||
|
||||
|
||||
--------------- Optimisation : On Passe le Bnd_BoundSortBox
|
||||
|
||||
|
||||
Create (thePolyg : in Polygon3d;
|
||||
thePolyh : in Polyhedron;
|
||||
theBoundSB : in out BoundSortBox from Bnd)
|
||||
returns InterferencePolygonPolyhedron from Intf;
|
||||
---Purpose: Constructs and computes an interference between the Polygon
|
||||
-- and the Polyhedron.
|
||||
|
||||
Create (theLin : in Lin from gp;
|
||||
thePolyh : in Polyhedron;
|
||||
theBoundSB : in out BoundSortBox from Bnd)
|
||||
returns InterferencePolygonPolyhedron from Intf;
|
||||
---Purpose: Constructs and computes an interference between the
|
||||
-- Straight Line and the Polyhedron.
|
||||
|
||||
Create (theLins : in Array1OfLin from Intf;
|
||||
thePolyh : in Polyhedron;
|
||||
theBoundSB : in out BoundSortBox from Bnd)
|
||||
returns InterferencePolygonPolyhedron from Intf;
|
||||
---Purpose: Constructs and computes an interference between the
|
||||
-- Straight Lines and the Polyhedron.
|
||||
|
||||
Perform (me : in out;
|
||||
thePolyg : in Polygon3d;
|
||||
thePolyh : in Polyhedron;
|
||||
theBoundSB : in out BoundSortBox from Bnd)
|
||||
---Purpose: Computes an interference between the Polygon and the
|
||||
-- Polyhedron.
|
||||
is static;
|
||||
|
||||
Perform (me : in out;
|
||||
theLin : in Lin from gp;
|
||||
thePolyh : Polyhedron;
|
||||
theBoundSB : in out BoundSortBox from Bnd)
|
||||
---Purpose: Computes an interference between the Straight Line and the
|
||||
-- Polyhedron.
|
||||
is static;
|
||||
|
||||
Perform (me : in out;
|
||||
theLins : in Array1OfLin from Intf;
|
||||
thePolyh : in Polyhedron;
|
||||
theBoundSB : in out BoundSortBox from Bnd)
|
||||
---Purpose: Computes an interference between the Straight Lines and
|
||||
-- the Polyhedron.
|
||||
is static;
|
||||
|
||||
|
||||
|
||||
Interference (me : in out;
|
||||
thePolyg : in Polygon3d;
|
||||
thePolyh : in Polyhedron;
|
||||
theBoundSB : in out BoundSortBox from Bnd)
|
||||
is static;
|
||||
---Purpose: Compares the boundings between the segment of <thePolyg> and
|
||||
-- the facets of <thePolyh>.
|
||||
|
||||
|
||||
|
||||
|
||||
-- Implementation :
|
||||
|
||||
Interference (me : in out;
|
||||
thePolyg : in Polygon3d;
|
||||
thePolyh : in Polyhedron)
|
||||
is static;
|
||||
---Purpose: Compares the boundings between the segment of <thePolyg> and
|
||||
-- the facets of <thePolyh>.
|
||||
|
||||
|
||||
Intersect (me : in out;
|
||||
BegO : in Pnt from gp;
|
||||
EndO : in Pnt from gp;
|
||||
Infinite : Boolean from Standard;
|
||||
TTri : in Integer from Standard;
|
||||
thePolyh : in Polyhedron)
|
||||
is static private;
|
||||
---Purpose: Computes the intersection between the segment <BegO><EndO>
|
||||
-- and the triangle <TTri> of <thePolyh>.
|
||||
|
||||
Intersect (me : in out;
|
||||
BegO : in Pnt from gp;
|
||||
EndO : in Pnt from gp;
|
||||
Infinite : Boolean from Standard;
|
||||
TTri : in Integer from Standard;
|
||||
thePolyh : in Polyhedron;
|
||||
TriNormal: in XYZ from gp;
|
||||
TriDp : in Real from Standard;
|
||||
dBegTri : in Real from Standard;
|
||||
dEndTri : in Real from Standard)
|
||||
is static private;
|
||||
---Purpose: Computes the intersection between the segment <BegO><EndO>
|
||||
-- and the triangle <TTri> of <thePolyh>.
|
||||
|
||||
fields
|
||||
BeginOfClosedPolygon: Boolean from Standard;
|
||||
iLin : Integer from Standard;
|
||||
|
||||
end InterferencePolygonPolyhedron;
|
30
src/Intf/Intf_PIType.hxx
Normal file
30
src/Intf/Intf_PIType.hxx
Normal file
@@ -0,0 +1,30 @@
|
||||
// Created on: 1991-05-23
|
||||
// Created by: Didier PIFFAULT
|
||||
// Copyright (c) 1991-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 _Intf_PIType_HeaderFile
|
||||
#define _Intf_PIType_HeaderFile
|
||||
|
||||
//! Describes the different intersection point types for this
|
||||
//! application.
|
||||
enum Intf_PIType
|
||||
{
|
||||
Intf_EXTERNAL,
|
||||
Intf_FACE,
|
||||
Intf_EDGE,
|
||||
Intf_VERTEX
|
||||
};
|
||||
|
||||
#endif // _Intf_PIType_HeaderFile
|
@@ -1,54 +0,0 @@
|
||||
-- Created on: 2012-02-10
|
||||
-- Created by: Serey ZERCHANINOV
|
||||
-- Copyright (c) 2012-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.
|
||||
|
||||
deferred class Polygon2d from Intf
|
||||
|
||||
---Purpose: Describes the necessary polygon information to compute
|
||||
-- the interferences.
|
||||
|
||||
uses Pnt2d from gp,
|
||||
Box2d from Bnd
|
||||
|
||||
raises OutOfRange from Standard
|
||||
|
||||
is
|
||||
|
||||
Bounding (me)
|
||||
returns Box2d from Bnd;
|
||||
---C++: return const &
|
||||
---C++: inline
|
||||
---Purpose: Returns the bounding box of the polygon.
|
||||
|
||||
Closed (me)
|
||||
returns Boolean from Standard is virtual;
|
||||
---Purpose: Returns True if the polyline is closed.
|
||||
---C++: alias " virtual ~Intf_Polygon2d() {}"
|
||||
|
||||
DeflectionOverEstimation (me) returns Real from Standard is deferred;
|
||||
---Purpose: Returns the tolerance of the polygon.
|
||||
|
||||
NbSegments (me) returns Integer from Standard is deferred;
|
||||
---Purpose: Returns the number of Segments in the polyline.
|
||||
|
||||
Segment (me; theIndex : in Integer from Standard;
|
||||
theBegin, theEnd : in out Pnt2d from gp)
|
||||
raises OutOfRange from Standard is deferred;
|
||||
---Purpose: Returns the points of the segment <Index> in the Polygon.
|
||||
|
||||
fields
|
||||
|
||||
myBox : Box2d from Bnd is protected;
|
||||
|
||||
end Polygon2d;
|
@@ -13,13 +13,16 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Intf_Polygon2d.ixx>
|
||||
|
||||
#include <Bnd_Box2d.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <Intf_Polygon2d.hxx>
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : Closed
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Standard_Boolean Intf_Polygon2d::Closed () const
|
||||
{
|
||||
return Standard_False;
|
||||
|
82
src/Intf/Intf_Polygon2d.hxx
Normal file
82
src/Intf/Intf_Polygon2d.hxx
Normal file
@@ -0,0 +1,82 @@
|
||||
// Created on: 2012-02-10
|
||||
// Created by: Serey ZERCHANINOV
|
||||
// Copyright (c) 2012-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 _Intf_Polygon2d_HeaderFile
|
||||
#define _Intf_Polygon2d_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Bnd_Box2d.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
class Standard_OutOfRange;
|
||||
class Bnd_Box2d;
|
||||
class gp_Pnt2d;
|
||||
|
||||
|
||||
//! Describes the necessary polygon information to compute
|
||||
//! the interferences.
|
||||
class Intf_Polygon2d
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Returns the bounding box of the polygon.
|
||||
const Bnd_Box2d& Bounding() const;
|
||||
|
||||
//! Returns True if the polyline is closed.
|
||||
Standard_EXPORT virtual Standard_Boolean Closed() const;
|
||||
virtual ~Intf_Polygon2d() {}
|
||||
|
||||
//! Returns the tolerance of the polygon.
|
||||
Standard_EXPORT virtual Standard_Real DeflectionOverEstimation() const = 0;
|
||||
|
||||
//! Returns the number of Segments in the polyline.
|
||||
Standard_EXPORT virtual Standard_Integer NbSegments() const = 0;
|
||||
|
||||
//! Returns the points of the segment <Index> in the Polygon.
|
||||
Standard_EXPORT virtual void Segment (const Standard_Integer theIndex, gp_Pnt2d& theBegin, gp_Pnt2d& theEnd) const = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
Bnd_Box2d myBox;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <Intf_Polygon2d.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Intf_Polygon2d_HeaderFile
|
@@ -1,129 +0,0 @@
|
||||
-- Created on: 1991-06-18
|
||||
-- Created by: Didier PIFFAULT
|
||||
-- Copyright (c) 1991-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 SectionLine from Intf
|
||||
|
||||
---Purpose: Describe a polyline of intersection between two
|
||||
-- polyhedra as a sequence of points of intersection.
|
||||
|
||||
|
||||
uses SectionPoint from Intf,
|
||||
SeqOfSectionPoint from Intf
|
||||
|
||||
|
||||
raises OutOfRange from Standard
|
||||
|
||||
|
||||
is
|
||||
|
||||
-- User Interface :
|
||||
|
||||
NumberOfPoints (me)
|
||||
returns Integer is static;
|
||||
---Purpose: Returns number of points in this SectionLine.
|
||||
---C++: inline
|
||||
|
||||
GetPoint (me;
|
||||
Index : in Integer)
|
||||
returns SectionPoint from Intf
|
||||
raises OutOfRange from Standard
|
||||
is static;
|
||||
---Purpose: Gives the point of intersection of address <Index> in the
|
||||
-- SectionLine.
|
||||
--
|
||||
---C++: return const &
|
||||
|
||||
|
||||
IsClosed (me)
|
||||
returns Boolean is static;
|
||||
---Purpose: Returns True if the SectionLine is closed.
|
||||
|
||||
|
||||
Contains (me;
|
||||
ThePI : in SectionPoint from Intf)
|
||||
returns Boolean is static;
|
||||
---Purpose: Returns True if ThePI is in the SectionLine <me>.
|
||||
|
||||
|
||||
IsEnd (me;
|
||||
ThePI : in SectionPoint from Intf)
|
||||
returns Integer is static;
|
||||
---Purpose: Checks if <ThePI> is an end of the SectionLine. Returns 1
|
||||
-- for the beginning, 2 for the end, otherwise 0.
|
||||
|
||||
|
||||
IsEqual (me;
|
||||
Other : in SectionLine from Intf) -- in like me);
|
||||
returns Boolean is static;
|
||||
---Purpose: Compares two SectionLines.
|
||||
--
|
||||
---C++: alias operator ==
|
||||
|
||||
-- Builder :
|
||||
|
||||
Create returns SectionLine;
|
||||
---Purpose: Constructs an empty SectionLine.
|
||||
|
||||
Create (Other : SectionLine)
|
||||
returns SectionLine;
|
||||
---Purpose: Copies a SectionLine.
|
||||
|
||||
|
||||
Append (me : in out;
|
||||
Pi : in SectionPoint from Intf)
|
||||
is static;
|
||||
---Purpose: Adds a point at the end of the SectionLine.
|
||||
|
||||
|
||||
Append (me : in out;
|
||||
LS : in out SectionLine from Intf)
|
||||
is static;
|
||||
---Purpose: Concatenates the SectionLine <LS> at the end of the
|
||||
-- SectionLine <me>.
|
||||
|
||||
|
||||
Prepend (me : in out;
|
||||
Pi : in SectionPoint from Intf)
|
||||
is static;
|
||||
---Purpose: Adds a point to the beginning of the SectionLine <me>.
|
||||
|
||||
|
||||
Prepend (me : in out;
|
||||
LS : in out SectionLine from Intf)
|
||||
is static;
|
||||
---Purpose: Concatenates a SectionLine <LS> at the beginning of the
|
||||
-- SectionLine <me>.
|
||||
|
||||
|
||||
Reverse (me : in out)
|
||||
is static;
|
||||
---Purpose: Reverses the order of the elements of the SectionLine.
|
||||
|
||||
|
||||
Close (me : in out)
|
||||
is static;
|
||||
---Purpose: Closes the SectionLine.
|
||||
|
||||
|
||||
Dump (me;
|
||||
Indent : in Integer) is static;
|
||||
|
||||
fields
|
||||
|
||||
myPoints : SeqOfSectionPoint from Intf;
|
||||
closed : Boolean;
|
||||
|
||||
end SectionLine;
|
@@ -14,13 +14,15 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Intf_SectionLine.ixx>
|
||||
|
||||
#include <Intf_SectionLine.hxx>
|
||||
#include <Intf_SectionPoint.hxx>
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : Intf_SectionLine
|
||||
//purpose : Construct
|
||||
//=======================================================================
|
||||
|
||||
Intf_SectionLine::Intf_SectionLine ()
|
||||
: closed(Standard_False)
|
||||
{}
|
||||
|
118
src/Intf/Intf_SectionLine.hxx
Normal file
118
src/Intf/Intf_SectionLine.hxx
Normal file
@@ -0,0 +1,118 @@
|
||||
// Created on: 1991-06-18
|
||||
// Created by: Didier PIFFAULT
|
||||
// Copyright (c) 1991-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 _Intf_SectionLine_HeaderFile
|
||||
#define _Intf_SectionLine_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Intf_SeqOfSectionPoint.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
class Standard_OutOfRange;
|
||||
class Intf_SectionPoint;
|
||||
|
||||
|
||||
//! Describe a polyline of intersection between two
|
||||
//! polyhedra as a sequence of points of intersection.
|
||||
class Intf_SectionLine
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Returns number of points in this SectionLine.
|
||||
Standard_Integer NumberOfPoints() const;
|
||||
|
||||
//! Gives the point of intersection of address <Index> in the
|
||||
//! SectionLine.
|
||||
Standard_EXPORT const Intf_SectionPoint& GetPoint (const Standard_Integer Index) const;
|
||||
|
||||
//! Returns True if the SectionLine is closed.
|
||||
Standard_EXPORT Standard_Boolean IsClosed() const;
|
||||
|
||||
//! Returns True if ThePI is in the SectionLine <me>.
|
||||
Standard_EXPORT Standard_Boolean Contains (const Intf_SectionPoint& ThePI) const;
|
||||
|
||||
//! Checks if <ThePI> is an end of the SectionLine. Returns 1
|
||||
//! for the beginning, 2 for the end, otherwise 0.
|
||||
Standard_EXPORT Standard_Integer IsEnd (const Intf_SectionPoint& ThePI) const;
|
||||
|
||||
//! Compares two SectionLines.
|
||||
Standard_EXPORT Standard_Boolean IsEqual (const Intf_SectionLine& Other) const;
|
||||
Standard_Boolean operator == (const Intf_SectionLine& Other) const
|
||||
{
|
||||
return IsEqual(Other);
|
||||
}
|
||||
|
||||
//! Constructs an empty SectionLine.
|
||||
Standard_EXPORT Intf_SectionLine();
|
||||
|
||||
//! Copies a SectionLine.
|
||||
Standard_EXPORT Intf_SectionLine(const Intf_SectionLine& Other);
|
||||
|
||||
//! Adds a point at the end of the SectionLine.
|
||||
Standard_EXPORT void Append (const Intf_SectionPoint& Pi);
|
||||
|
||||
//! Concatenates the SectionLine <LS> at the end of the
|
||||
//! SectionLine <me>.
|
||||
Standard_EXPORT void Append (Intf_SectionLine& LS);
|
||||
|
||||
//! Adds a point to the beginning of the SectionLine <me>.
|
||||
Standard_EXPORT void Prepend (const Intf_SectionPoint& Pi);
|
||||
|
||||
//! Concatenates a SectionLine <LS> at the beginning of the
|
||||
//! SectionLine <me>.
|
||||
Standard_EXPORT void Prepend (Intf_SectionLine& LS);
|
||||
|
||||
//! Reverses the order of the elements of the SectionLine.
|
||||
Standard_EXPORT void Reverse();
|
||||
|
||||
//! Closes the SectionLine.
|
||||
Standard_EXPORT void Close();
|
||||
|
||||
Standard_EXPORT void Dump (const Standard_Integer Indent) const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Intf_SeqOfSectionPoint myPoints;
|
||||
Standard_Boolean closed;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <Intf_SectionLine.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Intf_SectionLine_HeaderFile
|
@@ -1,175 +0,0 @@
|
||||
-- Created on: 1991-06-18
|
||||
-- Created by: Didier PIFFAULT
|
||||
-- Copyright (c) 1991-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 SectionPoint from Intf
|
||||
|
||||
---Purpose: Describes an intersection point between polygons and
|
||||
-- polyedra.
|
||||
|
||||
uses Boolean from Standard,
|
||||
Integer from Standard,
|
||||
Real from Standard,
|
||||
Pnt from gp,
|
||||
Pnt2d from gp,
|
||||
PIType from Intf
|
||||
|
||||
is
|
||||
|
||||
-- User Interface :
|
||||
|
||||
Pnt (me)
|
||||
returns Pnt from gp is static;
|
||||
---Purpose: Returns the location of the SectionPoint.
|
||||
---C++: return const &
|
||||
|
||||
|
||||
ParamOnFirst (me)
|
||||
returns Real from Standard is static;
|
||||
---Purpose: Returns the cumulated Parameter of the SectionPoint on the
|
||||
-- first element.
|
||||
--
|
||||
---C++: inline
|
||||
|
||||
ParamOnSecond (me)
|
||||
returns Real from Standard is static;
|
||||
---Purpose: Returns the cumulated Parameter of the section point on the
|
||||
-- second element.
|
||||
--
|
||||
---C++: inline
|
||||
|
||||
TypeOnFirst (me)
|
||||
returns PIType is static;
|
||||
---Purpose: Returns the type of the section point on the first element.
|
||||
--
|
||||
---C++: inline
|
||||
|
||||
TypeOnSecond (me)
|
||||
returns PIType is static;
|
||||
---Purpose: Returns the type of the section point on the second
|
||||
-- element.
|
||||
--
|
||||
---C++: inline
|
||||
|
||||
InfoFirst (me;
|
||||
Dim : out PIType;
|
||||
Add1 : out Integer;
|
||||
Add2 : out Integer;
|
||||
Param : out Real) is static;
|
||||
InfoFirst (me;
|
||||
Dim : out PIType;
|
||||
Addr : out Integer;
|
||||
Param : out Real) is static;
|
||||
---Purpose: Gives the datas about the first argument of the
|
||||
-- Interference.
|
||||
|
||||
|
||||
|
||||
InfoSecond (me;
|
||||
Dim : out PIType;
|
||||
Add1 : out Integer;
|
||||
Add2 : out Integer;
|
||||
Param : out Real) is static;
|
||||
InfoSecond (me;
|
||||
Dim : out PIType;
|
||||
Addr : out Integer;
|
||||
Param : out Real) is static;
|
||||
---Purpose: Gives the datas about the second argument of the
|
||||
-- Interference.
|
||||
|
||||
|
||||
Incidence (me)
|
||||
returns Real is static;
|
||||
---Purpose: Gives the incidence at this section point. The incidence
|
||||
-- between the two triangles is given by the cosine. The best
|
||||
-- incidence is 0. (PI/2). The worst is 1. (null angle).
|
||||
|
||||
|
||||
IsEqual (me;
|
||||
Other : in SectionPoint from Intf) -- in like me);
|
||||
returns Boolean is static;
|
||||
---Purpose: Returns True if the two SectionPoint have the same logical
|
||||
-- informations.
|
||||
--
|
||||
---C++: alias operator==
|
||||
---C++: inline
|
||||
|
||||
IsOnSameEdge (me;
|
||||
Other : in SectionPoint from Intf) -- in like me);
|
||||
returns Boolean is static;
|
||||
---Purpose: Returns True if the two SectionPoints are on the same edge
|
||||
-- of the first or the second element.
|
||||
|
||||
|
||||
-- Constructor :
|
||||
|
||||
|
||||
Create;
|
||||
|
||||
Create (Where : in Pnt from gp;
|
||||
DimeO : in PIType;
|
||||
AddrO1 : in Integer;
|
||||
AddrO2 : in Integer;
|
||||
ParamO : in Real;
|
||||
DimeT : in PIType;
|
||||
AddrT1 : in Integer;
|
||||
AddrT2 : in Integer;
|
||||
ParamT : in Real;
|
||||
Incid : in Real)
|
||||
returns SectionPoint;
|
||||
---Purpose: Builds a SectionPoint with the respective dimensions
|
||||
-- (vertex edge or face) of the concerned arguments and their
|
||||
-- addresses in the Topological structure.
|
||||
|
||||
Create (Where : in Pnt2d from gp;
|
||||
DimeO : in PIType;
|
||||
AddrO1 : in Integer;
|
||||
ParamO : in Real;
|
||||
DimeT : in PIType;
|
||||
AddrT1 : in Integer;
|
||||
ParamT : in Real;
|
||||
Incid : in Real)
|
||||
returns SectionPoint;
|
||||
---Purpose: Builds a SectionPoint 2d with the respective dimensions
|
||||
-- (vertex or edge) of the concerned arguments and their
|
||||
-- addresses in the Topological structure.
|
||||
|
||||
|
||||
Merge (me : in out;
|
||||
Other : in out SectionPoint from Intf)
|
||||
-- in out like me
|
||||
is static;
|
||||
---Purpose: Merges two SectionPoints.
|
||||
|
||||
|
||||
-- Test needings :
|
||||
|
||||
Dump (me;
|
||||
Indent : in Integer) is static;
|
||||
|
||||
fields
|
||||
|
||||
myPnt : Pnt from gp;
|
||||
DimenObje : PIType from Intf;
|
||||
IndexO1 : Integer from Standard;
|
||||
IndexO2 : Integer from Standard;
|
||||
ParamObje : Real from Standard;
|
||||
DimenTool : PIType from Intf;
|
||||
IndexT1 : Integer from Standard;
|
||||
IndexT2 : Integer from Standard;
|
||||
ParamTool : Real from Standard;
|
||||
Incide : Real from Standard;
|
||||
|
||||
end SectionPoint;
|
@@ -14,8 +14,10 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Intf_SectionPoint.ixx>
|
||||
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <Intf_SectionPoint.hxx>
|
||||
|
||||
#define DEBUG_INTFSECTIONPOINT 0
|
||||
|
||||
|
140
src/Intf/Intf_SectionPoint.hxx
Normal file
140
src/Intf/Intf_SectionPoint.hxx
Normal file
@@ -0,0 +1,140 @@
|
||||
// Created on: 1991-06-18
|
||||
// Created by: Didier PIFFAULT
|
||||
// Copyright (c) 1991-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 _Intf_SectionPoint_HeaderFile
|
||||
#define _Intf_SectionPoint_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <Intf_PIType.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class gp_Pnt;
|
||||
class gp_Pnt2d;
|
||||
|
||||
|
||||
//! Describes an intersection point between polygons and
|
||||
//! polyedra.
|
||||
class Intf_SectionPoint
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Returns the location of the SectionPoint.
|
||||
Standard_EXPORT const gp_Pnt& Pnt() const;
|
||||
|
||||
//! Returns the cumulated Parameter of the SectionPoint on the
|
||||
//! first element.
|
||||
Standard_Real ParamOnFirst() const;
|
||||
|
||||
//! Returns the cumulated Parameter of the section point on the
|
||||
//! second element.
|
||||
Standard_Real ParamOnSecond() const;
|
||||
|
||||
//! Returns the type of the section point on the first element.
|
||||
Intf_PIType TypeOnFirst() const;
|
||||
|
||||
//! Returns the type of the section point on the second
|
||||
//! element.
|
||||
Intf_PIType TypeOnSecond() const;
|
||||
|
||||
Standard_EXPORT void InfoFirst (Intf_PIType& Dim, Standard_Integer& Add1, Standard_Integer& Add2, Standard_Real& Param) const;
|
||||
|
||||
//! Gives the datas about the first argument of the
|
||||
//! Interference.
|
||||
Standard_EXPORT void InfoFirst (Intf_PIType& Dim, Standard_Integer& Addr, Standard_Real& Param) const;
|
||||
|
||||
Standard_EXPORT void InfoSecond (Intf_PIType& Dim, Standard_Integer& Add1, Standard_Integer& Add2, Standard_Real& Param) const;
|
||||
|
||||
//! Gives the datas about the second argument of the
|
||||
//! Interference.
|
||||
Standard_EXPORT void InfoSecond (Intf_PIType& Dim, Standard_Integer& Addr, Standard_Real& Param) const;
|
||||
|
||||
//! Gives the incidence at this section point. The incidence
|
||||
//! between the two triangles is given by the cosine. The best
|
||||
//! incidence is 0. (PI/2). The worst is 1. (null angle).
|
||||
Standard_EXPORT Standard_Real Incidence() const;
|
||||
|
||||
//! Returns True if the two SectionPoint have the same logical
|
||||
//! informations.
|
||||
Standard_Boolean IsEqual (const Intf_SectionPoint& Other) const;
|
||||
Standard_Boolean operator== (const Intf_SectionPoint& Other) const
|
||||
{
|
||||
return IsEqual(Other);
|
||||
}
|
||||
|
||||
//! Returns True if the two SectionPoints are on the same edge
|
||||
//! of the first or the second element.
|
||||
Standard_EXPORT Standard_Boolean IsOnSameEdge (const Intf_SectionPoint& Other) const;
|
||||
|
||||
Standard_EXPORT Intf_SectionPoint();
|
||||
|
||||
//! Builds a SectionPoint with the respective dimensions
|
||||
//! (vertex edge or face) of the concerned arguments and their
|
||||
//! addresses in the Topological structure.
|
||||
Standard_EXPORT Intf_SectionPoint(const gp_Pnt& Where, const Intf_PIType DimeO, const Standard_Integer AddrO1, const Standard_Integer AddrO2, const Standard_Real ParamO, const Intf_PIType DimeT, const Standard_Integer AddrT1, const Standard_Integer AddrT2, const Standard_Real ParamT, const Standard_Real Incid);
|
||||
|
||||
//! Builds a SectionPoint 2d with the respective dimensions
|
||||
//! (vertex or edge) of the concerned arguments and their
|
||||
//! addresses in the Topological structure.
|
||||
Standard_EXPORT Intf_SectionPoint(const gp_Pnt2d& Where, const Intf_PIType DimeO, const Standard_Integer AddrO1, const Standard_Real ParamO, const Intf_PIType DimeT, const Standard_Integer AddrT1, const Standard_Real ParamT, const Standard_Real Incid);
|
||||
|
||||
//! Merges two SectionPoints.
|
||||
Standard_EXPORT void Merge (Intf_SectionPoint& Other);
|
||||
|
||||
Standard_EXPORT void Dump (const Standard_Integer Indent) const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
gp_Pnt myPnt;
|
||||
Intf_PIType DimenObje;
|
||||
Standard_Integer IndexO1;
|
||||
Standard_Integer IndexO2;
|
||||
Standard_Real ParamObje;
|
||||
Intf_PIType DimenTool;
|
||||
Standard_Integer IndexT1;
|
||||
Standard_Integer IndexT2;
|
||||
Standard_Real ParamTool;
|
||||
Standard_Real Incide;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <Intf_SectionPoint.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Intf_SectionPoint_HeaderFile
|
@@ -1,169 +0,0 @@
|
||||
-- Created on: 1991-06-18
|
||||
-- Created by: Didier PIFFAULT
|
||||
-- Copyright (c) 1991-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 TangentZone from Intf
|
||||
|
||||
---Purpose: Describes a zone of tangence between polygons or
|
||||
-- polyhedra as a sequence of points of intersection.
|
||||
|
||||
uses SectionPoint from Intf,
|
||||
SeqOfSectionPoint from Intf
|
||||
|
||||
|
||||
raises OutOfRange from Standard
|
||||
|
||||
|
||||
is
|
||||
|
||||
-- User Interface :
|
||||
|
||||
NumberOfPoints (me)
|
||||
returns Integer is static;
|
||||
---Purpose: Returns number of SectionPoint in this TangentZone.
|
||||
---C++: inline
|
||||
|
||||
GetPoint (me;
|
||||
Index : in Integer)
|
||||
returns SectionPoint from Intf
|
||||
raises OutOfRange from Standard
|
||||
is static;
|
||||
---Purpose: Gives the SectionPoint of address <Index> in the
|
||||
-- TangentZone.
|
||||
--
|
||||
---C++: return const &
|
||||
|
||||
|
||||
IsEqual (me;
|
||||
Other : in TangentZone from Intf)
|
||||
returns Boolean is static;
|
||||
---Purpose: Compares two TangentZones.
|
||||
--
|
||||
---C++: alias operator ==
|
||||
|
||||
|
||||
Contains (me;
|
||||
ThePI : in SectionPoint from Intf)
|
||||
returns Boolean is static;
|
||||
---Purpose: Checks if <ThePI> is in TangentZone.
|
||||
|
||||
|
||||
ParamOnFirst (me;
|
||||
paraMin : in out Real from Standard;
|
||||
paraMax : in out Real from Standard) is static;
|
||||
---C++: inline
|
||||
---Purpose: Gives the parameter range of the TangentZone on the first
|
||||
-- argument of the Interference. (Usable only for polygon)
|
||||
|
||||
|
||||
ParamOnSecond (me;
|
||||
paraMin : in out Real from Standard;
|
||||
paraMax : in out Real from Standard) is static;
|
||||
---C++: inline
|
||||
---Purpose: Gives the parameter range of the TangentZone on the second
|
||||
-- argument of the Interference. (Usable only for polygon)
|
||||
|
||||
|
||||
InfoFirst (me;
|
||||
segMin : in out Integer from Standard;
|
||||
paraMin : in out Real from Standard;
|
||||
segMax : in out Integer from Standard;
|
||||
paraMax : in out Real from Standard) is static;
|
||||
---Purpose: Gives information about the first argument of the
|
||||
-- Interference. (Usable only for polygon)
|
||||
|
||||
InfoSecond (me;
|
||||
segMin : in out Integer from Standard;
|
||||
paraMin : in out Real from Standard;
|
||||
segMax : in out Integer from Standard;
|
||||
paraMax : in out Real from Standard) is static;
|
||||
---Purpose: Gives informations about the second argument of the
|
||||
-- Interference. (Usable only for polygon)
|
||||
|
||||
|
||||
RangeContains (me;
|
||||
ThePI : in SectionPoint from Intf)
|
||||
returns Boolean is static;
|
||||
---Purpose: Returns True if <ThePI> is in the parameter range of the
|
||||
-- TangentZone.
|
||||
|
||||
HasCommonRange (me;
|
||||
Other : in TangentZone from Intf)
|
||||
returns Boolean is static;
|
||||
---Purpose: Returns True if the TangentZone <Other> has a common part
|
||||
-- with <me>.
|
||||
|
||||
|
||||
-- Builder :
|
||||
|
||||
Create returns TangentZone;
|
||||
---Purpose: Builds an empty tangent zone.
|
||||
|
||||
Create (Other : TangentZone)
|
||||
returns TangentZone;
|
||||
---Purpose: Copies a Tangent zone.
|
||||
|
||||
|
||||
Append (me : in out;
|
||||
Pi : SectionPoint from Intf)
|
||||
is static;
|
||||
---Purpose: Adds a SectionPoint to the TangentZone.
|
||||
|
||||
|
||||
Append (me : in out;
|
||||
Tzi : TangentZone from Intf)
|
||||
is static;
|
||||
---Purpose: Adds the TangentZone <Tzi> to <me>.
|
||||
|
||||
|
||||
Insert (me : in out;
|
||||
Pi : SectionPoint from Intf)
|
||||
returns Boolean
|
||||
is static;
|
||||
---Purpose: Inserts a SectionPoint in the TangentZone.
|
||||
|
||||
|
||||
PolygonInsert (me : in out;
|
||||
Pi : SectionPoint from Intf)
|
||||
is static;
|
||||
---Purpose: Inserts a point in the polygonal TangentZone.
|
||||
|
||||
|
||||
InsertBefore (me : in out;
|
||||
Index : in Integer;
|
||||
Pi : SectionPoint from Intf)
|
||||
is static;
|
||||
---Purpose: Inserts a SectionPoint before <Index> in the TangentZone.
|
||||
|
||||
InsertAfter (me : in out;
|
||||
Index : in Integer;
|
||||
Pi : SectionPoint from Intf)
|
||||
is static;
|
||||
---Purpose: Inserts a SectionPoint after <Index> in the TangentZone.
|
||||
|
||||
|
||||
Dump (me;
|
||||
Indent : in Integer) is static;
|
||||
|
||||
fields
|
||||
|
||||
Result : SeqOfSectionPoint;
|
||||
ParamOnFirstMin : Real from Standard;
|
||||
ParamOnFirstMax : Real from Standard;
|
||||
ParamOnSecondMin : Real from Standard;
|
||||
ParamOnSecondMax : Real from Standard;
|
||||
|
||||
|
||||
end TangentZone;
|
@@ -14,7 +14,10 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Intf_TangentZone.ixx>
|
||||
|
||||
#include <Intf_SectionPoint.hxx>
|
||||
#include <Intf_TangentZone.hxx>
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
|
||||
#define DEBUG_TANGENTZONE 0
|
||||
//=======================================================================
|
||||
|
137
src/Intf/Intf_TangentZone.hxx
Normal file
137
src/Intf/Intf_TangentZone.hxx
Normal file
@@ -0,0 +1,137 @@
|
||||
// Created on: 1991-06-18
|
||||
// Created by: Didier PIFFAULT
|
||||
// Copyright (c) 1991-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 _Intf_TangentZone_HeaderFile
|
||||
#define _Intf_TangentZone_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Intf_SeqOfSectionPoint.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class Standard_OutOfRange;
|
||||
class Intf_SectionPoint;
|
||||
|
||||
|
||||
//! Describes a zone of tangence between polygons or
|
||||
//! polyhedra as a sequence of points of intersection.
|
||||
class Intf_TangentZone
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Returns number of SectionPoint in this TangentZone.
|
||||
Standard_Integer NumberOfPoints() const;
|
||||
|
||||
//! Gives the SectionPoint of address <Index> in the
|
||||
//! TangentZone.
|
||||
Standard_EXPORT const Intf_SectionPoint& GetPoint (const Standard_Integer Index) const;
|
||||
|
||||
//! Compares two TangentZones.
|
||||
Standard_EXPORT Standard_Boolean IsEqual (const Intf_TangentZone& Other) const;
|
||||
Standard_Boolean operator == (const Intf_TangentZone& Other) const
|
||||
{
|
||||
return IsEqual(Other);
|
||||
}
|
||||
|
||||
//! Checks if <ThePI> is in TangentZone.
|
||||
Standard_EXPORT Standard_Boolean Contains (const Intf_SectionPoint& ThePI) const;
|
||||
|
||||
//! Gives the parameter range of the TangentZone on the first
|
||||
//! argument of the Interference. (Usable only for polygon)
|
||||
void ParamOnFirst (Standard_Real& paraMin, Standard_Real& paraMax) const;
|
||||
|
||||
//! Gives the parameter range of the TangentZone on the second
|
||||
//! argument of the Interference. (Usable only for polygon)
|
||||
void ParamOnSecond (Standard_Real& paraMin, Standard_Real& paraMax) const;
|
||||
|
||||
//! Gives information about the first argument of the
|
||||
//! Interference. (Usable only for polygon)
|
||||
Standard_EXPORT void InfoFirst (Standard_Integer& segMin, Standard_Real& paraMin, Standard_Integer& segMax, Standard_Real& paraMax) const;
|
||||
|
||||
//! Gives informations about the second argument of the
|
||||
//! Interference. (Usable only for polygon)
|
||||
Standard_EXPORT void InfoSecond (Standard_Integer& segMin, Standard_Real& paraMin, Standard_Integer& segMax, Standard_Real& paraMax) const;
|
||||
|
||||
//! Returns True if <ThePI> is in the parameter range of the
|
||||
//! TangentZone.
|
||||
Standard_EXPORT Standard_Boolean RangeContains (const Intf_SectionPoint& ThePI) const;
|
||||
|
||||
//! Returns True if the TangentZone <Other> has a common part
|
||||
//! with <me>.
|
||||
Standard_EXPORT Standard_Boolean HasCommonRange (const Intf_TangentZone& Other) const;
|
||||
|
||||
//! Builds an empty tangent zone.
|
||||
Standard_EXPORT Intf_TangentZone();
|
||||
|
||||
//! Copies a Tangent zone.
|
||||
Standard_EXPORT Intf_TangentZone(const Intf_TangentZone& Other);
|
||||
|
||||
//! Adds a SectionPoint to the TangentZone.
|
||||
Standard_EXPORT void Append (const Intf_SectionPoint& Pi);
|
||||
|
||||
//! Adds the TangentZone <Tzi> to <me>.
|
||||
Standard_EXPORT void Append (const Intf_TangentZone& Tzi);
|
||||
|
||||
//! Inserts a SectionPoint in the TangentZone.
|
||||
Standard_EXPORT Standard_Boolean Insert (const Intf_SectionPoint& Pi);
|
||||
|
||||
//! Inserts a point in the polygonal TangentZone.
|
||||
Standard_EXPORT void PolygonInsert (const Intf_SectionPoint& Pi);
|
||||
|
||||
//! Inserts a SectionPoint before <Index> in the TangentZone.
|
||||
Standard_EXPORT void InsertBefore (const Standard_Integer Index, const Intf_SectionPoint& Pi);
|
||||
|
||||
//! Inserts a SectionPoint after <Index> in the TangentZone.
|
||||
Standard_EXPORT void InsertAfter (const Standard_Integer Index, const Intf_SectionPoint& Pi);
|
||||
|
||||
Standard_EXPORT void Dump (const Standard_Integer Indent) const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Intf_SeqOfSectionPoint Result;
|
||||
Standard_Real ParamOnFirstMin;
|
||||
Standard_Real ParamOnFirstMax;
|
||||
Standard_Real ParamOnSecondMin;
|
||||
Standard_Real ParamOnSecondMax;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <Intf_TangentZone.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Intf_TangentZone_HeaderFile
|
@@ -1,127 +0,0 @@
|
||||
-- Created on: 1993-06-23
|
||||
-- Created by: Didier PIFFAULT
|
||||
-- Copyright (c) 1993-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 Tool from Intf
|
||||
|
||||
---Purpose: Provides services to create box for infinites
|
||||
-- lines in a given contexte.
|
||||
|
||||
uses Integer from Standard,
|
||||
Real from Standard,
|
||||
Box2d from Bnd,
|
||||
Lin2d from gp,
|
||||
Hypr2d from gp,
|
||||
Parab2d from gp,
|
||||
Conic from IntAna2d,
|
||||
Box from Bnd,
|
||||
Lin from gp,
|
||||
Hypr from gp,
|
||||
Parab from gp
|
||||
|
||||
|
||||
raises OutOfRange from Standard
|
||||
|
||||
|
||||
is Create returns Tool from Intf;
|
||||
|
||||
Lin2dBox (me : in out;
|
||||
theLin2d : in Lin2d from gp;
|
||||
bounding : in Box2d from Bnd;
|
||||
boxLin : out Box2d from Bnd)
|
||||
is static;
|
||||
|
||||
Hypr2dBox (me : in out;
|
||||
theHypr2d : in Hypr2d from gp;
|
||||
bounding : in Box2d from Bnd;
|
||||
boxHypr : out Box2d from Bnd)
|
||||
is static;
|
||||
|
||||
Inters2d (me : in out;
|
||||
theCurve : in Hypr2d from gp;
|
||||
Domain : in Box2d from Bnd)
|
||||
returns Integer from Standard is static private;
|
||||
|
||||
Parab2dBox (me : in out;
|
||||
theParab2d : in Parab2d from gp;
|
||||
bounding : in Box2d from Bnd;
|
||||
boxHypr : out Box2d from Bnd)
|
||||
is static;
|
||||
|
||||
Inters2d (me : in out;
|
||||
theCurve : in Parab2d from gp;
|
||||
Domain : in Box2d from Bnd)
|
||||
returns Integer from Standard is static private;
|
||||
|
||||
|
||||
LinBox (me : in out;
|
||||
theLin : in Lin from gp;
|
||||
bounding : in Box from Bnd;
|
||||
boxLin : out Box from Bnd)
|
||||
is static;
|
||||
|
||||
HyprBox (me : in out;
|
||||
theHypr : in Hypr from gp;
|
||||
bounding : in Box from Bnd;
|
||||
boxHypr : out Box from Bnd)
|
||||
is static;
|
||||
|
||||
Inters3d (me : in out;
|
||||
theCurve : in Hypr from gp;
|
||||
Domain : in Box from Bnd)
|
||||
returns Integer from Standard is static private;
|
||||
|
||||
ParabBox (me : in out;
|
||||
theParab : in Parab from gp;
|
||||
bounding : in Box from Bnd;
|
||||
boxHypr : out Box from Bnd)
|
||||
is static;
|
||||
|
||||
Inters3d (me : in out;
|
||||
theCurve : in Parab from gp;
|
||||
Domain : in Box from Bnd)
|
||||
returns Integer from Standard is static private;
|
||||
|
||||
|
||||
NbSegments (me)
|
||||
returns Integer from Standard
|
||||
is static;
|
||||
|
||||
BeginParam (me;
|
||||
SegmentNum : Integer from Standard)
|
||||
returns Real from Standard
|
||||
raises OutOfRange from Standard
|
||||
is static;
|
||||
|
||||
EndParam (me;
|
||||
SegmentNum : Integer from Standard)
|
||||
returns Real from Standard
|
||||
raises OutOfRange from Standard
|
||||
is static;
|
||||
|
||||
|
||||
fields nbSeg : Integer from Standard;
|
||||
beginOnCurve : Real from Standard [6];
|
||||
endOnCurve : Real from Standard [6];
|
||||
|
||||
-- Code of every side of BndBox.
|
||||
bord : Integer from Standard [12];
|
||||
|
||||
xint : Real from Standard [12];
|
||||
yint : Real from Standard [12];
|
||||
zint : Real from Standard [12];
|
||||
parint : Real from Standard [12];
|
||||
|
||||
end Tool;
|
@@ -14,21 +14,30 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Intf_Tool.ixx>
|
||||
#include <gp_XY.hxx>
|
||||
|
||||
#include <Bnd_Box.hxx>
|
||||
#include <Bnd_Box2d.hxx>
|
||||
#include <ElCLib.hxx>
|
||||
#include <gp_Hypr.hxx>
|
||||
#include <gp_Hypr2d.hxx>
|
||||
#include <gp_Lin.hxx>
|
||||
#include <gp_Lin2d.hxx>
|
||||
#include <gp_Parab.hxx>
|
||||
#include <gp_Parab2d.hxx>
|
||||
#include <gp_Pln.hxx>
|
||||
#include <gp_XY.hxx>
|
||||
#include <IntAna2d_AnaIntersection.hxx>
|
||||
#include <IntAna2d_Conic.hxx>
|
||||
#include <IntAna2d_IntPoint.hxx>
|
||||
#include <IntAna2d_AnaIntersection.hxx>
|
||||
#include <IntAna_IntConicQuad.hxx>
|
||||
#include <ElCLib.hxx>
|
||||
#include <Intf_Tool.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : Intf_Tool
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Intf_Tool::Intf_Tool()
|
||||
: nbSeg(0)
|
||||
{}
|
||||
|
105
src/Intf/Intf_Tool.hxx
Normal file
105
src/Intf/Intf_Tool.hxx
Normal file
@@ -0,0 +1,105 @@
|
||||
// Created on: 1993-06-23
|
||||
// Created by: Didier PIFFAULT
|
||||
// Copyright (c) 1993-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 _Intf_Tool_HeaderFile
|
||||
#define _Intf_Tool_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
class Standard_OutOfRange;
|
||||
class gp_Lin2d;
|
||||
class Bnd_Box2d;
|
||||
class gp_Hypr2d;
|
||||
class gp_Parab2d;
|
||||
class gp_Lin;
|
||||
class Bnd_Box;
|
||||
class gp_Hypr;
|
||||
class gp_Parab;
|
||||
|
||||
|
||||
//! Provides services to create box for infinites
|
||||
//! lines in a given contexte.
|
||||
class Intf_Tool
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT Intf_Tool();
|
||||
|
||||
Standard_EXPORT void Lin2dBox (const gp_Lin2d& theLin2d, const Bnd_Box2d& bounding, Bnd_Box2d& boxLin);
|
||||
|
||||
Standard_EXPORT void Hypr2dBox (const gp_Hypr2d& theHypr2d, const Bnd_Box2d& bounding, Bnd_Box2d& boxHypr);
|
||||
|
||||
Standard_EXPORT void Parab2dBox (const gp_Parab2d& theParab2d, const Bnd_Box2d& bounding, Bnd_Box2d& boxHypr);
|
||||
|
||||
Standard_EXPORT void LinBox (const gp_Lin& theLin, const Bnd_Box& bounding, Bnd_Box& boxLin);
|
||||
|
||||
Standard_EXPORT void HyprBox (const gp_Hypr& theHypr, const Bnd_Box& bounding, Bnd_Box& boxHypr);
|
||||
|
||||
Standard_EXPORT void ParabBox (const gp_Parab& theParab, const Bnd_Box& bounding, Bnd_Box& boxHypr);
|
||||
|
||||
Standard_EXPORT Standard_Integer NbSegments() const;
|
||||
|
||||
Standard_EXPORT Standard_Real BeginParam (const Standard_Integer SegmentNum) const;
|
||||
|
||||
Standard_EXPORT Standard_Real EndParam (const Standard_Integer SegmentNum) const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Standard_EXPORT Standard_Integer Inters2d (const gp_Hypr2d& theCurve, const Bnd_Box2d& Domain);
|
||||
|
||||
Standard_EXPORT Standard_Integer Inters2d (const gp_Parab2d& theCurve, const Bnd_Box2d& Domain);
|
||||
|
||||
Standard_EXPORT Standard_Integer Inters3d (const gp_Hypr& theCurve, const Bnd_Box& Domain);
|
||||
|
||||
Standard_EXPORT Standard_Integer Inters3d (const gp_Parab& theCurve, const Bnd_Box& Domain);
|
||||
|
||||
|
||||
Standard_Integer nbSeg;
|
||||
Standard_Real beginOnCurve[6];
|
||||
Standard_Real endOnCurve[6];
|
||||
Standard_Integer bord[12];
|
||||
Standard_Real xint[12];
|
||||
Standard_Real yint[12];
|
||||
Standard_Real zint[12];
|
||||
Standard_Real parint[12];
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Intf_Tool_HeaderFile
|
Reference in New Issue
Block a user