Skip to content

Commit

Permalink
fix #1049 for real
Browse files Browse the repository at this point in the history
changed default value for $XCLIPFRAME from 2 to 1
  • Loading branch information
mozman committed Mar 16, 2024
1 parent 6cbc0dd commit 562ed54
Showing 1 changed file with 24 additions and 9 deletions.
33 changes: 24 additions & 9 deletions src/ezdxf/sections/headervars.py
Original file line number Diff line number Diff line change
Expand Up @@ -2008,16 +2008,19 @@
name="$XCLIPFRAME",
code=280, # 2004 & 2007 = 290
factory=partial(SingleValue, code=280), # 2004 & 2007 = 290
mindxf=DXF2007, # changed 2024-03-15, issue #1049
mindxf=DXF2004,
maxdxf=DXF2018,
priority=21400,
default=2,
# 0 = Clipping boundary is not visible
# 1 = Clipping boundary is visible
# default for 2004 & 2007 is 0; R2010+ is 2?
default=1, # changed 2014-03-16 issue #1049 - from 2 to 1
),
"$HALOGAP": HeaderVarDef(
name="$HALOGAP",
code=280,
factory=partial(SingleValue, code=280),
mindxf=DXF2013, # changed 2024-03-15, issue #1049
mindxf=DXF2004,
maxdxf=DXF2018,
priority=21500,
default=0,
Expand All @@ -2026,7 +2029,7 @@
name="$OBSCOLOR",
code=70,
factory=partial(SingleValue, code=70),
mindxf=DXF2013, # changed 2024-03-15, issue #1049
mindxf=DXF2004,
maxdxf=DXF2018,
priority=21600,
default=257,
Expand All @@ -2035,7 +2038,7 @@
name="$OBSLTYPE",
code=280,
factory=partial(SingleValue, code=280),
mindxf=DXF2013, # changed 2024-03-15, issue #1049
mindxf=DXF2004,
maxdxf=DXF2018,
priority=21700,
default=0,
Expand All @@ -2044,7 +2047,7 @@
name="$INTERSECTIONDISPLAY",
code=280,
factory=partial(SingleValue, code=280),
mindxf=DXF2007, # changed 2024-03-15, issue #1049
mindxf=DXF2004,
maxdxf=DXF2018,
priority=21800,
default=0,
Expand All @@ -2053,7 +2056,7 @@
name="$INTERSECTIONCOLOR",
code=70,
factory=partial(SingleValue, code=70),
mindxf=DXF2007, # changed 2024-03-15, issue #1049
mindxf=DXF2004,
maxdxf=DXF2018,
priority=21900,
default=257,
Expand All @@ -2062,7 +2065,7 @@
name="$DIMASSOC",
code=280,
factory=partial(SingleValue, code=280),
mindxf=DXF2007, # changed 2024-03-15, issue #1049
mindxf=DXF2004,
maxdxf=DXF2018,
priority=22000,
default=2,
Expand All @@ -2071,7 +2074,7 @@
name="$PROJECTNAME",
code=1,
factory=partial(SingleValue, code=1),
mindxf=DXF2007, # changed 2024-03-15, issue #1049
mindxf=DXF2004,
maxdxf=DXF2018,
priority=22100,
default="",
Expand Down Expand Up @@ -2371,3 +2374,15 @@ def version_specific_group_code(name: str, dxfversion: str) -> int:
elif name == "$XCLIPFRAME":
group_code = 290 if dxfversion < DXF2010 else 280
return group_code

VERSION_SPECIFIC_HEADER_VARS = """
DXF Version R2004
Name | BC GCode | BC Value | EZ GCode | EZ Value
----------------------------------------------------------------
$XCLIPFRAME | *290 | *0 | *280 | *2
DXF Version R2007
Name | BC GCode | BC Value | EZ GCode | EZ Value
----------------------------------------------------------------
$XCLIPFRAME | *290 | *0 | *280 | *2
"""

0 comments on commit 562ed54

Please sign in to comment.