- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
[ FlexSim 18.0.1 ]
I tried to draw a sphere from an overridden onDraw in a module. So I created a very simple class:
class Test : public BasicFR { public: double onDraw( TreeNode* view ) override { double result = BasicFR::onDraw( view ); drawtomodelscale( this->holder ); drawsphere( 0.5, 0.5, 0.5, 1, 255, 0, 0, 0.5 ); return result; } };
When I create an instance of the class in FlexSim, everything looks fine initially, but when I resize the object the sphere stretches with the y- and z-directions:
(Also note how the sphere does not seem to be centered around the specified coordinate).
To see the desired result, create a BasicFR in the model and give it the following Custom Draw trigger:
drawtomodelscale( current ); drawsphere( 0.5, 0.5, 0.5, 1, 0, 0, 255 );
Notice that when you resize the object, the sphere stays spherical and the same absolute size.
Is this a bug or am I missing something?
(Side note: I tried downloading a new flexsimcontent but the BitBucket repository seems to be missing some files, and both the Dev and the Stable versions on the CI server crash 18.0.1 on startup for me).
Solved! Go to Solution.