Very cool!rus wrote: ↑Mon Apr 02, 2018 3:49 pm I made a short video tutorial how to use flamingo with OSE-pipe-workbench
https://youtu.be/1FBudfRcQv4
FYI, Feel free to use the [video] tag for this exact purpose
Very cool!rus wrote: ↑Mon Apr 02, 2018 3:49 pm I made a short video tutorial how to use flamingo with OSE-pipe-workbench
https://youtu.be/1FBudfRcQv4
Each rule to build the Shape of the parts is intended to make the commands apply in the same way on similar objects. For example when using "spin by 45" I want to rotate a flange around the axis. Also to make coding easier: when I want to move a curve, generally it's to put it at the intersection of two axis, which correspond to its Placement.Base.Is there a particular reason to have flat parts in x-y plane? How can I rotate them to move them within Elbow.execute into x-z plane?
Dear @rus, I just pulled the last commit of your repo and found that elbows in flamingo "flavour" are no more compatible.I see an advatage to put the center of the fitting into intersection of the x-y axis. When I made the weep elbow I took it in account. When ask guys from our development team how they would project a 2D dawing, they will project them into x-z plane.
oddtopus wrote: ↑Sun Apr 08, 2018 12:10 pmDear @oddtopus,Dear @rus, I just pulled the last commit of your repo and found that elbows in flamingo "flavour" are no more compatible.
The matter is how the shape is drawn respect to the x-y-z axis. In fact you have changed the orientation of shape and that choice has a backdraw: it makes flamingo not recognize the correct alignment of the elbow and so each command that deals with part orientation fails. Below is an example of the current result of "Fit one elbow" command.elbowJoinFailed.png
How to code the shape of a part it's not a matter of the preferred plane to project one curve (despite what says your development team, in 20 years of piping design I never heard such rule) but to make things congruent among different workbenches.
So, with reference only to the parts of type "flamingo", please restore the shape so that the Z axis is orthogonal to the ports of the elbow and the origin is at the intersections of ports, like this .flElbowOrientation.png
Thank you for your feedback.
I see your important point about congruence. But this should not stop us from improving things and we should not keep less effective choice for compatibility reasons . For example I added "PSize", changed from "pipe outer diameter+pipe inner diameter" to "pipe outer diameter + wall thickness" and put the 0.0.0 point into intersection of the port axis -- because I see advantages in your API. But I do not know reasoning for your elbow orientation.
* What is the logic behind your choice of the x-y plane?
* And why the elbow is symmetric to the (1,1,0) line?
* Is there any convention?
* Other reasons?
The logic behind my choice is following:
* I expect that the an elbow with 0 bending point would look like a coupling, which in following our conventions is along the z axis.
* I expect that one part of the elbow (with port[1] in your drawing) to be fixed to one axis. In the same way an elbow is represented in a catalog of aetna-plastics. See attached image.
Thank you for the explanations.oddtopus wrote: ↑Sun Apr 08, 2018 4:14 pm The reason is the algorithm to place one elbow, whatever is the angle, between 2 pipes or edges.
0. the elbow BendAngle is changed to the angle between pipes or edges
1. the elbow is translated to the intersection of two pipes or edges : that's the reason of Placement.Base choice
2. then the Z axis of the elbow is aligned with the cross product of the two versors of the intersecting things (edges or pipe axis): it's not only a convenction but it deals also with how the commands of flamingo interacts with the Arch.Structure objects. Can't change that.
3. finally the (1,1,0) vector of elbow's shape is aligned with the bisect of the versors of the edges or pipes' axis: that's why elbows are symetric respect to the (1,1,0) vector in flamingo
I understand. I think it is possible to make a command to put an elbow between the pipe which will work both with your elbow and my elbow. All the important informations are in ports. When the port vectors are non-zero, then a command for putting an elbow between two pipes could be:So you can notice how the choices of construction of the Shape facilitate these steps.
It would create to much entropy to change this now because this procedure is extensively used.
Frankly speaking, I prefer to make new features rather than re-coding all that.
Code: Select all
OS: Ubuntu 16.04.4 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13519 (Git) AppImage
Build type: None
Branch: releases/FreeCAD-0-17
Hash: 1a8b868018f45ea486c0023fdbfeb06febc1fb89
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedStates (en_US)
Code: Select all
Trying to load CSV file with dimensions: /home/mac_aodh/.FreeCAD/Mod/ose-piping-workbench/tables/coupling.csv
Traceback (most recent call last):
File "/home/mac_aodh/.FreeCAD/Mod/ose-piping-workbench/flCoupling.py", line 51, in onChanged
obj.Ports = self.getPorts(obj)
File "/home/mac_aodh/.FreeCAD/Mod/ose-piping-workbench/flCoupling.py", line 176, in getPorts
SL = (obj.L-obj.N)/2 # Inner socket length.
<type 'exceptions.AttributeError'>: 'FeaturePython' object has no attribute 'N'
Great!
Thank you for being polite . I hope that in couple of weeks the results will be better .
I have similar problems. Thank you to point to it.
Cool.
Thank you for the report. (Background info: function onChanged needs dimension N to calculate port, but it is called before I assign the dimension N. It is also called after I assign the dimension N, that is why a coupling still work.) I will put the bug fix in the master branch within two weeks.alberich wrote: ↑Thu May 03, 2018 2:31 pm 3. I do get an error msg when adding a coupling:
The coupling table is present. I do get a coupling added. The coupling table does have an 'N' entry.Code: Select all
Trying to load CSV file with dimensions: /home/mac_aodh/.FreeCAD/Mod/ose-piping-workbench/tables/coupling.csv Traceback (most recent call last): File "/home/mac_aodh/.FreeCAD/Mod/ose-piping-workbench/flCoupling.py", line 51, in onChanged obj.Ports = self.getPorts(obj) File "/home/mac_aodh/.FreeCAD/Mod/ose-piping-workbench/flCoupling.py", line 176, in getPorts SL = (obj.L-obj.N)/2 # Inner socket length. <type 'exceptions.AttributeError'>: 'FeaturePython' object has no attribute 'N'
The bent segment is a sweep part. How a sweep works (or does not work) is magic to me . I still learn how to use it. I will try to replicate it later with the new version.
They help. Thank you!