Corrected feature property names

aBList -> BoundaryList
filltype -> FillType
This commit is contained in:
balazs-bamer
2015-02-05 14:14:46 +01:00
committed by wmayer
parent d8e48f3a92
commit 2d5119c266
5 changed files with 19 additions and 19 deletions

View File

@@ -89,7 +89,7 @@ App::DocumentObjectExecReturn *BSplineSurf::execute(void)
GeomFill_FillingStyle fstyle = getFillingStyle();
GeomFill_BSplineCurves aSurfBuilder; //Create Surface Builder
int ncrv = aBList.getSize();
int ncrv = BoundaryList.getSize();
if(ncrv==2) {aSurfBuilder.Init(crvs[0], crvs[1], fstyle);}
else if(ncrv==3) {aSurfBuilder.Init(crvs[0], crvs[1], crvs[2], fstyle);}
else if(ncrv==4) {aSurfBuilder.Init(crvs[0], crvs[1], crvs[2], crvs[3], fstyle);}

View File

@@ -46,16 +46,16 @@ PROPERTY_SOURCE(Surface::BSurf, Part::Feature)
BSurf::BSurf(): Feature()
{
ADD_PROPERTY(filltype,(1));
ADD_PROPERTY(aBList,(0,"Dummy"));
ADD_PROPERTY(FillType,(1));
ADD_PROPERTY(BoundaryList,(0,"Dummy"));
}
//Check if any components of the surface have been modified
short BSurf::mustExecute() const
{
if (aBList.isTouched() ||
filltype.isTouched())
if (BoundaryList.isTouched() ||
FillType.isTouched())
{
return 1;
}
@@ -65,7 +65,7 @@ short BSurf::mustExecute() const
GeomFill_FillingStyle BSurf::getFillingStyle()
{
//Identify filling style
int ftype = filltype.getValue();
int ftype = FillType.getValue();
if(ftype==StretchStyle) {return GeomFill_StretchStyle;}
else if(ftype==CoonsStyle) {return GeomFill_CoonsStyle;}
else if(ftype==CurvedStyle) {return GeomFill_CurvedStyle;}
@@ -78,16 +78,16 @@ void BSurf::getWire(TopoDS_Wire& aWire)
Handle(ShapeFix_Wire) aShFW = new ShapeFix_Wire;
Handle(ShapeExtend_WireData) aWD = new ShapeExtend_WireData;
if(aBList.getSize()>4 || aBList.getSize()<2){Standard_Failure::Raise("Only 2-4 curves are allowed");return;}
if(BoundaryList.getSize()>4 || BoundaryList.getSize()<2){Standard_Failure::Raise("Only 2-4 curves are allowed");return;}
for(int i=0; i<aBList.getSize(); i++){
for(int i=0; i<BoundaryList.getSize(); i++){
Part::TopoShape ts; //Curve TopoShape
TopoDS_Shape sub; //Curve TopoDS_Shape
TopoDS_Edge etmp; //Curve TopoDS_Edge
//Get Edge
App::PropertyLinkSubList::SubSet set = aBList[i];
App::PropertyLinkSubList::SubSet set = BoundaryList[i];
if(set.obj->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())) {
@@ -144,9 +144,9 @@ void BSurf::createFace(const Handle_Geom_BoundedSurface &aSurface)
void BSurf::correcteInvalidFillType()
{
int ftype = filltype.getValue();
int ftype = FillType.getValue();
if(ftype == InvalidStyle)
{
filltype.setValue(StretchStyle);
FillType.setValue(StretchStyle);
}
}

View File

@@ -43,8 +43,8 @@ class BSurf : public Part::Feature
public:
BSurf();
App::PropertyLinkSubList aBList; //curves to be turned into a face (2-4 curves allowed).
App::PropertyInteger filltype; //Fill method (1, 2, or 3 for Stretch, Coons, and Curved)
App::PropertyLinkSubList BoundaryList; //curves to be turned into a face (2-4 curves allowed).
App::PropertyInteger FillType; //Fill method (1, 2, or 3 for Stretch, Coons, and Curved)
short mustExecute() const;

View File

@@ -89,7 +89,7 @@ App::DocumentObjectExecReturn *BezSurf::execute(void)
GeomFill_FillingStyle fstyle = getFillingStyle();
GeomFill_BezierCurves aSurfBuilder; //Create Surface Builder
int ncrv = aBList.getSize();
int ncrv = BoundaryList.getSize();
if(ncrv==2) {aSurfBuilder.Init(crvs[0], crvs[1], fstyle);}
else if(ncrv==3) {aSurfBuilder.Init(crvs[0], crvs[1], crvs[2], fstyle);}
else if(ncrv==4) {aSurfBuilder.Init(crvs[0], crvs[1], crvs[2], crvs[3], fstyle);}

View File

@@ -97,7 +97,7 @@ BSurf::~BSurf()
void BSurf::setEditedObject(Surface::BSurf* obj)
{
editedObject = obj;
oldFillType = (filltype_t)(editedObject->filltype.getValue());
oldFillType = (filltype_t)(editedObject->FillType.getValue());
switch(oldFillType)
{
case StretchStyle:
@@ -152,9 +152,9 @@ void BSurf::reject()
else
{
// if the object fill type was changed, reset the old one
if(editedObject->filltype.getValue() != oldFillType)
if(editedObject->FillType.getValue() != oldFillType)
{
editedObject->filltype.setValue(oldFillType);
editedObject->FillType.setValue(oldFillType);
}
Gui::Command::commitCommand();
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.recompute()");
@@ -165,9 +165,9 @@ void BSurf::reject()
void BSurf::apply()
{
// apply the change only if it is a real change
if(editedObject->filltype.getValue() != fillType)
if(editedObject->FillType.getValue() != fillType)
{
editedObject->filltype.setValue(fillType);
editedObject->FillType.setValue(fillType);
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.recompute()");
}
}