More DC Sizing Issues
-
This dynamic component, comprised of five sub components (two vertical stiles, three horizontal rails) relies on user selected lengths in a List Box to input the variable "LenX".
The problem can be seen in the attached file. The actual lenX of the component, as measured by the dimension tool, does not coincide with the input value for lenX.
Additionally, the error increases with the increase in LenX.
NOTE: creating a dynamic component, like a simple box, drawn without sub components, does not exhibit the inaccuracy above, using the exact same attributes.
Therefore, even though being as accurate as possible when creating the component with regard to the sub components positions relative to each other, I suspect that "resolution" when attaching the sub components to each other is playing a part in the inaccuracy?
Is this a known problem and is there a way around it?
Any advice is appreciated.
Thanks ...
-
Without seeing the model I cannot be sure, but I would guess that you have constrained LenX for the sides, but not the middle, simply allowing that to scale with the model.
You would expect that to work, but because of the way DCs function, it will not. You have to define LenX for the rails as the total width minus the width of the sides. Otherwise, the whole thing is scaled up (including the sides), then the sides are scaled down to what they should be, which reduces the overall width. If you scale with the scale tool you can see this happen, but it will also occur if you input into a text box.
As an example, sides 2.5", rails 10", giving a total width of 15". If you scale up to 30", the all the LenX values will be doubled, giving 5" and 20", but the values for the sides are constrained, so they are scaled down to 2.5", there is nothing to constrain as far as the rail is concerned, so it stays the same, giving a total length of 25".
The above bit assumes you have done things to the X position of the parts, to make sure it doesn't fly apart.
I made a quick demonstration for you, it is in cm, but the maths is the same. I saved this as a DC, so remember to import it and not just open it.
If I am completely wrong, then could you post your model so that people can have a look at it and check what is wrong?scaling_probs.skp
-
@unknownuser said:
The above bit assumes you have done things to the X position of the parts, to make sure it doesn't fly apart.
<snip>If I am completely wrong, then could you post your model so that people can have a look at it and check what is wrong?
If you wouldn't mind taking a look, here is the dc model. As you will see, the rails are "LenX=Right Stile!X-1.5".
Thanks!
-
James,
Unlike mine, your model works as expected. I need to study it to understand where I went wrong.
I appreciate the time you took ... that was might nice of you. I would, of course, appreciate any further advice/comments you may have should you get a chance to take a look at the one I uploaded.
Once again, your help is very much appreciated. Thank you!
Karl ...
-
Well done, James! There is still a 1/64" discrepancy in LenX when scaled, but, it is consistent now, and, as you point out, that may well be a problem with one of the stile dimensions ... much, much better however!
... and I work to a 1/32 in any event.
I haven't time to go over it with a fine tooth comb to absorb the rationale for the changes you made, but the proof is in the pudding.
Rest assured I will study this carefully. I wish I could find some additional documentation on dc's, it appears sparse. I've been using spreadsheets for 20 years, and did a good deal of VB and database programming back in the early 90's, but it's been awhile and I'm rusty on the current concepts.
I build custom homes and also design and build the kitchen cabinets that go into them, thus my use of SketchUp for about a year now. SU is worlds above the CAD programs I've used the past ten years in both intuitiveness, and the "design and presentation" aspect, which is most important to me and in which the program excels.
Once again, I can't thank you enough for your kind assistance and interest in helping!
-
I've looked at your model. If you use the user input value in the parent (FaceFrameBase) in the top/bottom rail LenX, it will force the overall length to be the same as the measured length. I also noticed that your Stiles had a tiny 1/64 inch missing in the width. (I may be wrong here). I have made the modifications so you can take a look. There may be other ways to fix the problem. I have noticed that its good practice to use values from the parent in the child component and not from the siblings.
Dagfinn
-
I can't really take credit for Dagfinn's work on the model you uploaded (thank you Dagfinn), but I am glad it is working and was happy I could help earlier on.
The error could have crept in if you adapted a model that has been scaled a few times, or something like that. If it is something simple enough, then it can be quicker just to do things from scratch, rather than hunting for ages to find the problem, although this time it might be useful to try and work it out.
For learning about DC's I would recommend looking at google's examples of how to use various functions (they have some collections on the 3DWH) and just playing around to see how things work and what you can get them to do. That is how I learn things anyway, it might not suit everyone.
Advertisement