I forgot to write the references in the previous message, sorry :D

[1] 
https://sourceforge.net/p/free-cad/code/ci/master/tree/src/Mod/Part/App/ImportIges.cpp
[2] 
http://www.opencascade.org/doc/occt-6.7.0/overview/html/user_guides__iges.html
[3] 
http://dev.opencascade.org/doc/refman/html/class_i_g_e_s_defs___attribute_def.html
[4] 
http://dev.opencascade.org/doc/refman/html/class_i_g_e_s_graph___definition_level.html
[5] 
http://dev.opencascade.org/doc/refman/html/class_i_g_e_s_solid___ellipsoid.html
[6] http://dev.opencascade.org/doc/refman/html/class_i_g_e_s_solid___block.html
[7] 
https://github.com/tpaviot/oce/blob/master/src/Interface/Interface_CheckTool.cxx
[8] https://github.com/tpaviot/oce/blob/master/inc/TopoDS_Shape.hxx
[9] 
http://ubuntuguide.net/install-gcad3d-the-open-source-3d-cad-cam-application-in-ubuntu
[10] http://www.gcad3d.org/download/gCAD3D-devel-1.62.tar.gz

On Sat, Oct 11, 2014 at 3:58 PM, Ștefan-Gabriel Mirea
<mireastefangabr...@gmail.com> wrote:
> Sean, your tips were very helpful.
>
> On Thu, Oct 9, 2014 at 6:27 AM, Christopher Sean Morrison
> <brl...@mac.com> wrote:
>>
>> AHA... there's a major bug that invalidates the output right there on 2723 
>> and demonstrated in your output file.  You can have empty fields, but 
>> putting a space in the field is not the same as an empty field... (", , ," 
>> vs ",,,")  The IGES file format is very field-sensitive.
>>
>> We have automatic code formatters that automatically put spaces after commas 
>> in the source code.  The code was "modernized" (looks like in 2011, commit 
>> 42149) to clean it up and spaces were inadvertently injected within many 
>> string literals in that converter.  This needs to be undone.
>>
>> Care to test if that fixes your case?  Basically want to run "svn diff 
>> -c42149 src/conv/iges" and identify all the string literals that had spaces 
>> injected, and undo them.  The trick we use elsewhere that allows the 
>> beautifier to still work is to have a #define COMMA ',' and add them to the 
>> print string with %c so it will cause a compiler error if ',' is ever 
>> changed to ', '.
>
> As you probably noticed, I meant 'the IGES file format'. And you're
> right. I changed back the string constants so that commas are no
> longer followed by spaces. Also, handling spaces the same way as
> commas and semicolons in write_freeform() is no more needed. Now,
> using g-iges and iges-g to convert models from *.g to *.igs and then
> back to *.g will result in valid BRL-CAD databases.
>
> Unfortunately, FreeCAD and gCAD3D still don't open the IGES file. I
> inspected the source code of FreeCAD and I found that the function
> responsible of opening IGES files is Part::ImportIgesParts()[1], which
> uses Open Cascade libraries and basically follows the procedure
> described in a tutorial on their website[2]. On that page it is also a
> list of all the entities that Open Cascade can translate into shapes
> and it turns out that entities which are frequently used by g-iges
> such as 322, 406, 168 or 150 are not supported (there actually exists
> support for identifying them[3][4][5][6] and, as I tested,
> Interface_CheckTool::CompleteCheckList()[7] successfully checks them
> against errors, but they can't be converted into TopoDS_Shape[8]
> objects, which FreeCAD processes).
>
> As to gCAD3D, I was unable to find the source code. There is an
> article on ubunuguide.net[9] which states that it is open-source, but
> only a development package is available[10], containing the source
> code of the toolbox and some plugins and all the header files, but not
> the code where input files are parsed.
>
>> The entire 5.3 specification is available online: 
>> http://www.uspro.org/documents/IGES5-3_forDownload.pdf
>
> The link you provided doesn't work for me, but I found the document in
> many other places. I really don't know how come I didn't find it by
> myself, sorry.
>
> Even if the files generated by g-iges look conformable to the
> specification, I can't be sure whether they are actually correct or
> not because there doesn't seem to be many IGES viewers for Linux, thus
> further testing may be needed.
>
> Cheers!
> Stefan

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://p.sf.net/sfu/Zoho
_______________________________________________
BRL-CAD Developer mailing list
brlcad-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-devel

Reply via email to