View Issue Details

IDProjectCategoryView StatusLast Update
0000694PartDesignPatchpublic2012-06-08 17:26
Reporterjrheinlaender Assigned ToJriegel 
PrioritynormalSeverityfeatureReproducibilityalways
Status closedResolutionfixed 
Product Version0.13 
Fixed in Version0.13 
Summary0000694: Implementation of MirroredExtent for Pad Feature
DescriptionImplements a Pad extending symmetric to the sketch plane. The corresponding option already exists in the UI, but was disabled.
Additional InformationAttached is a git diff file
TagsNo tags attached.
FreeCAD Information

Activities

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>
MirroredExtent.diff (1,527 bytes)   

jrheinlaender

2012-05-31 09:43

developer   ~0002104

See also

git@github.com:jrheinlaender/FreeCAD.git

branch jrheinlaender/PartDesign

wmayer

2012-06-08 17:26

administrator   ~0002161

Merged into master

Issue History

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