Extrude Wire along normal is not working

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
Palmtree
Posts: 104
Joined: Wed Apr 08, 2020 5:06 am

Extrude Wire along normal is not working

Post by Palmtree »

In the attached model, the intention is to create a variable height wall.
I have created three wires => extrude along normal (100 mm for all 3 walls) => convert to wall
All good except Extrude Wire002 along normal is not working (strange extrusion in plan – Image 1 & Image 2)
It will work if the custom direction is used along X: 100mm

Am I missing something or is it possible bug? Can someone confirms please

One more Question: is their any approach to model the variable wall height better than my approach I have used
Attachments
Image 1.jpg
Image 1.jpg (295.68 KiB) Viewed 1318 times
Image 2.jpg
Image 2.jpg (397.8 KiB) Viewed 1318 times
Variable Height Wall.FCStd
(18.42 KiB) Downloaded 21 times
paullee
Veteran
Posts: 5098
Joined: Wed May 04, 2016 3:58 pm

Re: Extrude Wire along normal is not working

Post by paullee »

Oops, it is Part Extrude problem, @kunda any idea who to ping to have a a look please ? :)

Alternatively, use Arch Panel to directly 'thicken' the Wire Face you make without the need of using Part Extrude :D

Variable Height Wall_r.FCStd
(20.73 KiB) Downloaded 15 times
Screenshot from 2022-08-18 07-21-37.png
Screenshot from 2022-08-18 07-21-37.png (240.79 KiB) Viewed 1251 times
User avatar
Palmtree
Posts: 104
Joined: Wed Apr 08, 2020 5:06 am

Re: Extrude Wire along normal is not working

Post by Palmtree »

paullee wrote: Wed Aug 17, 2022 11:25 pm Alternatively, use Arch Panel to directly 'thicken' the Wire Face you make without the need of using Part Extrude :D
@paullee, Many thanks for confirming and the hint to use 'thicken'
paullee
Veteran
Posts: 5098
Joined: Wed May 04, 2016 3:58 pm

Re: Extrude Wire along normal is not working

Post by paullee »

paullee wrote: Wed Aug 17, 2022 11:25 pm Oops, it is Part Extrude problem, @kunda any idea who to ping to have a a look please ? :)
@chrisb Any idea about Part ? Thanks :)
User avatar
thomas-neemann
Veteran
Posts: 11801
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: Extrude Wire along normal is not working

Post by thomas-neemann »

Palmtree wrote: Wed Aug 17, 2022 5:30 am ...
I would do it this way

https://www.youtube.com/watch?v=WFIrnpZv77c

phpBB [video]
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
chrisb
Veteran
Posts: 53922
Joined: Tue Mar 17, 2015 9:14 am

Re: Extrude Wire along normal is not working

Post by chrisb »

paullee wrote: Sat Aug 20, 2022 8:10 am @chrisb Any idea about Part ? Thanks :)
It is not Part workbench alone. If I downgrade+upgrade I get again a wire and it can be extruded along normal. If I convert it to a sketch, it can be extruded as well.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
chrisb
Veteran
Posts: 53922
Joined: Tue Mar 17, 2015 9:14 am

Re: Extrude Wire along normal is not working

Post by chrisb »

Can it be a problem that the wire has only 3 edges, and not 4?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: Extrude Wire along normal is not working

Post by Roy_043 »

The problem is caused by this portion of the Part code:
https://github.com/FreeCAD/FreeCAD/blob ... #L197-L203

It is assumed that the shape of a Part_Part2DObject always lies on the XY plane defined by its Placement. For a Draft_Wire that need not be the case.

Test code:

Code: Select all

import FreeCAD as App
import Draft

doc = App.ActiveDocument

pts = [App.Vector (0.0, 0.0, 0.0), 
       App.Vector (5.0, 0.0, 3.0),
       App.Vector (5.0, 5.0, 0.0)]
       
wire1 = Draft.make_wire(pts)
wire1.Closed = True
wire1.MakeFace = False
doc.recompute()

extr1 = doc.addObject("Part::Extrusion", "Extrude_wire1")
extr1.Base = wire1
extr1.DirMode = "Normal"
extr1.LengthFwd = 2.0
extr1.Solid = True
doc.recompute()
paullee
Veteran
Posts: 5098
Joined: Wed May 04, 2016 3:58 pm

Re: Extrude Wire along normal is not working

Post by paullee »

chrisb wrote: Sat Aug 20, 2022 12:19 pm Can it be a problem that the wire has only 3 edges, and not 4?
Thanks for the comments, it seems the rest of the wire if Closed is False, have 3 edges also.
Screenshot from 2022-08-20 23-34-42.png
Screenshot from 2022-08-20 23-34-42.png (197.02 KiB) Viewed 990 times
paullee
Veteran
Posts: 5098
Joined: Wed May 04, 2016 3:58 pm

Re: Extrude Wire along normal is not working

Post by paullee »

Roy_043 wrote: Sat Aug 20, 2022 2:42 pm It is assumed that the shape of a Part_Part2DObject always lies on the XY plane defined by its Placement. For a Draft_Wire that need not be the case.

The rest of 2 wires do not lie on XY plane either but have no problem ?
Post Reply