Extruding dwire happen along the plane, not the normal

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
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!
Post Reply
Gunnar
Posts: 5
Joined: Wed Jun 27, 2018 5:02 pm

Extruding dwire happen along the plane, not the normal

Post by Gunnar »

Hello,

Version 0.17, Git 13522

I am completely new to FreeCAD and I am struggling to do some really basic stuff, which actually says a lot more about me than FC ;-). I am trying to make a architectural drawing of our house. I have a dwire as the triangle below the gable which I an trying to extrude along the normal to create a solid to use as the upper gable wall. But when I use the extrude tool, the extrusion is along the Z-axis along the plane and not along the Y-axis as expected.

Before extrusion:
before-extrude.PNG
before-extrude.PNG (24.76 KiB) Viewed 2081 times
After extrusion (3000mm just to show the issue):
after-extrude.PNG
after-extrude.PNG (32.92 KiB) Viewed 2081 times
Using the Y-axis as a custom direction work. I don't understand why using the normal does not work?
chrisb
Veteran
Posts: 54293
Joined: Tue Mar 17, 2015 9:14 am

Re: Extruding dwire happen along the plane, not the normal

Post by chrisb »

Can you upload your file?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Extruding dwire happen along the plane, not the normal

Post by DeepSOIC »

Hi!
Thanks for reporting. I actually expected it could happen when coding Extrude's normal direction determination.
DWire is Part2DObject, just like a sketch. Extrude assumes that Z direction of local coordinate system of sketch is always the normal. It gives much more predictable normal vector direction (whereas determining normal from shape itself may give it either up or down). And it treats DWire just like a sketch.

DWire, if drawn on any plane other than XY, violates that rule of Part2DObject. Unexpected extrusion direction is the outcome. I think, Draft should be fixed, but it can't be fixed completely (DWire can be a 3d curve, i.e. not planar).

As a workaround, you can make Part Compound out of the DWire, and extrude the compound. It should then fall back to determining normal direction from shape itself, and give a proper normal. Or just use custom direction.


Feel free to report it on tracker.
User avatar
meme2704
Veteran
Posts: 2926
Joined: Sat Apr 01, 2017 2:47 pm
Location: Vosges

Re: Extruding dwire happen along the plane, not the normal

Post by meme2704 »

there is a lot of note to make in your drawing
First, since you are new, I advise you to place the axes of coodornées, so you will see better in what way to go
If you want to do extrusion, you have to do only one Dwire closed at a time, no cross line
the extrusion is always in a direction perpendicular to the construction plane of the Dwire, it is set to 1 this direction, otherwise by default Z will be used
"following the normal" is used in case the Dwire is not in one of the 3 general plans
for the extrusion of curved surfaces, I give you an appointment in a few months, when you will not be a beginner, but "confirmed"
and I confirm Chris's request, attach your Fc file
Gunnar
Posts: 5
Joined: Wed Jun 27, 2018 5:02 pm

Re: Extruding dwire happen along the plane, not the normal

Post by Gunnar »

Hi, thank you for the replies! Sorry for my late reply.

I continued to work on the drawing a bit, but I have attached a later version of the file where one of the Dwire gables are still there named Dwire005 (though I must have made it Window008 by mistake, but it still shows the issue). I did notice that the normal for the Dwires was set to [0, 0, 0] in one of the panels.

Thanks for the tip about showing the axis though I don't know how to enable it. In my case the model in not rotated, so it is fairly obvious in the current state.

I will try to make some kind of minimal example and submit a report.
Attachments
Building.fcstd
(223 KiB) Downloaded 45 times
UR_
Veteran
Posts: 1355
Joined: Tue Jan 03, 2017 8:42 pm

Re: Extruding dwire happen along the plane, not the normal

Post by UR_ »

Model stripped down

stripped.FCStd
(5.73 KiB) Downloaded 43 times

Code: Select all

obj = App.getDocument("stripped").getObject("DWire005")
obj.Shape.normalAt(0,0)
gives:

Code: Select all

Vector (1.0, 0.0, -0.0)
FreeCAD 0.18-000011.png
FreeCAD 0.18-000011.png (7.06 KiB) Viewed 1997 times

setting Extrude dir mode to "Normal" switches Dir to [0.00, 0.00, 1.00]
FreeCAD 0.18-000012.png
FreeCAD 0.18-000012.png (4.26 KiB) Viewed 1997 times

:?:
Gunnar
Posts: 5
Joined: Wed Jun 27, 2018 5:02 pm

Re: Extruding dwire happen along the plane, not the normal

Post by Gunnar »

Nice, UR_.

I guess this basically what is needed for an issue report? Perhaps you would like to submit it?
User avatar
bitacovir
Veteran
Posts: 1570
Joined: Sat Apr 19, 2014 6:23 am
Contact:

Re: Extruding dwire happen along the plane, not the normal

Post by bitacovir »

DeepSOIC wrote: Thu Jun 28, 2018 12:54 pm
As a workaround, you can make Part Compound out of the DWire, and extrude the compound. It should then fall back to determining normal direction from shape itself, and give a proper normal. Or just use custom direction.

Here there is another way.
* Draft Trim/Extend tool on the Dwire face
::bitacovir::
==================
One must be absolutely modern.
Arthur Rimbaud (A Season in Hell -1873)

Canal Youtube Grupo Telegram de FreeCAD Español

My personal web site
My GitHub repository
Mini Airflow Tunnel Project
Post Reply