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

Sketcher: creating externally linked edges of circles and arcs has stopped working #224

Closed
xplwowi opened this issue Dec 14, 2021 · 7 comments

Comments

@xplwowi
Copy link

xplwowi commented Dec 14, 2021

To recreate the problem, attached test.zip can be used:

  1. Create new sketch on XZ_Plane
  2. Import circular or arched edges from two solids
  3. Reference lines will not be projected correctly onto the sketch plane

Environment:
OS: Ubuntu 21.10 (KDE/plasma)
Word size of FreeCAD: 64-bit
Version: 0.20.30668 (Git)
Build type: Unknown
Branch: LinkDaily
Hash: 7edee4b
Python version: 3.9.7
Qt version: 5.15.2
Coin version: 4.0.0
OCC version: 7.5.2
Locale: Polish/Poland (pl_PL)

@xplwowi
Copy link
Author

xplwowi commented Dec 14, 2021

A screenshot of an attempt to import all edges
Screenshot_20211214_023333

@wsteffe
Copy link

wsteffe commented Dec 15, 2021

Hello xplwowi, are you still having these error messages ?
About a weak ago I also had error messages when importing edges from a sketch.
It was a strange behaviour: first trial gave an error and second one were successful.
But now (with the last sync) I do not have anymore this problem.

I have just tried your test case and I have no problem importing circular edges. See annexed images where imported edges are the two orange.
test

@xplwowi
Copy link
Author

xplwowi commented Dec 15, 2021

Hi wsteffe. Thanks for verification but the problem is still there. I just compiled LinkDaily with the patches from the last days.
You showed the projection to the XY_Plane, which works fine for me as well. The problem appears when projecting perpendicular - to the XZ_Plane. This is how I showed it in the screenshot above. The projection of the top edges of solids should result in two segments located above the X axis. I broke the complicated model on which I work. Fortunately I found a temporary solution - vertex projection still works correctly and one endpoint can be imported from a circle or two from an arc.

That's how it has worked so far and it still works in upstream version:
image

@xplwowi
Copy link
Author

xplwowi commented Dec 15, 2021

The same scene but wrong projection under LinkDaily:
image

@wsteffe
Copy link

wsteffe commented Dec 15, 2021

I see. you are right. There is a problem with projection ox XZ plane.
The following screenshot taken from my build shows two projections:

  1. The top linear edge (a diameter) of the half cylinder. This is OK
  2. The top circular edge of the full cylinder. This is the one which triggered the error message. In my opinion it has the correct shape but a bad placement.

test
.

@wsteffe
Copy link

wsteffe commented Dec 15, 2021

To better understand this problem I have done a second test with following steps:

  1. Opening the test document provided by xplwowi and start a sketch in XZ plane
  2. Activating the external geometry import
  3. Selecting the upper circular edge of the full cylinder:
    Nothing becomes visible after this first click.
  4. After selecting again the upper circular edge of the full cylinder the following messages are displayed in the report view

18:14:14 Link to Edge3 already exists in this sketch.
18:14:14 App.getDocument('test').getObject('Sketch002').addExternal(Part.importExternalObject((FreeCAD.getDocument('test').getObject('Body'), 'Pad001.Edge3'), (FreeCAD.getDocument('test').getObject('Body'), 'Sketch002.')), False)
18:14:14 Failed to add external geometry: Not able to add external shape element

...and the imported edge appears in the sketch but with a wrong placement as shown in the following image:

test

@xplwowi
Copy link
Author

xplwowi commented Dec 15, 2021

The problem clearly concerns the projection of a circle and an arc onto a segment. It seems that it appeared with commit 343a0f9

Even slightly tilting the plane makes projection ok, involving "to ellipse conversion".
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants