========================================================== - Support for copying geometric elements in the sketcher with Ctrl+C (or using the still missing icon). It will show you the vector of displacement from the "reference point". The reference point can be chosen by the user (although it is not necessary to do it so) by making the point the user wish to be the reference point the last selected element. It conveniently incorporates "autoconstraints", so that you can make this point (the one of the copy) directly coincident with any other point in the sketch. - Python 2D array command modified to lock elements position using construction lines and constraints. - Support for different spacing between u and v directions (the direction of the cols and the direction of the rows). - Support to avoid copying DistanceX and DistanceY constraints when used for locking a point. This means that if the geometry that you copy(array) is fully constraint, the resulting 2D array is also fully constraint. - UI support for creating 2D linear arrays in the sketcher. - Bug fix in python addArray, wrong line copy startingpoint calculation fixed. How to create a 2D array in the sketcher: 1. Select your geometric elements. 2. Click the button 3. Fill in the rows/cols and preferences on spacing and constraining each element of the array 4. Click Ok 5. Define the direction of the cols of the array and click
56 lines
2.2 KiB
C++
56 lines
2.2 KiB
C++
/***************************************************************************
|
|
* Copyright (c) 2015 Abdullah Tahiri <abdullah.tahiri.yo@gmail.com> *
|
|
* *
|
|
* This file is part of the FreeCAD CAx development system. *
|
|
* *
|
|
* This library is free software; you can redistribute it and/or *
|
|
* modify it under the terms of the GNU Library General Public *
|
|
* License as published by the Free Software Foundation; either *
|
|
* version 2 of the License, or (at your option) any later version. *
|
|
* *
|
|
* This library is distributed in the hope that it will be useful, *
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
* GNU Library General Public License for more details. *
|
|
* *
|
|
* You should have received a copy of the GNU Library General Public *
|
|
* License along with this library; see the file COPYING.LIB. If not, *
|
|
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
|
* Suite 330, Boston, MA 02111-1307, USA *
|
|
* *
|
|
***************************************************************************/
|
|
|
|
#ifndef SKETCHERGUI_SketchLinearArrayDialog_H
|
|
#define SKETCHERGUI_SketchLinearArrayDialog_H
|
|
|
|
#include <Base/Placement.h>
|
|
#include <QDialog>
|
|
|
|
namespace SketcherGui {
|
|
|
|
class Ui_SketchLinearArrayDialog;
|
|
class SketchLinearArrayDialog : public QDialog
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
SketchLinearArrayDialog(void);
|
|
~SketchLinearArrayDialog();
|
|
|
|
void accept();
|
|
|
|
int Rows;
|
|
int Cols;
|
|
bool ConstraintSeparation;
|
|
bool EqualVerticalHorizontalSpacing;
|
|
|
|
protected:
|
|
void updateValues(void);
|
|
private:
|
|
Ui_SketchLinearArrayDialog* ui;
|
|
};
|
|
|
|
}
|
|
|
|
#endif // SKETCHERGUI_SketchLinearArrayDialog_H
|