1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0024002: Overall code and build procedure refactoring -- automatic

Automatic upgrade of OCCT code by command "occt_upgrade . -nocdl":
- WOK-generated header files from inc and sources from drv are moved to src
- CDL files removed
- All packages are converted to nocdlpack
This commit is contained in:
abv
2015-07-12 07:42:38 +03:00
parent 543a996496
commit 42cf5bc1ca
15354 changed files with 623957 additions and 509844 deletions

View File

@@ -1,148 +0,0 @@
-- Created on: 1995-12-06
-- Created by: Jacques GOUSSARD
-- Copyright (c) 1995-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
package BRepCheck
---Purpose: This package provides tools to check the validity
-- of the BRep.
uses MMgt,
StdFail,
TCollection,
TopAbs,
Adaptor3d,
TopoDS,
BRep,
TopTools
is
deferred class Result; -- inherits TShared from MMgt
class Vertex; -- inherits Shape
class Edge; -- inherits Shape
class Wire; -- inherits Shape
class Face; -- inherits Shape
class Shell; -- inherits Shape
class Solid;
class Analyzer;
enumeration Status is
NoError,
-- for vertices
InvalidPointOnCurve,
InvalidPointOnCurveOnSurface,
InvalidPointOnSurface,
-- for edges
No3DCurve,
Multiple3DCurve,
Invalid3DCurve,
NoCurveOnSurface,
InvalidCurveOnSurface,
InvalidCurveOnClosedSurface,
InvalidSameRangeFlag,
InvalidSameParameterFlag,
InvalidDegeneratedFlag,
FreeEdge,
InvalidMultiConnexity,
InvalidRange,
-- for wires
EmptyWire,
RedundantEdge,
SelfIntersectingWire, -- on a face
-- for faces
NoSurface,
InvalidWire,
RedundantWire,
IntersectingWires,
InvalidImbricationOfWires,
-- for shells
EmptyShell,
RedundantFace,
-- for solids
InvalidImbricationOfShells,
-- for shapes
UnorientableShape,
NotClosed,
NotConnected,
SubshapeNotInShape,
BadOrientation,
BadOrientationOfSubshape,
InvalidPolygonOnTriangulation,
InvalidToleranceValue,
EnclosedRegion,
-- for exception
CheckFail
end Status;
imported ListOfStatus;
imported ListIteratorOfListOfStatus;
imported DataMapOfShapeListOfStatus;
imported DataMapIteratorOfDataMapOfShapeListOfStatus;
imported DataMapOfShapeResult;
imported DataMapIteratorOfDataMapOfShapeResult;
-- Package method
Add(List: in out ListOfStatus from BRepCheck;
Stat: Status from BRepCheck);
Print(Stat: Status from BRepCheck;
OS: in out OStream from Standard);
SelfIntersection(W : Wire from TopoDS;
F : Face from TopoDS;
E1 : out Edge from TopoDS;
E2 : out Edge from TopoDS)
returns Boolean from Standard;
end BRepCheck;

View File

@@ -14,16 +14,16 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepCheck.ixx>
#include <BRepCheck_ListIteratorOfListOfStatus.hxx>
#include <BRepCheck_Wire.hxx>
#include <BRep_Tool.hxx>
#include <TopoDS_Iterator.hxx>
#include <BRepCheck.hxx>
#include <BRepCheck_ListIteratorOfListOfStatus.hxx>
#include <BRepCheck_Wire.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopoDS_Wire.hxx>
//=======================================================================
//function : Add

View File

@@ -0,0 +1,87 @@
// Created on: 1995-12-06
// Created by: Jacques GOUSSARD
// Copyright (c) 1995-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BRepCheck_HeaderFile
#define _BRepCheck_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <BRepCheck_ListOfStatus.hxx>
#include <BRepCheck_Status.hxx>
#include <Standard_OStream.hxx>
#include <Standard_Boolean.hxx>
class TopoDS_Wire;
class TopoDS_Face;
class TopoDS_Edge;
class BRepCheck_Result;
class BRepCheck_Vertex;
class BRepCheck_Edge;
class BRepCheck_Wire;
class BRepCheck_Face;
class BRepCheck_Shell;
class BRepCheck_Solid;
class BRepCheck_Analyzer;
//! This package provides tools to check the validity
//! of the BRep.
class BRepCheck
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT static void Add (BRepCheck_ListOfStatus& List, const BRepCheck_Status Stat);
Standard_EXPORT static void Print (const BRepCheck_Status Stat, Standard_OStream& OS);
Standard_EXPORT static Standard_Boolean SelfIntersection (const TopoDS_Wire& W, const TopoDS_Face& F, TopoDS_Edge& E1, TopoDS_Edge& E2);
protected:
private:
friend class BRepCheck_Result;
friend class BRepCheck_Vertex;
friend class BRepCheck_Edge;
friend class BRepCheck_Wire;
friend class BRepCheck_Face;
friend class BRepCheck_Shell;
friend class BRepCheck_Solid;
friend class BRepCheck_Analyzer;
};
#endif // _BRepCheck_HeaderFile

View File

@@ -1,174 +0,0 @@
-- Created on: 1995-12-08
-- Created by: Jacques GOUSSARD
-- Copyright (c) 1995-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class Analyzer from BRepCheck
---Purpose: A framework to check the overall
-- validity of a shape. For a shape to be valid in Open
-- CASCADE, it - or its component subshapes - must respect certain
-- criteria. These criteria are checked by the function IsValid.
-- Once you have determined whether a shape is valid or not, you can
-- diagnose its specific anomalies and correct them using the services of
-- the ShapeAnalysis, ShapeUpgrade, and ShapeFix packages.
uses Shape from TopoDS,
ShapeEnum from TopAbs,
Result from BRepCheck,
DataMapOfShapeResult from BRepCheck
raises NullObject from Standard,
NoSuchObject from Standard
is
Create(S: Shape from TopoDS;
GeomControls : Boolean from Standard = Standard_True)
---Purpose: Constructs a shape validation object defined by the shape S.
-- <S> is the shape to control. <GeomControls> If
-- False only topological informaions are checked.
-- The geometricals controls are
-- For a Vertex :
-- BRepCheck_InvalidToleranceValue NYI
-- For an Edge :
-- BRepCheck_InvalidCurveOnClosedSurface,
-- BRepCheck_InvalidCurveOnSurface,
-- BRepCheck_InvalidSameParameterFlag,
-- BRepCheck_InvalidToleranceValue NYI
-- For a face :
-- BRepCheck_UnorientableShape,
-- BRepCheck_IntersectingWires,
-- BRepCheck_InvalidToleranceValue NYI
-- For a wire :
-- BRepCheck_SelfIntersectingWire
---C++: inline
returns Analyzer from BRepCheck
raises NullObject from Standard;
Init(me: in out; S: Shape from TopoDS;
GeomControls : Boolean from Standard = Standard_True)
---Purpose: <S> is the shape to control. <GeomControls> If
-- False only topological informaions are checked.
-- The geometricals controls are
-- For a Vertex :
-- BRepCheck_InvalidTolerance NYI
-- For an Edge :
-- BRepCheck_InvalidCurveOnClosedSurface,
-- BRepCheck_InvalidCurveOnSurface,
-- BRepCheck_InvalidSameParameterFlag,
-- BRepCheck_InvalidTolerance NYI
-- For a face :
-- BRepCheck_UnorientableShape,
-- BRepCheck_IntersectingWires,
-- BRepCheck_InvalidTolerance NYI
-- For a wire :
-- BRepCheck_SelfIntersectingWire
raises NullObject from Standard
is static;
IsValid(me; S: Shape from TopoDS)
---Purpose: <S> is a subshape of the original shape. Returns
-- <STandard_True> if no default has been detected on
-- <S> and any of its subshape.
returns Boolean from Standard
raises NoSuchObject from Standard
is static;
IsValid(me)
---Purpose: Returns true if no defect is
-- detected on the shape S or any of its subshapes.
-- Returns true if the shape S is valid.
-- This function checks whether a given shape is valid by checking that:
-- - the topology is correct
-- - parameterization of edges in particular is correct.
-- For the topology to be correct, the following conditions must be satisfied:
-- - edges should have at least two vertices if they are not
-- degenerate edges. The vertices should be within the range of
-- the bounding edges at the tolerance specified in the vertex,
-- - edges should share at least one face. The representation of
-- the edges should be within the tolerance criterion assigned to them.
-- - wires defining a face should not self-intersect and should be closed,
-- - there should be one wire which contains all other wires inside a face,
-- - wires should be correctly oriented with respect to each of the edges,
-- - faces should be correctly oriented, in particular with
-- respect to adjacent faces if these faces define a solid,
-- - shells defining a solid should be closed. There should
-- be one enclosing shell if the shape is a solid;
-- To check parameterization of edge, there are 2 approaches depending on
-- the edge?s contextual situation.
-- - if the edge is either single, or it is in the context
-- of a wire or a compound, its parameterization is defined by
-- the parameterization of its 3D curve and is considered as valid.
-- - If the edge is in the context of a face, it should
-- have SameParameter and SameRange flags set to Standard_True. To
-- check these flags, you should call the function
-- BRep_Tool::SameParameter and BRep_Tool::SameRange for an
-- edge. If at least one of these flags is set to Standard_False,
-- the edge is considered as invalid without any additional check.
-- If the edge is contained by a face, and it has SameParameter and
-- SameRange flags set to Standard_True, IsValid checks
-- whether representation of the edge on face, in context of which the
-- edge is considered, has the same parameterization up to the
-- tolerance value coded on the edge. For a given parameter t on the edge
-- having C as a 3D curve and one PCurve P on a surface S (base
-- surface of the reference face), this checks that |C(t) - S(P(t))|
-- is less than or equal to tolerance, where tolerance is the tolerance
-- value coded on the edge.
---C++: inline
returns Boolean from Standard
is static;
Result(me; SubS: Shape from TopoDS)
---C++: return const&
---C++: inline
returns any Result from BRepCheck
raises NoSuchObject from Standard
is static;
--- Private implementation method
Put(me: in out; S: Shape from TopoDS; Gctrl: Boolean from Standard)
is static private;
Perform(me: in out; S: Shape from TopoDS)
is static private;
ValidSub(me; S: Shape from TopoDS; SubType: ShapeEnum from TopAbs)
returns Boolean from Standard
is static private;
fields
myShape : Shape from TopoDS;
myMap : DataMapOfShapeResult from BRepCheck;
end Analyzer;

