Dear all
Currently I'm starting to use FreeCAD and it is really nice. Right now, I'm trying to change the font size of the bounding box dimensions. Most of the posts I have found talk about the Sketcher, Draft, and other Workbenches. However, it seems that the bounding box isn't part of any Workbench. Is there any way of change the font size? It is really small; even if I zoom the view (see the screenshot).
By the way, If you see my screenshot, you will see that I had to join all parts to get the whole Bounding Box. Is there any other way?
I found a couple of Macros, but most of them are nonexistent. The one I'm using now is the FCInfo, which does a good job; however, I think it might be better to be able to change the font size. Is this possible?
Thanks in advanced
Best regards
Josef
Changing Bounding Box font size, alternative methods to get model size
Forum rules
and Helpful information
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help
Also, be nice to others! Read the FreeCAD code of conduct!
Also, be nice to others! Read the FreeCAD code of conduct!
Changing Bounding Box font size, alternative methods to get model size
- Attachments
-
- bounding_box.jpg (769.86 KiB) Viewed 868 times
Re: Changing Bounding Box font size, alternative methods to get model size
But why? What do you want to achieve?
A bounding box is an attribute of the geometrical object that you see on the screen. As you saw, the property editor has this option to display it on the 3D view, but that's it. The bounding box is not part of the object itself, or isn't configurable.
Instead of fusing the objects, you can also use Part MakeCompound, so that the individual shapes aren't fused together, just placed together in a type of group.
The resulting object, which you can obtain from the selection view, has this information in its Shape attribute.
Code: Select all
>>> obj.Shape.BoundBox
BoundBox (-2, -1.98542, 0, 10, 10, 10)
>>> obj.Shape.BoundBox.XMin
-2.0
>>> obj.Shape.BoundBox.YMin
-1.9854177481961086
>>> obj.Shape.BoundBox.ZMin
0.0
>>> obj.Shape.BoundBox.XMax
10.0
>>> obj.Shape.BoundBox.YMax
10.0
>>> obj.Shape.BoundBox.ZMax
10.0
Code: Select all
obj_text.ViewObject.FontSize = 1000
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
Re: Changing Bounding Box font size, alternative methods to get model size
Hi Vocx
Thanks for your reply.
Anyway, instead of adding a macro by myself, I guess I will use an existing one, the FCInfo macro, which does what I need. It is not as easy as just showing the Bounding box, but I guess I will have to live with that.
Best regards
Josef
Thanks for your reply.
I'm going to 3D print those parts, so, I needed to know if the dimensions of the whole parts are the same as in the stl file.But why? What do you want to achieve?
It would be nice that you could change the font size. Some people has been asked for this before. I don't know what's the point of putting those numbers on the model if you can't read them. Better to put only the lines and nothing else.A bounding box is an attribute of the geometrical object that you see on the screen. As you saw, the property editor has this option to display it on the 3D view, but that's it. The bounding box is not part of the object itself, or isn't configurable.
I tried that; however as soon as I join the shapes, they will get the same origin: (0, 0, 0), so, they will be overlapped together. See the screenshot. This is actually a problem I have: each time I make an operation on one part, ie: a cut or a fusion, the resulting shape will be added outside of that part. I solved then the problem by moving that result to the part again. Is there any way of having always all resulting shapes added to the parts automatically?Instead of fusing the objects, you can also use Part MakeCompound, so that the individual shapes aren't fused together, just placed together in a type of group.
Yes, I also saw a script in another post. I tried that and it works as your code; however, why to use a script if you could achieve in an easier way by showing the bounding box on the model itself?The resulting object, which you can obtain from the selection view, has this information in its Shape attribute.
Anyway, instead of adding a macro by myself, I guess I will use an existing one, the FCInfo macro, which does what I need. It is not as easy as just showing the Bounding box, but I guess I will have to live with that.
Best regards
Josef
- Attachments
-
- Shapes after "Make Compound"
- grouped_shapes.jpg (739.92 KiB) Viewed 829 times
-
- Original parts
- original_parts.jpg (454.95 KiB) Viewed 829 times
Re: Changing Bounding Box font size, alternative methods to get model size
I too would like to increase the size of the bounding box. There's a YouTube video showing how to center text on an object and it involves using those sizes. Perhaps an explanation of how to do this without using a bounding box would help.