What's new

Creating design points

deelip

Member
Creating design points

I am writing an add-on to import points from a text file into an Design session. This is the code I am using:

Code:
IADDesignSessionPtr pDesignSession = NULL;
pSession->QueryInterface(&pDesignSession);
for(....)
    pDesignSession->GetDesignPoints()->CreatePoint(x, y, z, \"Point\");
This work ok for a small number of points, say 20 to 30. As the number of points increases, the time taken to import them increases exponentially. I inserted a progress bar in the for loop and found that the creation of points is fairly quick at the start and then slows down to a crawl when the points reach 100 or so. 100 is far too less, since the number of points that my add-on will eventualy be used to import will run into thousands.

Am I doing domething wrong? I surely hope so.

Deelip Menezes
 

alexfranke

Senior Member


Yes, that does seem to happen. It gets exponentially slower as you add more. Probably a UI issue, e.g. rebuilding the treeview after each insertion.

I already have an application that does just what you're looking for -- why not try it out?

http://plans.thefrankes.com/Code/Apps/P ... ortWizard/

Here's the thread where I describe my most recent update, along with some discussion on how it parses points in text files:

http://www.alibre.com/forum/viewtopic.php?t=2543

The UI has changed from the screenshots on my website, by the way, to be a simple toolbar like my other apps.
 

deelip

Member


Yes, it appears to be more like a UI issue.

Alex, it looks like there is a limit on the number of points in your application. I copied the text in a 100KB point file and pasted it into the edit box. Everything didnt come through. Maybe its the edit box limit. Maybe a rich edit box would help, if you haven't used one already.

Anyways, I need this to work in my add-on. I really hope this is something that can be fixed.

Deelip Menezes
 

alexfranke

Senior Member


Interesting... that might be a bug.

In NT 4.0, W2K, and XP, you should be able to read in up to about 4 billion characters (or limited by memory), but certainly more than 100K!

I'll have to look into this. Thanks for the tip!

-Alex
 

sigseven

Senior Member


As you have observed, Alibre Design's infratructure is not geared for this high of a volume of reference geometry. Displaying them on both the display canvas as well as the explorer is likely the main cause as well.

If you don't mind my asking though, what are you hoping to do with the 1000+ reference points once they are brought into Alibre? Perhaps there is another way to achieve the end result you are going for.
 

deelip

Member


Take a look at:

Point Cloud 1.0 - http://www.sycode.com/products/point_cloud/index.htm
Point Cloud for AutoCAD - http://www.sycode.com/products/point_cloud_ac/index.htm
Point Cloud for Rhino - http://www.sycode.com/products/point_cloud_rh/index.htm

We are working on Point Cloud for Alibre Design, a reverse engineering add-on. The first step is to import points recorded by a 3D scanner. The number of points can easily run into tens of thousands.

Since design points does not appear to be the best way of going about doing this, can you recomend any other method?

Deelip Menezes
 

gregmilliken

Senior Member
Reverse engineering, lots of points and Alibre Design

Hi Deelip,

We've had this discussion about point clouds and such with a few other vendors over the last few years and we just haven't prioritized handling this type of data up to now. Our reference points are intended as entities that people typically use in paramertric modeling (to dimention or constrain geometry to, for instance) rather than a simple lightweight point that really only marks a point in XYZ space. It is likely we may be doing lot of processing related ot that that isn't necessary for a typical reverse engineering use cases for point clouds. Or we could just be doing a bunch of things we don't need to do becasue we haven't really dug into using lots of points.

While I am fairly familiar with reverse engineering at a high level, I can't say I understand all the specifics of how the original scanned points need to be used and how long they must persist or be accessible. I mention this because one discussion that came up related to your questions was that since we have done some work to handle surfaces, would itbe possible for you to fit a surface through the points and then import the surface rather than the points. We suspect we will be much more efficient with that workflow, although it may not be what the user wants or needs. Fitting the surface would likely mean some level of approximation that might not be sufficient for certain applications.

Here is a quick question: is it mandatory that the original complete set of scanned points be stored in the database, be accissible to the user and remain so permanently?

There may be some simple UI tweaks that would speed up the slow down you are seeing, but I suspect there are some aspects of our database and display pipeline that are not optimized for this sort of data.

Either way, we need ot understand precisely the use cases and functionality that are necessary to really support a production reverse engineering application. Can you help us with that?

-Greg
 

deelip

Member


"is it mandatory that the original complete set of scanned points be stored in the database, be accissible to the user and remain so permanently?"

No, its not mandatory. But it is certainly helpful for the end user to specify a decent input to the surfacing algorithm. Here is the problem. Our surfacing algorithm needs two inputs from the end user:

1) The number of rows and columns (basically the number of U & V Iso Curves). The shape of the resulting surface depends largely on this.
2) The drape direction (basically a vector which points in the direction that the surface will be draped on the point cloud).

For both these inputs the user needs to be able to view the point cloud to make an informed decision. Technically, we can ask him to specify a text file containing the points, the number of rows/columns and the drape direction vector, all this in a simple dialog box and ask him to click Ok. But without seeing the point cloud and judging how it is oriented in 3D space or how dense/sparse it is, he will only frustrate himself with a lot of trial and error, and eventually end up wasting a lot of his time.
 

Ralf

Alibre Super User


Why something invent what was developed by others and sold for a good price?

DAVID-Shapefusion
http://www.david-laserscanner.com/

This solution is very good and can be well used with a surfaces Mod.:
Moi3D & Rhino. ->*.obj

Surface processing is for surfaces processing software.

- Ralf

Btw.: Better advertisement for your products: 50% discount
for your "Sycode Tools"... :wink:
 

deelip

Member


"Why something invent what was developed by others and sold for a good price?"

Because Alibre Design users have noticed our Point Cloud range of products and have asked us for a similar reverse engineering add-on for Alibre Design.
 
Top