OCC Main Page | ModelingAlgorithms | Toolkits | Packages | Class Hierarchy | Data Structures | File List | Data Fields | Globals

ModelingAlgorithms
TKShHealing
ShapeFix


ShapeFix_Edge Class Reference

Fixing invalid edge.
Geometrical and/or topological inconsistency:
- no 3d curve or pcurve,
- mismatching orientation of 3d curve and pcurve,
- incorrect SameParameter flag (curve deviation is greater than
edge tolerance),
- not adjacent curves (3d or pcurve) to the vertices.
.

#include <ShapeFix_Edge.hxx>


Public Member Functions

Standard_EXPORT ShapeFix_Edge ()
 Empty constructor
.
Standard_EXPORT Handle_ShapeConstruct_ProjectCurveOnSurface Projector ()
 Returns the projector used for recomputing missing pcurves
Can be used for adjusting parameters of projector
.
Standard_EXPORT Standard_Boolean FixRemovePCurve (const TopoDS_Edge &edge, const TopoDS_Face &face)
Standard_EXPORT Standard_Boolean FixRemovePCurve (const TopoDS_Edge &edge, const Handle(Geom_Surface)&surface, const TopLoc_Location &location)
 Removes the pcurve(s) of the edge if it does not match the
vertices
Check is done
Use : It is to be called when pcurve of an edge can be wrong
(e.g., after import from IGES)
Returns: True, if does not match, removed (status DONE)
False, (status OK) if matches or (status FAIL) if no pcurve,
nothing done
.
Standard_EXPORT Standard_Boolean FixRemoveCurve3d (const TopoDS_Edge &edge)
 Removes 3d curve of the edge if it does not match the vertices
Returns: True, if does not match, removed (status DONE)
False, (status OK) if matches or (status FAIL) if no 3d curve,
nothing done
.
Standard_EXPORT Standard_Boolean FixAddPCurve (const TopoDS_Edge &edge, const TopoDS_Face &face, const Standard_Boolean isSeam, const Standard_Real prec=0.0)
 See method below for information
.
Standard_EXPORT Standard_Boolean FixAddPCurve (const TopoDS_Edge &edge, const Handle(Geom_Surface)&surface, const TopLoc_Location &location, const Standard_Boolean isSeam, const Standard_Real prec=0.0)
 See method below for information
.
Standard_EXPORT Standard_Boolean FixAddPCurve (const TopoDS_Edge &edge, const TopoDS_Face &face, const Standard_Boolean isSeam, const Handle(ShapeAnalysis_Surface)&surfana, const Standard_Real prec=0.0)
 See method below for information
.
Standard_EXPORT Standard_Boolean FixAddPCurve (const TopoDS_Edge &edge, const Handle(Geom_Surface)&surface, const TopLoc_Location &location, const Standard_Boolean isSeam, const Handle(ShapeAnalysis_Surface)&surfana, const Standard_Real prec=0.0)
 Adds pcurve(s) of the edge if missing (by projecting 3d curve)
Parameter isSeam indicates if the edge is a seam.
The parameter <prec> defines the precision for calculations.
If it is 0 (default), the tolerance of the edge is taken.
Remark : This method is rather for internal use since it accepts parameter
<surfana> for optimization of computations
Use : It is to be called after FixRemovePCurve (if removed) or in any
case when edge can have no pcurve
Returns: True if pcurve was added, else False
Status :
OK : Pcurve exists
FAIL1: No 3d curve
FAIL2: fail during projecting
DONE1: Pcurve was added
DONE2: specific case of pcurve going through degenerated point on
sphere encountered during projection (see class
ShapeConstruct_ProjectCurveOnSurface for more info)
.
Standard_EXPORT Standard_Boolean FixAddCurve3d (const TopoDS_Edge &edge)
 Tries to build 3d curve of the edge if missing
Use : It is to be called after FixRemoveCurve3d (if removed) or in any
case when edge can have no 3d curve
Returns: True if 3d curve was added, else False
Status :
OK : 3d curve exists
FAIL1: BRepLib::BuildCurve3d() has failed
DONE1: 3d curve was added
.
Standard_EXPORT Standard_Boolean FixVertexTolerance (const TopoDS_Edge &edge, const TopoDS_Face &face)
Standard_EXPORT Standard_Boolean FixVertexTolerance (const TopoDS_Edge &edge)
 Increases the tolerances of the edge vertices to comprise
the ends of 3d curve and pcurve on the given face
(first method) or all pcurves stored in an edge (second one)
Returns: True, if tolerances have been increased, otherwise False
Status:
OK : the original tolerances have not been changed
DONE1: the tolerance of first vertex has been increased
DONE2: the tolerance of last vertex has been increased
.
Standard_EXPORT Standard_Boolean FixReversed2d (const TopoDS_Edge &edge, const TopoDS_Face &face)
Standard_EXPORT Standard_Boolean FixReversed2d (const TopoDS_Edge &edge, const Handle(Geom_Surface)&surface, const TopLoc_Location &location)
 Fixes edge if pcurve is directed opposite to 3d curve
