[PD] Helix: Offer profile's normal as axis
Previously, only the vertical and horizontal axis of the profile was selectable in the task panel of the additive/subtractive helix. Now the profile's normal axis can be selected, too. This now allows to create helical extrusions or "twisted pockets". The order of the GUI entries was chosen to be in line with the order of axis selection of the multi-transform parameters. The actual feature's implementation needed adaption for this special case as in some places a unit vector (`gp_Dir`) was derived from the cross- product of axis and profile normal -- a null-vector when the axis *is* the normal. This caused the gp_Dir's ctor to throw.
This commit is contained in:
@@ -202,6 +202,7 @@ void TaskHelixParameters::fillAxisCombo(bool forceRefill)
|
||||
PartDesign::ProfileBased* pcFeat = static_cast<PartDesign::ProfileBased*>(vp->getObject());
|
||||
Part::Part2DObject* pcSketch = dynamic_cast<Part::Part2DObject*>(pcFeat->Profile.getValue());
|
||||
if (pcSketch){
|
||||
addAxisToCombo(pcSketch,"N_Axis",QObject::tr("Normal sketch axis"));
|
||||
addAxisToCombo(pcSketch,"V_Axis",QObject::tr("Vertical sketch axis"));
|
||||
addAxisToCombo(pcSketch,"H_Axis",QObject::tr("Horizontal sketch axis"));
|
||||
for (int i=0; i < pcSketch->getAxisCount(); i++) {
|
||||
|
||||
Reference in New Issue
Block a user