View File

@@ -14,28 +14,26 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepCheck_Analyzer.ixx>
#include <BRepCheck_Vertex.hxx>
#include <BRepCheck_Analyzer.hxx>
#include <BRepCheck_Edge.hxx>
#include <BRepCheck_Wire.hxx>
#include <BRepCheck_Face.hxx>
#include <BRepCheck_ListIteratorOfListOfStatus.hxx>
#include <BRepCheck_Result.hxx>
#include <BRepCheck_Shell.hxx>
#include <BRepCheck_Solid.hxx>
#include <BRepCheck_ListIteratorOfListOfStatus.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopExp_Explorer.hxx>
#include <TopTools_MapOfShape.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Face.hxx>
#include <BRepCheck_Vertex.hxx>
#include <BRepCheck_Wire.hxx>
#include <Standard_ErrorHandler.hxx>
#include <Standard_Failure.hxx>
#include <Standard_NoSuchObject.hxx>
#include <Standard_NullObject.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopoDS_Shape.hxx>
#include <TopTools_MapOfShape.hxx>
//=======================================================================
//function : Init

View File

@@ -0,0 +1,165 @@
// Created on: 1995-12-08
// Created by: Jacques GOUSSARD
// Copyright (c) 1995-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BRepCheck_Analyzer_HeaderFile
#define _BRepCheck_Analyzer_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <TopoDS_Shape.hxx>
#include <BRepCheck_DataMapOfShapeResult.hxx>
#include <Standard_Boolean.hxx>
#include <TopAbs_ShapeEnum.hxx>
class Standard_NullObject;
class Standard_NoSuchObject;
class TopoDS_Shape;
class BRepCheck_Result;
//! A framework to check the overall
//! validity of a shape. For a shape to be valid in Open
//! CASCADE, it - or its component subshapes - must respect certain
//! criteria. These criteria are checked by the function IsValid.
//! Once you have determined whether a shape is valid or not, you can
//! diagnose its specific anomalies and correct them using the services of
//! the ShapeAnalysis, ShapeUpgrade, and ShapeFix packages.
class BRepCheck_Analyzer
{
public:
DEFINE_STANDARD_ALLOC
//! Constructs a shape validation object defined by the shape S.
//! <S> is the shape to control. <GeomControls> If
//! False only topological informaions are checked.
//! The geometricals controls are
//! For a Vertex :
//! BRepCheck_InvalidToleranceValue NYI
//! For an Edge :
//! BRepCheck_InvalidCurveOnClosedSurface,
//! BRepCheck_InvalidCurveOnSurface,
//! BRepCheck_InvalidSameParameterFlag,
//! BRepCheck_InvalidToleranceValue NYI
//! For a face :
//! BRepCheck_UnorientableShape,
//! BRepCheck_IntersectingWires,
//! BRepCheck_InvalidToleranceValue NYI
//! For a wire :
//! BRepCheck_SelfIntersectingWire
BRepCheck_Analyzer(const TopoDS_Shape& S, const Standard_Boolean GeomControls = Standard_True);
//! <S> is the shape to control. <GeomControls> If
//! False only topological informaions are checked.
//! The geometricals controls are
//! For a Vertex :
//! BRepCheck_InvalidTolerance NYI
//! For an Edge :
//! BRepCheck_InvalidCurveOnClosedSurface,
//! BRepCheck_InvalidCurveOnSurface,
//! BRepCheck_InvalidSameParameterFlag,
//! BRepCheck_InvalidTolerance NYI
//! For a face :
//! BRepCheck_UnorientableShape,
//! BRepCheck_IntersectingWires,
//! BRepCheck_InvalidTolerance NYI
//! For a wire :
//! BRepCheck_SelfIntersectingWire
Standard_EXPORT void Init (const TopoDS_Shape& S, const Standard_Boolean GeomControls = Standard_True);
//! <S> is a subshape of the original shape. Returns
//! <STandard_True> if no default has been detected on
//! <S> and any of its subshape.
Standard_EXPORT Standard_Boolean IsValid (const TopoDS_Shape& S) const;
//! Returns true if no defect is
//! detected on the shape S or any of its subshapes.
//! Returns true if the shape S is valid.
//! This function checks whether a given shape is valid by checking that:
//! - the topology is correct
//! - parameterization of edges in particular is correct.
//! For the topology to be correct, the following conditions must be satisfied:
//! - edges should have at least two vertices if they are not
//! degenerate edges. The vertices should be within the range of
//! the bounding edges at the tolerance specified in the vertex,
//! - edges should share at least one face. The representation of
//! the edges should be within the tolerance criterion assigned to them.
//! - wires defining a face should not self-intersect and should be closed,
//! - there should be one wire which contains all other wires inside a face,
//! - wires should be correctly oriented with respect to each of the edges,
//! - faces should be correctly oriented, in particular with
//! respect to adjacent faces if these faces define a solid,
//! - shells defining a solid should be closed. There should
//! be one enclosing shell if the shape is a solid;
//! To check parameterization of edge, there are 2 approaches depending on
//! the edge?s contextual situation.
//! - if the edge is either single, or it is in the context
//! of a wire or a compound, its parameterization is defined by
//! the parameterization of its 3D curve and is considered as valid.
//! - If the edge is in the context of a face, it should
//! have SameParameter and SameRange flags set to Standard_True. To
//! check these flags, you should call the function
//! BRep_Tool::SameParameter and BRep_Tool::SameRange for an
//! edge. If at least one of these flags is set to Standard_False,
//! the edge is considered as invalid without any additional check.
//! If the edge is contained by a face, and it has SameParameter and
//! SameRange flags set to Standard_True, IsValid checks
//! whether representation of the edge on face, in context of which the
//! edge is considered, has the same parameterization up to the
//! tolerance value coded on the edge. For a given parameter t on the edge
//! having C as a 3D curve and one PCurve P on a surface S (base
//! surface of the reference face), this checks that |C(t) - S(P(t))|
//! is less than or equal to tolerance, where tolerance is the tolerance
//! value coded on the edge.
Standard_Boolean IsValid() const;
const Handle(BRepCheck_Result)& Result (const TopoDS_Shape& SubS) const;
protected:
private:
Standard_EXPORT void Put (const TopoDS_Shape& S, const Standard_Boolean Gctrl);
Standard_EXPORT void Perform (const TopoDS_Shape& S);
Standard_EXPORT Standard_Boolean ValidSub (const TopoDS_Shape& S, const TopAbs_ShapeEnum SubType) const;
TopoDS_Shape myShape;
BRepCheck_DataMapOfShapeResult myMap;
};
#include <BRepCheck_Analyzer.lxx>
#endif // _BRepCheck_Analyzer_HeaderFile

