Hi,
I am scaling attached cabinet which includes a handle but handle is not scaled properly and model is broken in MDL. What can be the reason?
Handle model is also attached.
Kind regards,
Sedat AlisAEC Technology Inc.
Unknown said: Model is broken in MDL
Please elaborate.
Regards, Jon Summers LA Solutions
Unknown said: Please elaborate.
Original model looks like this;
Scaled model look like this;
Scale operation distorts original model.
Unknown said:Scale operation distorts original model
What 'scale operation' are you using? How do you construct your scaling transform? How do you apply that transform to the object? It's hard to diagnose 'model is broken in MDL' with no evidence.
Your post title mentions MDL, but you haven't shown us any code.
Unknown said: What 'scale operation' are you using? How do you construct your scaling transform? How do you apply that transform to the object? It's hard to diagnose 'model is broken in MDL' with no evidence. Your post title mentions MDL, but you haven't shown us any code.
It looks like this;
double xScale,yScale,zScale;ProductInfo pinfo; Transform tMatrix;
// Calculate scale for each dimension xScale = width/pinfo.byt_x; yScale = depth/pinfo.byt_y; zScale = height/pinfo.byt_z;
// scale cell mdlTMatrix_scale(&tMatrix,NULL,xScale,yScale,zScale); mdlElmdscr_transform(edP,&tMatrix);
Unknown said:mdlTMatrix_scale(&tMatrix,NULL,xScale,yScale,zScale);
I don't know whether it's valid to apply that function to an uninitialised transform. To be on the safe side, try this …
Transform t; mdlTMatrix_getIdentity (&t); mdlTMatrix_scale (&t, &t, xScale, yScale, zScale);
Unknown said: I don't know whether it's valid to apply that function to an uninitialised transform. To be on the safe side, try this … Transform t; mdlTMatrix_getIdentity (&t); mdlTMatrix_scale (&t, &t, xScale, yScale, zScale);
Beside c) ;-)
b) makes no sense, mdlTMatrix_scale changes a transformation matrix, not a cell. mdlElmdscr_transform does the transformation. I've transformed some millions of nested cells, and never failed, so this should work.
a) maybe, have you checked the coordinate system settings, especially those for the smartsolids ? Maybe you'r running out of the volume modeller (parasolid) coordinate range.
f) if not a) than this looks to me like you are transforming only the first element of the chain of elements, that the cell is made of. How do you retrieve this edp, you shown in your code ?!
Michael
Michael Stark said: b) makes no sense, mdlTMatrix_scale changes a transformation matrix, not a cell. mdlElmdscr_transform does the transformation. I've transformed some millions of nested cells, and never failed, so this should work.
You are right about mdlElmdscr_transform. :) I hope, it is working fine too. :)
Michael Stark said: a) maybe, have you checked the coordinate system settings, especially those for the smartsolids ? Maybe you'r running out of the volume modeller (parasolid) coordinate range.
Very good point but everything are fine.
Michael Stark said: f) if not a) than this looks to me like you are transforming only the first element of the chain of elements, that the cell is made of. How do you retrieve this edp, you shown in your code ?!
I am using mdlElmdcsr_transform for the whole cell at once.
Thanks.
Unknown said:As far as I know if IN matrix is NULL then identity matrix is taken
Yes, but we don't know. The documentation doesn't tell us the default behaviour. What do you lose by writing the extra line?