You're welcome.
ArchWall Creation Problem on Sketch
Forum rules
and Helpful information
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help
Also, be nice to others! Read the FreeCAD code of conduct!
Also, be nice to others! Read the FreeCAD code of conduct!
[EDIT] Re: ArchWall Creation Problem on Sketch
It is difficult to single out the problem. Some basic finding:
1. Randomness in ArchWall creation - same file, same sketch, archwall randomly create or not create portion of wall
2. AppImage versions Works Upto _+_ Appimage No Longer Works Upto
1. Randomness in ArchWall creation - same file, same sketch, archwall randomly create or not create portion of wall
- This is difficult to capture
- I have a large file which demonstrate this problem more frequently, but when i single out the sketch (below), it behaves somehow differently
1a. AppImage Version: 0.17.12802 (Git)
- With the previous test file in https://forum.freecadweb.org/posting.ph ... #pr201967
- See video, this file / sketch most of time, since a version explained below, does not create ArchWall.
- But still, randomly, a few edges do create walls.
- In the video, there is a wall in a Wall Object. Repeat build wall on same sketch, most of time no wall.
- At 37s, you see it is still the same sketch with multiple lines / wires.
- See attached file with 1 wall object built 1 wall. A few nos. of arch wall object, on SAME sketch - only 1 Wall Object has 1 edge build 1 wall.
- Report only return something like Wallxxx has invalid shape...
. .
1b. See attach file. 1 sketch, 3 lines inside, 2 of them join by coincidence - i.e. 2 wires expected
- Most of time, it create 1 wall
- Try attached file .
- Somehow ArchWall creation on this sketch return more useful message:-
.
[EDIT]
DraftGeomUtils.connect: unable to connect edges
(<Line object>, ' ', Vector (2563.714859286041, 2736.7619772782828, 0.0), ' ', Vector (2576.738472611051, 2662.901395802359[, 0.0))
(<Line object>, ' ', Vector (2576.7384728698066, 2662.901394334881, 0.0), ' ', Vector (3034.7355414663284, 65.47094576517884, 0.0))
DraftGeomUtils.connect: unable to connect edges
(<Line object>, ' ', Vector (2760.6764098884873, 2771.49161281164, 0.0), ' ', Vector (2773.7000232134974, 2697.631031335716, 0.0))
(<Line object>, ' ', Vector (2773.7000229547416, 2697.631032803194, 0.0), ' ', Vector (3231.6970915512634, 100.20058423349155, 0.0))
DraftGeomUtils: unable to bind wires
[EDIT]
.
2. AppImage versions Works Upto _+_ Appimage No Longer Works Upto
ArchWall Created Without Problem Up to
...
FreeCAD-0.17.git201710112032.glibc2.17-x86_64.AppImage
FreeCAD-0.17.git201710172019.glibc2.17-x86_64.AppImage
FreeCAD-0.17.git201710192347.glibc2.17-x86_64.AppImage
FreeCAD-0.17.git201710221402.glibc2.17-x86_64.AppImage
FreeCAD-0.17.git201710232017.glibc2.17-x86_64.AppImage
[EDIT]
FreeCAD-0.17.git201710252128.glibc2.17-x86_64.AppImage
ArchWall Created WITH Problem Since
[EDIT]FreeCAD-0.17.git201710252128.glibc2.17-x86_64.AppImage
FreeCAD-0.17.git201711011210.glibc2.17-x86_64.AppImage
...
FreeCAD-0.17.git201712101906.glibc-x86_64.AppImage
Version used in 1a
OS: Linux
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.12802 (Git)
Build type: None
Branch: master
Hash: 91bb7ed0c51ba47f011199af7bc0a3a2964cf5be
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: English/UnitedStates (en_US)
Last edited by paullee on Sun Dec 31, 2017 6:48 pm, edited 3 times in total.
Re: ArchWall Creation Problem on Sketch
Taking just a quick look. To me the "randomness" part feels like an Arch Wall creation algorithms robustness related. But i didn't actually look in the files to see how the geometry was constructed. And if it could be done in some other way. That is for the current Arch Wall algorithm to produce more expected results.
P.S. As for the AppImage. We already discussed that thoroughly in this thread. Nothing new to add from my side for now.
P.S. As for the AppImage. We already discussed that thoroughly in this thread. Nothing new to add from my side for now.
Re: ArchWall Creation Problem on Sketch
triplus wrote: ↑Sat Dec 16, 2017 11:39 am Taking just a quick look. To me the "randomness" part feels like an Arch Wall creation algorithms robustness related. But i didn't actually look in the files to see how the geometry was constructed. And if it could be done in some other way. That is for the current Arch Wall algorithm to produce more expected results.
P.S. As for the AppImage. We already discussed that thoroughly in this thread. Nothing new to add from my side for now.
Forgot to highlight -
I do not know this code / function, but guess that the 2 line objects, though given a coincidence constraints, are not continuous/connected somehow.
Note vector of 1 point of the 2 lines should be the same, but it is not, slightly off.
DraftGeomUtils.connect: unable to connect edges
(<Line object>, ' ', Vector (2760.6764098884873, 2771.49161281164, 0.0), ' ', Vector (2773.7000232134974, 2697.631031335716, 0.0))
(<Line object>, ' ', Vector (2773.7000229547416, 2697.631032803194, 0.0), ' ', Vector (3231.6970915512634, 100.20058423349155, 0.0))
DraftGeomUtils: unable to bind wires
Yorik did mention a few post ago about DraftGeomUtils.offsetWire vs Part offset2D..
https://forum.freecadweb.org/posting.ph ... b#pr174292
"... DraftGeomUtils.offsetWire function doesn't like (it fails to produce a correct offset). I must think to switch to the new Part offset2D ..."
Re: ArchWall Creation Problem on Sketch
Now, i desperately needs new git rather than sticking to old (23 Oct git) that ArchWall creation on sketch has no problem...
as I need to use new features like Attachment Offset, Virtual Space etc! but ArchWall still creates with problem on latest gits...
Latest git versions highlighted in red below tested, some bug behaviour is record in video below:-
2 edges in a sketch sometimes create on 1 wall
ArchWall Created Without Problem Up to
...
FreeCAD-0.17.git201710112032.glibc2.17-x86_64.AppImage
FreeCAD-0.17.git201710172019.glibc2.17-x86_64.AppImage
FreeCAD-0.17.git201710192347.glibc2.17-x86_64.AppImage
FreeCAD-0.17.git201710221402.glibc2.17-x86_64.AppImage
[EDIT]
FreeCAD-0.17.git201710252128.glibc2.17-x86_64.AppImage
ArchWall Created WITH Problem Since
[EDIT]FreeCAD-0.17.git201710252128.glibc2.17-x86_64.AppImage
FreeCAD-0.17.git201711011210.glibc2.17-x86_64.AppImage
...
FreeCAD-0.17.git201712101906.glibc-x86_64.AppImage
...
FreeCAD-0.17.git201712161449.glibc-x86_64.AppImage
FreeCAD-0.17.git201712210014.glibc-x86_64.AppImage
No ideas what to be done to possibly narrow down where is bug, the way the sketch is made? constraints problem? sketcher or archwall problem?
as I need to use new features like Attachment Offset, Virtual Space etc! but ArchWall still creates with problem on latest gits...
Latest git versions highlighted in red below tested, some bug behaviour is record in video below:-
2 edges in a sketch sometimes create on 1 wall
ArchWall Created Without Problem Up to
...
FreeCAD-0.17.git201710112032.glibc2.17-x86_64.AppImage
FreeCAD-0.17.git201710172019.glibc2.17-x86_64.AppImage
FreeCAD-0.17.git201710192347.glibc2.17-x86_64.AppImage
FreeCAD-0.17.git201710221402.glibc2.17-x86_64.AppImage
[EDIT]
FreeCAD-0.17.git201710252128.glibc2.17-x86_64.AppImage
ArchWall Created WITH Problem Since
[EDIT]FreeCAD-0.17.git201710252128.glibc2.17-x86_64.AppImage
FreeCAD-0.17.git201711011210.glibc2.17-x86_64.AppImage
...
FreeCAD-0.17.git201712101906.glibc-x86_64.AppImage
...
FreeCAD-0.17.git201712161449.glibc-x86_64.AppImage
FreeCAD-0.17.git201712210014.glibc-x86_64.AppImage
No ideas what to be done to possibly narrow down where is bug, the way the sketch is made? constraints problem? sketcher or archwall problem?
Re: ArchWall Creation Problem on Sketch
Hi, firstly Happy New Year 2018!
My first attempt to look in ArchWall.py with my very beginner's level of python and note some difference, sorry if my understanding does not make any sense ( i desperately need to use new features in latest git (AppImage) and in Fedora only latest AppImage as of 21.12.2017 works!)
I find AppImage as of 1.11.2017 has problem whilst 25.10.2017 has no problem on the sketch with only linear walls I post on 30.11.2017 with following difference:
[Summary Updated in] https://forum.freecadweb.org/viewtopic. ... 10#p204530
(The file originally post on 11.5.2017 with curve walls still have problem on whatever git of AppImage)
- I first look at latest 28.12.2017 AppImage and wonder why sketch's shape.Wires are not used directly.
Then I note in 25.10.2017 AppImage version, and note xxx.Shape.Wires should be always used (the 3rd line below would not be executed in this order right?)
ArchWall.py in FreeCAD-0.17.git201710252128.glibc2.17-x86_64.AppImageCode: Select all
elif obj.Base.Shape.Wires: basewires = obj.Base.Shape.Wires elif len(obj.Base.Shape.Edges) == 1: basewires = [Part.Wire(obj.Base.Shape.Edges)]
- Then from 1.11.2017 onward AppImage version, xxx.Shape.Wires are not used directly, but the underlying edges are used
ArchWall.py in FreeCAD-0.17.git201711011210.glibc2.17-x86_64.AppImageArchWall.py in FreeCAD-0.17.git201712281626.glibc-x86_64.AppImageCode: Select all
elif len(obj.Base.Shape.Edges) == 1: basewires = [Part.Wire(obj.Base.Shape.Edges)] else: # basewires = obj.Base.Shape.Wires basewires = [Part.Wire(cluster) for cluster in Part.getSortedClusters(obj.Base.Shape.Edges)]
Code: Select all
elif len(obj.Base.Shape.Edges) == 1: basewires = [Part.Wire(obj.Base.Shape.Edges)] else: # basewires = obj.Base.Shape.Wires basewires = [Part.Wire(cluster) for cluster in Part.getSortedClusters(obj.Base.Shape.Edges)]
- I find sometime when there is at least a few wires out of all wires in a sketch creates wall, FC return something like below indicating some wires are not connected - this should happen 'within ArchWall.py'
e.g.
DraftGeomUtils.connect: unable to connect edges
(<Line object>, ' ', Vector (2563.714859286041, 2736.7619772782828, 0.0), ' ', Vector (2576.738472611051, 2662.901395802359[, 0.0))
(<Line object>, ' ', Vector (2576.7384728698066, 2662.901394334881, 0.0), ' ', Vector (3034.7355414663284, 65.47094576517884, 0.0))
DraftGeomUtils.connect: unable to connect edges
(<Line object>, ' ', Vector (2760.6764098884873, 2771.49161281164, 0.0), ' ', Vector (2773.7000232134974, 2697.631031335716, 0.0))
(<Line object>, ' ', Vector (2773.7000229547416, 2697.631032803194, 0.0), ' ', Vector (3231.6970915512634, 100.20058423349155, 0.0))
DraftGeomUtils: unable to bind wires
. - Whilst sometime not a single wall out of all wires in the sketch is built, it just return something like " Wall xxx, has invalid shape" - this message should be executed in "ArchComponent.py' under the applyShape function? No complaint from DraftGeomUtils.bind(w1,w2) though no idea why if no wall are able to be built.
. - Then in latest git, for the curvilinear walls, it also return "...Error: Invalid base object" which is in ArchWall.py
DraftGeomUtils.connect: unable to connect edges
(Circle (Radius : 10645.3, Position : (-647402, 88665.1, 0), Direction : (0, 0, 1)), ' ', Vector (-657677.3835753398, 91446.4051243193, 0.0), ' ', Vector (-654851.0528868298, 81060.40900013619, 0.0))
(<Line object>, ' ', Vector (-654851.0528868298, 81060.40900013619, 0.0), ' ', Vector (-616691.3591793025, 47654.16828812501, 0.0))
(Circle (Radius : 6596.4, Position : (-612305, 52580.8, 0), Direction : (0, 0, 1)), ' ', Vector (-616608.1338217928, 47581.31009519442, 0.0), ' ', Vector (-607329.3220672106, 48249.99413636289, 0.0))
(<Line object>, ' ', Vector (-607329.3220672106, 48249.9941363629, 0.0), ' ', Vector (-562001.3422050903, 101217.00437984869, 0.0))
(<Line object>, ' ', Vector (-562001.3422050903, 101217.00437984869, 0.0), ' ', Vector (-633632.1284805835, 163924.93141537756, 0.0))
(<Line object>, ' ', Vector (-633632.1284805835, 163924.93141537756, 0.0), ' ', Vector (-657302.1770492746, 92577.37320749542, 0.0))
DraftGeomUtils.connect: unable to connect edges
(Circle (Radius : 10445.3, Position : (-647402, 88665.1, 0), Direction : (0, 0, 1)), ' ', Vector (-657315.7913502145, 91954.16528042585, 0.0), ' ', Vector (-654282.0231833704, 80805.89654847365, 0.0))
(<Line object>, ' ', Vector (-654251.4010591158, 80756.91302551462, 0.0), ' ', Vector (-616498.3771410903, 47706.684313561054, 0.0))
(Circle (Radius : 6429.77, Position : (-612305, 52580.8, 0), Direction : (0, 0, 1)), ' ', Vector (-616498.3771410903, 47706.684313561, 0.0), ' ', Vector (-607384.0031307156, 48442.37392036436, 0.0))
(<Line object>, ' ', Vector (-607384.0031307156, 48442.37392036432, 0.0), ' ', Vector (-562235.0722208511, 101200.16046323373, 0.0))
(<Line object>, ' ', Vector (-562235.0722208511, 101200.16046323374, 0.0), ' ', Vector (-633553.0161404269, 163634.21509489085, 0.0))
(<Line object>, ' ', Vector (-633553.0161404269, 163634.21509489082, 0.0), ' ', Vector (-657349.042716403, 91906.9270701643, 0.0))
DraftGeomUtils: unable to bind wires
Error: Invalid base object
DraftGeomUtils.connect: unable to connect edges
(Circle (Radius : 10645.3, Position : (-647402, 88665.1, 0), Direction : (0, 0, 1)), ' ', Vector (-657677.3835753398, 91446.4051243193, 0.0), ' ', Vector (-654851.0528868298, 81060.40900013619, 0.0))
(<Line object>, ' ', Vector (-654851.0528868298, 81060.40900013619, 0.0), ' ', Vector (-616691.3591793025, 47654.16828812501, 0.0))
(Circle (Radius : 6596.4, Position : (-612305, 52580.8, 0), Direction : (0, 0, 1)), ' ', Vector (-616608.1338217928, 47581.31009519442, 0.0), ' ', Vector (-607329.3220672106, 48249.99413636289, 0.0))
(<Line object>, ' ', Vector (-607329.3220672106, 48249.9941363629, 0.0), ' ', Vector (-562001.3422050903, 101217.00437984869, 0.0))
(<Line object>, ' ', Vector (-562001.3422050903, 101217.00437984869, 0.0), ' ', Vector (-633632.1284805835, 163924.93141537756, 0.0))
(<Line object>, ' ', Vector (-633632.1284805835, 163924.93141537756, 0.0), ' ', Vector (-657302.1770492746, 92577.37320749542, 0.0))
DraftGeomUtils.connect: unable to connect edges
(Circle (Radius : 10445.3, Position : (-647402, 88665.1, 0), Direction : (0, 0, 1)), ' ', Vector (-657315.7913502145, 91954.16528042585, 0.0), ' ', Vector (-654282.0231833704, 80805.89654847365, 0.0))
(<Line object>, ' ', Vector (-654251.4010591158, 80756.91302551462, 0.0), ' ', Vector (-616498.3771410903, 47706.684313561054, 0.0))
(Circle (Radius : 6429.77, Position : (-612305, 52580.8, 0), Direction : (0, 0, 1)), ' ', Vector (-616498.3771410903, 47706.684313561, 0.0), ' ', Vector (-607384.0031307156, 48442.37392036436, 0.0))
(<Line object>, ' ', Vector (-607384.0031307156, 48442.37392036432, 0.0), ' ', Vector (-562235.0722208511, 101200.16046323373, 0.0))
(<Line object>, ' ', Vector (-562235.0722208511, 101200.16046323374, 0.0), ' ', Vector (-633553.0161404269, 163634.21509489085, 0.0))
(<Line object>, ' ', Vector (-633553.0161404269, 163634.21509489082, 0.0), ' ', Vector (-657349.042716403, 91906.9270701643, 0.0))
DraftGeomUtils: unable to bind wires
Error: Invalid base object
It seem using the shape.Wires has less problem - seem ok on the sketch with linear walls on 30.11.2017, though still no okay with the curvilinear wall on 11.5.2017.
Hope this helps.
- Attachments
-
- Test _ Arch Wall _ on Sketch_ bug question_ 2.fcstd
- (6.78 KiB) Downloaded 48 times
[Edit] Re: ArchWall Creation Problem on Sketch
Further attempt to find what is happening, by manually creating ArchWall over each Wire in the sketch:-
- use the same sketch with multiple linear walls
- run the following in console to find each Wires in the sketch
- run ArchWall over each of these individual Wires
Result
FreeCAD-0.17.git201712281626.glibc-x86_64.AppImage
OS: Linux
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.12871 (Git)
Build type: None
Branch: master
Hash: 070395d67ca45826f1481da80aa9e0f6a9ef4292
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: English/UnitedStates (en_US)
- use the same sketch with multiple linear walls
- run the following in console to find each Wires in the sketch
- run ArchWall over each of these individual Wires
Result
- running ArchWall over the whole sketch - no wall created as reported previously, message .."...has invalid shape"
- 2 Wires out of the 8 individual wires does not create wall
- No sort of GeomUtils kind of errors messages [EDIT]
- Try a few time ArchWall on the 2 Wires, sometime - Wall006 return "...has invalid shape", but sometime doesnot , e.g.
- Wall006 return "...has invalid shape"
- Wall008 return nothing, but find 4 dots on screen (see screencapture) - maybe it is still sort of random !
Code: Select all
>>> s=Gui.Selection.getSelection()
>>> s0=s[0]
>>> s0.Shape.Wires
[<Wire object at 0x824a280>, <Wire object at 0x54c8c70>, <Wire object at 0x70a5c10>, <Wire object at 0x7a7fdd0>, <Wire object at 0x72c6d30>, <Wire object at 0x72c9360>, <Wire object at 0x6be5990>, <Wire object at 0x72c6700>]
>>> s0sw0=s0.Shape.Wires[0]
>>> s0sw1=s0.Shape.Wires[1]
...
>>> s0sw6=s0.Shape.Wires[6]
>>> s0sw7=s0.Shape.Wires[7]
>>> Part.show(s0sw0)
...
>>> Part.show(s0sw7)
FreeCAD-0.17.git201712281626.glibc-x86_64.AppImage
OS: Linux
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.12871 (Git)
Build type: None
Branch: master
Hash: 070395d67ca45826f1481da80aa9e0f6a9ef4292
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: English/UnitedStates (en_US)
- Attachments
-
- Test _ Arch Wall _ on Sketch_ bug question_ 2_ Manual Create On Wires.fcstd
- (30.3 KiB) Downloaded 45 times
Re: ArchWall Creation Problem on Sketch
the getSortedClusters way was introduced some time ago because the shape.Wires gave problems, I don't remember exactly what... If it works better for you, maybe we could add a property in the wall object to control which method to use...
Re: ArchWall Creation Problem on Sketch
Thanks, curious about what others people use sketch with ArchWall. Option is good as this might not break other's model
BTW, seem the effect would be 'global' rather than 'per object' right?
Just have some little more findings to share if it help:-
- The 2 wires 'isolated from the sketch' went wrong building wall in the post on Jan 01, 2018 11:12 am, now upon re-open and recompute become okay
- I always suspect there maybe some problems about precision level (earlier posts indicating consecutive lines has verrrrry slight difference *.000000? mm in their common endpoints)
- Or OCC kernel problem?
. - I switch the comment in ArchWall.py in recent latest AppImages below... only test a few sketch file, so far okay
FreeCAD-0.17.git201711011210.glibc2.17-x86_64.AppImage
FreeCAD-0.17.git201801022222.glibc-x86_64.AppImage
Code: Select all
else: basewires = obj.Base.Shape.Wires # basewires = [Part.Wire(cluster) for cluster in Part.getSortedClusters(obj.Base.Shape.Edges)]
2 wires went wrong previously now upon re-open and recompute become okay Test switching comment in ArchWall.py - so far so good
Re: ArchWall Creation Problem on Sketch
No, I was more thinking of adding a boolean property to each Arch Wall...