"Part.OCCError: Both points are equal" in Arch workbench

A forum dedicated to the Draft, Arch and BIM workbenches development.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
esteban.dugueperoux
Posts: 13
Joined: Sun Apr 25, 2021 6:20 pm

"Part.OCCError: Both points are equal" in Arch workbench

Post by esteban.dugueperoux »

Hi,

I'm new to FreeCAD 0.19 on Linux Fedora 36 on and try to follow https://wiki.freecadweb.org/Manual:BIM_modeling.
At the step to add the second window, I get following Python exception:
22:34:40 Traceback (most recent call last):
22:34:40 File "/usr/lib64/freecad/Mod/Draft/DraftGui.py", line 1328, in validatePoint
22:34:40 self.pointcallback(FreeCAD.Vector(numx,numy,numz),self.relativeMode)
22:34:40 File "/usr/lib64/freecad/Mod/Draft/draftguitools/gui_snapper.py", line 1403, in getcoords
22:34:40 accept()
22:34:40 File "/usr/lib64/freecad/Mod/Draft/draftguitools/gui_snapper.py", line 1425, in accept
22:34:40 callback(self.pt, obj)
22:34:40 File "/usr/lib64/freecad/Mod/Arch/ArchWindow.py", line 281, in getPoint
22:34:40 FreeCADGui.doCommand("win = Arch.makeWindowPreset(\"" + WindowPresets[self.Preset] + "\"," + wp + "placement=pl)")
22:34:40 File "<string>", line 1, in <module>
22:34:40 File "/usr/lib64/freecad/Mod/Arch/ArchWindowPresets.py", line 490, in makeWindowPreset
22:34:40 default = makeSketch(windowtype,width,height,h1,h2,h3,w1,w2,o1,o2)
22:34:40 File "/usr/lib64/freecad/Mod/Arch/ArchWindowPresets.py", line 193, in makeSketch
22:34:40 addFrame(s,p1,p2,p3,p4,p5,p6,p7,p8)
22:34:40 File "/usr/lib64/freecad/Mod/Arch/ArchWindowPresets.py", line 76, in addFrame
22:34:40 s.addGeometry(Part.LineSegment(p5,p6))
22:34:40 Part.OCCError: Both points are equal


and get same exeption from master build (commitId=073bf3215c17a2db0175a7c377a3b3a4b38bb0f0).

Is it a known bug?

If I understand the "OCCError: Both points are equal" message comes from OpenCascade library.

P.S.: In attachment a project file to reproduce.

Regards.
Attachments
test.FCStd
(35.18 KiB) Downloaded 17 times
NHSA_Rainer
Posts: 104
Joined: Mon Aug 30, 2021 3:37 pm

Re: "Part.OCCError: Both points are equal" in Arch workbench

Post by NHSA_Rainer »

Have you seen that in Mur003 you have two times a line with the same name Line002 ?
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: "Part.OCCError: Both points are equal" in Arch workbench

Post by Roy_043 »

esteban.dugueperoux wrote: Sun Jun 26, 2022 8:42 pm Is it a known bug?
First check the window Width and the Height values you have entered. Maybe one of them is zero?
User avatar
esteban.dugueperoux
Posts: 13
Joined: Sun Apr 25, 2021 6:20 pm

Re: "Part.OCCError: Both points are equal" in Arch workbench

Post by esteban.dugueperoux »

Hello,

Thanks for your quick answers.
I find very complex to follow this tutorial.
I try again and know when I try to add the door (first window) and change position, a part of the door remains at the previous location.
See attached screenshot.
And I don't see where to change that in properties.

Regards.
Attachments
test2.FCStd
(32.55 KiB) Downloaded 14 times
screenshot.png
screenshot.png (24.21 KiB) Viewed 1248 times
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: "Part.OCCError: Both points are equal" in Arch workbench

Post by Roy_043 »

Select Mur4 and Porte in the Tree view.
Right-click and select "Recompute object" (see Std_Refresh).
User avatar
esteban.dugueperoux
Posts: 13
Joined: Sun Apr 25, 2021 6:20 pm

Re: "Part.OCCError: Both points are equal" in Arch workbench

Post by esteban.dugueperoux »

Thanks @Roy_043 it works.
I continue my tutorial :)
User avatar
esteban.dugueperoux
Posts: 13
Joined: Sun Apr 25, 2021 6:20 pm

Re: "Part.OCCError: Both points are equal" in Arch workbench

Post by esteban.dugueperoux »

Now when I try to add second window, I get "<class 'Part.OCCError'>" without further details and "Refresh" is grayed. :(
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: "Part.OCCError: Both points are equal" in Arch workbench

Post by Roy_043 »

Without a new file it is not possible to assist.
User avatar
esteban.dugueperoux
Posts: 13
Joined: Sun Apr 25, 2021 6:20 pm

Re: "Part.OCCError: Both points are equal" in Arch workbench

Post by esteban.dugueperoux »

Hi Roy,

I have tested again master, uptodate of today (commitId c7c43fcf4b36e795968f0214e32e87af8211d7d7) with https://github.com/EstebanDugueperoux2/ ... est2.FCStd file.

I get yet same stacktrace as in my initial post when trying to add second window:

Code: Select all

<class 'Part.OCCError'>
Traceback (most recent call last):
  File "/home/estebandugueperoux/git/freecad-build/Mod/Draft/draftguitools/gui_snapper.py", line 1418, in click
    accept()
  File "/home/estebandugueperoux/git/freecad-build/Mod/Draft/draftguitools/gui_snapper.py", line 1434, in accept
    callback(self.pt, obj)
  File "/home/estebandugueperoux/git/freecad-build/Mod/Arch/ArchWindow.py", line 315, in getPoint
    FreeCADGui.doCommand("win = Arch.makeWindowPreset('" + WindowPresets[self.Preset] + "', " + wp + "placement=pl)")
  File "<string>", line 1, in <module>
  File "/home/estebandugueperoux/git/freecad-build/Mod/Arch/ArchWindowPresets.py", line 490, in makeWindowPreset
    default = makeSketch(windowtype,width,height,h1,h2,h3,w1,w2,o1,o2)
  File "/home/estebandugueperoux/git/freecad-build/Mod/Arch/ArchWindowPresets.py", line 193, in makeSketch
    addFrame(s,p1,p2,p3,p4,p5,p6,p7,p8)
  File "/home/estebandugueperoux/git/freecad-build/Mod/Arch/ArchWindowPresets.py", line 76, in addFrame
    s.addGeometry(Part.LineSegment(p5,p6))
Part.OCCError: Both points are equal
I get this exception because I inverted position and size.
Indeed I have tried to set by mistake 1m for "Local X", 1m for "Local Y" and 0 for "Local Z" then 0.6m for width and 1.1m for height.
But this should not trigger a stacktrace, are you agree it is a bug?

Regards.
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: "Part.OCCError: Both points are equal" in Arch workbench

Post by Roy_043 »

You are not providing much details. I can't reproduce with the preset "Fixed".
Post Reply