x3dom / apps-modeling

Publicly Available Applications
Other
3 stars 3 forks source link

Dish primitive definition #86

Closed tpaviot closed 10 years ago

tpaviot commented 10 years ago

The Dish, as currently implemented in the component editor, is not consistent with the Aveva PDMS definition. The PDMS Dish base is a circle, in the web editor it is an ellipse. You can access the complete specification at http://help.aveva.com/AVEVA_Everything3D/1.1/CSRM/wwhelp/wwhimpl/js/html/wwhelp.htm#href=CSRM7.08.17.html#1025240

I suggest to use, in our project, the simplest case where PRAD=0, that is to say that a dish is a part of a sphere.

yjung commented 10 years ago

According to the spec Christophe gave us, it is an ellipsoid if radius > 0, and a sphere segment otherwise. Perhaps do you mix it up the radius param with diameter?

yjung commented 10 years ago

Only for r=0 it is a sphere segment

tpaviot commented 10 years ago

Whether the dish is a par of sphere or ellipsoid, the dish base is always a disc, with diameter PDIA.

tpaviot commented 10 years ago

What exactly is the spec you're working with ?

yjung commented 10 years ago

We use the PDMS DESIGN Reference Manual, Part 3: Elements and Attributes, Version 11.5 (the document's name was 'PDMS 115 - elements and attributes spec.pdf', I can send it to you via mail if you like). On page 5-14 it says: "If radius is zero, dish is drawn as section of sphere. If radius is greater than zero, dish is defined as half of an ellipsoid." If it is half of an ellipsoid (latter case), then the three parameters radius, diameter/2, and height can be interpreted as the three semi-principal axes. If you don't allow elliptical base curves, then radius and/or diameter would be redundant (at least as far as could be derived from the description given in the aforementioned document). And by setting radius to 0, "our" Dish is part of a sphere (thus with a circle as base curve), were the given section is defined by the height parameter. To clarify this issue (since your mentioned document reads different from ours, were e.g. the "direction of axis of dish" is not mentioned as a parameter at all), it would perhaps be a good idea, to see the respective primitives with all major parameter changes somehow "in action".

tpaviot commented 10 years ago

Ok, I asked Christophe the spec he sent to you. From a business viewpoint, dishes are used to "close" piping components like tanks or valves. A elliptic basis does not make sense. Anyway, don't change anything to your implementation if you followed the pdf spec. I will update my model to fit yours (I can easily transform any shape along the three directions). Let me come back to this issue as soon as I have read the spec you used.

yjung commented 10 years ago

Just for the sake of completeness, here another thought about this from our email correspondence (nothing new), just that we don't forget it:

Nevertheless, I thought about your comment (and the way the dish was described in the doc you referred to) and maybe it is meant that way, that in case r > 0 the height parameter does not represent one of the three semi-principal axes, but is defined as the section to be cut out given that r goes into the up direction. Thereby, you could define a section of an ellipsoid with circular basis, but I'm really unsure about this, as our PDF doesn't suggest this interpretation. So, hmmm...

tpaviot commented 10 years ago

The spec Christophe sent to you is just a idea about how the users currently work with their 3D software. We don't have to implement exactly what is done in the PDF, and we can even do better ;) It's incredibly a bad solution to distinguish between two geometries by defining a rule like 'if r>0 then'. A boolean flag would be much better, or even two different primitives. In my mind, the elliptic basis is not useful for the demo. Let's go on the simplest definition and business need: as you can see for instance at http://www.boccard.be/etudes-de-detail.html , dishes are used to "close" tanks or pipes, which are cylindrical elements. For the demo, we just need a circular basis. If ever something more complicated is required, we'll see in a second step. As you @yjung suggest, a section of an ellipsoid with circular basis is just perfect.

yjung commented 10 years ago

You're absolutely right, this 'if r>0' stuff is really very far from being intuitive... Ok, then I'm going to implement the ellipsoid section (half an ellipsoid with circular basis currently can be achieved with setting radius = diameter/2, but the sectional part is missing, this way it's always half an ellipsoid with semi-principal axis height).

yjung commented 10 years ago

Dish base is now always circular and behavior/code is simplified/unified in that the base radius is always diameter/2, and if radius field is set to something different than that, this is treated as a semi-principal axes of an ellipsoid along the up vector. For both cases, the height field, which must be <= radius, defines the section from this half sphere or ellipsoid to be used (which in this case of course leads to a smaller cross-sectional base due to the slope). Hope this way the Dish primitive is now easier to use.