|
|
|
|
|
by andygreenwell
2312 days ago
|
|
You have to make due with 32-bit floating point accuracy for any vertices defined in Blender for the geometry to be passed along to any external libraries. In a prior gig where Blender was the primary development environment, I needed to do all kinds of gymnastics (converting floating point numbers provided by the user in the gui to strings then to Python floats or sometimes 32-bit or 64-bit numpy objects, then to the external package and back) in order to maintain double precision accuracy. Anything created or stored as a Blender FloatProperty is a 32-bit value on the C-side. But if you operate on that FloatProperty object within the embedded Python process you are operating on the 64-bit representation of the 32-bit pattern, since Python floats are all 64-bit values. I heard more than once during that gig that “Blender is not CAD” even though we were doing everything possible to bring it closer to being so. But with vertex values, those are created directly in Blender’s C layer, so no possibility to make those values have 64-bit accuracy if that is important to your application or external library. I am in agreement that Blender would make a fantastic environment to pull together many open source scientific and engineering libraries, but the vertex accuracy is the one major drawback there. |
|
http://tkeskita.kapsi.fi/blender/SwiftBlock/docs/swift.html