Debug of Thru sections

This commit is contained in:
gka 2006-05-11 11:06:30 +00:00
parent 3899e108db
commit fae04bb13f
3 changed files with 22 additions and 8 deletions

View File

@ -48,6 +48,7 @@
#include <GEOMImpl_CylinderDriver.hxx>
#include <GEOMImpl_PrismDriver.hxx>
#include <GEOMImpl_PipeDriver.hxx>
#include <GEOMImpl_ThruSectionsDriver.hxx>
#include <GEOMImpl_RevolutionDriver.hxx>
#include <GEOMImpl_ShapeDriver.hxx>
#include <GEOMImpl_BlockDriver.hxx>
@ -104,6 +105,7 @@ GEOMImpl_Gen::GEOMImpl_Gen()
TFunction_DriverTable::Get()->AddDriver(GEOMImpl_CylinderDriver::GetID(), new GEOMImpl_CylinderDriver());
TFunction_DriverTable::Get()->AddDriver(GEOMImpl_PrismDriver::GetID(), new GEOMImpl_PrismDriver());
TFunction_DriverTable::Get()->AddDriver(GEOMImpl_PipeDriver::GetID(), new GEOMImpl_PipeDriver());
TFunction_DriverTable::Get()->AddDriver(GEOMImpl_ThruSectionsDriver::GetID(), new GEOMImpl_ThruSectionsDriver());
TFunction_DriverTable::Get()->AddDriver(GEOMImpl_RevolutionDriver::GetID(), new GEOMImpl_RevolutionDriver());
TFunction_DriverTable::Get()->AddDriver(GEOMImpl_SphereDriver::GetID(), new GEOMImpl_SphereDriver());
TFunction_DriverTable::Get()->AddDriver(GEOMImpl_TorusDriver::GetID(), new GEOMImpl_TorusDriver());

View File

@ -30,6 +30,8 @@
#include <BRepCheck_Analyzer.hxx>
#include <BRepOffsetAPI_ThruSections.hxx>
#include <BRepBuilderAPI_MakeWire.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS.hxx>
#include <TopAbs.hxx>
#include <TopoDS.hxx>
@ -99,18 +101,27 @@ Standard_Integer GEOMImpl_ThruSectionsDriver::Execute(TFunction_Logbook& log) co
continue;
TopoDS_Shape aShapeSection = aSection->GetValue();
if(aShapeSection == TopAbs_WIRE)
TopAbs_ShapeEnum aTypeSect = aShapeSection.ShapeType();
if(aTypeSect == TopAbs_WIRE)
{
TopoDS_Wire aWire = TopoDS::Wire(aShapeSection);
aBuilder.AddWire(aSectWire);
BRepBuilderAPI_MakeWire aTool;
TopExp_Explorer aExp(aShapeSection,TopAbs_EDGE);
for( ; aExp.More() ; aExp.Next())
aTool.Add(TopoDS::Edge(aExp.Current()));
if(aTool.IsDone())
{
TopoDS_Wire aSectWire = aTool.Wire();//TopoDS::Wire(aShapeSection);
aBuilder.AddWire(aSectWire);
}
}
else if(aShapeSection == TopAbs_EDGE) {
TopoDS_Edge anEdge = TopoDS::Edge(aShapePath);
else if(aTypeSect == TopAbs_EDGE) {
TopoDS_Edge anEdge = TopoDS::Edge(aShapeSection);
TopoDS_Wire aWire = BRepBuilderAPI_MakeWire(anEdge);
aBuilder.AddWire(aWire);
}
else if(aShapeSection == TopAbs_VERTEX) {
TopoDS_Vertex aVert = TopoDS::Vertex(aShapePath);
else if(aTypeSect == TopAbs_VERTEX) {
TopoDS_Vertex aVert = TopoDS::Vertex(aShapeSection);
aBuilder.AddVertex(aVert);
}
else
@ -122,7 +133,7 @@ Standard_Integer GEOMImpl_ThruSectionsDriver::Execute(TFunction_Logbook& log) co
//make surface by sections
aBuilder.Build();
TopoDS_Shape aShape = aBuilder.Shape();
if (aShape.IsNull()) return 0;
BRepCheck_Analyzer ana (aShape, Standard_False);

View File

@ -40,6 +40,7 @@ LIB_SRC = GEOMImpl_IBasicOperations.cxx \
GEOMImpl_TorusDriver.cxx \
GEOMImpl_PrismDriver.cxx \
GEOMImpl_PipeDriver.cxx \
GEOMImpl_ThruSectionsDriver.cxx \
GEOMImpl_RevolutionDriver.cxx \
GEOMImpl_ShapeDriver.cxx \
GEOMImpl_BlockDriver.cxx \