Check is done by call to the function
ShapeAnalysis_Edge::CheckCurve3dWithPCurve()
Warning: For seam edge this method will check and fix the pcurve in only
one direction. Hence, it should be called twice for seam edge:
once with edge orientation FORWARD and once with REVERSED.
Returns: False if nothing done, True if reversed (status DONE)
Status: OK - pcurve OK, nothing done
FAIL1 - no pcurve
FAIL2 - no 3d curve
DONE1 - pcurve was reversed
.
Standard_EXPORT Standard_Boolean FixSameParameter (const TopoDS_Edge &edge, const Standard_Real tolerance=0.0)
 Tries to make edge SameParameter and sets corresponding
tolerance and SameParameter flag.
First, it makes edge same range if SameRange flag is not set.
.
Standard_EXPORT Standard_Boolean Status (const ShapeExtend_Status status) const
 Returns the status (in the form of True/False) of last Fix
.
Standard_EXPORT const Handle (Standard_Type)&DynamicType() const

Protected Attributes

Standard_Integer myStatus
Handle_ShapeConstruct_ProjectCurveOnSurface myProjector


Constructor & Destructor Documentation

Standard_EXPORT ShapeFix_Edge::ShapeFix_Edge  ) 
 


Member Function Documentation

Standard_EXPORT Standard_Boolean ShapeFix_Edge::FixAddCurve3d const TopoDS_Edge &  edge  ) 
 

Standard_EXPORT Standard_Boolean ShapeFix_Edge::FixAddPCurve const TopoDS_Edge &  edge,
const Handle(Geom_Surface)&  surface,
const TopLoc_Location &  location,
const Standard_Boolean  isSeam,
const Handle(ShapeAnalysis_Surface)&  surfana,
const Standard_Real  prec = 0.0
 

Standard_EXPORT Standard_Boolean ShapeFix_Edge::FixAddPCurve const TopoDS_Edge &  edge,
const TopoDS_Face &  face,
const Standard_Boolean  isSeam,
const Handle(ShapeAnalysis_Surface)&  surfana,
const Standard_Real  prec = 0.0
 

Standard_EXPORT Standard_Boolean ShapeFix_Edge::FixAddPCurve const TopoDS_Edge &  edge,
const Handle(Geom_Surface)&  surface,
const TopLoc_Location &  location,
const Standard_Boolean  isSeam,
const Standard_Real  prec = 0.0
 

Standard_EXPORT Standard_Boolean ShapeFix_Edge::FixAddPCurve const TopoDS_Edge &  edge,
const TopoDS_Face &  face,
const Standard_Boolean  isSeam,
const Standard_Real  prec = 0.0
 

Standard_EXPORT Standard_Boolean ShapeFix_Edge::FixRemoveCurve3d const TopoDS_Edge &  edge  ) 
 

Standard_EXPORT Standard_Boolean ShapeFix_Edge::FixRemovePCurve const TopoDS_Edge &  edge,
const Handle(Geom_Surface)&  surface,
const TopLoc_Location &  location
 

Standard_EXPORT Standard_Boolean ShapeFix_Edge::FixRemovePCurve const TopoDS_Edge &  edge,
const TopoDS_Face &  face
 

Standard_EXPORT Standard_Boolean ShapeFix_Edge::FixReversed2d const TopoDS_Edge &  edge,
const Handle(Geom_Surface)&  surface,
const TopLoc_Location &  location
 

Standard_EXPORT Standard_Boolean ShapeFix_Edge::FixReversed2d const TopoDS_Edge &  edge,
const TopoDS_Face &  face
 

Standard_EXPORT Standard_Boolean ShapeFix_Edge::FixSameParameter const TopoDS_Edge &  edge,
const Standard_Real  tolerance = 0.0
 

Standard_EXPORT Standard_Boolean ShapeFix_Edge::FixVertexTolerance const TopoDS_Edge &  edge  ) 
 

Standard_EXPORT Standard_Boolean ShapeFix_Edge::FixVertexTolerance const TopoDS_Edge &  edge,
const TopoDS_Face &  face
 

Standard_EXPORT const ShapeFix_Edge::Handle Standard_Type   )  const
 

Standard_EXPORT Handle_ShapeConstruct_ProjectCurveOnSurface ShapeFix_Edge::Projector  ) 
 

Standard_EXPORT Standard_Boolean ShapeFix_Edge::Status const ShapeExtend_Status  status  )  const
 


Field Documentation

Handle_ShapeConstruct_ProjectCurveOnSurface ShapeFix_Edge::myProjector [protected]
 

Standard_Integer ShapeFix_Edge::myStatus [protected]
 


The documentation for this class was generated from the following file:
Generated on Mon Aug 25 13:42:38 2008 for OpenCASCADE by  doxygen 1.4.1