Commit Graph

79 Commits

Author SHA1 Message Date
wmayer
d532f8ef33 Sketcher: implement command to decrease degree of a B-spline 2020-10-23 00:36:41 +02:00
vocx-fc
19978b5e31 Sketcher: add BSplineDecreaseDegree although with an empty implementation
Currently there is a command to increase the degree of a B-spline
but the corresponding command to reduce the degree does not exist.
So this command is a placeholder for when the full implementation
is added in the future by somebody.
2020-10-22 14:53:52 +02:00
vocx-fc
ff5163cf75 Sketcher: add five tools to the Sketcher toolbar and reorder code
Add template specification for `SketcherAddWorkspaceSketchExtra`
for type `Gui::ToolBarItem` so that the following commands
are added to the toolbar as well as the Sketcher menu:
`ReorientSketch`, `ValidateSketch`, `MergeSketch`, `MirrorSketch`,
`StopOperation`.

Reorganize the order of the function declarations
so that they are in this order: Sketch actions (general),
geometries, constraints, tools, B-splines, and virtual space.

Add separators to the list of tools commands in the menu
so that it looks clearer.

Correct the header guard `#ifndef SKETCHER_WORKBENCH_H`.
Previously, it was using a guard `IMAGE_WORKBENCH_H`
seemingly copied from the Image Workbench.
2020-10-22 14:53:52 +02:00
vocx-fc
e7c21e453d Sketcher: add further commands to the toolbars
Most tools should be exposed in the toolbars and not kept
"hidden" in the menus.
* `ConstrainInternalAlignment` is added in the "constraints" toolbar.
* `SelectElementsWithDoF` is added in the "tools" toolbar.

Also amend the name of the `Sketcher_BSplineConvertToNURB` command.
2020-10-01 09:59:26 +02:00
0penBrain
00142c9b32 [Sketcher] Remove 'Hexagonal profile' menu ; fixes #4290
Menu creation has been removed (commented) but all other profile feature are kept
 for compatibility.
