Mon 28 Oct 2013 12:45:56 PM UTC, comment #1:
This item has been reassigned from the project pyFormex support tracker to your tracker.
The original report is still available at support #108424
Following are the information included in the original report:
[field #0] Item ID: 108424 [field #1] Group ID: 10866 [field #2] Open/Closed: Open [field #3] Severity: 2 - Minor [field #4] Privacy: Public [field #9] Category: GUI [field #10] Submitted by: gianlucadesi [field #11] Assigned to: None [field #12] Submitted on: Mon 28 Oct 2013 12:06:19 PM CET [field #13] Summary: drawPropNumbers, fix and extend to draw PatchNumbers [field #14] Original Submission: drawPropNumbers in gui.draw.py does not work: line 963 should be replaced by
nrs = -ones(F.nelems(),dtype=int)
At the moment PropNumbers are drawn on ALL elements, which may be not needed, especially for large models. Maybe, we could add an other function (or an option) to draw the PropNumbers only once:
def drawPatchNumbers(self, mode='centroid'):
"""Draw one number per property number.
Patch is a set of elements with the same property number.
If mode is 'first' the propery number is drawn on the first element of a patch.
If mode is 'centroid' the propery number is drawn at the centroid of a patch.
"""
if not isinstance(self,Mesh):
self = self.toMesh()
print ('here')
if self.prop is None:
self=self.setProp(-1)
ps = self.propSet()
if mode=='centroid':
f=Formex([self.withProp(i).compact().centroid() for i in ps]).setProp(ps)
drawPropNumbers(f)
if mode=='first':
drawPropNumbers(Mesh.concatenate([self.withProp(i).select([0]) for i in ps]))
[field #16] Item Group: None [field #17] Status: None [field #18] Component Version: None [field #19] Operating System: None [field #20] Reproducibility: None [field #21] Size (loc): None [field #22] Fixed Release: None [field #23] Planned Release: None [field #24] Effort: 0.00 [field #28] Priority: 5 - Normal [field #31] Percent Complete: 0% [field #33] Release: None [field #58] Custom Select Box #1: None [field #59] Custom Select Box #2: None [field #60] Custom Select Box #3: None [field #61] Custom Select Box #4: None [field #62] Custom Select Box #5: None [field #63] Custom Select Box #6: None [field #64] Custom Select Box #7: None [field #65] Custom Select Box #8: None [field #66] Custom Select Box #9: None [field #67] Custom Select Box #10: None
|