本文整理汇总了C++中BRep_Builder::Degenerated方法的典型用法代码示例。如果您正苦于以下问题:C++ BRep_Builder::Degenerated方法的具体用法?C++ BRep_Builder::Degenerated怎么用?C++ BRep_Builder::Degenerated使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BRep_Builder
的用法示例。
在下文中一共展示了BRep_Builder::Degenerated方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: replaceEndingPointsInternals
// sometimes, we ask to replace the ending points of the curve
// in gluing operations for example
void OCCEdge::replaceEndingPointsInternals(GVertex *g0, GVertex *g1)
{
TopoDS_Vertex aV1 = *((TopoDS_Vertex*)v0->getNativePtr());
TopoDS_Vertex aV2 = *((TopoDS_Vertex*)v1->getNativePtr());
TopoDS_Vertex aVR1 = *((TopoDS_Vertex*)g0->getNativePtr());
TopoDS_Vertex aVR2 = *((TopoDS_Vertex*)g1->getNativePtr());
// printf("%p %p --- %p %p replacing %d %d by %d %d in occedge %d\n",
// v0,v1,g0,g1,v0->tag(),v1->tag(),g0->tag(),g1->tag(),tag());
Standard_Boolean bIsDE = BRep_Tool::Degenerated(c);
TopoDS_Edge aEx = c;
aEx.Orientation(TopAbs_FORWARD);
Standard_Real t1=s0;
Standard_Real t2=s1;
aVR1.Orientation(TopAbs_FORWARD);
aVR2.Orientation(TopAbs_REVERSED);
if (bIsDE) {
Standard_Real aTol;
BRep_Builder aBB;
TopoDS_Edge E;
//TopAbs_Orientation anOrE;
//anOrE = c.Orientation();
aTol = BRep_Tool::Tolerance(c);
E = aEx;
E.EmptyCopy();
aBB.Add(E, aVR1);
aBB.Add(E, aVR2);
aBB.Range(E, t1, t2);
aBB.Degenerated(E, Standard_True);
aBB.UpdateEdge(E, aTol);
_replacement=E;
}
else {
#if (OCC_VERSION_MAJOR == 6) && (OCC_VERSION_MINOR < 6)
BOPTools_Tools::MakeSplitEdge(aEx, aVR1, t1, aVR2, t2, _replacement);
#else
BOPTools_AlgoTools::MakeSplitEdge(aEx, aVR1, t1, aVR2, t2, _replacement);
#endif
}
TopoDS_Edge temp = c;
c = _replacement;
_replacement = temp;
curve = BRep_Tool::Curve(c, s0, s1);
//build the reverse curve
c_rev = c;
c_rev.Reverse();
}