step-examples/12-2c-surfaces/Gs048.stp
Sources
- 16-iso-spec ISO 10303-42 §OFFSET_CURVE_2D
Description
ISO 10303-42 OFFSET_CURVE_2D carries ref_distance (a signed real where sign determines side). When a producer chains OFFSET_CURVE_2D segments around a composite curve and switches sign mid-chain (perhaps to "fix" inside/outside on a concave region), the resulting offset is non-continuous: successive segments do not meet at a shared point.
Reproducer recipe
COMPOSITE_CURVE of two POLYLINE segments wrapped in OFFSET_CURVE_2D each, with `ref_distance` = +1.0 on the first and `-1.0` on the second.
Expected kernel behavior
detect the C0 discontinuity at the chain junction and either reject or insert a connecting segment (line, arc) bridging the gap.
Notes
**See also**: Gs043. Synonyms: "OFFSET_CURVE_2D ref_distance sign flips mid composite chain", "C0 discontinuity at composite curve junction from offset sign change", "offset side switches mid-chain", "successive offset segments don meet", "ref_distance +1 then -1 on adjacent segments".
Expected validation
occt=shape(1)/shape(1) gmsh=shape(1) ifc=schema_n/a
Byte assertions
count_entity_def(b'OFFSET_CURVE_2D') == 2contains(b"OFFSET_CURVE_2D('off1',#20,1.0,.T.)")contains(b"OFFSET_CURVE_2D('off2',#21,-1.0,.T.)")
Tier-3 assertions
load == "ok"
Cross-references
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes (with defect highlighting)
1ISO-10303-21; 2/* Gs048: PLANE IS ADVANCED_FACE.face_geometry; OFFSET_CURVE_2D('off1',...,+1.0) and OFFSET_CURVE_2D('off2',...,-1.0) â opposite-sign offsets of adjacent POLYLINE segments chained in COMPOSITE_CURVE â sign flip creates C0 gap at junction IS wired into face edge topology; shape(1) (live OCC heals) */ 3HEADER; 4FILE_DESCRIPTION(('Gs048'),'2;1'); 5FILE_NAME('Gs048.stp','2026-06-17T00:00:00',(''),(''),'cad-research-suite','',''); 6FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }')); 7ENDSEC; 8DATA; 9#9000=APPLICATION_CONTEXT('mechanical design'); 10#1=CARTESIAN_POINT('',(0.0,0.0,0.0)); 11#2=DIRECTION('',(0.0,0.0,1.0)); 12#3=DIRECTION('',(1.0,0.0,0.0)); 13#4=AXIS2_PLACEMENT_3D('gs048_ax',#1,#2,#3); 14#5=PLANE('gs048_plane',#4); 15#6=(GEOMETRIC_REPRESENTATION_CONTEXT(2)PARAMETRIC_REPRESENTATION_CONTEXT()REPRESENTATION_CONTEXT('UV','2D')); 16#7=CARTESIAN_POINT('',(0.0,0.0,0.0)); 17#8=CARTESIAN_POINT('',(5.0,0.0,0.0)); 18#9=CARTESIAN_POINT('',(10.0,0.0,0.0)); 19#10=CARTESIAN_POINT('',(0.0,0.0,0.0)); 20#11=CARTESIAN_POINT('',(1.0,0.0,0.0)); 21#12=CARTESIAN_POINT('',(2.0,0.0,0.0)); 22#13=CARTESIAN_POINT('',(3.0,0.0,0.0)); 23#14=CARTESIAN_POINT('',(4.0,0.0,0.0)); 24#15=CARTESIAN_POINT('',(5.0,0.0,0.0)); 25#16=CARTESIAN_POINT('',(6.0,0.0,0.0)); 26#17=CARTESIAN_POINT('',(7.0,0.0,0.0)); 27#18=CARTESIAN_POINT('',(8.0,0.0,0.0)); 28#19=CARTESIAN_POINT('',(9.0,0.0,0.0)); 29#20=POLYLINE('gs048_poly1',(#7,#8)); 30#21=POLYLINE('gs048_poly2',(#8,#9)); 31#22=OFFSET_CURVE_2D('off1',#20,1.0,.T.); 32#23=OFFSET_CURVE_2D('off2',#21,-1.0,.T.); 33#24=COMPOSITE_CURVE_SEGMENT(.CONTINUOUS.,.T.,#22); 34#25=COMPOSITE_CURVE_SEGMENT(.CONTINUOUS.,.T.,#23); 35#26=COMPOSITE_CURVE('gs048_cc',(#24,#25),.T.); 36#27=CARTESIAN_POINT('',(0.0,0.0,0.0)); 37#28=CARTESIAN_POINT('',(10.0,0.0,0.0)); 38#29=CARTESIAN_POINT('',(10.0,4.0,0.0)); 39#30=CARTESIAN_POINT('',(0.0,4.0,0.0)); 40#31=VERTEX_POINT('',#27); 41#32=VERTEX_POINT('',#28); 42#33=VERTEX_POINT('',#29); 43#34=VERTEX_POINT('',#30); 44#35=CARTESIAN_POINT('',(0.0,0.0)); 45#36=DIRECTION('',(1.0,0.0)); 46#37=VECTOR('',#36,10.0); 47#38=LINE('',#35,#37); 48#39=DEFINITIONAL_REPRESENTATION('pcdef_e0',(#38),#6); 49#40=PCURVE('pc_e0',#5,#39); 50#41=SURFACE_CURVE('sc_e0',#26,(#40),.PCURVE_S1.); 51#42=EDGE_CURVE('ec_e0',#31,#32,#41,.T.); 52#43=CARTESIAN_POINT('',(10.0,0.0,0.0)); 53#44=DIRECTION('',(0.0,1.0,0.0)); 54#45=VECTOR('',#44,4.0); 55#46=LINE('',#43,#45); 56#47=CARTESIAN_POINT('',(10.0,0.0)); 57#48=DIRECTION('',(0.0,1.0)); 58#49=VECTOR('',#48,4.0); 59#50=LINE('',#47,#49); 60#51=DEFINITIONAL_REPRESENTATION('pcdef',(#50),#6); 61#52=PCURVE('pc',#5,#51); 62#53=SURFACE_CURVE('sc',#46,(#52),.PCURVE_S1.); 63#54=EDGE_CURVE('ec',#32,#33,#53,.T.); 64#55=CARTESIAN_POINT('',(10.0,4.0,0.0)); 65#56=DIRECTION('',(-1.0,0.0,0.0)); 66#57=VECTOR('',#56,10.0); 67#58=LINE('',#55,#57); 68#59=CARTESIAN_POINT('',(10.0,4.0)); 69#60=DIRECTION('',(-1.0,0.0)); 70#61=VECTOR('',#60,10.0); 71#62=LINE('',#59,#61); 72#63=DEFINITIONAL_REPRESENTATION('pcdef',(#62),#6); 73#64=PCURVE('pc',#5,#63); 74#65=SURFACE_CURVE('sc',#58,(#64),.PCURVE_S1.); 75#66=EDGE_CURVE('ec',#33,#34,#65,.T.); 76#67=CARTESIAN_POINT('',(0.0,4.0,0.0)); 77#68=DIRECTION('',(0.0,-1.0,0.0)); 78#69=VECTOR('',#68,4.0); 79#70=LINE('',#67,#69); 80#71=CARTESIAN_POINT('',(0.0,4.0)); 81#72=DIRECTION('',(0.0,-1.0)); 82#73=VECTOR('',#72,4.0); 83#74=LINE('',#71,#73); 84#75=DEFINITIONAL_REPRESENTATION('pcdef',(#74),#6); 85#76=PCURVE('pc',#5,#75); 86#77=SURFACE_CURVE('sc',#70,(#76),.PCURVE_S1.); 87#78=EDGE_CURVE('ec',#34,#31,#77,.T.); 88#79=ORIENTED_EDGE('',$,$,#42,.T.); 89#80=ORIENTED_EDGE('',$,$,#54,.T.); 90#81=ORIENTED_EDGE('',$,$,#66,.T.); 91#82=ORIENTED_EDGE('',$,$,#78,.T.); 92#83=EDGE_LOOP('',(#79,#80,#81,#82)); 93#84=FACE_OUTER_BOUND('',#83,.T.); 94#85=ADVANCED_FACE('',(#84),#5,.T.); 95#86=OPEN_SHELL('',(#85)); 96#87=SHELL_BASED_SURFACE_MODEL('',(#86)); 97#9050=PRODUCT_CONTEXT('',#9000,'mechanical'); 98#9051=PRODUCT('Gs048','Gs048','',(#9050)); 99#9052=PRODUCT_DEFINITION_FORMATION('','',#9051); 100#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design'); 101#9054=PRODUCT_DEFINITION('','','',#9052,#9053); 102#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054); 103#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 104#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 105#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 106#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value',''); 107#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D')); 108#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#87),#9060); 109#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061); 110ENDSEC; 111END-ISO-10303-21;