View File

@@ -1,77 +0,0 @@
-- Created on: 1995-12-11
-- Created by: Jacques GOUSSARD
-- Copyright (c) 1995-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class Edge from BRepCheck inherits Result from BRepCheck
---Purpose:
uses Shape from TopoDS,
Edge from TopoDS,
CurveRepresentation from BRep,
HCurve from Adaptor3d,
Status from BRepCheck
is
Create(E: Edge from TopoDS)
returns Edge from BRepCheck;
InContext(me: mutable; ContextShape: Shape from TopoDS);
Minimum(me: mutable);
Blind(me: mutable);
GeometricControls(me)
returns Boolean from Standard
is static;
GeometricControls(me: mutable; B: Boolean from Standard)
is static;
Tolerance(me: mutable) returns Real from Standard
is static;
SetStatus(me: mutable;
theStatus:Status from BRepCheck)
--- Purpose: Sets status of Edge;
is static;
CheckPolygonOnTriangulation(me: mutable; theEdge: Edge from TopoDS)
--- Purpose: Checks, if polygon on triangulation of heEdge
-- is out of 3D-curve of this edge.
returns Status from BRepCheck
is static;
fields
myCref : CurveRepresentation from BRep;
myHCurve : HCurve from Adaptor3d;
myGctrl : Boolean from Standard;
end Edge;

View File

@@ -14,58 +14,51 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepCheck_Edge.ixx>
#include <TColStd_Array1OfTransient.hxx>
#include <TColStd_HArray1OfReal.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <Adaptor3d_CurveOnSurface.hxx>
#include <Adaptor3d_HCurve.hxx>
#include <Adaptor3d_HCurveOnSurface.hxx>
#include <Bnd_Box.hxx>
#include <BRepCheck_ListOfStatus.hxx>
#include <BRepCheck_ListIteratorOfListOfStatus.hxx>
#include <BRep_CurveOnSurface.hxx>
#include <BRep_CurveRepresentation.hxx>
#include <BRep_GCurve.hxx>
#include <BRep_ListIteratorOfListOfCurveRepresentation.hxx>
#include <BRep_ListOfCurveRepresentation.hxx>
#include <BRep_PolygonOnTriangulation.hxx>
#include <BRep_TEdge.hxx>
#include <BRep_TFace.hxx>
#include <BRep_CurveRepresentation.hxx>
#include <BRep_ListOfCurveRepresentation.hxx>
#include <BRep_ListIteratorOfListOfCurveRepresentation.hxx>
#include <BRep_GCurve.hxx>
#include <BRep_CurveOnSurface.hxx>
#include <BRep_PolygonOnTriangulation.hxx>
#include <BRep_Tool.hxx>
#include <TopExp_Explorer.hxx>
#include <Geom_Surface.hxx>
#include <Geom_RectangularTrimmedSurface.hxx>
#include <Geom_Plane.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepCheck.hxx>
#include <BRepCheck_Edge.hxx>
#include <BRepCheck_ListIteratorOfListOfStatus.hxx>
#include <BRepCheck_ListOfStatus.hxx>
#include <Extrema_LocateExtPC.hxx>
#include <Geom2d_Curve.hxx>
#include <Geom2dAdaptor.hxx>
#include <Geom2dAdaptor_HCurve.hxx>
#include <Geom_Curve.hxx>
#include <Geom_Plane.hxx>
#include <Geom_RectangularTrimmedSurface.hxx>
#include <Geom_Surface.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <GeomAdaptor_Curve.hxx>
#include <GeomAdaptor_HCurve.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <Adaptor3d_CurveOnSurface.hxx>
#include <Adaptor3d_HCurveOnSurface.hxx>
#include <ProjLib_ProjectedCurve.hxx>
#include <GeomProjLib.hxx>
#include <Extrema_LocateExtPC.hxx>
#include <BRepCheck.hxx>
#include <Geom2dAdaptor.hxx>
#include <TopoDS.hxx>
#include <TopAbs_ShapeEnum.hxx>
#include <TopoDS_Face.hxx>
#include <Precision.hxx>
#include <Poly_PolygonOnTriangulation.hxx>
#include <Poly_Triangulation.hxx>
#include <Geom_Curve.hxx>
#include <Precision.hxx>
#include <ProjLib_ProjectedCurve.hxx>
#include <Standard_Type.hxx>
#include <TColStd_Array1OfTransient.hxx>
#include <TColStd_HArray1OfReal.hxx>
#include <TopAbs_ShapeEnum.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Shape.hxx>
//modified by NIZNHY-PKV Thu May 05 09:01:57 2011f
static

View File

@@ -0,0 +1,90 @@
// Created on: 1995-12-11
// Created by: Jacques GOUSSARD
// Copyright (c) 1995-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BRepCheck_Edge_HeaderFile
#define _BRepCheck_Edge_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Standard_Boolean.hxx>
#include <BRepCheck_Result.hxx>
#include <Standard_Real.hxx>
#include <BRepCheck_Status.hxx>
class BRep_CurveRepresentation;
class Adaptor3d_HCurve;
class TopoDS_Edge;
class TopoDS_Shape;
class BRepCheck_Edge;
DEFINE_STANDARD_HANDLE(BRepCheck_Edge, BRepCheck_Result)
class BRepCheck_Edge : public BRepCheck_Result
{
public:
Standard_EXPORT BRepCheck_Edge(const TopoDS_Edge& E);
Standard_EXPORT void InContext (const TopoDS_Shape& ContextShape);
Standard_EXPORT void Minimum();
Standard_EXPORT void Blind();
Standard_EXPORT Standard_Boolean GeometricControls() const;
Standard_EXPORT void GeometricControls (const Standard_Boolean B);
Standard_EXPORT Standard_Real Tolerance();
//! Sets status of Edge;
Standard_EXPORT void SetStatus (const BRepCheck_Status theStatus);
//! Checks, if polygon on triangulation of heEdge
//! is out of 3D-curve of this edge.
Standard_EXPORT BRepCheck_Status CheckPolygonOnTriangulation (const TopoDS_Edge& theEdge);
DEFINE_STANDARD_RTTI(BRepCheck_Edge,BRepCheck_Result)
protected:
private:
Handle(BRep_CurveRepresentation) myCref;
Handle(Adaptor3d_HCurve) myHCurve;
Standard_Boolean myGctrl;
};
#endif // _BRepCheck_Edge_HeaderFile

View File

