75 pEdge = pEdge->
next();
78 while( pEdge != pEnd );
97 pEdge = pEdge->
next();
99 }
while (pEdge != pEnd);
118template<
class TSpatFData = SpatialFaceData>
137 while( !iter.
done() ) {
138 pSFD->attach( iter.
get() );
146 void destroy(
bool bRestoreFaceTags =
true ) {
148 if( bRestoreFaceTags ) {
179inline static T mymax( T
v1, T
v2 ) {
216template<
class TSpatialFaceData = SpatialFaceData>
221 TSpatialFaceData* pFaceData =
static_cast<TSpatialFaceData*
>( pEntity );
247 bool intOrDif =
false,
248 Profile2D* pResultExcludingCoincidingBoundary = 0,
249 Profile2D* pResultExcludingOppositeBoundary = 0,
253 bool bUseReverseEdgeAtMerge =
false,
276 if (!pCutPlaneBounds || !pCutFaceBox)
284 incCutFaceBox = *pCutFaceBox;
285 pIncCutFaceBox = &incCutFaceBox;
290 double origLenX = fabs(maxPt.
x - minPt.
x);
291 double origLenY = fabs(maxPt.
y - minPt.
y);
294 double diag_len = diag.
length();
302 double newLenX = fabs(newMaxPt.
x - newMinPt.
x);
303 double newLenY = fabs(newMaxPt.
y - newMinPt.
y);
309 incCutFaceBox.
set(newMinPt, newMaxPt);
319 box2dPts[0] = incCutFaceBox.
minPoint();
320 box2dPts[2] = incCutFaceBox.
maxPoint();
325 for (
int i = 0; i != 4; i++)
338 pResultExcludingCoincidingBoundary,
339 pResultExcludingOppositeBoundary,
340 pResultExcludingBoundary,
341 pCoincidingFaces, pOppositeFaces, bUseReverseEdgeAtMerge,
checkFaceByRay, sourceEdges, pIncCutFaceBox, pCutFaceBox);
362 if (!inside && intOrDif)
379 pResultExcludingCoincidingBoundary,
380 pResultExcludingOppositeBoundary,
381 pResultExcludingBoundary,
382 pCoincidingFaces, pOppositeFaces, sourceEdges, pCutFaceBox);
386 if(pResultExcludingOppositeBoundary != NULL)
388 pResultExcludingOppositeBoundary->deleteCoincident(1.e-10);
OdUInt32 faceCount() const
void ReserveBuffers(size_t nFaces)
double GetAddNodeTol(const OdGeTol tol=FMGeGbl::gTol) const
void setTag(TagType nTag)
const OdGePlane & plane() const
Edge * edge(OdUInt32 nLoop=0) const
void destroy(bool bRestoreFaceTags=true)
const OdSiSpatialIndex & index() const
OdSiSpatialIndexPtr m_pFacesIndex
OdArray< TSpatFData > & faceDataArray()
OdSiSpatialIndex & build(const Body *pBody, double eps)
OdSiSpatialIndex & index()
OdArray< TSpatFData > m_spatialDataArray
OdArray< RayFaceIntersection > m_rayFaceInters
void reserveBuffers(size_t nFaces)
void setTolerance(const OdGeTol &tol)
void AddScaledBoxContour(const OdGeExtents2d &bbox)
FaceConstPtrArray m_coinciding
SegmentMerger m_segmentsMerger
const OdGePlane & cut_plane() const
void set_cut_plane(const OdGePlane &cutPlane)
void checkFaceByRay(const Face *pFace)
SegmentMerger * m_pCurSegMerger
void collect_all_segments()
void build_profiles(Profile2D *pResInclBndry, Profile2D *pResExclCoBndry, Profile2D *pResExclOpBndry, Profile2D *pResExclBndry, FaceConstPtrArray *pCoincidingFaces, FaceConstPtrArray *pOppositeFaces, OdArray< const Edge * > *sourceEdges, const OdGeExtents2d *pBox)
void build_results(Profile2D *pResInclBndry, Profile2D *pResExclCoBndry, Profile2D *pResExclOpBndry, Profile2D *pResExclBndry, FaceConstPtrArray *pCoincidingFaces, FaceConstPtrArray *pOppositeFaces, bool bUseReverseEdgeAtMerge, bool &checkFaceByRay, OdArray< const Edge * > *sourceEdges=0, const OdGeExtents2d *pIncBox=0, const OdGeExtents2d *pOrigBox=0)
void collect_face(const Face *pFace)
void slice(const OdGePlane &cutPlane, const FaceSpatialIndex< TSpatialFaceData > &faceSpatial, Profile2D *pResultIncludingBoundary, bool intOrDif=false, Profile2D *pResultExcludingCoincidingBoundary=0, Profile2D *pResultExcludingOppositeBoundary=0, Profile2D *pResultExcludingBoundary=0, FaceConstPtrArray *pCoincidingFaces=0, FaceConstPtrArray *pOppositeFaces=0, bool bUseReverseEdgeAtMerge=false, OdArray< const Edge * > *sourceEdges=0, const OdGeExtents3d *pCutPlaneBounds=0, const OdGeExtents2d *pCutFaceBox=0)
void initSlicerAndFaceIndex(const Body *pBody, FaceSpatialIndex< TSpatialFaceData > &faceSpatialIndex, double eps=OdGeTol().equalVector())
const OdGePoint3d & point() const
void resize(size_type logicalLength, const T &value)
void set(const OdGePoint2d &min, const OdGePoint2d &max)
const OdGePoint2d & maxPoint() const
const OdGePoint2d & minPoint() const
static GE_STATIC_EXPORT const OdGeExtents2d kInvalid
OdGeVector2d diagonal() const
OdGeExtents3d & addPoint(const OdGePoint3d &point)
OdGePoint3d pointOnPlane() const
OdGeVector3d normal() const
OdGePoint2d paramOf(const OdGePoint3d &point, const OdGeTol &tol=OdGeContext::gTol) const
OdGePoint3d evalPoint(const OdGePoint2d ¶m) const
double equalVector() const
double equalPoint() const
bool isZeroLength(const OdGeTol &tol=OdGeContext::gTol) const
static OdSiSpatialIndexPtr createObject(OdUInt32 flags, unsigned int initialNumEntity, unsigned int maxDepth=30, unsigned int maxCount=20, double eps=1e-10)
virtual void insert(OdSiEntity *entity)=0
virtual void query(const OdSiShape &shape, OdSiVisitor &visitor) const =0
virtual const OdGeTol & tolerance() const =0
GLfloat GLfloat GLfloat v2
GLuint GLsizei GLsizei * length
OdArray< Face *, OdMemoryAllocator< Face * > > FacePtrArray
OdArray< const Face *, OdMemoryAllocator< const Face * > > FaceConstPtrArray
OdArray< Vertex *, OdMemoryAllocator< Vertex * > > VertexIndex
bool contains(const OdGeExtents3d &, bool, const OdGeTol &) const
bool intersects(const OdGeExtents3d &extents, bool planar, const OdGeTol &tol) const
bool extents(OdGeExtents3d &extents) const
static void extents(const Face *pFace, OdGeExtents2d &extents)
bool contains(const OdGeExtents3d &, bool, const OdGeTol &) const
const Face * face() const
bool extents(OdGeExtents2d &extents) const
static void extents(const Face *pFace, OdGeExtents3d &extents)