Modifying step file with multiple shapes

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!
Post Reply
LHC
Posts: 321
Joined: Thu Sep 17, 2020 4:21 pm
Location: Canadian Coffee Shop

Modifying step file with multiple shapes

Post by LHC »

I have been trying to make a very simple modification to a step file that I imported. Creating a basefeature inside a body, and then attaching a simple sketch of a circle will not pad or pocket. The entire 3d view just disappears when I try it.

After farting around for about an hour, I discovered that if I go into the step import settings and uncheck the compound option, and bring the step file in as individual shapes, I can then do a part>fusion on them, then create a basefeature of the fusion and I can sketch a little circle on a face of the basefeature and pad or pocket will work.

Can someone explain to me what is going on here and why this behaviour is the way it is ?


Thanks !

OS: Windows 10 (10.0)
Word size of FreeCAD: 64-bit
Version: 0.20.24894 (Git)
Build type: Release
Branch: master
Hash: a378b6b66f8a5992fc1452567ff59bdb613abc80
Python version: 3.8.10
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.2
Locale: English/United States (en_US)
User avatar
M4x
Veteran
Posts: 1484
Joined: Sat Mar 11, 2017 9:23 am
Location: Germany

Re: Modifying step file with multiple shapes

Post by M4x »

Are you able to share an example file?
User avatar
thomas-neemann
Veteran
Posts: 11940
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: Modifying step file with multiple shapes

Post by thomas-neemann »

LHC wrote: Thu Jul 22, 2021 2:42 am
here are some examples


https://www.youtube.com/watch?v=q_gpAeRvgvE


phpBB [video]




https://www.youtube.com/watch?v=85F7oPgxLYw


phpBB [video]





https://www.youtube.com/watch?v=eZUUIQe1pIA


phpBB [video]



https://www.youtube.com/watch?v=HJy7EM0YF_E


phpBB [video]
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
chrisb
Veteran
Posts: 54273
Joined: Tue Mar 17, 2015 9:14 am

Re: Modifying step file with multiple shapes

Post by chrisb »

thomas-neemann wrote: Thu Jul 22, 2021 6:06 am
LHC wrote: Thu Jul 22, 2021 2:42 am
here are some examples


https://www.youtube.com/watch?v=q_gpAeRvgvE


phpBB [video]




https://www.youtube.com/watch?v=85F7oPgxLYw


phpBB [video]





https://www.youtube.com/watch?v=eZUUIQe1pIA


phpBB [video]



https://www.youtube.com/watch?v=HJy7EM0YF_E


phpBB [video]
These aren't example files we can play with.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
thomas-neemann
Veteran
Posts: 11940
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: Modifying step file with multiple shapes

Post by thomas-neemann »

chrisb wrote: Thu Jul 22, 2021 7:31 am
These aren't example files we can play with.
I can try to find the files again and post download links.
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
User avatar
thomas-neemann
Veteran
Posts: 11940
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: Modifying step file with multiple shapes

Post by thomas-neemann »

chrisb wrote: Thu Jul 22, 2021 7:31 am
These aren't example files we can play with.
here is the first one

https://drive.google.com/file/d/1Kxtqnz ... sp=sharing


1.png
1.png (53.55 KiB) Viewed 612 times
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
User avatar
thomas-neemann
Veteran
Posts: 11940
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: Modifying step file with multiple shapes

Post by thomas-neemann »

here is the next


https://drive.google.com/file/d/1Z_30l9 ... sp=sharing

1.png
1.png (35.14 KiB) Viewed 608 times
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
drmacro
Veteran
Posts: 9000
Joined: Sun Mar 02, 2014 4:35 pm

Re: Modifying step file with multiple shapes

Post by drmacro »

I have taken a look at this file (and a couple other STEP files) in FreeCAD 0.20 with both OCC 7.3 and 7.5.

Observations:
  • In the case of the NEMA17 STEP file, the sub elements pass Geometry/BOP check when imported with merge to compound disabled.
  • When the file is imported with merge to compound enabled or if made into a compound after import, the resultant shape or compound fails geometry/BOP check. (mostly, large numbers of self intersects)
  • In several other STEP files, the sub elements don't pass geometry/BOP.
In the case of the NEMA17 file, then, disabling merge to compound and using the sub elements as BaseFeatures works.

In other cases where the sub elements don't pass geometry/BOP using a compound or sub element is not going to allow work on a BaseFeature of the failed geometry.

Whether this is an inherent "feature" of STEP files (that being sub elements intersect), poor production of the STEP by the source software, or an issue in the OCC engine... :?: :?:

If the goal is to create a new component using dimensional cues from the STEP file, then a ShapeBinder from the STEP import seems to be fine, since there is no attempt to change the geometry of the actual STEP import.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
User avatar
thomas-neemann
Veteran
Posts: 11940
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: Modifying step file with multiple shapes

Post by thomas-neemann »

in my customers, step is mainly used to refer to purchased parts. in rare cases the parts are reworked e.g. additional hole.

Greetings Thomas
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
LHC
Posts: 321
Joined: Thu Sep 17, 2020 4:21 pm
Location: Canadian Coffee Shop

Re: Modifying step file with multiple shapes

Post by LHC »

Interesting. It seems drmacro has confirmed my findings which is good. Step files are rarely modified with my workflows but there are some and knowing these potential pitfalls will minimise the rage going forward (at least with importing step files :lol: )

Geometry/BOP is something I'm not familiar with so I need to study up on that. I also need to start writing all these little tricks and procedures down regarding working with step files before I forget and a month from now end up back where I was last night. This does bring up the question though - is there a comprehensive dissertation on this somewhere that I'm not aware of or perhaps some places I should be reading? Thanks for all the assistance!
Post Reply