export in IGES Brep

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
talziary
Posts: 9
Joined: Mon Oct 20, 2014 9:40 am

export in IGES Brep

Postby talziary » Mon Oct 20, 2014 10:27 am

Is it possible to export a solid in IGES Brep format i.e with a description starting with a MSBO entity (186) instead of the present default which is a set of trimmed parametric surface entities (144) ?
According to the OOCT documentation this should be possible by setting write.iges.brep.mode to 1 but I dont know if this is possible within FreeCAD.

OS: Linux Fedora fc20
Word size: 64-bit
Version: 0.14.$WCREV$
Python version: 2.7.5
Qt version: 4.8.6
Coin version: 2.5.0
SoQt version: 1.5.0
OCC version: 6.7.1
wmayer
Site Admin
Posts: 14869
Joined: Thu Feb 19, 2009 10:32 am

Re: export in IGES Brep

Postby wmayer » Mon Oct 20, 2014 11:04 am

Try

Code: Select all

Part.setStaticValue("write.iges.brep.mode", 1)
and then do the export again.
User avatar
quick61
Posts: 3793
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: export in IGES Brep

Postby quick61 » Mon Oct 20, 2014 8:50 pm

wmayer wrote:Try

Code: Select all

Part.setStaticValue("write.iges.brep.mode", 1)
and then do the export again.
Hi wmayer,

This works great! As a test, I exported a shape, Cube cut with Cylinder, both ways. -(see attached files)- The results when opening both exports were the default export's geometry check, (001testIGES.iges), produced BOPAlgo SelfIntersect errors on every edge and vertex with a Shape Content of -

Code: Select all

Unnamed1._01testIGES:
 VERTEX    : 28
 EDGE      : 30
 WIRE      : 9
 FACE      : 7
 SHELL     : 0
 SOLID     : 0
 COMPSOLID : 0
 COMPOUND  : 1
 SHAPE     : 75
- and with the " Part.setStaticValue("write.iges.brep.mode", 1) " applied to the part before exporting, (001testIGES_186.iges), results in no geometry errors and the following Shape Content -

Code: Select all

Unnamed2._01testIGES_186:
 VERTEX    : 10
 EDGE      : 15
 WIRE      : 9
 FACE      : 7
 SHELL     : 1
 SOLID     : 1
 COMPSOLID : 0
 COMPOUND  : 0
 SHAPE     : 43
001testIGES.iges
(17.8 KiB) Downloaded 59 times
001testIGES_186.iges
(17.24 KiB) Downloaded 54 times
Question, should this be an option built into the export function of FreeCAD? Like "Export > IGES" and "Export > IGES Solid".

Mark

OS: Kubuntu 14.04.1 LTS
Word size: 64-bit
Version: 0.14.3705 (Git)
Branch: releases/FreeCAD-0-14
Hash: f25e6e4716fb63ef3ac618ce9e552761bbc1b4b1
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
SoQt version: 1.6.0a
OCC version: 6.7.1
This post made with 0.0% Micro$oft products - GOT LINUX?
User avatar
NormandC
Posts: 18534
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: export in IGES Brep

Postby NormandC » Mon Oct 20, 2014 10:05 pm

Isn't there a bug on Mantis about invalid IGES import from some CAM software? This might solve it.
User avatar
quick61
Posts: 3793
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: export in IGES Brep

Postby quick61 » Mon Oct 20, 2014 10:09 pm

normandc wrote:Isn't there a bug on Mantis about invalid IGES import from some CAM software? This might solve it.
Yes, I was just on Mantis looking for that. :) But my default view has changed for some reason. :? Anyway, I'm back looking for it now.

Mark
This post made with 0.0% Micro$oft products - GOT LINUX?
User avatar
quick61
Posts: 3793
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: export in IGES Brep

Postby quick61 » Mon Oct 20, 2014 10:18 pm

Found it - issue #1769

Added a note referencing wmayer's post above.

Mark
This post made with 0.0% Micro$oft products - GOT LINUX?
wmayer
Site Admin
Posts: 14869
Joined: Thu Feb 19, 2009 10:32 am

Re: export in IGES Brep

Postby wmayer » Tue Oct 21, 2014 9:18 am

Mark, you replied to the bug reporter:
Exporting the Cube in IGES format, then opening that IGES file in FreeCAD produces SelfInteresct errors with every edge and vertex of the cube, and object is not a solid or shell, just a compound of self intersecting edges and vertexes of faces.

This is with both FreeCAD 0.14 Release (3705) and -
So, if I got you right then you at least have self-intersection problems when reloading the exported box as IGES file. Do you also have the "exploded" box? Does it work with STEP? Does "Part.setStaticValue("write.iges.brep.mode", 1)" change anything?

I tried "Part.setStaticValue("write.iges.brep.mode",1)" and "Part.setStaticValue("write.iges.brep.mode",0)" and observed that the files are quite different but I didn't observe any problems.
talziary
Posts: 9
Joined: Mon Oct 20, 2014 9:40 am

Re: export in IGES Brep

Postby talziary » Tue Oct 21, 2014 12:55 pm

Hi wmayer,

Many thanks for your help. Works well : tested on a complex shell involving 185 faces.
User avatar
quick61
Posts: 3793
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: export in IGES Brep

Postby quick61 » Tue Oct 21, 2014 2:54 pm

wmayer wrote:Mark, you replied to the bug reporter:
Exporting the Cube in IGES format, then opening that IGES file in FreeCAD produces SelfInteresct errors with every edge and vertex of the cube, and object is not a solid or shell, just a compound of self intersecting edges and vertexes of faces.

This is with both FreeCAD 0.14 Release (3705) and -
Yes, the errors occur with both release 0.14 - 3705, and development 0.15 - 4131. Both were built with OCE 0.17 dev (OCE 0.16 with a name change). My OCE is a complete build with all options & TBB.
So, if I got you right then you at least have self-intersection problems when reloading the exported box as IGES file. Do you also have the "exploded" box? Does it work with STEP? Does "Part.setStaticValue("write.iges.brep.mode", 1)" change anything?

I tried "Part.setStaticValue("write.iges.brep.mode",1)" and "Part.setStaticValue("write.iges.brep.mode",0)" and observed that the files are quite different but I didn't observe any problems.
I'm not sure what you mean by "exploded" box, but everything works well with STEP export, STEP and STEP with color export a solid. It's just the default IGES export that is nothing but a group of faces with self intersecting edges and vertexes. I should note that I do have BOPCheck enabled. With BOPCheck disabled, I do not get the errors but the Check geometry > Shape Content is the same, no shell, no solid. I think that is the difference your seeing in the two files, one is just a compound of faces, (the smaller one), the other is a solid.

Mark
This post made with 0.0% Micro$oft products - GOT LINUX?
wmayer
Site Admin
Posts: 14869
Joined: Thu Feb 19, 2009 10:32 am

Re: export in IGES Brep

Postby wmayer » Tue Oct 21, 2014 4:03 pm

Thanks. Now after activating "RunBOPCheck" I see the errors too in the geometry check. And from scripting I can see that the box has 24 edges (instead of 12) and 24 vertexes (instead of 8).
I'm not sure what you mean by "exploded" box,
This is answered now. What I meant is the same behaviour as http://www.freecadweb.org/tracker/file_ ... 6&type=bug