2020-03-20 12:10:35 +01:00
wmayer
56ef40c449 Sketcher: [skip ci] add create polygon command to sketcher menu 2020-02-07 15:28:07 +01:00
wmayer
7064ebc581 Sketcher: [skip ci] explicit command to stop current operation
Fore more details: https://forum.freecadweb.org/viewtopic.php?f=3&t=42207
2020-02-06 15:55:00 +01:00
luz.paz
7008cf92de Sketcher: [skip ci] fix header uniformity
This PR fixes header uniformity across all Sketcher WB files
2019-12-22 01:00:29 +01:00
Abdullah Tahiri
383885f2b5 Sketcher: Toolbar - add toggle deactivated state command 2019-06-22 08:26:31 +02:00
Abdullah Tahiri
62e721e8fd Sketcher: GUI PCH 2019-05-02 07:12:51 +02:00
Abdullah Tahiri
e2d6ca5ca6 Sketcher: Add diameter constraint to the menu and the toolbar
fixes #1632
2018-07-30 00:47:25 +02:00
Abdullah Tahiri
f7c827cd23 Sketcher: Add command to delete all constraints to menu 2018-07-29 13:44:09 +02:00
Abdullah Tahiri
fbf5114073 Sketcher: New tool bar icon under the copy command to move 2018-05-31 14:35:54 +02:00
Abdullah Tahiri
7410647c22 Sketcher Toolbar: Removing DoF finder from the toolbar, as it can be accessed from the solver messages now
- Renaming of command
2018-05-31 11:40:53 +02:00
Abdullah Tahiri
f60873bae6 Sketcher: New Command to select geometric elements with dependent parameters 2018-05-31 11:39:41 +02:00
Abdullah Tahiri
dbfb81dc47 Sketcher: Section Command enabling the clipping planes 2018-05-25 17:24:57 -03:00
triplus
215f07e523 Sketcher virtual space toolbar issue
+ Fix issue when creating sketcher virtual space toolbar
+ Translation support
2018-02-02 16:34:22 +01:00
Abdullah Tahiri
71e16bfbb1 Sketcher: New toolbar for VirtualSpace and Command to switch VirtualSpace 2018-01-26 17:04:08 +01:00
Abdullah Tahiri
46aa2c6356 Sketcher: Change nomenclature relating to Block constraint 2018-01-22 22:52:56 +01:00
Abdullah Tahiri
08d23cf951 Sketcher: Blocked Constraint toolbar commands 2018-01-22 22:52:56 +01:00
Abdullah Tahiri
1ec828936c Sketcher: Delete all geometry menu command (in sketcher tools) 2017-11-06 14:18:12 +01:00
Alexander Lin
144e4759ce Adds extend feature to Mod/Sketcher
Fixes #1187
2017-06-19 13:07:37 +02:00
Abdullah Tahiri
0ad91f79bd Sketcher: Carbon Copy toolbar command 2017-04-10 08:57:25 +02:00
Abdullah Tahiri
dc34f7e9fb Sketcher: Dropdown toolbar button for increase/decrease BSpline knot multiplicity 2017-04-08 12:58:06 +02:00
Abdullah Tahiri
f6f92b428d Sketcher: BSpline Decrease knot multiplity toolbar command 2017-04-08 12:58:06 +02:00
Abdullah Tahiri
0a9e647a01 Sketcher: Add toolbar command to increase knot multiplicity 2017-04-08 12:58:06 +02:00
Abdullah Tahiri
77e1d1327c Sketcher: Bspline toolbar command show/hide knot multiplicity geometry information layer 2017-04-08 12:58:06 +02:00
wmayer
a0aa4fdfef Some fixes of pr 538
fix -Wreturn-type
homogenous naming style
use official spelling of B-spline
2017-02-21 13:30:43 +01:00
Abdullah Tahiri
194dcae963 Sketcher: BSpline Increase Degree tool 2017-02-21 13:24:10 +01:00
Abdullah Tahiri
c83472a15a Sketcher: Shape to NURBS conversion 2017-02-21 13:24:10 +01:00
Abdullah Tahiri
849b5b5ed8 Sketcher: BSpline show/restore geometry information commands as a dropdown menu 2017-02-21 13:24:10 +01:00
Abdullah Tahiri
c25fd56e37 Sketcher: BSpline degree/comb hide/show commands 2017-02-21 13:24:10 +01:00
Abdullah Tahiri
3933a89e07 Sketcher: new BSpline toolbar / command to hide control polygon 2017-02-21 13:24:10 +01:00
wmayer
d065c2fe5b fix whitespaces 2017-01-20 19:22:50 +01:00
Abdullah Tahiri
e339f24095 Sketcher: Construction of periodic BSplines 2017-01-13 22:25:10 +01:00
Abdullah Tahiri
546e5a20c5 Sketxher: Basic creation method
===============================

For non-periodic case.

No autoconstraints or internal geometry at this point.
2017-01-07 20:21:19 +01:00
wmayer
a421803c09 fix whitespaces 2016-12-28 14:22:42 +01:00
Abdullah Tahiri
6ce67a807d Sketcher: Parabola Creation Command
===================================

With exception of exposure of internal geometry.
2016-12-19 22:58:20 +01:00
Abdullah Tahiri
e928e418ec Sketcher: New Feature: Hyperbola/ArcOfHyperbola
===============================================

- ArcOfHyperbola creation method
- Solver representation (undefined moving)
- SketchObjectPyImp (here we still miss the Part->Partdesign conversion)
- Sketch validation for hyperbola
- Hyperbola creation method: shows the "proof of concept", but it is very buggy!!

