Testing TechDraw
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Testing TechDraw
I started to play with the new workbench. This is a great step forward. Thanks for the efforts put in. Self-updating dimensions is a very acknowledged feature.
Also having the preferences available is good. I downloaded and installed the font osifont and wrote "osifont" into the font setting. This gave a much better look of the dimension numbers.
I came across two issues.
1. I put a hatch into a view-face. This worked. I used a pattern from yorik given in src/Mod/Draft/Resources/patterns/.
But at viewing the exported drawing in inkscape, the pattern was not limited any more to the view-face.
2. I was wondering about the direction settings for a view.This seems to be totally different compared to the former approach. I could not generate a view from the absolute x-direction. This gave an exclamation mark in the view icon.
At setting the parameter "x-direction" in the view-data to [0.0, 1.0, 0.0] I got an upside down projection.
The former approach with single view direction was more logically to me. It allows for example to use some macros to set the view perpendicular to a given face and get the view direction, which could then be used as projection direction in the drawing view. It is very important to have an easy method to define the projection direction for a not standard view. Consider to put dimensions for bores on a skewed face.
A feature request: Would at be possible to reuse a sketch with it already defined dimensions for a drawing view?
Ulrich
Also having the preferences available is good. I downloaded and installed the font osifont and wrote "osifont" into the font setting. This gave a much better look of the dimension numbers.
I came across two issues.
1. I put a hatch into a view-face. This worked. I used a pattern from yorik given in src/Mod/Draft/Resources/patterns/.
But at viewing the exported drawing in inkscape, the pattern was not limited any more to the view-face.
2. I was wondering about the direction settings for a view.This seems to be totally different compared to the former approach. I could not generate a view from the absolute x-direction. This gave an exclamation mark in the view icon.
At setting the parameter "x-direction" in the view-data to [0.0, 1.0, 0.0] I got an upside down projection.
The former approach with single view direction was more logically to me. It allows for example to use some macros to set the view perpendicular to a given face and get the view direction, which could then be used as projection direction in the drawing view. It is very important to have an easy method to define the projection direction for a not standard view. Consider to put dimensions for bores on a skewed face.
A feature request: Would at be possible to reuse a sketch with it already defined dimensions for a drawing view?
Ulrich
- wandererfan
- Veteran
- Posts: 6317
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: Testing TechDraw
This is actually how it is drawn behind the scenes, but the hatch is supposed to be clipped by the face boundary. Works in Print and Export Pdf. https://github.com/WandererFan/FreeCAD- ... /issues/61ulrich1a wrote:But at viewing the exported drawing in inkscape, the pattern was not limited any more to the view-face.
ulrich1a wrote:I could not generate a view from the absolute x-direction. This gave an exclamation mark in the view icon.
At setting the parameter "x-direction" in the view-data to [0.0, 1.0, 0.0] I got an upside down projection.
The view direction and the x-axis direction can't be the same. 1 is perpendicular to page surface and 1 is parallel. Have to add an error message for that.
X-direction = [0.0,-1.0,0.0] with view direction = [1,0,0] will give you "right side up" from absolute x-direction. If I remember my right-hand-rule correctly this is how it should work. "XAxis Direction" might not be the best name for the Property. Open to suggestions. How did you rotate the projection before?
ulrich1a wrote:A feature request: Would at be possible to reuse a sketch with it already defined dimensions for a drawing view?
Maybe? https://github.com/WandererFan/FreeCAD- ... /issues/62
Thanks for the feedback.
wf
Re: Testing TechDraw
I am used to the old Drawing-Workbench. There one has to adjust an angle, so it is only one number to be fiddling with. But with more thoughts on this topic, I am finding a direction vector has some potential. The approach about handling the scale-setting is a practical one. Using a similar feature here could provide an automatical rotation by using an edge of the shape as direction vector for the "x-axis"-setting alternative to give an absolute setting. More options could be using an edge in y-direction for the Rotation calculation.wandererfan wrote:How did you rotate the projection before?
I am having actually no actual FreeCAD-version on this machine. My question is, which coordinate-system is used in the view-direction setting. Is it the part-coordinate-system or the super-placement system? This has the potential of confusing the user for parts with a nonzero super-placement. What I am missing is a functionality that allows setting of the view like the plane-settings in the famous work-feature-macro. There one can choose to define a plane for example by selecting a face, or three vertexes or two edges.
What was asked several times about the former Drawing-Workbench, was how to define a symmetry line in a drawing. A button that creates a symmetry line in a view, from a selected cylindrical face and a selected view would be cool.
Excuse me, but I have much more ideas than programming knowledge in c++.
Ulrich
- wandererfan
- Veteran
- Posts: 6317
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: Testing TechDraw
I am woefully under-informed on the new PartDesign work. I would have to guess that it is the part-coordinate-system.ulrich1a wrote:My question is, which coordinate-system is used in the view-direction setting. Is it the part-coordinate-system or the super-placement system? This has the potential of confusing the user for parts with a nonzero super-placement.
I hope to include things like this in the future. Also section marks, leaders, etc.ulrich1a wrote:What was asked several times about the former Drawing-Workbench, was how to define a symmetry line in a drawing. A button that creates a symmetry line in a view, from a selected cylindrical face and a selected view would be cool.
wf
- wandererfan
- Veteran
- Posts: 6317
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: Testing TechDraw
Unfortunately, QtSvg does not support clipping when generating Svg from a scene. Qt has said they will not be fixing this issue.ulrich1a wrote:1. I put a hatch into a view-face. This worked. I used a pattern from yorik given in src/Mod/Draft/Resources/patterns/. But at viewing the exported drawing in inkscape, the pattern was not limited any more to the view-face.
For now, I'm going to skip hatches when exporting to Svg. They are probably easy to add in Inkscape or ????
Open to brilliant alternatives.
wf
Re: Testing TechDraw
I had a look into an exported SVG-file. I was a little disappointed, as it totally missed the structure known from the SVG-files of the old Drawing-Workbench. For example text was not exported as editable text. So I see two possible solutions:wandererfan wrote:Unfortunately, QtSvg does not support clipping when generating Svg from a scene. Qt has said they will not be fixing this issue.
For now, I'm going to skip hatches when exporting to Svg. They are probably easy to add in Inkscape or ????
Open to brilliant alternatives.
1. Supporting of svg by kind of double-entry bookkeeping of all drawing primitives. In other words: each drawing primitive needs to be drawn to the QT-canvas and at the same time put as SVG-command in a to be exported text-buffer. This could be a lot of programming work.
2. Export to PDF and let inkscape make a SVG from it. I had not looked how well this works for FreeCAD-drawings, but have used this approach at other occasions.
Ulrich
Re: Testing TechDraw
The new PartDesign gives us more options than actually handled by TechDraw.wandererfan wrote:I am woefully under-informed on the new PartDesign work. I would have to guess that it is the part-coordinate-system.ulrich1a wrote:
My question is, which coordinate-system is used in the view-direction setting. Is it the part-coordinate-system or the super-placement system? This has the potential of confusing the user for parts with a nonzero super-placement.
I did create a "Part" with a "Body" containing a box "Pocket001" with individual faces. The Body got a placement of 45° around the z-axis. The Part got another placement of 45° around the z-axis.
So the "Pocket001" got a total rotation of 90° in the global coordinate system.
TechDraw lets me create a view of the Pocket001, where I look at it as original created.
TechDraw lets me also create a view of the "Body", which is 45° rotated.
But TechDraw does let me create a view of the "Part" as I see it in the actual 3D-space.
I would expect, that I could also create a view of the highest level thing: the "Part". Anything wrong with this expectation?
Attached is my test-object.
Ulrich
- Attachments
-
- TechDraw_CoSy_Test.fcstd
- (57.06 KiB) Downloaded 93 times
Re: Testing TechDraw
Untested, but my guess is that techdraw can only create views of Part::Features, meaning anything that exposes a shape. The Part object is not a Part::Feature, it has no shape. But the body is.
- wandererfan
- Veteran
- Posts: 6317
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: Testing TechDraw
This is correct. PartFeature.Shape -> HLR/projection algorithm -> drawing.ickby wrote:Untested, but my guess is that techdraw can only create views of Part::Features, meaning anything that exposes a shape. The Part object is not a Part::Feature, it has no shape. But the body is.
What is the Part object? A container for Part::Feature+Body?
Thanks for the file, Ulrich. I will spend some time with it.
wf
- DeepSOIC
- Veteran
- Posts: 7896
- Joined: Fri Aug 29, 2014 12:45 am
- Location: used to be Saint-Petersburg, Russia
Re: Testing TechDraw
Part object ("App::Part") is a subclass of "App::DocumentObjectGroup". From user perspective, two main differences: 1) Part has Placement; and 2) if hidden, children are hidden without altering their visibility states.wandererfan wrote:What is the Part object? A container for Part::Feature+Body?
It can hold anything, not just PartDesign stuff.