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

ModelingAlgorithms
TKShHealing
ShapeFix


ShapeFix_ComposeShell Class Reference

This class is intended to create a shell from the composite
surface (grid of surfaces) and set of wires.
It may be either division of the supporting surface of the
face, or creating a shape corresponding to face on composite
surface which is missing in CAS.CADE but exists in some other
systems.
.

#include <ShapeFix_ComposeShell.hxx>

Inheritance diagram for ShapeFix_ComposeShell:

Inheritance graph
[legend]

Public Member Functions

Standard_EXPORT ShapeFix_ComposeShell ()
 Creates empty tool.
.
Standard_EXPORT void Init (const Handle(ShapeExtend_CompositeSurface)&Grid, const TopLoc_Location &L, const TopoDS_Face &Face, const Standard_Real Prec)
 Initializes with composite surface, face and precision.
Here face defines both set of wires and way of getting
pcurves. Precision is used (together with tolerance of edges)
for handling subtle cases, such as tangential intersections.
.
Standard_EXPORT Standard_BooleanClosedMode ()
 Returns (modifiable) flag for special 'closed'
mode which forces ComposeShell to consider
all pcurves on closed surface as modulo period.
This can reduce reliability, but allows to deal
with wires closed in 3d but open in 2d (missing seam)
Default is False
.
virtual Standard_EXPORT Standard_Boolean Perform ()
 Performs the work on already loaded data.
.
Standard_EXPORT void SplitEdges ()
 Splits edges in the original shape by grid.
This is a part of Perform() which does not produce any
resulting shape; the only result is filled context
where splittings are recorded.
.
Standard_EXPORT const TopoDS_Shape & Result () const
 Returns resulting shell or face (or Null shape if not done)
.
Standard_EXPORT Standard_Boolean Status (const ShapeExtend_Status status) const
 Queries status of last call to Perform()
OK : nothing done (some kind of error)
DONE1: splitting is done, at least one new face created
DONE2: splitting is done, several new faces obtained
FAIL1: misoriented wire encountered (handled)
FAIL2: recoverable parity error
FAIL3: edge with no pcurve on supporting face
FAIL4: unrecoverable algorithm error (parity check)
.
Standard_EXPORT void DispatchWires (TopTools_SequenceOfShape &faces, ShapeFix_SequenceOfWireSegment &wires) const
 Creates new faces from the set of (closed) wires. Each wire
is put on corresponding patch in the composite surface,
and all pcurves on the initial (pseudo)face are reassigned to
that surface. If several wires are one inside another, single
face is created.
.
Standard_EXPORT void SetTransferParamTool (const Handle(ShapeAnalysis_TransferParameters)&TransferParam)
 Sets tool for transfer parameters from 3d to 2d and vice versa.
.
Standard_EXPORT Handle_ShapeAnalysis_TransferParameters GetTransferParamTool () const
 Gets tool for transfer parameters from 3d to 2d and vice versa.
.
Standard_EXPORT const Handle (Standard_Type)&DynamicType() const

Protected Member Functions

Standard_EXPORT void LoadWires (ShapeFix_SequenceOfWireSegment &seqw) const
 Fill sequence of wire segments by wires from myFace
(pre-loaded). It performs reorder so that edges in segments
are well-ordered. The context is applied to all wires
before using them.
.
Standard_EXPORT Standard_Integer ComputeCode (const Handle(ShapeExtend_WireData)&wire, const gp_Lin2d &line, const Standard_Integer begInd, const Standard_Integer endInd, const Standard_Real begPar, const Standard_Real endPar, const Standard_Boolean IsInternal=Standard_False)
 Analyze tangencies and compute orientation code for wire segment
between two intersections: tells if segment is on left or right side
of cutting line, or tangent to it (by several points recomputed to 3d,
distance is compared with tolerance of corresponding edge).
.
Standard_EXPORT ShapeFix_WireSegment SplitWire (ShapeFix_WireSegment &wire, TColStd_SequenceOfInteger &indexes, const TColStd_SequenceOfReal &values, TopTools_SequenceOfShape &vertices, const TColStd_SequenceOfInteger &segcodes, const Standard_Boolean cutbyu, const Standard_Integer cutindex)
 Splits edges in the wire by given indices of edges and
parameters on them. Returns resulting wire and vertices
corresponding to splitting parameters. If two consequtive
splitting points are too near one to another (with tolerance
of edge), edge is divided in single point. In the same way,
splitting which is too near to end of edge, is not applied
(end vertex is returned instead).
.
Standard_EXPORT Standard_Boolean SplitByLine (ShapeFix_WireSegment &wire, const gp_Lin2d &line, const Standard_Boolean cutbyu, const Standard_Integer cutindex, TColStd_SequenceOfReal &SplitLinePar, TColStd_SequenceOfInteger &SplitLineCode, TopTools_SequenceOfShape &SplitLineVertex)
 Split edges in the wire by cutting line.
Wires with FORWARD or REVERSED orientation are considered
as closed.
.
Standard_EXPORT void SplitByLine (ShapeFix_SequenceOfWireSegment &seqw, const gp_Lin2d &line, const Standard_Boolean cutbyu, const Standard_Integer cutindex)
 Split edges in the sequence of wires by cutting line.
Wires with FORWARD or REVERSED orientation are considered
as closed.
.
Standard_EXPORT void SplitByGrid (ShapeFix_SequenceOfWireSegment &seqw)
 Split initial set of (closed) wires by grid of lines corresponding
to joints between patches on the composite surface.
Parts of joint lines which get inside the face are also added
into the sequence as wires with orientation EXTERNAL.
They share common vertices with all wires they intersect.
All modifications (splitting) are recorded in context,
except splitting of joint edge itself and wires marked as
EXTERNAL (they supposed to be another joint edges).
.
Standard_EXPORT void BreakWires (ShapeFix_SequenceOfWireSegment &seqw)
 Break wires into open wire segments by common vertices
(splitting points), so that each segment is either closed and
not touching others, or touches others at ends (have common
vertices).
After that, each wire segment lies on its own patch of grid.
.
Standard_EXPORT void CollectWires (ShapeFix_SequenceOfWireSegment &wires, ShapeFix_SequenceOfWireSegment &seqw)
 Collect set of wire segments (already splitted) into closed
wires. This is done by traversing all the segments in allowed
directions, starting only from the REVERSED and FORWARD and
taking EXTERNAL as necessary in fork points. Forks are detected
by common vertices. In fork point, most left way is seleccted
among all possible ways.
.
Standard_EXPORT void MakeFacesOnPatch (TopTools_SequenceOfShape &faces, const Handle(Geom_Surface)&surf, TopTools_SequenceOfShape &loops) const
 Creates new faces on one path of grid. It dispatches given loops
(wires) into one or several faces depending on their mutual
position.
.

Protected Attributes

TopAbs_Orientation myOrient
TopoDS_Shape myResult
Standard_Integer myStatus

Private Attributes

Handle_ShapeExtend_CompositeSurface myGrid
TopLoc_Location myLoc
TopoDS_Face myFace
Standard_Real myUResolution
Standard_Real myVResolution
Handle_ShapeAnalysis_TransferParameters myTransferParamTool
Standard_Boolean myInvertEdgeStatus
Standard_Boolean myClosedMode
Standard_Boolean myUClosed
Standard_Boolean myVClosed
Standard_Real myUPeriod
Standard_Real myVPeriod

Constructor & Destructor Documentation

Standard_EXPORT ShapeFix_ComposeShell::ShapeFix_ComposeShell  ) 
 


Member Function Documentation

Standard_EXPORT void ShapeFix_ComposeShell::BreakWires ShapeFix_SequenceOfWireSegment seqw  )  [protected]
 

Standard_EXPORT Standard_Boolean& ShapeFix_ComposeShell::ClosedMode  ) 
 

Standard_EXPORT void ShapeFix_ComposeShell::CollectWires ShapeFix_SequenceOfWireSegment wires,
ShapeFix_SequenceOfWireSegment seqw
[protected]
 

Standard_EXPORT Standard_Integer ShapeFix_ComposeShell::ComputeCode const Handle(ShapeExtend_WireData)&  wire,
const gp_Lin2d &  line,
const Standard_Integer  begInd,
const Standard_Integer  endInd,
const Standard_Real  begPar,
const Standard_Real  endPar,
const Standard_Boolean  IsInternal = Standard_False
[protected]
 

Standard_EXPORT void ShapeFix_ComposeShell::DispatchWires TopTools_SequenceOfShape &  faces,
ShapeFix_SequenceOfWireSegment wires
const
 

Standard_EXPORT Handle_ShapeAnalysis_TransferParameters ShapeFix_ComposeShell::GetTransferParamTool  )  const
 

Standard_EXPORT const ShapeFix_ComposeShell::Handle Standard_Type   )  const
 

Reimplemented from ShapeFix_Root.

Standard_EXPORT void ShapeFix_ComposeShell::Init const Handle(ShapeExtend_CompositeSurface)&  Grid,
const TopLoc_Location &  L,
const TopoDS_Face &  Face,
const Standard_Real  Prec
 

Standard_EXPORT void ShapeFix_ComposeShell::LoadWires ShapeFix_SequenceOfWireSegment seqw  )  const [protected]
 

Standard_EXPORT void ShapeFix_ComposeShell::MakeFacesOnPatch TopTools_SequenceOfShape &  faces,
const Handle(Geom_Surface)&  surf,
TopTools_SequenceOfShape &  loops
const [protected]
 

virtual Standard_EXPORT Standard_Boolean ShapeFix_ComposeShell::Perform  )  [virtual]
 

Standard_EXPORT const TopoDS_Shape& ShapeFix_ComposeShell::Result  )  const
 

Standard_EXPORT void ShapeFix_ComposeShell::SetTransferParamTool const Handle(ShapeAnalysis_TransferParameters)&  TransferParam  ) 
 

Standard_EXPORT void ShapeFix_ComposeShell::SplitByGrid ShapeFix_SequenceOfWireSegment seqw  )  [protected]
 

Standard_EXPORT void ShapeFix_ComposeShell::SplitByLine ShapeFix_SequenceOfWireSegment seqw,
const gp_Lin2d &  line,
const Standard_Boolean  cutbyu,
const Standard_Integer  cutindex
[protected]
 

Standard_EXPORT Standard_Boolean ShapeFix_ComposeShell::SplitByLine ShapeFix_WireSegment wire,
const gp_Lin2d &  line,
const Standard_Boolean  cutbyu,
const Standard_Integer  cutindex,
TColStd_SequenceOfReal &  SplitLinePar,
TColStd_SequenceOfInteger &  SplitLineCode,
TopTools_SequenceOfShape &  SplitLineVertex
[protected]
 

Standard_EXPORT void ShapeFix_ComposeShell::SplitEdges  ) 
 

Standard_EXPORT ShapeFix_WireSegment ShapeFix_ComposeShell::SplitWire ShapeFix_WireSegment wire,
TColStd_SequenceOfInteger &  indexes,
const TColStd_SequenceOfReal &  values,
TopTools_SequenceOfShape &  vertices,
const TColStd_SequenceOfInteger &  segcodes,
const Standard_Boolean  cutbyu,
const Standard_Integer  cutindex
[protected]
 

Standard_EXPORT Standard_Boolean ShapeFix_ComposeShell::Status const ShapeExtend_Status  status  )  const
 


Field Documentation

Standard_Boolean ShapeFix_ComposeShell::myClosedMode [private]
 

TopoDS_Face ShapeFix_ComposeShell::myFace [private]
 

Handle_ShapeExtend_CompositeSurface ShapeFix_ComposeShell::myGrid [private]
 

Standard_Boolean ShapeFix_ComposeShell::myInvertEdgeStatus [private]
 

TopLoc_Location ShapeFix_ComposeShell::myLoc [private]
 

TopAbs_Orientation ShapeFix_ComposeShell::myOrient [protected]
 

TopoDS_Shape ShapeFix_ComposeShell::myResult [protected]
 

Standard_Integer ShapeFix_ComposeShell::myStatus [protected]
 

Handle_ShapeAnalysis_TransferParameters ShapeFix_ComposeShell::myTransferParamTool [private]
 

Standard_Boolean ShapeFix_ComposeShell::myUClosed [private]
 

Standard_Real ShapeFix_ComposeShell::myUPeriod [private]
 

Standard_Real ShapeFix_ComposeShell::myUResolution [private]
 

Standard_Boolean ShapeFix_ComposeShell::myVClosed [private]
 

Standard_Real ShapeFix_ComposeShell::myVPeriod [private]
 

Standard_Real ShapeFix_ComposeShell::myVResolution [private]
 


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