Repository navigation
Conversation
ObjectMeshHolder with a Face2CadFaceMap and a SmoothSurface per CadFaceId, saved in .mru scenes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ObjectCAD moves out of MRMesh into MRCad (OpenCASCADE, MESHLIB_BUILD_CAD), keeps the shape, tessellates it into the mesh with the CAD face and surface of every triangle, and saves the shape as .brep in .mru scenes. MRIOExtras keeps its own STEP loading. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…models and scaling of ObjectCAD CadFaceId is the index of the face in TopExp::MapShapes, so a face shared by solids or without triangles has one id, and the faces without exact surfaces are fitted in one cancelable fitSmoothSurfaces call, which allows B-splines within the linear deflection. B-splines of reversed faces are directed as their triangles, shared models keep the shape, and applyScale scales the shape, the surfaces and the deflection. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
OpenCASCADE 7.6 and later write format version 3 by default, which 7.5 (Ubuntu 22) cannot read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The configurations without STEP support may have no OpenCASCADE, which MRCad requires. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e filters Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…est margins The test no longer assumes that located copies of a face share its triangulation, since BRepBuilderAPI_Copy gives each one its own face. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e on a periodic B-spline surface The duplicated plane face is compared with the same face tessellated alone, and the fitted face is checked to be a B-spline surface within the deflection, whatever its degree. The braces around gtest macros avoid -Wdangling-else of GCC. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eflection The automatic threshold of fitSmoothSurfaces assumes that most regions are analytic, so a lone freeform face never got a B-spline surface. OpenCASCADE gives a face at least half of a relative deflection times the largest side of its box, so the smallest of these over the fitted faces is the tolerance, as the linear deflection is with absolute one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The mesh can be shared with other objects (shallow clones, objects of one shared model), whose shapes and surfaces are not scaled. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d.vcxproj The option now turns off whenever STEP support is turned off, also in an existing cache. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the description of the surfaces Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… triangles .brep keeps 15 digits, so the reloaded shape is tessellated slightly differently on arm64. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New optional library
MRCadwithObjectCAD: anObjectMeshHolderthat keeps the boundary representation of a CAD model (OpenCASCADE shape) and tessellates it itself, likeObjectVoxelsbuilds its surface.setTessellationParams(ortessellatein another thread +updateTessellation) gives the mesh, the CAD face of every mesh face (Face2CadFaceMap = Vector<CadFaceId, FaceId>, whereCadFaceIdis the index of the face inTopExp::MapShapes) and the surface of every CAD face (SmoothSurfacefrom fitSmoothSurfaces: smooth surface (analytic or B-spline) of every given mesh region #7621). Planes, cylinders, cones, spheres, tori and non-rational B-splines convert exactly; other faces get surfaces fitted to their triangles byfitSmoothSurfaces, a B-spline where the analytic surfaces are farther than the linear deflection.applyScalescales the shape, the surfaces and an absolute linear deflection too; shallow clones share the shape, and .mru scenes save it once.MESHLIB_BUILD_CADis on by default where STEP files are supported (MESHLIB_BUILD_EXTRA_IO_FORMATSand notMRIOEXTRAS_NO_STEP), off for Emscripten.ObjectCADcomes next. Python and C bindings of MRCad are not generated yet.Test plan
MRCad.ObjectCADTessellation: faces on all surface types, reversed and moved faces, a periodic B-spline face and a rational face fitted by a B-spline; every mesh vertex lies on the surface of its CAD face, planes and B-splines are directed as the triangles (Release and Debug)MRCad.ObjectCADRelativeDeflection: the fitted face gets a B-spline within the deflection relative to its sizeMRCad.SerializeObjectCAD: the shape, parameters, face map and surfaces survive saving and loading, a shallow clone still shares the mesh and the shape after loadingMRCad.ObjectCADScale: the shape, surfaces and deflection scale, a shallow clone keeps its meshGenerated with Claude Code