Revision: 50628
http://brlcad.svn.sourceforge.net/brlcad/?rev=50628&view=rev
Author: phoenixyjll
Date: 2012-05-22 05:06:16 +0000 (Tue, 22 May 2012)
Log Message:
-----------
Add some control to deal with special cases and add a few comments.
Modified Paths:
--------------
brlcad/trunk/src/librt/primitives/pipe/pipe_brep.cpp
Modified: brlcad/trunk/src/librt/primitives/pipe/pipe_brep.cpp
===================================================================
--- brlcad/trunk/src/librt/primitives/pipe/pipe_brep.cpp 2012-05-21
23:06:59 UTC (rev 50627)
+++ brlcad/trunk/src/librt/primitives/pipe/pipe_brep.cpp 2012-05-22
05:06:16 UTC (rev 50628)
@@ -71,7 +71,7 @@
startoutercurves->Append(curve);
}
ON_BrepFace *newouterface = (*b)->NewRuledFace(startedge, false, endedge,
false);
- (*b)->FlipFace(*newouterface);
+ if (newouterface != NULL) (*b)->FlipFace(*newouterface);
if (startinnercurves->Count() > 0) {
int c3ind = (*b)->AddEdgeCurve(ON_Curve::Cast(*(startinnercurves[0])));
@@ -110,12 +110,13 @@
ON_BrepFace *face = (*b)->NewFace(*revsurf);
(*b)->FlipFace(*face);
- revsurf = ON_RevSurface::New();
- revsurf->m_curve = *startinnercurves[0];
- revsurf->m_axis = *revaxis;
- revsurf->m_angle = ON_Interval(2*ON_PI - angle, 2*ON_PI);
- (void)(*b)->NewFace(*revsurf);
-
+ if (startinnercurves->Count() > 0) {
+ revsurf = ON_RevSurface::New();
+ revsurf->m_curve = *startinnercurves[0];
+ revsurf->m_axis = *revaxis;
+ revsurf->m_angle = ON_Interval(2*ON_PI - angle, 2*ON_PI);
+ (void)(*b)->NewFace(*revsurf);
+ }
}
@@ -146,6 +147,7 @@
pip = (struct rt_pipe_internal *)ip->idb_ptr;
RT_PIPE_CK_MAGIC(pip);
+ // delete duplicated points
curp = BU_LIST_FIRST(wdb_pipept, &pip->pipe_segs_head);
while (!(BU_LIST_NEXT_IS_HEAD(&curp->l, &pip->pipe_segs_head))) {
vect_t delta;
@@ -160,6 +162,7 @@
}
}
+ // make the first plane surface
if (BU_LIST_IS_EMPTY(&pip->pipe_segs_head)) return;
prevp = BU_LIST_FIRST(wdb_pipept, &pip->pipe_segs_head);
curp = BU_LIST_NEXT(wdb_pipept, &prevp->l);
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits