FreeCADでWedgeのmacro

(参考)Part Wedge
https://www.freecadweb.org/wiki/Part_Wedge/es

```python
# -*- coding: utf-8 -*- 
import FreeCAD
import Part
import Part,PartGui

from FreeCAD import Base
App.ActiveDocument.addObject("Part::Wedge","Wedge")
App.ActiveDocument.Wedge.Xmin=0.00
App.ActiveDocument.Wedge.Ymin=0.00
App.ActiveDocument.Wedge.Zmin=0.00
App.ActiveDocument.Wedge.X2min=6.00
App.ActiveDocument.Wedge.Z2min=6.00
App.ActiveDocument.Wedge.Xmax=12.00
App.ActiveDocument.Wedge.Ymax=6.00
App.ActiveDocument.Wedge.Zmax=12.00
App.ActiveDocument.Wedge.X2max=6.00
App.ActiveDocument.Wedge.Z2max=6.00
App.ActiveDocument.Wedge.Placement=Base.Placement(Base.Vector(0.00,0.00,0.00),Base.Rotation(0.00,0.00,0.00,1.00))
App.ActiveDocument.Wedge.Label='myWedge'

App.ActiveDocument.recompute()
```


Step出力です

```
ISO-10303-21;
HEADER;
FILE_DESCRIPTION(('FreeCAD Model'),'2;1');
FILE_NAME('C:/Users/xxxx/Desktop/ksb20180307.step',
  '2018-03-07T20:31:58',('Author'),(''),
  'Open CASCADE STEP processor 6.8','FreeCAD','Unknown');
FILE_SCHEMA(('AUTOMOTIVE_DESIGN_CC2 { 1 2 10303 214 -1 1 5 4 }'));
ENDSEC;
DATA;
#1 = APPLICATION_PROTOCOL_DEFINITION('committee draft',
  'automotive_design',1997,#2);
#2 = APPLICATION_CONTEXT(
  'core data for automotive mechanical design processes');
#3 = SHAPE_DEFINITION_REPRESENTATION(#4,#10);
#4 = PRODUCT_DEFINITION_SHAPE('','',#5);
#5 = PRODUCT_DEFINITION('design','',#6,#9);
#6 = PRODUCT_DEFINITION_FORMATION('','',#7);
#7 = PRODUCT('ASSEMBLY','ASSEMBLY','',(#8));
#8 = MECHANICAL_CONTEXT('',#2,'mechanical');
#9 = PRODUCT_DEFINITION_CONTEXT('part definition',#2,'design');
#10 = SHAPE_REPRESENTATION('',(#11,#15),#19);
#11 = AXIS2_PLACEMENT_3D('',#12,#13,#14);
#12 = CARTESIAN_POINT('',(0.E+000,0.E+000,0.E+000));
#13 = DIRECTION('',(0.E+000,0.E+000,1.));
#14 = DIRECTION('',(1.,0.E+000,-0.E+000));
#15 = AXIS2_PLACEMENT_3D('',#16,#17,#18);
#16 = CARTESIAN_POINT('',(0.E+000,0.E+000,0.E+000));
#17 = DIRECTION('',(0.E+000,0.E+000,1.));
#18 = DIRECTION('',(1.,0.E+000,0.E+000));
#19 = ( GEOMETRIC_REPRESENTATION_CONTEXT(3) 
GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#23)) GLOBAL_UNIT_ASSIGNED_CONTEXT(
(#20,#21,#22)) REPRESENTATION_CONTEXT('Context #1',
  '3D Context with UNIT and UNCERTAINTY') );
#20 = ( LENGTH_UNIT() NAMED_UNIT(*) SI_UNIT(.MILLI.,.METRE.) );
#21 = ( NAMED_UNIT(*) PLANE_ANGLE_UNIT() SI_UNIT($,.RADIAN.) );
#22 = ( NAMED_UNIT(*) SI_UNIT($,.STERADIAN.) SOLID_ANGLE_UNIT() );
#23 = UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.E-007),#20,
  'distance_accuracy_value','confusion accuracy');
#24 = PRODUCT_TYPE('part',$,(#7));
#25 = ADVANCED_BREP_SHAPE_REPRESENTATION('',(#11,#26),#254);
#26 = MANIFOLD_SOLID_BREP('',#27);
#27 = CLOSED_SHELL('',(#28,#120,#195,#242,#248));
#28 = ADVANCED_FACE('',(#29),#43,.F.);
#29 = FACE_BOUND('',#30,.F.);
#30 = EDGE_LOOP('',(#31,#66,#94));
#31 = ORIENTED_EDGE('',*,*,#32,.F.);
#32 = EDGE_CURVE('',#33,#35,#37,.T.);
#33 = VERTEX_POINT('',#34);
#34 = CARTESIAN_POINT('',(0.E+000,0.E+000,0.E+000));
#35 = VERTEX_POINT('',#36);
#36 = CARTESIAN_POINT('',(0.E+000,0.E+000,12.));
#37 = SURFACE_CURVE('',#38,(#42,#54),.PCURVE_S1.);
#38 = LINE('',#39,#40);
#39 = CARTESIAN_POINT('',(0.E+000,0.E+000,0.E+000));
#40 = VECTOR('',#41,1.);
#41 = DIRECTION('',(0.E+000,0.E+000,1.));
#42 = PCURVE('',#43,#48);
#43 = PLANE('',#44);
#44 = AXIS2_PLACEMENT_3D('',#45,#46,#47);
#45 = CARTESIAN_POINT('',(0.E+000,0.E+000,0.E+000));
#46 = DIRECTION('',(0.707106781187,-0.707106781187,-0.E+000));
#47 = DIRECTION('',(-0.707106781187,-0.707106781187,0.E+000));
#48 = DEFINITIONAL_REPRESENTATION('',(#49),#53);
#49 = LINE('',#50,#51);
#50 = CARTESIAN_POINT('',(0.E+000,0.E+000));
#51 = VECTOR('',#52,1.);
#52 = DIRECTION('',(0.E+000,-1.));
#53 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) 
PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''
  ) );
#54 = PCURVE('',#55,#60);
#55 = PLANE('',#56);
#56 = AXIS2_PLACEMENT_3D('',#57,#58,#59);
#57 = CARTESIAN_POINT('',(0.E+000,0.E+000,0.E+000));
#58 = DIRECTION('',(-0.E+000,1.,0.E+000));
#59 = DIRECTION('',(0.E+000,0.E+000,1.));
#60 = DEFINITIONAL_REPRESENTATION('',(#61),#65);
#61 = LINE('',#62,#63);
#62 = CARTESIAN_POINT('',(0.E+000,0.E+000));
#63 = VECTOR('',#64,1.);
#64 = DIRECTION('',(1.,0.E+000));
#65 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) 
PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''
  ) );
#66 = ORIENTED_EDGE('',*,*,#67,.T.);
#67 = EDGE_CURVE('',#33,#68,#70,.T.);
#68 = VERTEX_POINT('',#69);
#69 = CARTESIAN_POINT('',(6.,6.,6.));
#70 = SURFACE_CURVE('',#71,(#75,#82),.PCURVE_S1.);
#71 = LINE('',#72,#73);
#72 = CARTESIAN_POINT('',(0.E+000,0.E+000,0.E+000));
#73 = VECTOR('',#74,1.);
#74 = DIRECTION('',(0.57735026919,0.57735026919,0.57735026919));
#75 = PCURVE('',#43,#76);
#76 = DEFINITIONAL_REPRESENTATION('',(#77),#81);
#77 = LINE('',#78,#79);
#78 = CARTESIAN_POINT('',(0.E+000,0.E+000));
#79 = VECTOR('',#80,1.);
#80 = DIRECTION('',(-0.816496580928,-0.57735026919));
#81 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) 
PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''
  ) );
#82 = PCURVE('',#83,#88);
#83 = PLANE('',#84);
#84 = AXIS2_PLACEMENT_3D('',#85,#86,#87);
#85 = CARTESIAN_POINT('',(0.E+000,0.E+000,0.E+000));
#86 = DIRECTION('',(0.E+000,-0.707106781187,0.707106781187));
#87 = DIRECTION('',(0.E+000,0.707106781187,0.707106781187));
#88 = DEFINITIONAL_REPRESENTATION('',(#89),#93);
#89 = LINE('',#90,#91);
#90 = CARTESIAN_POINT('',(0.E+000,0.E+000));
#91 = VECTOR('',#92,1.);
#92 = DIRECTION('',(0.816496580928,-0.57735026919));
#93 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) 
PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''
  ) );
#94 = ORIENTED_EDGE('',*,*,#95,.F.);
#95 = EDGE_CURVE('',#35,#68,#96,.T.);
#96 = SURFACE_CURVE('',#97,(#101,#108),.PCURVE_S1.);
#97 = LINE('',#98,#99);
#98 = CARTESIAN_POINT('',(0.E+000,0.E+000,12.));
#99 = VECTOR('',#100,1.);
#100 = DIRECTION('',(0.57735026919,0.57735026919,-0.57735026919));
#101 = PCURVE('',#43,#102);
#102 = DEFINITIONAL_REPRESENTATION('',(#103),#107);
#103 = LINE('',#104,#105);
#104 = CARTESIAN_POINT('',(0.E+000,-12.));
#105 = VECTOR('',#106,1.);
#106 = DIRECTION('',(-0.816496580928,0.57735026919));
#107 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) 
PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''
  ) );
#108 = PCURVE('',#109,#114);
#109 = PLANE('',#110);
#110 = AXIS2_PLACEMENT_3D('',#111,#112,#113);
#111 = CARTESIAN_POINT('',(0.E+000,0.E+000,12.));
#112 = DIRECTION('',(0.E+000,0.707106781187,0.707106781187));
#113 = DIRECTION('',(0.E+000,0.707106781187,-0.707106781187));
#114 = DEFINITIONAL_REPRESENTATION('',(#115),#119);
#115 = LINE('',#116,#117);
#116 = CARTESIAN_POINT('',(0.E+000,0.E+000));
#117 = VECTOR('',#118,1.);
#118 = DIRECTION('',(0.816496580928,-0.57735026919));
#119 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) 
PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''
  ) );
#120 = ADVANCED_FACE('',(#121),#135,.T.);
#121 = FACE_BOUND('',#122,.T.);
#122 = EDGE_LOOP('',(#123,#153,#174));
#123 = ORIENTED_EDGE('',*,*,#124,.F.);
#124 = EDGE_CURVE('',#125,#127,#129,.T.);
#125 = VERTEX_POINT('',#126);
#126 = CARTESIAN_POINT('',(12.,0.E+000,0.E+000));
#127 = VERTEX_POINT('',#128);
#128 = CARTESIAN_POINT('',(12.,0.E+000,12.));
#129 = SURFACE_CURVE('',#130,(#134,#146),.PCURVE_S1.);
#130 = LINE('',#131,#132);
#131 = CARTESIAN_POINT('',(12.,0.E+000,0.E+000));
#132 = VECTOR('',#133,1.);
#133 = DIRECTION('',(0.E+000,0.E+000,1.));
#134 = PCURVE('',#135,#140);
#135 = PLANE('',#136);
#136 = AXIS2_PLACEMENT_3D('',#137,#138,#139);
#137 = CARTESIAN_POINT('',(12.,0.E+000,0.E+000));
#138 = DIRECTION('',(0.707106781187,0.707106781187,0.E+000));
#139 = DIRECTION('',(0.707106781187,-0.707106781187,0.E+000));
#140 = DEFINITIONAL_REPRESENTATION('',(#141),#145);
#141 = LINE('',#142,#143);
#142 = CARTESIAN_POINT('',(0.E+000,0.E+000));
#143 = VECTOR('',#144,1.);
#144 = DIRECTION('',(0.E+000,-1.));
#145 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) 
PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''
  ) );
#146 = PCURVE('',#55,#147);
#147 = DEFINITIONAL_REPRESENTATION('',(#148),#152);
#148 = LINE('',#149,#150);
#149 = CARTESIAN_POINT('',(0.E+000,12.));
#150 = VECTOR('',#151,1.);
#151 = DIRECTION('',(1.,0.E+000));
#152 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) 
PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''
  ) );
#153 = ORIENTED_EDGE('',*,*,#154,.T.);
#154 = EDGE_CURVE('',#125,#68,#155,.T.);
#155 = SURFACE_CURVE('',#156,(#160,#167),.PCURVE_S1.);
#156 = LINE('',#157,#158);
#157 = CARTESIAN_POINT('',(12.,0.E+000,0.E+000));
#158 = VECTOR('',#159,1.);
#159 = DIRECTION('',(-0.57735026919,0.57735026919,0.57735026919));
#160 = PCURVE('',#135,#161);
#161 = DEFINITIONAL_REPRESENTATION('',(#162),#166);
#162 = LINE('',#163,#164);
#163 = CARTESIAN_POINT('',(0.E+000,0.E+000));
#164 = VECTOR('',#165,1.);
#165 = DIRECTION('',(-0.816496580928,-0.57735026919));
#166 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) 
PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''
  ) );
#167 = PCURVE('',#83,#168);
#168 = DEFINITIONAL_REPRESENTATION('',(#169),#173);
#169 = LINE('',#170,#171);
#170 = CARTESIAN_POINT('',(0.E+000,-12.));
#171 = VECTOR('',#172,1.);
#172 = DIRECTION('',(0.816496580928,0.57735026919));
#173 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) 
PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''
  ) );
#174 = ORIENTED_EDGE('',*,*,#175,.F.);
#175 = EDGE_CURVE('',#127,#68,#176,.T.);
#176 = SURFACE_CURVE('',#177,(#181,#188),.PCURVE_S1.);
#177 = LINE('',#178,#179);
#178 = CARTESIAN_POINT('',(12.,0.E+000,12.));
#179 = VECTOR('',#180,1.);
#180 = DIRECTION('',(-0.57735026919,0.57735026919,-0.57735026919));
#181 = PCURVE('',#135,#182);
#182 = DEFINITIONAL_REPRESENTATION('',(#183),#187);
#183 = LINE('',#184,#185);
#184 = CARTESIAN_POINT('',(0.E+000,-12.));
#185 = VECTOR('',#186,1.);
#186 = DIRECTION('',(-0.816496580928,0.57735026919));
#187 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) 
PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''
  ) );
#188 = PCURVE('',#109,#189);
#189 = DEFINITIONAL_REPRESENTATION('',(#190),#194);
#190 = LINE('',#191,#192);
#191 = CARTESIAN_POINT('',(0.E+000,-12.));
#192 = VECTOR('',#193,1.);
#193 = DIRECTION('',(0.816496580928,0.57735026919));
#194 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) 
PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''
  ) );
#195 = ADVANCED_FACE('',(#196),#55,.F.);
#196 = FACE_BOUND('',#197,.F.);
#197 = EDGE_LOOP('',(#198,#219,#220,#241));
#198 = ORIENTED_EDGE('',*,*,#199,.F.);
#199 = EDGE_CURVE('',#33,#125,#200,.T.);
#200 = SURFACE_CURVE('',#201,(#205,#212),.PCURVE_S1.);
#201 = LINE('',#202,#203);
#202 = CARTESIAN_POINT('',(0.E+000,0.E+000,0.E+000));
#203 = VECTOR('',#204,1.);
#204 = DIRECTION('',(1.,0.E+000,-0.E+000));
#205 = PCURVE('',#55,#206);
#206 = DEFINITIONAL_REPRESENTATION('',(#207),#211);
#207 = LINE('',#208,#209);
#208 = CARTESIAN_POINT('',(0.E+000,0.E+000));
#209 = VECTOR('',#210,1.);
#210 = DIRECTION('',(0.E+000,1.));
#211 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) 
PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''
  ) );
#212 = PCURVE('',#83,#213);
#213 = DEFINITIONAL_REPRESENTATION('',(#214),#218);
#214 = LINE('',#215,#216);
#215 = CARTESIAN_POINT('',(0.E+000,0.E+000));
#216 = VECTOR('',#217,1.);
#217 = DIRECTION('',(0.E+000,-1.));
#218 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) 
PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''
  ) );
#219 = ORIENTED_EDGE('',*,*,#32,.T.);
#220 = ORIENTED_EDGE('',*,*,#221,.T.);
#221 = EDGE_CURVE('',#35,#127,#222,.T.);
#222 = SURFACE_CURVE('',#223,(#227,#234),.PCURVE_S1.);
#223 = LINE('',#224,#225);
#224 = CARTESIAN_POINT('',(0.E+000,0.E+000,12.));
#225 = VECTOR('',#226,1.);
#226 = DIRECTION('',(1.,0.E+000,-0.E+000));
#227 = PCURVE('',#55,#228);
#228 = DEFINITIONAL_REPRESENTATION('',(#229),#233);
#229 = LINE('',#230,#231);
#230 = CARTESIAN_POINT('',(12.,0.E+000));
#231 = VECTOR('',#232,1.);
#232 = DIRECTION('',(0.E+000,1.));
#233 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) 
PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''
  ) );
#234 = PCURVE('',#109,#235);
#235 = DEFINITIONAL_REPRESENTATION('',(#236),#240);
#236 = LINE('',#237,#238);
#237 = CARTESIAN_POINT('',(0.E+000,0.E+000));
#238 = VECTOR('',#239,1.);
#239 = DIRECTION('',(0.E+000,-1.));
#240 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) 
PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''
  ) );
#241 = ORIENTED_EDGE('',*,*,#124,.F.);
#242 = ADVANCED_FACE('',(#243),#83,.F.);
#243 = FACE_BOUND('',#244,.F.);
#244 = EDGE_LOOP('',(#245,#246,#247));
#245 = ORIENTED_EDGE('',*,*,#67,.F.);
#246 = ORIENTED_EDGE('',*,*,#199,.T.);
#247 = ORIENTED_EDGE('',*,*,#154,.T.);
#248 = ADVANCED_FACE('',(#249),#109,.T.);
#249 = FACE_BOUND('',#250,.T.);
#250 = EDGE_LOOP('',(#251,#252,#253));
#251 = ORIENTED_EDGE('',*,*,#95,.F.);
#252 = ORIENTED_EDGE('',*,*,#221,.T.);
#253 = ORIENTED_EDGE('',*,*,#175,.T.);
#254 = ( GEOMETRIC_REPRESENTATION_CONTEXT(3) 
GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#258)) GLOBAL_UNIT_ASSIGNED_CONTEXT
((#255,#256,#257)) REPRESENTATION_CONTEXT('Context #1',
  '3D Context with UNIT and UNCERTAINTY') );
#255 = ( LENGTH_UNIT() NAMED_UNIT(*) SI_UNIT(.MILLI.,.METRE.) );
#256 = ( NAMED_UNIT(*) PLANE_ANGLE_UNIT() SI_UNIT($,.RADIAN.) );
#257 = ( NAMED_UNIT(*) SI_UNIT($,.STERADIAN.) SOLID_ANGLE_UNIT() );
#258 = UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.E-007),#255,
  'distance_accuracy_value','confusion accuracy');
#259 = SHAPE_DEFINITION_REPRESENTATION(#260,#25);
#260 = PRODUCT_DEFINITION_SHAPE('','',#261);
#261 = PRODUCT_DEFINITION('design','',#262,#265);
#262 = PRODUCT_DEFINITION_FORMATION('','',#263);
#263 = PRODUCT('myWedge','myWedge','',(#264));
#264 = MECHANICAL_CONTEXT('',#2,'mechanical');
#265 = PRODUCT_DEFINITION_CONTEXT('part definition',#2,'design');
#266 = CONTEXT_DEPENDENT_SHAPE_REPRESENTATION(#267,#269);
#267 = ( REPRESENTATION_RELATIONSHIP('','',#25,#10) 
REPRESENTATION_RELATIONSHIP_WITH_TRANSFORMATION(#268) 
SHAPE_REPRESENTATION_RELATIONSHIP() );
#268 = ITEM_DEFINED_TRANSFORMATION('','',#11,#15);
#269 = PRODUCT_DEFINITION_SHAPE('Placement','Placement of an item',#270
  );
#270 = NEXT_ASSEMBLY_USAGE_OCCURRENCE('1','=>[0:1:1:2]','',#5,#261,$);
#271 = PRODUCT_TYPE('part',$,(#263));
#272 = MECHANICAL_DESIGN_GEOMETRIC_PRESENTATION_REPRESENTATION('',(#273)
  ,#254);
#273 = STYLED_ITEM('color',(#274),#26);
#274 = PRESENTATION_STYLE_ASSIGNMENT((#275,#281));
#275 = SURFACE_STYLE_USAGE(.BOTH.,#276);
#276 = SURFACE_SIDE_STYLE('',(#277));
#277 = SURFACE_STYLE_FILL_AREA(#278);
#278 = FILL_AREA_STYLE('',(#279));
#279 = FILL_AREA_STYLE_COLOUR('',#280);
#280 = COLOUR_RGB('',0.800000011921,0.800000011921,0.800000011921);
#281 = CURVE_STYLE('',#282,POSITIVE_LENGTH_MEASURE(0.1),#280);
#282 = DRAUGHTING_PRE_DEFINED_CURVE_FONT('continuous');
ENDSEC;
END-ISO-10303-21;