Hi,
I have a steel part (strut-connection, green), which is rotated among
the z-axis. When loading the part in techdraw, I get an isometrie.
How can I get a planar view? By calculating the normal-vector
of the green face and adjusting in techdraw? Or is there a smarter way
I dont know?
system:
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14098 (Git)
Build type: Release
Branch: master
Hash: 0c33d00bfdf8270e7e5b33d792bf0ad9bbbfc819
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: German/Germany (de_DE)
How to align tilted parts
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
-
- Veteran
- Posts: 3156
- Joined: Sat May 20, 2017 12:06 pm
- Location: Germany
-
- Veteran
- Posts: 3156
- Joined: Sat May 20, 2017 12:06 pm
- Location: Germany
Re: How to align tilted parts
Copy parts to load in techdraw, use workfeatures-macro
to align parts along y-axis, load in techdraw. Not very elegant,
but it works.
to align parts along y-axis, load in techdraw. Not very elegant,
but it works.
- wandererfan
- Veteran
- Posts: 6317
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: How to align tilted parts
That would be my first approach. ProjectionDirection = face.normalAt(uRange/2, vRange/2).thschrader wrote: ↑Sun Aug 12, 2018 10:15 am By calculating the normal-vector of the green face and adjusting in techdraw?
Might be a nice addition to the Gui. Select a Face in 3d, draw the Face's parent Solid with projection direction of normal at midpoint of Face.
Re: How to align tilted parts
I am missing such a function for a long time. A planar face has also an axis, that can be used instead of the normal.
Here is my quick and dirty macro. Select a face and call the macro. It prints several information in the report view, including the axis data and the normal data. Unfortunately it is not possible to copy the text from the report view into an input box. But it is possible if the macro is called in the python console with execfile.
There are other cases where a special projection direction would be helpful, but no planar face is available. Think about a hole/bore in a cylinder mantle. A system similar to the attachment property could be used to determine the view projection.
Ulrich
- Attachments
-
- details_ergruenden.py.zip
- (1.3 KiB) Downloaded 33 times
-
- Veteran
- Posts: 3156
- Joined: Sat May 20, 2017 12:06 pm
- Location: Germany
Re: How to align tilted parts
The sketches of the strut connections are drawn on the blue workplane (from workfeatures macro).wandererfan wrote: ↑Sun Aug 12, 2018 4:31 pm [Might be a nice addition to the Gui. Select a Face in 3d, draw the Face's parent Solid with projection direction of normal at midpoint of Face.
The plane runs through the mast-axis. I need this for aligning the struts.
In techdraw there should be an option like "project to selected plane/face".
On the other hand: my workflow from above (copy parts, align them with workfeatures makro to global x,y,z,-axis,
then load in techdraw) needs only seconds.
- wandererfan
- Veteran
- Posts: 6317
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: How to align tilted parts
Try this again after git commit aa8feb79d0 makes its way into Daily.thschrader wrote: ↑Sun Aug 12, 2018 10:15 am I have a steel part (strut-connection, green), which is rotated among
the z-axis. When loading the part in techdraw, I get an isometrie.
How can I get a planar view? By calculating the normal-vector
of the green face and adjusting in techdraw? Or is there a smarter way
I dont know?
Use Face or 3D direction for View and ProjGroup
- use current 3D window direction as starting
direction for DrawViewPart and ProjectionGroup
- if a Face is selected, use Face normal as
starting direction.
-
- Posts: 384
- Joined: Sat Sep 24, 2016 6:51 am
Re: How to align tilted parts
very nice addition. Is it editable once selected ?
- wandererfan
- Veteran
- Posts: 6317
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: How to align tilted parts
It is just the starting point. You can still change the projection direction on the View or use the rotate gizmos in the ProjectionGroup dialog.
Note that the dialog gizmos can get confused if you do a lot of rotations. Best to have a good idea of desired view point before starting.
-
- Veteran
- Posts: 3156
- Joined: Sat May 20, 2017 12:06 pm
- Location: Germany
Re: How to align tilted parts
thanks!
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14575 (Git)
Build type: Release
Branch: master
Hash: a624fee2c27bbbb869df6a8ce40438953a282a8c
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: German/Germany (de_DE)
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14575 (Git)
Build type: Release
Branch: master
Hash: a624fee2c27bbbb869df6a8ce40438953a282a8c
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: German/Germany (de_DE)