not fully success creating section for Loft Surface

not fully success creating section for Loft Surface

Anonymous
Not applicable
722 Views
3 Replies
Message 1 of 4

not fully success creating section for Loft Surface

Anonymous
Not applicable

Hi,

If I had created these sections by ACAD editor, I will ask the question on AutoCAD discussion board.

But because of I created these sections by ARX, all section are created from the same code. I create them by LwPolyline with just 6 vertexes, and near the origin. So, non-planar and too big co-ordinate shouldn't be the case..

 

Why few of them can't be used as input section for Loft? I've got error as "Segment chord not perpendicular to normal".

How to fix or even better if I can prevent this case ?

 

What I tried to do is Loft them starting from Blue section, then the red section stop the process..

0 Likes
723 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable

1. are you a programmer? why are you using _LOFT command? :):):)

2. why AcDbLoftedSurface?

3. take a look at this sample

AcDbPolygonMesh * createPolygonMesh(AcGePoint3dArray pts, int clrInd, int mSize, int nSize)
{
   AcDbObjectId id;
   AcDbPolygonMesh * pMesh = new AcDbPolygonMesh();
   pMesh->setMSize(mSize);
   pMesh->setNSize(nSize);
   pMesh->makeMOpen();
   pMesh->makeNOpen();
   pMesh->setLinetype(_T("Continuous"));
   pMesh->setPolyMeshType(AcDb::kSimpleMesh);
   for (int i = 0; i < pts.length(); i++)
   {
      AcDbPolygonMeshVertex *pVert = new AcDbPolygonMeshVertex(pts.at(i));
      pMesh->appendVertex(pVert);
   }
   pMesh->setColorIndex(clrInd);
   appendToDatabase(pMesh,id); // it's just append entity to db. 
   pMesh->draw();
   pMesh->close();
   return pMesh;
}

 

AcGePoint3dArray pts - all of your points (sect1.pt1, sect1.pt2,... sect2.pt1, sect2.pt2... sectN.pt1, sectN.pt2...)

int clrInd - color index for created  AcDbPolygonMesh 

int mSize - points in section

int nSize - sections quantity

I can't remember exactly, may be  third and fourth parameters are opposite

About this function:

1. you don't need to create polylines at all

2. you don't need to create selection for loft command (you'll not use it at all) 

3. for more realistic "picture" you have to use much more then 6 points per section (try with 6 points and everything will be clear). 

0 Likes
Message 3 of 4

Anonymous
Not applicable

1. Yes, I'm a programer. I use Loft command to double check the creating of AcDbLoftSurface.

2. I use AcDbLoftSurface because I would like to get accurate surface.. because I have those section with curve so LoftSurface is the best method to get 3D surface with curve in my situation.

3. I know how to create PolygonMesh/PolyfaceMesh and from what I know those func can NOT create 3d with curve. more point per section is just LOOK smooth but not curve anyway.

 

For more information: I had investigate more into my issue, I found that if I do not add bulge into those section of LWPolyline, then I get the result of Loft (both from programing or manual in ACAD editor).

0 Likes
Message 4 of 4

Balaji_Ram
Alumni
Alumni

Hi,

 

Can you share the code that was used to create these polylines ?

From what I tried with the attached drawing, the lofting was ok if I moved the polylines closer to the origin.

 

I have come across in the past, issues of this sort and the solution was to bring the polylines that you are lofting closer to the origin and then move them back after you are done.

 

 

 

 



Balaji
Developer Technical Services
Autodesk Developer Network

0 Likes