mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-05-26 02:00:47 +05:00
Debug of Thru sections
This commit is contained in:
parent
3899e108db
commit
fae04bb13f
@ -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());
|
||||
|
@ -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);
|
||||
|
@ -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 \
|
||||
|
Loading…
x
Reference in New Issue
Block a user