Loading files
f2929057eThis file is pinned to the selected release. Download the original to open it in your design tool.
// 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_SectionPoint.hxx>
#include <NCollection_Sequence.hxx>
#include <Intf_SectionLine.hxx>
#include <Intf_TangentZone.hxx>
#include <Standard_Boolean.hxx>
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.
int NbSectionPoints() const;
//! Gives the point of intersection of address Index in
//! the interference.
const Intf_SectionPoint& PntValue(const int Index) const;
//! Gives the number of polylines of intersection in the
//! interference.
int NbSectionLines() const;
//! Gives the polyline of intersection at address <Index> in
//! the interference.
const Intf_SectionLine& LineValue(const int Index) const;
//! Gives the number of zones of tangence in the interference.
int NbTangentZones() const;
//! Gives the zone of tangence at address Index in the
//! interference.
const Intf_TangentZone& ZoneValue(const int Index) const;
//! Gives the tolerance used for the calculation.
double GetTolerance() const;
//! Tests if the polylines of intersection or the zones of
//! tangence contain the point of intersection <ThePnt>.
Standard_EXPORT bool 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 bool 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:
//! Empty constructor
Standard_EXPORT Intf_Interference(const bool Self);
//! Destructor is protected, for safer inheritance
~Intf_Interference() = default;
//! Only one argument for the intersection.
Standard_EXPORT void SelfInterference(const bool Self);
NCollection_Sequence<Intf_SectionPoint> mySPoins;
NCollection_Sequence<Intf_SectionLine> mySLines;
NCollection_Sequence<Intf_TangentZone> myTZones;
bool SelfIntf;
double Tolerance;
};
#include <Intf_Interference.lxx>
#endif // _Intf_Interference_HeaderFile