Closed learnerandtrainer closed 3 years ago
somewhere outside the code you posted, you might have something like this:
var prim = meshBuilder.UsePrimitive(material);
you have to specify the number of vertices per primitive, like this:
var prim = meshBuilder.UsePrimitive(material, 2);
Where:
A primitive can only support one kind of primitive at a time, so if you want to mix lines and triangles in the same mesh, you have to create separate primitives.
thank you vpenades . it works but I couldnt see on 3d map and also cessium returned http 304 , is that normal? or did I missed somethings?
can you try with BabylonJS?
Hi, I have a geometry as linestring wkt like below and I want to add this line to mesh. But when I want to use AddLine function witth VertexBuilder<VertexPositionNormal, VertexWithBatchId, VertexEmpty> parameters , it thows exeption as "Lines are not supported for this primitive".
Code Example
Can you give me any advice?
example geometry wkt LINESTRING Z(-0.050057364627719 -4.95065027987584 3.85658505978063, -0.40773748466745 -4.96740795951337 3.49703856976703, -1.39711167477071 -2.76645434973761 4.31435906980187, -3.41709169466048 1.84214789047837 6.15206754999235, -5.93857609480619 1.66874384041876 3.53168269991875, -6.49239724455401 2.94939182046801 4.00929037015885, -10.3402780848555 2.48362592048943 0.340840119868517, -7.50409694481641 -3.25291960965842 -2.07654881011695, -7.39860110497102 -3.24410355975851 -1.96901796991006, -5.07701519457623 -7.75867012981325 -3.98503777012229, -3.01721681468189 -7.79926744988188 -1.6832042299211, -2.70239263493568 -8.43866654951125 -1.93677648017183, -0.263346024788916 -8.49103767983615 1.00543212005869, -0.49896850483492 -7.82721681986004 1.19889017986134, 1.15692434506491 -7.74893179954961 2.96306006982923)