}
}
- }
- else if (aType == SOLID_SHELL) {
- anExpectedType = TopAbs_SOLID;
-
- Handle(GEOM_Function) aRefShell = aCI.GetBase();
- TopoDS_Shape aShapeShell = aRefShell->GetValue();
- if (!aShapeShell.IsNull() && aShapeShell.ShapeType() == TopAbs_COMPOUND) {
- TopoDS_Iterator It (aShapeShell, Standard_True, Standard_True);
- if (It.More()) aShapeShell = It.Value();
- }
- if (aShapeShell.IsNull() || aShapeShell.ShapeType() != TopAbs_SHELL) {
- Standard_NullObject::Raise("Shape for solid construction is null or not a shell");
- }
-
- BRepCheck_Shell chkShell(TopoDS::Shell(aShapeShell));
- if (chkShell.Closed() == BRepCheck_NotClosed) return 0;
-
- TopoDS_Solid Sol;
- B.MakeSolid(Sol);
- B.Add(Sol, aShapeShell);
- BRepClass3d_SolidClassifier SC (Sol);
- SC.PerformInfinitePoint(Precision::Confusion());
- if (SC.State() == TopAbs_IN) {
- B.MakeSolid(Sol);
- B.Add(Sol, aShapeShell.Reversed());
- }
-
- aShape = Sol;
-
}
else if (aType == SOLID_SHELLS) {
anExpectedType = TopAbs_SOLID;
aShape = C;
}
- /*
- else if (aType == REVERSE_ORIENTATION) {
- Handle(GEOM_Function) aRefShape = aCI.GetBase();
- TopoDS_Shape aShape_i = aRefShape->GetValue();
- if (aShape_i.IsNull()) {
- Standard_NullObject::Raise("Shape for reverse is null");
- }
-
- BRepBuilderAPI_Copy Copy(aShape_i);
- if( Copy.IsDone() ) {
- TopoDS_Shape tds = Copy.Shape();
- if( tds.IsNull() ) {
- Standard_ConstructionError::Raise("Orientation aborted : Can not reverse the shape");
- }
-
- if( tds.Orientation() == TopAbs_FORWARD)
- tds.Orientation(TopAbs_REVERSED);
- else
- tds.Orientation(TopAbs_FORWARD);
-
- aShape = tds;
- }
- }
- */
else if (aType == EDGE_WIRE) {
anExpectedType = TopAbs_EDGE;
if (aME.IsDone())
aShape = aME.Shape();
} else if (aType == SHAPE_ISOLINE) {
- anExpectedType = TopAbs_EDGE;
-
GEOMImpl_IIsoline aII (aFunction);
Handle(GEOM_Function) aRefFace = aII.GetFace();
TopoDS_Shape aShapeFace = aRefFace->GetValue();
const TopAbs_ShapeEnum aShType = aShape.ShapeType();
if (anExpectedType != TopAbs_SHAPE && anExpectedType != aShType) {
- if (aShType == TopAbs_COMPOUND) {
- // The result is compound. Check its sub-shapes.
- TopoDS_Iterator anIter(aShape);
-
- if (!anIter.More()) {
- // The result is an empty compound.
- Standard_ConstructionError::Raise("Result type check failed");
- }
-
- for (; anIter.More(); anIter.Next()) {
- const TopAbs_ShapeEnum aSubType = anIter.Value().ShapeType();
-
- if (anExpectedType != aSubType) {
- // There is an incompatible type.
- Standard_ConstructionError::Raise("Result type check failed");
- }
- }
- } else {
- // There is an incompatible type.
- Standard_ConstructionError::Raise("Result type check failed");
- }
+ Standard_ConstructionError::Raise("Result type check failed");
}
aFunction->SetValue(aShape);
const double theParameter) const
{
TopoDS_Shape aResult;
- GEOMUtils_Hatcher aHatcher(theFace);
+ GEOMUtils::Hatcher aHatcher(theFace);
const GeomAbs_IsoType aType = (IsUIso ? GeomAbs_IsoU : GeomAbs_IsoV);
aHatcher.Init(aType, theParameter);
theOperationName = "SHELL";
AddParam( theParams, "Objects", aCI.GetShapes() );
break;
- case SOLID_SHELL:
case SOLID_SHELLS:
theOperationName = "SOLID";
AddParam( theParams, "Objects", aCI.GetShapes() );