Issue #7338 - Cutting a sphere results in errors after merging with other objects

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
dschoni
Posts: 8
Joined: Thu Jul 27, 2017 12:38 pm

Issue #7338 - Cutting a sphere results in errors after merging with other objects

Post by dschoni »

Try this:

Torus:
R1: 10mm
R2: 5mm
Angle Y -90°
Position Z: -Radius1

Sphere:
R: <<Torus>>.Radius2
Position Z: <<Torus>>.Radius1

Box:
Length: <<Sphere>>.Radius * 2
Width: <<Sphere>>.Radius
Height: <<Torus>>.Radius1 + <<Torus>>.Radius2
Position X: -Length / 2

Cylinder001:
Radius: <<Torus>>.Radius1 + <<Torus>>.Radius2 + 1mm
Height: <<Torus>>.Radius1 + <<Torus>>.Radius2 + 1mm
Position Z: -<<Torus>>.Radius1
Angle X: -90°

Cylinder002:
Radius: <<Torus>>.Radius1 + <<Torus>>.Radius2 + 1mm
Height: <<Torus>>.Radius1 + <<Torus>>.Radius2 + 1mm
Position Z: -<<Torus>>.Radius1
Angle X: 135°

Fusion001:
Merge the Cylinders

Cut001:
Cut Torus with Fusion001.

The Result should be a small segment of 45° of the Torus.

Cut002:
Cut Sphere with Box
Position Z: -<<Torus>>.Radius1
Angle X: 45°

The Result should be a half a ball on the lower side of the Torus segment.

Fusion002:
Merge Cut001 and Cut002.

Result: Nothing - Resulting Shape is invalid, internal Name Fusion002.

This is obviously a bug.
Last edited by Kunda1 on Thu Nov 17, 2022 5:49 pm, edited 1 time in total.
Reason: Added GH ticket number to thread title
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: Cutting a sphere results in errors after merging with other objects

Post by adrianinsaval »

file? full freecad info?
Right now I'm too lazy to follow all these instruction but my first guess would be some sort of issue in occt's boolean operations, we know occt has it's quirks with coplanar/coincident faces or edges so it's probably that.
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: Cutting a sphere results in errors after merging with other objects

Post by adrianinsaval »

OP created issue #7338, please read and follow the guidelines and don't create github issues without getting feedback on your thread, and if you create an issue you should link it here too.
user1234
Veteran
Posts: 3345
Joined: Mon Jul 11, 2016 5:08 pm

Re: Cutting a sphere results in errors after merging with other objects

Post by user1234 »

dschoni wrote: Mon Aug 08, 2022 1:39 pm This is obviously a bug.
To be honest, without a file, it is not confirmable, since you can have slight missalingment, when it is not well placed.

Greetings
user1234
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Cutting a sphere results in errors after merging with other objects

Post by Kunda1 »

dschoni wrote: Mon Aug 08, 2022 1:39 pmTry this:
Do you mind providing a file or files for us to reproduce?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Issue #7338 - Cutting a sphere results in errors after merging with other objects

Post by Kunda1 »

bumping
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
chrisb
Veteran
Posts: 53933
Joined: Tue Mar 17, 2015 9:14 am

Re: Issue #7338 - Cutting a sphere results in errors after merging with other objects

Post by chrisb »

Kunda1 wrote: Wed Nov 23, 2022 10:14 ambumping
No need to bump as we still wait for @dschoni's file.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
easyw-fc
Veteran
Posts: 3630
Joined: Thu Jul 09, 2015 9:34 am

Re: Issue #7338 - Cutting a sphere results in errors after merging with other objects

Post by easyw-fc »

It would be nice to check if using fuzzy boolean on the shape could solve this OCC coplanar issue.
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: Issue #7338 - Cutting a sphere results in errors after merging with other objects

Post by adrianinsaval »

Sample file is now available on the GitHub issue
User avatar
easyw-fc
Veteran
Posts: 3630
Joined: Thu Jul 09, 2015 9:34 am

Re: Issue #7338 - Cutting a sphere results in errors after merging with other objects

Post by easyw-fc »

attaching the file would have avoided losing time :lol:
Sphere-Problem.FCStd
(22.14 KiB) Downloaded 12 times
Sphere-Problem-fuzzy.FCStd
(31.54 KiB) Downloaded 10 times
unfortunately fuzzy is not parametric atm (it could be done with some python code)
Post Reply