From 3b792f1403d42022260097c1982553a4093eea2d Mon Sep 17 00:00:00 2001 From: gzy Date: Mon, 24 Sep 2018 16:10:37 +0300 Subject: [PATCH] pipe and measurement --- .../doc/TUI_pipebinormalFeature.rst | 11 ++ .../doc/TUI_pipelocationsFeature.rst | 11 ++ .../doc/TUI_pipesimpleFeature.rst | 11 ++ .../doc/examples/pipe_binormal.py | 34 ++++++ .../doc/examples/pipe_locations.py | 33 +++++ .../doc/examples/pipe_simple.py | 35 ++++++ .../doc/images/meas_angle3p_32x32.png | Bin 0 -> 975 bytes .../doc/images/meas_angle_32x32.png | Bin 0 -> 629 bytes .../doc/images/meas_distance_32x32.png | Bin 0 -> 525 bytes .../doc/images/meas_length_32x32.png | Bin 0 -> 489 bytes .../doc/images/meas_radius_32x32.png | Bin 0 -> 1097 bytes src/FeaturesPlugin/doc/images/measurement.png | Bin 0 -> 392 bytes src/FeaturesPlugin/doc/images/pipe.png | Bin 0 -> 884 bytes .../doc/images/pipe_binormal_32x32.png | Bin 0 -> 2148 bytes .../doc/images/pipe_locations_32x32.png | Bin 0 -> 1853 bytes .../doc/images/pipe_simple_32x32.png | Bin 0 -> 1745 bytes src/FeaturesPlugin/doc/measurementFeature.rst | 104 +++++++++++++++- src/FeaturesPlugin/doc/pipeFeature.rst | 113 +++++++++++++++++- 18 files changed, 348 insertions(+), 4 deletions(-) create mode 100644 src/FeaturesPlugin/doc/TUI_pipebinormalFeature.rst create mode 100644 src/FeaturesPlugin/doc/TUI_pipelocationsFeature.rst create mode 100644 src/FeaturesPlugin/doc/TUI_pipesimpleFeature.rst create mode 100644 src/FeaturesPlugin/doc/examples/pipe_binormal.py create mode 100644 src/FeaturesPlugin/doc/examples/pipe_locations.py create mode 100644 src/FeaturesPlugin/doc/examples/pipe_simple.py create mode 100644 src/FeaturesPlugin/doc/images/meas_angle3p_32x32.png create mode 100644 src/FeaturesPlugin/doc/images/meas_angle_32x32.png create mode 100644 src/FeaturesPlugin/doc/images/meas_distance_32x32.png create mode 100644 src/FeaturesPlugin/doc/images/meas_length_32x32.png create mode 100644 src/FeaturesPlugin/doc/images/meas_radius_32x32.png create mode 100644 src/FeaturesPlugin/doc/images/measurement.png create mode 100644 src/FeaturesPlugin/doc/images/pipe.png create mode 100644 src/FeaturesPlugin/doc/images/pipe_binormal_32x32.png create mode 100644 src/FeaturesPlugin/doc/images/pipe_locations_32x32.png create mode 100644 src/FeaturesPlugin/doc/images/pipe_simple_32x32.png diff --git a/src/FeaturesPlugin/doc/TUI_pipebinormalFeature.rst b/src/FeaturesPlugin/doc/TUI_pipebinormalFeature.rst new file mode 100644 index 000000000..5b2f289a9 --- /dev/null +++ b/src/FeaturesPlugin/doc/TUI_pipebinormalFeature.rst @@ -0,0 +1,11 @@ + + .. _tui_binormal_pipe: + +Pipe by object, path and Bi-normal +================================== + +.. literalinclude:: examples/pipe_binormal.py + :linenos: + :language: python + +:download:`Download this script ` \ No newline at end of file diff --git a/src/FeaturesPlugin/doc/TUI_pipelocationsFeature.rst b/src/FeaturesPlugin/doc/TUI_pipelocationsFeature.rst new file mode 100644 index 000000000..611de087d --- /dev/null +++ b/src/FeaturesPlugin/doc/TUI_pipelocationsFeature.rst @@ -0,0 +1,11 @@ + + .. _tui_locations_pipe: + +Pipe by object, path and locations +================================== + +.. literalinclude:: examples/pipe_locations.py + :linenos: + :language: python + +:download:`Download this script ` \ No newline at end of file diff --git a/src/FeaturesPlugin/doc/TUI_pipesimpleFeature.rst b/src/FeaturesPlugin/doc/TUI_pipesimpleFeature.rst new file mode 100644 index 000000000..b65adf293 --- /dev/null +++ b/src/FeaturesPlugin/doc/TUI_pipesimpleFeature.rst @@ -0,0 +1,11 @@ + + .. _tui_simple_pipe: + +Pipe by object and path +======================= + +.. literalinclude:: examples/pipe_simple.py + :linenos: + :language: python + +:download:`Download this script ` \ No newline at end of file diff --git a/src/FeaturesPlugin/doc/examples/pipe_binormal.py b/src/FeaturesPlugin/doc/examples/pipe_binormal.py new file mode 100644 index 000000000..68fc2bca4 --- /dev/null +++ b/src/FeaturesPlugin/doc/examples/pipe_binormal.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOZ")) +SketchLine_1 = Sketch_1.addLine(72.2418524871355, 29.96679215537161, -69.82505995666611, 29.96679215537161) +SketchLine_1.result().setColor(225, 0, 0) +SketchLine_2 = Sketch_1.addLine(-69.82505995666611, 29.96679215537161, -69.82505995666611, -40.02291624943114) +SketchLine_2.result().setColor(225, 0, 0) +SketchLine_3 = Sketch_1.addLine(-69.82505995666611, -40.02291624943114, 72.2418524871355, -40.02291624943114) +SketchLine_3.result().setColor(225, 0, 0) +SketchLine_4 = Sketch_1.addLine(72.2418524871355, -40.02291624943114, 72.2418524871355, 29.96679215537161) +SketchLine_4.result().setColor(225, 0, 0) +SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_1.startPoint()) +SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint()) +SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint()) +SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchLine_4.startPoint()) +SketchConstraintHorizontal_1 = Sketch_1.setHorizontal(SketchLine_1.result()) +SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_2.result()) +SketchConstraintHorizontal_2 = Sketch_1.setHorizontal(SketchLine_3.result()) +SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_4.result()) +model.do() +Point_2 = model.addPoint(Part_1_doc, 0, 100, 40) +Point_3 = model.addPoint(Part_1_doc, 0, 260, 60) +Interpolation_1_objects = [model.selection("VERTEX", "PartSet/Origin"), model.selection("VERTEX", "Point_1"), model.selection("VERTEX", "Point_2")] +Interpolation_1 = model.addInterpolation(Part_1_doc, Interpolation_1_objects, False, False) +Face_1 = model.addFace(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1f-SketchLine_2f-SketchLine_3f-SketchLine_4f")]) +Pipe_1 = model.addPipe(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1f-SketchLine_2f-SketchLine_3f-SketchLine_4f")], model.selection("EDGE", "Interpolation_1_1"), model.selection("EDGE", "PartSet/OX")) +model.do() +model.end() diff --git a/src/FeaturesPlugin/doc/examples/pipe_locations.py b/src/FeaturesPlugin/doc/examples/pipe_locations.py new file mode 100644 index 000000000..a059ece20 --- /dev/null +++ b/src/FeaturesPlugin/doc/examples/pipe_locations.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "PartSet/YOZ"), 100, False) +Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Plane_1"), 120, False) +Sketch_1 = model.addSketch(Part_1_doc, model.standardPlane("YOZ")) +SketchCircle_1 = Sketch_1.addCircle(-17.96171526586622, -340.274716981132, 71.31826129521251) +SketchCircle_1.result().setColor(225, 0, 0) +SketchCircle_1.results()[1].setColor(225, 0, 0) +model.do() +Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Plane_1")) +SketchCircle_2 = Sketch_2.addCircle(46.42844892447576, -229.9982953588847, 114.4484521366094) +SketchCircle_2.result().setColor(225, 0, 0) +SketchCircle_2.results()[1].setColor(225, 0, 0) +model.do() +Sketch_3 = model.addSketch(Part_1_doc, model.selection("FACE", "Plane_2")) +SketchCircle_3 = Sketch_3.addCircle(121.2811188302094, -19.85285601110755, 120.5601403551194) +SketchCircle_3.result().setColor(225, 0, 0) +SketchCircle_3.results()[1].setColor(225, 0, 0) +model.do() +Interpolation_1_objects = [model.selection("VERTEX", "Sketch_1/Vertex-SketchCircle_1"), model.selection("VERTEX", "Sketch_2/Vertex-SketchCircle_2"), model.selection("VERTEX", "Sketch_3/Vertex-SketchCircle_3")] +Interpolation_1 = model.addInterpolation(Part_1_doc, Interpolation_1_objects, False, False) +Edge_1_objects = [model.selection("EDGE", "Sketch_1/Edge-SketchCircle_1_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_2_2"), model.selection("EDGE", "Sketch_3/Edge-SketchCircle_3_2")] +Edge_1 = model.addEdge(Part_1_doc, Edge_1_objects) +Pipe_1_objects_1 = [model.selection("EDGE", "Edge_1_1"), model.selection("EDGE", "Edge_1_2"), model.selection("EDGE", "Edge_1_3")] +Pipe_1 = model.addPipe(Part_1_doc, Pipe_1_objects_1, model.selection("EDGE", "Interpolation_1_1"), []) +model.do() +model.end() diff --git a/src/FeaturesPlugin/doc/examples/pipe_simple.py b/src/FeaturesPlugin/doc/examples/pipe_simple.py new file mode 100644 index 000000000..5deb47e2c --- /dev/null +++ b/src/FeaturesPlugin/doc/examples/pipe_simple.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- + +from SketchAPI import * + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("YOZ")) +SketchProjection_1 = Sketch_1.addProjection(model.selection("VERTEX", "PartSet/Origin"), False) +SketchPoint_1 = SketchProjection_1.createdFeature() +SketchPoint_1.result().setColor(170, 0, 225) +SketchCircle_1 = Sketch_1.addCircle(0, 0, 40) +SketchCircle_1.result().setColor(225, 0, 0) +SketchCircle_1.results()[1].setColor(225, 0, 0) +SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchPoint_1.result(), SketchCircle_1.center()) +SketchConstraintRadius_1 = Sketch_1.setRadius(SketchCircle_1.results()[1], 40) +model.do() +Edge_1 = model.addEdge(Part_1_doc, [model.selection("EDGE", "Sketch_1/Edge-SketchCircle_1_2")]) +Sketch_2 = model.addSketch(Part_1_doc, model.standardPlane("XOZ")) +SketchProjection_2 = Sketch_2.addProjection(model.selection("EDGE", "PartSet/OX"), False) +SketchLine_1 = SketchProjection_2.createdFeature() +SketchLine_1.result().setColor(170, 0, 225) +SketchArc_1 = Sketch_2.addArc(30, 0, 0, 0, 40.50885209855912, 28.09918197333542, True) +SketchArc_1.result().setColor(225, 0, 0) +SketchArc_1.results()[1].setColor(225, 0, 0) +SketchConstraintCoincidence_2 = Sketch_2.setCoincident(SketchLine_1.result(), SketchArc_1.center()) +SketchConstraintCoincidence_3 = Sketch_2.setCoincident(SketchAPI_Line(SketchLine_1).startPoint(), SketchArc_1.startPoint()) +SketchConstraintRadius_2 = Sketch_2.setRadius(SketchArc_1.results()[1], 30) +model.do() +Pipe_1 = model.addPipe(Part_1_doc, [model.selection("EDGE", "Edge_1_1")], model.selection("EDGE", "Sketch_2/Edge-SketchArc_1_2")) +model.do() +model.end() diff --git a/src/FeaturesPlugin/doc/images/meas_angle3p_32x32.png b/src/FeaturesPlugin/doc/images/meas_angle3p_32x32.png new file mode 100644 index 0000000000000000000000000000000000000000..bc40b7a93d31a81288076e91244886b10bf9163e GIT binary patch literal 975 zcmV;=12FuFP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGh)&Kwv)&Y=jd7JeSaefwW^{L9 za%BK;VQFr3E^cLXAT%y8E;2FkAZe8V00TcsL_t(oN43{oOH@G^2k^(#@S=>C$}%V@ zp_}NU6}EDN-A$yr5YyDYK&3ZDU{U!6>MBAI!rP(9PnaqLLykC=0WQis*&j z*#7_Bnd6+9IqiDbz4+-l&zYI$@tm1CN6F{&A(BkiH+Aegu&TXlf_ThWa9xBya2W0v zmlIIQ=S+<0>s2p+f3;lzWBR&IUa2CS0FznCg96N?RV(0skAO){X1}=H047|zt$iSq z%FZg8gwx?pw`fer!58=ix)9!tJFwO17n2(l*#a!!u=-6O;5pn@=WpN$EOPoUkQ)@~1SZ)G*VHlf z16Rap;A&uu*Vi~>MBuX3f|x!Ch#UnDz6AEF<3|v@5pldz#dz&0lzb#kVs#ue2#B16 zDRo>6_u-hQ-3qu2EaEOKb=nxr;?{!w3FKB4w2RH9)7?(;5c;A+g=F=L1PNBM9#o;;Q}t1LhXuew*!}-PDI?QS-?+q&TYGf?W4Z7 z?Ln`=WTAtVG@=O38SWc1po`#(i$!qz9@K54KK1MYS@9T;%PK$@ClXy zKWbXm;`7cf04B^qxX<$?Gt6@)GzIN^irY5d9o;Yvf8aB47cIOuvZ?HAZvp1B$!yEL z>P@zt)E}W%k_2!~_W-{OM}WzuK;M3C8n{F9%Zi_OeW`TEAuDcWaura~Q^8 z5;&llfSVO}Om5qp16=cbi}F?8=oAl;lTZah1!Ph=PAWbQ&IwLTt`06y?h~AN4Zb9C xcnfIS)y3Oa=j%{uCI1<%w#aAWYg~DG`3Gc$i=MfOjyC`R002ovPDHLkV1m>Xu`>Vw literal 0 HcmV?d00001 diff --git a/src/FeaturesPlugin/doc/images/meas_angle_32x32.png b/src/FeaturesPlugin/doc/images/meas_angle_32x32.png new file mode 100644 index 0000000000000000000000000000000000000000..800536f4145720072113115ab604466495240f7b GIT binary patch literal 629 zcmV-*0*d{KP)<}^PL!4&s0}x3dGT9vfkpyrI%)}26m@h|V-WVV-PXmQ`0V>V?D9!5w z)S7!h3Xx?*rV$x%36Lo7Bz->#ECBz@hCf=Ml3LvtfE2tJw-NKv+fcAg-FOqbHF_&kd4L0*#!=&;#VAhWHU?S^Y=|wjHszpRHgjZ4?a0X;-gaurlf$%Kq z+3^ZWxQ6YxX`rZp zms30m;VpwOZO5$ub>KpSbb-!j(DM`Gd%$E3fQioa5UHWma6Z7$;!WUGdlRV7i3e+l z#}*_YQj;)=I^PGr0IV=PI`Q9cLc}om^{W=(8j-7v!eyYs?9;sgo~4u(h)f&Wi9OH- zK7bNX3Jl}*>EQ6vK%E0GMC4<@2ihogoXMfBbH=*HH&9D<9|LrN7VxOO1$6X*sp-V* z3n*~}U&3=E8Eo-U3d z5v^~hJ7yhn5OKIKZxrc~xm)uK(_7IyWx3{Z3%jeB`JbJ#o^o%IG^?g=luP!k`>n}7 z9m%I%jHK;(QWE~v_dhw`-myx^*eAp)L7>v@iRi@T*H)-5)7ZnPY2f~KpK4=M<{jn( zOP_DZW%%?|?95|Zg-fh#2bl~CO!qt#zoFLG=*Qg1XJDsR7?CjBAd5rayQfB|w9(dv zb(1hh%DQWgovR!~_gOO5h)d6J(eP=M_Fu#hf51rK4x=8!{T*{%L4w|^R~rOYl>cr$ z6cEZ8Wl&ka9RdyC{)<5K{indo2ySicKgVUm#GwS0H2mG)vUVOfB^MOc(T@80^ zZPp2e{%%g0f30o{>FVdQ&MBb@02#Buwg3PC literal 0 HcmV?d00001 diff --git a/src/FeaturesPlugin/doc/images/meas_radius_32x32.png b/src/FeaturesPlugin/doc/images/meas_radius_32x32.png new file mode 100644 index 0000000000000000000000000000000000000000..a3c70fca4045a53c97c2cf553c1f1c505a241460 GIT binary patch literal 1097 zcmV-P1h)H$P)3gp$&GxQ8KzxN0%5Haht|jq$6XQS-6W@vce+6*6 z({l*%b)aK=*B>w%1Vah3#;R*0_op=qZKB}KIBd`=I0@rH|zVGEC;^t8O@FH$~-^(F# z(j6*>FwGp}NTv58q!+;{+!Z6}X1qm==AV~=B)6cOMvPgie@X_$aZ=A*+;LKf4AvVm zOQxsGS_Mv)T_u;niad9ZXIgU~Xxl+?lS9i0DJ=X2*qbAfgXD)76o)&WJDW;WUZobv*wUDEbSk=w_#Q P00000NkvXXu0mjfr;+>r literal 0 HcmV?d00001 diff --git a/src/FeaturesPlugin/doc/images/measurement.png b/src/FeaturesPlugin/doc/images/measurement.png new file mode 100644 index 0000000000000000000000000000000000000000..c93fa62b2b98672db4c8386f5925ac32202d799d GIT binary patch literal 392 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf2?p zUk71ECym(^Ktah8*NBqf{Irtt#G+J&^73-M%)IR4Ake!1`2qpOrKN{tEn3VwjvdPNJ7`$cBE!Pza@^l_;$)VKR)<*MEMagz z7OAwRBYfY??{Ck%(<(d6l(2b*%>@U4{YXXuQ_j{BX@~XStLl5jSxRE3`uxu)YiCuwOP}%3!Sd6}3yfwCRR|1ybKc4;`|9)G{yVrFe)Z3(- g@3}e%|CRp08`+SgP-||@2n;m_Pgg&ebxsLQ00i-yHUIzs literal 0 HcmV?d00001 diff --git a/src/FeaturesPlugin/doc/images/pipe.png b/src/FeaturesPlugin/doc/images/pipe.png new file mode 100644 index 0000000000000000000000000000000000000000..3ce55e8f60964159aeeafa1d9311d5a6e0485600 GIT binary patch literal 884 zcmV-)1B?8LP)H9e#8=3=t914vLg2R{piNViNlSlXTZ(ro zwcsSqy)e_cUpK{!P4L~Flk=SSyho6s*IuUW+uQX1@+W@*u&mX!C}baVaCW;~y2odD z)7F%&C6lR?5Ta`;9Y3tkz%`4hKF}QqG6plv9f}K{jby1RL9Ply-SxYc?<^d8V0MDS9^pMVI81(J?(oN zL>)lkJlu`7;?VUU)um7<^wZ7g@X~>+m(zK<`L3MoZ1K>xR4f)tdJRJ>Eh$at0C_pG zcswE$ES%$ZyE)f=VNwS; z)8o87cP{zsYvdNGiRjS}oVLpCd+S$(%bx)dLJ*uEAUHqpSd<6xxcTUbuhhz;MFEUk zBTi)5u6+lVS3cMN(&{z&%%UHD9!cE4|Mw>XVAp02z59kdcBV&kM)UUPHf?U$xHw#% zH5>fv@1xV_dd~M<|M0yQy|#+A@9dC=&t6gkw{rGbtvhz^DGUVl+2FC5nLOLo*?r@q zjyC~hWx1@Mh?Dwk$lqR4ys-XBFhK9czMD4|82tJxq9flYE!#p0Nv_|oRaI1KWs6F& zEGwG1Q~(qgvhtn^n&EYg!(-;%>`YTY1Ka>olgev&yYKX$Z#6Zbzjr*+KS%xJdRib(I%!8F5{VZwFZkcXR3Fd^bht_FDX80ON`a zILhhDB(%&T;a~fCmXVkcFi*krLhvk52IL61CQwJlBNsa|nSTKpy9xrlrc?(20000< KMNUMnLSTYG*Ptf= literal 0 HcmV?d00001 diff --git a/src/FeaturesPlugin/doc/images/pipe_binormal_32x32.png b/src/FeaturesPlugin/doc/images/pipe_binormal_32x32.png new file mode 100644 index 0000000000000000000000000000000000000000..560183f15a7faead6d995b21571fea185f1daa58 GIT binary patch literal 2148 zcmV-q2%GnbP)qv-8#mE*{Z50 zs+tnRh{=K=^nqBf$LslAc6*NXBuE!gQlj2Z0GU>h7j(+WY><9jo;q zn;6l$492z1Am{;_21PkwT(-^-%8)9E+cW3QGZd~Vn6h&KNH!g%TL+=rU_dN3w1A#l+=GwaVpJRg7t@VxINO?Q0{81?%!xK77z^qe>gi%#EuwT$l#)DcQm3-4p#E|L{@;y66AjL3)x zZ?r+L#l^%jMdN&M(5?**4U?kE;j*G)Y1TK@wfT>RwYJ^37pbVwUpet)02*;PIYCdH z+?@Czfnorj!WH%R01ED@Vi8h!I3!6z?!!5>GW!v9-s(bQbCcA5v%_N_uxqj`^B6-k z=FXlYJ~(qWn>}+DA|oOh05mpTy(d5eKS!YJAbx^0^m0PE2J{LdvLUMvXvF3bvD(0_ zurQjRVouiiYej_g)HI~0rV)UMNoz5N!J$FTFTi%P^m#v1R3w<}GKhFm_ot;D06GAi z9(SH3G5p6_nVC~>|8Zz-Ya5<$4FSMBs3eRHMXK($<7F}Fy9Gor}bdiz&k@Jy}5ga^n*y(b(e>T1ZBnk9BIHrSe&YHcb z#7CHO*UyiEzUkp_FJJNcuU^q7#Koh$>I8oI+HX*6nfiyw?eXBvw{|+bviw%}$&YG- zK18P6!fhaIBESv}YaF}Z=?8#ms~#^1lce&EPyHw^e`TJ?7(=(sihYOw3H!hR+B$Ax z$-+fnnF*KMh3$WO(_yt)4|N?sv;_eC0+Lp)`z|MX4*=)Hi)<&$Y5>5zYW=q)Dg5ZK zUwBdf;Ow~s0IH_qjh#Et-D3p+I9*O$YrT%_rOUur$i9Zt<-+fFyy39gYE1xRcB7A)}HSAu44zE8_)Uj_2lS;ev9H_%}44YqM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lmRMBe{00000NkvXXu0mjfg&%iW literal 0 HcmV?d00001 diff --git a/src/FeaturesPlugin/doc/images/pipe_simple_32x32.png b/src/FeaturesPlugin/doc/images/pipe_simple_32x32.png new file mode 100644 index 0000000000000000000000000000000000000000..b746e6c74ae020833eceb437b8471b78ef0e124e GIT binary patch literal 1745 zcmV;?1}^!DP)4I-$bvYi zs_N+2*l;i~cHZmt?(IFY|3d&AlYn$r#Zq0T*8tVQ0%>3<07puuGmlMh3!Z+?m6@6K z#^#NiGHe#>eX(xexn0zG{-bBl0Fa^yh|ig~9n4<=QTp^e z>K^Ux+5-UDPkj04OV97jGR2vuk7bI7Gdm})XvNBu?Ck7SJ>F{@mE8QRcP^a!G^&7+ z?yi&O+y(6nEFyvhfHEaLsB5IVs}9A*a=JD3ccn#7#?(*AR+}hVzS8dZ`(2uSZb-~T z_8f0Gt!i)q2;6I9()<9BW=L6OHpO3Q|KPM1ivR#1B0N*EA+>Np!OJrWu$5I?6d8vB zqzK~6U|f#`f#d@Ki#6dp+iJGHcjoNb8)wdT#w-E=HdSs&i+Tj_{!vdv~ALH8GWWOM|t@7<%`*EkMWWhv|203Zp#u}~P*gC`mXBZQ^f z4bDdczg=9gDDSyvYc5CIo6k3BJk`;b-|KceCD~w-1Suerz+g=ahrl%G^AFyfA|R!# zVj}_j04N~r@!Uz>hR#2!k;;@*=iBXxuWejkHL!fy7d;OyadZSjW6}?QUh9kuqO{fP zO7wpxf5p?%xC@h}R?hlOYf~R_ytwn5-~Ko$$r74PasYU3RC3*3dICFyO7vKNZ^XLB?$^Uk+A*bnZ^X)5*dv^d6zXgP^g8^o|jM`d#vI8ZB zzP6@p&46Ms=+nfD86i~_yZ`uyLU*70;MInGyC>G=&LH^sC*kF76xX`%%xk^`|D=gls_8_(#4vopYSYlrY=U*VVt}?7wyEH}@t7 z03mdYcQlbOM4gtg;-8;fRBkla{e3!{2#c^A0Em%?+S(~weXP9PC`ho z0;8iNNq@$qrA z^%xYz5X{Sc?8@WLJh#yxS)y?xfl|vVIsq&J(+i&C4ZojQ&#&52r?Fn{ANJeEJxFK9 zB>_GL@MjF%W)cC3*#Xc(5~4(7-3jLL%}GL&N&a*1;reYe3P>rfC?|n;3Gj^>Rp-z< z@Av><&Qq1A!_3PG@G)VB9H$-VYi=H$sR96yy1Jr5lBL%*O-lu!Dv}|s_sIVHjv~@v zw^|zyF>rzbTU<~spI8s;$Q);Kji;q?Uo6Q1z;nE@vH!>c2N8S#4B>F_bJOvrbhspA zD*-=N4WY=LCDPjgfOWi?vbwUy;c}T{5#VrD7C2U~Z)JuJgpoj;HtkJ#;7c}RMYSnp zRyzO`0ssSH!T1Lgp9G5mknUv?0b;g;VJBdT4ipn%;txWA1V4TAXjAilBme+VTPqxG z=eIKHKLAl4m>)PB2=FoZElHPt-QW85^%-~%hvf3|BtzIxtg}=|giJ8f0bL=8erBx~ nB>IJ>of>$r`NG4-{-5AqzMgoUT`yhM00000NkvXXu0mjfp!GyP literal 0 HcmV?d00001 diff --git a/src/FeaturesPlugin/doc/measurementFeature.rst b/src/FeaturesPlugin/doc/measurementFeature.rst index 9f999a097..7fc7b9667 100644 --- a/src/FeaturesPlugin/doc/measurementFeature.rst +++ b/src/FeaturesPlugin/doc/measurementFeature.rst @@ -2,6 +2,51 @@ Measurement =========== +The feature **Measurement** calculates dimensions of sub-elements of a geometrical object (shape). + +The measured dimension is displayed in the property panel and shown in 3D OCC viewer. + +The properties of dimension text and line, such as font, color, arrow size, etc. can be defined in the Preferences :ref:`visualization_preferences`. + +**Apply** button does not generate any result and has the same effect as **Cancel** for this feature. + +To start Measurement in the active part: + +#. select in the Main Menu *Part - > Measurement* item or +#. click **Measurement** button in the toolbar + +.. image:: images/measurement.png + :align: center + +.. centered:: + **Measurement** button + +The following dimensions can be calculated: + + .. image:: images/meas_length_32x32.png + :align: left + edge length + + .. image:: images/meas_distance_32x32.png + :align: left + distance between objects + + .. image:: images/meas_radius_32x32.png + :align: left + radius + + .. image:: images/meas_angle_32x32.png + :align: left + angle between edges + + .. image:: images/meas_angle3p_32x32.png + :align: left + angle by 3 points + +Edge length +----------- + +The length can be measured for straight or curved edge built on two points. .. image:: images/Measurement1.png :align: center @@ -9,15 +54,40 @@ Measurement .. centered:: Edge length +Input fields: + +- **Edge** contains edge to be measured selected in 3D OCC viewer or object browser. +Note, that for curved edges length is displayed only in the property panel. -.. image:: images/Measurement2.png +**TUI Command**: *length =model.measureLength(Part_doc, edge)* + +**Arguments**: part + edge in format *model.selection("EDGE", edge)*. + + +Distance between objects +------------------------ + +**Distance between objects** calculates minimal distance for any pair of shapes: vertex, edge, face, solid. + + .. image:: images/Measurement2.png :align: center .. centered:: Distance between objects +Input fields: + +- **From**, **To** contain shapes between which distance is measured. Shapes are selected in 3D OCC viewer or object browser. +**TUI Command**: *length =model.measureDistance(Part_doc, shape1, shape2)* + +**Arguments**: part + 2 shapes in format *model.selection("TYPE", shape)*. + +Radius +------ + +**Radius** calculates radius for circular edge or cylindrical face. .. image:: images/Measurement3.png :align: center @@ -25,7 +95,19 @@ Measurement .. centered:: Radius +Input fields: + +- **Object** contains shape to be measured selected in 3D OCC viewer or object browser. + +**TUI Command**: *radius = model.measureRadius(Part_doc, shape)* + +**Arguments**: part + shape in format *model.selection("TYPE", shape)*. + +Angle between edges +------------------- + +**Angle between edges** calculates angle between the selected pair of edges in the point of intersection. If there are several points of intersection, then angles are calculated in all points. .. image:: images/Measurement4.png :align: center @@ -33,10 +115,30 @@ Measurement .. centered:: Angle between edges +Input fields: + +- **First Edge**, **Second edge** contain edges between which angle is measured. Edges are selected in 3D OCC viewer or object browser. + +**TUI Command**: *angle = model.measureAngle(Part_doc, edge1, edge2)* + +**Arguments**: part + 2 edges in format *model.selection("EDGE", edge)*. +Angle by 3 points +----------------- + +**Angle by 3 points** calculates angle between the selected three points. The second point is in the corner of the angle. .. image:: images/Measurement5.png :align: center .. centered:: Angle by 3 points + +Input fields: + +- **First point**, **Second point**, **Third point** contain point between which angle is measured. Points are selected in 3D OCC viewer or object browser. + +**TUI Command**: *angle = model.measureAngle(Part_doc, vertex1, vertex2, vertex3)* + +**Arguments**: part + 3 vertices in format *model.selection("VERTEX", vertex)*. + \ No newline at end of file diff --git a/src/FeaturesPlugin/doc/pipeFeature.rst b/src/FeaturesPlugin/doc/pipeFeature.rst index 0ec31da4d..383eca0bb 100644 --- a/src/FeaturesPlugin/doc/pipeFeature.rst +++ b/src/FeaturesPlugin/doc/pipeFeature.rst @@ -2,23 +2,130 @@ Pipe ==== +The feature **Pipe** makes an extruded Pipe shape. + +To create Pipe in the active part: + +#. select in the Main Menu *Features - > Pipe* item or +#. click **Pipe** button in the toolbar + +.. image:: images/pipe.png + :align: center + +.. centered:: + **Pipe** button + +Pipe can be created in three different ways: + + .. image:: images/pipe_simple_32x32.png + :align: left + by object and path + + .. image:: images/pipe_binormal_32x32.png + :align: left + by object, path and Bi-normal + + .. image:: images/pipe_locations_32x32.png + :align: left + by object, path and locations + +Pipe by object and path +----------------------- + +Base Objects are extruded along the Path Object so that the angle between the normal vector to the base shape and the tangent to the path remain constant at any point of the given path. .. image:: images/Pipe1.png :align: center .. centered:: - Pipe by object and path + Pipe by object and path property panel + +Input fields: + +- **Base objects** panel contains shapes to be extruded. Several Base Objects generate several pipes. Shapes (edges, faces, shells) are selected in 3D OCC viewer or object browser; +- **Path object** defines path along which the Base Object will be extruded. **Path object** (edge or wire) is selected in 3D OCC viewer or object browser; + +**TUI Command**: *model.addPipe(Part_doc, [shape], path)* + +**Arguments**: part + list of shapes in format *model.selection(TYPE, shape)* + path in format *model.selection(TYPE, shape)*. + +Result +"""""" + +Result of extrusion of arc along another arc. + +.. image:: images/simplePipe.png + :align: center + +.. centered:: + Pipe by object and path + +**See Also** a sample TUI Script of a :ref:`tui_simple_pipe` operation. +Pipe by object, path and Bi-normal +---------------------------------- + +The pipe is generated to preserve the constant angle between the normal vector to the base shape and the BiNormal vector at any point of the given path. .. image:: images/Pipe2.png :align: center .. centered:: - Pipe by object, path and Bi-normal + Pipe by object, path and Bi-normal property panel + +Input fields: + +- **Base objects** panel contains shapes to be extruded. Several Base Objects generate several pipes. Shapes (edges, faces, shells) are selected in 3D OCC viewer or object browser; +- **Path object** defines path along which the Base Object will be extruded. **Path object** (edge or wire) is selected in 3D OCC viewer or object browser; +- **Bi-Normal** defines the BiNormal Vector. **Bi-Normal** (edge or wire) is selected in 3D OCC viewer or object browser. + +**TUI Command**: *model.addPipe(Part_doc, [shape], path, binormal)* + +**Arguments**: part + list of shapes in format *model.selection(TYPE, shape)* + path in format *model.selection(TYPE, shape)* + binormal in format *model.selection(TYPE, shape)*. + +Result +"""""" + +Result of extrusion of rectangular face along arc. + +.. image:: images/binormalPipe.png + :align: center + +.. centered:: + Pipe by object and path + +**See Also** a sample TUI Script of a :ref:`tui_binormal_pipe` operation. +Pipe by object, path and locations +---------------------------------- + +The pipe is generated to preserve selected profiles at the specified locations along path. .. image:: images/Pipe3.png :align: center .. centered:: - Pipe by object, path and locations + Pipe by object, path and locations property panel + +Input fields: + +- **Base objects** panel contains shapes to be extruded. Shapes (edges, faces, shells) are selected in 3D OCC viewer or object browser; +- **Path object** defines path along which the Base Object will be extruded. **Path object** (edge or wire) is selected in 3D OCC viewer or object browser; +- **Locations** define list of vertices that specify the locations of extruded Base Objects on the resulting Path Object. The number of Base Objects should be equal to the number of Locations. + +**TUI Command**: *model.addPipe(Part_doc, [shape], path, locations)* + +**Arguments**: part + list of shapes in format *model.selection(TYPE, shape)* + path in format *model.selection(TYPE, shape)* + list of locations in format *model.selection(TYPE, shape)*. + +Result +"""""" + +Result of extrusion of 3 circles along arc with specified locations. + +.. image:: images/locationPipe.png + :align: center + +.. centered:: + Pipe by object, path and locations + +**See Also** a sample TUI Script of a :ref:`tui_locations_pipe` operation. \ No newline at end of file -- 2.39.2