Resolve viewport dimension features and preserve valid measurements on refresh

This commit is contained in:
Christopher Overbeck committed 2026-09-15 14:53:45 -05:00
1 parent 7f018ab0f1
commit 64ce0b2e8c
11 files changed
+1680 -344

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
# Viewport association fixture
`viewport_associations.dxf` is a synthetic paper-space fixture for line, circle,
arc, polyline, spline, block-instance, and intersection references through one
1:2 viewport. `src/app/viewport_dimension_tests.rs` loads it and exercises actual
association refresh and an edit to the second intersection source.
Each dimension carries `DIMLFAC=-2` and `ACAD_DIMASSOC_CALC_DIMLFAC=-2`. These are
necessary for its paper definition points and saved model measurements to agree;
the original fixture omitted both factors. The spline tangent also uses the
actual touch point `(90, 283.125)` at parameter `0.75`, measured from `(0, 300)`.
The original endpoint `(120, 300)` was not tangent. Tests verify the cross product
with the spline derivative and preservation after an unsupported reference edit.
The larger original `115448.dxf` is private and is not included. An opt-in test
uses `OPENCAD_VIEWPORT_REGRESSION_DXF` to read a local copy without modifying it.
+118 -6
View File
@@ -788,6 +788,22 @@ AcDbAlignedDimension
0.0
50
0.0
1001
ACAD_DIMASSOC_CALC_DIMLFAC
1040
-2.0
1001
ACAD
1000
DSTYLE
1002
{
1070
144
1040
-2.0
1002
}
0
DIMENSION
5
@@ -844,6 +860,22 @@ AcDbAlignedDimension
0.0
50
0.0
1001
ACAD_DIMASSOC_CALC_DIMLFAC
1040
-2.0
1001
ACAD
1000
DSTYLE
1002
{
1070
144
1040
-2.0
1002
}
0
DIMENSION
5
@@ -900,6 +932,22 @@ AcDbAlignedDimension
0.0
50
0.0
1001
ACAD_DIMASSOC_CALC_DIMLFAC
1040
-2.0
1001
ACAD
1000
DSTYLE
1002
{
1070
144
1040
-2.0
1002
}
0
DIMENSION
5
@@ -956,6 +1004,22 @@ AcDbAlignedDimension
0.0
50
0.0
1001
ACAD_DIMASSOC_CALC_DIMLFAC
1040
-2.0
1001
ACAD
1000
DSTYLE
1002
{
1070
144
1040
-2.0
1002
}
0
DIMENSION
5
@@ -991,7 +1055,7 @@ AcDbDimension
71
5
42
120.0
91.56836585306085
1
3
@@ -1005,13 +1069,29 @@ AcDbAlignedDimension
33
0.0
14
135.0
120.0
24
175.0
166.5625
34
0.0
50
0.0
1001
ACAD_DIMASSOC_CALC_DIMLFAC
1040
-2.0
1001
ACAD
1000
DSTYLE
1002
{
1070
144
1040
-2.0
1002
}
0
DIMENSION
5
@@ -1068,6 +1148,22 @@ AcDbAlignedDimension
0.0
50
0.0
1001
ACAD_DIMASSOC_CALC_DIMLFAC
1040
-2.0
1001
ACAD
1000
DSTYLE
1002
{
1070
144
1040
-2.0
1002
}
0
DIMENSION
5
@@ -1124,6 +1220,22 @@ AcDbAlignedDimension
0.0
50
0.0
1001
ACAD_DIMASSOC_CALC_DIMLFAC
1040
-2.0
1001
ACAD
1000
DSTYLE
1002
{
1070
144
1040
-2.0
1002
}
0
ENDSEC
0
@@ -1475,11 +1587,11 @@ AcDbOsnapPointRef
91
-2
40
1.0
0.75
10
120.0
90.0
20
300.0
283.125
30
0.0
75