Three.js viewer supporting glb/gltf/obj/fbx/dae/ifc/ply via both server (SSR) and drag&drop (CSR) paths. - Streaming OBJ parser (src/viewer/objStream.ts) for files past the V8 max string length (>~1GB text) that OBJLoader can't handle; indexed geometry, per-vertex color from MTL Kd, float64 recenter baked in. - In-viewer float64 recenter (objRecenter.ts) for huge CAD/survey coordinates (~1e8) so float32 vertex buffers keep precision (no cracked faces). - Z-up right-handed world; Y-up formats rotated on load. - OBJ+MTL+texture drag&drop (LoadingManager URL-modifier maps dropped images). - OrbitControls ground-plane panning (road/rail alignment workflow). - UI: Zoom Fit, perspective/orthographic toggle, feature-edge outline. - DoubleSide for CAD OBJ; PLY mesh + point-cloud support. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
60 lines
2.3 KiB
Plaintext
60 lines
2.3 KiB
Plaintext
ISO-10303-21;
|
|
HEADER;
|
|
/* hand-authored minimal IFC4 file for hmwebviewer web-ifc testing.
|
|
One IfcWall (1m x 1m footprint, 1m high) as a swept-extruded solid placed in a
|
|
site/building/storey spatial tree. Validates with web-ifc; loadable via Path A
|
|
(SSR ?model=) and Path B (drag & drop). No network required. */
|
|
FILE_DESCRIPTION(('ViewDefinition [ReferenceView_V1.2]'),'2;1');
|
|
FILE_NAME('Cube.ifc','2026-06-19T00:00:00',(''),(''),'hmwebviewer','hand-authored','');
|
|
FILE_SCHEMA(('IFC4'));
|
|
ENDSEC;
|
|
DATA;
|
|
#1=IFCPERSON($,$,'',$,$,$,$,$);
|
|
#2=IFCORGANIZATION($,'hmwebviewer',$,$,$);
|
|
#3=IFCPERSONANDORGANIZATION(#1,#2,$);
|
|
#4=IFCAPPLICATION(#2,'1.0','hmwebviewer','hmw');
|
|
#5=IFCOWNERHISTORY(#3,#4,$,.ADDED.,$,$,$,0);
|
|
|
|
#6=IFCDIRECTION((1.,0.,0.));
|
|
#7=IFCDIRECTION((0.,0.,1.));
|
|
#8=IFCCARTESIANPOINT((0.,0.,0.));
|
|
#9=IFCAXIS2PLACEMENT3D(#8,#7,#6);
|
|
#10=IFCGEOMETRICREPRESENTATIONCONTEXT($,'Model',3,1.E-05,#9,$);
|
|
|
|
#11=IFCSIUNIT(*,.LENGTHUNIT.,$,.METRE.);
|
|
#12=IFCSIUNIT(*,.AREAUNIT.,$,.SQUARE_METRE.);
|
|
#13=IFCSIUNIT(*,.VOLUMEUNIT.,$,.CUBIC_METRE.);
|
|
#14=IFCUNITASSIGNMENT((#11,#12,#13));
|
|
|
|
#15=IFCPROJECT('0Project00000000000000000',#5,'Project',$,$,$,$,(#10),#14);
|
|
|
|
#20=IFCLOCALPLACEMENT($,#9);
|
|
#21=IFCSITE('0Site0000000000000000000',#5,'Site',$,$,#20,$,$,.ELEMENT.,$,$,$,$,$);
|
|
#22=IFCLOCALPLACEMENT(#20,#9);
|
|
#23=IFCBUILDING('0Building000000000000000',#5,'Building',$,$,#22,$,$,.ELEMENT.,$,$,$);
|
|
#24=IFCLOCALPLACEMENT(#22,#9);
|
|
#25=IFCBUILDINGSTOREY('0Storey00000000000000000',#5,'Storey',$,$,#24,$,$,.ELEMENT.,0.);
|
|
|
|
#30=IFCRELAGGREGATES('0RelAggProject0000000000',#5,$,$,#15,(#21));
|
|
#31=IFCRELAGGREGATES('0RelAggSite000000000000 ',#5,$,$,#21,(#23));
|
|
#32=IFCRELAGGREGATES('0RelAggBuilding00000000 ',#5,$,$,#23,(#25));
|
|
|
|
/* --- Wall geometry: 1m x 1m rectangle extruded 1m up --- */
|
|
#40=IFCCARTESIANPOINT((-0.5,-0.5));
|
|
#41=IFCCARTESIANPOINT((0.5,-0.5));
|
|
#42=IFCCARTESIANPOINT((0.5,0.5));
|
|
#43=IFCCARTESIANPOINT((-0.5,0.5));
|
|
#44=IFCPOLYLINE((#40,#41,#42,#43,#40));
|
|
#45=IFCARBITRARYCLOSEDPROFILEDEF(.AREA.,$,#44);
|
|
#46=IFCAXIS2PLACEMENT3D(#8,#7,#6);
|
|
#47=IFCEXTRUDEDAREASOLID(#45,#46,#7,1.);
|
|
#48=IFCSHAPEREPRESENTATION(#10,'Body','SweptSolid',(#47));
|
|
#49=IFCPRODUCTDEFINITIONSHAPE($,$,(#48));
|
|
|
|
#50=IFCLOCALPLACEMENT(#24,#9);
|
|
#51=IFCWALL('0Wall00000000000000000000',#5,'Wall',$,$,#50,#49,$,.SOLIDWALL.);
|
|
|
|
#60=IFCRELCONTAINEDINSPATIALSTRUCTURE('0RelContained0000000000 ',#5,$,$,(#51),#25);
|
|
ENDSEC;
|
|
END-ISO-10303-21;
|