From 20700edd8340890c3cafe1385f508893b0296644 Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Wed, 23 Aug 2023 18:23:13 +0200 Subject: [PATCH] #3538 Mesh_tool_ApplySurface with Freeplane --- bbtk/bbs/boxes/FreePlane.bbg | 13 +- bbtk/bbs/boxes/FreePlane.bbs | 1 + bbtk/bbs/boxes/Mesh_Application.bbg | 11 +- bbtk/bbs/boxes/Mesh_Application.bbs | 1 + bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbg | 183 +++++++++++++++++++--- bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbs | 53 ++++++- 6 files changed, 236 insertions(+), 26 deletions(-) diff --git a/bbtk/bbs/boxes/FreePlane.bbg b/bbtk/bbs/boxes/FreePlane.bbg index 14aa48d..eb1ea4b 100644 --- a/bbtk/bbs/boxes/FreePlane.bbg +++ b/bbtk/bbs/boxes/FreePlane.bbg @@ -10,7 +10,7 @@ AUTHOR:Author ?? COMPLEXBOX:TRUE COMPLEXBOXNAME:FreePlane PACKAGENAME:creaMaracasVisu -COMPLEXOUTPUTS:3 +COMPLEXOUTPUTS:4 COMPLEX_PORT widgetOut -62.602729:-39.249279:-900.000000 @@ -23,6 +23,10 @@ COMPLEX_PORT transform -86.142372:-39.145142:-900.000000 FIN_COMPLEX_PORT +COMPLEX_PORT +boxChange +-109.488119:-40.220094:-900.000000 +FIN_COMPLEX_PORT COMPLEXINPUTS:5 COMPLEX_PORT possiblePoint @@ -151,7 +155,7 @@ BOX creaMaracasVisu:wxVtkBaseView_Info:Box13 ISEXEC:FALSE -111.883479:102.655690:-900.000000 --84.603479:100.155690:-900.000000 +-82.843479:100.155690:-900.000000 PORT InteractionType:"12" FIN_BOX @@ -221,7 +225,7 @@ ISEXEC:FALSE PORT Active:"true" FIN_BOX -CONNECTIONS:45 +CONNECTIONS:46 CONNECTION Box02:Out:Box04:In NumberOfControlPoints:0 @@ -357,4 +361,7 @@ NumberOfControlPoints:0 CONNECTION Box08:Out:actualPoint:actualPoint NumberOfControlPoints:0 +CONNECTION +Box16:BoxChange:boxChange:boxChange +NumberOfControlPoints:0 APP_END diff --git a/bbtk/bbs/boxes/FreePlane.bbs b/bbtk/bbs/boxes/FreePlane.bbs index 8e8da14..ebc297d 100644 --- a/bbtk/bbs/boxes/FreePlane.bbs +++ b/bbtk/bbs/boxes/FreePlane.bbs @@ -136,6 +136,7 @@ input wxvtkbaseview3 Box13.wxVtkBaseView3 " " output widgetOut Box01.Widget " " output transform Box16.Out " " output actualPoint Box08.Out " " +output boxChange Box16.BoxChange " " endefine diff --git a/bbtk/bbs/boxes/Mesh_Application.bbg b/bbtk/bbs/boxes/Mesh_Application.bbg index 6dc3659..77470ee 100644 --- a/bbtk/bbs/boxes/Mesh_Application.bbg +++ b/bbtk/bbs/boxes/Mesh_Application.bbg @@ -93,7 +93,7 @@ BOX creaMaracasVisu:Mesh_tool_ApplySurface:Box10 ISEXEC:FALSE 96.015874:6.767522:-900.000000 -119.040874:4.267522:-900.000000 +120.535874:4.267522:-900.000000 PORT title:"Surface" FIN_BOX @@ -704,8 +704,8 @@ FIN_BOX BOX creaMaracasVisu:FreePlane:Box117 ISEXEC:FALSE -52.844216:10.901732:-900.000000 -74.539216:8.401732:-900.000000 +56.413835:68.564815:-900.000000 +78.108835:66.064815:-900.000000 FIN_BOX BOX wx:LayoutTab:Box118 @@ -861,7 +861,7 @@ ISEXEC:FALSE -80.144058:-47.284744:-900.000000 -58.064058:-49.784744:-900.000000 FIN_BOX -CONNECTIONS:253 +CONNECTIONS:254 CONNECTION Box08:MeshBase:Box15:polydata NumberOfControlPoints:0 @@ -1621,4 +1621,7 @@ NumberOfControlPoints:0 CONNECTION Box140:BoxChange:Box47:boxChange NumberOfControlPoints:0 +CONNECTION +Box117:boxChange:Box10:freeplane_boxexecute +NumberOfControlPoints:0 APP_END diff --git a/bbtk/bbs/boxes/Mesh_Application.bbs b/bbtk/bbs/boxes/Mesh_Application.bbs index c8d790a..c859174 100644 --- a/bbtk/bbs/boxes/Mesh_Application.bbs +++ b/bbtk/bbs/boxes/Mesh_Application.bbs @@ -556,6 +556,7 @@ connect Box140.BoxChange Box139.In1 connect Box139.BoxChange Box17._execute connect Box47.ChangePosition Box139.In2 connect Box140.BoxChange Box47.boxChange +connect Box117.boxChange Box10.freeplane_boxexecute # Complex input ports input MeshIn Box56.In " " diff --git a/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbg b/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbg index c1ab214..2fd7de9 100644 --- a/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbg +++ b/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbg @@ -19,7 +19,7 @@ COMPLEX_PORT Active_ConcatString_box -271.929156:-187.297517:-900.000000 FIN_COMPLEX_PORT -COMPLEXINPUTS:12 +COMPLEXINPUTS:13 COMPLEX_PORT boxChange -6.086529:137.355528:-900.000000 @@ -68,7 +68,11 @@ COMPLEX_PORT freeplane_point -349.159524:124.829268:-900.000000 FIN_COMPLEX_PORT -BOXES:97 +COMPLEX_PORT +freeplane_boxexecute +-429.956822:123.049578:-900.000000 +FIN_COMPLEX_PORT +BOXES:107 BOX creaMaracasVisu:ShowNPoints:showNpoints ISEXEC:FALSE @@ -82,8 +86,8 @@ FIN_BOX BOX creaVtk:CreateMeshFromPoints:Box04 ISEXEC:FALSE -28.357215:-1.010813:-900.000000 -51.212215:-3.510813:-900.000000 +28.620709:-1.010813:-900.000000 +51.475709:-3.510813:-900.000000 FIN_BOX BOX creaMaracasVisu:ManualContourModel_Box:Box06 @@ -176,8 +180,8 @@ FIN_BOX BOX vtk:ImageVtkProperties:Box68 ISEXEC:FALSE --111.766259:110.196821:-900.000000 --89.231259:107.696821:-900.000000 +-102.915963:102.233618:-900.000000 +-80.380963:99.733618:-900.000000 FIN_BOX BOX std:VectorFilterDouble:Box70 @@ -190,8 +194,8 @@ FIN_BOX BOX creaVtk:BooleanOperationPolyDataFilter:Box77 ISEXEC:FALSE --87.438358:-22.902762:-900.000000 --63.708358:-25.402762:-900.000000 +-87.438358:-24.762722:-900.000000 +-63.708358:-27.262722:-900.000000 PORT BoxProcessMode:"Manual" PORT @@ -226,8 +230,8 @@ FIN_BOX BOX std:MagicBox:Box66 ISEXEC:FALSE --148.055989:80.219744:-900.000000 --126.455989:77.719744:-900.000000 +-381.548793:71.104531:-900.000000 +-359.948793:68.604531:-900.000000 FIN_BOX BOX std:MagicBox:Box67 @@ -360,8 +364,8 @@ FIN_BOX BOX wx:LayoutLine:Box50 ISEXEC:FALSE --16.519831:-71.488479:-900.000000 -16.800169:-73.988479:-900.000000 +-11.437173:-67.034258:-900.000000 +21.882827:-69.534258:-900.000000 PORT Orientation:"V" PORT @@ -396,8 +400,8 @@ FIN_BOX BOX creaMaracasVisu:MeshContours_Widget:Box62 ISEXEC:FALSE --228.707140:-3.136982:-900.000000 --205.912140:-5.636982:-900.000000 +-230.753096:-6.035420:-900.000000 +-207.958096:-8.535420:-900.000000 PORT colorMesh:"1 1 0" FIN_BOX @@ -641,7 +645,7 @@ In0:"Tool - Inverse Normals" PORT In1:"Tool - Join start and end points to current spline" PORT -In2:"Tool - Separate and order contours around axis" +In2:"Tool - Separate and order contours around axis (use Close Spline 2 - Close Surface Off)" FIN_BOX BOX wx:LayoutLine:Box121 @@ -846,8 +850,8 @@ FIN_BOX BOX std:ConcatStrings:Box149 ISEXEC:FALSE --264.972359:60.051985:-900.000000 --242.212359:57.551985:-900.000000 +-380.927327:60.384234:-900.000000 +-358.167327:57.884234:-900.000000 FIN_BOX BOX creaMaracasVisu:InteractorStyleMaracas_Model:Box150 @@ -855,7 +859,87 @@ ISEXEC:FALSE -312.126255:32.135821:-900.000000 -288.411255:29.635821:-900.000000 FIN_BOX -CONNECTIONS:192 +BOX +creaVtk:TransformVector:Box151 +ISEXEC:FALSE +-454.012065:102.149964:-900.000000 +-431.692065:99.649964:-900.000000 +PORT +InX:"0" +PORT +InY:"0" +PORT +InZ:"1" +FIN_BOX +BOX +std:ConcatStrings:Box152 +ISEXEC:FALSE +-463.706669:91.307082:-900.000000 +-440.946669:88.807082:-900.000000 +PORT +In2:" " +PORT +In4:" " +FIN_BOX +BOX +creaVtk:Plane:Box153 +ISEXEC:FALSE +-471.568942:76.533865:-900.000000 +-450.293942:74.033865:-900.000000 +FIN_BOX +BOX +std:MathOperationVector:Box154 +ISEXEC:FALSE +-431.238497:85.752619:-900.000000 +-406.718497:83.252619:-900.000000 +PORT +Type:"2" +FIN_BOX +BOX +creaVtk:Cutter:Box155 +ISEXEC:FALSE +-470.417654:44.098912:-900.000000 +-449.092654:41.598912:-900.000000 +FIN_BOX +BOX +vtk:PolyDataToActor:Box156 +ISEXEC:FALSE +-461.190027:35.481197:-900.000000 +-433.150027:32.981197:-900.000000 +PORT +Colour:"1 1 0" +PORT +Opacity:"0.99" +PORT +Representation:"1" +FIN_BOX +BOX +wx:CheckBox:Box157 +ISEXEC:FALSE +-475.362673:60.923677:-900.000000 +-453.622673:58.423677:-900.000000 +PORT +Title:"Contour free plane" +FIN_BOX +BOX +std:MagicBox:Box158 +ISEXEC:FALSE +-435.728781:115.009171:-900.000000 +-414.018781:112.509171:-900.000000 +FIN_BOX +BOX +vtk:UpdateRender:Box161 +ISEXEC:FALSE +-439.264872:12.410925:-900.000000 +-417.129872:9.910925:-900.000000 +FIN_BOX +BOX +std:Mul:Box162 +ISEXEC:FALSE +-487.258059:52.832968:-900.000000 +-466.173059:50.332968:-900.000000 +FIN_BOX +CONNECTIONS:213 CONNECTION Box06:LstContourPointsX:Box04:LstX NumberOfControlPoints:0 @@ -1432,4 +1516,67 @@ NumberOfControlPoints:0 CONNECTION Box57:InteractorStyleMaracas4:Box150:InteractorStyleMaracas4 NumberOfControlPoints:0 +CONNECTION +Box141:Out:Box151:Transform +NumberOfControlPoints:0 +CONNECTION +Box151:OutX:Box152:In1 +NumberOfControlPoints:0 +CONNECTION +Box151:OutY:Box152:In3 +NumberOfControlPoints:0 +CONNECTION +Box151:OutZ:Box152:In5 +NumberOfControlPoints:0 +CONNECTION +Box152:Out:Box153:Normal +NumberOfControlPoints:0 +CONNECTION +Box142:Out:Box154:In0 +NumberOfControlPoints:0 +CONNECTION +Box154:Out:Box153:Origin +NumberOfControlPoints:0 +CONNECTION +Box68:Spacing:Box154:In1 +NumberOfControlPoints:0 +CONNECTION +Box153:Out:Box155:ImplicitFunction +NumberOfControlPoints:0 +CONNECTION +Box04:Out:Box155:In +NumberOfControlPoints:0 +CONNECTION +Box155:Out:Box156:In +NumberOfControlPoints:0 +CONNECTION +Box157:Widget:Box50:Widget8 +NumberOfControlPoints:0 +CONNECTION +Box66:Out:Box156:Renderer +NumberOfControlPoints:0 +CONNECTION +freeplane_boxexecute:freeplane_boxexecute:Box158:In +NumberOfControlPoints:0 +CONNECTION +Box158:BoxChange:Box156:BoxExecute +NumberOfControlPoints:0 +CONNECTION +Box66:Out:Box161:Renderer +NumberOfControlPoints:0 +CONNECTION +Box156:BoxChange:Box161:BoxExecute +NumberOfControlPoints:0 +CONNECTION +Box162:Out:Box161:Active +NumberOfControlPoints:0 +CONNECTION +Box162:Out:Box155:Active +NumberOfControlPoints:0 +CONNECTION +Box149:Out:Box162:In2 +NumberOfControlPoints:0 +CONNECTION +Box157:Out:Box162:In1 +NumberOfControlPoints:0 APP_END diff --git a/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbs b/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbs index 4fcbd59..625c3c4 100644 --- a/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbs +++ b/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbs @@ -234,7 +234,7 @@ new wx:LayoutLine Box114 new std:AddStringToVector Box115 set Box115.In0 "Tool - Inverse Normals" set Box115.In1 "Tool - Join start and end points to current spline" - set Box115.In2 "Tool - Separate and order contours around axis" + set Box115.In2 "Tool - Separate and order contours around axis (use Close Spline 2 - Close Surface Off)" new wx:LayoutLine Box121 set Box121.Orientation "V" @@ -314,6 +314,36 @@ new std:ConcatStrings Box149 new creaMaracasVisu:InteractorStyleMaracas_Model Box150 +new creaVtk:TransformVector Box151 + set Box151.InX "0" + set Box151.InY "0" + set Box151.InZ "1" + +new std:ConcatStrings Box152 + set Box152.In2 " " + set Box152.In4 " " + +new creaVtk:Plane Box153 + +new std:MathOperationVector Box154 + set Box154.Type "2" + +new creaVtk:Cutter Box155 + +new vtk:PolyDataToActor Box156 + set Box156.Colour "1 1 0" + set Box156.Opacity "0.99" + set Box156.Representation "1" + +new wx:CheckBox Box157 + set Box157.Title "Contour free plane" + +new std:MagicBox Box158 + +new vtk:UpdateRender Box161 + +new std:Mul Box162 + connect Box06.LstContourPointsX Box04.LstX connect showNpoints.lstIndexs Box06.LstIndexsIn @@ -493,6 +523,26 @@ connect Box57.InteractorStyleMaracas2 Box150.InteractorStyleMaracas2 connect Box57.InteractorStyleMaracas3 Box150.InteractorStyleMaracas3 connect Box149.BoxChange Box150.BoxExecute connect Box57.InteractorStyleMaracas4 Box150.InteractorStyleMaracas4 +connect Box141.Out Box151.Transform +connect Box151.OutX Box152.In1 +connect Box151.OutY Box152.In3 +connect Box151.OutZ Box152.In5 +connect Box152.Out Box153.Normal +connect Box142.Out Box154.In0 +connect Box154.Out Box153.Origin +connect Box68.Spacing Box154.In1 +connect Box153.Out Box155.ImplicitFunction +connect Box04.Out Box155.In +connect Box155.Out Box156.In +connect Box157.Widget Box50.Widget8 +connect Box66.Out Box156.Renderer +connect Box158.BoxChange Box156.BoxExecute +connect Box66.Out Box161.Renderer +connect Box156.BoxChange Box161.BoxExecute +connect Box162.Out Box161.Active +connect Box162.Out Box155.Active +connect Box149.Out Box162.In2 +connect Box157.Out Box162.In1 # Complex input ports input mesh Box67.In " " @@ -507,6 +557,7 @@ input wxvtkbaseview1 Box71.In " " input freeplane_transform Box141.In " " input freeplane_point Box142.In " " input point Box145.In " " +input freeplane_boxexecute Box158.In " " # Complex output ports output widget Box08.Widget " " -- 2.47.1