Goods and bads: OCCT 7.0.0 vs OCCT 6.8.0

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!
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Goods and bads: OCCT 7.0.0 vs OCCT 6.8.0

Post by DeepSOIC »

I've just compiled FreeCAD with OCC 7, thanks to the new libpack sgrogan has made.
I'll use this thread to collect goods and bads about it.

Good.
1. Tapered Part Extrude now works.
2. Output of Part Fuse on non-solids has changed. May open up some interesting new possibilities (example: making CompSolids).

No improvement.
1. Path Thickness still doesn't work on a revolution of a hexagon (toroid-ish shape)
2. Still can't Connect two pipes of equal diameter (can't Fuse them as well).
3. Fusion and Common between open solids still do not work.

Bad.
1. Part Fuse doesn't fuse wires properly.
1.2. Part Fuse doesn't create non-manifold shells anymore.
1.3. Part Fuse can't be used to fuse faces into shells, and thus can't be used in a straightforward manner for BOPs in 2D (I used to fuse faces, then refine, to unite areas).

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.7808 (Git)
Build type: Release
Branch: BodyBase4
Hash: fdba019ef6f5071eb94bca616e1392d769a1b0e2
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Goods and bads: OCCT 7.0.0 vs OCCT 6.8.0

Post by DeepSOIC »

Problem: OCC 7 doesn't fuse wires as it used to. Example:
1. Make sketch. Draw an arc. Constrain its endpoints to lie on the vertical axis.
2. Part Mirror the sketch
3. Part Fuse the two.
Result looks good, but it's not fused. It's compounded instead:
Lattice Inspect wrote:Selected document object:
Name = Fusion
Label = Fusion
Is placement/array = False
Structure:
Compound (2 objects):
Wire (1 segments)
Wire (1 segments)
As a result, I can't extrude it into a solid anymore.
Attachments
occ7-fuse-wires.FCStd
(6.69 KiB) Downloaded 36 times
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: Goods and bads: OCCT 7.0.0 vs OCCT 6.8.0

Post by sgrogan »

Unfortunately I think this is not the silver bullet we hoped for. My quick tests have shown no great improvements, Fillets, tangent faces/edges, same old same old. I think there is some more support for multi-threading but the existing lib doesn't use it.
"fight the good fight"
wmayer
Founder
Posts: 20241
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Goods and bads: OCCT 7.0.0 vs OCCT 6.8.0

Post by wmayer »

That's strange:

Code: Select all

shape=App.ActiveDocument.Fusion.Shape
shape.Wires # two wires
shape.Vertexes # two vertexes
So, this means that the two wires are definitely connected because otherwise four vertexes would be expected. I wonder if this hurts the definition of a wire.
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Goods and bads: OCCT 7.0.0 vs OCCT 6.8.0

Post by DeepSOIC »

wmayer wrote:So, this means that the two wires are definitely connected
Well, I don't think so. If I do this:
sh = Part.makeCompound(App.ActiveDocument.Box.Wires)
the resulting compound has 6 closed wires (each bounds a face), but only 12 edges and 8 vertices, like the original cube. Can you say that these wires are all connected? I don't think so.

There is even a weirder case (not very relevant to the situation): a cylinder. The wire that bounds its cylindrical face has only two vertices, and the loop formed by the wire passes through each of the vertices twice (when passing the seam edge back and forth). So the connectivity of wires seems to be defined by something other than just vertex sharing (vertex sharing is required, but IMO not enough).


But the fact there are only two vertices in fusion result means that fusion at least did something. Hmm.. Compsolid experimenting time!
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Goods and bads: OCCT 7.0.0 vs OCCT 6.8.0

Post by DeepSOIC »

Yay! CompSolid!
occ7-compsolid.FCStd
(9.21 KiB) Downloaded 37 times
Steps:
1. Part Cube.
2. Part Cube001. Set Placement to x=-10
3. Downgrade both cubes to shells
4. Part Fuse the shells. Fusion outputs a compound of two shells with a shared face (in contrast, OCC6.8 returns a one non-manifold shell).
5. Extract the shells, convert them to solids, and make a compsolid:

Code: Select all

cs = Part.CompSolid([Part.Solid(shell) for shell in App.ActiveDocument.Fusion.Shape.childShapes()])
Part.show(cs)
....
PROFIT!! :mrgreen:
wmayer
Founder
Posts: 20241
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Goods and bads: OCCT 7.0.0 vs OCCT 6.8.0

Post by wmayer »

Can you say that these wires are all connected? I don't think so.
The point is that in this case you cannot build a wire if the two wires share a common edge.
So the connectivity of wires seems to be defined by something other than just vertex sharing (vertex sharing is required, but IMO not enough).
The number of edges that share a vertex is called degree.
If the degree of all vertexes is two and all edges have two vertexes (this excludes closed edges) then you can always build a single wire. This requirement is given for the original example but it's not given for a cube (because the vertexes have a degree of three) and also not given for a cylinder (because the circular edges are closed).
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Goods and bads: OCCT 7.0.0 vs OCCT 6.8.0

Post by bernd »

DeepSOIC wrote: 1.2. Part Fuse doesn't create non-manifold shells anymore.
OCC version: 7.0.0
Is there a way to get a non-manifold shell with OCCT 7.0 or 7.1 ?

Exmple: download/file.php?id=21072 from topic viewtopic.php?f=3&t=14547&start=10#p116807 but all done with occt < 7.0 ...
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Goods and bads: OCCT 7.0.0 vs OCCT 6.8.0

Post by DeepSOIC »

bernd wrote:Is there a way to get a non-manifold shell with OCCT 7.0 or 7.1 ?
Via python I think it can be created. I think if you run faces through BooleanFragments first, then re-pack them into a shell using Part.Shell(compound_of_faces.Faces), it will create a non-manifold shell. I don't think it is doable with gui only, so far.
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Goods and bads: OCCT 7.0.0 vs OCCT 6.8.0

Post by DeepSOIC »

DeepSOIC wrote:
bernd wrote:Is there a way to get a non-manifold shell with OCCT 7.0 or 7.1 ?
... I think if you run faces through BooleanFragments first, then re-pack them into a shell using Part.Shell(compound_of_faces.Faces), it will create a non-manifold shell.
Seems to work!
Attachments
non-manifold-shell-occ7.FCStd
(9.09 KiB) Downloaded 35 times
Post Reply