MoI discussion forum
MoI discussion forum

Full Version: Auto dimensions

Show messages: All  1-14  15-19

From: Michael Gibson
31 Jan   [#15] In reply to [#10]
Hi Peticel,

For this part:
> Could you please also include how to change "Decimal display" and "Show trailing zeros"?

These can be set in the preset UI under "Formatting" :



If you want to set it on an object using script code:

dim.distanceDisplay = 'Decimal';
or
dim.distanceDisplay = 'Feet & Inches';

dim.numDecimalPlaces = 3;

dim.showTrailingZeros = true;

- Michael

Image Attachments:
PeticelFormatting.png 


From: Michael Gibson
31 Jan   [#16] In reply to [#12]
Hi Peticel, for the size not being what you expected, on line #18 of your script that currently has this:

code:
        var bbox = obj.getBoundingBox();


Change it to this:
code:
        var bbox = obj.getBoundingBox( true /* Calculate tight bounding box */ );


When you call obj.getBoundingBox() you'll get bounds that are quickly calculated by the bounding box of all surface control points.

There are just a couple of surfaces in your object that have have been trimmed by the boolean where the underlying surface's control points are a little bit larger than the active trim boundary:


If you want a "tight" bounding box that uses the trimming boundaries you need to pass in a function argument of true to the .getBoundingBox() function. There is quite a bit more calculation involved for getting the tight bounding box.

- Michael

Image Attachments:
PeticelBounds.png 


From: Peticel
12 Feb   [#17] In reply to [#16]
Thanks a lot for the support! I got everything working.

There are just a couple of surfaces in your object that have have been trimmed by the boolean where the underlying surface's control points are a little bit larger than the active trim boundary - how can I fix this? I tried unjoining all surfaces and running ShrinkTrimmedSrf but nothing happens. Thanks!

I'm having one more issue with the export. Some parts are 12mm thick (same issue with 24mm) and the back side lines can be seen through the geometry (they are not hidden lines). Is the any .ini tweak that can fix this?

Front


Back


Front orthographic


The selected lines can be seen through the model


PDF export Back view

Image Attachments:
1.png  2.png  3.png  4.png  PDF.png 


From: Michael Gibson
12 Feb   [#18] In reply to [#17]
Hi Peticel,

> > There are just a couple of surfaces in your object that have have been trimmed by the
> > boolean where the underlying surface's control points are a little bit larger than the active trim boundary -

> how can I fix this? I tried unjoining all surfaces and running ShrinkTrimmedSrf but nothing happens. Thanks!

Well it's not an error, so it's not something that you would normally need to do anything about.

Why are you concerned about it?

In order to avoid it you would need to construct surfaces in a very restricted way so that the surface's control point layout is aligned to the cut.

But doing that would be difficult and not gain anything, it's just a normal part of how CAD models work that you can have a underlying surface that is larger than the trim boundary.

Basically you have a surface like this:



If you then trim off an area with a trim curve not aligned to the surface's UV grid directions like this:



That will result in a trim curve like this where the surface can't be shrunken down any further in the surface's own UV direction:



It's just a normal thing to have this.

To fix it you would have to make all untrimmed surfaces without any arbitrary trim boundaries. That would be a big limit and make model construction a lot more difficult for no gain.

Like for this case shown above you would need to model it like this so that the surface's control point structure goes along the trim boundary:


But don't do that, the lighter surface that doesn't shrink down completely is better quality geometery.


> I'm having one more issue with the export. Some parts are 12mm thick (same issue with 24mm)
> and the back side lines can be seen through the geometry (they are not hidden lines). Is the
> any .ini tweak that can fix this?

That's a display glitch called "bleed through", you can find some more info here:
http://moi3d.com/forum/index.php?webtag=MOI&msg=4987.2

When it happens in the viewport it's just something to ignore. But it's a lot less likely to happen in PDF export, can you post or e-mail me (moi@moi3d.com) the 3dm model where you are getting it in the generated PDF?

Some things that I would check if I had the file to examine - are the objects solids? Are there any additional construction curves still hanging around? What is the "Canvas megapixel resolution" value set to? Try increasing that value to 50 or 60 if it's lower than that.

- Michael

Image Attachments:
PeticelShrink1.png  PeticelShrink2.png  PeticelShrink3.png  PeticelShrink4.png 


From: Peticel
14 Feb   [#19] In reply to [#18]
Hi Michael,

As always, thank you for the detailed explanation.

>>Why are you concerned about it? - I thought it was an issue since out of 48 models, only 3 had this problem. I also made the mistake of thinking that the BoundingBox command that I use in the app is the same as the one in the scripting doc. I was confused because if I selected the model in the scene and ran BoundingBox, I got good results (a bounding box perfectly encasing my model with the right values), but through the script, I got different values. Adding "true" to the command inside the script fixed that. So all good. (full disclaimer, I have almost no experience scripting but with what you provided, chatGPT was able to make a fully working script)

I will send you the models per mail.

>>Some things that I would check if I had the file to examine - are the objects solids? - yes
Are there any additional construction curves still hanging around? - no
What is the "Canvas megapixel resolution" value set to? - 50
Try increasing that value to 50 or 60 if it's lower than that. - same result at 10, 50 and 100

Show messages: All  1-14  15-19