@@ -1,105 +0,0 @@
-- Created on: 1995-12-15
-- Created by: Jacques GOUSSARD
-- Copyright (c) 1995-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class Face from BRepCheck inherits Result from BRepCheck
---Purpose:
uses Shape from TopoDS,
Face from TopoDS,
Status from BRepCheck,
DataMapOfShapeListOfShape from TopTools
is
Create(F: Face from TopoDS)
returns Face from BRepCheck;
InContext(me: mutable; ContextShape: Shape from TopoDS);
Minimum(me: mutable);
Blind(me: mutable);
IntersectWires(me: mutable; Update: Boolean from Standard = Standard_False)
returns Status from BRepCheck
is static;
ClassifyWires(me: mutable; Update: Boolean from Standard = Standard_False)
returns Status from BRepCheck
is static;
OrientationOfWires(me: mutable;
Update: Boolean from Standard = Standard_False)
returns Status from BRepCheck
is static;
SetUnorientable(me: mutable)
is static;
SetStatus(me: mutable;
theStatus:Status from BRepCheck)
--- Purpose: Sets status of Face;
is static;
IsUnorientable(me)
returns Boolean from Standard
is static;
GeometricControls(me)
returns Boolean from Standard
is static;
GeometricControls(me: mutable; B: Boolean from Standard)
is static;
fields
myIntdone : Boolean from Standard;
myIntres : Status from BRepCheck;
myImbdone : Boolean from Standard;
myImbres : Status from BRepCheck;
myOridone : Boolean from Standard;
myOrires : Status from BRepCheck;
myMapImb : DataMapOfShapeListOfShape from TopTools;
myGctrl : Boolean from Standard;
end Face;

View File

