Make detail crop circle public
This commit is contained in:
@@ -103,6 +103,7 @@ DrawViewDetail::DrawViewDetail()
|
||||
ADD_PROPERTY_TYPE(Reference ,("1"),dgroup,App::Prop_None,"An identifier for this detail");
|
||||
|
||||
getParameters();
|
||||
m_fudge = 1.1;
|
||||
}
|
||||
|
||||
DrawViewDetail::~DrawViewDetail()
|
||||
@@ -165,8 +166,7 @@ App::DocumentObjectExecReturn *DrawViewDetail::execute(void)
|
||||
|
||||
Base::Vector3d anchor = AnchorPoint.getValue(); //this is a 2D point
|
||||
anchor = Base::Vector3d(anchor.x,anchor.y, 0.0);
|
||||
double radiusFudge = 1.1;
|
||||
double radius = Radius.getValue() * radiusFudge;
|
||||
double radius = getFudgeRadius();
|
||||
Base::Vector3d dirDetail = dvp->Direction.getValue();
|
||||
double scale = Scale.getValue();
|
||||
gp_Ax2 viewAxis = getViewAxis(Base::Vector3d(0.0,0.0,0.0), dirDetail, false);
|
||||
@@ -204,11 +204,11 @@ App::DocumentObjectExecReturn *DrawViewDetail::execute(void)
|
||||
|
||||
BRepAlgoAPI_Common mkCommon(myShape,tool);
|
||||
if (!mkCommon.IsDone()) {
|
||||
Base::Console().Message("TRACE - DVD::execute - mkCommon not done\n");
|
||||
Base::Console().Log("DVD::execute - mkCommon not done\n");
|
||||
return new App::DocumentObjectExecReturn("DVD::execute - mkCommon not done");
|
||||
}
|
||||
if (mkCommon.Shape().IsNull()) {
|
||||
Base::Console().Message("TRACE - DVD::execute - mkCommon.Shape is Null\n");
|
||||
Base::Console().Log("DVD::execute - mkCommon.Shape is Null\n");
|
||||
return new App::DocumentObjectExecReturn("DVD::execute - mkCommon.Shape is Null");
|
||||
}
|
||||
|
||||
@@ -216,7 +216,7 @@ App::DocumentObjectExecReturn *DrawViewDetail::execute(void)
|
||||
TopExp_Explorer xp;
|
||||
xp.Init(mkCommon.Shape(),TopAbs_SOLID);
|
||||
if (!(xp.More() == Standard_True)) {
|
||||
Base::Console().Message("TRACE - DVD::execute - mkCommon.Shape is not a solid!\n");
|
||||
Base::Console().Log("DVD::execute - mkCommon.Shape is not a solid!\n");
|
||||
}
|
||||
TopoDS_Shape detail = mkCommon.Shape();
|
||||
Bnd_Box testBox;
|
||||
@@ -267,6 +267,11 @@ App::DocumentObjectExecReturn *DrawViewDetail::execute(void)
|
||||
return App::DocumentObject::StdReturn;
|
||||
}
|
||||
|
||||
double DrawViewDetail::getFudgeRadius()
|
||||
{
|
||||
return Radius.getValue() * m_fudge;
|
||||
}
|
||||
|
||||
void DrawViewDetail::getParameters()
|
||||
{
|
||||
// what parameters are useful?
|
||||
|
||||
@@ -69,12 +69,12 @@ public:
|
||||
}
|
||||
|
||||
public:
|
||||
//int getMattingStyle() const {return m_mattingStyle;}
|
||||
double getFudgeRadius(void);
|
||||
|
||||
protected:
|
||||
Base::Vector3d toR3(const gp_Ax2 fromSystem, const Base::Vector3d fromPoint);
|
||||
void getParameters(void);
|
||||
//int m_mattingStyle;
|
||||
double m_fudge;
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user