When I subtract a second cylinder from a cylinder, the GeomExtent increases. Can something like this happen?
The Original Zylinder has (-15,-15,0) (15,15,100)
the Zylinder with the differenz Solid is 0.00015 greater.
Solved! Go to Solution.
Solved by tbrammer. Go to Solution.
Which AutoCAD version are you using? I tested with AutoCAD 2020 and 2024 like this:
The result is shown in screenshot below. It equals the bounding box of the initial cylinder for both versions.
(German version. "Untere/Obere Begrenzung" = "Lower/Upper Boundary", "Begrenzungsrahmen"="Boundary box")
I didn't test getGeomExtents() explicitly.
Can you please check whether getGeomExtents() yields different results than _LIST shows?
Hello
The output from the list command is okay.
i use the following Code pEnt is the Solid
in Autocad 2022 the date will be okay, in Autocad 2024 i get some small differences.
On my system I get on both AutoCAD 2022 and 2024:
Name | Value | Type | |
---|---|---|---|
▶ | maxpt | {x=15.000150220923764 y=15.000000000000000 z=100.00000000000000 } | AcGePoint3d |
AcGeContext::gTol.equalPoint() is 1e-10.
AcGeContext::gTol.equalVector() is 1e-12.
0.00015 is several orders of magnitude larger than this. The ARX docs makes no statement about the exactness of getGeomExtents(). It would be interesting how AutoCAD calculates the dimensions that _LIST prints. Obviously the deviation should be visible with LUPREC=8.
If you need higher accuracy you could try to use the BREP API to analyze the 3DSOLID.
You are right, both (Autocad 2022 and Autocad 2024) get the same result.
Thanks for yor help, the BREP creates correct results.
AcBrBrep myrep;
myrep.set(*(AcDb3dSolid*)pEnt);
AcGeBoundBlock3d block1;
myrep.getBoundBlock(block1);
block1.getMinMaxPoints(amin, amax);
ads_printf(L"\nbrepmax=%g,%g,%g min=%g,%g,%g", amax.x, amax.y, amax.z, amin.x, amin.y, amin.z);
this will print the correct Bounding box.
brepmax=15,65,100 min=-15,35,0
Can't find what you're looking for? Ask the community or share your knowledge.