DiscussionsIssue archiveOCCT:Modeling Algorithms

Archived issue #0033541

Modeling Algorithms - Simple sphere cut from cylinder fails

CommunityOCCT:Modeling Algorithmsverified11 public notes

Search issues

Description

Cutting shape1 from shape2 produces invalid shape:
auto shape1 = BRepPrimAPI_MakeSphere(gp_Pnt(1, 1, 1), 1).Shape();
auto shape2 = BRepPrimAPI_MakeCylinder(1, 1).Shape();

If I slightly move shape1 down by 0.01, like this:
auto shape1 = BRepPrimAPI_MakeSphere(gp_Pnt(1, 1, 0.99), 1).Shape();

then operation succeeds.

Steps to reproduce

auto shape1 = BRepPrimAPI_MakeSphere(gp_Pnt(1, 1, 1), 1).Shape();
auto shape2 = BRepPrimAPI_MakeCylinder(1, 1).Shape();

auto op = BRepAlgoAPI_Cut(shape2, shape1);
op.Build();
auto shape3 = op.Shape();

BRepAlgoAPI_Check analyzer;
analyzer.SetData(shape3);
analyzer.Perform();
printf("valid: %d\n", analyzer.IsValid());

Additional information

This happens on the latest available release version 7.7.0 , but not on 7.4.0.
https://dev.opencascade.org/release

Public activity

11 archived notes

Participants are labeled by their role within this record.

01Commenter 2
Reported problem has no relation to Mesh, it is a Modeling Algo problem.
Changing category.
02Commenter 3
Branch [archived branch] has been created by Participant.

[revision removed]


Detailed log of new commits:

Author: Commenter 4
Date: Tue May 14 14:45:43 2024 +0100

    0033541: Modeling Algorithms - Simple sphere cut from cylinder fails
    
    Test fix
03Commenter 3
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
04Commenter 3
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
05Commenter 4
Please, review branches:
OCCT - CR33541
Products - CR33541

Results of testing:
http://jenkins-test-10.nnov.opencascade.com/view/CR33541-master-Commenter 4/view/COMPARE/
06Commenter 3
Branch [archived branch] has been created by Participant.

[revision removed]


Detailed log of new commits:

Author: Commenter 4
Date: Mon May 20 10:50:28 2024 +0100

    0033541: Modeling Algorithms - Simple sphere cut from cylinder fails
    
    Changed condition for combination of WLines into one.
    WLine would be excluded from consideration for merging, if one of its middle points between vertices is out of domain (does not lie on both surfaces).
07Commenter 3
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
08Commenter 4
Please, review branches:
OCCT - CR33541_1
Product - CR33541_1

Results of testing:
http://jenkins-test-10.nnov.opencascade.com/view/CR33541-master-Commenter 4/view/COMPARE/

Note:
This branch based on #33615.
Please, integrate these branches together.
09Commenter 4
Commenter 5, just a reminder
10Commenter 3
Branch [archived branch] has been deleted by Participant.

[revision removed]
11Commenter 3
Branch [archived branch] has been deleted by Participant.

[revision removed]