Inconsistent Wall alignment on multi line sketch

A forum dedicated to the Draft, Arch and BIM workbenches development.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
mrevl
Posts: 5
Joined: Sun Feb 11, 2024 3:32 pm

Inconsistent Wall alignment on multi line sketch

Post by mrevl »

Hello everyone,

A wall which is based on a multi line sketch, of which one of the lines is running in the opposite direction of the original one, causes the wall generated on top to become partial when aligned to the right or to the left. So far I have only seen this behaviour with walls, however it might also behave similarly in other objects.
This was tested with freecad-git 0.22.0devR35823, see attachment for demo.

So imagine the following - start a new sketch, draw a line from 0 to 100 and from 200 to 100. Forget y/z for the moment. Both lines coincide at 100 but, one goes from "left" to "right" and the other goes from "right" to "left". A left or right aligned wall generated on top of such a sketch will only generate the first section of the wall, not the latter section. No errors are given, nothing on the console, just.. no wall. A center aligned wall does generate a full wall, as expected.
Rewiring the sketch from e.g.
[<Line segment (0,0,0) (1000,0,0) >, <Line segment (2000,0,0) (1000,0,0) >]
to
[<Line segment (0,0,0) (1000,0,0) >, <Line segment (1000,0,0) (2000,0,0) >]
solves the problem as well.

I personally didn't expect this behaviour. I expected either that the wall would determine "left" or "right" based on the first line segment or on a per line segment basis. Either way, I expected a warning in the console notifying me that there's an inconclusive condition.

So my first question to this forum is - would you consider this a bug? If not, can we have a warning in the console?
Attachments
wall_alignment_behaviour.FCStd
(12.48 KiB) Downloaded 8 times
User avatar
ProjectBP
Posts: 366
Joined: Tue Jun 06, 2023 2:33 pm
Contact:

Re: Inconsistent Wall alignment on multi line sketch

Post by ProjectBP »

Hi.
This seems to be an issue that causes a build error when drawing a sketch in different directions.
Another example of this behavior can be seen in this thread.
viewtopic.php?p=717663#p717663

But your case is even more interesting.
the program cannot match two walls with different references. I'm afraid at the moment there is only one way to do this - to build two separate sketches.
because if two lines connect to a point in one sketch, the program does not know what to do and ignores one of the lines.

you can select the common vertex and press the del button and set the gap to 0.001mm. you will get what you need, but you will have two separate segments
Attachments
1241фяif.gif
1241фяif.gif (398.58 KiB) Viewed 573 times
There may be a misunderstanding :!: . I communicate with the help of a translator :P
paullee
Veteran
Posts: 5081
Joined: Wed May 04, 2016 3:58 pm

Re: Inconsistent Wall alignment on multi line sketch

Post by paullee »

mrevl wrote: Sun Feb 11, 2024 3:59 pm I personally didn't expect this behaviour. I expected either that the wall would determine "left" or "right" based on the first line segment or on a per line segment basis. Either way, I expected a warning in the console notifying me that there's an inconclusive condition.

So my first question to this forum is - would you consider this a bug? If not, can we have a warning in the console?
Interesting idea - currently the control is 'per segment' so user can assign either 'left/center/right' to every each segment - controlling based on first segment as you suggested maybe easier for most people ?

EDIT - Maybe add a switch / an attribute to switch between the new behaviour and the default behaviour ?

Indeed it is a corner case when 2 consecutive segments are both colinear and opposite in Align, the wall solid would only 'touch' at 1 corner making it non-manifold which is not accepted in OCCT. Make them in a slight angle to see how segments in different Align are supposedly joined.

Feel free to file a bug and feature request for the above :)
paullee
Veteran
Posts: 5081
Joined: Wed May 04, 2016 3:58 pm

Re: Inconsistent Wall alignment on multi line sketch

Post by paullee »

Demo -

wall_alignment_behaviour_r.FCStd
(16.96 KiB) Downloaded 7 times
Screenshot from 2024-02-12 10-53-18.png
Screenshot from 2024-02-12 10-53-18.png (174.24 KiB) Viewed 494 times
mrevl
Posts: 5
Joined: Sun Feb 11, 2024 3:32 pm

Re: Inconsistent Wall alignment on multi line sketch

Post by mrevl »

Thank you, it might sound silly, but I never considered the behaviour of a wall at an angle as I simply don't have any walls with angles and opposite sketch directions! I do have walls that I extended an itsy tiny bit with a new segment though.
I'll file a bug report for this.
paullee
Veteran
Posts: 5081
Joined: Wed May 04, 2016 3:58 pm

Re: Inconsistent Wall alignment on multi line sketch

Post by paullee »

In fact, to further demonstrate how individual segment could be controlled currently, see below screencapture and model - mind you the order might change might change before the 'toponaming algorithm' is adopted :)

For reference please.

wall_alignment_behaviour_r2.FCStd
(16.81 KiB) Downloaded 4 times

Screenshot from 2024-02-16 01-30-04.png
Screenshot from 2024-02-16 01-30-04.png (125.85 KiB) Viewed 280 times
paullee
Veteran
Posts: 5081
Joined: Wed May 04, 2016 3:58 pm

Re: Inconsistent Wall alignment on multi line sketch

Post by paullee »

paullee wrote: Thu Feb 15, 2024 5:33 pm
wall_alignment_behaviour_r2.FCStd

Seems I posted the model file before saving, here you go the actual revised model file :)

wall_alignment_behaviour_r2.FCStd
(16.93 KiB) Downloaded 7 times
Post Reply