I am trying to draw line between Queue1 and Queue3
and Queue2 and Queue4
Below is the code I am trying. But not sure how to draw line
Attaching the model for refernce
I am trying to draw line between Queue1 and Queue3
and Queue2 and Queue4
Below is the code I am trying. But not sure how to draw line
Attaching the model for refernce
You need to call drawline() from an On Draw trigger.
Attached is your model, modified to draw a line from Queue1 to Queue2 from within Queue1's On Draw trigger.
Hi@Phil BoBo, if I want to draw column between two objects,How can I achieve this ?These two objects can be anywhere in three dimensions .
Here's a start (references a pointer label to 'otherObject'):
drawtomodelscale(current); int numsides=4; double diam=0.2; Object otherObject=current.otherObject; Vec3 fromLoc=current.getLocation(0,0,0).project(current.up,current); Vec3 toLoc=otherObject.getLocation(0,0,0).project(otherObject.up,current); double theta=Math.degrees(Math.atan2(toLoc.y-fromLoc.y,toLoc.x-fromLoc.x)); fglRotate(theta,0,1,0); Vec3 between=toLoc-fromLoc; double theta2=Math.degrees(Math.asin(toLoc.z/between.magnitude)); drawcolumn(fromLoc.x,fromLoc.y,fromLoc.z,numsides,diam,diam,between.magnitude,0,90-theta2,0,255,255,100); return 0;
I added a shape to your model whose onDraw trigger draws the line. It isn't currently possible to draw a line once and have that become an object in its own right that automatically drawn. The line needs to be drawn for every frame - hence the use of the onDraw trigger that fire's every time the screen is drawn.
15 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved