Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 4148

Script to fix imported 2D geometry...?

$
0
0

I’m importing the file from Adobe Illustrator to Rhino.

Illustrator UI has precision of 0.001mm. But AI stores data in points. Because of all the calculation and rounding - actual measures are off by 0.0001mm (if you import file into Rhino you can see actual tolerance and actual numbers that AI has created in 0.0000001 precision).

I don’t work in such a high precision, but if I would zoom things really close for inspection I can see misalignment, and it makes me crazy. As well, if I would need to scale things like 1000 times I would face real issue.

For example object that has to be exactly 455 x 4 mm I’m getting values like: 454.9999719 x 3.9997591

I know I could set Absolute Tolerance to 0.001 and move on, but it’s just not right.

Is it doable to create a Python script so it would automatically go through the objects and round actual values / save them?

I’m experienced in C++, so Python wouldn’t be that much hard to learn.

but I’m new to Rhino, so I don’t know its capabilities.
Could someone bring me on the right track?

MacOS - Rhino 7

Cheers

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 4148

Trending Articles