View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000694 | PartDesign | Patch | public | 2012-05-03 03:51 | 2012-06-08 17:26 |
| Reporter | jrheinlaender | Assigned To | |||
| Priority | normal | Severity | feature | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Product Version | 0.13 | ||||
| Fixed in Version | 0.13 | ||||
| Summary | 0000694: Implementation of MirroredExtent for Pad Feature | ||||
| Description | Implements a Pad extending symmetric to the sketch plane. The corresponding option already exists in the UI, but was disabled. | ||||
| Additional Information | Attached is a git diff file | ||||
| Tags | No tags attached. | ||||
| FreeCAD Information | |||||
|
2012-05-03 03:51
|
MirroredExtent.diff (1,527 bytes)
diff --git a/src/Mod/PartDesign/App/FeaturePad.cpp b/src/Mod/PartDesign/App/FeaturePad.cpp
index 1a12c45..fe405ed 100644
--- a/src/Mod/PartDesign/App/FeaturePad.cpp
+++ b/src/Mod/PartDesign/App/FeaturePad.cpp
@@ -118,6 +118,14 @@ App::DocumentObjectExecReturn *Pad::execute(void)
if (aFace.IsNull())
return new App::DocumentObjectExecReturn("Creating a face from sketch failed");
+ // Move face by half the extrusion distance to get pad symmetric to sketch plane
+ if (MirroredExtent.getValue()) {
+ gp_Trsf mov;
+ mov.SetTranslation(gp_Vec(SketchOrientationVector.x,SketchOrientationVector.y,SketchOrientationVector.z) * (-1.0) * L/2.0);
+ TopLoc_Location loc(mov);
+ aFace.Move(loc);
+ }
+
// lengthen the vector
SketchOrientationVector *= L;
diff --git a/src/Mod/PartDesign/Gui/TaskPadParameters.ui b/src/Mod/PartDesign/Gui/TaskPadParameters.ui
index d407bbf..a2945dd 100644
--- a/src/Mod/PartDesign/Gui/TaskPadParameters.ui
+++ b/src/Mod/PartDesign/Gui/TaskPadParameters.ui
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>158</width>
- <height>116</height>
+ <width>241</width>
+ <height>158</height>
</rect>
</property>
<property name="windowTitle">
@@ -64,7 +64,7 @@
<item>
<widget class="QCheckBox" name="checkBoxMirrored">
<property name="enabled">
- <bool>false</bool>
+ <bool>true</bool>
</property>
<property name="text">
<string>Mirrored extent</string>
|
|
|
See also git@github.com:jrheinlaender/FreeCAD.git branch jrheinlaender/PartDesign |
|
|
Merged into master |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2012-05-03 03:51 | jrheinlaender | New Issue | |
| 2012-05-03 03:51 | jrheinlaender | File Added: MirroredExtent.diff | |
| 2012-05-03 05:19 | wmayer | Status | new => assigned |
| 2012-05-03 05:19 | wmayer | Assigned To | => Jriegel |
| 2012-05-05 18:00 | yorik | Project | FreeCAD => PartDesign |
| 2012-05-31 09:43 | jrheinlaender | Note Added: 0002104 | |
| 2012-06-08 17:26 | wmayer | Note Added: 0002161 | |
| 2012-06-08 17:26 | wmayer | Status | assigned => closed |
| 2012-06-08 17:26 | wmayer | Resolution | open => fixed |
| 2012-06-08 17:26 | wmayer | Fixed in Version | => 0.13 |
FreeCAD