Please help to repair a step shell into a solid

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!
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: Please help to repair a step shell into a solid

Post by easyw-fc »

Quaoar wrote: Sat Oct 26, 2019 1:09 pm
saso wrote: Fri Oct 25, 2019 12:31 pm can Analysis Situs healing tools help in fixing some of this issues, for example removing the problematic wires from the top face?
Sorry, I am a bit lost in the topic. Can you provide the step file with the problematic wires? I will check if it is possible to remove them, and, if not, try to extend the software accordingly.
Is there a sort of 'defeaturing' for wires available for OCC?
Are you using your sw?
http://analysissitus.org/index.html
User avatar
saso
Veteran
Posts: 1924
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: Please help to repair a step shell into a solid

Post by saso »

Quaoar wrote: Sat Oct 26, 2019 1:09 pm Sorry, I am a bit lost in the topic. Can you provide the step file with the problematic wires? I will check if it is possible to remove them, and, if not, try to extend the software accordingly.
There are actually a few issues with this model and some of them I believe cannot be fixed automatically but need a manual reconstruction (in my previous post)... However, for example the top face has this issue with inner wires, this could be fixed with a healing/repair tool. I was actually already able to fix it but adding a tool for this also to Analysis Situs would be nice and of course also to FreeCAD :). I was able to fix it in two ways (1) Salome has a tool to remove inner wires (2) with FreeCAD using Draft Downgrate tool -> result is individual wires from the face -> removing the inner wire and using Draft Upgrade to get new faces -> then using Part Cut to cut the inner faces from the main face... freecad-heini-1 also mentioned he was able to fix it in some way... ?

Attached topface.step is the problematic face with inner wires, RemoveIntWires_1.step is the result using the Salome Repair tool Suppress Internal Wires, FreeCAD downgrade-upgrade technique gives me basically the same result.
Attachments
RemoveIntWires_1.step
(366.08 KiB) Downloaded 51 times
topface.step
(377.86 KiB) Downloaded 32 times
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: Please help to repair a step shell into a solid

Post by easyw-fc »

saso wrote: Tue Oct 29, 2019 9:15 am RemoveIntWires_1.step is the result using the Salome Repair tool Suppress Internal Wires
the face seems to have a lot of geometric issues ... is there a way to fix them?
Are those real issues?
-
Attachments
error-healing.png
error-healing.png (225.58 KiB) Viewed 1624 times
freecad-heini-1
Veteran
Posts: 7791
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: Please help to repair a step shell into a solid

Post by freecad-heini-1 »

easyw-fc wrote: Tue Oct 29, 2019 11:23 am
saso wrote: Tue Oct 29, 2019 9:15 am RemoveIntWires_1.step is the result using the Salome Repair tool Suppress Internal Wires
the face seems to have a lot of geometric issues ... is there a way to fix them?
Are those real issues?
-
Yes, this is a real part of a customer designed in CimatronE 13.0, or maybe he received the data from another system. In tool and mould making this is unfortunately normal in everyday working life.

I repaired the top surface like this.
1. Surface Workbench, Extend Face, U=0, V=0
2. Lattice2 downgrade to wire,
3. Lattice2 explode compound
4. deleted the faulty inner curves
5. the remaining curves are combined in the Part WB to a compound
6. part WB symmetrically extruded on both sides as a surface
7. slice apart
8. the inner surface is repaired with it
User avatar
saso
Veteran
Posts: 1924
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: Please help to repair a step shell into a solid

Post by saso »

easyw-fc wrote: Tue Oct 29, 2019 11:23 am the face seems to have a lot of geometric issues ... is there a way to fix them?
Are those real issues?
What exactly the results of this additional checks mean I don't know, I guess it has to do with tolerances, there was a discussion about this before https://forum.freecadweb.org/viewtopic.php?t=26439

I did however a few more tests, with the FreeCAD Downgrade-Upgrade technique I get at first only one of this warnings about the edge, when I however export the surface to step and then import it back and run the tests again I get a lot. With the technique from freecad-heini-1, to extend and slice the face I get at first zero of this warnings, but when exporting it to step and importing it back I again get a few (but less then with the Downgrade-Upgrade technique or Salome). If we look at this with Analysis Situs we see that with Salome the reported Max tolerance is 0.033359407069762412, with the FC Downgrade-Upgrade it is 0.048368106859888467 and with freecad-heini-1 extend and slice technique it is just 0.0011572624325076714 however if we look at the shape properties (with Analysis Situs or FC Curves Geometry Info tool) we see that the Extend face tool creates a shape with a different properties CN 4x3.. then the original shape C2 3x3... while the other techniques keep the original properties (at least in this case). My understanding is that in general it is preferred to work with more simple surfaces and that this tolerances are acceptable and that all parametric cad system work with them and that how big the actual accepted tolerance is, is different from each case but, what exactly all of this means I also don't know :)

Attached are the two additional step files with exported top face fixed by the FC Downgrade-Upgrade and one following the steps by freecad-heini-1 with extending and slicing the face (this are additional to the step file provided in my previous post fixed with Salome)...
Attachments
FCExtendSlice.step
(531.11 KiB) Downloaded 26 times
FCDownUp.step
(229.56 KiB) Downloaded 27 times
User avatar
Quaoar
Posts: 106
Joined: Thu Jul 27, 2017 11:56 am
Location: Nizhny Novgorod
Contact:

