FR: Export STEP with only external geometry

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Post Reply
User avatar
easyw-fc
Veteran
Posts: 3630
Joined: Thu Jul 09, 2015 9:34 am

FR: Export STEP with only external geometry

Post by easyw-fc »

Hi,
following this topic
https://forum.freecadweb.org/viewtopic.php?f=3&t=21933
https://forum.freecadweb.org/viewtopic. ... 10#p171078
a user asked to have this feature:
Export a STEP model with only external 3D geometry...
I found that this is a feature available in commercial CADs like for example in PTCreo:
http://www.cadlab.tuc.gr/proehelp/aax/about_s0.htm

I made some test and found two different approaches:
1) make a union of all parts
- this can be much time consuming and giving some weird results because of OCC
2) connect all objects (using FC0.17)
- this seems to be fast and very promising
Image

The problem comes when the objects are not all with some intersection... then 'Connect' will connect all objects, but make the detached invisible and not exported...
Is there a way to achieve this through some operations or may be with a macro?

Maurice
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: FR: Export STEP with only external geometry

Post by sgrogan »

easyw-fc wrote:Is there a way to achieve this through some operations or may be with a macro?
I go back to rfrank's method, to go to mesh and back to topo shape, in your link. Don't know the performance/file size issues.
See also here :https://forum.freecadweb.org/viewtopic.php?f=8&t=22046
This method would probably be intolerant to geometry errors, but would accomplish the goal.
"fight the good fight"
User avatar
easyw-fc
Veteran
Posts: 3630
Joined: Thu Jul 09, 2015 9:34 am

Re: FR: Export STEP with only external geometry

Post by easyw-fc »

sgrogan wrote: I go back to rfrank's method, to go to mesh and back to topo shape, in your link. Don't know the performance/file size issues.
See also here :https://forum.freecadweb.org/viewtopic.php?f=8&t=22046
This method would probably be intolerant to geometry errors, but would accomplish the goal.
but what I'm trying to reach is to get only the skin of the model, conserving the geometry...
This is possible with 'Connect', but Connect will remove detached objects... so what I miss is a method to Connect Parts in a 'smart' way... connecting only parts that have common and group them...
that should be possible, at least with a macro and it will achieve:
1) only external geometry will be saved
2) fast way to 'Convert' the model
3) conserve mechanical external geometrical details
Jee-Bee
Veteran
Posts: 2566
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: FR: Export STEP with only external geometry

Post by Jee-Bee »

I know creo a bit (i don't have acces to it atm). I'm not sure how creo handles hollow models(if it just add the inner components too) and how it handle not connecting parts... I can imagine that creo just makes it two components... but that's an assumption.
If you have acces to creo i'm curious about the result!!
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: FR: Export STEP with only external geometry

Post by jmaustpc »

easyw-fc wrote:Is there a way to achieve this through some operations or may be with a macro?

Maurice
Hi Maurice
perhaps you could get somewhere by looking at how Drawing and/or TechDraw handle (or determine which are) "hidden lines"?

Jim
User avatar
easyw-fc
Veteran
Posts: 3630
Joined: Thu Jul 09, 2015 9:34 am

Re: FR: Export STEP with only external geometry

Post by easyw-fc »

Jee-Bee wrote:... and how it handle not connecting parts... I can imagine that creo just makes it two components... but that's an assumption.
two components would be the right behavior also for FC but instead I get 1 component where the detached is hidden instead of a separate obj
connected-detached.PNG
connected-detached.PNG (148.88 KiB) Viewed 1639 times
User avatar
easyw-fc
Veteran
Posts: 3630
Joined: Thu Jul 09, 2015 9:34 am

Re: FR: Export STEP with only external geometry

Post by easyw-fc »

jmaustpc wrote: Hi Maurice
perhaps you could get somewhere by looking at how Drawing and/or TechDraw handle (or determine which are) "hidden lines"?

Jim
Hi @Jim,
I found I can check if two shapes have a distance > 0 to see if they are detached:

Code: Select all

distance = shape_a.distToShape(shape_b)
now I have a tool to work with, iterating the process to create 'connected' groups...
Maurice
Post Reply