2019-04-23
02:23 AM
- last edited on
2022-05-05
06:51 AM
by
Gordana Radonic
2019-06-13 03:59 AM
2019-06-13 06:35 PM
!!! Pull Complex Profile !!! COMPTYPE_CORE = 0 COMPTYPE_FINISH = 1 COMPTYPE_OTHER = 2 if GLOB_SCRIPT_TYPE = 2 or GLOB_SCRIPT_TYPE = 3 or GLOB_SCRIPT_TYPE = 5 then _nComponents = 0 dim _componentTypes[] n = REQUEST{2} ("Profile_components", myProfileIdx, _nComponents, _componentTypes) n2 = REQUEST ("Profile_default_boundingbox", myProfileIdx, _xMin, _yMin, _xMax, _yMax) n3 = REQUEST{4} ("Profile_component_info", myProfileIdx, _nComponents, "gs_profile_surface", bMat_profile) If rafPro = "Complex" then ProWidth = abs(_xMax - _xMin) ProHeight = abs(_yMax - _yMin) SquareV2 = ProHeight / ( cos(phi) ) endIf if n then dim _bShowPart[] _needRequestDetails = 0 for _i = 1 to _nComponents _bShowPart[_i] = 1 if GLOB_STRUCTURE_DISPLAY = 1 AND _componentTypes[_i] <> COMPTYPE_CORE then _bShowPart[_i] = 0 ! GLOB_STRUCTURE_DISPLAY: 0 – entire structure, 1 – core only, 2 – without finishes if GLOB_STRUCTURE_DISPLAY = 2 AND _componentTypes[_i] = COMPTYPE_FINISH then _bShowPart[_i] = 0 if _bShowPart[_i] then _needRequestDetails = 1 next _i if _needRequestDetails then dim _profileGeometryRawData[] n = REQUEST ("Profile_default_geometry", myProfileIdx, _profileGeometryRawData) ! n1, n2, ..., nn, x11, y11,s11 dim _contStartPoints[] dim _contEndPoints[] _contStartPoints[1] = _nComponents + 1 for _i = 2 to _nComponents _contStartPoints[_i] = _contStartPoints[_i - 1] + _profileGeometryRawData[_i - 1] * 5 _contEndPoints[_i-1] = _contStartPoints[_i] - 1 next _i _contEndPoints[_nComponents] = vardim1(_profileGeometryRawData) endif endif endif !!! Pull Complex Profile 2 !!! if GLOB_SCRIPT_TYPE = 2 or GLOB_SCRIPT_TYPE = 3 or GLOB_SCRIPT_TYPE = 5 then _nComponents2 = 0 dim _componentTypes2[] n = REQUEST{2} ("Profile_components", myProfileIdx2, _nComponents2, _componentTypes2) n2 = REQUEST ("Profile_default_boundingbox", myProfileIdx2, _xMin2, _yMin2, _xMax2, _yMax2) if n then dim _bShowPart2[] _needRequestDetails = 0 for _i2 = 1 to _nComponents2 _bShowPart2[_i2] = 1 if GLOB_STRUCTURE_DISPLAY = 1 AND _componentTypes2[_i2] <> COMPTYPE_CORE then _bShowPart2[_i2] = 0 ! GLOB_STRUCTURE_DISPLAY: 0 – entire structure, 1 – core only, 2 – without finishes if GLOB_STRUCTURE_DISPLAY = 2 AND _componentTypes2[_i2] = COMPTYPE_FINISH then _bShowPart2[_i2] = 0 if _bShowPart2[_i2] then _needRequestDetails = 1 next _i2 if _needRequestDetails then dim _profileGeometryRawData2[] n = REQUEST ("Profile_default_geometry", myProfileIdx2, _profileGeometryRawData2) ! n1, n2, ..., nn, x11, y11,s11 dim _contStartPoints2[] dim _contEndPoints2[] _contStartPoints2[1] = _nComponents2 + 1 for _i2 = 2 to _nComponents2 _contStartPoints2[_i2] = _contStartPoints2[_i2 - 1] + _profileGeometryRawData2[_i2 - 1] * 5 _contEndPoints2[_i2-1] = _contStartPoints2[_i2] - 1 next _i2 _contEndPoints2[_nComponents2] = vardim1(_profileGeometryRawData2) endif endif endif
2019-06-15 09:57 AM
2019-06-16 06:24 PM
2019-06-17 05:53 AM
2019-06-17 07:53 AM
2019-06-17 06:10 PM
2019-06-19 09:23 PM
2019-06-19 09:40 PM
2019-06-20 06:47 PM
dim pfsj2[] pen 1 for i = 1 to MULTIPLECO_A jdsl=0 !Calculate the number of points !----------------------------get profile number and geometry n = request{2}("Profile_components", myProfileIdx, jmsl, jglx) !profile number n = REQUEST ("Profile_default_geometry", myProfileIdx, pfsj2) !profile geometry if jmsl>0 then for i2 = 1 to jmsl !------------------------------------Collection point n = REQUEST{3} ("Profile_component_info", myProfileIdx, i2, "gs_profile_surface", _surface) !MAT for i3 = 1 to pfsj2[i2] jdsl=jdsl+1 !Calculate the number of points x=pfsj2[jmsl+5*jdsl-5+1] y=pfsj2[jmsl+5*jdsl-5+2] if pfsj2[jmsl+5*jdsl]=900 then sn = 900 if pfsj2[jmsl+5*jdsl]=4000 then sn = 4015 if pfsj2[jmsl+5*jdsl]=-1 then sn = -1 if pfsj2[jmsl+5*jdsl]=0 then sn = 15 put x,y,sn,_surface next i3 !------------------------------------MODEL SPRISM_{4} _surface,_surface,_surface,1+2+4+8, nsp/4, 0, 0, 0, 1,1,0, 0, 0, 0, 1,0,0, get(nsp) next i2 endif next i
2019-06-20 08:00 PM
2019-06-20 08:23 PM
Lingwisyer wrote:
The issue with using an array in the parameters to define the profile is that the selection can only be done byindexrather than by drop down and since you cannot view the index numbersanywhere other than the Attribute Manager, this is not a viable option. If we were able to use requests in the Parameter Scriptthis could have worked as then you could have a second and third dummie parameter with one being a standard profile selection, and the other displaying the index numberof the selected profile, but alas, this is not the case...
If you can modify parameter arrays via theUI Scriptthis might be possible, as requests work there. The extra work here may as well be used to duplicate standard profile parameters with additional HIDEPARAMETERstatements.
Ling.
2019-06-20 08:37 PM
2019-06-26 01:42 AM