-// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
Standard_Real aHeight = aCI.GetH(); // Height of the extrusion
Standard_Real anAngle = aCI.GetDraftAngle(); // Draft angle
Standard_Boolean isProtrusion = (aCI.GetFuseFlag()==1);
+ Standard_Boolean isInvert = aCI.GetInvertFlag();
// Flag to know wether the feature is a protrusion (fuse) or a depression (cut)
// history of the Base wire (RefBase)
if(!aSuppObj.IsNull()) // If the wire has a support
aSupport = aSuppObj->GetValue();
- aShape = MakeDraftPrism(anInitShape, aSketch, aHeight, anAngle, isProtrusion, aSupport);
+ aShape = MakeDraftPrism(anInitShape, aSketch, aHeight, anAngle, isProtrusion, aSupport, isInvert);
}
if (aShape.IsNull()) return 0;
aLocs->Append(aShapeCDG_1);
aLocs->Append(aShapeCDG_2);
- aShape = GEOMImpl_PipeDriver::CreatePipeWithDifferentSections(aWirePath, aBases, aLocs, false, false);
+ aShape = GEOMImpl_PipeDriver::CreatePipeWithDifferentSections
+ (aWirePath, aBases, aLocs, false, false, false);
// 7. Make a solid, if possible
if (theShapeBase.ShapeType() == TopAbs_FACE) {
const Standard_Real theHeight,
const Standard_Real theAngle,
bool isProtrusion,
- const TopoDS_Shape& theSupport)
+ const TopoDS_Shape& theSupport,
+ bool isInvert)
{
TopoDS_Shape aShape;
}
// Invert height and angle if the operation is an extruded cut
- bool invert = !isProtrusion;
+ bool invert = isInvert? isProtrusion : !isProtrusion;
// If the face has a reversed orientation invert for extruded boss operations
if(aFaceBase.Orientation() == TopAbs_REVERSED)
- invert = isProtrusion;
+ invert = !invert;
Standard_Real anAngle = theAngle;
Standard_Real aHeight = theHeight;