.NET

Reply
Member
efren7717
Posts: 5
Registered: ‎04-18-2011
Message 1 of 3 (200 Views)

SubDMesh Documentation?

200 Views, 2 Replies
11-08-2013 08:31 PM

I've been looking for SubDMesh documentation, but there's none. Kean's and Balaji's examples are excellent but i want to know how the parameters are sequenced:

sdm.SetSubDMesh(vertarray, facearray, 0);

 

Are the vertarray or facearray supposed to be arranged or sorted?

Or can they be random?

 

My problem is that, after closing the SubDMesh, i just can't make it WaterTight.

And so the conversion to solid, sdm.ConvertToSolid(false, false); always fails.

 

In short, what is the requirement of SubDMesh to be .WaterTight?

 

Efren

ADN Support Specialist
philippe.leefsma
Posts: 632
Registered: ‎06-02-2009
Message 2 of 3 (172 Views)

Re: SubDMesh Documentation?

11-11-2013 02:07 AM in reply to: efren7717

Hi Efren,

 

I don't understand what you mean by "Are the vertarray or facearray supposed to be arranged or sorted? Or can they be random?"

 

The way you have to provide arguments is logically described in the API Help Files for that method:

 

AcDbSubDMesh::setSubDMesh Method

 

const AcGePoint3dArray& vertexArray
Input an array of vertex points.
const AcArray<Adesk::Int32>& faceArray
Input an array of 32-bit integers describing the face definition based on the input vertex array.
int subDLevel
Initial smoothness level.

 

The faceArray defines an array of faces, and each face is defined by a set of numbers. The first number specifies the number of vertices in the face, the following numbers are the indices of the vertices making up the face.

See AcGiGeometry::shell() for more details on using an array of faces to define mesh faces. Note that Mesh does not support a hole definition like AcGiGeometry::shell().

 

This explanation seems rather explicit to me.

 

I hope it helps,

Philippe.

 



Philippe Leefsma
Developer Technical Services
Autodesk Developer Network

Member
efren7717
Posts: 5
Registered: ‎04-18-2011
Message 3 of 3 (148 Views)

Re: SubDMesh Documentation?

11-13-2013 09:15 AM in reply to: efren7717

Hi Philippe,

Thanks for the explanation.

I think i used the syntax this way, but the problem is that, the created shell is not "WaterTight" always.

I'm sure i might have been missing something here.

Here's the objective:

From a selection set of 3dfaces (triangles), use the vertices as vertexarray (at a projected elevation), and number of these 3dfaces as facearray, plus,

and to close the shell, i used the vertices of a 3dpolyline boundary to create a vertical wall composed of 3dfaces (rectangular), these are added to vertexarray and facearray(int n) as well, then lastly, the closing horizontal plane using the vertices of the boundary, but havin a flat elevation. The last closing plane's vertices are added to the vertexarray and also as n=1 in the facearray.

No errors, all is good, i can view it in 3d orbit.

The issue now is to convert this to a 3dsolid using the function SubDMesh.ConvertToSolid.

Somehow the subdmesh shell created is not "WaterTight".

 

Any suggestions ?

 

Thanks,

Efren

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.