Skip to content

Commit

Permalink
[Topology] Backup dirty but working version of cutting with snapping
Browse files Browse the repository at this point in the history
  • Loading branch information
epernod committed Jan 5, 2025
1 parent c8aaaca commit 2c4e555
Show file tree
Hide file tree
Showing 3 changed files with 205 additions and 96 deletions.
4 changes: 2 additions & 2 deletions scenes/TopologyBenchmarks/Benchmark_01_TriangleCut_plane.scn
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
<Node name="root" dt="0.03" showBoundingTree="0" gravity="0 0 0">
<Node name="root" dt="0.03" showBoundingTree="0" gravity="0 -0.1 0">
<Node name="RequiredPlugins">
<RequiredPlugin name="Sofa.Component.Collision.Detection.Algorithm"/> <!-- Needed to use components [BVHNarrowPhase, BruteForceBroadPhase, CollisionPipeline] -->
<RequiredPlugin name="Sofa.Component.Collision.Detection.Intersection"/> <!-- Needed to use components [MinProximityIntersection] -->
Expand Down Expand Up @@ -48,7 +48,7 @@
<FixedProjectiveConstraint template="Vec3d" name="fixedConstraint1" indices="@box_roi1.indices"/>
<TriangularFEMForceField template="Vec3d" name="FEM" method="large" poissonRatio="0.45" youngModulus="600" />
<TriangleCollisionModel name="default7" selfCollision="true" />
<TriangleCuttingController name="TriCtrl" triAID="55" triBID="85" drawDebugCut="1" performCut="0"/>
<TriangleCuttingController name="TriCtrl" triAID="55" triBID="85" drawDebugCut="1" performCut="1"/>
<Node name="visu">
<OglModel name="Visual" texcoords="@../loader.texcoords" texturename="textures/colorMap.png"/>
<IdentityMapping input="@.." output="@." />
Expand Down
3 changes: 3 additions & 0 deletions src/Tearing/Controllers/TriangleCuttingController.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ class TEARING_API TriangleCuttingController : public core::behavior::BaseControl

type::vector< TriangleSubdivider*> m_subviders;
type::vector< std::shared_ptr<PointToAdd> > m_pointsToAdd;

type::vector<Triangle> m_addTriangles;
type::vector<TriangleID> m_removedTriangles;
};


Expand Down
Loading

0 comments on commit 2c4e555

Please sign in to comment.