本文整理汇总了C++中TopTools_ListOfShape类的典型用法代码示例。如果您正苦于以下问题:C++ TopTools_ListOfShape类的具体用法?C++ TopTools_ListOfShape怎么用?C++ TopTools_ListOfShape使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了TopTools_ListOfShape类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: getBaseShape
App::DocumentObjectExecReturn *Thickness::execute(void)
{
// Base shape
Part::TopoShape TopShape;
try {
TopShape = getBaseShape();
} catch (Base::Exception& e) {
return new App::DocumentObjectExecReturn(e.what());
}
TopTools_ListOfShape closingFaces;
const std::vector<std::string>& subStrings = Base.getSubValues();
for (std::vector<std::string>::const_iterator it = subStrings.begin(); it != subStrings.end(); ++it) {
TopoDS_Face face = TopoDS::Face(TopShape.getSubShape(it->c_str()));
closingFaces.Append(face);
}
bool reversed = Reversed.getValue();
double thickness = (reversed ? -1. : 1. )*Value.getValue();
double tol = Precision::Confusion();
short mode = (short)Mode.getValue();
short join = (short)Join.getValue();
//we do not offer tangent join type
if(join == 1)
join = 2;
if (fabs(thickness) > 2*tol)
this->Shape.setValue(getSolid(TopShape.makeThickSolid(closingFaces, thickness, tol, false, false, mode, join)));
else
this->Shape.setValue(getSolid(TopShape.getShape()));
return App::DocumentObject::StdReturn;
}
开发者ID:AjinkyaDahale,项目名称:FreeCAD,代码行数:32,代码来源:FeatureThickness.cpp
示例2: makePipeShell
PyObject* TopoShapeWirePy::makePipeShell(PyObject *args)
{
PyObject *obj;
int make_solid = 0;
int is_Frenet = 0;
if (PyArg_ParseTuple(args, "O!|ii", &(PyList_Type), &obj, &make_solid, &is_Frenet)) {
try {
TopTools_ListOfShape sections;
Py::List list(obj);
for (Py::List::iterator it = list.begin(); it != list.end(); ++it) {
if (PyObject_TypeCheck((*it).ptr(), &(Part::TopoShapePy::Type))) {
const TopoDS_Shape& shape = static_cast<TopoShapePy*>((*it).ptr())->getTopoShapePtr()->_Shape;
sections.Append(shape);
}
}
TopoDS_Shape shape = this->getTopoShapePtr()->makePipeShell(sections, make_solid, is_Frenet);
return new TopoShapePy(new TopoShape(shape));
}
catch (Standard_Failure) {
Handle_Standard_Failure e = Standard_Failure::Caught();
PyErr_SetString(PyExc_Exception, e->GetMessageString());
return NULL;
}
}
return 0;
}
开发者ID:lainegates,项目名称:FreeCAD,代码行数:28,代码来源:TopoShapeWirePyImp.cpp
示例3: EdgePassKey
//=======================================================================
//function : EdgePassKey
//purpose :
//=======================================================================
void GEOMAlgo_GlueDetector::EdgePassKey(const TopoDS_Edge& aE,
GEOMAlgo_PassKeyShape& aPK)
{
TopAbs_Orientation aOr;
TopoDS_Shape aVR;
TopoDS_Iterator aIt;
TopTools_ListOfShape aLV;
//
aIt.Initialize(aE);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aV=aIt.Value();
aOr=aV.Orientation();
if (aOr==TopAbs_FORWARD || aOr==TopAbs_REVERSED) {
if (myOrigins.IsBound(aV)) {
aVR=myOrigins.Find(aV);
}
else {
aVR=aV;
}
aLV.Append(aVR);
}
}
//
aPK.SetShapes(aLV);
}
开发者ID:dbarbier,项目名称:pythonocc,代码行数:29,代码来源:GEOMAlgo_GlueDetector.cpp
示例4: FacePassKey
//=======================================================================
//function : FacePassKey
//purpose :
//=======================================================================
void GEOMAlgo_GlueDetector::FacePassKey(const TopoDS_Face& aF,
GEOMAlgo_PassKeyShape& aPK)
{
Standard_Integer i, aNbE;
TopoDS_Shape aER;
TopTools_ListOfShape aLE;
TopTools_IndexedMapOfShape aME;
//
TopExp::MapShapes(aF, TopAbs_EDGE, aME);
//
aNbE=aME.Extent();
for (i=1; i<=aNbE; ++i) {
const TopoDS_Shape& aE=aME(i);
//
const TopoDS_Edge& aEE=*((TopoDS_Edge*)&aE);
if (BRep_Tool::Degenerated(aEE)) {
continue;
}
//
if (myOrigins.IsBound(aE)) {
aER=myOrigins.Find(aE);
}
else {
aER=aE;
}
aLE.Append(aER);
}
aPK.SetShapes(aLE);
}
开发者ID:dbarbier,项目名称:pythonocc,代码行数:33,代码来源:GEOMAlgo_GlueDetector.cpp
示例5: makePipeShell
PyObject* TopoShapeWirePy::makePipeShell(PyObject *args)
{
PyObject *obj;
PyObject *make_solid = Py_False;
PyObject *is_Frenet = Py_False;
int transition = 0;
if (PyArg_ParseTuple(args, "O|O!O!i", &obj,
&PyBool_Type, &make_solid,
&PyBool_Type, &is_Frenet,
&transition)) {
try {
TopTools_ListOfShape sections;
Py::Sequence list(obj);
for (Py::Sequence::iterator it = list.begin(); it != list.end(); ++it) {
if (PyObject_TypeCheck((*it).ptr(), &(Part::TopoShapePy::Type))) {
const TopoDS_Shape& shape = static_cast<TopoShapePy*>((*it).ptr())->getTopoShapePtr()->getShape();
sections.Append(shape);
}
}
TopoDS_Shape shape = this->getTopoShapePtr()->makePipeShell(sections,
PyObject_IsTrue(make_solid) ? Standard_True : Standard_False,
PyObject_IsTrue(is_Frenet) ? Standard_True : Standard_False,
transition);
return new TopoShapePy(new TopoShape(shape));
}
catch (Standard_Failure& e) {
PyErr_SetString(PartExceptionOCCError, e.GetMessageString());
return NULL;
}
}
return 0;
}
开发者ID:itain,项目名称:FreeCAD,代码行数:35,代码来源:TopoShapeWirePyImp.cpp
示例6: DocumentObjectExecReturn
App::DocumentObjectExecReturn *Loft::execute(void)
{
if (Sections.getSize() == 0)
return new App::DocumentObjectExecReturn("No sections linked.");
try {
TopTools_ListOfShape profiles;
const std::vector<App::DocumentObject*>& shapes = Sections.getValues();
std::vector<App::DocumentObject*>::const_iterator it;
for (it = shapes.begin(); it != shapes.end(); ++it) {
if (!(*it)->isDerivedFrom(Part::Feature::getClassTypeId()))
return new App::DocumentObjectExecReturn("Linked object is not a shape.");
TopoDS_Shape shape = static_cast<Part::Feature*>(*it)->Shape.getValue();
if (shape.IsNull())
return new App::DocumentObjectExecReturn("Linked shape is invalid.");
// Extract first element of a compound
if (shape.ShapeType() == TopAbs_COMPOUND) {
TopoDS_Iterator it(shape);
for (; it.More(); it.Next()) {
if (!it.Value().IsNull()) {
shape = it.Value();
break;
}
}
}
if (shape.ShapeType() == TopAbs_FACE) {
TopoDS_Wire faceouterWire = ShapeAnalysis::OuterWire(TopoDS::Face(shape));
profiles.Append(faceouterWire);
}
else if (shape.ShapeType() == TopAbs_WIRE) {
BRepBuilderAPI_MakeWire mkWire(TopoDS::Wire(shape));
profiles.Append(mkWire.Wire());
}
else if (shape.ShapeType() == TopAbs_EDGE) {
BRepBuilderAPI_MakeWire mkWire(TopoDS::Edge(shape));
profiles.Append(mkWire.Wire());
}
else if (shape.ShapeType() == TopAbs_VERTEX) {
profiles.Append(shape);
}
else {
return new App::DocumentObjectExecReturn("Linked shape is not a vertex, edge, wire nor face.");
}
}
Standard_Boolean isSolid = Solid.getValue() ? Standard_True : Standard_False;
Standard_Boolean isRuled = Ruled.getValue() ? Standard_True : Standard_False;
Standard_Boolean isClosed = Closed.getValue() ? Standard_True : Standard_False;
TopoShape myShape;
this->Shape.setValue(myShape.makeLoft(profiles, isSolid, isRuled,isClosed));
return App::DocumentObject::StdReturn;
}
catch (Standard_Failure) {
Handle_Standard_Failure e = Standard_Failure::Caught();
return new App::DocumentObjectExecReturn(e->GetMessageString());
}
}
开发者ID:PrLayton,项目名称:SeriousFractal,代码行数:59,代码来源:PartFeatures.cpp
示例7:
//=======================================================================
//function : FillContainers
//purpose :
//=======================================================================
void GEOMAlgo_Gluer2::FillContainers(const TopAbs_ShapeEnum aType)
{
Standard_Boolean bHasImage, bToReverse;
Standard_Integer i, aNbW;
TopoDS_Shape aWnew, aEnew;
TopoDS_Iterator aItS;
BRep_Builder aBB;
TopTools_IndexedMapOfShape aMW;
TopTools_MapOfShape aMFence;
//
myErrorStatus=0;
myWarningStatus=0;
//
TopExp::MapShapes(myArgument, aType, aMW);
//
aNbW=aMW.Extent();
for (i=1; i<=aNbW; ++i) {
const TopoDS_Shape& aW=aMW(i);
//
if (!aMFence.Add(aW)) {
continue;
}
//
bHasImage=HasImage(aW);
if (!bHasImage) {
continue;
}
//
GEOMAlgo_Tools3D::MakeContainer(aType, aWnew);
aWnew.Orientation(aW.Orientation());
//
aItS.Initialize(aW);
for (; aItS.More(); aItS.Next()) {
const TopoDS_Shape& aE=aItS.Value();
if (myOrigins.IsBound(aE)) {
aEnew=myOrigins.Find(aE);
//
bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aEnew, aE, myContext);
if (bToReverse) {
aEnew.Reverse();
}
//
aBB.Add(aWnew, aEnew);
}
else {
aBB.Add(aWnew, aE);
}
}
//
//myImages / myOrigins
TopTools_ListOfShape aLSD;
//
aLSD.Append(aW);
myImages.Bind(aWnew, aLSD);
myOrigins.Bind(aW, aWnew);
//
}//for (i=1; i<=aNbE; ++i) {
}
开发者ID:triggerfish1,项目名称:pythonocc,代码行数:62,代码来源:GEOMAlgo_Gluer2.cpp
示例8: baseShape
App::DocumentObjectExecReturn *Chamfer::execute(void)
{
App::DocumentObject* link = Base.getValue();
if (!link)
return new App::DocumentObjectExecReturn("No object linked");
if (!link->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId()))
return new App::DocumentObjectExecReturn("Linked object is not a Part object");
Part::Feature *base = static_cast<Part::Feature*>(Base.getValue());
const Part::TopoShape& TopShape = base->Shape.getShape();
if (TopShape._Shape.IsNull())
return new App::DocumentObjectExecReturn("Cannot chamfer invalid shape");
const std::vector<std::string>& SubVals = Base.getSubValuesStartsWith("Edge");
if (SubVals.size() == 0)
return new App::DocumentObjectExecReturn("No edges specified");
double size = Size.getValue();
this->positionByBase();
// create an untransformed copy of the base shape
Part::TopoShape baseShape(TopShape);
baseShape.setTransform(Base::Matrix4D());
try {
BRepFilletAPI_MakeChamfer mkChamfer(baseShape._Shape);
TopTools_IndexedMapOfShape mapOfEdges;
TopTools_IndexedDataMapOfShapeListOfShape mapEdgeFace;
TopExp::MapShapesAndAncestors(baseShape._Shape, TopAbs_EDGE, TopAbs_FACE, mapEdgeFace);
TopExp::MapShapes(baseShape._Shape, TopAbs_EDGE, mapOfEdges);
for (std::vector<std::string>::const_iterator it=SubVals.begin(); it != SubVals.end(); ++it) {
TopoDS_Edge edge = TopoDS::Edge(baseShape.getSubShape(it->c_str()));
const TopoDS_Face& face = TopoDS::Face(mapEdgeFace.FindFromKey(edge).First());
mkChamfer.Add(size, edge, face);
}
mkChamfer.Build();
if (!mkChamfer.IsDone())
return new App::DocumentObjectExecReturn("Failed to create chamfer");
TopoDS_Shape shape = mkChamfer.Shape();
if (shape.IsNull())
return new App::DocumentObjectExecReturn("Resulting shape is null");
TopTools_ListOfShape aLarg;
aLarg.Append(baseShape._Shape);
if (!BRepAlgo::IsValid(aLarg, shape, Standard_False, Standard_False)) {
return new App::DocumentObjectExecReturn("Resulting shape is invalid");
}
this->Shape.setValue(shape);
return App::DocumentObject::StdReturn;
}
catch (Standard_Failure) {
Handle_Standard_Failure e = Standard_Failure::Caught();
return new App::DocumentObjectExecReturn(e->GetMessageString());
}
}
开发者ID:Claude59,项目名称:FreeCAD,代码行数:58,代码来源:FeatureChamfer.cpp
示例9: SetShapes
//=======================================================================
//function :SetShapes
//purpose :
//=======================================================================
void NMTDS_PassKeyShape::SetShapes(const TopoDS_Shape& aS1,
const TopoDS_Shape& aS2)
{
TopTools_ListOfShape aLS;
//
aLS.Append(aS1);
aLS.Append(aS2);
SetShapes(aLS);
}
开发者ID:triggerfish1,项目名称:pythonocc,代码行数:13,代码来源:NMTDS_PassKeyShape.cpp
示例10: MakeBRepShapes
//=======================================================================
//function : FillBRepShapes
//purpose :
//=======================================================================
void GEOMAlgo_Gluer2::FillBRepShapes(const TopAbs_ShapeEnum theType)
{
Standard_Boolean bHasImage, bIsToWork;
Standard_Integer i, aNbE;
TopoDS_Iterator aItS;
TopoDS_Shape aEnew;
TopTools_IndexedMapOfShape aME;
TopTools_MapOfShape aMFence;
TopTools_ListIteratorOfListOfShape aItLS;
//
myErrorStatus=0;
myWarningStatus=0;
//
TopExp::MapShapes(myArgument, theType, aME);
//
aNbE=aME.Extent();
for (i=1; i<=aNbE; ++i) {
const TopoDS_Shape& aE=aME(i);
//
if (!aMFence.Add(aE)) {
continue;
}
//
bIsToWork=myOriginsToWork.IsBound(aE);
bHasImage=HasImage(aE);
if (!bHasImage && !bIsToWork) {
continue;
}
//
MakeBRepShapes(aE, aEnew);
//
//myImages / myOrigins
if (bIsToWork) {
const TopoDS_Shape& aSkey=myOriginsToWork.Find(aE);
const TopTools_ListOfShape& aLSD=myImagesToWork.Find(aSkey);
//
myImages.Bind(aEnew, aLSD);
//
aItLS.Initialize(aLSD);
for (; aItLS.More(); aItLS.Next()) {
const TopoDS_Shape& aEx=aItLS.Value();
myOrigins.Bind(aEx, aEnew);
//
aMFence.Add(aEx);
}
}
else {
TopTools_ListOfShape aLSD;
//
aLSD.Append(aE);
myImages.Bind(aEnew, aLSD);
myOrigins.Bind(aE, aEnew);
}
}//for (i=1; i<=aNbF; ++i) {
}
开发者ID:triggerfish1,项目名称:pythonocc,代码行数:59,代码来源:GEOMAlgo_Gluer2.cpp
示例11: SetShapes
//=======================================================================
//function :SetShapes
//purpose :
//=======================================================================
void GEOMAlgo_PassKeyShape::SetShapes(const TopoDS_Shape& aS1,
const TopoDS_Shape& aS2,
const TopoDS_Shape& aS3)
{
TopTools_ListOfShape aLS;
//
aLS.Append(aS1);
aLS.Append(aS2);
aLS.Append(aS3);
SetShapes(aLS);
}
开发者ID:dbarbier,项目名称:pythonocc,代码行数:15,代码来源:GEOMAlgo_PassKeyShape.cpp
示例12:
FaceAdjacencySplitter::FaceAdjacencySplitter(const TopoDS_Shell &shell)
{
TopExp_Explorer shellIt;
for (shellIt.Init(shell, TopAbs_FACE); shellIt.More(); shellIt.Next())
{
TopTools_ListOfShape shapeList;
TopExp_Explorer it;
for (it.Init(shellIt.Current(), TopAbs_EDGE); it.More(); it.Next())
shapeList.Append(it.Current());
faceToEdgeMap.Add(shellIt.Current(), shapeList);
}
TopExp::MapShapesAndAncestors(shell, TopAbs_EDGE, TopAbs_FACE, edgeToFaceMap);
}
开发者ID:JonasThomas,项目名称:free-cad,代码行数:13,代码来源:modelRefine.cpp
示例13: IsExistingPaveBlock
//=======================================================================
// function: IsExistingPaveBlock
// purpose:
//=======================================================================
Standard_Boolean NMTTools_PaveFiller::IsExistingPaveBlock(const BOPTools_PaveBlock& aPBNew,
const TopTools_ListOfShape& aLSE,
const Standard_Real aTolR3D)
{
Standard_Boolean bFlag;
Standard_Integer aNbSE, iC;
Standard_Real aTolE, aTol;
TopTools_ListIteratorOfListOfShape anIt;
//
bFlag=Standard_False;
//
aNbSE=aLSE.Extent();
if (!aNbSE) {
return bFlag;
}
//
anIt.Initialize(aLSE);
for (; anIt.More(); anIt.Next()) {
const TopoDS_Edge& aE=TopoDS::Edge(anIt.Value());
aTolE=BRep_Tool::Tolerance(aE);
aTol=aTolR3D;
if (aTolE>aTol) {
aTol=aTolE;
}
iC=CheckIntermediatePoint(aPBNew, aE, aTol);
if (!iC) {
return !bFlag;
}
}
return bFlag;
}
开发者ID:triggerfish1,项目名称:pythonocc,代码行数:35,代码来源:NMTTools_PaveFiller_6.cpp
示例14: center
int OCC_Connect::SaveBRep(char const *name)
{
gp_Pnt center(0,0,0);
gce_MakeScale transform(center, 0.001);
BRepBuilderAPI_Transform scale(assembly.front(), transform.Value());
BRep_Builder BB;
TopoDS_Compound compound;
BB.MakeCompound(compound);
TopTools_ListOfShape p;
for(p=scale.Modified(assembly.front());
!p.IsEmpty();
p.RemoveFirst()
)
BB.Add(compound,p.First());
BRepTools::Write(compound, (char*)name);
return 1;
}
开发者ID:cycheung,项目名称:gmsh,代码行数:17,代码来源:OCC_Connect.cpp
示例15: assert
//----------------------------------------------------------------
// Function: to update the core Surface
// for any movement or Boolean operation of the body.
// Author: Jane Hu
//----------------------------------------------------------------
CubitStatus OCCSurface::update_OCC_entity( BRepBuilderAPI_Transform *aBRepTrsf,
BRepAlgoAPI_BooleanOperation *op)
{
assert(aBRepTrsf != NULL || op != NULL);
TopoDS_Shape shape;
if (aBRepTrsf)
shape = aBRepTrsf->ModifiedShape(*get_TopoDS_Face());
else
{
TopTools_ListOfShape shapes;
shapes.Assign(op->Modified(*get_TopoDS_Face()));
if(shapes.Extent() == 0)
shapes.Assign(op->Generated(*get_TopoDS_Face()));
if (shapes.Extent() == 1)
shape = shapes.First();
else if(shapes.Extent() > 1)
{
//update all attributes first.
TopTools_ListIteratorOfListOfShape it;
it.Initialize(shapes);
for(; it.More(); it.Next())
{
shape = it.Value();
OCCQueryEngine::instance()->copy_attributes(*get_TopoDS_Face(), shape);
}
shape = shapes.First();
}
else if(op->IsDeleted(*get_TopoDS_Face()))
;
else
return CUBIT_SUCCESS;
}
TopoDS_Face surface;
if(!shape.IsNull())
surface = TopoDS::Face(shape);
if (aBRepTrsf)
{
//set the loops
DLIList<OCCLoop *> loops;
this->get_loops(loops);
for (int i = 1; i <= loops.size(); i++)
{
OCCLoop *loop = loops.get_and_step();
loop->update_OCC_entity(aBRepTrsf, op);
}
OCCQueryEngine::instance()->update_OCC_map(*myTopoDSFace, surface);
}
else if(op)
update_OCC_entity(*myTopoDSFace, surface, op);
return CUBIT_SUCCESS;
}
开发者ID:tenpercent,项目名称:cp-sandbox,代码行数:61,代码来源:OCCSurface.cpp
示例16: Subtract
//=======================================================================
//function : Subtract
//purpose :
//=======================================================================
void GEOMAlgo_ShapeSet::Subtract(const GEOMAlgo_ShapeSet& theOther)
{
TopTools_ListIteratorOfListOfShape aIt;
TopTools_ListOfShape aLS;
//
myMap.Clear();
aIt.Initialize(myList);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aS=aIt.Value();
if (!theOther.myMap.Contains(aS)) {
if(myMap.Add(aS)){
aLS.Append(aS);
}
}
}
//
myList=aLS;
}
开发者ID:dbarbier,项目名称:pythonocc,代码行数:22,代码来源:GEOMAlgo_ShapeSet.cpp
示例17: FillCompound
//=======================================================================
//function : FillCompound
//purpose :
//=======================================================================
void GEOMAlgo_Gluer2::FillCompound(const TopoDS_Shape& aC)
{
Standard_Boolean bHasImage;
TopAbs_ShapeEnum aType;
TopoDS_Shape aCnew, aCXnew;
TopoDS_Iterator aItC;
BRep_Builder aBB;
//
bHasImage=HasImage(aC);
if (!bHasImage) {
return;
}
//
GEOMAlgo_Tools3D::MakeContainer(TopAbs_COMPOUND, aCnew);
//
aItC.Initialize(aC);
for (; aItC.More(); aItC.Next()) {
const TopoDS_Shape& aCX=aItC.Value();
aType=aCX.ShapeType();
//
if (aType==TopAbs_COMPOUND) {
FillCompound(aCX);
}
//
if (myOrigins.IsBound(aCX)) {
aCXnew=myOrigins.Find(aCX);
aCXnew.Orientation(aCX.Orientation());
aBB.Add(aCnew, aCXnew);
}
else {
aBB.Add(aCnew, aCX);
}
}
//
//myImages / myOrigins
TopTools_ListOfShape aLSD;
//
aLSD.Append(aC);
myImages.Bind(aCnew, aLSD);
myOrigins.Bind(aC, aCnew);
}
开发者ID:triggerfish1,项目名称:pythonocc,代码行数:45,代码来源:GEOMAlgo_Gluer2.cpp
示例18: FindFacePairs
//=======================================================================
//function : IsInternalFace
//purpose :
//=======================================================================
Standard_Boolean GEOMAlgo_Tools3D::IsInternalFace(const TopoDS_Face& theFace,
const TopoDS_Edge& theEdge,
const TopTools_ListOfShape& theLF,
IntTools_Context& theContext)
{
Standard_Boolean bRet;
Standard_Boolean aNbF;
//
bRet=Standard_False;
//
aNbF=theLF.Extent();
if (aNbF==2) {
const TopoDS_Face& aF1=TopoDS::Face(theLF.First());
const TopoDS_Face& aF2=TopoDS::Face(theLF.Last());
bRet=GEOMAlgo_Tools3D::IsInternalFace(theFace, theEdge, aF1, aF2, theContext);
return bRet;
}
//
else {
NMTTools_ListOfCoupleOfShape aLCFF;
NMTTools_ListIteratorOfListOfCoupleOfShape aIt;
//
FindFacePairs(theEdge, theLF, aLCFF);
//
aIt.Initialize(aLCFF);
for (; aIt.More(); aIt.Next()) {
const NMTTools_CoupleOfShape& aCSFF=aIt.Value();
//
const TopoDS_Face& aF1=TopoDS::Face(aCSFF.Shape1());
const TopoDS_Face& aF2=TopoDS::Face(aCSFF.Shape2());
bRet=GEOMAlgo_Tools3D::IsInternalFace(theFace, theEdge, aF1, aF2, theContext);
if (bRet) {
return bRet;
}
}
}
return bRet;
}
开发者ID:dbarbier,项目名称:pythonocc,代码行数:42,代码来源:GEOMAlgo_Tools3D.cpp
示例19: PurgeNewEdges
//=======================================================================
//function : PurgeNewEdges
//purpose :
//=======================================================================
static void PurgeNewEdges(TopTools_ListOfShape& ConstEdges,
const TopTools_MapOfOrientedShape& UsedEdges)
{
TopTools_ListIteratorOfListOfShape it(ConstEdges);
while ( it.More()) {
const TopoDS_Shape& NE = it.Value();
if (!UsedEdges.Contains(NE)) {
ConstEdges.Remove(it);
}
else {
it.Next();
}
}
}
开发者ID:hmeyer,项目名称:salome-geom,代码行数:18,代码来源:Partition_Loop.cpp
示例20: AddSimpleShapes
//=======================================================================
//function : AddSimpleShapes
//purpose :
//=======================================================================
void GEOMUtils::AddSimpleShapes (const TopoDS_Shape& theShape, TopTools_ListOfShape& theList)
{
if (theShape.ShapeType() != TopAbs_COMPOUND &&
theShape.ShapeType() != TopAbs_COMPSOLID) {
theList.Append(theShape);
return;
}
TopTools_MapOfShape mapShape;
TopoDS_Iterator It (theShape, Standard_True, Standard_True);
for (; It.More(); It.Next()) {
TopoDS_Shape aShape_i = It.Value();
if (mapShape.Add(aShape_i)) {
if (aShape_i.ShapeType() == TopAbs_COMPOUND ||
aShape_i.ShapeType() == TopAbs_COMPSOLID) {
AddSimpleShapes(aShape_i, theList);
} else {
theList.Append(aShape_i);
}
}
}
}
开发者ID:AjinkyaDahale,项目名称:FreeCAD,代码行数:27,代码来源:GEOMUtils.cpp
注:本文中的TopTools_ListOfShape类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论