Re: Please help to repair a step shell into a solid

Post by Quaoar »

easyw-fc wrote: Mon Oct 28, 2019 2:14 pm Is there a sort of 'defeaturing' for wires available for OCC?
Are you using your sw?
Yes and yes. As for defeaturing of wires, you can find the common tool in OpenCascade, which is the BRepTools_ReShape. It is not a true "defeaturing" utility though, just because it is incapable of rebuilding the geometric primitives (e.g., it cannot extend and reintersect faces). At the same time, it allows for the replacement and removal of topological entities in a shape. Actually, this tool can be seen as a groundwork of Euler operators. The principle behind is to rebuild a topology graph without even touching the geometry:

Image

One can use BRepTools_ReShape to eliminate the internal wires from the problematic top face. I have been playing with that sort of functionality in Analysis Situs (though, without BRepTools_ReShape) and here is something I ended up with currently:

Image

saso wrote: Tue Oct 29, 2019 9:15 am I was actually already able to fix it but adding a tool for this also to Analysis Situs would be nice and of course also to FreeCAD
Yes, thanks for the idea. You motivated me to reconsider a few things in the app ;) As for FreeCAD, it should not be difficult to integrate BRepTools_ReShape, though one should be careful to not allow the user corrupt his shape (as it is very easy to do -).
FOSS CAD model inspection utility and prototyping framework: http://analysissitus.org
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: Please help to repair a step shell into a solid

Post by easyw-fc »

Quaoar wrote: Thu Oct 31, 2019 4:56 pm Yes and yes. As for defeaturing of wires, you can find the common tool in OpenCascade, which is the BRepTools_ReShape. It is not a true "defeaturing" utility though, just because it is incapable of rebuilding the geometric primitives (e.g., it cannot extend and reintersect faces).
Thanks
Quaoar wrote: Thu Oct 31, 2019 4:56 pm One can use BRepTools_ReShape to eliminate the internal wires from the problematic top face. I have been playing with that sort of functionality in Analysis Situs (though, without BRepTools_ReShape) and here is something I ended up with currently:
...
Great! I need to install your sw... very useful your gif to display the workflow... Thanks :D


Quaoar wrote: Thu Oct 31, 2019 4:56 pm As for FreeCAD, it should not be difficult to integrate BRepTools_ReShape, though one should be careful to not allow the user corrupt his shape (as it is very easy to do -).
Hummm ... I need to ping @Chris_G to see if he may be interested to add this too :D
Chris_G wrote: Fri Jun 29, 2018 3:02 pm Hi,
I am giving a try at implementing OCC Defeaturing.
User avatar
Quaoar
Posts: 106
Joined: Thu Jul 27, 2017 11:56 am
Location: Nizhny Novgorod
Contact:

Re: Please help to repair a step shell into a solid

Post by Quaoar »

easyw-fc wrote: Thu Oct 31, 2019 5:26 pm I need to install your sw...
I still have to repack the installer to make this feature available. Will post here once done.
FOSS CAD model inspection utility and prototyping framework: http://analysissitus.org
freecad-heini-1
Veteran
Posts: 7791
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: Please help to repair a step shell into a solid

Post by freecad-heini-1 »

Quaoar wrote: Thu Oct 31, 2019 4:56 pm
easyw-fc wrote: Mon Oct 28, 2019 2:14 pm Is there a sort of 'defeaturing' for wires available for OCC?
Are you using your sw?
Yes and yes. As for defeaturing of wires, you can find the common tool in OpenCascade, which is the BRepTools_ReShape. It is not a true "defeaturing" utility though, just because it is incapable of rebuilding the geometric primitives (e.g., it cannot extend and reintersect faces). At the same time, it allows for the replacement and removal of topological entities in a shape. Actually, this tool can be seen as a groundwork of Euler operators. The principle behind is to rebuild a topology graph without even touching the geometry:

Image

One can use BRepTools_ReShape to eliminate the internal wires from the problematic top face. I have been playing with that sort of functionality in Analysis Situs (though, without BRepTools_ReShape) and here is something I ended up with currently:

Image

saso wrote: Tue Oct 29, 2019 9:15 am I was actually already able to fix it but adding a tool for this also to Analysis Situs would be nice and of course also to FreeCAD
Yes, thanks for the idea. You motivated me to reconsider a few things in the app ;) As for FreeCAD, it should not be difficult to integrate BRepTools_ReShape, though one should be careful to not allow the user corrupt his shape (as it is very easy to do -).
Hello Quaoar,
Thank you very much for your very good work.
Will there ever be a Linux version of Analysissitus?
Many greetings
Wilfried
User avatar
Quaoar
Posts: 106
Joined: Thu Jul 27, 2017 11:56 am
Location: Nizhny Novgorod
Contact:

Re: Please help to repair a step shell into a solid

Post by Quaoar »

freecad-heini-1 wrote: Fri Nov 01, 2019 11:14 amHello Quaoar,
Thank you very much for your very good work.
Will there ever be a Linux version of Analysissitus?
Many greetings
Wilfried
Hello Wilfried,

I am eager to have it but still cannot allocate enough time. :(

Kind regards,
Sergey.
FOSS CAD model inspection utility and prototyping framework: http://analysissitus.org
Post Reply