Notes:
- Missing icons, probably missing geo normal curve implementation - rebasing -
- Fixes to adapt Hyperbola to Derivector implementation and make it compile
2016-11-27 18:45:33 +01:00
wmayer
c06b6f081f fix -Wextra in Sketcher 2016-09-22 18:34:35 +02:00
Mateusz Skowroński
05f95c0506 Fix files encoding. Go from ISO8859-1 to UTF-8. 2015-09-21 19:50:49 -03:00
Abdullah Tahiri
a026a19088 Sketcher: SelectElementsAssociatedWithConstraints added to tools toolbar
========================================================================

By express request:
http://forum.freecadweb.org/viewtopic.php?f=10&t=11840&start=40#p97202
2015-08-30 12:08:46 +02:00
Abdullah Tahiri
df832ed746 Sketcher: New Functionality: Mirror full sketch
===============================================

Support for mirroring a full sketch.

A dialog appears allowing to select X, Y axis mirroring or mirroring about the origin of the sketch.
2015-08-30 12:08:44 +02:00
Abdullah Tahiri
2cb29df152 Sketcher: UI Copy/Clone as a single dropdown toolbar icon
=========================================================

This commit provides with a single toolbar button to select between a copy and clone.

Copy just copies the constraints.
Clone modifies the dimensional constraints to geometric constraints, so that the constrained geometry follows the changes in the original object.
2015-08-30 12:08:44 +02:00
Abdullah Tahiri
3ec90116f1 Sketcher: Extension of Copy/Array functionality to clone
=============================================================

This commit allows the user to select in advance whether he wants a simple copy or a clone.

This involves substitution of dimensional constraints in the copies by equality and parallel constraints.

Terminology change for Arrays, now it is Rectangular array
2015-08-30 12:08:43 +02:00
Abdullah Tahiri
7b053b5602 Sketcher: UI Copy Support & 2D Array python command rework
==========================================================

- 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
2015-08-30 12:08:42 +02:00
Abdullah Tahiri
38256931af Sketcher: New Feature: Symmetric tool
=====================================

Creates geometry symmetric to the selected one with respect to the last selected point or line.

It does not support the following constraints:

- Angle
- Horiz/vertical distance
- SnellLaw

Horizontal and Vertical (directional) dimensions removed from the the copying process when created
on a single edge (by picking one edge instead of two points), i.e. Constraint involving only one GeoId at "First".
2015-08-30 12:08:40 +02:00
Abdullah Tahiri
c4f08644d8 Sketcher: UI Improvement Smart button for constraints and geometry toogle/creation
==================================================================================

Geometry button:
- if no object selected, the legacy toggle icon has a new functionality, switch to/from creating in construction mode
- if object selected, it has the legacy functionality
- the button can be clicked during "continuos creation mode" to switch from creating to/from creating in construction mode

Constraint button:
- The button is not selectable if nothing is selected (it would be impossible to determine the effect)
- When constraints are selected, the button toggles the constraints to/from Driving.
- When geometry is selected, the button switches from/to reference mode, the change is apparent from the color of the constraint icons.

Continuous creation mode:
- Default changed so that it is active unless you change it in settings

Updated terminology
2015-05-30 16:39:32 +02:00
Abdullah Tahiri
4a052bebb5 Sketcher: Driving/reference creation improvements and some other fixes
======================================================================

- Changing from Driving to reference does not include unnecessary solvings.
- Added some checks to avoid making Driving constraints when calling directly from python and involving only external geometry (would give redundant constraints).
- New python command toggleDriving to just change the status from reference to Driving
- New UI toolbar Command to toggle constraints
- Fix to allow switching from/to construction mode during continuous mode creation.
- Enable/Disable for constraints in constraints widget has changed to operate on multiselection and now effects "toggle" instead of enable/disable.
- Disable the option to directly create a SnellsLaw non-driving constraint (this constraint does not support direct creation, it can be toggled to non-driving after creation though).
2015-05-30 16:39:32 +02:00
Abdullah Tahiri
9df780b41b Sketcher New Feature: Toggle Mode for Reference/Driving constraints
===================================================================

It allows to create constraints directly into Reference or Driving mode.

It does not include icons
2015-05-30 16:39:30 +02:00