@@ -14,58 +14,50 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepCheck_Face.ixx>
#include <BRepCheck_ListOfStatus.hxx>
#include <BRepCheck_ListIteratorOfListOfStatus.hxx>
#include <BRep_TFace.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_DataMapOfShapeListOfShape.hxx>
#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
//#include <BRepAdaptor_Curve2d.hxx>
#include <BRepClass_FaceClassifier.hxx>
//#include <Geom2dInt_GInter.hxx>
#include <Geom2d_Curve.hxx>
#include <Geom_Curve.hxx>
#include <GProp_GProps.hxx>
#include <IntRes2d_Domain.hxx>
#include <Geom2dInt_GInter.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <gp_Pnt2d.hxx>
#include <BRepCheck.hxx>
#include <Precision.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Wire.hxx>
#include <BRepTopAdaptor_FClass2d.hxx>
#include <TopAbs_State.hxx>
#include <Bnd_Box2d.hxx>
#include <BndLib_Add2dCurve.hxx>
#include <TopTools_MapOfShape.hxx>
#include <TopTools_SequenceOfShape.hxx>
#include <TColgp_SequenceOfPnt.hxx>
#include <TopoDS_Vertex.hxx>
#include <BRep_Builder.hxx>
#include <BRep_TFace.hxx>
#include <BRep_Tool.hxx>
#include <BRepAdaptor_HSurface.hxx>
#include <BRepCheck.hxx>
#include <BRepCheck_Face.hxx>
#include <BRepCheck_ListIteratorOfListOfStatus.hxx>
#include <BRepCheck_ListOfStatus.hxx>
#include <BRepClass_FaceClassifier.hxx>
#include <BRepTopAdaptor_FClass2d.hxx>
#include <Geom2d_Curve.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dInt_GInter.hxx>
#include <Geom_Curve.hxx>
#include <gp_Pnt2d.hxx>
#include <GProp_GProps.hxx>
#include <IntRes2d_Domain.hxx>
#include <IntRes2d_IntersectionPoint.hxx>
#include <IntRes2d_IntersectionSegment.hxx>
#include <BRepAdaptor_HSurface.hxx>
#include <TopTools_OrientedShapeMapHasher.hxx>
#include <NCollection_DataMap.hxx>
#include <Precision.hxx>
#include <Standard_Type.hxx>
#include <TColgp_SequenceOfPnt.hxx>
#include <TopAbs_State.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Wire.hxx>
#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
#include <TopTools_DataMapOfShapeListOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TopTools_MapOfShape.hxx>
#include <TopTools_OrientedShapeMapHasher.hxx>
#include <TopTools_SequenceOfShape.hxx>
//#include <BRepAdaptor_Curve2d.hxx>
//#include <Geom2dInt_GInter.hxx>
typedef NCollection_DataMap<TopoDS_Shape, Bnd_Box2d, TopTools_OrientedShapeMapHasher> DataMapOfShapeBox2d;
static Standard_Boolean Intersect(const TopoDS_Wire&,

View File

@@ -0,0 +1,97 @@
// Created on: 1995-12-15
// Created by: Jacques GOUSSARD
// Copyright (c) 1995-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BRepCheck_Face_HeaderFile
#define _BRepCheck_Face_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Standard_Boolean.hxx>
#include <BRepCheck_Status.hxx>
#include <TopTools_DataMapOfShapeListOfShape.hxx>
#include <BRepCheck_Result.hxx>
class TopoDS_Face;
class TopoDS_Shape;
class BRepCheck_Face;
DEFINE_STANDARD_HANDLE(BRepCheck_Face, BRepCheck_Result)
class BRepCheck_Face : public BRepCheck_Result
{
public:
Standard_EXPORT BRepCheck_Face(const TopoDS_Face& F);
Standard_EXPORT void InContext (const TopoDS_Shape& ContextShape);
Standard_EXPORT void Minimum();
Standard_EXPORT void Blind();
Standard_EXPORT BRepCheck_Status IntersectWires (const Standard_Boolean Update = Standard_False);
Standard_EXPORT BRepCheck_Status ClassifyWires (const Standard_Boolean Update = Standard_False);
Standard_EXPORT BRepCheck_Status OrientationOfWires (const Standard_Boolean Update = Standard_False);
Standard_EXPORT void SetUnorientable();
//! Sets status of Face;
Standard_EXPORT void SetStatus (const BRepCheck_Status theStatus);
Standard_EXPORT Standard_Boolean IsUnorientable() const;
Standard_EXPORT Standard_Boolean GeometricControls() const;
Standard_EXPORT void GeometricControls (const Standard_Boolean B);
DEFINE_STANDARD_RTTI(BRepCheck_Face,BRepCheck_Result)
protected:
private:
Standard_Boolean myIntdone;
BRepCheck_Status myIntres;
Standard_Boolean myImbdone;
BRepCheck_Status myImbres;
Standard_Boolean myOridone;
BRepCheck_Status myOrires;
TopTools_DataMapOfShapeListOfShape myMapImb;
Standard_Boolean myGctrl;
};
#endif // _BRepCheck_Face_HeaderFile

View File

@@ -1,128 +0,0 @@
-- Created on: 1995-12-07
-- Created by: Jacques GOUSSARD
-- Copyright (c) 1995-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
deferred class Result from BRepCheck inherits TShared from MMgt
---Purpose:
uses Shape from TopoDS,
ListOfStatus from BRepCheck,
DataMapOfShapeListOfStatus from BRepCheck,
DataMapIteratorOfDataMapOfShapeListOfStatus from BRepCheck
raises NoSuchObject from Standard
is
Initialize;
Init(me: mutable; S: Shape from TopoDS);
InContext(me: mutable; ContextShape: Shape from TopoDS)
is deferred;
Minimum(me: mutable)
is deferred;
Blind(me: mutable)
is deferred;
SetFailStatus(me: mutable; S: Shape from TopoDS);
Status(me)
returns ListOfStatus from BRepCheck
---C++: return const&
---C++: inline
is static;
IsMinimum(me)
returns Boolean from Standard
---C++: inline
is static;
IsBlind(me)
returns Boolean from Standard
---C++: inline
is static;
StatusOnShape(me: mutable; S: Shape from TopoDS)
---Purpose: If not already done, performs the InContext
-- control and returns the list of status.
returns ListOfStatus from BRepCheck
---C++: return const&
raises
NoSuchObject from Standard
is static;
InitContextIterator(me: mutable)
is static;
MoreShapeInContext(me)
returns Boolean from Standard
---C++: inline
is static;
ContextualShape(me)
returns Shape from TopoDS
---C++: return const&
---C++: inline
raises
NoSuchObject from Standard
is static;
StatusOnShape(me)
returns ListOfStatus from BRepCheck
---C++: return const&
---C++: inline
raises
NoSuchObject from Standard
is static;
NextShapeInContext(me: mutable)
is static;
fields
myShape : Shape from TopoDS is protected;
myMin : Boolean from Standard is protected;
myBlind : Boolean from Standard is protected;
myMap : DataMapOfShapeListOfStatus from BRepCheck is protected;
myIter : DataMapIteratorOfDataMapOfShapeListOfStatus from BRepCheck;
end Result;

View File

@@ -14,15 +14,17 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepCheck_Result.ixx>
#include <BRepCheck.hxx>
#include <BRepCheck.hxx>
#include <BRepCheck_Result.hxx>
#include <Standard_NoSuchObject.hxx>
#include <Standard_Type.hxx>
#include <TopoDS_Shape.hxx>
//=======================================================================
//function : BRepCheck_Result
//purpose :
//=======================================================================
BRepCheck_Result::BRepCheck_Result() :
myMin(Standard_False),myBlind(Standard_False)
{

View File

@@ -0,0 +1,104 @@
// Created on: 1995-12-07
// Created by: Jacques GOUSSARD
// Copyright (c) 1995-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BRepCheck_Result_HeaderFile
#define _BRepCheck_Result_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <TopoDS_Shape.hxx>
#include <Standard_Boolean.hxx>
#include <BRepCheck_DataMapOfShapeListOfStatus.hxx>
#include <BRepCheck_DataMapIteratorOfDataMapOfShapeListOfStatus.hxx>
#include <MMgt_TShared.hxx>
#include <BRepCheck_ListOfStatus.hxx>
class Standard_NoSuchObject;
class TopoDS_Shape;
class BRepCheck_Result;
DEFINE_STANDARD_HANDLE(BRepCheck_Result, MMgt_TShared)
class BRepCheck_Result : public MMgt_TShared
{
public:
Standard_EXPORT void Init (const TopoDS_Shape& S);
Standard_EXPORT virtual void InContext (const TopoDS_Shape& ContextShape) = 0;
Standard_EXPORT virtual void Minimum() = 0;
Standard_EXPORT virtual void Blind() = 0;
Standard_EXPORT void SetFailStatus (const TopoDS_Shape& S);
const BRepCheck_ListOfStatus& Status() const;
Standard_Boolean IsMinimum() const;
Standard_Boolean IsBlind() const;
//! If not already done, performs the InContext
//! control and returns the list of status.
Standard_EXPORT const BRepCheck_ListOfStatus& StatusOnShape (const TopoDS_Shape& S);
Standard_EXPORT void InitContextIterator();
Standard_Boolean MoreShapeInContext() const;
const TopoDS_Shape& ContextualShape() const;
const BRepCheck_ListOfStatus& StatusOnShape() const;
Standard_EXPORT void NextShapeInContext();
DEFINE_STANDARD_RTTI(BRepCheck_Result,MMgt_TShared)
protected:
Standard_EXPORT BRepCheck_Result();
TopoDS_Shape myShape;
Standard_Boolean myMin;
Standard_Boolean myBlind;
BRepCheck_DataMapOfShapeListOfStatus myMap;
private:
BRepCheck_DataMapIteratorOfDataMapOfShapeListOfStatus myIter;
};
#include <BRepCheck_Result.lxx>
#endif // _BRepCheck_Result_HeaderFile

View File

@@ -1,88 +0,0 @@
-- Created on: 1996-01-02
-- Created by: Jacques GOUSSARD
-- Copyright (c) 1996-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 Shell from BRepCheck inherits Result from BRepCheck
---Purpose:
uses Shape from TopoDS,
Shell from TopoDS,
ListOfShape from TopTools,
IndexedDataMapOfShapeListOfShape from TopTools,
Status from BRepCheck
is
Create(S: Shell from TopoDS)
returns Shell from BRepCheck;
InContext(me: mutable; ContextShape: Shape from TopoDS);
Minimum(me: mutable);
Blind(me: mutable);
Closed(me: mutable; Update: Boolean from Standard = Standard_False)
---Purpose: Checks if the oriented faces of the shell give a
-- closed shell. If the wire is closed, returns
-- BRepCheck_NoError.If <Update> is set to
-- Standard_True, registers the status in the list.
returns Status from BRepCheck
is static;
Orientation(me: mutable; Update: Boolean from Standard = Standard_False)
---Purpose: Checks if the oriented faces of the shell are
-- correctly oriented. An internal call is made to
-- the method Closed. If <Update> is set to
-- Standard_True, registers the status in the list.
returns Status from BRepCheck
is static;
SetUnorientable(me: mutable)
is static;
IsUnorientable(me)
returns Boolean from Standard
is static;
NbConnectedSet (me: mutable; theSets : in out ListOfShape from TopTools)
returns Integer from Standard;
fields
myNbori : Integer from Standard;
myCdone : Boolean from Standard;
myCstat : Status from BRepCheck;
myOdone : Boolean from Standard;
myOstat : Status from BRepCheck;
myMapEF : IndexedDataMapOfShapeListOfShape from TopTools;
end Shell;

View File

@@ -14,29 +14,28 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepCheck_Shell.ixx>
#include <BRepCheck_ListOfStatus.hxx>
#include <BRepCheck_ListIteratorOfListOfStatus.hxx>
#include <TopTools_MapOfShape.hxx>
#include <TopTools_MapIteratorOfMapOfShape.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
#include <BRep_Tool.hxx>
#include <BRep_Builder.hxx>
#include <TopExp_Explorer.hxx>
#include <BRep_Tool.hxx>
#include <BRepCheck.hxx>
#include <BRepCheck_ListIteratorOfListOfStatus.hxx>
#include <BRepCheck_ListOfStatus.hxx>
#include <BRepCheck_Shell.hxx>
#include <Standard_Type.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopExp.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Shell.hxx>
#include <TopTools_DataMapIteratorOfDataMapOfShapeInteger.hxx>
#include <TopTools_DataMapOfShapeInteger.hxx>
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TopTools_MapIteratorOfMapOfShape.hxx>
#include <TopTools_MapOfShape.hxx>
//=======================================================================
//function : Propagate

View File

@@ -0,0 +1,98 @@
// Created on: 1996-01-02
// Created by: Jacques GOUSSARD
// Copyright (c) 1996-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 _BRepCheck_Shell_HeaderFile
#define _BRepCheck_Shell_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Boolean.hxx>
#include <BRepCheck_Status.hxx>
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
#include <BRepCheck_Result.hxx>
#include <TopTools_ListOfShape.hxx>
class TopoDS_Shell;
class TopoDS_Shape;
class BRepCheck_Shell;
DEFINE_STANDARD_HANDLE(BRepCheck_Shell, BRepCheck_Result)
class BRepCheck_Shell : public BRepCheck_Result
{
public:
Standard_EXPORT BRepCheck_Shell(const TopoDS_Shell& S);
Standard_EXPORT void InContext (const TopoDS_Shape& ContextShape);
Standard_EXPORT void Minimum();
Standard_EXPORT void Blind();
//! Checks if the oriented faces of the shell give a
//! closed shell. If the wire is closed, returns
//! BRepCheck_NoError.If <Update> is set to
//! Standard_True, registers the status in the list.
Standard_EXPORT BRepCheck_Status Closed (const Standard_Boolean Update = Standard_False);
//! Checks if the oriented faces of the shell are
//! correctly oriented. An internal call is made to
//! the method Closed. If <Update> is set to
//! Standard_True, registers the status in the list.
Standard_EXPORT BRepCheck_Status Orientation (const Standard_Boolean Update = Standard_False);
Standard_EXPORT void SetUnorientable();
Standard_EXPORT Standard_Boolean IsUnorientable() const;
Standard_EXPORT Standard_Integer NbConnectedSet (TopTools_ListOfShape& theSets);
DEFINE_STANDARD_RTTI(BRepCheck_Shell,BRepCheck_Result)
protected:
private:
Standard_Integer myNbori;
Standard_Boolean myCdone;
BRepCheck_Status myCstat;
Standard_Boolean myOdone;
BRepCheck_Status myOstat;
TopTools_IndexedDataMapOfShapeListOfShape myMapEF;
};
#endif // _BRepCheck_Shell_HeaderFile

View File

@@ -1,70 +0,0 @@
-- Created by: Peter KURNEV
-- Copyright (c) 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 Solid from BRepCheck
inherits Result from BRepCheck
---Purpose: The class is to check a solid.
uses
Shape from TopoDS,
Solid from TopoDS
is
Create(theS: Solid from TopoDS)
returns Solid from BRepCheck;
---Purpose:
-- Constructor
-- <theS> is the solid to check
InContext(me: mutable;
theContextShape: Shape from TopoDS)
is redefined;
---Purpose:
-- Checks the solid in context of
-- the shape <theContextShape>
Minimum(me: mutable)
is redefined;
---Purpose:
-- Checks the solid per se.
--
-- The scan area is:
-- 1. Shells that overlaps each other
-- Status: BRepCheck_InvalidImbricationOfShells
--
-- 2. Detached parts of the solid (vertices, edges)
-- that have non-internal orientation
-- Status: BRepCheck_BadOrientationOfSubshape
--
--
-- 3. For closed, non-internal shells:
-- 3.1 Shells containing entities of the solid that
-- are outside towards the shells
-- Status: BRepCheck_SubshapeNotInShape
--
-- 3.2 Shells that encloses other Shells
-- (for non-holes)
-- Status: BRepCheck_EnclosedRegion
--
Blind(me: mutable)
is redefined;
---Purpose:
-- see the parent class for more details
--fields
end Solid;

View File

@@ -12,35 +12,37 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepCheck_Solid.ixx>
//
#include <Standard_Type.hxx>
#include <MMgt_TShared.hxx>
//
#include <NCollection_Vector.hxx>
#include <NCollection_Map.hxx>
//
#include <gp_Pnt.hxx>
//
#include <Geom_Curve.hxx>
//
#include <TopoDS_Iterator.hxx>
#include <TopoDS_Solid.hxx>
#include <TopoDS_Shell.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Builder.hxx>
#include <BRep_Tool.hxx>
//
#include <TopExp_Explorer.hxx>
//
#include <TopTools_MapOfShape.hxx>
#include <TopTools_ShapeMapHasher.hxx>
//
#include <BRepClass3d_SolidClassifier.hxx>
//
#include <BRepCheck.hxx>
#include <BRepCheck_ListOfStatus.hxx>
#include <BRepCheck_Solid.hxx>
#include <BRepClass3d_SolidClassifier.hxx>
#include <Geom_Curve.hxx>
#include <gp_Pnt.hxx>
#include <MMgt_TShared.hxx>
#include <NCollection_Map.hxx>
#include <NCollection_Vector.hxx>
#include <Standard_Type.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS_Builder.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Shell.hxx>
#include <TopoDS_Solid.hxx>
#include <TopTools_MapOfShape.hxx>
#include <TopTools_ShapeMapHasher.hxx>
//
//
//
//
//
//
//
//
//
class BRepCheck_HSC;
DEFINE_STANDARD_HANDLE(BRepCheck_HSC, MMgt_TShared);
//=======================================================================

View File

@@ -0,0 +1,94 @@
// Created by: Peter KURNEV
// Copyright (c) 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 _BRepCheck_Solid_HeaderFile
#define _BRepCheck_Solid_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <BRepCheck_Result.hxx>
class TopoDS_Solid;
class TopoDS_Shape;
class BRepCheck_Solid;
DEFINE_STANDARD_HANDLE(BRepCheck_Solid, BRepCheck_Result)
//! The class is to check a solid.
class BRepCheck_Solid : public BRepCheck_Result
{
public:
//! Constructor
//! <theS> is the solid to check
Standard_EXPORT BRepCheck_Solid(const TopoDS_Solid& theS);
//! Checks the solid in context of
//! the shape <theContextShape>
Standard_EXPORT virtual void InContext (const TopoDS_Shape& theContextShape) Standard_OVERRIDE;
//! Checks the solid per se.
//!
//! The scan area is:
//! 1. Shells that overlaps each other
//! Status: BRepCheck_InvalidImbricationOfShells
//!
//! 2. Detached parts of the solid (vertices, edges)
//! that have non-internal orientation
//! Status: BRepCheck_BadOrientationOfSubshape
//!
//! 3. For closed, non-internal shells:
//! 3.1 Shells containing entities of the solid that
//! are outside towards the shells
//! Status: BRepCheck_SubshapeNotInShape
//!
//! 3.2 Shells that encloses other Shells
//! (for non-holes)
//! Status: BRepCheck_EnclosedRegion
Standard_EXPORT virtual void Minimum() Standard_OVERRIDE;
//! see the parent class for more details
Standard_EXPORT virtual void Blind() Standard_OVERRIDE;
DEFINE_STANDARD_RTTI(BRepCheck_Solid,BRepCheck_Result)
protected:
private:
};
#endif // _BRepCheck_Solid_HeaderFile

View File

@@ -0,0 +1,62 @@
// Created on: 1995-12-06
// Created by: Jacques GOUSSARD
// Copyright (c) 1995-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BRepCheck_Status_HeaderFile
#define _BRepCheck_Status_HeaderFile
enum BRepCheck_Status
{
BRepCheck_NoError,
BRepCheck_InvalidPointOnCurve,
BRepCheck_InvalidPointOnCurveOnSurface,
BRepCheck_InvalidPointOnSurface,
BRepCheck_No3DCurve,
BRepCheck_Multiple3DCurve,
BRepCheck_Invalid3DCurve,
BRepCheck_NoCurveOnSurface,
BRepCheck_InvalidCurveOnSurface,
BRepCheck_InvalidCurveOnClosedSurface,
BRepCheck_InvalidSameRangeFlag,
BRepCheck_InvalidSameParameterFlag,
BRepCheck_InvalidDegeneratedFlag,
BRepCheck_FreeEdge,
BRepCheck_InvalidMultiConnexity,
BRepCheck_InvalidRange,
BRepCheck_EmptyWire,
BRepCheck_RedundantEdge,
BRepCheck_SelfIntersectingWire,
BRepCheck_NoSurface,
BRepCheck_InvalidWire,
BRepCheck_RedundantWire,
BRepCheck_IntersectingWires,
BRepCheck_InvalidImbricationOfWires,
BRepCheck_EmptyShell,
BRepCheck_RedundantFace,
BRepCheck_InvalidImbricationOfShells,
BRepCheck_UnorientableShape,
BRepCheck_NotClosed,
BRepCheck_NotConnected,
BRepCheck_SubshapeNotInShape,
BRepCheck_BadOrientation,
BRepCheck_BadOrientationOfSubshape,
BRepCheck_InvalidPolygonOnTriangulation,
BRepCheck_InvalidToleranceValue,
BRepCheck_EnclosedRegion,
BRepCheck_CheckFail
};
#endif // _BRepCheck_Status_HeaderFile

View File

@@ -1,45 +0,0 @@
-- Created on: 1995-12-07
-- Created by: Jacques GOUSSARD
-- Copyright (c) 1995-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class Vertex from BRepCheck inherits Result from BRepCheck
---Purpose:
uses Shape from TopoDS,
Vertex from TopoDS
is
Create(V: Vertex from TopoDS)
returns Vertex from BRepCheck;
InContext(me: mutable; ContextShape: Shape from TopoDS);
Minimum(me: mutable);
Blind(me: mutable);
Tolerance(me: mutable) returns Real from Standard
is static;
end Vertex;

View File

@@ -14,41 +14,37 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepCheck_Vertex.ixx>
#include <BRepCheck_ListOfStatus.hxx>
#include <BRep_TVertex.hxx>
#include <BRep_CurveRepresentation.hxx>
#include <BRep_GCurve.hxx>
#include <BRep_ListIteratorOfListOfCurveRepresentation.hxx>
#include <BRep_ListIteratorOfListOfPointRepresentation.hxx>
#include <BRep_ListOfCurveRepresentation.hxx>
#include <BRep_ListOfPointRepresentation.hxx>
#include <BRep_PointRepresentation.hxx>
#include <BRep_TEdge.hxx>
#include <BRep_TFace.hxx>
#include <BRep_PointRepresentation.hxx>
#include <BRep_ListOfPointRepresentation.hxx>
#include <BRep_ListIteratorOfListOfPointRepresentation.hxx>
#include <BRep_CurveRepresentation.hxx>
#include <BRep_ListOfCurveRepresentation.hxx>
#include <BRep_ListIteratorOfListOfCurveRepresentation.hxx>
#include <BRep_GCurve.hxx>
#include <BRep_Tool.hxx>
#include <gp_Pnt2d.hxx>
#include <BRep_TVertex.hxx>
#include <BRepCheck.hxx>
#include <BRepCheck_ListOfStatus.hxx>
#include <BRepCheck_Vertex.hxx>
#include <Geom2d_Curve.hxx>
#include <Geom_Curve.hxx>
#include <Geom_Surface.hxx>
#include <Geom2d_Curve.hxx>
#include <gp_Pnt2d.hxx>
#include <Standard_Type.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS_Iterator.hxx>
#include <BRepCheck.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Vertex.hxx>
//=======================================================================
//function : BRepCheck_Vertex
//purpose :
//=======================================================================
BRepCheck_Vertex::BRepCheck_Vertex(const TopoDS_Vertex& V)
{
Init(V);

View File

@@ -0,0 +1,72 @@
// Created on: 1995-12-07
// Created by: Jacques GOUSSARD
// Copyright (c) 1995-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BRepCheck_Vertex_HeaderFile
#define _BRepCheck_Vertex_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <BRepCheck_Result.hxx>
#include <Standard_Real.hxx>
class TopoDS_Vertex;
class TopoDS_Shape;
class BRepCheck_Vertex;
DEFINE_STANDARD_HANDLE(BRepCheck_Vertex, BRepCheck_Result)
class BRepCheck_Vertex : public BRepCheck_Result
{
public:
Standard_EXPORT BRepCheck_Vertex(const TopoDS_Vertex& V);
Standard_EXPORT void InContext (const TopoDS_Shape& ContextShape);
Standard_EXPORT void Minimum();
Standard_EXPORT void Blind();
Standard_EXPORT Standard_Real Tolerance();
DEFINE_STANDARD_RTTI(BRepCheck_Vertex,BRepCheck_Result)
protected:
private:
};
#endif // _BRepCheck_Vertex_HeaderFile

View File

@@ -1,142 +0,0 @@
-- Created on: 1995-12-12
-- Created by: Jacques GOUSSARD
-- Copyright (c) 1995-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
-- modified by eap Fri Dec 21 12:17:40 2001 (bug OCC35)
-- Closed2d() added
class Wire from BRepCheck inherits Result from BRepCheck
---Purpose:
uses Shape from TopoDS,
Face from TopoDS,
Wire from TopoDS,
Edge from TopoDS,
IndexedDataMapOfShapeListOfShape from TopTools,
Status from BRepCheck
is
Create(W: Wire from TopoDS)
returns Wire from BRepCheck;
InContext(me: mutable; ContextShape: Shape from TopoDS);
---Purpose: if <ContextShape> is a face, consequently checks
-- SelfIntersect(), Closed(), Orientation() and
-- Closed2d until faulty is found
Minimum(me: mutable);
---Purpose: checks that the wire is not empty and "connex".
-- Called by constructor
Blind(me: mutable);
---Purpose: Does nothing
Closed(me: mutable; Update: Boolean from Standard = Standard_False)
---Purpose: Checks if the oriented edges of the wire give a
-- closed wire. If the wire is closed, returns
-- BRepCheck_NoError. Warning : if the first and
-- last edge are infinite, the wire will be
-- considered as a closed one. If <Update> is set to
-- Standard_True, registers the status in the list.
-- May return (and registers):
-- **BRepCheck_NotConnected, if wire is not
-- topologically closed
-- **BRepCheck_RedundantEdge, if an edge is in wire
-- more than 3 times or in case of 2 occurences if
-- not with FORWARD and REVERSED orientation.
-- **BRepCheck_NoError
returns Status from BRepCheck
is static;
Closed2d(me: mutable; F : Face from TopoDS;
Update: Boolean from Standard = Standard_False)
---Purpose: Checks if edges of the wire give a wire closed in
-- 2d space.
-- Returns BRepCheck_NoError, or BRepCheck_NotClosed
-- If <Update> is set to Standard_True, registers the
-- status in the list.
returns Status from BRepCheck
is static;
Orientation(me: mutable; F : Face from TopoDS;
Update: Boolean from Standard = Standard_False)
---Purpose: Checks if the oriented edges of the wire are
-- correctly oriented. An internal call is made to
-- the method Closed. If no face exists, call the
-- method with a null face (TopoDS_face()). If
-- <Update> is set to Standard_True, registers the
-- status in the list.
-- May return (and registers):
-- BRepCheck_InvalidDegeneratedFlag,
-- BRepCheck_BadOrientationOfSubshape,
-- BRepCheck_NotClosed,
-- BRepCheck_NoError
returns Status from BRepCheck
is static;
SelfIntersect(me: mutable; F : Face from TopoDS;
E1,E2 : out Edge from TopoDS;
Update: Boolean from Standard = Standard_False)
---Purpose: Checks if the wire intersect itself on the face
-- <F>. <E1> and <E2> are the first intersecting
-- edges found. <E2> may be a null edge when a
-- self-intersecting edge is found.If <Update> is set
-- to Standard_True, registers the status in the
-- list.
-- May return (and register):
-- BRepCheck_EmptyWire,
-- BRepCheck_SelfIntersectingWire,
-- BRepCheck_NoCurveOnSurface,
-- BRepCheck_NoError
returns Status from BRepCheck
is static;
GeometricControls(me)
---Purpose: report SelfIntersect() check would be (is) done
returns Boolean from Standard
is static;
GeometricControls(me: mutable; B: Boolean from Standard)
---Purpose: set SelfIntersect() to be checked
is static;
SetStatus(me: mutable;
theStatus:Status from BRepCheck)
--- Purpose: Sets status of Wire;
is static;
fields
-- myNbori : Integer from Standard; -- not used (eap)
myCdone : Boolean from Standard; -- Closed() or Oriented() is done
myCstat : Status from BRepCheck; -- result of Closed() or Oriented()
myMapVE : IndexedDataMapOfShapeListOfShape from TopTools;
myGctrl : Boolean from Standard; -- do check SelfIntersect() or not
end Wire;

View File

@@ -20,63 +20,63 @@
// Check self-intersection in case of closed edge
// modified by eap Fri Dec 21 17:36:55 2001 (bug OCC35)
// Closed2d() added
// Modified by skv - Wed Jul 23 12:22:20 2003 OCC1764
#include <BRepCheck_Wire.ixx>
#include <BRepCheck_ListOfStatus.hxx>
#include <Bnd_Array1OfBox2d.hxx>
#include <BndLib_Add2dCurve.hxx>
#include <BRep_Tool.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepAdaptor_HSurface.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <BRepCheck.hxx>
#include <BRepCheck_ListIteratorOfListOfStatus.hxx>
#include <TopTools_MapOfShape.hxx>
#include <TopTools_MapIteratorOfMapOfShape.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
#include <TopTools_DataMapOfShapeListOfShape.hxx>
#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopLoc_Location.hxx>
#include <TColGeom2d_Array1OfCurve.hxx>
#include <BRepCheck_ListOfStatus.hxx>
#include <BRepCheck_Wire.hxx>
#include <BRepTools_WireExplorer.hxx>
#include <ElCLib.hxx>
#include <Geom2d_Curve.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dAdaptor_HCurve.hxx>
#include <Geom2dInt_GInter.hxx>
#include <Geom_Curve.hxx>
#include <gp_Lin.hxx>
#include <gp_Pnt.hxx>
#include <gp_Pnt2d.hxx>
#include <IntRes2d_Domain.hxx>
#include <IntRes2d_Intersection.hxx>
#include <IntRes2d_IntersectionPoint.hxx>
#include <IntRes2d_IntersectionSegment.hxx>
#include <IntRes2d_Transition.hxx>
#include <IntRes2d_Domain.hxx>
#include <Geom2dInt_GInter.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Pnt.hxx>
#include <gp_Lin.hxx>
#include <Geom2d_Curve.hxx>
#include <Geom_Curve.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dAdaptor_HCurve.hxx>
#include <BRep_Tool.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <BRepAdaptor_HSurface.hxx>
#include <BRepCheck.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopTools_MapOfOrientedShape.hxx>
#include <TopTools_HArray1OfShape.hxx>
#include <TopTools_MapIteratorOfMapOfOrientedShape.hxx>
//Patch
#include <Precision.hxx>
#include <Bnd_Array1OfBox2d.hxx>
#include <BndLib_Add2dCurve.hxx>
//#ifdef WNT
#include <stdio.h>
#include <BRepTools_WireExplorer.hxx>
#include <Standard_Type.hxx>
#include <TColGeom2d_Array1OfCurve.hxx>
#include <TopExp.hxx>
//#endif
#include <TopExp_Explorer.hxx>
#include <TopLoc_Location.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Wire.hxx>
#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
#include <TopTools_DataMapOfShapeListOfShape.hxx>
#include <TopTools_HArray1OfShape.hxx>
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
#include <TopTools_IndexedMapOfOrientedShape.hxx>
#include <ElCLib.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TopTools_MapIteratorOfMapOfOrientedShape.hxx>
#include <TopTools_MapIteratorOfMapOfShape.hxx>
#include <TopTools_MapOfOrientedShape.hxx>
#include <TopTools_MapOfShape.hxx>
#include <stdio.h>
//Patch
//#ifdef WNT
//#endif
static void Propagate(const TopTools_IndexedDataMapOfShapeListOfShape&,
const TopoDS_Shape&, // edge
TopTools_MapOfShape&); // mapofedge

View File

@@ -0,0 +1,141 @@
// Created on: 1995-12-12
// Created by: Jacques GOUSSARD
// Copyright (c) 1995-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BRepCheck_Wire_HeaderFile
#define _BRepCheck_Wire_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Standard_Boolean.hxx>
#include <BRepCheck_Status.hxx>
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
#include <BRepCheck_Result.hxx>
class TopoDS_Wire;
class TopoDS_Shape;
class TopoDS_Face;
class TopoDS_Edge;
class BRepCheck_Wire;
DEFINE_STANDARD_HANDLE(BRepCheck_Wire, BRepCheck_Result)
class BRepCheck_Wire : public BRepCheck_Result
{
public:
Standard_EXPORT BRepCheck_Wire(const TopoDS_Wire& W);
//! if <ContextShape> is a face, consequently checks
//! SelfIntersect(), Closed(), Orientation() and
//! Closed2d until faulty is found
Standard_EXPORT void InContext (const TopoDS_Shape& ContextShape);
//! checks that the wire is not empty and "connex".
//! Called by constructor
Standard_EXPORT void Minimum();
//! Does nothing
Standard_EXPORT void Blind();
//! Checks if the oriented edges of the wire give a
//! closed wire. If the wire is closed, returns
//! BRepCheck_NoError. Warning : if the first and
//! last edge are infinite, the wire will be
//! considered as a closed one. If <Update> is set to
//! Standard_True, registers the status in the list.
//! May return (and registers):
//! **BRepCheck_NotConnected, if wire is not
//! topologically closed
//! **BRepCheck_RedundantEdge, if an edge is in wire
//! more than 3 times or in case of 2 occurences if
//! not with FORWARD and REVERSED orientation.
//! **BRepCheck_NoError
Standard_EXPORT BRepCheck_Status Closed (const Standard_Boolean Update = Standard_False);
//! Checks if edges of the wire give a wire closed in
//! 2d space.
//! Returns BRepCheck_NoError, or BRepCheck_NotClosed
//! If <Update> is set to Standard_True, registers the
//! status in the list.
Standard_EXPORT BRepCheck_Status Closed2d (const TopoDS_Face& F, const Standard_Boolean Update = Standard_False);
//! Checks if the oriented edges of the wire are
//! correctly oriented. An internal call is made to
//! the method Closed. If no face exists, call the
//! method with a null face (TopoDS_face()). If
//! <Update> is set to Standard_True, registers the
//! status in the list.
//! May return (and registers):
//! BRepCheck_InvalidDegeneratedFlag,
//! BRepCheck_BadOrientationOfSubshape,
//! BRepCheck_NotClosed,
//! BRepCheck_NoError
Standard_EXPORT BRepCheck_Status Orientation (const TopoDS_Face& F, const Standard_Boolean Update = Standard_False);
//! Checks if the wire intersect itself on the face
//! <F>. <E1> and <E2> are the first intersecting
//! edges found. <E2> may be a null edge when a
//! self-intersecting edge is found.If <Update> is set
//! to Standard_True, registers the status in the
//! list.
//! May return (and register):
//! BRepCheck_EmptyWire,
//! BRepCheck_SelfIntersectingWire,
//! BRepCheck_NoCurveOnSurface,
//! BRepCheck_NoError
Standard_EXPORT BRepCheck_Status SelfIntersect (const TopoDS_Face& F, TopoDS_Edge& E1, TopoDS_Edge& E2, const Standard_Boolean Update = Standard_False);
//! report SelfIntersect() check would be (is) done
Standard_EXPORT Standard_Boolean GeometricControls() const;
//! set SelfIntersect() to be checked
Standard_EXPORT void GeometricControls (const Standard_Boolean B);
//! Sets status of Wire;
Standard_EXPORT void SetStatus (const BRepCheck_Status theStatus);
DEFINE_STANDARD_RTTI(BRepCheck_Wire,BRepCheck_Result)
protected:
private:
Standard_Boolean myCdone;
BRepCheck_Status myCstat;
TopTools_IndexedDataMapOfShapeListOfShape myMapVE;
Standard_Boolean myGctrl;
};
#endif // _BRepCheck_Wire_HeaderFile

View File

@@ -1,6 +1,27 @@
BRepCheck_ListOfStatus.hxx
BRepCheck_ListIteratorOfListOfStatus.hxx
BRepCheck_DataMapOfShapeListOfStatus.hxx
BRepCheck.cxx
BRepCheck.hxx
BRepCheck_Analyzer.cxx
BRepCheck_Analyzer.hxx
BRepCheck_Analyzer.lxx
BRepCheck_DataMapIteratorOfDataMapOfShapeListOfStatus.hxx
BRepCheck_DataMapOfShapeResult.hxx
BRepCheck_DataMapIteratorOfDataMapOfShapeResult.hxx
BRepCheck_DataMapOfShapeListOfStatus.hxx
BRepCheck_DataMapOfShapeResult.hxx
BRepCheck_Edge.cxx
BRepCheck_Edge.hxx
BRepCheck_Face.cxx
BRepCheck_Face.hxx
BRepCheck_ListIteratorOfListOfStatus.hxx
BRepCheck_ListOfStatus.hxx
BRepCheck_Result.cxx
BRepCheck_Result.hxx
BRepCheck_Result.lxx
BRepCheck_Shell.cxx
BRepCheck_Shell.hxx
BRepCheck_Solid.cxx
BRepCheck_Solid.hxx
BRepCheck_Status.hxx
BRepCheck_Vertex.cxx
BRepCheck_Vertex.hxx
BRepCheck_Wire.cxx
BRepCheck_Wire.hxx