Skip to content

Commit

Permalink
Merge pull request #11 from Matter-and-Form/feature/versionUpdate
Browse files Browse the repository at this point in the history
update version of schema to 9.0
  • Loading branch information
drewsipher authored Nov 27, 2024
2 parents 6e5979b + d15bafa commit 6814619
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 103 deletions.
2 changes: 1 addition & 1 deletion V3Schema
75 changes: 17 additions & 58 deletions three/MF/V3/Settings/Merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,63 +13,10 @@ class Remesh:
"""
Remesh settings.
"""
class Method(Enum):

"""
Remesh method.
"""
FlowTriangles = "FlowTriangles" # Flow remesh as triangles.
FlowQuads = "FlowQuads" # Flow remesh as quads.
FlowQuadDominant = "FlowQuadDominant" # Flow remesh as quad-dominant mesh.
PoissonTriangles = "PoissonTriangles" # Poisson remesh as triangles.

class Flow:

"""
Flow remesh settings
"""
def __init__(self, scale: float = None, faceCount: int = None, vertexCount: int = None, creaseAngleThreshold: float = None, extrinsicSmoothness: bool = None, alignToBoundaries: bool = None, smoothIterations: int = None, knnPoints: int = None, deterministic: bool = None):
# Output resolution scale. Smaller means more faces.
self.scale = scale
# The approximate number of remeshed faces.
self.faceCount = faceCount
# The approximate number of remeshed vertices.
self.vertexCount = vertexCount
# The crease angle threshold.
self.creaseAngleThreshold = creaseAngleThreshold
# Use extrinsic smoothness.
self.extrinsicSmoothness = extrinsicSmoothness
# Align mesh to boundaries.
self.alignToBoundaries = alignToBoundaries
# The number of smoothing iterations.
self.smoothIterations = smoothIterations
# The number of KNN points (point cloud input only).
self.knnPoints = knnPoints
# Use deterministic (repeatable) remeshing.
self.deterministic = deterministic

class Poisson:
def __init__(self, voxelSize: float = None, depth: int = None, scale: float = None, linearInterpolation: bool = None):
# Voxel size.
self.voxelSize = voxelSize
# Depth.
self.depth = depth
# Scale.
self.scale = scale
# Linear Interpolation.
self.linearInterpolation = linearInterpolation

def __init__(self, method: 'Method' = None, quality: MF_V3_Settings_Quality_Quality = None, flow: 'Flow' = None, poisson: 'Poisson' = None, voxelSize: float = None, depth: int = None, scale: float = None, linearInterpolation: bool = None):
# Remesh method.
self.method = method
def __init__(self, quality: MF_V3_Settings_Quality_Quality = None, voxelSize: float = None, depth: int = None, scale: float = None, linearInterpolation: bool = None):
# Remesh quality.
self.quality = quality
# Flow remesh options (Ignored if method is 'Poison').
self.flow = flow
# Poisson remesh options (Ignored if method is not 'Poisson').
self.poisson = poisson
"""Temporary for backwards compatibility
Voxel size."""
# Voxel size.
self.voxelSize = voxelSize
# Depth.
self.depth = depth
Expand All @@ -83,9 +30,21 @@ class Simplify:
"""
Simplify settings.
"""
def __init__(self, triangleCount: int):
# Target triangle count.
self.triangleCount = triangleCount
class Method(Enum):

"""
Remesh method.
"""
QuadraticDecimation = "QuadraticDecimation" # Quadratic decimation.
FlowTriangles = "FlowTriangles" # Flow remesh as triangles.
FlowQuads = "FlowQuads" # Flow remesh as quads.
FlowQuadDominant = "FlowQuadDominant" # Flow remesh as quad-dominant mesh.

def __init__(self, method: 'Method' = None, faceCount: int = None):
# Simplify method.
self.method = method
# Target face count.
self.faceCount = faceCount

def __init__(self, selection: MF_V3_Settings_ScanSelection_ScanSelection = None, remesh: 'Remesh' = None, simplify: 'Simplify' = None, texturize: bool = None):
# The scan selection.
Expand Down
42 changes: 0 additions & 42 deletions three/MF/V3/Settings/Remesh.py

This file was deleted.

1 change: 0 additions & 1 deletion three/MF/V3/Settings/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from MF.V3.Settings.Projector import *
from MF.V3.Settings.Quality import *
from MF.V3.Settings.Rectangle import *
from MF.V3.Settings.Remesh import *
from MF.V3.Settings.RemoveVertices import *
from MF.V3.Settings.Scan import *
from MF.V3.Settings.ScanData import *
Expand Down
2 changes: 1 addition & 1 deletion three/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '8.20.14'
__version__ = '9.0.0'

0 comments on commit 6814619

Please sign in to comment.