fougue / gmio Goto Github PK
View Code? Open in Web Editor NEWC library for geometry input/output
License: BSD 2-Clause "Simplified" License
C library for geometry input/output
License: BSD 2-Clause "Simplified" License
When exporting AMF contents the deltax
, deltay
, .... subelements values don't respect the float64 precision indicated in gmio_amf_write_options::float64_prec
Example :
float64_prec = 4
<?xml version="1.0" encoding="UTF-8"?>
<amf unit="millimeter" version="1.2">
<material id="0">
<color><r>1.0000</r><g>1.0000</g><b>1.0000</b><a>0.0000</a></color>
</material>
<material id="1">
<color><r>1.0000</r><g>0.0000</g><b>0.0000</b><a>0.0000</a></color>
</material>
...
<constellation id="0">
<instance objectid="0"><deltax>175.0000000000000</deltax><deltay>67.50000000000000</deltay><deltaz>70.00000000000000</deltaz><rx>0.000000000000000</rx><ry>90.00000000000000</ry><rz>0.000000000000000</rz></instance>
<instance objectid="0"><deltax>2.000000000000000</deltax><deltay>67.50000000000000</deltay><deltaz>70.00000000000000</deltaz><rx>0.000000000000000</rx><ry>90.00000000000000</ry><rz>0.000000000000000</rz></instance>
...
Early investigation shows this is caused by the call to gmio_ostringstream_write_xmlelt_f64()
which internally passes NULL
to gmio_ostringstream_write_f64()
.
The error code GMIO_ERROR_TRANSFER_STOPPED
refers to gmio_transfer
which was an ancient struct replaced by gmio_task_iface
.
GMIO_ERROR_TRANSFER_STOPPED
should be renamed to GMIO_ERROR_TASK_STOPPED
for consistency. Adapt also documentation.
I don't see this available in any of the packaging repos.
Provide an utility to import STL solid into a Poly_Triangulation
object.
It can be put in a TopoDS_Face
object having no geometrical surface.
This new function is just a facility over gmio_stl_infos_probe()
that lets gmio manages an internal FILE*
object.
During configuration, cmake check_function_exists()
fails for snprintf()
, strtof()
, ... although thoses functions are clearly available with Visual C++ 2015.
Actually Visual C++ 2015 moved stdio
functions to the header files as inline functions, then check_function_exists()
can't detect them because it doesn't use header files.
Function gmio_stl_infos_probe()
causes a segfault when the following conditions are met :
GMIO_STLA_INFO_FLAG_SOLIDNAME
is ongmio_stl_infos::stla_solidname
is NULLAdd new gmio_amf
module that will provide complete support of the AMF format.
This taks focuses on exporting geometry to AMF (import will be done in a further milestone).
Constructor of gmio_stl_mesh_occshape
takes a const ref to TopoDS_Shape
and keeps the address. It is safer to take a copy instead to ensure the shape lives at least as needed.
After having read the last STL solid from a stream gmio_stl_read()
returns GMIO_STL_ERROR_UNKNOWN_FORMAT
.
The code pattern to read multiple STL solids from a stream is the following :
int error = GMIO_ERROR_OK;
struct gmio_stream stream = gmio_stream_stdio(infile);
struct gmio_stl_read_options roptions = {0};
struct gmio_stl_mesh_creator mesh_creator = /* Init here */
roptions.func_stla_get_streamsize = gmio_stla_infos_get_streamsize;
while (gmio_no_error(error) && !gmio_stream_at_end(&stream)) {
error = gmio_stl_read(&stream, &mesh_creator, &roptions);
}
This happens either for STL ASCII or binary contents. Actually gmio reads correctly but just after the last solid the stream is not exhausted and gmio attempts to read some empty stuff.
gmio_stl_read()
should position the stream "at end" after the last solid was read.
Hi there. After a time working with oce toolkit to read stl I decided to look for something faster and I find gmio, which has a excellent benchmark.
But I have a problem when I try to compile using gcc 4.8.3 and oce 6.8.0.
The problem occurs when the g++ tries compile the gmio_support/stl_occ_mesh.cpp in the function
gmio_stl_mesh_occmesh::init_cache() (lines 104, 105, 106, 107, 109 and 120)
domdata.vec_coords.reserve(seq_vertices.Size());
typedef TColgp_SequenceOfXYZ::const_iterator ConstIterSeqXYZ;
const ConstIterSeqXYZ seq_end = seq_vertices.cend();
for (ConstIterSeqXYZ it = seq_vertices.cbegin(); it != seq_end; ++it)
domdata.vec_coords.push_back(&(*it));
m_vec_domain_data.push_back(std::move(domdata));
stl_occ_mesh.cpp:104:49: error: within this context domdata.vec_coords.reserve(seq_vertices.Size());
stl_occ_mesh.cpp:106:15: error: 'ConstIterSeqXYZ' does not name a type const ConstIterSeqXYZ seq_end = seq_vertices.cend();
You are using opencascade 6.8.0 from github?
Thanks in advance.
Felipe
The header file gmio_support/stream_cpp.h
is not installed by doing eg make install
Current | New |
---|---|
gmio_stl_infos_get() |
gmio_stl_infos_probe() |
gmio_stla_infos_get_streamsize() |
gmio_stla_infos_probe_streamsize() |
gmio_stl_infos_get_options() |
gmio_stl_infos_probe_options() |
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.