SOLVED!
How do I use the Profile parameter in a GDL script.
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2020-11-24 08:20 PM - last edited on ‎2021-09-15 09:29 AM by Noemi Balogh
‎2020-11-24
08:20 PM
I'm new to GDL, I can create basic shapes and write basic code, like IF statements, but I can't figure out how to create a shape using the Profile parameter to inform the geometry. Any help would be most appreciated.
Solved! Go to Solution.
Labels:
- Labels:
-
Library (GDL)
1 ACCEPTED SOLUTION
Accepted Solutions
Solution
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2020-11-25 02:30 AM
‎2020-11-25
02:30 AM
If GLOB_SCRIPT_TYPE = 2 or GLOB_SCRIPT_TYPE = 3 or GLOB_SCRIPT_TYPE = 4 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 GLOB_SCRIPT_TYPE <> 5 then If rafPro = "Complex" then ProWidth = abs(_xMax - _xMin) ProHeight = abs(_yMax - _yMin) SquareV2 = ProHeight / ( cos(phi) ) endIf 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
There is a sample object somewhere by Graphisoft, but it appears to be alluding me...
There is also an object shared in this thread which is in regards to having multiple
Ling.
AC22-28 AUS 3001 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win10 | R5 2600 | 16GB | GTX1660 |
4 REPLIES 4
Solution
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2020-11-25 02:30 AM
‎2020-11-25
02:30 AM
If GLOB_SCRIPT_TYPE = 2 or GLOB_SCRIPT_TYPE = 3 or GLOB_SCRIPT_TYPE = 4 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 GLOB_SCRIPT_TYPE <> 5 then If rafPro = "Complex" then ProWidth = abs(_xMax - _xMin) ProHeight = abs(_yMax - _yMin) SquareV2 = ProHeight / ( cos(phi) ) endIf 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
There is a sample object somewhere by Graphisoft, but it appears to be alluding me...
There is also an object shared in this thread which is in regards to having multiple
Ling.
AC22-28 AUS 3001 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win10 | R5 2600 | 16GB | GTX1660 |
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2020-11-25 04:07 PM
‎2020-11-25
04:07 PM
Lingwisyer wrote:Check out this thread: Profiles in GDL.
There is a sample object somewhere by Graphisoft, but it appears to be alluding me...
David
David Maudlin / Architect
www.davidmaudlin.com
Digital Architecture
AC28 USA • Mac mini M4 Pro OSX15 | 64 gb ram • MacBook Pro M3 Pro | 36 gb ram OSX14
www.davidmaudlin.com
Digital Architecture
AC28 USA • Mac mini M4 Pro OSX15 | 64 gb ram • MacBook Pro M3 Pro | 36 gb ram OSX14
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2020-12-03 08:32 PM
‎2020-12-03
08:32 PM
Thanks for the help. Lingwisyer, I couldn't get the code you posted to work but the one in the link regarding 'multiple Complex Profiles' works great. Thank you:
Lingwisyer wrote:
There is also an object shared in this thread which is in regards to having multipleComplex Profilesin a single object.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2020-12-04 02:24 AM
‎2020-12-04
02:24 AM
For the script I posted, you need to add myProfileIdx as a profile variable into the parameters list.
I also accidentally left in a section that was specific to my script...
Ignore:
Ling.
I also accidentally left in a section that was specific to my script...
Ignore:
If GLOB_SCRIPT_TYPE <> 5 then If rafPro = "Complex" then ProWidth = abs(_xMax - _xMin) ProHeight = abs(_yMax - _yMin) SquareV2 = ProHeight / ( cos(phi) ) endIf endIf
Ling.
AC22-28 AUS 3001 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win10 | R5 2600 | 16GB | GTX1660 |