Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
How to query face mesh points by a 2D array sequence
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
10-10-2011 08:10 PM
We know that a face can be described by u, v parameters. So, we would like to mesh a surface by uniform u, v segments, for example, 10 segments in u, v direction separately.
After meshing, we want to the get the mesh points as a 2D array, which goes u firstly, then v. After that, we can use this array by a loop:
for( iv = 1~10)
for( iu=1~10)
end
end
What kind of mesh query method can do that? Can anybody provide us an example code?
Thanks.
Re: How to query face mesh points by a 2D array sequence
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
10-10-2011 11:50 PM
const surface & surf = <pFACE>->geometry().equation();
SPApar_pos uvpos;
SPAposition pos;
for (int iv = 0; iv <= Nv; iv++)
{
uvpos.v = surf.param_range_v().interpolate(double(iv)/Nv);
for (int iu = 0; iu <= Nu; iu++)
{
uvpos.u = surf.param_range_u().interpolate(double(iu)/Nu);
pos = surf.eval_position(uvpos);
<2DArray>.append(pos);
}
}
Re: How to query face mesh points by a 2D array sequence
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
10-13-2011 07:59 PM
Get it, thanks.

