# include Veclib stuff... set path [get3DEInstallPath] source $path/user_data/tcl_archive/veclib.tcl # open 3DE's TCL console window open3DEConsole # get selected pointgroup set pg [getSelectedPGroup] if {$pg==0} then \ { print3DEConsole "Error, there is no pointgroup selected!\n" return } # check if enough calculated points are available set no_points 0 for {set p [getFirstPoint $pg]} {$p!=0} {set p [getNextPoint $pg $p]}\ { if {[isPointCalculated3D $pg $p]} then \ { set no_points [expr $no_points+1] } } if {$no_points<4} then \ { print3DEConsole "Error, there are not enough calculated points (4 points minimum)!\n" return } # "bake" all calculated points using the current state of "scene node" set global_pos [getScenePosition3D] set global_rot [getSceneRotation3D] set global_scale [getSceneScale3D] for {set p [getFirstPoint $pg]} {$p!=0} {set p [getNextPoint $pg $p]}\ { if {[isPointCalculated3D $pg $p]} then \ { set pos_calc [getPointCalcPosition3D $pg $p] # transform point's original calculated position using "scene node" set pos_new [vec3+vec3 [s*vec3 $global_scale [mat3*vec3 $global_rot $pos_calc]] $global_pos] # fill point's user-defined position with the transformed position setPointPosition3D $pg $p $pos_new # set point to "SURVEY EXACT" to "bake" it setPointSurveyType $pg $p SURVEY_EXACT } } print3DEConsole "\nOk, done.\n" print3DEConsole "\nNow, please execute 'Main Window::Calc::Calc All Objects From Scratch'...\n\n"