Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toponaming: replace MultiFuse implementation to fix face colors #14169

Merged
merged 1 commit into from
May 20, 2024

Conversation

bgbsww
Copy link
Contributor

@bgbsww bgbsww commented May 20, 2024

No description provided.

@github-actions github-actions bot added the WB Part Related to the Part Workbench label May 20, 2024
@bgbsww bgbsww marked this pull request as draft May 20, 2024 14:31
@bgbsww bgbsww force-pushed the bgbsww-toponamingNewMultiFuse branch from b9ce9dc to fbaa02c Compare May 20, 2024 14:37
@chennes chennes self-assigned this May 20, 2024
@bgbsww bgbsww marked this pull request as ready for review May 20, 2024 15:29
@chennes chennes merged commit 1eac717 into FreeCAD:main May 20, 2024
9 checks passed
@bgbsww bgbsww deleted the bgbsww-toponamingNewMultiFuse branch May 20, 2024 18:05
@Roy-043
Copy link
Contributor

Roy-043 commented May 23, 2024

Can this PR have 'broken' shape.fuse()? Fusing a face with an empty shape used to work in previous versions but not in the version listed below. It would also be nice if you could multi-fuse with an empty shape.

Create a Part Box and copy-paste the code below in the Python console.
Code:

import FreeCAD as App
import Draft

doc = App.ActiveDocument
face = Part.getShape(doc.Box, "Face2", needSubElement=True, retType=0)
shp = Part.Shape()
shp = shp.fuse(face)
print(shp.SubShapes)

Version:

OS: Windows 8 build 9600
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.37436 (Git)
Build type: Release
Branch: main
Hash: 040502280fc9637fb3aada037523283168b81a02
Python 3.11.9, Qt 5.15.13, Coin 4.0.2, Vtk 9.2.6, OCC 7.7.2
Locale: Dutch/Netherlands (nl_NL)
Installed mods:

Roy-043 added a commit to Roy-043/FreeCAD that referenced this pull request May 26, 2024
Fixes FreeCAD#14242.

In the current dev fusing an empty shape with a face or solid no longer works (probably introduced with FreeCAD#14169). The reason for starting with an empty shape was the assumption that the end result would then always have a default placement. But that is only correct if multiple objects are fused.

In the new version of the code fusing no longer starts with an empty shape. The default placement issue is solved by always returning a compound.

Additionally the value for the Area property is now taken after offsetting and fusing the faces.
yorikvanhavre pushed a commit that referenced this pull request May 27, 2024
Fixes #14242.

In the current dev fusing an empty shape with a face or solid no longer works (probably introduced with #14169). The reason for starting with an empty shape was the assumption that the end result would then always have a default placement. But that is only correct if multiple objects are fused.

In the new version of the code fusing no longer starts with an empty shape. The default placement issue is solved by always returning a compound.

Additionally the value for the Area property is now taken after offsetting and fusing the faces.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WB Part Related to the Part Workbench
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants