#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>
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());
#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>
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
//make surface by sections
aBuilder.Build();
TopoDS_Shape aShape = aBuilder.Shape();
-
+
if (aShape.IsNull()) return 0;
BRepCheck_Analyzer ana (aShape, Standard_False);
GEOMImpl_TorusDriver.cxx \
GEOMImpl_PrismDriver.cxx \
GEOMImpl_PipeDriver.cxx \
+ GEOMImpl_ThruSectionsDriver.cxx \
GEOMImpl_RevolutionDriver.cxx \
GEOMImpl_ShapeDriver.cxx \
GEOMImpl_BlockDriver.cxx \