.NET

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

SubDMesh Documentation?

236 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: 676
Registered: ‎06-02-2009
Message 2 of 3 (208 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 (184 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

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.