Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions volmdlr/faces.py
Original file line number Diff line number Diff line change
Expand Up @@ -1086,6 +1086,10 @@ def point2d_to_3d(self, point2d):
def point3d_to_2d(self, point3d):
return point3d.to_2d(self.frame.origin, self.frame.u, self.frame.v)

def dimensioned_surface2d(dimensionless_surface2d:Surface2D):
return dimensionless_surface2d


def contour2d_to_3d(self, contour2d):
return contour2d.to_3d(self.frame.origin, self.frame.u, self.frame.v)

Expand Down Expand Up @@ -1158,6 +1162,12 @@ def point3d_to_2d(self, point3d):
# theta = volmdlr.core.sin_cos_angle(u1, u2)
theta = math.atan2(u2, u1)
return volmdlr.Point2D(theta, z)

def dimensioned_surface2d(self, dimensionless_surface2d:Surface2D):
frame = volmdlr.OXY.copy()
frame.u = self.radius
return dimensionless_surface2d.frame_mapping(frame, side='old')


def arc3d_to_2d(self, arc3d):
start = self.point3d_to_2d(arc3d.start)
Expand Down Expand Up @@ -1384,6 +1394,13 @@ def point3d_to_2d(self, point3d):

return volmdlr.Point2D(theta, phi)

def dimensioned_surface2d(self, dimensionless_surface2d:Surface2D):
frame = volmdlr.OXY.copy()
frame.u = self.R
frame.v = self.r
return dimensionless_surface2d.frame_mapping(frame, side='old')


@classmethod
def from_step(cls, arguments, object_dict):
frame3d = object_dict[arguments[1]]
Expand Down Expand Up @@ -1768,6 +1785,12 @@ def point3d_to_2d(self, point3d):
theta = volmdlr.sin_cos_angle(u1, u2)
return volmdlr.Point2D(theta, phi)

def dimensioned_surface2d(self, dimensionless_surface2d:Surface2D):
frame = volmdlr.OXY.copy()
frame.u = self.radius
frame.v = self.radius
return dimensionless_surface2d.frame_mapping(frame, side='old')

def linesegment2d_to_3d(self, linesegment2d):
start = self.point2d_to_3d(linesegment2d.start)
interior = self.point2d_to_3d(0.5 * (linesegment2d.start + linesegment2d.end))
Expand Down