Hello,
I am trying to draw a curve mesh just like the one on the curved conveyor, but can't make it work with the functions I got from the Mesh API example module.
Is there a function on the Mesh API to draw curves?
Thanks!
Hello,
I am trying to draw a curve mesh just like the one on the curved conveyor, but can't make it work with the functions I got from the Mesh API example module.
Is there a function on the Mesh API to draw curves?
Thanks!
Hi Pedro,
Curves don't really exist in the context of a 3D mesh.
Generally, you approximate the real curve using several flat triangles.
As an example (screenshots taken in the Unity engine), here's a nice smooth sphere :
And here's its actual mesh :
When lit (1st image) you can't see the borders between the triangles because the normals have been smoothed, by taking the average of the normals of all triangles that a vertex is part of, instead of using the actual surface normal of each triangle. In simple terms, this causes lighting calculations to see the surface as curved, rather than as several separate flat triangles.
I'm not familiar with the FlexSim mesh API as seen from C++, so there may be some utility functions which can do some of the work for you, but ultimately you'll need to build a triangle mesh that approximates the real curved surface you're attempting to model.
The curved conveyor is the same way. It is all just triangles whose positions are calculated with code:
17 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