What's new

Importing curve or point data

hradford5

Senior Member
ajayre said:
hradford5 said:
Is it possible to modify the script so that it only generates splines between consecutive points that are within a set radial distance from each other?
It's not a big deal, I can create 3 separate iges files, I was just curious as to whether that is a possibility using a script.

Yes, absolutely it can be done. This is one example of the power of scripting - creating customized importing.

Here you go: http://www.wizotools.com/node/15 (Importer for IGES Point Files with Splitter)


Thanks again it works like a charm.
Very Cool!!

Zeke
 

Oldbelt

Alibre Super User
Ralf.
I was not aware of that iges files only with points could not be imported to GM.

By the way what shall the guy who has started this tread use that 1400 point 3D curve for ??
 

indesign

Alibre Super User
There was a guy in the early versions that made a spline and point importer program. He was Alex Franke and his programs may still be available but not sure if they were kept up with on versions. Also since it was possible to do then I would assume it could be done now. Reverse engineering from a scanned contour would be the most use for something of this nature where thousands of points are input.
 

hradford5

Senior Member
ajayre said:
Yes, absolutely it can be done. This is one example of the power of scripting - creating customized importing.

Here you go: http://www.wizotools.com/node/15 (Importer for IGES Point Files with Splitter)


This worked fine on my laptop, with XP. But when I run it on my work PC, with Win7, I get this error:

Found 458 points
Creating 3D Sketch...
Traceback (most recent call last):
File "<string>", line 67, in <module>
File "<string">, live 20, in CreateSketch
AttributeError: 'Part' object has no attribute 'Add3DSketch'

Any ideas?
Zeke
 

ajayre

Alibre Super User
You are using an older version of WizoTools on your work PC. Each script in the Wizotools script library is marked with the minimum version required.

Andy
 

hradford5

Senior Member
ajayre said:
You are using an older version of WizoTools on your work PC. Each script in the Wizotools script library is marked with the minimum version required.

Andy

I had v1.36 on the PC & needed v1.40. I uninstalled v1.36, downloaded & installed v1.40 & it ran fine

Thanks again
Zeke
 

laverne3ca

Senior Member
Depends what you need.

There is already built in ability to import points from csv file into 2D or 3D sketch, these can be left as is, connected by straight lines or used to define a spline - check out the Sketch -> Feature menu, or 3D Sketch ->Feature.
I recognize that this is an old thread but is this capability still in Alibre, I couldn't find it, I've had a couple of instances where it would have been useful??
 

laverne3ca

Senior Member
Yes, that's the one and I found it's also in the 3D section. My issue now is, what is the proper format to have Alibre read it. From my understanding it needs a .csv format, text file, I've tried the following and it didn't work, both as a .csv and as a .txt file;

X0,Y0.781
X0.0136,Y0.7809
X0.0273,Y0.7805
X0.0409,Y0.0409
X0.0545,Y0.7796
X0.0682,Y0.779
X0.0818,Y0.7782
X0.0954,Y0.7772
X0.1091,Y0.7764
X0.1228,Y0.7753
X0.1365,Y0.7741
X0.1503,Y0.773
X0.164,Y0.7718
X0.1778,Y0.7702
X0.1915,Y0.768
X0.2054,Y0.7665
X0.2191,Y0.7642
X0.233,Y0.7622
X0.2469,Y0.7599
X0.2608,Y0.7574

From reading I've done, no headers are required, there's no mention of capitalization, spacing or anything else I can think of.
 

idslk

Alibre Super User
Yes, that's the one and I found it's also in the 3D section. My issue now is, what is the proper format to have Alibre read it. From my understanding it needs a .csv format, text file, I've tried the following and it didn't work, both as a .csv and as a .txt file;

X0,Y0.781
X0.0136,Y0.7809
X0.0273,Y0.7805
X0.0409,Y0.0409
X0.0545,Y0.7796
X0.0682,Y0.779
X0.0818,Y0.7782
X0.0954,Y0.7772
X0.1091,Y0.7764
X0.1228,Y0.7753
X0.1365,Y0.7741
X0.1503,Y0.773
X0.164,Y0.7718
X0.1778,Y0.7702
X0.1915,Y0.768
X0.2054,Y0.7665
X0.2191,Y0.7642
X0.233,Y0.7622
X0.2469,Y0.7599
X0.2608,Y0.7574

From reading I've done, no headers are required, there's no mention of capitalization, spacing or anything else I can think of.
Remove the letters (X and Y) from your list. You can have 2D or 3D data only separated by a comma like 0,0 or 0,0,0 .That's all...

Regards
Stefan
 

laverne3ca

Senior Member
I got the 2D script to work, the rotation angle(line 9) and origin(line 10) and the path to the .csv file(line 12) have to be changed in the script, when I do that, I get a profile. No Z coordinate is needed.
 
Top